[PATCH] os: use libunwind to generate backtraces

Knut Petersen Knut_Petersen at t-online.de
Mon Feb 25 11:25:43 PST 2013


Thanks a lot for the patch.

On an openSuSE 12.2 system libunwind is to old to be recognized by your test (pre-pkg-config version),
but fresh code from the git repository solved the problem. Your new patch was not needed for a full build
of the xorg tree. After starting PREFIX/lib/xts5/XI/ChangeDeviceControl I could read

[ 45194.049] (EE) Backtrace:
[ 45194.051] (EE) 0: /home/knut/fast/xorg/X11-a/usr/bin/Xorg (OsSigHandler+0x38) [0x82356bd]
[ 45194.052] (EE) 1: ? (?+0x38) [0xb773d443]
[ 45194.053] (EE) 2: /home/knut/fast/xorg/X11-a/usr/bin/Xorg (ChangeDeviceControl+0x12) [0x80e3524]
[ 45194.054] (EE) 3: /home/knut/fast/xorg/X11-a/usr/bin/Xorg (ProcXChangeDeviceControl+0x1ca) [0x81b737d]
[ 45194.055] (EE) 4: /home/knut/fast/xorg/X11-a/usr/bin/Xorg (ProcIDispatch+0x5a) [0x81a2eda]
[ 45194.057] (EE) 5: /home/knut/fast/xorg/X11-a/usr/bin/Xorg (Dispatch+0x27e) [0x80785de]
[ 45194.088] (EE) 6: /home/knut/fast/xorg/X11-a/usr/bin/Xorg (main+0x587) [0x806a738]
[ 45194.091] (EE) 7: /lib/libc.so.6 (__libc_start_main+0xf5) [0xb73ae3d5]
[ 45194.094] (EE) 8: /home/knut/fast/xorg/X11-a/usr/bin/Xorg (_start+0x21) [0x806a0d2]
[ 45194.095] (EE)
[ 45194.096] (EE) Segmentation fault at address 0x18

Much better than the old backtrace.

Tested-by: Knut Petersen <knut.petersen at t-online.de>

Hint: The next step would be to update the documentation, see http://wiki.x.org/wiki/ModularDevelopersGuide#Development_Tools.2BAC8-Libraries

> 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'
> _______________________________________________
> xorg-devel at lists.x.org: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: http://lists.x.org/mailman/listinfo/xorg-devel



More information about the xorg-devel mailing list