From mboxrd@z Thu Jan 1 00:00:00 1970 From: Fernando Nasser To: bstell@ix.netcom.com Cc: insight Subject: Re: Insight freezes when trying to debug Mozilla Date: Tue, 03 Oct 2000 23:49:00 -0000 Message-id: <39DAD2F3.2B7D4921@cygnus.com> References: <39D76A5E.773C5142@ix.netcom.com> <39DA433A.20ACB604@cygnus.com> <39DABF4D.27018510@ix.netcom.com> X-SW-Source: 2000-q4/msg00006.html 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