[#6144] two breakpoint cases in gdb.base/break.exp fail in 4.3 toolchain testing but passes in 4.1 toolchain

Document created by Aaronwu Employee on Oct 17, 2013
Version 1Show Document
  • View in full screen mode

[#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

Open Date

2010-08-02 05:01:38    

Priority:

Medium     Assignee:

Steve Kilbane

Board:

N/A     Silicon Revision:

Resolution:

Under Debugging     Fixed In Release:

N/A

Processor:

ALL     

Host Operating System:

toolchain rev.:

    kernel rev.:

State:

Open     Found In Release:

2010R1

Is this bug repeatable?:

N/A     

Summary: two breakpoint cases in gdb.base/break.exp fail in 4.3 toolchain testing but passes in 4.1 toolchain

Details:

 

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:

--

break multi_line_while_conditional^M

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

info break^M

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

--

 

Follow-ups

 

--- 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

right in

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

is

that jump. However, the compiler's not emitting a .loc directive for that, so

it

gets treated as just another instruction as part of the function prologue.

When

GDB is told to place a breakpoint on the function, it skips past the prologue

to

what it believes is the first instr of the first statement, and finds that

it's

the first instr of the loop body - not the loop condition, as the test

expects.

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

there's

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:

http://gcc.gnu.org/ml/gcc-patches/2008-10/msg00017.html

 

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

 

http://gcc.gnu.org/ml/gcc-patches/2008-10/msg00313.html

 

But - it doesn't look like it is there.

http://gcc.gnu.org/viewcvs/branches/gcc-4_3-branch/gcc/

 

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

priority.

 

 

 

    Files

    Changes

    Commits

    Dependencies

    Duplicates

    Associations

    Tags

 

File Name     File Type     File Size     Posted By

No Files Were Found

Attachments

    Outcomes