how to generate core file in docker container?

前端 未结 2 1265
南方客
南方客 2021-01-31 21:03

using ulimit command, i set core file size.

ulimit -c unlimited

and I compiled c source code using gcc - g option. then a.out generated. after comm

2条回答
  •  梦毁少年i
    2021-01-31 21:32

    If you want to generate a core dump of an existing process, say using gcore, you need to start the container with --cap-add=SYS_PTRACE to allow a debugger running as root inside the container to attach to the process. (For core dumps on signals, see the other answer)

提交回复
热议问题