On Wed, 6 Jan 2021, Jakub Jelinek wrote:

> On Wed, Jan 06, 2021 at 08:50:43AM +0100, Richard Biener wrote:
> > > Theoretically we could exclude the range of the no-loc function
> > > from the .debug_ranges, then gdb would not even step into the function.
> > 
> > I'd argue we're failing to emit a .endloc at the end of functions
> > (rather than issueing a .noloc at the start of functions with no 
> > locations).  I wonder if using a special file ID and switching to that
> > would be an effective workaround?  When gas is extended we could use
> > file ID zero for this (which gas currently rejects).
> 
> If we had .endloc, emitting it at the end of functions would be
> theoretically more correct, but I'd be afraid it would unnecessarily grow
> the .debug_line size, because nobody should care about line information in
> padding bytes between functions and the .endloc would add there a change
> even when it would affect just one byte of padding (probably even when it
> wouldn't affect anything, depending on how it is implemented).

Sure, but of course gas can optimize this case for bytes it emits
because of .align

Richard.

Reply via email to