[mythtv] howto? gdb trace

Steven Adeff adeffs.mythtv at gmail.com
Mon Feb 6 23:04:25 UTC 2006


On 2/6/06, Jim Westfall <jwestfall at surrealistic.net> wrote:
> 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
> export DISPLAY=:0
> 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
> them.
>
> jim

great, if I can't get it to crash with GDB running I'll switch to this
method and see if I can get it to work. I'll give it another day
running like this since I had to reboot the machine and perhaps it
requires a longer uptime to manifest....

--
Steve


More information about the mythtv-dev mailing list