This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Incorrect line info in printf for powerpc-eabisim -mhard-foat


On Thu, 2009-07-16 at 13:55 -0700, Michael Eager wrote:
> 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.

Luis, isn't there a bugzilla regarding this?  This seems to me to
be similar to what you had been looking at.

Peter




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]