Hi, This patch deals with GDBServer's behavior on Linux only. Currently, when told to attach to a PID, GDBServer does so without checking for other threads that may already exist in the thread group of which that PID is part of. As a result, it leaves threads running in the background until GDB connects to it and allows the use of thread_db to list/attach to the threads. if GDB takes too long to connect to GDBServer, those existing threads that were not detected by GDBServer may end, and the user loses the opportunity to inspect them. The patch changes the behavior of the linux_attach (...) function so it checks if the PID that we should attach to is the thread group leader. If so, we scan /proc//task for existing threads and attach to them as well. In that case, when GDB connects to GDBServer, the process will still hold all of its threads. If the user asks GDBServer to attach to a PID that is not the thread group leader, that means we will attach to a single thread. The patch doesn't change this case, but is this really a useful use case? Or should GDBServer look for the PID's thread group leader and attach to all the threads that are part of that group? If attaching to a single thread is useful, this patch should be OK. If not, i can change the patch to change that scenario. Ok? Regards, Luis