問題:
$ gcore 2808
warning: process 2808 is already traced by process 2806
ptrace: Operation not permitted.
You can't do that without a process to debug.
The program is not being run.
gcore: failed to create core.2808
原因:2808已經被另一個gdb attach,導致無法core dump,只要先detach就可以做core dump
$ ps aux | grep 2806
steward 2806 0.2 2.2 67948 42404 pts/1 S 06:53 0:00 gdb ./main