(infoRegisters): show return address on stack
authorfrief <frief@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Thu, 6 Apr 2006 16:39:02 +0000 (16:39 +0000)
committerfrief <frief@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Thu, 6 Apr 2006 16:39:02 +0000 (16:39 +0000)
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@4082 4a8a32a2-be11-0410-ad9d-d568d2c75423

debugger/mcs51/cmd.c

index 4e7688300ab5aa8e3ec4b144837b0767bbf600a3..64e163c12ac32ba82cb52707481890ad0d0dfce6 100644 (file)
@@ -1954,7 +1954,7 @@ static void infoRegisters( int all, context *ctxt)
     val = simGetValue (0x82,'I',2);
     fprintf(stdout,"DPTR: 0x%04X %d\n",val,val);
     val = simGetValue (0x81,'I',1);
-    fprintf(stdout,"SP  : 0x%02X\n",val);
+    fprintf(stdout,"SP  : 0x%02X (0x%04X)\n",val,simGetValue (val-1,'B',2));
     fprintf(stdout,"PSW : 0x%02X | CY : %c | AC : %c | OV : %c | P : %c\n",
             i,(i&0x80)?'1':'0',(i&0x40)?'1':'0',(i&4)?'1':'0',(i&1)?'1':'0');
     if ( all )