This is the mail archive of the
mailing list for the GDB project.
Re: Cannot find new threads: generic error
On Fri, Aug 29, 2008 at 6:02 PM, Daniel Jacobowitz <firstname.lastname@example.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).