msg="No symbol table is loaded. Use the \"file\" command."

用Eclipse调试的时候,下断点的unresolved breakpoint,报的是标题上的错误。原因显然是没有加载符号表,需要用gdb的file命令加载符号表。

(gdb) file [exec_file]

这样用以上命令就可以了。

 

当然这个问题是我远程调试板子上的firmware遇到的。  在init command line 加了Cypress doc提供的一系列指令:

set prompt (arm-gdb)
# This connects to a target via netsiliconLibRemote
# listening for commands on this PC's tcp port 2331
target remote localhost:2331
monitor speed 1000
monitor endian little
set endian little
monitor reset
# Set the processor to SVC mode
monitor reg cpsr =0xd3
# Disable all interrupts
monitor memU32 0xFFFFF014 =0xFFFFFFFF
# Enable the TCMs
monitor memU32 0x40000000 =0xE3A00015
monitor memU32 0x40000004 =0xEE090F31
monitor memU32 0x40000008 =0xE240024F
monitor memU32 0x4000000C =0xEE090F11
# Change the FX3 SYSCLK setting based on
# input clock frequency. Update with

# correct value from list below.
# Clock input is 19.2 MHz: Value = 0x00080015
# Clock input is 26.0 MHz: Value = 0x00080010
# Clock input is 38.4 MHz: Value = 0x00080115
# Clock input is 52.0 MHz: Value = 0x00080110
monitor memU32 0xE0052000 = 0x00080015
# Add a delay to let the clock stabilize.
monitor sleep 1000
set $pc =0x40000000
si
si
si
si

 

然后在Eclipse中run里面用了load指令。(load指令相当于run远程的program)

 

运行Debug以后,下不了断点是因为没有载入有调试符号表的可执行elf文件。可能是Eclipse路径没有设对,导致运行load之前,没有正确加载符号表。只能手动用file命令加载,虽然之后能正确下断,但是还是不能远程调试。之后我把file [exec_file]指令加入到init command里面的最后一行,就是上面一串指令(四个si指令)的最后。然后下的断点就能正确使用了,就是说,程序能停止在断点处了。

 

reference:

http://stackoverflow.com/questions/9245685/gdb-no-symbol-table-is-loaded

http://www.cypress.com/?app=forum&id=167&rID=78095

http://blog.chinaunix.net/uid-20788636-id-1841300.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值