core dump是程序运行时,在进程收到某些信号而终止运行时,将此时进程地址空间的内容以及有关进程状态的其他信息写入一个磁盘文件。
对应会产生core dump的信号
| Signal | Action | Comment |
|---|---|---|
| SIGQUIT | Core | Quit from keyboard |
| SIGILL | Core | Illegal Instruction |
| SIGABRT | Core | Abort signal from abort |
| SIGSEGV | Core | Invalid memory reference |
| SIGTRAP | Core | Trace/breakpoint trap |
我们可以通过使用gdb查core dump文件,最后崩溃时的信息,来进行debug
为了更好的查看阅读core dump文件, linux下需要进行以下配置