diff options
author | Martin Hunt <hunt@redhat.com> | 1996-09-23 23:18:50 +0000 |
---|---|---|
committer | Martin Hunt <hunt@redhat.com> | 1996-09-23 23:18:50 +0000 |
commit | b70b03b0e81eee2b02ebb34b043406627cfd9a55 (patch) | |
tree | 48603180f99c091a1e10643d92793472a2e507dc /gdb/d10v-tdep.c | |
parent | 6e4f3f096f3f39f6e45318088302734d41327506 (diff) | |
download | gdb-b70b03b0e81eee2b02ebb34b043406627cfd9a55.zip gdb-b70b03b0e81eee2b02ebb34b043406627cfd9a55.tar.gz gdb-b70b03b0e81eee2b02ebb34b043406627cfd9a55.tar.bz2 |
Mon Sep 23 16:13:50 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
* config/d10v/tm-d10v.h (SAVED_PC_AFTER_CALL): Fixed.
Now single-steps correctly.
* d10v-tdep.c (d10v_pop_frame): Fixed.
Diffstat (limited to 'gdb/d10v-tdep.c')
-rw-r--r-- | gdb/d10v-tdep.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/gdb/d10v-tdep.c b/gdb/d10v-tdep.c index 464aec6..7189bc1 100644 --- a/gdb/d10v-tdep.c +++ b/gdb/d10v-tdep.c @@ -36,20 +36,17 @@ void d10v_pop_frame () { struct frame_info *frame = get_current_frame (); - int fp, r13; + CORE_ADDR fp; int regnum; struct frame_saved_regs fsr; char raw_buffer[8]; - fp = (int)FRAME_FP (frame); + fp = FRAME_FP (frame); /* fill out fsr with the address of where each */ /* register was stored in the frame */ get_frame_saved_regs (frame, &fsr); - /* r13 contains the old PC. save it. */ - r13 = (int)read_register (13); - /* now update the current registers with the old values */ for (regnum = A0_REGNUM; regnum < A0_REGNUM+2 ; regnum++) { @@ -71,9 +68,9 @@ d10v_pop_frame () write_register (PSW_REGNUM, read_memory_unsigned_integer (fsr.regs[PSW_REGNUM], 2)); } - /* PC is set to r13 */ - write_register (PC_REGNUM, (LONGEST)r13); - write_register (SP_REGNUM, fp - frame->size); + write_register (PC_REGNUM, read_register(13)); + write_register (SP_REGNUM, fp + frame->size); + target_store_registers (-1); flush_cached_frames (); } @@ -301,6 +298,9 @@ d10v_frame_find_saved_regs (fi, fsr) fi->return_pc = (read_memory_unsigned_integer(fsr->regs[13],2)-1) << 2; else fi->return_pc = (read_register(13) - 1) << 2; + + if (!fsr->regs[SP_REGNUM]) + fsr->regs[SP_REGNUM] = read_register(FP_REGNUM) + fi->size; } void |