[mythtv] Automatic backtrace on crash (crashhandler)?

Colin Cross colin at colincross.com
Fri Feb 25 23:00:22 UTC 2005


I looked at how aMule does their backtrace, they call the backtrace() 
and backtrace_symbols() functions from /usr/include/execinfo.h
This is a little cleaner than trying to run gdb and pipe commands into 
it, and it doesn't add any extra dependencies, but it has some 
disadvantages: It can only get a backtrace for the current thread, it 
doesn't get any useful information unless everything is linked with gcc 
-rdynamic (which gets passed to ld as -export-dynamic), it gets screwed 
up by -fomit-frame-pointer, and it only works on Linux.


More information about the mythtv-dev mailing list