Debugging with GDB Manual The GNU Source-Level Debugger (769148-001, March 2014)

Example
N.A.
The -thread-list-ids command
Synopsis
-thread-list-ids
Produces a list of the currently known GDB thread ids. At the end of the list it also prints the total
number of such threads.
GDB command
Part of 'info threads' supplies the same information.
Example
No threads present, besides the main process:
(gdb)
-thread-list-ids
^done,thread-ids={},number-of-threads="0"
(gdb)
Several threads:
(gdb)
-thread-list-ids
^done,thread-ids={thread-id="3",thread-id="2",thread-id="1"},
number-of-threads="3"
(gdb)
The -thread-select command
Synopsis
-thread-select threadnum
Make threadnum the current thread. It prints the number of the new current thread, and the
topmost frame for that thread.
GDB command
The corresponding GDB command is 'thread'.
Example
(gdb)
-exec-next
^running
(gdb)
~"0x7f7f0aec"
*stopped,reason="end-stepping-range",thread-id="2",frame=addr="0x00002ca4",func
="printme",args=[name="ip"],file="multithread.c",line="9"
(gdb)
-thread-list-ids
^done,thread-ids=thread-id="2",thread-id="1",number-of-threads="2"
(gdb)
-thread-select 1
^done,new-thread-id="1",frame=level="0 ",addr="0x7ad47d70",func="_lwp_create","
+0x10",args=[],from="/usr/lib/libpthread.1"
(gdb)
GDB/MI tracepoint commands
The tracepoint commands are not yet implemented.
GDB/MI tracepoint commands 271