How to Create a Core File for My Crashed Program

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

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

I run `crash_demo.run` by `spawn-fcgi` . How to collect `core` file

This question is probably more for askubuntu.com or serverfault.stackexchange.com.

You likely need to configure core dump. Since we don't know the platform, I'm assuming likely a Linux. See e.g. core(5):

There are various circumstances in which a core dump file is not
produced

In my experience what's required is setting a core pattern (/proc/sys/kernel/core_pattern)

How can a C program produce a core dump of itself without terminating?

void create_dump(void)
{
if(!fork()) {
// Crash the app in your favorite way here
*((void*)0) = 42;
}
}

Fork the process then crash the child - it'll give you a snapshot whenever you want

Is there a Windows alternative for UNIX crash core-files

The equivalent of a core dump on Windows is a minidump. It has the .dmp file extension and can e.g. be opened in Visual Studio or in WinDbg.

There are many ways of getting such a crash dump. I once answered How do I take a good crash dump for .NET?, but most of that can also be applied to C++ and VB6.

Java has it's own way of reporting crashes and interpreted languages like Python, too.



Related Topics



Leave a reply



Submit