public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Incorrect line info in printf for powerpc-eabisim -mhard-foat
@ 2009-07-16 20:56 Michael Eager
  2009-07-21 13:53 ` Peter Bergner
  0 siblings, 1 reply; 5+ messages in thread
From: Michael Eager @ 2009-07-16 20:56 UTC (permalink / raw)
  To: GCC

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-07-23 18:40 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-07-16 20:56 Incorrect line info in printf for powerpc-eabisim -mhard-foat Michael Eager
2009-07-21 13:53 ` Peter Bergner
2009-07-21 13:59   ` Luis Machado
2009-07-21 14:04     ` Luis Machado
2009-07-23 18:40     ` Michael Eager

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).