gdb

arm-none-eabi-gdb

使用说明文档

1
C:\Program Files (x86)\GNU Arm Embedded Toolchain\9 2020-q2-update\share\doc\gcc-arm-none-eabi\pdf\gdb.pdf

使用

1
2
3
4
5
#-ex使用外部指令
arm-none-eabi-gdb *.elf -ex "target remote localhost:3333"
#也可指令分开
arm-none-eabi-gdb *.elf
target remote localhost:3333

常用指令

指令 含义 例子 备注
monitor cmd 执行指令 reset halt load
c continue 继续执行
s step 单步执行
b break 断点 b main.c:111 main.c 111行
b test 函数test
b if a == 1 条件
b if a = 1 赋值
n next 下一断点
u until 到达指定位置
f frame 当前断点
finish 退出函数
i info 显示信息
d delete 删除显示 断点
display 显示变量,每次停顿都显示
p print 打印变量
q quit 退出
where 位置
list 显示代码
-->

请我喝杯咖啡吧~

支付宝
微信