manpagez: man pages & more
info gdb
Home | html | info | man
[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

24.9 GDB/MI Thread Commands

The -thread-info Command

Synopsis

 
 -thread-info

No value for GDBN Command

No equivalent.

Example

N.A.

The -thread-list-all-threads Command

Synopsis

 
 -thread-list-all-threads

No value for GDBN Command

The equivalent No value for GDBN command is ‘info threads’.

Example

N.A.

The -thread-list-ids Command

Synopsis

 
 -thread-list-ids

Produces a list of the currently known No value for GDBN thread ids. At the end of the list it also prints the total number of such threads.

No value for GDBN 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.

No value for GDBN Command

The corresponding No value for GDBN command is ‘thread’.

Example

 
(gdb)
-exec-next
^running
(gdb)
*stopped,reason="end-stepping-range",thread-id="2",line="187",
file="../../../devo/gdb/testsuite/gdb.threads/linux-dp.c"
(gdb)
-thread-list-ids
^done,
thread-ids={thread-id="3",thread-id="2",thread-id="1"},
number-of-threads="3"
(gdb)
-thread-select 3
^done,new-thread-id="3",
frame={level="0",func="vprintf",
args=[{name="format",value="0x8048e9c \"%*s%c %d %c\\n\""},
{name="arg",value="0x2"}],file="vprintf.c",line="31"}
(gdb)

© manpagez.com 2000-2024
Individual documents may contain additional copyright information.