[mythtv] howto? gdb trace
jwestfall at surrealistic.net
Mon Feb 6 22:58:50 UTC 2006
Stuart Auchterlonie <stuarta at squashedfrog.net> wrote [02.06.06]:
> That as documented is for starting up the program under gdb.
> My instructions are for the alternative way which is to ATTACH
> gdb to a RUNNING program. Once you attach gdb you have to
> tell the program to continue by issuing 'cont' and then wait
> for it to segfault.
I make use of core files when trying to debug crashes.
ulimit -c unlimited
while [ 1 ];do /usr/local/bin/mythfrontend -v all;sleep 1;done
when mythfrontend crashes it will create core.<pid>, which you can then
use with gdb -c core.<pid> /usr/local/bin/mythfrontend to examine the
backtrace. same deal with backend or commflag crashes.
The core files allow you to get multiple data points for a re-occurring
crash and then compare data within the backtraces.
If you use this method just need to make sure to delete the core files
whenever you update mythtv or libs since it will invalidate the data in
More information about the mythtv-dev