On Jan 4, 2021, Bernd Edlinger <bernd.edlin...@hotmail.de> wrote: > currently there is a problem when debugging a virtual thunk. That is > a decl with DECL_IGNORED_P. Currently the line information displayed > in gdb is completely bogus, thus the last line of whatever function > is immediately before the PC of the thunk.
*nod*, I recall seeing such issues before, for compiler-generated functions. Ideally, there should be some .noloc directive in the assembler that would signal "no line number info for this code fragment", but I don't think we have anything like that. I don't recall whether using compiler-generated line number programs avoids the problem, but I do recall that -ffunction-sections works around it, because IIRC switching to a new section has the same effect of discontinuing the line number program that the desired .noloc directive would. -- Alexandre Oliva, happy hacker https://FSFLA.org/blogs/lxo/ Free Software Activist GNU Toolchain Engineer Vim, Vi, Voltei pro Emacs -- GNUlius Caesar