【发布时间】:2011-06-24 05:15:01
【问题描述】:
有没有很好的教程来展示如何使用WinDbg?
【问题讨论】:
标签: windbg
有没有很好的教程来展示如何使用WinDbg?
【问题讨论】:
标签: windbg
允许您定义调试器命令的“菜单”,以便轻松访问常用命令,而无需记住简洁的命令名称。不必将所有命令定义放入同一个 cmdtree 文本文件中……您可以将它们分开并加载多个(然后它们会获得自己的窗口)。
您可以在命令行中使用 -c 选项在启动 WinDbg 时自动运行 WinDbg 脚本。
提供了打开 DML(调试器标记语言)模式、加载特定扩展、设置 .NET 异常断点、设置内核标志(例如,在内核调试时您可能需要更改 DbgPrint 掩码以便查看跟踪信息... .ed nt!Kd_DEFAULT_Mask 0xFFFFFFFF),加载cmdtrees等
一个示例脚本:
$$ Include a directory to search for extensions
$$ (point to a source controlled or UNC common directory so that all developers get access)
.extpath+"c:\svn\DevTools\WinDBG\Extensions"
$$ When debugging a driver written with the Windows Driver Framework/KMDF
$$ load this extension that comes from the WinDDK.
!load C:\WinDDK\7600.16385.1\bin\x86\wdfkd.dll
!wdftmffile C:\WinDDK\7600.16385.1\tools\tracing\i386\wdf01009.tmf
$$ load some extensions
.load msec.dll
.load byakugan.dll
.load odbgext.dll
.load sosex
.load psscor4
$$ Make commands that support DML (Debugger Markup Language) use it
.prefer_dml 1
.dml_start
$$ Show NTSTATUS codes in hex by default
.enable_long_status 1
$$ Set default extension
.setdll psscor4
$$ Show all loaded extensions
.chain /D
$$ Load some command trees
.cmdtree c:\svn\DevTools\WinDBG\cmdtree\cmdtree1.txt
.cmdtree c:\svn\DevTools\WinDBG\cmdtree\cmdtree2.txt
$$ Show some help for the extensions
!wdfkd.help
!psscor4.help
.help /D
【讨论】:
[This is a link](http://example.com))语法。