GDB debugger and coredump file

1, GDB debugger

https://blog.csdn.net/21cnbao/article/details/7385161#commentBox

https://www.cnblogs.com/lsgxeva/p/8078670.html

2, the state of coredump viewer abnormal crash

2.1 open coredump:     

             View command: ulimit -c [] to view the current output terminal is turned on [0 unopened; unlimited output is on]

             ON command: ulimit -c unlimited [] or [ulimit -c 200]. Set core file size

             Permanently open: modify the configuration file /etc/security/limits.conf

When turned on, the program is running crashes, clip appears core file in the current file, save the memory state and register state of collapse. core file is also an ELF file, you can use the command readelf [view]

View core file with gdb 2.2

           Command] [gdb ./program core. Also asked the program uses -g option to add debug information to the executable file compiled with GCC.

The reason 2.3coredump resulting file:

           1, a memory access violation; 2, multi-threaded program using a thread-safe function; 3, multi-threaded read and write data unprotected lock; 4, invalid pointer; 5, stack overflow.

 

Guess you like

Origin blog.csdn.net/weixin_38812277/article/details/92970089