diff options
author | Jeff Law <law@redhat.com> | 1995-06-07 18:43:58 +0000 |
---|---|---|
committer | Jeff Law <law@redhat.com> | 1995-06-07 18:43:58 +0000 |
commit | c38e0b58f332b3a4435a47d98e6e4602d08ab2ce (patch) | |
tree | 7274b22848f8923855f2fb3a6627129347e0ca0d /gdb/hppa-tdep.c | |
parent | d5263ab42614d8c28eab1aea09ccba5a86d80866 (diff) | |
download | gdb-c38e0b58f332b3a4435a47d98e6e4602d08ab2ce.zip gdb-c38e0b58f332b3a4435a47d98e6e4602d08ab2ce.tar.gz gdb-c38e0b58f332b3a4435a47d98e6e4602d08ab2ce.tar.bz2 |
* hppa-tdep.c (frame_saved_pc): Handle backtracing through signal
handler in dynamically linked executables.
mentor-7139
Diffstat (limited to 'gdb/hppa-tdep.c')
-rw-r--r-- | gdb/hppa-tdep.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/gdb/hppa-tdep.c b/gdb/hppa-tdep.c index b771170..d5595dc 100644 --- a/gdb/hppa-tdep.c +++ b/gdb/hppa-tdep.c @@ -866,7 +866,22 @@ restart: will return to. */ u = find_unwind_entry (pc); if (u && u->stub_type != 0) - goto restart; + { + unsigned int insn; + + /* If this is a dynamic executable, and we're in a signal handler, + then the call chain will eventually point us into the stub for + _sigreturn. Unlike most cases, we'll be pointed to the branch + to the real sigreturn rather than the code after the real branch!. + + Else, try to dig the address the stub will return to in the normal + fashion. */ + insn = read_memory_integer (pc, 4); + if ((insn & 0xfc00e000) == 0xe8000000) + return (pc + extract_17 (insn) + 8) & ~0x3; + else + goto restart; + } return pc; } |