stabs at function entry point?

Richard Henderson rth@redhat.com
Sun Mar 17 11:32:00 GMT 2002


On Sat, Mar 16, 2002 at 08:14:32PM -0500, Daniel Jacobowitz wrote:
> As for DWARF2 - we don't do this correctly there either.  For the first
> function in a compilation unit, we will return ??:0, because the first
> entry in the line table will be just after the prologue.

Err, since when?

	void foo()
	{
	  bar();
	}

foo:
	.loc 1 2 0
	ldah $29,0($27)		!gpdisp!1
	lda $29,0($29)		!gpdisp!1
$foo..ng:
	lda $30,-16($30)
	stq $26,0($30)
	stq $15,8($30)
	mov $30,$15
	.prologue 1
	.loc 1 3 0
	ldq $27,bar($29)		!literal!2
	jsr $26,($27),0		!lituse_jsr!2

That sure looks like the first line number entry is right at the
beginning of the function.  And just to be sure, here's the bits
in the file,

 Line Number Statements:
  Extended opcode 2: set Address to 0x0
  Special opcode 6: advance Address by 0 to 0x0 and Line by 1 to 2
  Special opcode 90: advance Address by 24 to 0x18 and Line by 1 to 3
  Special opcode 62: advance Address by 16 to 0x28 and Line by 1 to 4
  Advance PC by 20 to 3c
  Extended opcode 1: End of Sequence

so gas isn't somehow throwing away the note either.



r~



More information about the Binutils mailing list