Re: JIT debugging - How to get the managed exception details?
- From: "Oleg Starodumov" <com-dot-debuginfo-at-oleg>
- Date: Thu, 28 Sep 2006 10:10:04 +0300
!analyze -v is telling that the exception is 80000003 - break
instruction exception
Which is not what I expected - any idea why?
!sos.CurrenExceptionName is telling that: "This is not a managed
exception or not in KERNEL32!RaiseException"
How could I get the details of the ApplicationException?
When WinDbg have attached via .NET JIT debugging and with
such command line parameters, it will be in the context of the "break" thread,
not in the context of the thread that raised the exception. Therefore
you need to switch to the thread that raised the exception.
If the exception happens at application startup, it usually will be thread 0,
so you should do
~0 s
to switch to that thread. (Otherwise, print call stacks of all threads to see which
one raised the exception). (Alternatve approach is to add -pv option to WinDbg
command line - it will cause non-invasive attach and thread 0 will usually be
the current one)
After you have switched to the right thread, you can use SOS e.g. to
print the managed call stack (!clrstack, etc.).
If you want to use !currentexceptionname, you need one more step -
lookup the exception context on the thread stack and use .cxr command
to switch to it. There are two most typical approaches to it:
http://blogs.msdn.com/jmstall/archive/2005/01/18/355697.aspx
http://www.debuginfo.com/articles/easywindbg2.html#crashdumpanalysis
(in the second link, see at the end of the topic)
--
Oleg
[VC++ MVP http://www.debuginfo.com/]
.
- Follow-Ups:
- References:
- Prev by Date: System.ExecutionEngineException
- Next by Date: Need utility to compare !DumphHeap results from two dump files
- Previous by thread: JIT debugging - How to get the managed exception details?
- Next by thread: Re: JIT debugging - How to get the managed exception details?
- Index(es):
Relevant Pages
|