Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* [Fwd: Insight freezes when trying to debug Mozilla]
@ 2000-10-04 20:03 Brian Stell
  2000-10-05  2:03 ` Mark Kettenis
  0 siblings, 1 reply; 2+ messages in thread
From: Brian Stell @ 2000-10-04 20:03 UTC (permalink / raw)
  To: gdb

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

I believe that the code at lin-lwp.c:766 the code tries to allow the
timer signal
wake gdb up but this does not appear to happen to gdb sleeps and the
GUI is frozen.

I am running version 20000930 (/usr/local/bin/gdb).

I attached a second gdb to insight's gdb.
Here is the output for the xterm where I was running gdb on gdb:
(/usr/bin/gdb is a non-insight gdb I'm using to debug gdb)
=====================================================================

    [root@localhost gdb]# /usr/bin/gdb /usr/local/bin/gdb
    GNU gdb 19991004
    Copyright 1998 Free Software Foundation, Inc.
    GDB is free software, covered by the GNU General Public License, and
you are
    welcome to change it and/or distribute copies of it under certain
conditions.
    Type "show copying" to see the conditions.
    There is absolutely no warranty for GDB.  Type "show warranty" for
details.
    This GDB was configured as "i386-redhat-linux"...
    Setting up the environment for debugging gdb.
    Breakpoint 1 at 0x810a062: file utils.c, line 735.
    Breakpoint 2 at 0x81074ff: file top.c, line 2897.
    (top-gdb) attach 22239
    Attaching to program: /usr/local/bin/gdb, Pid 22239
    Reading symbols from /usr/lib/libncurses.so.4...done.
    Reading symbols from /usr/X11R6/lib/libX11.so.6...done.
    Reading symbols from /lib/libdl.so.2...done.
    Reading symbols from /lib/libm.so.6...done.
    Reading symbols from /lib/libc.so.6...done.
    Reading symbols from /lib/ld-linux.so.2...done.
    Reading symbols from /lib/libthread_db.so.1...done.
    0x40140deb in __sigsuspend (set=0x83e36c0) at
../sysdeps/unix/sysv/linux/sigsuspend.c:48
    48      ../sysdeps/unix/sysv/linux/sigsuspend.c: No such file or
directory.
    (top-gdb) bt
    #0  0x40140deb in __sigsuspend (set=0x83e36c0) at
../sysdeps/unix/sysv/linux/sigsuspend.c:48
    #1  0x80d1092 in lin_lwp_wait (pid=-1, ourstatus=0xbfffc074) at
lin-lwp.c:766
    #2  0x812dd11 in thread_db_wait (pid=-1, ourstatus=0xbfffc074) at
thread-db.c:710
    #3  0x80e1ad7 in gdbtk_wait (pid=-1, ourstatus=0xbfffc074) at
./gdbtk/generic/gdbtk-hooks.c:694
    #4  0x80b269f in wait_for_inferior () at infrun.c:1286
    #5  0x80b252c in proceed (addr=4294967295,
siggnal=TARGET_SIGNAL_DEFAULT, step=0) at infrun.c:1085
    #6  0x80afba3 in continue_command (proc_count_exp=0x0, from_tty=0)
at infcmd.c:399
    #7  0x80e1666 in gdbtk_call_command (cmdblk=0x8418140, arg=0x0,
from_tty=0) at ./gdbtk/generic/gdbtk-hooks.c:513
    #8  0x8105915 in execute_command (p=0x89a4310 "", from_tty=0) at
top.c:1517
    #9  0x80dadb5 in gdb_immediate_command (clientData=0x80dace4,
interp=0x8424fb0, objc=2, objv=0x8425c68) at
./gdbtk/generic/gdbtk-cmds.c:892
    #10 0x80da888 in wrapped_call (opaque_args=0xbfffc284) at
./gdbtk/generic/gdbtk-cmds.c:536
    #11 0x81048d9 in catch_errors (func=0x80da858 <wrapped_call>,
args=0xbfffc284, errstring=0x8356883 "", mask=6) at top.c:607
    #12 0x80da78e in call_wrapper (clientData=0x80dace4,
interp=0x8424fb0, objc=2, objv=0x8425c68) at
./gdbtk/generic/gdbtk-cmds.c:474
    #13 0x82ff5f9 in TclExecuteByteCode (interp=0x8424fb0,
codePtr=0x8789528) at ./../generic/tclExecute.c:955
    #14 0x82de521 in Tcl_EvalObj (interp=0x8424fb0, objPtr=0x853ccf8) at
./../generic/tclBasic.c:2645
    #15 0x83297d1 in TclObjInterpProc (clientData=0x85a8d10,
interp=0x8424fb0, objc=1, objv=0x8425c64) at ./../generic/tclProc.c:996
    #16 0x82ff5f9 in TclExecuteByteCode (interp=0x8424fb0,
codePtr=0x89a4288) at ./../generic/tclExecute.c:955
    #17 0x82de521 in Tcl_EvalObj (interp=0x8424fb0, objPtr=0x897ac40) at
./../generic/tclBasic.c:2645
    #18 0x82eb10d in Tcl_SwitchObjCmd (dummy=0x0, interp=0x8424fb0,
objc=3, objv=0x8425c58)
    ---Type <return> to continue, or q <return> to quit---q
     at ./../generic/tclCmdMZ.c:17Quit
    (top-gdb)


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Fwd: Insight freezes when trying to debug Mozilla]
  2000-10-04 20:03 [Fwd: Insight freezes when trying to debug Mozilla] Brian Stell
@ 2000-10-05  2:03 ` Mark Kettenis
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Kettenis @ 2000-10-05  2:03 UTC (permalink / raw)
  To: bstell; +Cc: gdb

   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 <fnasser@cygnus.com>
To: Mark Kettenis <kettenis@wins.uva.nl>
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 <fnasser@cygnus.com>
Cc: Mark Kettenis <kettenis@wins.uva.nl>, 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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2000-10-05  2:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-10-04 20:03 [Fwd: Insight freezes when trying to debug Mozilla] Brian Stell
2000-10-05  2:03 ` Mark Kettenis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox