举例:NTP coredump
1. ps查看ntp的进程号
1842 admin 1560 S /usr/sbin/ntpd -n -p cn.ntp.org.cn -p edu.ntp.org.cn
2. 先gdb attach到ntp进程,然后手动生成一个coredump文件
./gdb attach 1842
dlopen failed on 'libthread_db.so.1' - File not found
GDB will not be able to debug pthreads.
GNU gdb 6.8
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "mips-linux"...
attach: No such file or directory.
Attaching to process 1842
Reading symbols from /bin/busybox...(no debugging symbols found)...done.
0x7743f5dc in ?? ()
(gdb) generate-core-file
Saved co