开发者

Linux Core Dump Without Killing Process

Is it possible to generate a core dump without killin开发者_C百科g the process? If so, what is the command/signal to do so?

Thanks, Jim


See the 'gcore' command, part of GDB.


I had the best success with attaching gdb in batch mode to the running program, get a backtrace and then detach.

gdb --batch --quiet -ex "set pagination off" -ex "thread apply all bt"
-ex "detach" -ex "quit" pid pid_of_process


A method to generate a coredump directly from program without gdb is described here: https://unix.stackexchange.com/questions/11185/dump-process-core-without-killing-the-process

It make sense only if you are developing. Principle is to fork program and to raise SIGABRT from child.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜