Boris
Boris

Reputation: 1457

analyzing the crash dump with __except

Suppose I have the following code

main()
{

   __try 
  {

   //---> SEH EXCEPTION HAS HAPPENED HERE

  }
   __finally
  {

   //---> CRASH DUMP WAS TAKEN HERE

  }

}

The crash dump was taken at the "--->" marked place. Can I know from userdump what was the original exception that brought us there. I cannot find any info in stack trace (seems just like normal execution without exception handler)

UPD: Sorry guys seems like the exception wasn't in the this thread, otherwise finally handler would be clearly called from __except_handler during the unwind phase. Need to close

Upvotes: 0

Views: 295

Answers (2)

Hans Passant
Hans Passant

Reputation: 941455

You are just doing it wrong. The crash dump should be made in the __except filter. Now .excr and !analyze will work just fine in the debugger.

Upvotes: 1

EdChum
EdChum

Reputation: 394041

Use WinDbg and follow the details on this blog post: http://blogs.msdn.com/b/slavao/archive/2005/01/30/363428.aspx WinDbg can be downloaded from here: http://msdn.microsoft.com/en-us/windows/hardware/gg463009

Upvotes: 1

Related Questions