aboutsummaryrefslogtreecommitdiff
path: root/gdb/rs6000-tdep.c
diff options
context:
space:
mode:
authorJim Kingdon <jkingdon@engr.sgi.com>1993-04-26 16:44:03 +0000
committerJim Kingdon <jkingdon@engr.sgi.com>1993-04-26 16:44:03 +0000
commit9aa31e91d68c5e49b99fbedf257ef25ad8664944 (patch)
treedad4ad92dc4a2cfb8a7710b8099d069937c75ea1 /gdb/rs6000-tdep.c
parent63ddbacf196d20610ad2ffec00b029c9d774c921 (diff)
downloadgdb-9aa31e91d68c5e49b99fbedf257ef25ad8664944.zip
gdb-9aa31e91d68c5e49b99fbedf257ef25ad8664944.tar.gz
gdb-9aa31e91d68c5e49b99fbedf257ef25ad8664944.tar.bz2
* rs6000-tdep.c (branch_dest): Deal with stepping through system call.
Diffstat (limited to 'gdb/rs6000-tdep.c')
-rw-r--r--gdb/rs6000-tdep.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c
index 12d3361..e783c1e 100644
--- a/gdb/rs6000-tdep.c
+++ b/gdb/rs6000-tdep.c
@@ -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;