分类: LINUX
2011-01-18 10:53:14
sudo service abrtd stop
sudo chkconfig --del abrtd
kernel.core_pattern = |/usr/libexec/abrt-hook-ccpp /var/spool/abrt %p %s %u %cto
kernel.core_pattern = core
* soft core unlimited(Yeah, "soft core". Actually "hard core" is legal too.)
# make sure it doesn't core dump anywhere unless requested corelimit="ulimit -S -c ${DAEMON_COREFILE_LIMIT:-0}"That step appears to be unnecessary.
Now create a program that drops core. (I assume that the reader already knows how.)
[alison@bonnet ~]$ ulimit -c unlimited [alison@bonnet kernel_char]$ ./bit_palindrome Segmentation fault (core dumped)
Finally! A file called core.$PID will be dropped in $CWD. Now the user can "gdb $EXECUTABLE $CORE" to heart's content.