public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* Can't debug Threaded application
@ 2005-08-24 20:18 jo
  2005-08-29 16:09 ` jo
  0 siblings, 1 reply; 6+ messages in thread
From: jo @ 2005-08-24 20:18 UTC (permalink / raw)
  To: gdb

Hello Everyone,

I believe the problem I am having is the same a bug 848 and 1154.


GDB 6.3 can't debug a threaded application.  All I get is SIG32s instead of the
[NEW THREAD...] message.  

And when I do a "(gdb)> i thread" I get nothing....

Here are my specs:
- Trustix
- Linux cobra.q1labs.inc 2.4.30-3trsmp #1 Tue Jun 7 22:56:09 ADT 2005 i686
unknown unknown GNU/Linux
- /lib/libc-2.3.2.so
GNU C Library stable release version 2.3.2, by Roland McGrath et al.
Copyright (C) 2003 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Compiled by GNU CC version 3.3.3.
Compiled on a Linux 2.4.25-2tr system on 2004-09-29.
Available extensions:
        GNU libio by Per Bothner
        crypt add-on version 2.1 by Michael Glad and others
        linuxthreads-0.10 by Xavier Leroy
        BIND-8.2.3-T5B
        libthread_db work sponsored by Alpha Processor Inc
        NIS(YP)/NIS+ NSS modules 0.19 by Thorsten Kukuk
Report bugs using the `glibcbug' script to <bugs@gnu.org>.

Is there any work arounds for this bug?  I have tried this: 

(gdb)> set auto-solib-add 0 
(gdb)> handle S1G32 nostop noprint

but this only stops the SIG32 from stopping gdb, I still can't properly debug
the program.

What do I have to do to get this to work?

Thanks

Jason





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

* Re: Can't debug Threaded application
  2005-08-24 20:18 Can't debug Threaded application jo
@ 2005-08-29 16:09 ` jo
  2005-08-29 16:11   ` Daniel Jacobowitz
  0 siblings, 1 reply; 6+ messages in thread
From: jo @ 2005-08-29 16:09 UTC (permalink / raw)
  To: gdb

Does no one have answer to this problem?

Is GDB useless for threaded applications now?

Quoting jo@atsresults.com:

> Hello Everyone,
> 
> I believe the problem I am having is the same a bug 848 and 1154.
> 
> 
> GDB 6.3 can't debug a threaded application.  All I get is SIG32s instead of
> the
> [NEW THREAD...] message.  
> 
> And when I do a "(gdb)> i thread" I get nothing....
> 
> Here are my specs:
> - Trustix
> - Linux cobra.q1labs.inc 2.4.30-3trsmp #1 Tue Jun 7 22:56:09 ADT 2005 i686
> unknown unknown GNU/Linux
> - /lib/libc-2.3.2.so
> GNU C Library stable release version 2.3.2, by Roland McGrath et al.
> Copyright (C) 2003 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions.
> There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
> PARTICULAR PURPOSE.
> Compiled by GNU CC version 3.3.3.
> Compiled on a Linux 2.4.25-2tr system on 2004-09-29.
> Available extensions:
>         GNU libio by Per Bothner
>         crypt add-on version 2.1 by Michael Glad and others
>         linuxthreads-0.10 by Xavier Leroy
>         BIND-8.2.3-T5B
>         libthread_db work sponsored by Alpha Processor Inc
>         NIS(YP)/NIS+ NSS modules 0.19 by Thorsten Kukuk
> Report bugs using the `glibcbug' script to <bugs@gnu.org>.
> 
> Is there any work arounds for this bug?  I have tried this: 
> 
> (gdb)> set auto-solib-add 0 
> (gdb)> handle S1G32 nostop noprint
> 
> but this only stops the SIG32 from stopping gdb, I still can't properly
> debug
> the program.
> 
> What do I have to do to get this to work?
> 
> Thanks
> 
> Jason
> 
> 
> 
> 
> 
> 


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

* Re: Can't debug Threaded application
  2005-08-29 16:09 ` jo
@ 2005-08-29 16:11   ` Daniel Jacobowitz
  2005-08-29 17:06     ` Russell Shaw
  0 siblings, 1 reply; 6+ messages in thread
From: Daniel Jacobowitz @ 2005-08-29 16:11 UTC (permalink / raw)
  To: jo; +Cc: gdb

On Mon, Aug 29, 2005 at 12:08:53PM -0400, jo@atsresults.com wrote:
> Does no one have answer to this problem?
> 
> Is GDB useless for threaded applications now?

Of course not.  No one's responded because no one has advice that you
can't find in the list archives.  This almost always means something is
broken on your installation.  You may want to report it to Trustix,
since that's your distribution.

> > Is there any work arounds for this bug?  I have tried this: 
> > 
> > (gdb)> set auto-solib-add 0 
> > (gdb)> handle S1G32 nostop noprint

These will definitely not help anything.  I wish people would stop
suggesting them.

-- 
Daniel Jacobowitz
CodeSourcery, LLC

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

* Re: Can't debug Threaded application
  2005-08-29 16:11   ` Daniel Jacobowitz
@ 2005-08-29 17:06     ` Russell Shaw
  2005-08-29 17:08       ` Daniel Jacobowitz
  0 siblings, 1 reply; 6+ messages in thread
From: Russell Shaw @ 2005-08-29 17:06 UTC (permalink / raw)
  Cc: gdb

Daniel Jacobowitz wrote:
> On Mon, Aug 29, 2005 at 12:08:53PM -0400, jo@atsresults.com wrote:
> 
>>Does no one have answer to this problem?
>>
>>Is GDB useless for threaded applications now?
> 
> Of course not.  No one's responded because no one has advice that you
> can't find in the list archives.  This almost always means something is
> broken on your installation.  You may want to report it to Trustix,
> since that's your distribution.

I thought it was just me that had thread problems. In a program,
when i step over:

   result  = gnome_vfs_directory_list_load (&dir_list, directory,
                       GNOME_VFS_FILE_INFO_DEFAULT);

I get:

(gdb) next

   Program received signal SIG33, Real-time event 33.
   [Switching to Thread -1230148688 (LWP 3083)]
   0xb7a975a9 in poll () from /lib/tls/libc.so.6

and execution seems to abort because i can't reach any
breakpoints after this point. The program was compiled
with gcc-3.4.4 -g -O0. Gdb is version 6.3.

>>>Is there any work arounds for this bug?  I have tried this: 
>>>
>>>(gdb)> set auto-solib-add 0 
>>>(gdb)> handle S1G32 nostop noprint
> 
> These will definitely not help anything.  I wish people would stop
> suggesting them.

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

* Re: Can't debug Threaded application
  2005-08-29 17:06     ` Russell Shaw
@ 2005-08-29 17:08       ` Daniel Jacobowitz
  2005-08-29 17:19         ` Russell Shaw
  0 siblings, 1 reply; 6+ messages in thread
From: Daniel Jacobowitz @ 2005-08-29 17:08 UTC (permalink / raw)
  To: Russell Shaw; +Cc: gdb

On Tue, Aug 30, 2005 at 03:06:39AM +1000, Russell Shaw wrote:
> Daniel Jacobowitz wrote:
> >On Mon, Aug 29, 2005 at 12:08:53PM -0400, jo@atsresults.com wrote:
> >
> >>Does no one have answer to this problem?
> >>
> >>Is GDB useless for threaded applications now?
> >
> >Of course not.  No one's responded because no one has advice that you
> >can't find in the list archives.  This almost always means something is
> >broken on your installation.  You may want to report it to Trustix,
> >since that's your distribution.
> 
> I thought it was just me that had thread problems. In a program,
> when i step over:
> 
>   result  = gnome_vfs_directory_list_load (&dir_list, directory,
>                       GNOME_VFS_FILE_INFO_DEFAULT);
> 
> I get:
> 
> (gdb) next
> 
>   Program received signal SIG33, Real-time event 33.
>   [Switching to Thread -1230148688 (LWP 3083)]
>   0xb7a975a9 in poll () from /lib/tls/libc.so.6
> 
> and execution seems to abort because i can't reach any
> breakpoints after this point. The program was compiled
> with gcc-3.4.4 -g -O0. Gdb is version 6.3.

I recommend submitting a complete test case, since this sort of thing
does work for many people.

-- 
Daniel Jacobowitz
CodeSourcery, LLC

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

* Re: Can't debug Threaded application
  2005-08-29 17:08       ` Daniel Jacobowitz
@ 2005-08-29 17:19         ` Russell Shaw
  0 siblings, 0 replies; 6+ messages in thread
From: Russell Shaw @ 2005-08-29 17:19 UTC (permalink / raw)
  Cc: gdb

Daniel Jacobowitz wrote:
> On Tue, Aug 30, 2005 at 03:06:39AM +1000, Russell Shaw wrote:
> 
>>Daniel Jacobowitz wrote:
>>
>>>On Mon, Aug 29, 2005 at 12:08:53PM -0400, jo@atsresults.com wrote:
>>>
>>>
>>>>Does no one have answer to this problem?
>>>>
>>>>Is GDB useless for threaded applications now?
>>>
>>>Of course not.  No one's responded because no one has advice that you
>>>can't find in the list archives.  This almost always means something is
>>>broken on your installation.  You may want to report it to Trustix,
>>>since that's your distribution.
>>
>>I thought it was just me that had thread problems. In a program,
>>when i step over:
>>
>>  result  = gnome_vfs_directory_list_load (&dir_list, directory,
>>                      GNOME_VFS_FILE_INFO_DEFAULT);
>>
>>I get:
>>
>>(gdb) next
>>
>>  Program received signal SIG33, Real-time event 33.
>>  [Switching to Thread -1230148688 (LWP 3083)]
>>  0xb7a975a9 in poll () from /lib/tls/libc.so.6
>>
>>and execution seems to abort because i can't reach any
>>breakpoints after this point. The program was compiled
>>with gcc-3.4.4 -g -O0. Gdb is version 6.3.
> 
> 
> I recommend submitting a complete test case, since this sort of thing
> does work for many people.

It's too hard for me to isolate to a simple test case, because i
think it's caused by an earlier part of the program that sets up
threading, but i know that this library function is pretty ugly
(i was debugging someone elses program).
All i can do is submit the whole project, or else leave it till
one day when i'm writing my own threaded code and find the same
bug that i could make a simple test case for.

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

end of thread, other threads:[~2005-08-29 17:19 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-08-24 20:18 Can't debug Threaded application jo
2005-08-29 16:09 ` jo
2005-08-29 16:11   ` Daniel Jacobowitz
2005-08-29 17:06     ` Russell Shaw
2005-08-29 17:08       ` Daniel Jacobowitz
2005-08-29 17:19         ` Russell Shaw

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).