这事一直困扰着我。也许是其他人遇到了它,并找到了解决办法。
目标
设置
问题
当我为这个目标启动调试启动时,gdb的后端出现了一些疯狂的东西,您可以在gdb跟踪控制台中看到它。看起来像这样(.是截短行b ):
(为了保护无辜改名)
..360,743 2-environment-cd /home/jmreina/myworkspace/myproj
360,743 2^done
360,743 (gdb)
360,744 3-gdb-set breakpoint pending on
360,744 3^done
...
360,747 9source .gdbinit
...
360,748 ~"Reading symbols from /home/jmreina/myworkspace/myproj/Debug/myproj.elf..."
...
381,233 (gdb)
381,233 58^done,groups=[{id="i1",type="process",pid="42000"}]
...
381,516 65-data-disassemble --thread 1 -s 536883209 -e 536883241 -- 1
381,559 66-data-read-memory 2415919152 x 1 1 4
381,568 65^done,asm_insns=[src_and_asm_line={line="68",file="/home/jmreina/myworkspace/myproj/myfcns/\
foo.c",line_asm_insn=[{address="0x2000300e",func-name="foo_initialize",offset="16",inst="call 0x20\
00409b <memset$fastcc>"},{address="0x20003013",func-name="foo_initialize",offset="21",inst="mov $\
0x10,%eax"},{address="0x20003018",func-name="foo_initialize",offset="26",inst="xor %edx,%edx"},{a\
ddress="0x2000301a",func-name="foo_initialize",offset="28",inst="mov $0x60000210,%ecx"}]},src_and\
_asm_line={line="69",file="/home/jmreina/myworkspace/myproj/myfcns/foo.c",line_asm_insn=[{address="0x\
2000301f",func-name="foo_initialize",offset="33",inst="call 0x2000409b <memset$fastcc>"}]},src_and\
_asm_line={line="70",file="/home/jmreina/myworkspace/myproj/myfcns/foo.c",line_asm_insn=[]},src_and_a\
sm_line={line="71",file="/home/jmreina/myworkspace/myproj/myfcns/foo.c",line_asm_insn=[]},src_and_asm\
_line={line="72",file="/home/jmreina/myworkspace/myproj/myfcns/foo.c",line_asm_insn=[]},src_and_asm_l\
ine={line="73",file="/home/jmreina/myworkspace/myproj/myfcns/foo.c",line_asm_insn=[]},src_and_asm_lin\
e={line="74",file="/home/jmreina/myworkspace/myproj/myfcns/foo.c",line_asm_insn=[]},src_and_asm_line=\
{line="75",file="/home/jmreina/myworkspace/myproj/myfcns/foo.c",line_asm_insn=[]},src_and_asm_line={l\
ine="76",file="/home/jmreina/myworkspace/myproj/myfcns/foo.c",line_asm_insn=[]},src_and_asm_line={lin\
e="77",file="/home/jmreina/myworkspace/myproj/myfcns/foo.c",line_asm_insn=[]},src_and_asm_line={line=\
"78",file="/home/jmreina/myworkspace/myproj/myfcns/foo.c",line_asm_insn=[]},src_and_asm_line={line="7\
9",file="/home/jmreina/myworkspace/myproj/myfcns/foo.c",line_asm_insn=[]},src_and_asm_line={line="80"\
,file="/home/jmreina/myworkspace/myproj/myfcns/foo.c",line_asm_insn=[]},src_and_asm_line={line="81",f\
...
(FOUR-HUNDRED+ more lines of the same CRAPfrom myfcns/foo.c!)
...
Eclipse然后在一个空白编辑器中显示:
No source available for "(gdb[38].proc[42000].threadGroup[i1],gdb[38].proc[42000].OSthread[1]).thread[1].frame[0]"
我认为这是因为上面的那些垃圾(432行!)花了很长时间才在后端加载,而且我认为发布背后的Eclipse插件导致了某种超时。
我非常肯定foo.c在闪存中直接位于main()之后。因此,GDB在这里调用初始化以获取Eclipse中的反汇编视图。
*注意,如果反汇编视图已关闭(未最小化、关闭),则不会发生这种情况。
问题
这让我烦透了,一天20次,每天20次。我如何修复,甚至理解它!?
发布于 2017-04-18 05:35:34
根据你的题目“没有资料来源.”。一个原因可能是目标上的gdbserver和主机上的gdb之间的版本不兼容。如果有特定于目标的gdb,您应该检查您的工具链。
https://stackoverflow.com/questions/22317449
复制