From: Alexander Monakov <amonakov@ispras.ru>
To: musl@lists.openwall.com
Subject: Re: Execinfo.h, backtrace is needed.
Date: Thu, 9 Apr 2015 20:57:57 +0300 (MSK) [thread overview]
Message-ID: <alpine.LNX.2.11.1504092038030.338@monopod.intra.ispras.ru> (raw)
In-Reply-To: <20150409173418.GL6817@brightrain.aerifal.cx>
On Thu, 9 Apr 2015, Rich Felker wrote:
> I believe there's a third-party libbacktrace that might work with
> little or no modification.
One specific example would be libbacktrace from GCC, which is available under
a BSD-style license: https://gcc.gnu.org/git/?p=gcc.git;a=tree;f=libbacktrace
Building GCC's libbacktrace separately from the rest of the compiler is not
straighforward; some time ago I worked on that when importing libbacktrace
for use in apitrace project; you can view the result here:
https://github.com/apitrace/apitrace/tree/master/thirdparty/libbacktrace
(it uses cmake simply because apitrace itself is using cmake).
Please note: libbacktrace may be overkill if you don't need DWARF parsing at
runtime. For example, if you can perform symbol resolution separately as
post-processing, and capturing only stack frame addresses at runtime suffices,
libunwind may be the tool for the job. Also, libunwind provides backtrace()
as a weak alias to its own unw_backtrace(), so in simple cases it's a drop-in
replacement.
Hope that helps.
Alexander
next prev parent reply other threads:[~2015-04-09 17:57 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-08 15:33 musl perf, 20% slower than native build? John Mudd
2015-04-08 15:58 ` Alexander Monakov
2015-04-08 16:05 ` Szabolcs Nagy
2015-04-08 19:10 ` John Mudd
2015-04-08 19:28 ` Daniel Cegiełka
2015-04-08 20:59 ` Paul Schutte
2015-04-09 6:50 ` Daniel Cegiełka
2015-04-09 17:28 ` Execinfo.h, backtrace is needed Jean-Marc Pigeon
2015-04-09 17:34 ` Rich Felker
2015-04-09 17:57 ` Alexander Monakov [this message]
2015-04-10 14:30 ` Jean-Marc Pigeon
2015-04-08 19:33 ` musl perf, 20% slower than native build? Alexander Monakov
2015-04-08 20:16 ` John Mudd
2015-04-08 20:24 ` John Mudd
2015-04-08 21:48 ` John Mudd
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.LNX.2.11.1504092038030.338@monopod.intra.ispras.ru \
--to=amonakov@ispras.ru \
--cc=musl@lists.openwall.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/musl/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).