gdb.dwarf2/dw2-ref-missing-frame.exp failure
Bug #615997 reported by
Ulrich Weigand
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Linaro GDB |
Fix Released
|
Low
|
Yao Qi |
Bug Description
FAIL: gdb.dwarf2/
Further analysis required.
Changed in gdb-linaro: | |
importance: | Undecided → Low |
Changed in gdb-linaro: | |
milestone: | none → 7.2-2010.10-0 |
Changed in gdb-linaro: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Failure is caused by setting breakpoint on func_loopfb (at 0x839a), but program doesn't hit breakpoint.
(gdb) file /home/yao/ maverick/ home/yao/ cvs/build/ gdb/testsuite/ gdb.dwarf2/ dw2-ref- missing- frame^M maverick/ home/yao/ cvs/build/ gdb/testsuite/ gdb.dwarf2/ dw2-ref- missing- frame.. .done.^ M maverick/ home/yao/ cvs/build/ gdb/testsuite/ gdb.dwarf2/ dw2-ref- missing- frame ^M dw2-ref- missing- frame.exp: running to func_loopfb in runto
Reading symbols from /home/yao/
(gdb) delete breakpoints^M
(gdb) info breakpoints^M
No breakpoints or watchpoints.^M
(gdb) break func_loopfb^M
Breakpoint 1 at 0x839a // <---- [2]
(gdb) run ^M
Starting program: /home/yao/
^M
Program exited normally.^M
(gdb) FAIL: gdb.dwarf2/
Disassembly function main and func_loopfb,
Dump of assembler code for function main:
0x000083a8 <+0>: push {r7, lr}
0x000083aa <+2>: sub sp, #8
0x000083ac <+4>: add r7, sp, #0
0x000083ae <+6>: mov.w r3, #1
0x000083b2 <+10>: str r3, [r7, #4]
0x000083b4 <+12>: bl 0x8390 <func_nofb>
0x000083b8 <+16>: bl 0x839c <func_loopfb> // <--- [1]
(gdb) disassemble func_loopfb
Dump of assembler code for function func_loopfb:
0x0000839a <+0>: nop
0x0000839c <+0>: push {r7}
0x0000839e <+2>: add r7, sp, #0
0x000083a0 <+4>: mov sp, r7
0x000083a2 <+6>: pop {r7}
0x000083a4 <+8>: bx lr
The reason of breakpoint is not hit is that debugger set breakpoint at at 0x839a [2], but main function branch to func_loopfb at 0x0000839c [1].
There might be some ways to fix this problem,
1. Don't generate nop insn,
2. Change target address of bl from 839c to 839a,
3. Tell GDB to set breakpoint insn on 'push' rather than 'nop'