Using WinDbg to inspect native dump files

Just a very short instruction on how to inspect native dump files with WinDbg:

  1. Get and install and then start WinDbg
  2. File – Open Crash Dump
  3. ~*kb
    Lists all the threads and their call stacks.
  4. !locks
    Will show you the critical sections. LockCount – RecursionCount – 1 = the amount of times the lock has been acquired.
    So if you have several locks that are taken you can check the call stacks and see where you have the deadlock.
  5. !runaway
    Will show you time spent in each thread.

I find it useful to get a text dump of all the call stacks which I can search in my text editor, rather than clicking around using Visual studio when searching for a deadlock.

And sometimes !locks even saves me the search.

But if I want to inspect variables I load the dump into visual studio.

Common WinDbg commands here.

Leave a Reply