This is the mail archive of the gdb@sources.redhat.com 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]

Re: Is the current gdb 5.1 broken for Linuxthreads?


On Mon, Sep 17, 2001 at 07:13:57PM -0700, H . J . Lu wrote:
> > 
> > The more I looked at it, the more borken gdb is with linuxthreads:
> > 
> > # gcc -g ex11.c -lpthread -lrt -D_GNU_SOURCE -static
> > # a.out
> > # gdb a.out
> > ...
> > (gdb) att 14226
> > Attaching to program: /home/hjl/bugs/gdb/thread/a.out, process 14226
> > ...
> > lin-lwp.c:620: gdb-internal-error: stop_wait_callback: Assertion `pid ==
> > GET_LWP (lp->ptid)' failed.
> > An internal GDB error was detected.  This may make further
> 
> It looks like with gdb 5.1, I have to attach the very first thread. Is
> that documented anywhere? Shouldn't gdb find the very first thread
> and attach it for me?

It seems that the Linuxthreads support in gdb 5.1 is very fragile. In
some aspects, it is worse than gdb 4.17/4.18 with various Linuxthreads
patches. The problem seems to be gdb starts with the none-threaded mode
and the Linuxthreads support is only activated at very late time. In
some cases, it is too late. One problem seems to call wait () on cloned
processes. Can't we treat none-threaded Linux procceses as a
Linuxthreads with one thread? That is what gdb 4.17 does.

BTW, people may be very disappointed at the current Linuxthreads
support in gdb 5.1.

H.J.


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