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.
_______________________________________________
mythtv-dev mailing list
[email protected]
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev

Reply via email to