創建core dump
- 在終端檢查是否打開:ulimit -c (unlimited表示打開,0表示關閉)
-c是core,還有其它用http://www.cnblogs.com/qq78292959/archive/2012/05/08/2490443.html - 打開: ulimit -c unlimited
- 全局設置: 在/etc/profile加上 ulimit -c unlimited
- 配置dump路徑:
sudo sysctl kern.corefile=/cores/core.%N.%P (其中%N表示進程名字,%P表示進程id。Linux還有%S,%T分別表示最后一個信號和時間,在MAC上沒找到對應的) - lldb加載coredump: lldb -c {dumpfile}