Re: [RFA]: Modified Watchthreads Patch

Mark Kettenis
2004-12-11T14:53:34Z

Date: Fri, 10 Dec 2004 20:28:38 -0500
From: Daniel Jacobowitz <drow@false.org>

On Fri, Dec 10, 2004 at 03:37:29PM -0500, Daniel Jacobowitz wrote:
> Please fix the whitespace at the end of s390-nat.c. Otherwise, this is
> approved if Ulrich is OK with the S390 bits; let's give him a chance to
> comment.

Let's hold off while we discuss the observers issue.

Jeff, I've been thinking about this patch, and another problem occured
to me. You're using a "new thread" event, but you're not iterating
over threads - you're iterating over LWPs. So whether or not we want
to use an observer for this action, it's in the wrong conceptual place;
on recent systems we should be able to debug multi-threaded programs
that do not use libpthread with some degree of success. TLS won't
work, of course, since that's library-supported... but most of the rest
of what libthread_db is not necessary. The code for this on the GDB
side is not completely in place yet but I'm working up to it - that's
one of the goals of the revamped Linux target_ops.

Yes. In principle for a platform that has a 1x1 threads
implementation, the only thing your threads layer should do is
translating between the thread ID's the programmer sees and the lwp
ID's used by the kernel.

Unfortunately for Linux this isn't completely true...

Mark