On Mon, Oct 18, 2021 at 10:41:48 -0500, John Marino (NetBSD) wrote:

> How we did it with libc before is shown in the netbsd-unwind.h link in
> the original post.  This technique looks for __sigtramp_siginfo_2
> assembly code but no longer works.  I don't know how to do this any
> other way.  GDB doesn't either, it uses the debug information to match
> the function name __sigtramp_siginfo_2 and I am not even sure that's
> valid for current NetBSD releases based on what we've learned here.

Didn't kamil@ fixed this a while back?  E.g. for amd64:

revision 1.8
date: 2020-10-12 20:55:54 +0300;  author: kamil;  state: Exp;  lines: +29 -3;  
commitid: sz57gQtWi3mGKDrC;
Decorate the x86_64 signal trampoline with CFI attributes easing unwinding

Combine the approach provided by Nikhil Benesch and Andrew Cagney.

Now, the unwinders (in gccgo, backtrace(3), etc) can unwind properly
the stack from a signal handler.

Fixes lib/55719 by Nikhil Benesch

-uwe

Reply via email to