diff options
author | Pedro Alves <palves@redhat.com> | 2012-07-20 17:54:06 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2012-07-20 17:54:06 +0000 |
commit | 3def0b36605f46dde107a69d5f7f846a7f95322c (patch) | |
tree | 25505f373f6c22193c2015b9895a74e1be1a6e47 /gdb/tilegx-linux-tdep.c | |
parent | e615022aba277cd9a14aa70e2458680e152849fa (diff) | |
download | gdb-3def0b36605f46dde107a69d5f7f846a7f95322c.zip gdb-3def0b36605f46dde107a69d5f7f846a7f95322c.tar.gz gdb-3def0b36605f46dde107a69d5f7f846a7f95322c.tar.bz2 |
2012-07-20 Jeff Kenton <jkenton@tilera.com>
* tilegx-linux-tdep.c (tilegx_linux_sigframe_init): Fix
SIGTRAMP_FRAME unwinding.
Diffstat (limited to 'gdb/tilegx-linux-tdep.c')
-rw-r--r-- | gdb/tilegx-linux-tdep.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/gdb/tilegx-linux-tdep.c b/gdb/tilegx-linux-tdep.c index 2b7677d..c5e0e80 100644 --- a/gdb/tilegx-linux-tdep.c +++ b/gdb/tilegx-linux-tdep.c @@ -39,13 +39,23 @@ tilegx_linux_sigframe_init (const struct tramp_frame *self, { CORE_ADDR pc = get_frame_register_unsigned (this_frame, 64); CORE_ADDR sp = get_frame_register_unsigned (this_frame, 54); - CORE_ADDR base = sp + 16; + + /* Base address of register save area. */ + CORE_ADDR base = sp + + 16 /* Skip ABI_SAVE_AREA. */ + + 128 /* Skip SIGINFO. */ + + 40; /* Skip UCONTEXT. */ + + /* Address of saved LR register (R56) which holds previous PC. */ + CORE_ADDR prev_pc = base + 56 * 8; + int i; for (i = 0; i < 56; i++) trad_frame_set_reg_addr (this_cache, i, base + i * 8); - trad_frame_set_reg_value (this_cache, 64, pc); + trad_frame_set_reg_value (this_cache, 64, + get_frame_memory_unsigned (this_frame, prev_pc, 8)); /* Save a frame ID. */ trad_frame_set_id (this_cache, frame_id_build (base, func)); |