Segmentation Fault未產生core file的解決方法


當系統發生Segmentation Fault, core dumped時沒看見core file產生時,可以試試下面的指令:


ulimit -c unlimited

有了core file就能利用gdb工具來幫助除錯。若能夠將程式編成debug build將更有助於使用gdb來除錯:

gdb $executable_name $corefile_name

(gdb) where
(gdb) thread apply all bt

資料補充
1

留言

熱門文章