At one time, I believe that thread-db.c was planned to support the full
range of features supported by the libthread_db interface, presumably as
defined by Sun's implementation. That never panned out, and while non-1:1
support did work at one point, I don't think it has in a long while. If it
was wanted, I wouldn't re-implement it the same way. So this patch begins
the process of removing unneeded generality from thread-db. In particular,
while thread-db will still compute the TID, the mapping of threads to LWPs
will be considered fixed.
My goal is to have a GNU/Linux target vector, whose entry points call into
thread-db when necessary, instead of having a thread-db wrapper around all
the GNU/Linux methods. One of the things this will fix is the need for two
separate versions of the GNU/Linux native wait() code - we will always use
the multi-threaded-aware version. Another thing it will fix is a bug in the
fork-following code which tries to find the LWP from a thread ID.
This patch tested on i686-pc-linux-gnu using NPTL; no regressions. OK?