1、编译生成可执行文件
命令:gcc -g test.c -o test
2、启动GDB
命令: gdb test
3、在main函数处设置断点
命令: break main
4、运行程序
命令:run
5、单步执行
命令: next
6、继续运行
命令: continue
1、编译生成可执行文件
命令:gcc -g test.c -o test
2、启动GDB
命令: gdb test
3、在main函数处设置断点
命令: break main
4、运行程序
命令:run
5、单步执行
命令: next
6、继续运行
命令: continue