ida获取线程ID相关函数

原链接:https://hex-rays.com/products/ida/support/sdkdoc/group__dbg__funcs__threads.html

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. 

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 NULL 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
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值