Re: memorydump in vista



"Andre Kaufmann" <andre.kaufmann_re_move_@xxxxxxxxxxx> wrote in message news:%23hUfP24fHHA.588@xxxxxxxxxxxxxxxxxxxxxxx
Willy Denoyette [MVP] wrote:
"Dirk Reske" <_Dirk.Reske@xxxxxxx> wrote in message news:ObuM5YzfHHA.596@xxxxxxxxxxxxxxxxxxxxxxx
Hello,

In Windows Vista I can make a memory dump of an application in the taskmanager.
Is there an api call to create a memory dump, so that I can do that out of my app?

thanks!


No, there is no such API, also, it would make little or no sense to dump

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.

your own application. All you can do is attach a debugger like cdb or windbg to the running process to produce a dump.

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.



.



Relevant Pages

  • Re: memorydump in vista
    ... Is there an api call to create a memory dump, so that I can do that out of my app? ... I've implemented memory dump support in all our applications, ... 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. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Intermittent freezeups continue unabated
    ... I went into the settings and it was set for "small memory dump." ... If you think the cpu would be next in line to ... > "Tom Richards" wrote in message ... >> There are no minidumps. ...
    (microsoft.public.windowsxp.help_and_support)
  • Re: Intermittent freezeups continue unabated
    ... I went into the settings and it was set for "small memory dump." ... If you think the cpu would be next in line to ... > "Tom Richards" wrote in message ... >> There are no minidumps. ...
    (microsoft.public.windowsxp.hardware)
  • Re: Intermittent freezeups continue unabated
    ... I went into the settings and it was set for "small memory dump." ... If you think the cpu would be next in line to ... > "Tom Richards" wrote in message ... >> There are no minidumps. ...
    (microsoft.public.windowsxp.general)
  • Re: Intermittent freezeups continue unabated
    ... If this was set to something other than 'small memory dump' wait ... Microsoft Video Driver OCA Triage ... "Tom Richards" wrote in message ... > There are no minidumps. ...
    (microsoft.public.windowsxp.help_and_support)