使用 WinDbg 和 ADPlus 7.0 帮助捕获 AV
我想捕获 SQL Server Compact Edition 中的内存访问冲突,如下所述 http://debuggingblog .com/wp/2009/02/18/memory-access-violation-in-sql-server-compact-editionce/ 建议的配置是:
<ADPlus>
<Settings>
<RunMode>CRASH</RunMode>
<Option>Quiet</Option>
<ProcessName>MyApp.exe</ProcessName>
</Settings>
<Exceptions>
<Option>NoDumpOnFirstChance</Option>
<Config>
<Code>clr;av</Code><!–to get the full dump on clr access violation–>
<Actions1>FullDump</Actions1>
<ReturnAction1>gn</ReturnAction1>
</Config>
</Exceptions>
</ADPlus>
我下载最新的调试工具并观察 Microsoft 将 adplus 工具重写为托管代码并更改配置文件的语法。 我像这样重写配置文件:
<ADPlus Version="2">
<Settings>
<RunMode>Crash</RunMode>
<Option>Quiet</Option>
<Option>NoDumpOnFirst</Option>
<Sympath>c:\symbols\</Sympath>
<OutputDir>c:\work\output\</OutputDir>
<ProcessName>c:\work\app\output\MyApp.exe</ProcessName>
</Settings>
<Exceptions><!--to get the full dump on clr access violation-->
<Exception Code="clr;av">
<Actions1>FullDump</Actions1>
<ReturnAction1>gn</ReturnAction1>
</Exception>
</Exceptions>
</ADPlus>
并且收到错误“无法通过代码找到异常:clr;av”。如果我理解正确,它没有加载 sos 扩展,但我找不到应该用来加载它的正确部分和语法。
adplus_old.vbs - 由于某些原因没有在 Windows 7 上启动进程。 WinDBG 6.12.0002.633 X86 ADPlus 引擎版本:7.01.002 02/27/2009
也许有人有一个使用最新的 adplus.exe 调试 .NET 应用程序的配置示例?
I want to catch Memory Access Violation in SQL Server Compact Edition like this described at
http://debuggingblog.com/wp/2009/02/18/memory-access-violation-in-sql-server-compact-editionce/
The suggested config is:
<ADPlus>
<Settings>
<RunMode>CRASH</RunMode>
<Option>Quiet</Option>
<ProcessName>MyApp.exe</ProcessName>
</Settings>
<Exceptions>
<Option>NoDumpOnFirstChance</Option>
<Config>
<Code>clr;av</Code><!–to get the full dump on clr access violation–>
<Actions1>FullDump</Actions1>
<ReturnAction1>gn</ReturnAction1>
</Config>
</Exceptions>
</ADPlus>
I download latest Debugging Tools and observe what Microsoft rewrite adplus tool into managed code and change syntax of config File.
I rewrite config file like this:
<ADPlus Version="2">
<Settings>
<RunMode>Crash</RunMode>
<Option>Quiet</Option>
<Option>NoDumpOnFirst</Option>
<Sympath>c:\symbols\</Sympath>
<OutputDir>c:\work\output\</OutputDir>
<ProcessName>c:\work\app\output\MyApp.exe</ProcessName>
</Settings>
<Exceptions><!--to get the full dump on clr access violation-->
<Exception Code="clr;av">
<Actions1>FullDump</Actions1>
<ReturnAction1>gn</ReturnAction1>
</Exception>
</Exceptions>
</ADPlus>
And I get error "Couldn't find exception with code: clr;av". If I understand right It didn't load sos extension, but I can't find the right section and syntax that I should use to load it.
adplus_old.vbs - for some reasons didn't launch process on Windows 7.
WinDBG 6.12.0002.633 X86
ADPlus Engine Version: 7.01.002 02/27/2009
Maybe someone has a working example of config of debugging .NET app with latest adplus.exe?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这应该为您加载 SOS.dll(如果您使用的是框架 v1,则为
.load clr10\sos.dll
):This should load SOS.dll for you (if you are using framework v1, the is
<cmd>.load clr10\sos.dll</cmd>
):根据ADPlus的此文档:异常代码应该是错误代码的十六进制值。例如,如果您想捕获 AV - 您需要 0xC0000005
这是 关于捕获 CLR 错误转储的链接
According to this documentation for ADPlus: exception code should be hex value of error code. For instance, if you want to capture AV - you need 0xC0000005
Here is the link about capturing error dumps for CLR