On 1/6/21 8:01 AM, Alexandre Oliva wrote: > On Jan 5, 2021, Richard Biener <rguent...@suse.de> wrote: > >> But isn't this a consumer issue then? If there is no line info for >> a PC range then gdb shouldn't display any. > > No, there *is* line info there, carried over from an earlier .loc > directive, as there isn't anything like ".noloc" to output with a > function that is not expected or supposed to have line number info. > > Without that, the assembler just extends the previous .loc directive > onto the function. >
Theoretically we could exclude the range of the no-loc function from the .debug_ranges, then gdb would not even step into the function. However if we have at least a single line info as in the case of the thunks, then that would be better than nothing (what this patch does). Bernd.