Latest available version: IDA and decompilers v8.4.240320sp1 see all releases
Hex-Rays logo State-of-the-art binary code analysis tools
email icon

Inspect/Manipulate threads of debugged process. More...

Functions

int idaapi get_thread_qty (void)
 Get number of threads. More...
 
thid_t idaapi getn_thread (int n)
 Get the ID of a thread. More...
 
thid_t idaapi get_current_thread (void)
 Get current thread ID. More...
 
const char *idaapi getn_thread_name (int n)
 Get the NAME of a thread. More...
 
bool idaapi select_thread (thid_t tid)
 Select the given thread as the current debugged thread. More...
 
bool idaapi request_select_thread (thid_t tid)
 Post a select_thread() request.
 
int idaapi suspend_thread (thid_t tid)
 Suspend thread. More...
 
int idaapi request_suspend_thread (thid_t tid)
 Post a suspend_thread() request.
 
int idaapi resume_thread (thid_t tid)
 Resume thread. More...
 
int idaapi request_resume_thread (thid_t tid)
 Post a resume_thread() request.
 

Detailed Description

Inspect/Manipulate threads of debugged process.

Function Documentation

◆ get_thread_qty()

int idaapi get_thread_qty ( void  )
inline

Get number of threads.

TypeSynchronous function
Notificationnone (synchronous function)

◆ getn_thread()

thid_t idaapi getn_thread ( int  n)
inline

Get the ID of a thread.

TypeSynchronous function
Notificationnone (synchronous function)
Parameters
nnumber of thread, is in range 0..get_thread_qty()-1
Returns
NO_THREAD if the thread doesn't exist.

◆ get_current_thread()

thid_t idaapi get_current_thread ( void  )
inline

Get current thread ID.

TypeSynchronous function
Notificationnone (synchronous function)

◆ getn_thread_name()

const char *idaapi getn_thread_name ( int  n)
inline

Get the NAME of a thread.

TypeSynchronous function
Notificationnone (synchronous function)
Parameters
nnumber of thread, is in range 0..get_thread_qty()-1 or -1 for the current thread
Returns
thread name or nullptr if the thread doesn't exist.

◆ select_thread()

bool idaapi select_thread ( thid_t  tid)
inline

Select the given thread as the current debugged thread.

All thread related execution functions will work on this thread. The process must be suspended to select a new thread.

TypeSynchronous function - available as request
Notificationnone (synchronous function)
Parameters
tidID of the thread to select
Returns
false if the thread doesn't exist.

◆ suspend_thread()

int idaapi suspend_thread ( thid_t  tid)
inline

Suspend thread.

Suspending a thread may deadlock the whole application if the suspended was owning some synchronization objects.

TypeSynchronous function - available as request
Notificationnone (synchronous function)
Parameters
tidthread id
Return values
-1network error
0failed
1ok

◆ resume_thread()

int idaapi resume_thread ( thid_t  tid)
inline

Resume thread.

TypeSynchronous function - available as request
Notificationnone (synchronous function)
Parameters
tidthread id
Return values
-1network error
0failed
1ok