Re: gdb and cloned process

Daniel Jacobowitz
2008-10-23T03:06:32Z

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.

--
Daniel Jacobowitz
CodeSourcery