Help catch AV with WinDbg and ADPlus 7.0

I want to catch a memory access violation in SQL Server Compact Edition as described in http://debuggingblog.com/wp/2009/02/18/memory-access-violation-in-sql-server-compact-editionce/ Recommended configuration:

<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 load the latest debugging tools and watch how Microsoft rewrites the adplus tool into managed code and changes the syntax of the configuration file. I overwrite the configuration file as follows:

  <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 the error "Could not find an exception with code: clr; av". If I understood correctly, he did not download the sos extension, but I can’t find the section and syntax I need to use to load it.

adplus_old.vbs - for some reason the process did not start in Windows 7. WinDBG 6.12.0002.633 X86 ADPlus Engine version: 7.01.002 02/27/2009

Perhaps someone has a working example of a debugging configuration of a .NET application with the latest adplus.exe?

+4
source share
2 answers

This should download SOS.dll for you (if you are using v1 framework, this is <cmd>.load clr10\sos.dll</cmd> ):

  <ADPlus Version="2"> <precommands> <cmd>.loadby sos mscorwks</cmd> </precommands> <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> 
+1
source

According to this documentation for ADPlus: the exception code must be the hexadecimal value of the error code. For example, if you want to capture AV - you need 0xC0000005

Below is a link on clearing error dumps for the CLR

0
source

Source: https://habr.com/ru/post/1312065/


All Articles