Tuesday, March 20, 2007

Crash Dump.


Create dump files when crash:


1.VS.NET: In debugging mode,select Debug->Save dump as..


2.WinDBG: in debugging mode, in command window, type in: .dump /ma AAA.dmp
The default location is: ..\Debugging Tools for Windows\


3. Dr.Watson: drwtsn32 -p ProcessID.
The default location is: %AllUsersProfile%Application Data\Microsoft\Dr Watson folder.


4. You can even write out your own crash dumps at any time by calling the MiniDumpWriteDump API function from DBGHELP.DLL.

Analysing dump files:


1. VS.NET: Drag and drop .dmp file into VS, and press F5.You'll see the message box pop up reporting the error and, if you have all the appropriate symbols and source, you'll be dropped right on the line where you had the crash. It's that simple!


2.WinDBG: File->Open Crash Dump; In command window, type in: !analyze -v.



No comments: