tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Request for implementation of KERN_PROC_SIGTRAMP sysctl
On Wed, Oct 27, 2021 at 07:50:55 -0700, Jason Thorpe wrote:
> > On Oct 18, 2021, at 9:41 AM, John Marino (NetBSD) <netbsd%marino.st@localhost> wrote:
> >
> > 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.
>
> Ok, I have implemented a new function with this signature:
>
> /*
> * __sigtramp_check_np --
> *
> * Non-portable function that checks if the specified program
> * counter value is within the signal return trampoline. Returns
> * the trampoline version numnber corresponding to what style of
> * trampoline it matches, or -1 if the program value is not within
> * the signal return trampoline.
> */
> int __sigtramp_check_np(void *pc);
>
> Usage would be like:
[... lots of code ...]
I was wondering if it might be easier to not put the onus onto the
caller and instead have a function that returns the interrupted
ucontext (or NULL, if the pc is not in a trampoline).
ucontext_t *__unwind_sigtramp(return_pc, return_sp)
-uwe
Home |
Main Index |
Thread Index |
Old Index