linux-nat.c:linux_nat_thread_name will return the thread name as set by prctl(PR_SET_NAME). remote.c and gdbserver ought to send back this information as well.
*** Bug 14495 has been marked as a duplicate of this bug. ***
GDB now fetches the remote thread list on every (public) stop, so all that's missing is the including the thread names in the xml threads list. And a patch for that was sent here: https://sourceware.org/ml/gdb-patches/2015-05/msg00370.html
This was fixed in 7.10.
Actually close.
Hi there. The patch mentioned by Pedro doesn't seem to have been actually applied in 7.10; I don't think this should have been closed yet.
(In reply to eric from comment #5) > Hi there. The patch mentioned by Pedro doesn't seem to have been actually > applied in 7.10; I don't think this should have been closed yet. I see this in gdb/NEWS: * Thread names in remote protocol The reply to qXfer:threads:read may now include a name attribute for each thread. See also commit 79efa585c51f0657b319beb1e213d5721eaacdcc Author: Simon Marchi <simon.marchi@ericsson.com> Date: Thu Nov 26 09:49:04 2015 -0500 Display names of remote threads
(In reply to Tom Tromey from comment #6) > (In reply to eric from comment #5) > > Hi there. The patch mentioned by Pedro doesn't seem to have been actually > > applied in 7.10; I don't think this should have been closed yet. > > I see this in gdb/NEWS: > > * Thread names in remote protocol > > The reply to qXfer:threads:read may now include a name attribute for each > thread. > > See also > > commit 79efa585c51f0657b319beb1e213d5721eaacdcc > Author: Simon Marchi <simon.marchi@ericsson.com> > Date: Thu Nov 26 09:49:04 2015 -0500 > > Display names of remote threads Tom, you're quite right. I thought you meant in the released 7.10.1. I just compiled gdb from git and confirmed it all works well. Sorry about the noise, and thanks for the clarification.