yes, it sounds like a __in_signal_trampoline function would work for the GCC unwind, and I would think it would work for GDB as well. Thanks, John
On Mon, Oct 18, 2021 at 10:48 AM Jason Thorpe <thor...@me.com> wrote: > > > > > On Oct 18, 2021, at 8:41 AM, John Marino (NetBSD) <net...@marino.st> wrote: > > > > For GCC, we've got the return address (context->ra in the unwind > > programs in the original post). The "problem" is that we want to > > know if that address falls on a signal trampoline frame. If NO, > > return "end of stack", otherwise unwind the frame. > > Seems like a non-portable libc function that could check among the various > candidates that libc knows about would not be terribly difficult. > > > A sysctl that returns an array of address pairs for all signal > > trampolines in the process is what I'm requesting. > > Would a function like (hypothetically-named) "bool > __in_signal_trampoline(uintptr_t addr);" provided by libc be workable for > your use case? > > > If there's another way to determine if an address falls within a > > signal trampoline, I'd like to see actual code to see if I can adapt > > it. > > Of course, the kernel team could just deny the request, but I won't be > > able to fix the regression caused when the per-signal trampolines were > > introduced. > > Thanks, > > John > > -- thorpej >