generating dmp files from an inproc com dll runnin

2019-08-23 01:59发布

问题:

I am writing an inproc com dll that runs in the dllhost.exe surrogate, but I see an issue debugging it.

in exe's that I've written, I have a top level exception handler that creates a .dmp file i can load in windbg and then crashes, and I'm unsure of how to do this from dllhost. Is there another way to generate stack dumps from dllhost.exe on a crash? i've seen this page (http://support.microsoft.com/kb/910904), but it seems to involve the component services program. Is there some registry setting for this? Because it's something that will be installed on other computers.

Thanks

回答1:

Rather than having the process dump itself, you can set up a just in time debugger to run when the process crashes. For older versions of Windows, Dr.Watson is a good one that can automatically generate dumps for crashing applications: http://en.wikipedia.org/wiki/Dr.Watson(debugger) I believe Windows Vista and later versions have replaced Dr.Watson with Windows Error Reporting (http://support.microsoft.com/kb/931673)

A simpler tool to use is Sysinternals procdump (use the -e option to dump on unhandled exceptions): http://technet.microsoft.com/en-us/sysinternals/dd996900



标签: c++ windows com