Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* remotely debugging muti-threaded applicaton did not work with gdb 6.3.50.20050725-cvs
@ 2007-05-29 16:14 Michael Zhang
  2007-05-29 16:22 ` David Daney
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Michael Zhang @ 2007-05-29 16:14 UTC (permalink / raw)
  To: gdb

Hi there,

 I have been battling with this problem for a week now and searched
all the available information ( GDB manual, gdb mailing list, etc.)
but unfortunately could not find an answer. Here is my setup.

 - Host : x86 running FC1 with linux 2.4.22-1.2115.nptl
 - Target : mips le running linux 2.4.17
 - gdb 6.3.50.20050725-cvs and its included gdbserver (all cross-built
for mips processor)
 - libc library 2.2.3 ( most of the shared library bear this version )

 Debugging problem:

 The gdb on the host can talk to the gdbserver on the target and I did
not forget to set "solib-absolute-prefix". If I set breakpoints before
the multiple threads are spawned, I could step through the code when
the breakpoint was hit. However, once the application finished
creating threads and if I stop the program to step through, it won't
step and alway stuck in libc.so.6. The worst is all the threads are
getting killed. And "info threads" never returns anything just
reporting that the gdbserver could not get thread list.

 Any ideas even though it might have bee asked before. I am basically
at my wit's end.

 Cheers,

 Michael


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

* Re: remotely debugging muti-threaded applicaton did not work with  gdb 6.3.50.20050725-cvs
  2007-05-29 16:14 remotely debugging muti-threaded applicaton did not work with gdb 6.3.50.20050725-cvs Michael Zhang
@ 2007-05-29 16:22 ` David Daney
       [not found] ` <655C3D4066B7954481633935A40BB36F041337@ussunex02.svl.access-company.com>
  2007-05-31 17:23 ` Daniel Jacobowitz
  2 siblings, 0 replies; 4+ messages in thread
From: David Daney @ 2007-05-29 16:22 UTC (permalink / raw)
  To: Michael Zhang; +Cc: gdb

Michael Zhang wrote:
> Hi there,
> 
> I have been battling with this problem for a week now and searched
> all the available information ( GDB manual, gdb mailing list, etc.)
> but unfortunately could not find an answer. Here is my setup.
> 
> - Host : x86 running FC1 with linux 2.4.22-1.2115.nptl
> - Target : mips le running linux 2.4.17
> - gdb 6.3.50.20050725-cvs and its included gdbserver (all cross-built
> for mips processor)
> - libc library 2.2.3 ( most of the shared library bear this version )
> 
> Debugging problem:
> 
> The gdb on the host can talk to the gdbserver on the target and I did
> not forget to set "solib-absolute-prefix". If I set breakpoints before
> the multiple threads are spawned, I could step through the code when
> the breakpoint was hit. However, once the application finished
> creating threads and if I stop the program to step through, it won't
> step and alway stuck in libc.so.6. The worst is all the threads are
> getting killed. And "info threads" never returns anything just
> reporting that the gdbserver could not get thread list.
> 
> Any ideas even though it might have bee asked before. I am basically
> at my wit's end.
> 

I had similar problems with a similar configuration.  I would recommend 
updating to the current GDB release (version 6.6).  I have not verified 
that gdbserver works for multi-threaded programs with the newer version, 
but it has a much better chance.

As long as you are upgrading things, I would recommend at least glibc 
2.3.3.  The thread synchronization parts of libpthread are broken in 
2.2.x for mips.

If you have enough memory you could also try running a native gdb on the 
target.  I have had very good results doing that.

David Daeny


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

* Re: remotely debugging muti-threaded applicaton did not work with gdb 6.3.50.20050725-cvs
       [not found] ` <655C3D4066B7954481633935A40BB36F041337@ussunex02.svl.access-company.com>
@ 2007-05-29 19:27   ` Michael Zhang
  0 siblings, 0 replies; 4+ messages in thread
From: Michael Zhang @ 2007-05-29 19:27 UTC (permalink / raw)
  To: Michael Snyder; +Cc: gdb

Thanks all,

I will try 6.6 and keep you posted.

Cheers,

Michael

On 5/29/07, Michael Snyder <Michael.Snyder@access-company.com> wrote:
>
>
>
> Most likely your target is configured to use the new NPTL threads.
>  GDB 6.3 is quite good at handling NPTL threads, but unfortunately,
>  gdbserver 6.3 isn't.
>
>  If you can upgrade to GDB 6.6, that would be best.
>
>  At a minimum, you need to build the gdbserver from version 6.6
>  and install it on your target.
>
>  Michael
>
>
>
>  -----Original Message-----
>  From: gdb-owner@sourceware.org on behalf of Michael Zhang
>  Sent: Tue 5/29/2007 9:13 AM
>  To: gdb@sourceware.org
>  Subject: remotely debugging muti-threaded applicaton did not work with gdb
> 6.3.50.20050725-cvs
>
>  Hi there,
>
>   I have been battling with this problem for a week now and searched
>  all the available information ( GDB manual, gdb mailing list, etc.)
>  but unfortunately could not find an answer. Here is my setup.
>
>   - Host : x86 running FC1 with linux 2.4.22-1.2115.nptl
>   - Target : mips le running linux 2.4.17
>   - gdb 6.3.50.20050725-cvs and its included gdbserver (all cross-built
>  for mips processor)
>   - libc library 2.2.3 ( most of the shared library bear this version )
>
>   Debugging problem:
>
>   The gdb on the host can talk to the gdbserver on the target and I did
>  not forget to set "solib-absolute-prefix". If I set breakpoints before
>  the multiple threads are spawned, I could step through the code when
>  the breakpoint was hit. However, once the application finished
>  creating threads and if I stop the program to step through, it won't
>  step and alway stuck in libc.so.6. The worst is all the threads are
>  getting killed. And "info threads" never returns anything just
>  reporting that the gdbserver could not get thread list.
>
>   Any ideas even though it might have bee asked before. I am basically
>  at my wit's end.
>
>   Cheers,
>
>   Michael
>
>


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

* Re: remotely debugging muti-threaded applicaton did not work with gdb 6.3.50.20050725-cvs
  2007-05-29 16:14 remotely debugging muti-threaded applicaton did not work with gdb 6.3.50.20050725-cvs Michael Zhang
  2007-05-29 16:22 ` David Daney
       [not found] ` <655C3D4066B7954481633935A40BB36F041337@ussunex02.svl.access-company.com>
@ 2007-05-31 17:23 ` Daniel Jacobowitz
  2 siblings, 0 replies; 4+ messages in thread
From: Daniel Jacobowitz @ 2007-05-31 17:23 UTC (permalink / raw)
  To: Michael Zhang; +Cc: gdb

On Tue, May 29, 2007 at 10:13:57AM -0600, Michael Zhang wrote:
> Debugging problem:
> 
> The gdb on the host can talk to the gdbserver on the target and I did
> not forget to set "solib-absolute-prefix". If I set breakpoints before
> the multiple threads are spawned, I could step through the code when
> the breakpoint was hit. However, once the application finished
> creating threads and if I stop the program to step through, it won't
> step and alway stuck in libc.so.6. The worst is all the threads are
> getting killed. And "info threads" never returns anything just
> reporting that the gdbserver could not get thread list.

If you do not have any luck with David's suggestions, please send a
more specific problem report afterwards.  I need to see at least an
exact transcript of your session to guess what is wrong.

-- 
Daniel Jacobowitz
CodeSourcery


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

end of thread, other threads:[~2007-05-31 17:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-05-29 16:14 remotely debugging muti-threaded applicaton did not work with gdb 6.3.50.20050725-cvs Michael Zhang
2007-05-29 16:22 ` David Daney
     [not found] ` <655C3D4066B7954481633935A40BB36F041337@ussunex02.svl.access-company.com>
2007-05-29 19:27   ` Michael Zhang
2007-05-31 17:23 ` Daniel Jacobowitz

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