[rfa:NetBSD/ppc] Implement signal trampoline unwinder
Jason Thorpe
thorpej@wasabisystems.com
Tue Mar 2 23:29:00 GMT 2004
On Mar 1, 2004, at 1:33 AM, Mark Kettenis wrote:
> The problem is that the location of the signal trampoline depends on
> the VM layout, which can be changed. And on OpenBSD (which is very
> similar to NetBSD in many respects) the signal trampoline is mapped at
> a random location. So checking for the address isn't the most robust
> way. That's why NetBSD/i386 doesn't do this anymore, but instead
> looks for a specific instruction sequence (the instruction sequence
> for the sigreturn(2) system call).
Yes, other NetBSD targets do this as well, Alpha and MIPS, for example.
> NetBSD is moving away from using kernel-provided signal trampolines.
> NetBSD 2.0 will use signal trampolines provided by libc. These
> tramplones can be recognized by their name: they start with
> __sigtramp. See nbsd-tdep.c:nbsd_pc_in_sigtramp() and its usage in
> amd64nbsd-tdep.c.
Right. They've been provided by libc for quite some time in -current,
and 2.0 will ship with them when it ships.
In general, I think doing things in the debugger based on a priori
knowledge of a magic address is kinda gross.
-- Jason R. Thorpe <thorpej@wasabisystems.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 186 bytes
Desc: This is a digitally signed message part
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20040302/f43ff4bf/attachment.sig>
More information about the Gdb-patches
mailing list