Debug Command 17 - Get Thread Status Command
Parameters
Pid
If Tid is zero, the status of the debuggee thread most recently scheduled to run will be returned.
Returns
Value
Thread Status buffer format is as follows:
typedef struct _TStat { BYTE DbgState; BYTE TState; USHORT TPriority; } TStat
DbgState in the Thread Status buffer contains information about the current state of debugging, and will have one of the following values upon return:
TState in the Thread Status buffer contains information about the scheduling state of the thread, and will have one of the following values upon return:
TPriority in the Thread Status buffer contains the thread's base scheduling priority. This priority will be expressed as scheduling class and delta values upon return.
The Value field will be filled in with the Thread ID of the "next" thread to look at when traversing threads.
By repeatedly calling the DBG_C_ThrdStat command, replacing the Tid with the last returned Value until a thread ID is repeated, all threads in the process can be traversed. When used in this way, the Tids returned by the DBG_C_ThrdStat command form a loop of the debuggee's thread IDs.