系统状态
The double vertical bar (
||) command prints status for the specified system or for all systems that you are currently debugging.
|| [ |* | .| # |系统号]
The ||s command sets or displays the current system number.
||System s 在WINDBG 等调试器中,进程和线程的语法分为内核模式和用户模式两种。我先来总结一下用户态模式进程相关
The pipe (
|) command displays status for the specified process, or for all processes that you are currently debugging.| [ |*|.|#|进程号]
The |s command sets or displays the current process number.
|Process s
线程相关
~ [* | .|#|thread NO.] 显示线程
The ~e command executes one or more commands for a specific thread or for all threads in the target process.
~Thread e commandstring
在指定的线程上执行指定的命令这个语法,在有时我们会省略e,如显示2线程的堆栈。~2 K
冻结和解冻结线程。
The ~f command freezes the given thread, causing it to stop and wait until it is unfrozen.
~Thread f
The ~u command unfreezes the specified thread.
~Thread u
挂起和恢复线程的执行
The ~n command suspends execution of the specified thread.
~Thread n
The ~m command resumes execution of the specified thread.
~Thread m
设置当前线程
The ~s command sets or displays the current thread number.
~Thread s
这个命令在内核模式中表示的是设置当前的处理器。
有了上面的调试命令,只要我们善加利用,就可以控制调试目标的运行,进而达到排错查错的目的。