diff options
author | Mark Kettenis <kettenis@gnu.org> | 2003-05-17 21:44:20 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@gnu.org> | 2003-05-17 21:44:20 +0000 |
commit | 32c8e0ed29c1e8b95432cd753851ab4e1bd86230 (patch) | |
tree | 80ff5134eeb084a31075d50050b4ad4973717d6c | |
parent | 82aa4aef3745869fa094da93d3b3104ef0616193 (diff) | |
download | gdb-32c8e0ed29c1e8b95432cd753851ab4e1bd86230.tar.gz |
* dwarf-frame.c (dwarf_frame_cache): Fix handling of return
address column.
-rw-r--r-- | gdb/ChangeLog | 3 | ||||
-rw-r--r-- | gdb/dwarf-frame.c | 12 |
2 files changed, 12 insertions, 3 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 788bd973a60..f907fe41bbc 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,8 @@ 2003-05-17 Mark Kettenis <kettenis@gnu.org> + * dwarf-frame.c (dwarf_frame_cache): Fix handling of return + address column. + * config/i386/x86-64linux.mh (NATDEPFILES): Fix typo. * i386-tdep.c (i386_unwind_dummy_id): Use extract_unsigned_integer diff --git a/gdb/dwarf-frame.c b/gdb/dwarf-frame.c index a1d963491fa..66d51309a37 100644 --- a/gdb/dwarf-frame.c +++ b/gdb/dwarf-frame.c @@ -520,15 +520,21 @@ dwarf_frame_cache (struct frame_info *next_frame, void **this_cache) /* Save the register info in the cache. */ for (reg = 0; reg < fs->regs.num_regs; reg++) { + int regnum; + + /* Skip the return address column. */ + if (reg == fs->retaddr_column) + continue; + /* Use the GDB register number as index. */ - int regnum = DWARF2_REG_TO_REGNUM (reg); + regnum = DWARF2_REG_TO_REGNUM (reg); if (regnum >= 0 && regnum < num_regs) cache->reg[regnum] = fs->regs.reg[reg]; } - /* Make sure we have stored the return addess value. */ - if (cache->reg[PC_REGNUM].how == REG_UNSAVED) + /* Stored the location of the return addess. */ + if (fs->retaddr_column < fs->regs.num_regs) cache->reg[PC_REGNUM] = fs->regs.reg[fs->retaddr_column]; do_cleanups (old_chain); |