CTF-All-In-One/doc/2.3.4_windbg.md
2018-08-05 17:43:10 +08:00

58 lines
1.7 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 2.3.4 WinDbg
- [快捷键](#快捷键)
- [命令](#命令)
- [参考资料](#参考资料)
## 快捷键
- F10单步步过
- F11单步步入
- Shift+F11跳出当前函数
## 命令
- 调试
- `t`:单步步入
- `p`:单步步过
- 执行
- `g [addr|func]`:执行到指定位置
- `gh [addr|func]`:执行到指定位置,遇到异常时中断
- `gn [addr|func]`:执行到指定位置,遇到异常时忽略
- 断点
- `bl`:列出已设置的断点
- `be [ID]`:激活断点
- `bd [ID]`:禁用断点
- `bc [ID]`:清除断点
- `bp [addr|func]`:设置断点
- 数据显示
- `d [addr]`:显示内存数据
- `db [addr]`:按字节模式显示
- `dd [addr]`:按双字模式显示
- `dD`:按双精度浮点数显示
- `da`:按 ASCII 显示
- `du`:按 Unicode 显示
- `ds`:按字符串显示
- `dt`:套用已知的数据结构模板显示
- 数据编辑
- `e [addr] [data]`:修改任意地址内存的值
- `eb [addr] [data]`:以字节写入
- `ed [addr] [data]`:以双字写入
- `ea [addr] [data]`:以 ASCII 字符写入
- `eu [addr] [data]`:以 Unicode 字符写入
- 栈帧显示
- `k [x]`由栈顶开始列出当前线程中的栈帧x 为需要回溯的栈帧数
- `kb [x]`:可以额外显示 3 个传递给函数的参数
- 寄存器显示
- `r [reg]`:显示指定寄存器的值
- 模块显示
- `lm`:列出当前已经读入的所有模块
- 反汇编
- `u`:反汇编当前指令后的几条指令
- `u [start]`:从指定位置开始反汇编
- `u [start] [end]`:反汇编指定地址区间
## 参考资料
- <https://docs.microsoft.com/en-us/windows-hardware/drivers/debugger/>