This is the mail archive of the gdb-patches@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: [PATCH] Fix staticthreads test case with merged Linux targets


On Thu, Apr 06, 2006 at 02:34:19AM +0200, Ulrich Weigand wrote:
> another problem triggered by Linux target rework: the staticthreads
> test case hangs.  This is because when the thread-db handling does
> not work properly (because the statically linked inferior uses
> LinuxThreads, while the dynamically linked gdb expects NPTL),

I have a patch in Debian that lets GDB use both libthread_db's, by the
way.  I'll get around to submitting that at some point.

> Now, I'm not sure how the whole treatment of LWPs in the absence
> of thread-db is really supposed to work.  However, the following
> patch appears reasonable to me and does fix the test case.  What
> the patch does is to simply add an argument to linux_nat_handle_extended
> whether it should leave the new clone stopped or resume it.  The
> two callers can then choose the proper behaviour.

The answer to how it's supposed to work is "badly".  It's really not
supported yet.  In particular, when thread_db knows about some threads
and not others things become very complicated.  But, your patch still
seems sensible to me.

> 	* linux-nat.c (exit_lwp): Fix NULL pointer access.
> 	(linux_nat_handle_extended): New parameter STOPPING.
> 	(wait_lwp): Call it with STOPPING equals 1.
> 	(linux_nat_wait): Call it with STOPPING equals 0.

OK.


-- 
Daniel Jacobowitz
CodeSourcery


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