This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Cannot find new threads: generic error


On Fri, Aug 29, 2008 at 6:02 PM, Daniel Jacobowitz <drow@false.org> wrote:
> On Fri, Aug 29, 2008 at 05:43:38PM -0700, Paul Pluzhnikov wrote:
>> If you do that on Linux, you should expect all kinds of trouble,
>> because e.g. glibc very early on decides whether pthreads are
>> present, and permanently switches to thread-unsafe behavior if they
>> are not.
>
> I'm pretty sure that's not correct. It checks at each runtime spot,
> not initialization time - a lot of the complexity in glibc is to
> support this.

Looks like you are correct and I was mistaken.
I must have mixed up glibc with some other libc.

So I modify my statement to say "don't do this, unless you are on an
OS known to handle this correctly, of which I only know AIX 5,
Solaris 10, and Linux".

Even on these OSes, other libraries you link to may not support
"sudden multithreading", and GDB doesn't appear to handle that well
either (possibly due to a bug in GDB).

Cheers,
-- 
Paul Pluzhnikov


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]