1. make -g **
- add -g option to enable gdb debug.
2. ulimit -c unlimited
- Enable coredump file to be created when segmentation fault occurs.
3. Gdb ./bin core.xxxx
- Get the core dump info. By the gdb
4. bt/backtrace
- Back trace the point that program gets segmentation fault
5. q/quit
- Leave GDB
聪明不聪明,不在于脑袋的灵活度,而在于你的贡献。脚踏实地,做一番事业,做一个聪明的人