Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: David Daney <ddaney@avtrex.com>
To: Michael Zhang <michael.gd.zhang@gmail.com>
Cc: gdb@sourceware.org
Subject: Re: remotely debugging muti-threaded applicaton did not work with  gdb 6.3.50.20050725-cvs
Date: Tue, 29 May 2007 16:22:00 -0000	[thread overview]
Message-ID: <465C5351.3030109@avtrex.com> (raw)
In-Reply-To: <3d234af30705290913u3d57fa8fp4ab53400027658a0@mail.gmail.com>

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


  reply	other threads:[~2007-05-29 16:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-29 16:14 Michael Zhang
2007-05-29 16:22 ` David Daney [this message]
     [not found] ` <655C3D4066B7954481633935A40BB36F041337@ussunex02.svl.access-company.com>
2007-05-29 19:27   ` Michael Zhang
2007-05-31 17:23 ` Daniel Jacobowitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=465C5351.3030109@avtrex.com \
    --to=ddaney@avtrex.com \
    --cc=gdb@sourceware.org \
    --cc=michael.gd.zhang@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox