From 9a1befc91642f549ca6b00de46a083cffdc5f58b Mon Sep 17 00:00:00 2001 From: Jim Blandy Date: Wed, 14 Nov 2001 22:34:38 +0000 Subject: [PATCH] * 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. --- gdb/ChangeLog | 5 +++++ gdb/s390-tdep.c | 6 ++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 5f245cc7aea..f13b54a22a9 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,10 @@ 2001-11-14 Jim Blandy + * 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. + * s390-tdep.c (s390_extract_return_value): Returned `float' values can simply be copied bitwise from the registers into the value object's buffer. diff --git a/gdb/s390-tdep.c b/gdb/s390-tdep.c index 632261ed1f1..d2fa1a0f5a6 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 (); -- 2.30.2