When I think of a linux teacher from Neusoft, I told me that Tianji has finished the book and just bought it, you must have read "debughacks" in a week. Fortunately, I have practiced it. what should you do ~ First ulimit-c kernel dump file size limit ulimit-c107374...
When I think of a linux teacher from Neusoft, I have finished speaking this book for two Tianji days,
I just bought a book and must finish reading it in a week.
Debug hacks
Fortunately, my grandmother, I 've practiced it, or what else would you do ~
Size limit of ulimit-c kernel dump files
Ulimit-c 1073741842
Or start
Vim/etc/profile
Java code
Ulimit-S-c unlimited>/dev/null 2> & 1
Then deliberately write an error code.
It seems that 0 is a system and cannot be accessed.
Test. c
Java code
# Include
Int main (){
Int * a = NULL;
* A = 0*1;
Return 0;
}
Gcc-p-g test. c
./A. out
Generate core *
Gdb-c core.1234./a. out
L 6
Quit
------------------
Generate a kernel dump at a fixed position/var/core/
Cat/etc/sysctl. conf
Java code
Kernel. core_pattern =/var/core/% t-% e-% p-% c. core
Kernel. core_uses_pid = 0
Sysctl-p
Cat/proc/sys/kernel/core_pattern
Author "walking on the left"