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

青春壹個敷衍的年華 提交于 2019-12-12 08:12:50

问题


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.


回答1:


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


来源:https://stackoverflow.com/questions/4123021/how-to-create-process-mini-dump-on-crash-without-running-adplus-explicitly-on-wi

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!