diff options
author | Jim Blandy <jimb@codesourcery.com> | 2001-12-20 08:54:02 +0000 |
---|---|---|
committer | Jim Blandy <jimb@codesourcery.com> | 2001-12-20 08:54:02 +0000 |
commit | 529765f487cef2bbe14d54fd65752d95e288d441 (patch) | |
tree | 8081174030432091d3e013338daec0ff2ffff182 /gdb/s390-tdep.c | |
parent | 76cc2cf029a9b9a386c5b7fe8f5d40531a00f8ca (diff) | |
download | gdb-529765f487cef2bbe14d54fd65752d95e288d441.zip gdb-529765f487cef2bbe14d54fd65752d95e288d441.tar.gz gdb-529765f487cef2bbe14d54fd65752d95e288d441.tar.bz2 |
* 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.
Diffstat (limited to 'gdb/s390-tdep.c')
-rw-r--r-- | gdb/s390-tdep.c | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/gdb/s390-tdep.c b/gdb/s390-tdep.c index 555d05f..c524657 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; } |