This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [patch/rfa] Signal trampoline unwinder for hppa-hpux
- From: Randolph Chung <randolph at tausq dot org>
- To: Joel Brobecker <brobecker at gnat dot com>
- Cc: gdb-patches at sources dot redhat dot com
- Date: Thu, 20 May 2004 13:53:09 -0700
- Subject: Re: [patch/rfa] Signal trampoline unwinder for hppa-hpux
- References: <20040520041746.GW566@tausq.org> <20040520204625.GB10684@gnat.com>
- Reply-to: Randolph Chung <randolph at tausq dot org>
> How can you tell whether a kernel is 32bits or not?
in the code? In the save_state_t structure returned by the kernel,
there's a flag, which is checked here:
+ if (!(flag & 0x40))
+ {
+ /* Narrow registers. */
+ off = scptr + offsetof (save_state_t, ss_narrow);
+ incr = 4;
+ szoff = 0;
+ }
+ else
+ {
+ /* Wide registers. */
+ off = scptr + offsetof (save_state_t, ss_wide) + 8;
+ incr = 8;
+ szoff = (tdep->bytes_per_address == 4 ? 4 : 0);
+ }
There are 3 cases, if you have a 32-bit kernel, then it should always
hit the first if case. If you have a 64-bit kernel and 32-bit userspace,
you should hit the second case with szoff == 4. For 64-bit kernel and
64-bit userspace you will hit the else case with szoff == 0.
I've only tested the 2nd scenario on hpux11.00 and hpux11.11. Too many
targets and combinations :-(
> I tried your patch on our machines, it we get noticeably better results,
> especially in sigstep.exp, which no longer times out to death....
yeah, it used to get into an infinite loop.. not very nice :)
randolph
--
Randolph Chung
Debian GNU/Linux Developer, hppa/ia64 ports
http://www.tausq.org/