[mythtv] howto? gdb trace
adeffs.mythtv at gmail.com
Thu Feb 9 16:56:01 UTC 2006
On 2/6/06, Steven Adeff <adeffs.mythtv at gmail.com> wrote:
> 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....
Well doing the gdb attach thing doesn't seem to work, the backtraces
created with it were of no use to ijr or danielk.
I'll try the core file method now and see if that works any better.
More information about the mythtv-dev