Windbg学习 (0x000a) 命令-进程/线程控制

.tlist

-v 显示所有进程详细信息

-c 显示当前 进程信息

!dml_proc

dml形式显示 当前进程信息

!peb

显示当前进程环境

!teb

显示当前线程环境

!tls

tls <slot> [teb]
slot: -1 to dump all allocated slots
{0-0n1088} to dump specific slot
teb: <empty> for current thread
0 for all threads in this process
<teb address> (not threadid) to dump for specific thread.

.ttime

当前线程时间使用情况

!runaway

[Flags: 0 | 1 | 2] 显示每个线程消耗的时间,用于快速的查找 CPU 时间消耗最多的线程

0 用户态时间

1 内核态时间

2 自线程创建起的时间间隔

!gle

!gle         显示当前线程的最后错误

!gle -all    显示所有线程的最后错误 

!error  

!error ErrValue      解析错误信息

!error ErrValue 1   将错误值作为 NTSTATUS 代码

~

线程控制:

~ 显示所有线程

~* <command> 在所有线程上执行命令 command    例如 ~* k 打印所有线程堆栈,不输入command 则显示线程信息

~. <command> 当前线程 类似 ~* 

~# <command> 引发当前调试事件的线程

~ [tid] <command> 

~[tid] f 冻结线程

~[tid] u  解除冻结线程

~[tid] n  挂起线程

~[tid] m 恢复线程

~[tid] e <commandstring>  在某个线程上执行commandstring

  如 ~0 e r;k;在0号线程上 显示寄存器 以及打印调用栈

原文地址:https://www.cnblogs.com/ywnwa417/p/5678317.html