From: Jeff Law Date: Wed, 7 Jun 1995 18:43:58 +0000 (+0000) Subject: * hppa-tdep.c (frame_saved_pc): Handle backtracing through signal X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c38e0b58f332b3a4435a47d98e6e4602d08ab2ce;p=binutils-gdb.git * hppa-tdep.c (frame_saved_pc): Handle backtracing through signal handler in dynamically linked executables. mentor-7139 --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 47db0537237..30ba31d3910 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +Wed Jun 7 12:41:42 1995 Jeff Law (law@snake.cs.utah.edu) + + * hppa-tdep.c (frame_saved_pc): Handle backtracing through signal + handler in dynamically linked executables. + Tue Jun 6 10:44:25 1995 Michael Meissner From Andrew Cagney diff --git a/gdb/hppa-tdep.c b/gdb/hppa-tdep.c index b7711700c34..d5595dcf7c8 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; }