diff options
author | Mark Kettenis <kettenis@gnu.org> | 2004-02-02 22:00:14 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@gnu.org> | 2004-02-02 22:00:14 +0000 |
commit | d4f10bf20ba9967f65bb3ee589d5d9aa86c7629a (patch) | |
tree | 84f7233be0d5a7d6d313196cb10f608e1849c6e3 | |
parent | 1b8021965a82c658c610b710eb3fe6bc132da948 (diff) | |
download | gdb-d4f10bf20ba9967f65bb3ee589d5d9aa86c7629a.zip gdb-d4f10bf20ba9967f65bb3ee589d5d9aa86c7629a.tar.gz gdb-d4f10bf20ba9967f65bb3ee589d5d9aa86c7629a.tar.bz2 |
* dwarf2-frame.c (dwarf2_frame_cache): Deal with a return address
column that's "empty" or "same value" when eliminating REG_RA
rules.
-rw-r--r-- | gdb/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/dwarf2-frame.c | 15 |
2 files changed, 16 insertions, 5 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 7c0ded5..63cda6c 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2004-02-02 Mark Kettenis <kettenis@gnu.org> + + * dwarf2-frame.c (dwarf2_frame_cache): Deal with a return address + column that's "empty" or "same value" when eliminating REG_RA + rules. + 2004-02-02 Jeff Johnston <jjohnstn@redhat.com> * breakpoint.h (struct breakpoint): Add new flag, from_tty, diff --git a/gdb/dwarf2-frame.c b/gdb/dwarf2-frame.c index 2c655d9..22e4107 100644 --- a/gdb/dwarf2-frame.c +++ b/gdb/dwarf2-frame.c @@ -661,14 +661,19 @@ dwarf2_frame_cache (struct frame_info *next_frame, void **this_cache) { if (cache->reg[regnum].how == REG_RA) { - if (fs->retaddr_column < fs->regs.num_regs) + /* It seems rather bizarre to specify an "empty" column as + the return adress column. However, this is exactly + what GCC does on some targets. It turns out that GCC + assumes that the return address can be found in the + register corresponding to the return address column. + Incidentally, that's how should treat a return address + column specifying "same value" too. */ + if (fs->retaddr_column < fs->regs.num_regs + && fs->regs.reg[fs->retaddr_column].how != REG_UNSPECIFIED + && fs->regs.reg[fs->retaddr_column].how != REG_SAME_VALUE) cache->reg[regnum] = fs->regs.reg[fs->retaddr_column]; else { - /* It turns out that GCC assumes that if the return - address column is "empty" the return address can be - found in the register corresponding to the return - address column. */ cache->reg[regnum].loc.reg = fs->retaddr_column; cache->reg[regnum].how = REG_SAVED_REG; } |