[PATCH] Use external tool for creating backtraces on crashes if available.

Matthias Hopf mhopf at suse.de
Mon Oct 11 02:50:38 PDT 2010


On Oct 08, 10 13:43:38 -0700, Alan Coopersmith wrote:
> Matthias Hopf wrote:
> > This calls /usr/bin/xorg-backtrace to create reasonable commented backtraces
> > with gdb. On errors it falls back to the generic method.
> 
> There's already similar code in the backtrace.c file in the
> # ifdef HAVE_PSTACK case, where we fork the external pstack
> process on Solaris to get stack traces that have more information
> than the libc builtins allow, like getting full symbol tables from
> libelf.
> 
> Could we make the fork/exec wrapper common between the two?   I'd
> even be okay with making the entire code in backtrace.c common and
> just letting the script handle calling gdb or pstack.   (Solaris
> systems are more likely to have pstack installed than gdb.)

I'll take a look at it.
What do you think - would it make sense to call gdb on solaris if it is
installed, or always pstack?

Thanks

Matthias

-- 
Matthias Hopf <mhopf at suse.de>      __        __   __
Maxfeldstr. 5 / 90409 Nuernberg   (_   | |  (_   |__          mat at mshopf.de
Phone +49-911-74053-715           __)  |_|  __)  |__  R & D   www.mshopf.de


More information about the xorg-devel mailing list