This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
PATCH: S/390: handle sp element of saved_regs array correctly
- From: Jim Blandy <jimb at zwingli dot cygnus dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: Tue, 27 Nov 2001 22:38:35 -0500 (EST)
- Subject: PATCH: S/390: handle sp element of saved_regs array correctly
2001-11-27 Jim Blandy <jimb@redhat.com>
* s390-tdep.c (s390_frame_chain): Remember that the SP's element
of the frame's saved_regs array is special.
Index: gdb/s390-tdep.c
===================================================================
RCS file: /cvs/cvsfiles/devo/gdb/s390-tdep.c,v
retrieving revision 2.19
diff -c -r2.19 s390-tdep.c
*** gdb/s390-tdep.c 2001/11/28 03:18:34 2.19
--- gdb/s390-tdep.c 2001/11/28 03:31:35
***************
*** 974,991 ****
{
if (thisframe->saved_regs)
{
-
int regno;
- regno =
- ((prev_fextra_info.frame_pointer_saved_pc
- && thisframe->
- saved_regs[S390_FRAME_REGNUM]) ? S390_FRAME_REGNUM :
- S390_SP_REGNUM);
if (thisframe->saved_regs[regno])
! prev_fp =
! read_memory_integer (thisframe->saved_regs[regno],
! S390_GPR_SIZE);
}
}
}
--- 974,997 ----
{
if (thisframe->saved_regs)
{
int regno;
+
+ if (prev_fextra_info.frame_pointer_saved_pc
+ && thisframe->saved_regs[S390_FRAME_REGNUM])
+ regno = S390_FRAME_REGNUM;
+ else
+ regno = S390_SP_REGNUM;
if (thisframe->saved_regs[regno])
! {
! /* The SP's entry of `saved_regs' is special. */
! if (regno == S390_SP_REGNUM)
! prev_fp = thisframe->saved_regs[regno];
! else
! prev_fp =
! read_memory_integer (thisframe->saved_regs[regno],
! S390_GPR_SIZE);
! }
}
}
}