How can I configure windows to generate a core dump from an application?

前端 未结 6 2005
借酒劲吻你
借酒劲吻你 2020-12-13 10:17

How can I configure windows to generate a core dump from an application?

I\'m using Win xp, and the application is build with Visual Studio 2003.

相关标签:
6条回答
  • 2020-12-13 10:49

    Microsoft has a free tool called Userdump.exe which will do this.

    It's pretty simple to use that tool to create a dump (.dmp) file for a process that shuts down with an exception or to create a dump file for a hanging process

    0 讨论(0)
  • 2020-12-13 10:56

    You can use adplus to produce a crash dump for a running application. The command may look something like this:

    C:\Program Files\Debugging Tools for Windows\adplus.vbs -hang -do -o c:\ -quiet -pn theprocess.exe
    

    You can also attach to a process with windbg and run this command:

    .dump /ma c:\somepath\filename.dmp
    
    0 讨论(0)
  • 2020-12-13 11:02

    I refer you to the follows MS KB article on the subject. You would typically debug the dump file using one of the Windows debugging tools, e.g. WinDbg. There are many articles on the web describing how to do this.

    0 讨论(0)
  • 2020-12-13 11:04

    You might try using WinDbg as described here.

    0 讨论(0)
  • 2020-12-13 11:05

    You can open Task Manager (by right clicking the task bar), find your process in the processes tab, right-click it and select Create Dump File.

    0 讨论(0)
  • 2020-12-13 11:06

    Just to throw in some other suggestions:

    • ProcDump that is part of the MS SysInternals suite (it captures crashes but also does a load more, can take dumps if CPU usage spikes for an amount of time, etc)
    • You can put code into your exe using MiniDumpWriteDump to save out dumps youself (which I've done in a few tools). You have control over the name and location (i.e. network path). There's some sample code here
    0 讨论(0)
提交回复
热议问题