[#6144] two breakpoint cases in gdb.base/break.exp fail in 4.3 toolchain testing but passes in 4.1 toolchain
Submitted By: Vivi Li
N/A Silicon Revision:
Under Debugging Fixed In Release:
Host Operating System:
Open Found In Release:
Is this bug repeatable?:
Summary: two breakpoint cases in gdb.base/break.exp fail in 4.3 toolchain testing but passes in 4.1 toolchain
Following two cases in gdb.base/break.exp fail in 4.3 toolchain testing but passes in 4.1 toolchain.
FAIL: gdb.base/break.exp: breakpoint at start of multi line while conditional
FAIL: gdb.base/break.exp: breakpoint info
Bellow is the detailed log:
Breakpoint 8 at 0x2fe08bc: file /home/test/work/cruise/checkouts/toolchain/binutils-2.17/gdb/testsuite/gdb.base/break.c, line 143.^M
(gdb) FAIL: gdb.base/break.exp: breakpoint at start of multi line while conditional
Num Type Disp Enb Address What^M
1 breakpoint keep y 0x02fe07c0 in main at /home/test/work/cruise/checkouts/toolchain/binutils-2.17/gdb/testsuite/gdb.base/break.c:90^M
2 breakpoint keep y 0x02fe08fe in marker2 at /home/test/work/cruise/checkouts/toolchain/binutils-2.17/gdb/testsuite/gdb.base/break1.c:41^M
3 breakpoint keep y 0x02fe0860 in factorial at /home/test/work/cruise/checkouts/toolchain/binutils-2.17/gdb/testsuite/gdb.base/break.c:111^M
4 breakpoint keep y 0x02fe07ec in main at /home/test/work/cruise/checkouts/toolchain/binutils-2.17/gdb/testsuite/gdb.base/break.c:94^M
5 breakpoint keep y 0x02fe07ec in main at /home/test/work/cruise/checkouts/toolchain/binutils-2.17/gdb/testsuite/gdb.base/break.c:94^M
6 breakpoint keep y 0x02fe0840 in main at /home/test/work/cruise/checkouts/toolchain/binutils-2.17/gdb/testsuite/gdb.base/break.c:100^M
7 breakpoint keep y 0x02fe088a in multi_line_if_conditional at /home/test/work/cruise/checkouts/toolchain/binutils-2.17/gdb/testsuite/gdb.base/break.c:124^M
8 breakpoint keep y 0x02fe08bc in multi_line_while_conditional at /home/test/work/cruise/checkouts/toolchain/binutils-2.17/gdb/testsuite/gdb.base/break.c:143^M
(gdb) FAIL: gdb.base/break.exp: breakpoint info
--- Steve Kilbane 2010-08-02 07:36:27
This was split off from #5773, where I entered the following comment:
"gdb.base/break.exp: these are down to the debug info being not quite
the 4.3 compiler, which does while-to-do conversion. The compiler converts the
while loop (test, body) into a do loop (body, test) with an initial jump over
the body to the test. This means the first instruction of the while construct
that jump. However, the compiler's not emitting a .loc directive for that, so
gets treated as just another instruction as part of the function prologue.
GDB is told to place a breakpoint on the function, it skips past the prologue
what it believes is the first instr of the first statement, and finds that
the first instr of the loop body - not the loop condition, as the test
Hence the failure of these two tests in break.exp.
(To be honest, I don't know whether this is all down to the line info, or
whether there's other stuff happening in the debug_frame section.)
This appears to be fixed in GCC 4.4.3, which also emits CFI data. However,
turning off the CFI directives didn't cause 4.4.3 to break, so I suspect
a fix for this problem too - it's not just that the CFI info is hiding it.
(Also, I was testing the 4.3 compilers with GDB 6.x, and the 4.4 compiler with
GDB 7.x, so that might be part of it, but the .debug_line info from 4.4.3
definitely looks better than the line info from 4.3.5.)"
--- Steve Kilbane 2010-08-05 09:00:41
This is debug PR 36690, fixed in GCC 4.4.x by this patch:
I'm checking whether a backport of that patch will work on the 4.3.5 compiler.
--- Robin Getz 2010-08-05 09:23:27
Later in the thread -- Jakub said he was going to apply to the 4.3 branch
But - it doesn't look like it is there.
I would ask Jakub before working too hard on things.
--- Sonic Zhang 2010-08-09 07:12:09
Steve got issue to back port the fixing from new version of GDB to SVN. It is
easier to update SVN gdb version but not recommended in so late stage. Low
File Name File Type File Size Posted By
No Files Were Found