I want to create a core dump whenever my process crashes. Currently I am following this approach:
But I want to minimize the number of steps so that:
ulimit -c unlimited
" manually.So I have two questions:
ulimit -c unlimited
"setrlimit
.backtrace
and related system calls. You will then have to translate the function addresses into function names by running addr2line
(or duplicating its functionality).-g
, you can still get a backtrace (except that inlined functions will not appear).