gdb遇到的一些问题

来源:互联网 发布:翻译文档软件 编辑:程序博客网 时间:2024/06/05 16:11
0. 起步阶段参考以下网址:
http://www.douban.com/note/195468369/


1. mips gdb配置后,make install时可能出现无法找到makeinfo的问题,解决方法:
apt-get install texinfo


2. warning: Can not parse XML target description; XML support was disabled at compile time 解决办法可参考以下网址:
http://blog.csdn.net/yangzhongxuan/article/details/13002789
得出结论——是因为少了expat库,因此重新配置、编译gdb:
../gdb-7.9/configure --target=mips-linux --prefix=/opt/gdb --with-expat --includedir=/opt/expat-2.1.0/bin/include --libdir=/opt/expat-2.1.0/bin/lib


3. linux-low.c:969: A problem internal to GDBserver has been detected
需要将待调试程序需改为可执行:
chmod 777 main_smanage


4. 图形化调试界面 ddd
apt-get install ddd
ddd -debugger arm-linux-gdb hello


5.  gdb调试 Program received signal SIG32的解决办法:
handle SIG32 nostop


6. You may have requested too many hardware breakpoints/watchpoints.
问题:mips处理器可能没有调试用的硬件断点。
解决办法:所以全部使用软断点(设置硬断点数为0):
set can-use-hw-watchpoints 0


7. GDB动态库搜索路径添加
set solib-search-path /iMine_workspace/iMine_v2/mips_fs/lib:/iMine_workspace/iMine_v2/mips_fs/usr/lib


8. 启动脚本配置
/root/.gdbinit中添加(没有该文件就自己创建)
add-auto-load-safe-path /iMine_workspace/iMine_v2/imine_apps/imine_smanage/.gdbinit
在该绝对路径下的.gdbinit中添加需要启动时配置的东西如:
target remote 192.168.100.222:2333
set can-use-hw-watchpoints 0
set solib-search-path /iMine_workspace/iMine_v2/mips_fs/lib:/iMine_workspace/iMine_v2/mips_fs/usr/lib
handle SIG32 nostop


9. watchpoint
观察点只能观察数据大小小于该观察点最大长度的变量,mips32的观察点长度为4字节。
0 0
原创粉丝点击