* rs6000-tdep.c (branch_dest): Deal with stepping through system call.
authorJim Kingdon <jkingdon@engr.sgi.com>
Mon, 26 Apr 1993 16:44:03 +0000 (16:44 +0000)
committerJim Kingdon <jkingdon@engr.sgi.com>
Mon, 26 Apr 1993 16:44:03 +0000 (16:44 +0000)
gdb/ChangeLog
gdb/rs6000-tdep.c

index e1347daa2e674131d336dbf2d7f8a74c571c609f..adad3030d838c099fa271623e923592ad88486ef 100644 (file)
@@ -1,3 +1,9 @@
+Mon Apr 26 07:13:32 1993  Jim Kingdon  (kingdon@cygnus.com)
+
+       * rs6000-tdep.c (branch_dest): Deal with stepping through system call.
+
+       * symtab.h, xcoffread.c: Revise linetable sorting comments.
+
 Sun Apr 25 02:32:16 1993  Peter Schauer  (pes@regent.e-technik.tu-muenchen.de)
 
        * valops.c (value_cast): A cast might also change the object
index 12d336198547eaeeddf379b650dea290281018b1..e783c1e4e430766696e2fe0449c15e0d061eb948 100644 (file)
@@ -106,8 +106,15 @@ branch_dest (opcode, instr, pc, safety)
          dest = read_register (LR_REGNUM) & ~3;
 
        else if (ext_op == 528)                 /* br cond to count reg */
-         dest = read_register (CTR_REGNUM) & ~3;
-
+         {
+           dest = read_register (CTR_REGNUM) & ~3;
+
+           /* If we are about to execute a system call, dest is something
+              like 0x22fc or 0x3b00.  Upon completion the system call
+              will return to the address in the link register.  */
+           if (dest < TEXT_SEGMENT_BASE)
+             dest = read_register (LR_REGNUM) & ~3;
+         }
        else return -1; 
        break;