This is the mail archive of the
insight@sources.redhat.com
mailing list for the Insight project.
Re: Insight freezes when trying to debug Mozilla
bstell@ix.netcom.com wrote:
>
> Fernando Nasser wrote:
> > ...
> >
> > This mechanism for starting-up gdb from Mozilla was created by someone in there.
> > We don't know anything about it. And whoever has created such connection must
> > have some experience in debugging Mozilla with gdb.
>
> There is a shell scrip that starts gdb debugging mozilla.
> I use this script to run gdb (non-insight) on mozilla all the time and
> it work fine.
>
Cool!
> > .... Unfortunately the STOP button
> > is dead because the Linux thread code fails to keep the GUI alive (a bug in that code,
> > at least for Insight purposes -- I will tell people on the gdb list about this).
>
> This is the part I care about. Thanks.
>
You're welcome.
> > If you know of some other point in the Mozzila code that will be certainly executed,
> > try inserting a breakpoint there before saying continue. See if the GUI regains control
> > when that breakpoint is reached.
>
> I have tested this and it does work.
>
OK, so the "not keeping the GUI alive" is the problem.
> > > > Use the second gdb "up" command and see
> > > > what is being done at lin-lwp.c:766 I would guess it is a waitpid() call.
> > > > You could see what the pid is, maybe trying sending it a SIGINT...
> > >
> > > Line 766 of lin-lwp.c is calling sigsuspend().
>
> I replaced the sigsuspend() call with a "sleep(1)" but this also never
> returns.
>
That won't do it. I will ask the Linux threads maintainer to add a call to the GUI
event loop.
Thanks for letting us know that this was broken.
--
Fernando Nasser
Red Hat Canada Ltd. E-Mail: fnasser@cygnus.com
2323 Yonge Street, Suite #300 Tel: 416-482-2661 ext. 311
Toronto, Ontario M4P 2C9 Fax: 416-482-6299