From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mark Kettenis To: "H . J . Lu" Cc: GDB Subject: Re: Is the current gdb 5.1 broken for Linuxthreads? Date: Wed, 19 Sep 2001 06:32:00 -0000 Message-id: References: <20010917124710.A21992@lucon.org> <20010917161350.A25349@lucon.org> <20010917191357.A28300@lucon.org> X-SW-Source: 2001-09/msg00157.html "H . J . Lu" writes: > It looks like with gdb 5.1, I have to attach the very first thread. Is > that documented anywhere? Shouldn't gdb find the very first thread > and attach it for me? Yep, you'll have to attach to the very first thread. No it isn't documented anywhere. Yes, GDB should at least try to find out what's the "very first thread", and indeed right now it doesn't. Since the kernel treats the initial process differently from the "cloned" processes, GDB has to know about the initial process. There's no easy way to get this information from the kernel, so GDB must either get the information from the user, or from the threads library. At the point that I wrote the code I didn't immediately see how to get the necessary info from the threads library, so the user must specify it. I'll try to find the proper place to document this, and think again about getting the info from the threads library. Mark