From a717134b331a2e8ccd5e43f15683a202c4d7ea64 Mon Sep 17 00:00:00 2001 From: Mark Kettenis Date: Tue, 13 Dec 2005 10:24:35 +0000 Subject: * hppa-hpux-tdep.c (hppa_hpux_sigtramp_unwind_sniffer): Detect export stub for signal trampoline as a signal trampoline too. --- gdb/ChangeLog | 3 +++ gdb/hppa-hpux-tdep.c | 16 ++++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 230b841..0af48eb 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,8 @@ 2005-12-13 Mark Kettenis + * hppa-hpux-tdep.c (hppa_hpux_sigtramp_unwind_sniffer): Detect + export stub for signal trampoline as a signal trampoline too. + * hppa-hpux-tdep.c (hppa_hpux_sigtramp_frame_unwind_cache): Don't set pcoqh to rp. diff --git a/gdb/hppa-hpux-tdep.c b/gdb/hppa-hpux-tdep.c index c1d35b5..17b4e2f 100644 --- a/gdb/hppa-hpux-tdep.c +++ b/gdb/hppa-hpux-tdep.c @@ -1276,6 +1276,22 @@ hppa_hpux_sigtramp_unwind_sniffer (struct frame_info *next_frame) u = find_unwind_entry (pc); + /* If this is an export stub, try to get the unwind descriptor for + the actual function itself. */ + if (u && u->stub_unwind.stub_type == EXPORT) + { + gdb_byte buf[HPPA_INSN_SIZE]; + unsigned long insn; + + if (!safe_frame_unwind_memory (next_frame, u->region_start, + buf, sizeof buf)) + return NULL; + + insn = extract_unsigned_integer (buf, sizeof buf); + if ((insn & 0xffe0e000) == 0xe8400000) + u = find_unwind_entry(u->region_start + hppa_extract_17 (insn) + 8); + } + if (u && u->HP_UX_interrupt_marker) return &hppa_hpux_sigtramp_frame_unwind; -- cgit v1.1