diff options
author | Jim Kingdon <jkingdon@engr.sgi.com> | 1993-09-07 19:57:45 +0000 |
---|---|---|
committer | Jim Kingdon <jkingdon@engr.sgi.com> | 1993-09-07 19:57:45 +0000 |
commit | ed1a07ad1f93a2709e79fe659715e90c2baf0016 (patch) | |
tree | 837e81fa6c8bff2333f80351babd56b9be2c006b /gdb/hppa-tdep.c | |
parent | b7da78d5610e060e7623f5e61b8d1a858daa0b2f (diff) | |
download | gdb-ed1a07ad1f93a2709e79fe659715e90c2baf0016.zip gdb-ed1a07ad1f93a2709e79fe659715e90c2baf0016.tar.gz gdb-ed1a07ad1f93a2709e79fe659715e90c2baf0016.tar.bz2 |
* config/pa/tm-hppa.h: Declare target_read_pc and target_write_pc.
(STORE_RETURN_VAULE): Pass the correct offset of the return
register to write_register_bytes.
* hppa-tdep.c: Use target_write_pc if PCOQ_TAIL_REGNUM was not saved.
Diffstat (limited to 'gdb/hppa-tdep.c')
-rw-r--r-- | gdb/hppa-tdep.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gdb/hppa-tdep.c b/gdb/hppa-tdep.c index c3842cf..9d71ec8 100644 --- a/gdb/hppa-tdep.c +++ b/gdb/hppa-tdep.c @@ -689,10 +689,15 @@ hppa_pop_frame () write_register (SAR_REGNUM, read_memory_integer (fsr.regs[SAR_REGNUM], 4)); + /* If the PC was explicitly saved, then just restore it. */ if (fsr.regs[PCOQ_TAIL_REGNUM]) write_register (PCOQ_TAIL_REGNUM, read_memory_integer (fsr.regs[PCOQ_TAIL_REGNUM], 4)); + /* Else use the value in %rp to set the new PC. */ + else + target_write_pc (read_register (RP_REGNUM)); + write_register (FP_REGNUM, read_memory_integer (fp, 4)); if (fsr.regs[IPSW_REGNUM]) /* call dummy */ |