This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Incorrect line info in printf for powerpc-eabisim -mhard-foat
- From: Michael Eager <eager at eagercon dot com>
- To: GCC <gcc at gcc dot gnu dot org>
- Date: Thu, 16 Jul 2009 13:55:48 -0700
- Subject: Incorrect line info in printf for powerpc-eabisim -mhard-foat
Hi --
I've tracked down a failure in gdb to hit a breakpoint
set at printf to the the breakpoint being placed incorrectly.
Here is the code generated for printf with -mhard-float:
.loc 1 29 0
.cfi_startproc
.LVL0:
mflr 0
stwu 1,-112(1)
.LCFI0:
.cfi_def_cfa_offset 112
stw 5,24(1)
stw 0,116(1)
stw 6,28(1)
stw 7,32(1)
stw 8,36(1)
stw 9,40(1)
stw 10,44(1)
bne- 1,.L2 <<< - 1
.cfi_offset 65, 4
.loc 1 29 0 <<< - 2
stfd 1,48(1) <<< - 3
stfd 2,56(1)
stfd 3,64(1)
stfd 4,72(1)
stfd 5,80(1)
stfd 6,88(1)
stfd 7,96(1)
stfd 8,104(1)
.L2:
.loc 1 34 0
Gdb places a breakpoint at printf() at the stfd instruction (3).
This appears to be because of the .loc at (2). When the code is
executed, the branch (1) is taken, jumping over the the breakpoint.
I think that the .loc at (2) should not be generated, since it is
in the middle of the prologue code.
I'll file a bug report unless someone already has done so.
--
Michael Eager eager@eagercon.com
1960 Park Blvd., Palo Alto, CA 94306 650-325-8077