Linux下用GDB调试程序崩溃错误

首先开启选项容许系统在程序崩溃时自动生成core dump文件 测试 ulimit -c unlimited调试 编写测试程序test.cblog void main(void) {     int * p = 0;     *p = 10;      } it 编译程序,必定要加上选项-g ,生成调试信息编译 gcc -g -o test test.ctest 运行程序会生成崩溃文件 coreg
相关文章
相关标签/搜索