IDA SDK

- Main Page
- Header Files
- Classes
- Modules

Functions
Threads
Debugger functions

## Detailed Description

Inspect/Manipulate threads of debugged process.

## 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...
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.

## Function Documentation

int idaapi get_thread_qty | ( | void |  | ) |
| inline

Get number of threads.

Type | Synchronous function
Notification | none (synchronous function)

thid_t idaapi getn_thread | ( | int | n | ) |
| inline

Get the ID of a thread.

Type | Synchronous function
Notification | none (synchronous function)

Parameters

  n | number of thread, is in range 0..get_thread_qty()-1

Returns
  NO_THREAD if the thread doesn't exist.

thid_t idaapi get_current_thread | ( | void |  | ) |
| inline

Get current thread ID.

Type | Synchronous function
Notification | none (synchronous function)

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.

Type | Synchronous function - available as request
Notification | none (synchronous function)

Parameters

  tid | ID of the thread to select

Returns
  false if the thread doesn't exist.

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.

Type | Synchronous function - available as request
Notification | none (synchronous function)

Parameters

  tid | thread id

Return values

  -1 | network error
  0 | failed
  1 | ok

int idaapi resume_thread | ( | thid_t | tid | ) |
| inline

Resume thread.

Type | Synchronous function - available as request
Notification | none (synchronous function)

Parameters

  tid | thread id

Return values

  -1 | network error
  0 | failed
  1 | ok