[PATCH] os: use libunwind to generate backtraces

Marcin Slusarz marcin.slusarz at gmail.com
Mon Feb 25 10:51:47 PST 2013


On Mon, Feb 25, 2013 at 04:17:28PM +1000, Peter Hutterer wrote:
> On Sat, Feb 23, 2013 at 10:17:20PM +0100, Marcin Slusarz wrote:
> > On Fri, Feb 22, 2013 at 09:02:39AM +1000, Peter Hutterer wrote:
> > > On Thu, Feb 21, 2013 at 08:00:07AM +0100, Marcin Ślusarz wrote:
> > > > 21 lut 2013 00:37, "Peter Hutterer" <peter.hutterer at who-t.net> napisał(a):
> > > > > thanks for the changes but after applying this patch locally I do wonder:
> > > > > how did you test this? i'm getting undefined references to the various
> > > > > libunwind calls (_Ux86_64_getcontext, _Ux86_64_strerror,etc) for Xvfb,
> > > > Xdmx, Xnext
> > > > > and all the tests). This needs some more polishing.
> > > > 
> > > > Try to do make clean before building.
> > > > For some reason libos.la is not updated automatically.
> > > 
> > > I did to a make distclean and it still won't work. did a fresh clone, and
> > > I'm still getting 
> > > 
> > >   CCLD     Xvfb
> > >   ../../os/os.O: In function `xorg_backtrace':
> > >   /home/whot/xorg/xserver/os/backtrace.c:56: undefined reference to
> > >   `_Ux86_64_getcontext'
> > >   /home/whot/xorg/xserver/os/backtrace.c:58: undefined reference to
> > >   `_Ux86_64_strerror'
> > >   /home/whot/xorg/xserver/os/backtrace.c:63: undefined reference to
> > >   `_ULx86_64_init_local'
> > >   /home/whot/xorg/xserver/os/backtrace.c:65: undefined reference to
> > >   `_Ux86_64_strerror'
> > >   /home/whot/xorg/xserver/os/backtrace.c:72: undefined reference to
> > >   `_ULx86_64_step'
> > >   /home/whot/xorg/xserver/os/backtrace.c:74: undefined reference to
> > >   `_ULx86_64_get_proc_info'
> > >   /home/whot/xorg/xserver/os/backtrace.c:76: undefined reference to
> > >   `_Ux86_64_strerror'
> > >   /home/whot/xorg/xserver/os/backtrace.c:81: undefined reference to
> > >   `_ULx86_64_get_proc_name'
> > >   /home/whot/xorg/xserver/os/backtrace.c:84: undefined reference to
> > >   `_Ux86_64_strerror'
> > >   /home/whot/xorg/xserver/os/backtrace.c:100: undefined reference to
> > >   `_ULx86_64_step'
> > >   /home/whot/xorg/xserver/os/backtrace.c:102: undefined reference to
> > >   `_Ux86_64_strerror'
> > 
> > It builds fine on Gentoo (~amd64) and Fedora 18, although Fedora 18 ships too
> > old version of libunwind (no pkgconfig support), so I had to build it manually.
> > 
> > What do I need to do to reproduce it? :)
> 
> good question. I tried a scratch-build to make sure and that one failed as
> well. So something isn't quite right, but I don't yet know what.
> 
> http://koji.fedoraproject.org/koji/taskinfo?taskID=5051896

Thank you! I think below patch will make it build.

---
diff --git a/configure.ac b/configure.ac
index 4a292da..597fd36 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1344,7 +1344,7 @@ AC_DEFINE(BIGREQS, 1, [Support BigRequests extension])
 
 if test "x$SPECIAL_DTRACE_OBJECTS" = "xyes" ; then
   DIX_LIB='$(top_builddir)/dix/dix.O'
-  OS_LIB='$(top_builddir)/os/os.O $(SHA1_LIBS) $(DLOPEN_LIBS)'
+  OS_LIB='$(top_builddir)/os/os.O $(SHA1_LIBS) $(DLOPEN_LIBS) $(LIBUNWIND_LIBS)'
 else
   DIX_LIB='$(top_builddir)/dix/libdix.la'
   OS_LIB='$(top_builddir)/os/libos.la'


More information about the xorg-devel mailing list