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]

Linux threads support


After concluding that the current Linux threads support is pretty much
broken beyond repair, I have been working on a reimplementation, which
consists of two layers:

1. A Linux LWP layer.  This presents a group of Linux processes (which
   are assumed to share a single address space) to GDB as a
   multi-threaded process.  It should be useful on its right, i.e. for
   programs that don't use the LinuxThreads library, but the clone()
   system call directly.

2. A generic libthread_db layer (contains only a few Linux-specific
   hooks).  This contains much code from Michael Snyder's lin-thread.c
   module, but since most of the Linux-specific stuff is factored out
   into the Linux LWP layer, it should be possible to make it usable
   for Solaris without much problems.

The old LinuxThreads support contained linux-thread.c isn't there
anymore.  It shouldn't be too difficult to reimplement it, but I'm not
eager to do so.  Supporting one threads debugging module is bad enough.

Anyway, I'm now at a point where I think it functions better than the
current threads support, and I really need to get it more widely
tested.  I see two possibilities:

1. Post a patch and hope that people take the trouble of applying it.

2. Put the new code directly in the CVS (possible in a seperate
   branch).

I think option 1 is doomed to fail.  For option 2 I'd like some
opinions (especially from the maintainers of the various Linux ports):

* Should the stuff be checked in on a seperate branch?

* How important is support for older Linux systems (pre-libthread_db,
  i.e. pre glibc-2.1.3) give the fact that GDB has never had any
  satisfactory threads support for these systems, and older versions
  of the LinuxThreads library contain many critical bugs?

* Who needs to review this stuff?  Michael Snyder is listed as the
  threads maintainer and did the origional integration/implementation
  of the Linux threads support.  However, he seems to be pretty busy,
  and he once told me he isn't too familiar with the peculiarities of
  the Linux stuff.

Mark

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