aboutsummaryrefslogtreecommitdiff
path: root/gdb/doc
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2016-01-13 10:56:09 +0000
committerPedro Alves <palves@redhat.com>2016-01-13 11:02:05 +0000
commitc84f6bbfe50ff13928360d3cc349d7c553867ce6 (patch)
tree70623a4c2386a9dd3a89a281fd087dc029aa7912 /gdb/doc
parent22a0232400ea09c57ab70d97cffc1f25e6320da7 (diff)
downloadgdb-c84f6bbfe50ff13928360d3cc349d7c553867ce6.zip
gdb-c84f6bbfe50ff13928360d3cc349d7c553867ce6.tar.gz
gdb-c84f6bbfe50ff13928360d3cc349d7c553867ce6.tar.bz2
Implement "info threads -gid"
This commit makes global thread IDs optionaly visible in "info threads", with the new "-gid" switch: (gdb) info threads -gid Id GId Target Id Frame 1.1 1 Thread 0x7ffff7fc2740 (LWP 6022) "threads" (running) 1.2 3 Thread 0x7ffff77c0700 (LWP 6028) "threads" (running) 1.3 4 Thread 0x7ffff7fc2740 (LWP 6032) "threads" (running) 2.1 2 Thread 0x7ffff7fc1700 (LWP 6037) "threads" (running) 2.2 5 Thread 0x7ffff77c0700 (LWP 6038) "threads" (running) * 2.3 6 Thread 0x7ffff7fc2740 (LWP 6039) "threads" (running) (gdb) info threads Id Target Id Frame 1.1 Thread 0x7ffff7fc2740 (LWP 6022) "threads" (running) 1.2 Thread 0x7ffff77c0700 (LWP 6028) "threads" (running) 1.3 Thread 0x7ffff7fc2740 (LWP 6032) "threads" (running) 2.1 Thread 0x7ffff7fc1700 (LWP 6037) "threads" (running) 2.2 Thread 0x7ffff77c0700 (LWP 6038) "threads" (running) * 2.3 Thread 0x7ffff7fc2740 (LWP 6039) "threads" (running) No regressions on x86_64 Fedora 20. gdb/ChangeLog: 2016-01-13 Pedro Alves <palves@redhat.com> * NEWS: Mention "info threads -gid". * gdbthread.h (struct thread_info) <global_num>: Mention "info threads -gid". * thread.c (info_threads_command): Handle "-gid". (_initialize_thread): Adjust "info threads" help string to mention -gid. gdb/testsuite/ChangeLog: 2016-01-13 Pedro Alves <palves@redhat.com> * gdb.multi/tids.exp: Test "info threads -gid". gdb/doc/ChangeLog: 2016-01-13 Pedro Alves <palves@redhat.com> * gdb.texinfo (Threads): Document "info threads -gid".
Diffstat (limited to 'gdb/doc')
-rw-r--r--gdb/doc/ChangeLog4
-rw-r--r--gdb/doc/gdb.texinfo19
2 files changed, 17 insertions, 6 deletions
diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog
index 65f8ed9..d723276 100644
--- a/gdb/doc/ChangeLog
+++ b/gdb/doc/ChangeLog
@@ -1,5 +1,9 @@
2016-01-13 Pedro Alves <palves@redhat.com>
+ * gdb.texinfo (Threads): Document "info threads -gid".
+
+2016-01-13 Pedro Alves <palves@redhat.com>
+
* python.texi (Breakpoints In Python) <Breakpoint.thread>: Add
anchor.
(Threads In Python): Document new InferiorThread.global_num
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index 786556e..654efa4 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -2959,6 +2959,10 @@ threads that you want to display using the thread ID list syntax
the per-inferior thread number assigned by @value{GDBN}
@item
+the global thread number assigned by @value{GDBN}, if the @samp{-gid}
+option was specified
+
+@item
the target system's thread identifier (@var{systag})
@item
@@ -2989,15 +2993,18 @@ For example,
If you're debugging multiple inferiors, @value{GDBN} displays thread
IDs using the qualified @var{inferior-num}.@var{thread-num} format.
-Otherwise, only @var{thread-num} is shown:
+Otherwise, only @var{thread-num} is shown.
+
+If you specify the @samp{-gid} option, @value{GDBN} displays a column
+indicating each thread's global thread ID:
@smallexample
(@value{GDBP}) info threads
- Id Target Id Frame
- 1.1 process 35 thread 13 main (argc=1, argv=0x7ffffff8)
- 1.2 process 35 thread 23 0x34e5 in sigpause ()
- 1.3 process 35 thread 27 0x34e5 in sigpause ()
-* 2.1 process 65 thread 1 main (argc=1, argv=0x7ffffff8)
+ Id GId Target Id Frame
+ 1.1 1 process 35 thread 13 main (argc=1, argv=0x7ffffff8)
+ 1.2 3 process 35 thread 23 0x34e5 in sigpause ()
+ 1.3 4 process 35 thread 27 0x34e5 in sigpause ()
+* 2.1 2 process 65 thread 1 main (argc=1, argv=0x7ffffff8)
@end smallexample
On Solaris, you can display more information about user threads with a