Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create process mini dump on crash without running AdPlus explicitly on Windows 7?

I have a .NET process that sometimes fails with AccessViolationException in the native code of some 3rd party library.

I wish to have full memory mini dump when that happens. I have read this page - http://support.microsoft.com/kb/931673, the section "To collect user-mode dumps" and configured the registry as the article explains. However, when the crash occurrs, a really small report is created - no *.mdmp file is in sight.

Now, I know how to run the process from within ADPLus or how to make it attach to an already running process. But it requires running ADPLus explicitly.

I was wondering how can I configure windows to run ADPlus automatically, each time I start the problematic process no matter how it is started - from msbuild, double clicked, from console script, etc...

Meaning, when running aaaa.exe is replaced by running ADPlus with certain flags which spawns aaaa.exe with the respective command line options.

I know there are image execution flags in windows, which do that, but I do not know the details.

Thanks.

EDIT1

It is important to preserve the command line parameters, so if aaa.exe is run with a flag, then, of course, the same should be true when running aaa.exe from the debugger.

like image 250
mark Avatar asked Nov 06 '22 06:11

mark


1 Answers

Never mind, found it.

  1. Create a key named after the process (like aaa.exe) under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options
  2. Add a string value Debugger with the value ADPlus -crash -mss YourSymbolCacheFolderPath -MiniOnSecond -quiet -o YourDumpFolderPath -sc
like image 140
mark Avatar answered Nov 09 '22 11:11

mark