From: "Lukasz Lempart" <llempart@gmail.com>
To: "Michael Snyder" <msnyder@vmware.com>
Cc: gdb@sourceware.org
Subject: Re: gdb and cloned process
Date: Thu, 23 Oct 2008 20:30:00 -0000 [thread overview]
Message-ID: <4ced24c0810231329w4a1e4788qaeac176afff1fc4e@mail.gmail.com> (raw)
In-Reply-To: <4900C1CC.20002@vmware.com>
On Thu, Oct 23, 2008 at 11:26 AM, Michael Snyder <msnyder@vmware.com> wrote:
> Daniel Jacobowitz wrote:
>>
>> On Wed, Oct 22, 2008 at 05:09:32PM -0700, Lukasz Lempart wrote:
>>>
>>> How does gdb (through libthread_db) figure out what threads belong to a
>>> process?
>>
>> The thread library maintains an internal list of threads. If you've
>> cloned the process, without telling the C library about that, you're
>> going to end up with the same list of threads; so the behavior you
>> describe is not surprising.
>>
>>> Is there currently a way to disable thread debugging in gdb?
>>
>> Not really. You might be able to preload a dummy libthread_db.so.1
>> that always failed to detect new threads.
>
> What if you strip libthread.so? Isn't that supposed to
> cause thread debugging to fail?
>
Stripping libthread_db.so seems to do the trick. Thanks for the
suggestion. Keeping both version of the library around and just
changing LD_LIBRARY_PATH to point to the one I want seems to be the
most portable way to handle debugging both the original and the cloned
process. A gdb command to turn on/off thread debugging would be very
nice to have though.
next prev parent reply other threads:[~2008-10-23 20:30 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-23 0:10 Lukasz Lempart
2008-10-23 3:06 ` Daniel Jacobowitz
2008-10-23 17:14 ` Lukasz Lempart
2008-10-23 17:19 ` Daniel Jacobowitz
2008-10-23 18:31 ` Michael Snyder
2008-10-23 20:30 ` Lukasz Lempart [this message]
2008-10-23 21:44 ` Michael Snyder
2008-10-23 20:01 ` Michael Snyder
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=4ced24c0810231329w4a1e4788qaeac176afff1fc4e@mail.gmail.com \
--to=llempart@gmail.com \
--cc=gdb@sourceware.org \
--cc=msnyder@vmware.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