Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 7 Jul 2017 13:44:35 +0200
From:      Joerg Sonnenberger <joerg@bec.de>
To:        Konstantin Belousov <kostikbel@gmail.com>
Cc:        Conrad Meyer <cem@freebsd.org>, Marc Branchaud <marcnarc@xiplink.com>, "freebsd-hackers@freebsd.org" <freebsd-hackers@freebsd.org>
Subject:   Re: libexecinfo backtrace() in a signal handler
Message-ID:  <20170707114435.GA5034@britannica.bec.de>
In-Reply-To: <20170707053744.GM1935@kib.kiev.ua>
References:  <4d662753-98bc-1275-9394-0cda95eedc65@xiplink.com> <CAG6CVpXMMWYniDUOGXakO=qiU%2BBBWCcTEknBjS%2BuQcAsPYB1VQ@mail.gmail.com> <20170706231622.GA26699@britannica.bec.de> <20170707053744.GM1935@kib.kiev.ua>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Jul 07, 2017 at 08:37:45AM +0300, Konstantin Belousov wrote:
> 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.

But the original question was about libexecinfo and the Itanium unwinder
it is using. That would be able to unwind past signal frames iff the
proper annotation was registered. I haven't had time to do that for
NetBSD, but it is certainly the original problem.

Joerg



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20170707114435.GA5034>