libexecinfo backtrace() in a signal handler

Konstantin Belousov kostikbel at gmail.com
Fri Jul 7 05:37:56 UTC 2017


On Fri, Jul 07, 2017 at 01:16:22AM +0200, Joerg Sonnenberger wrote:
> On Thu, Jul 06, 2017 at 03:58:04PM -0700, Conrad Meyer wrote:
> > Signal handlers use a special stack frame that libexecinfo is too
> > simple to understand.  To get a stack from a signal handler, you might
> > want to use libunwind instead.
> 
> Actually, that's not the problem. The problem is that nothing registers
> the necessary unwind data.

Actually, that's not the problem.  Libunwind port on FreeBSD knows how
to detect signal trampolines, either with the direct help from kernel,
or using some heuristic by parsing instructions, on (much) older kernels.


More information about the freebsd-hackers mailing list