[PATCH] os: use libunwind to generate backtraces

Marcin Slusarz marcin.slusarz at gmail.com
Sat Feb 23 13:17:20 PST 2013


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? :)

> if you look at the hw/xfree86/Makefile.am, libos.la is uses twice, once from
> XSERVER_LIBS, once at the end again. This isn't the case for the other
> DDX's, I suspect this may be the reason.

I don't see why order (or number) of .la files would matter...

Marcin


More information about the xorg-devel mailing list