Bug 14817 - gdbserver doesn't look at thread name
Summary: gdbserver doesn't look at thread name
Status: RESOLVED FIXED
Alias: None
Product: gdb
Classification: Unclassified
Component: remote (show other bugs)
Version: unknown
: P2 normal
Target Milestone: 7.10
Assignee: Not yet assigned to anyone
URL:
Keywords:
: 14495 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-11-07 18:29 UTC by Tom Tromey
Modified: 2016-01-27 20:34 UTC (History)
4 users (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Tromey 2012-11-07 18:29:49 UTC
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.
Comment 1 Benoit (Mozilla) 2013-04-02 17:49:07 UTC
*** Bug 14495 has been marked as a duplicate of this bug. ***
Comment 2 Pedro Alves 2015-06-30 14:03:19 UTC
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
Comment 3 Tom Tromey 2016-01-20 22:21:41 UTC
This was fixed in 7.10.
Comment 4 Tom Tromey 2016-01-21 16:06:34 UTC
Actually close.
Comment 5 Eric Badger 2016-01-27 19:56:32 UTC
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.
Comment 6 Tom Tromey 2016-01-27 20:17:30 UTC
(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
Comment 7 Eric Badger 2016-01-27 20:34:26 UTC
(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.