.NET Framework Bookmark and Share   
 index > Building Development and Diagnostic Tools for .Net > ICorDebug and post-mortem debugging
 

ICorDebug and post-mortem debugging

Hello all,

I am writing simple post-mortem interop debugger that will save dumps and get the mixed stack of crashed process. The only valid way to do I see to do this is to use ICorDebug. Well, I wrote (unmanaged) app that gets ICorDebug interface, attaches intelf to running process, registered the application under AeDebug key... and I get only unmanaged events via ICorDebugUnmanagedCallback::DebugEvent. I do properly respond to inband events via the separate thread; the last event I see is out-of-band THREAD_EXIT_DEBUG_EVENT, and ICorDebugManagedCallback events were not called.
In the same time, when I attach to the live process, I get the full sequence of events.
My questions are:
- are there any hints :), samples ?
- where am I wrong in development the debugger? Do I miss some vital steps?
- I suspect that thread that exited was a .net helper thread... if so, how can I get this thread out of exiting?

Thanks for all advices!

All Replies

  • Friday, August 14, 2009 8:09 AMeryangMSFT, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    Hi,

    ICorDebug is for debugging managed code, if your target is an unmanaged app, we can just creates a native app that does a native attach and call MiniDumpWriteDump (http://msdn.microsoft.com/en-us/library/ms680360(VS.85).aspx ), MSWD is a standard way to collect a dump.

    Thanks,

    Eric


    Please remember to mark helpful replies as answers and unmark them if they provide no help.
dmitry pervushin

Dmitry,

Do you have a requirement to builda new tool for post-mortem analysis of crashes from native and/or managed code, or are you okay reusing existing tools? Understanding this will help us scope our answers to this question.

Thanks,
Jon

Jon Langdon

You can use google to search for other answers

Custom Search

More Threads

• Calling back into .Net code from JITCompilationStarted?
• BUG FIX: MDBG/GUI: launching a file whose path includes spaces.
• System wide CLR Global Exception Monitoring
• Will there be a new CLR in 3.5?
• Blue C# Language by mike stall
• Profiler: Get Main entry point
• Profiler get string argument value - GetStringLayout?
• How to get a full stacktrace from a crashed mixed mode exe/dll ?
• IronPython output is missing
• MDbgEngine.Options.SymbolPath and SymServer