Catch linux core dump

当你要手工抓取core dump 时,推荐

1. 不管程序死活, kill -5 pid, send sigtrap to target process and will create core dump and the process dies.

2. Occasionally, you may wish to produce a core file of the program you are debugging in
order to preserve a snapshot of its state. gdb has a special command for that.
generate-core-file [file]
gcore [file]
Produce a core dump of the inferior process. The optional argument file specifies
the file name where to put the core dump. If not specified, the file name defaults
to ‘core.pid’, where pid is the inferior process ID.

你可能感兴趣的:(Catch linux core dump)