[mythtv] howto? gdb trace

Stuart Auchterlonie stuarta at squashedfrog.net
Mon Feb 6 21:33:56 UTC 2006


On Mon, Feb 06, 2006 at 04:22:01PM -0500, Steven Adeff wrote:
> On 2/5/06, Stuart Auchterlonie <stuarta at squashedfrog.net> wrote:
> > On Sat, Feb 04, 2006 at 12:39:16PM -0500, Steven Adeff wrote:
> > >
> > > ok, great. Another question... Is there a way to control gdb through
> > > ssh? I have a dedicated myth machine that I want to run this on,
> > > theres no keyboard attached, and if its possible to do the gdb through
> > > ssh (while still have it display on the tv as normal), it would be
> > > prefered, if not, i can move my keyboard from my other computer, I'd
> > > just rather not if possible.
> > >
> >
> > The best way to do the debugging in this case is to startup
> > the frontend or backend as normal and attach gdb to the running
> > process. In this case gdb is invoked as
> >
> > gdb /usr/local/bin/mythfrontend <pid>
> >
> > then just 'cont' and the process will keep executing.
> >
> > you may need to be root.
> >
> >
> > I've found this works very well and even avoids the need to
> > ignore sig 33 etc etc....
> >
> >
> > Stuart
> 
> running:
> gdb /usr/local/bin/mythbackend -x ~/.gdbcommands-local
> 
> when I try to go into liveTV I get:
> 
> /root/.gdbcommands-local:6: Error in sourced command file:
> thread_db_get_info: cannot get thread info: generic error
> 
> .gdbcommands-local is the gdbcommands file as
> http://www.mythtv.org/docs/mythtv-HOWTO-22.html#ss22.2
> shows it.

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.

Then you can follow through with the other commands mentioned ie.
set logging on
set pagination off
thread apply all bt full
set logging off

> 
> and obviously, since running mythfrontend with gdb attached I haven't
> had it crash during tv playback, of course what prompted me to try was
> it crashing ~10mins before attaching gdb...
> 

Sometimes you have to try harder with it running under gdb :-/
It happens to me as well... Such is life...

Stuart



More information about the mythtv-dev mailing list