From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mark Kettenis To: bstell@netscape.com Cc: gdb@sources.redhat.com Subject: Re: [Fwd: Insight freezes when trying to debug Mozilla] Date: Thu, 05 Oct 2000 02:03:00 -0000 Message-id: <200010050903.e9593GF19920@debye.wins.uva.nl> References: <39DBF055.8A03489D@netscape.com> X-SW-Source: 2000-10/msg00018.html Date: Wed, 04 Oct 2000 20:07:01 -0700 From: bstell@netscape.com (Brian Stell) 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. It seems that gdb is sleeping in sigsuspend. It appears that gdbtk-hooks.c:693 the code turns on a timer waits for the timer or a child thread to signal turn off the time >From looking at the code it seems that this timer isn't actually set. I changed the name of the new threads target, which means that it isn't recognized by gdbtk.c:target_is_native() anymore, and Insight thinks that it doesn't need the timer. Try adding "multi-thread" to the list of native targets in gdbtk.c:target_is_native(). I'm pretty sure that'll work. Mark >From fnasser@cygnus.com Thu Oct 05 08:35:00 2000 From: Fernando Nasser To: Mark Kettenis Cc: bstell@netscape.com, gdb@sources.redhat.com Subject: Re: [Fwd: Insight freezes when trying to debug Mozilla] Date: Thu, 05 Oct 2000 08:35:00 -0000 Message-id: <39DC9F97.99A23FCB@cygnus.com> References: <39DBF055.8A03489D@netscape.com> <200010050903.e9593GF19920@debye.wins.uva.nl> X-SW-Source: 2000-10/msg00019.html Content-length: 2274 Brian, This is what Mark is talking about. Can you please try this patch and let us know if it worked? Thanks Fernando Index: gdbtk/generic/gdbtk.c =================================================================== RCS file: /cvs/src/src/gdb/gdbtk/generic/gdbtk.c,v retrieving revision 1.6 diff -c -p -r1.6 gdbtk.c *** gdbtk.c 2000/07/02 20:07:07 1.6 --- gdbtk.c 2000/10/05 15:32:31 *************** target_is_native (t) *** 329,335 **** if (STREQ (name, "exec") || STREQ (name, "hpux-threads") || STREQ (name, "child") || STREQ (name, "procfs") ! || STREQ (name, "solaris-threads") || STREQ (name, "linuxthreads")) return 1; return 0; --- 329,336 ---- if (STREQ (name, "exec") || STREQ (name, "hpux-threads") || STREQ (name, "child") || STREQ (name, "procfs") ! || STREQ (name, "solaris-threads") || STREQ (name, "linuxthreads") ! || STREQ (name, "multi-thread")) return 1; return 0; Mark Kettenis wrote: > > Date: Wed, 04 Oct 2000 20:07:01 -0700 > From: bstell@netscape.com (Brian Stell) > > 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. > > It seems that gdb is sleeping in sigsuspend. > > It appears that gdbtk-hooks.c:693 the code > turns on a timer > waits for the timer or a child thread to signal > turn off the time > > >From looking at the code it seems that this timer isn't actually set. I > changed the name of the new threads target, which means that it isn't > recognized by gdbtk.c:target_is_native() anymore, and Insight thinks > that it doesn't need the timer. Try adding "multi-thread" to the list > of native targets in gdbtk.c:target_is_native(). I'm pretty sure > that'll work. > > Mark -- 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 >From bstell@netscape.com Thu Oct 05 14:53:00 2000 From: bstell@netscape.com (Brian Stell) To: Fernando Nasser Cc: Mark Kettenis , gdb@sources.redhat.com Subject: Re: [Fwd: Insight freezes when trying to debug Mozilla] Date: Thu, 05 Oct 2000 14:53:00 -0000 Message-id: <39DCF930.F4135CEB@netscape.com> References: <39DBF055.8A03489D@netscape.com> <200010050903.e9593GF19920@debye.wins.uva.nl> <39DC9F97.99A23FCB@cygnus.com> X-SW-Source: 2000-10/msg00020.html Content-length: 2434 Perfect! Thank you very much! Fernando Nasser wrote: > Brian, > > This is what Mark is talking about. Can you please try this > patch and let us know if it worked? > > Thanks > > Fernando > > Index: gdbtk/generic/gdbtk.c > =================================================================== > RCS file: /cvs/src/src/gdb/gdbtk/generic/gdbtk.c,v > retrieving revision 1.6 > diff -c -p -r1.6 gdbtk.c > *** gdbtk.c 2000/07/02 20:07:07 1.6 > --- gdbtk.c 2000/10/05 15:32:31 > *************** target_is_native (t) > *** 329,335 **** > > if (STREQ (name, "exec") || STREQ (name, "hpux-threads") > || STREQ (name, "child") || STREQ (name, "procfs") > ! || STREQ (name, "solaris-threads") || STREQ (name, "linuxthreads")) > return 1; > > return 0; > --- 329,336 ---- > > if (STREQ (name, "exec") || STREQ (name, "hpux-threads") > || STREQ (name, "child") || STREQ (name, "procfs") > ! || STREQ (name, "solaris-threads") || STREQ (name, "linuxthreads") > ! || STREQ (name, "multi-thread")) > return 1; > > return 0; > > Mark Kettenis wrote: > > > > Date: Wed, 04 Oct 2000 20:07:01 -0700 > > From: bstell@netscape.com (Brian Stell) > > > > 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. > > > > It seems that gdb is sleeping in sigsuspend. > > > > It appears that gdbtk-hooks.c:693 the code > > turns on a timer > > waits for the timer or a child thread to signal > > turn off the time > > > > >From looking at the code it seems that this timer isn't actually set. I > > changed the name of the new threads target, which means that it isn't > > recognized by gdbtk.c:target_is_native() anymore, and Insight thinks > > that it doesn't need the timer. Try adding "multi-thread" to the list > > of native targets in gdbtk.c:target_is_native(). I'm pretty sure > > that'll work. > > > > Mark > > -- > 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