[Bug debug/105036] Missing variables when debugging due to overlapping ranges after unrolling, instruction scheduling, and inlining at -O3

assaiante at diag dot uniroma1.it gcc-bugzilla@gcc.gnu.org
Thu Mar 24 13:27:16 GMT 2022


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105036

--- Comment #2 from Cristian Assaiante <assaiante at diag dot uniroma1.it> ---
Indeed, we understand some information may be lost for the sake of keeping
debug info correct.

We reported this in the first place because, besides the missing variables, a
wrong function (i.e., foo) is reported as executing in gdb, while the program
is executing a line located in its caller (i.e., main).

Perhaps, if it would be possible to fix the ranges as not to overlap, also the
missing variables would become visible? Since DWARF info for i=0, j=0 is
emitted but not in a way “retrievable” by gdb during source-level debugging.


More information about the Gcc-bugs mailing list