This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch/rfa] Handle unwinding through export stubs on hpux


diff -u -p -u -r1.156 hppa-tdep.c
--- hppa-tdep.c 8 May 2004 03:59:34 -0000 1.156
+++ hppa-tdep.c 15 May 2004 20:54:57 -0000
@@ -2023,6 +2023,7 @@ hppa_stub_frame_unwind_cache (struct fra
{
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;
@@ -2031,8 +2032,19 @@ hppa_stub_frame_unwind_cache (struct fra
*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)
+ && (u = find_unwind_entry (frame_pc_unwind (next_frame)))

(Mark's already mentioned assignments inside conditionals). Ok after that is fixed.


Andrew

+ && (u->stub_unwind.stub_type == EXPORT))

+ {
+ info->base = frame_unwind_register_unsigned (next_frame, HPPA_SP_REGNUM);
+ info->saved_regs[HPPA_PCOQ_HEAD_REGNUM].addr = info->base - 24;
+ }
+ else
+ {
+ info->base = frame_unwind_register_unsigned (next_frame, HPPA_SP_REGNUM);
+ info->saved_regs[HPPA_PCOQ_HEAD_REGNUM].realreg = HPPA_RP_REGNUM;
+ }
return info;
}




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]