Sunday, August 28, 2011

Some Windbg commands for stack trace

I received a crash dump on Windows for one of the applications. To reproduce the stack trace I used some useful commands below:
1) "C:\Program Files (x86)\Debugging Tools for Windows (x86)\symchk.exe" /r c:\windows\system32 /s SRV*c:\Windows\Symbols*http://msdl.microsoft.com/download/symbols => symchk checks which Windows .pdb is not present under system32 and copies them to the location c:\Windows\Symbols. This command is not required unless you requires to check stack trace related to Windows.
1) .symopt +0x40 => I wasn't having the exact matching .pdb of the respective DLL's. So, this command forces to use the pdb which I have provided.
2) !analyze -v => I makes the output verbose. Display full message along-with stack trace. For e.g. which pdb isn't found.

Apart from these steps provide the location of .pdb in Windbg. In case of multiple paths use `;`.

No comments: