Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Paul Pluzhnikov <ppluzhnikov@google.com>
To: Jason Machacek <jmachacek@stratos.com>
Cc: gdb@sourceware.org
Subject: Re: Cross-platform, multithreaded debugging (x86 to ARM) with gdb and  	gdbserver not recognizing threads
Date: Thu, 17 Dec 2009 18:21:00 -0000	[thread overview]
Message-ID: <8ac60eac0912171018h67548c94x1ce63904b9f6d136@mail.gmail.com> (raw)
In-Reply-To: <597A11B8CF75534EBE76656E186BF106E013E6@stella.stratos.local>

On Thu, Dec 17, 2009 at 10:01 AM, Jason Machacek <jmachacek@stratos.com> wrote:

>> - Is libpthread.so.0 on target stripped?
>
> It doesn't appear to be.  I made a copy of libthread_db-1.0.so and ran
> 'strip' on it, and the file size dropped.  Is this the correct approach?

It's not libthread_db, it's the libpthread that matters.

You want to copy /lib/libpthread.so.0 (which should be a symlink to
/lib/libpthread-2.3.2.so) from target to host, and then:

  arm-linux-nm libpthread.so.0 | egrep 'version|threads_events'

You should see one of: nptl_version, __linuxthreads_version or
__pthread_threads_events.

If you see 'no symbols' instead, then your libpthread is stripped, and
that explains your problems.

> and libc.so.6 is statically linked into my application.

It is impossible to statically link libc.so.6 into an application. Perhaps
you mean that your app is linked with libc.a ?

In general GDB may have harder time debugging statically-linked threaded
executables, and you should always prefer to link against system libraries
dynamically.

Cheers,
-- 
Paul Pluzhnikov


  reply	other threads:[~2009-12-17 18:21 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-16 23:01 Jason Machacek
2009-12-17  4:44 ` Paul Pluzhnikov
2009-12-17 18:01   ` Jason Machacek
2009-12-17 18:21     ` Paul Pluzhnikov [this message]
2009-12-17 18:38       ` Jason Machacek
2009-12-17 18:53         ` Paul Pluzhnikov
2009-12-17 19:04           ` Jason Machacek

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=8ac60eac0912171018h67548c94x1ce63904b9f6d136@mail.gmail.com \
    --to=ppluzhnikov@google.com \
    --cc=gdb@sourceware.org \
    --cc=jmachacek@stratos.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