In short, there is no way to either enable libthread_db at _start time for a
static binary, or find the appropriate time to initialize it later. I propose
allowing it to initialize, and then reporting the "creation" of the first thread
once the pthreads library is initialized.
The patch is here:
Without a fix for this problem, GDB can not debug static executables which use NPTL.
I'm responsible for nptl_db and recall some poking related to this in the past.
I'll look into it, but it won't be before June 5 as I'm leaving for vacation now.
Roland, did you ever get a chance to look at this? Another user just reported a
similar problem on gdb@.
Sorry, still back burner. It will be a little while longer before I get to my
Roland checked in an NPTL patch for this and I fixed gdb.