mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-26 01:07:52 +00:00
Add $_gthread convenience variable
This commit adds a new $_gthread convenience variable, that is like $_thread, but holds the current thread's global thread id. gdb/ChangeLog: 2016-01-13 Pedro Alves <palves@redhat.com> * NEWS: Mention $_gthread. * gdbthread.h (struct thread_info) <global_num>: Mention $_gthread. * thread.c (thread_num_make_value_helper): New function. (thread_id_make_value): Delete. (thread_id_per_inf_num_make_value, global_thread_id_make_value): New. (thread_funcs): Adjust. (gthread_funcs): New. (_initialize_thread): Register $_gthread variable. gdb/testsuite/ChangeLog: 2016-01-13 Pedro Alves <palves@redhat.com> * gdb.base/default.exp: Expect $_gthread as well. * gdb.multi/tids.exp: Test $_gthread. * gdb.threads/thread-specific.exp: Test $_gthread. gdb/doc/ChangeLog: 2016-01-13 Pedro Alves <palves@redhat.com> * gdb.texinfo (Threads): Document the $_gthread convenience variable. (Convenience Vars): Likewise.
This commit is contained in:
@@ -217,7 +217,8 @@ struct thread_info
|
||||
thread has its own unique global ID. */
|
||||
|
||||
/* The thread's global GDB thread number. This is exposed to MI,
|
||||
Python/Scheme and visible with "info threads -gid". */
|
||||
Python/Scheme, visible with "info threads -gid", and is also what
|
||||
the $_gthread convenience variable is bound to. */
|
||||
int global_num;
|
||||
|
||||
/* The per-inferior thread number. This is unique in the inferior
|
||||
|
||||
Reference in New Issue
Block a user