diff options
author | Simon Marchi <simon.marchi@ericsson.com> | 2015-11-26 09:49:04 -0500 |
---|---|---|
committer | Simon Marchi <simon.marchi@ericsson.com> | 2015-11-26 10:50:08 -0500 |
commit | 79efa585c51f0657b319beb1e213d5721eaacdcc (patch) | |
tree | 9aad1092fe7553087c7cffb036422864870f6c56 /gdb/doc | |
parent | 73ede76585a987a07fbd67a7474b193e4ca05517 (diff) | |
download | gdb-79efa585c51f0657b319beb1e213d5721eaacdcc.zip gdb-79efa585c51f0657b319beb1e213d5721eaacdcc.tar.gz gdb-79efa585c51f0657b319beb1e213d5721eaacdcc.tar.bz2 |
Display names of remote threads
This patch adds support for thread names in the remote protocol, and
updates gdb/gdbserver to use it. The information is added to the XML
description sent in response to the qXfer:threads:read packet.
gdb/ChangeLog:
* linux-nat.c (linux_nat_thread_name): Replace implementation by call
to linux_proc_tid_get_name.
* nat/linux-procfs.c (linux_proc_tid_get_name): New function,
implementation inspired by linux_nat_thread_name.
* nat/linux-procfs.h (linux_proc_tid_get_name): New declaration.
* remote.c (struct private_thread_info) <name>: New field.
(free_private_thread_info): Free name field.
(remote_thread_name): New function.
(thread_item_t) <name>: New field.
(clear_threads_listing_context): Free name field.
(start_thread): Get name xml attribute.
(thread_attributes): Add "name" attribute.
(remote_update_thread_list): Copy name field.
(init_remote_ops): Assign remote_thread_name callback.
* target.h (target_thread_name): Update comment.
* NEWS: Mention remote thread name support.
gdb/gdbserver/ChangeLog:
* linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
* server.c (handle_qxfer_threads_worker): Refactor to include thread
name in reply.
* target.h (struct target_ops) <thread_name>: New field.
(target_thread_name): New macro.
gdb/doc/ChangeLog:
* gdb.texinfo (Thread List Format): Mention thread names.
Diffstat (limited to 'gdb/doc')
-rw-r--r-- | gdb/doc/ChangeLog | 4 | ||||
-rw-r--r-- | gdb/doc/gdb.texinfo | 8 |
2 files changed, 9 insertions, 3 deletions
diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog index 80df9ad..7e747dc 100644 --- a/gdb/doc/ChangeLog +++ b/gdb/doc/ChangeLog @@ -1,3 +1,7 @@ +2015-11-26 Simon Marchi <simon.marchi@ericsson.com> + + * gdb.texinfo (Thread List Format): Mention thread names. + 2015-11-24 Pedro Alves <palves@redhat.com> PR 17539 diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index 1917008..c4d8a18 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -39542,7 +39542,7 @@ the following structure: @smallexample <?xml version="1.0"?> <threads> - <thread id="id" core="0"> + <thread id="id" core="0" name="name"> ... description ... </thread> </threads> @@ -39551,8 +39551,10 @@ the following structure: Each @samp{thread} element must have the @samp{id} attribute that identifies the thread (@pxref{thread-id syntax}). The @samp{core} attribute, if present, specifies which processor core -the thread was last executing on. The content of the of @samp{thread} -element is interpreted as human-readable auxilliary information. +the thread was last executing on. The @samp{name} attribute, if +present, specifies the human-readable name of the thread. The content +of the of @samp{thread} element is interpreted as human-readable +auxiliary information. @node Traceframe Info Format @section Traceframe Info Format |