<div dir="ltr"><div>Whoops, I misspoke when I talked about libbacktrace. I meant libunwind all throughout, since that's what Xorg uses right now.<br><br></div>Should we work on making the elfutils backtrace API more like libunwind / libbacktrace, and simpler to embed? Right now we have support code in glib that forks off gdb and feeds it commands over a stream, which is horribly slow and often deadlocks your app; I was planning to replace it with libunwind.<br>
<br>Should we focus on porting libbacktrace / libunwind to elfutils, and have one simple API for this?<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Oct 30, 2013 at 2:26 AM, Jan Kratochvil <span dir="ltr"><<a href="mailto:jan.kratochvil@redhat.com" target="_blank">jan.kratochvil@redhat.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On Wed, 30 Oct 2013 03:13:28 +0100, Jasper St. Pierre wrote:<br>
> This API is really bad compared to what's provided by<br>
> libbacktrace, which is super simple.<br>
<br>
</div>libbacktrace is not a real unwinder, it runs on top of libgcc backtrace() you<br>
currently use.  Which is fine for xorg.<br>
<br>
libbacktrace even supports displaying inlined functions, file:lineno and<br>
automatic C++ symbols demangling.<br>
<br>
libbacktrace seems a better choice than both elfutils and libunwind for xorg<br>
addr->symbol resolution (+its new inlined frames).  Just I find a blocker for<br>
xorg that libbacktrace is currently not packaged in any distro AFAIK; that<br>
could be sure fixed.<br>
<div class="im"><br>
<br>
> This also seem to require callbacks that have "Linux" in the name.<br>
<br>
</div>True, libunwind contains src/os-freebsd.c and src/os-hpux.c where I expect<br>
elfutils will fail to find /proc/PID/maps expecting Linux OS.<br>
I could implement the few lines of HPUX/FreeBSD image finding code into<br>
elfutils if that would be the only blocker of this patch.<br>
<div class="im"><br>
<br>
> Why are we trying to get rid of libbacktrace,<br>
<br>
</div>It contained (and according to my tests it still contains) many unwinding bugs<br>
plus most of its code is a duplication of elfutils (which need to be maintained<br>
anyway).  That is Fedora (rather so far mine) point of view, sure not xorg's.<br>
<br>
<br>
Regards,<br>
Jan<br>
</blockquote></div><br><br clear="all"><br>-- <br>  Jasper<br>
</div>