diff options
author | Jim Blandy <jimb@codesourcery.com> | 2001-11-28 03:36:36 +0000 |
---|---|---|
committer | Jim Blandy <jimb@codesourcery.com> | 2001-11-28 03:36:36 +0000 |
commit | 31c4d430c4ae6068c12ed5bb965fe7a1641b9bba (patch) | |
tree | b4b601709148e28b480f7153090a7b41d1fb9d8d /gdb/s390-tdep.c | |
parent | 24acd898d2937c3316d4c72543cfee29cee667c6 (diff) | |
download | gdb-31c4d430c4ae6068c12ed5bb965fe7a1641b9bba.zip gdb-31c4d430c4ae6068c12ed5bb965fe7a1641b9bba.tar.gz gdb-31c4d430c4ae6068c12ed5bb965fe7a1641b9bba.tar.bz2 |
* s390-tdep.c (s390_frame_chain): Remember that the SP's element
of the frame's saved_regs array is special.
Diffstat (limited to 'gdb/s390-tdep.c')
-rw-r--r-- | gdb/s390-tdep.c | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/gdb/s390-tdep.c b/gdb/s390-tdep.c index be50a92..afefc7f 100644 --- a/gdb/s390-tdep.c +++ b/gdb/s390-tdep.c @@ -974,18 +974,24 @@ s390_frame_chain (struct frame_info *thisframe) { 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 (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]) - prev_fp = - read_memory_integer (thisframe->saved_regs[regno], - S390_GPR_SIZE); + { + /* 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); + } } } } |