aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2003-06-01 16:04:50 +0000
committerRichard Henderson <rth@redhat.com>2003-06-01 16:04:50 +0000
commitf3e0f90b5ddd9d2391a465142ca9f274cff8bc19 (patch)
treea276d214a5be415c1658da8dd1df305232310db3 /gdb
parentc88e30c0a00854e38c4b2fe7895a1de2a6c56265 (diff)
downloadgdb-f3e0f90b5ddd9d2391a465142ca9f274cff8bc19.zip
gdb-f3e0f90b5ddd9d2391a465142ca9f274cff8bc19.tar.gz
gdb-f3e0f90b5ddd9d2391a465142ca9f274cff8bc19.tar.bz2
* dwarf2-frame.c (dwarf2_frame_cache): Handle retaddr_column
not overlapping PC_REGNUM.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/dwarf2-frame.c16
2 files changed, 19 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index db2244b..121ba17 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
2003-06-01 Richard Henderson <rth@redhat.com>
+ * dwarf2-frame.c (dwarf2_frame_cache): Handle retaddr_column
+ not overlapping PC_REGNUM.
+
+2003-06-01 Richard Henderson <rth@redhat.com>
+
* alpha-tdep.c (alpha_push_dummy_call): Transmography from
alpha_push_arguments. Don't dump argument register data to
the target stack. Fix float and 128-bit long double semantics.
diff --git a/gdb/dwarf2-frame.c b/gdb/dwarf2-frame.c
index 7694218..f406e64 100644
--- a/gdb/dwarf2-frame.c
+++ b/gdb/dwarf2-frame.c
@@ -550,9 +550,21 @@ dwarf2_frame_cache (struct frame_info *next_frame, void **this_cache)
cache->reg[regnum] = fs->regs.reg[reg];
}
- /* Stored the location of the return addess. */
- if (fs->retaddr_column < fs->regs.num_regs)
+ /* Store the location of the return addess. If the return address
+ column (adjusted) is not the same as gdb's PC_REGNUM, then this
+ implies a copy from the ra column register. */
+ if (fs->retaddr_column < fs->regs.num_regs
+ && fs->regs.reg[fs->retaddr_column].how != REG_UNSAVED)
cache->reg[PC_REGNUM] = fs->regs.reg[fs->retaddr_column];
+ else
+ {
+ reg = DWARF2_REG_TO_REGNUM (fs->retaddr_column);
+ if (reg != PC_REGNUM)
+ {
+ cache->reg[PC_REGNUM].loc.reg = reg;
+ cache->reg[PC_REGNUM].how = REG_SAVED_REG;
+ }
+ }
do_cleanups (old_chain);