aboutsummaryrefslogtreecommitdiff
path: root/gdb/s390-tdep.c
diff options
context:
space:
mode:
authorJim Blandy <jimb@codesourcery.com>2001-11-14 22:34:38 +0000
committerJim Blandy <jimb@codesourcery.com>2001-11-14 22:34:38 +0000
commit9a1befc91642f549ca6b00de46a083cffdc5f58b (patch)
tree2fc8ee387a7f9b8858e206f1c19c295857c20f3c /gdb/s390-tdep.c
parentf2c6cfba862c4a82626386344da1864d82214efa (diff)
downloadfsf-binutils-gdb-9a1befc91642f549ca6b00de46a083cffdc5f58b.zip
fsf-binutils-gdb-9a1befc91642f549ca6b00de46a083cffdc5f58b.tar.gz
fsf-binutils-gdb-9a1befc91642f549ca6b00de46a083cffdc5f58b.tar.bz2
* s390-tdep.c (s390_pop_frame_regular): On the S/390, the frame
pointer and the SP are often the same, so we can't pop the frame by setting the SP to the FP; we need to get the old SP from saved_regs.
Diffstat (limited to 'gdb/s390-tdep.c')
-rw-r--r--gdb/s390-tdep.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gdb/s390-tdep.c b/gdb/s390-tdep.c
index 632261e..d2fa1a0 100644
--- a/gdb/s390-tdep.c
+++ b/gdb/s390-tdep.c
@@ -1169,8 +1169,10 @@ s390_pop_frame_regular (struct frame_info *frame)
write_register (regnum, value);
}
- /* Actually cut back the stack. */
- write_register (S390_SP_REGNUM, FRAME_FP (frame));
+ /* Actually cut back the stack. Remember that the SP's element of
+ saved_regs is the old SP itself, not the address at which it is
+ saved. */
+ write_register (S390_SP_REGNUM, frame->saved_regs[S390_SP_REGNUM]);
/* Throw away any cached frame information. */
flush_cached_frames ();