This is the mail archive of the insight@sources.redhat.com mailing list for the Insight project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Insight freezes when trying to debug Mozilla


bstell@ix.netcom.com wrote:
> 
> Thank you for the reply.
> 
> Fernando Nasser wrote:
> >
> > bstell@ix.netcom.com wrote:
> > >
> > > I'm trying to debug Mozilla using Insight.
> > >
> > > When I run mozilla with the debug option the insight debugger comes
> > > up and lets me start mozilla. I click the run button and it starts
> > > and then does a break at main. When I press continue mozilla comes
> > > up but insight never responds again (not screen refresh or button
> > > response.
> > >
> >
> > I don't know much about your setup (you may be better off posting to the
> > Mozzila list itself),
> 
> I am confused: Why would I post to the Mozilla list about insight
> hanging?
> 

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.

> > but it seems that gdb is waiting for the a Mozzila
> > thread to stop and it never does.
> 
> This seems to imply that the debugger depends on the application helping
> the debugger.
> 

That is not what I said.  But if the application never stops no debugger will ever
regain control unless you do something to halt it.  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).

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.

> > 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().
> 

This is different from what I have.  But 9/30 seems newer than mine (and probably
more correct).  There is probably nothing else wrong with that code besides the
fact that it is not keeping the GUI alive while the program being debugged is
running.  I did not notice the first time around that you just pressed CONTINUE
without any breakpoint inserted (so there is no reason for the inferior to stop
and for the debugger to regain control).



-- 
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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]