Andre Kaufmann said:
IMHO I think it makes sense, at least for native applications. I've implemented memory
dump support in all our applications, written in C++.
As soon as the application crashes it will be written to a predefined location and sent to
us (which by default the error reporting service would do anyway - but would send it to a
Microsoft database.) or if an application go instable (deadlock etc.) I'm able to write a
memory dump on demand an analyze the problem on my developer machine.
Advantages:
a) Don't need to reproduce a problem on my developer machine
b) I can evaluate bugs much faster, than I would be able to do with
Agreed, In case of a crash, that is from an unhandled exception handler, however, I was
talking about simply calling Dbghelp.dll API's from a running process.
I'm not experienced that much in creating memory dumps for managed applications (we
haven't that much of them yet). AFAIK memory dumps can be used with manages applications
too, but a full dump is needed for debugging managed applications, though IIRC there are
some "hacks /tricks" so that mini dumps will work too.
Yep, you can produce Minidumps from managed applications just like you woul do from
unmanaged code, basically what you need to do is register your own "unhandled exception"
filter and call MiniDumpWriteDump from that filter. Of course you need to make sure no one
else (sa a third party component) overwrites your filter, and make sure you redistribute the
dbghelp.dll version that comes with the (preferably) latest version of the debugger tools.
Be aware that, managed code minidumps do not offer most features of the sos.dll debugger
extention, this requires a full dump, which easely contributes in a dumpfile of ~60MB or
more.
Note that,while analysis of a "native code" minidump is just a snap ;-), post-mortem
analysis of a "JITted code" minidump can be a daunting task, even for an expert.
Willy.