背景环境说明
一般从现场医院copy的子系统文件都是去除调试符号的文件,core调试时只能看到问号
调试操作
a) Svn up –r xxx 恢复Components目录至现场版本
b) Cd Components/Axial 进入子系统目录,然后运行 make release 命令
c) 将 Components/Axial/Build/cortexA8/Appl/Axial.debug(就是Axial相应版本的调试符号文件) 与 现场copy回来的Axial 、 core-Axial文件放在一起
d) 运行 export SDK_PATH=/xxx/xxx/linux/sdk-am335x-evm-05.06.00.00/linux-devkit
e) 运行 ./xxx/xxx/sdk-am335x-evm-05.06.00.00/linux-devkit/bin/arm-arago-linux-gnueabi-gdb -s Axial.debug -e Axial -c core-Axial
注解:make release时最终产生如下编译打印信息
../../../../../linux/sdk-am335x-evm-05.06.00.00/linux-devkit/bin/arm-arago-linux-gnueabi-objcopy --only-keep-debug Axial.full Axial.debug
../../../../../linux/sdk-am335x-evm-05.06.00.00/linux-devkit/bin/arm-arago-linux-gnueabi-objcopy --strip-all Axial.full Axial
Objcopy – copy and translate object files
--strip-debug -- do not copy debugging symbols or sections from the source file
--only-keep-debug – strip a file, removing contents of any sections that would not be stripped by strip-debug and leaving the debugging sections intact.
f) 致此应该有相关信息打印,若提示库缺失可设置 set sysroot /xxx/xxx/linux-devkit/lib 或和子系统相关的动态库
g) 打印信息应该可以大体定位错误来源,若要查看奔溃时的相关信息,运行info locals命令即可打印本层所有的变量信息
i) 若要切换堆栈层次(函数调用层次),运行f (x)即可