[PATCH 4/5] Support backtracing through elfutils (#70746)
jan.kratochvil at redhat.com
Wed Oct 30 07:26:59 CET 2013
On Wed, 30 Oct 2013 03:13:28 +0100, Jasper St. Pierre wrote:
> This API is really bad compared to what's provided by
> libbacktrace, which is super simple.
libbacktrace is not a real unwinder, it runs on top of libgcc backtrace() you
currently use. Which is fine for xorg.
libbacktrace even supports displaying inlined functions, file:lineno and
automatic C++ symbols demangling.
libbacktrace seems a better choice than both elfutils and libunwind for xorg
addr->symbol resolution (+its new inlined frames). Just I find a blocker for
xorg that libbacktrace is currently not packaged in any distro AFAIK; that
could be sure fixed.
> This also seem to require callbacks that have "Linux" in the name.
True, libunwind contains src/os-freebsd.c and src/os-hpux.c where I expect
elfutils will fail to find /proc/PID/maps expecting Linux OS.
I could implement the few lines of HPUX/FreeBSD image finding code into
elfutils if that would be the only blocker of this patch.
> Why are we trying to get rid of libbacktrace,
It contained (and according to my tests it still contains) many unwinding bugs
plus most of its code is a duplication of elfutils (which need to be maintained
anyway). That is Fedora (rather so far mine) point of view, sure not xorg's.
More information about the xorg-devel