a, 通过make menuconfig将需要调试的vmlinux加上debug信息, 搜索下debug_info的CONFIG位置,并打开之;
b, 在U-Boot文件夹下的gdb.script中加入vmlinux文件,设置需要debug的位置xxx.c:xxx行, 具体如下:
target remote 192.168.4.73:2331
monitor reset
load u-boot
monitor reg pc=0
file ../linux/kernel/arch/arm/boot/compressed/vmlinux
break xxx.c:xxx
continue
c, 通过U-Boot启动之后就可以顺利单步调试了!