diff options
author | Randolph Chung <tausq@debian.org> | 2004-05-17 16:46:06 +0000 |
---|---|---|
committer | Randolph Chung <tausq@debian.org> | 2004-05-17 16:46:06 +0000 |
commit | e416d13d38368d769717d749cff936596eaf5dd4 (patch) | |
tree | eeaba2be5e72f0320e591631611a4da77d5e6a3f /gdb | |
parent | f4c6a542ef99489241aecad7d84d25eb90fd44bc (diff) | |
download | gdb-e416d13d38368d769717d749cff936596eaf5dd4.tar.gz |
2004-05-17 Randolph Chung <tausq@debian.org>
* hppa-tdep.c (hppa_stub_frame_unwind_cache): For HPUX stub unwinding,
check to see if we are unwinding an export stub. Export stubs clobber
the %rp in the call path and stores the original rp in a stack slot.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/hppa-tdep.c | 21 |
2 files changed, 26 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index cf1dd11fc42..de9b2fa1c05 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2004-05-17 Randolph Chung <tausq@debian.org> + + * hppa-tdep.c (hppa_stub_frame_unwind_cache): For HPUX stub unwinding, + check to see if we are unwinding an export stub. Export stubs clobber + the %rp in the call path and stores the original rp in a stack slot. + 2004-05-17 Jim Blandy <jimb@redhat.com> * MAINTAINERS: Update address for J.T. Conklin. diff --git a/gdb/hppa-tdep.c b/gdb/hppa-tdep.c index 8ed50f9311c..a872e4f89a4 100644 --- a/gdb/hppa-tdep.c +++ b/gdb/hppa-tdep.c @@ -1987,6 +1987,7 @@ hppa_stub_frame_unwind_cache (struct frame_info *next_frame, { struct gdbarch *gdbarch = get_frame_arch (next_frame); struct hppa_stub_unwind_cache *info; + struct unwind_table_entry *u; if (*this_cache) return *this_cache; @@ -1995,9 +1996,27 @@ hppa_stub_frame_unwind_cache (struct frame_info *next_frame, *this_cache = info; info->saved_regs = trad_frame_alloc_saved_regs (next_frame); - info->saved_regs[HPPA_PCOQ_HEAD_REGNUM].realreg = HPPA_RP_REGNUM; info->base = frame_unwind_register_unsigned (next_frame, HPPA_SP_REGNUM); + if (gdbarch_osabi (gdbarch) == GDB_OSABI_HPUX_ELF + || gdbarch_osabi (gdbarch) == GDB_OSABI_HPUX_SOM) + { + /* HPUX uses export stubs in function calls; the export stub clobbers + the return value of the caller, and, later restores it from the + stack. */ + u = find_unwind_entry (frame_pc_unwind (next_frame)); + + if (u && u->stub_unwind.stub_type == EXPORT) + { + info->saved_regs[HPPA_PCOQ_HEAD_REGNUM].addr = info->base - 24; + + return info; + } + } + + /* By default we assume that stubs do not change the rp. */ + info->saved_regs[HPPA_PCOQ_HEAD_REGNUM].realreg = HPPA_RP_REGNUM; + return info; } |