From cc96816c2b118e68ae40289a32d311ab2e8a5b72 Mon Sep 17 00:00:00 2001 From: jimb Date: Thu, 20 Dec 2001 08:54:02 +0000 Subject: [PATCH] * s390-tdep.c (s390_frame_saved_pc_nofix): If we get the saved PC out of the return address register, cache that in the frame's extra info, just as if we'd gotten it from the saved regs array; that way, it's not a lie to set the saved_pc_valid flag. --- gdb/ChangeLog | 5 +++++ gdb/s390-tdep.c | 22 ++++++++++------------ 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 6246f80495..432c507acf 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,10 @@ 2001-12-19 Jim Blandy + * s390-tdep.c (s390_frame_saved_pc_nofix): If we get the saved PC + out of the return address register, cache that in the frame's + extra info, just as if we'd gotten it from the saved regs array; + that way, it's not a lie to set the saved_pc_valid flag. + * s390-tdep.c (s390_get_frame_info): Give orig_sp a reasonable value, even when fextra_info->stack_bought can't be trusted, diff --git a/gdb/s390-tdep.c b/gdb/s390-tdep.c index 555d05f2a7..c524657a57 100644 --- a/gdb/s390-tdep.c +++ b/gdb/s390-tdep.c @@ -960,18 +960,16 @@ s390_frame_saved_pc_nofix (struct frame_info *fi) if (fi->extra_info) { fi->extra_info->saved_pc_valid = 1; - if (fi->extra_info->good_prologue) - { - if (fi->saved_regs[S390_RETADDR_REGNUM]) - { - return (fi->extra_info->saved_pc = - ADDR_BITS_REMOVE (read_memory_integer - (fi->saved_regs[S390_RETADDR_REGNUM], - S390_GPR_SIZE))); - } - else - return read_register (S390_RETADDR_REGNUM); - } + if (fi->extra_info->good_prologue + && fi->saved_regs[S390_RETADDR_REGNUM]) + fi->extra_info->saved_pc + = ADDR_BITS_REMOVE (read_memory_integer + (fi->saved_regs[S390_RETADDR_REGNUM], + S390_GPR_SIZE)); + else + fi->extra_info->saved_pc + = ADDR_BITS_REMOVE (read_register (S390_RETADDR_REGNUM)); + return fi->extra_info->saved_pc; } return 0; } -- 2.11.0