Search code examples
clinuxdebuggingremote-debuggingcoredump

How to create a core dump even if the process is normally running?


Under Linux, when a process crashes, a core dump will be created.

However, I want to create a core dump when the process doesn't crash, but looks buggy. A remote expert need the core dump to analyze.

Under Windows, we can create a dump file of a process through task manager, and after that, the process is still running.

Is it possible under Linux?


Solution

  • Call gdb, then

    attach pid
    gcore
    

    where pid is the process id of the process in question.