summaryrefslogtreecommitdiff
path: root/gdb/gdbthread.h
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2011-01-19 17:21:36 +0000
committerTom Tromey <tromey@redhat.com>2011-01-19 17:21:36 +0000
commit8e89a9a6dbd26afab1a3d8aa6bd36da38755ea04 (patch)
tree3cfe8d9530bc76a9ed1bd1e33f2b038df20e7c39 /gdb/gdbthread.h
parenta76d6701cc58269fa7ef5e3c388b3bc697f4d9a7 (diff)
downloadgdb-8e89a9a6dbd26afab1a3d8aa6bd36da38755ea04.tar.gz
gdb
PR mi/8618: * thread.c (free_thread): Free 'name'. (print_thread_info): Emit thread name. Change CLI output. (thread_name_command): New function. (do_captured_thread_select): Emit newline. (_initialize_thread): Register 'thread name' command. * target.h (struct target_ops) <to_thread_name>: New field. (target_thread_name): New macro. * target.c (update_current_target): Handle to_thread_name. * python/py-infthread.c (thpy_get_name): New function. (thpy_set_name): Likewise. (thread_object_getset): Add "name". * linux-nat.c (linux_nat_thread_name): New function. (linux_nat_add_target): Set to_thread_name. * gdbthread.h (struct thread_info) <name>: New field. gdb/doc * gdb.texinfo (Threads): Document thread name output and `thread name' command. (Threads In Python): Document Thread.name attribute. (GDB/MI Thread Commands): Document thread attributes. gdb/testsuite * gdb.python/py-infthread.exp: Add thread tests.
Diffstat (limited to 'gdb/gdbthread.h')
-rw-r--r--gdb/gdbthread.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/gdb/gdbthread.h b/gdb/gdbthread.h
index 9e122f691bf..ddb7b0f66cd 100644
--- a/gdb/gdbthread.h
+++ b/gdb/gdbthread.h
@@ -125,6 +125,10 @@ struct thread_info
kernel thread id, etc. */
int num; /* Convenient handle (GDB thread id) */
+ /* The name of the thread, as specified by the user. This is NULL
+ if the thread does not have a user-given name. */
+ char *name;
+
/* Non-zero means the thread is executing. Note: this is different
from saying that there is an active target and we are stopped at
a breakpoint, for instance. This is a real indicator whether the