cht電腦資訊Linux
adm Find login register

file 不知為何看不到 coredump file 是什麼程式產生的

eliu
1 file 不知為何看不到 coredump file 是什麼程式產生的
Promote 1 Bookmark 12008-12-15quote  

以前的 file 可以。 只好改用直接用 strings 看 coredump

$ strings core.27173  | head -3 | tail -1

coredump 主要是用來 debug 用的。如果程式有保留 debug 的 infomation 就可以用

gdb exec_filename core.xxxx 來看程式是當在哪裡。

由於一般人不會想去 debug,所以一般內定是會關閉,可以修改 /etc/profile

修改 or 加入  

ulimit -c unlimited

-c 是用來限制 coredump file 的 size。 如果設定成 0,就不會產生 coredump。

edited: 2
eliu
2
Promote 1 Bookmark 12010-10-22quote  

cht電腦資訊Linux
adm Find login register
views:8517