mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-19 17:18:24 +08:00
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.
This commit is contained in:
@ -1820,8 +1820,8 @@ extern char *normal_pid_to_str (ptid_t ptid);
|
||||
#define target_extra_thread_info(TP) \
|
||||
(current_target.to_extra_thread_info (¤t_target, TP))
|
||||
|
||||
/* Return the thread's name. A NULL result means that the target
|
||||
could not determine this thread's name. */
|
||||
/* Return the thread's name, or NULL if the target is unable to determine it.
|
||||
The returned value must not be freed by the caller. */
|
||||
|
||||
extern const char *target_thread_name (struct thread_info *);
|
||||
|
||||
|
Reference in New Issue
Block a user