How to generate a core dump in Linux on a segmentation fault?

前端 未结 12 1133
余生分开走
余生分开走 2020-11-22 17:06

I have a process in Linux that\'s getting a segmentation fault. How can I tell it to generate a core dump when it fails?

12条回答
  •  北海茫月
    2020-11-22 17:38

    What I did at the end was attach gdb to the process before it crashed, and then when it got the segfault I executed the generate-core-file command. That forced generation of a core dump.

提交回复
热议问题