[Bug debug/115943] g++ generates contradictory line table entries
pinskia at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Jul 15 21:06:46 GMT 2024
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115943
--- Comment #10 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Guinevere Larsen from comment #9)
> I'm confused because, according to the DWARF spec:
>
> [is_stmt indicates] that the current instruction is a recommended breakpoint
> location. A recommended breakpoint location is intended to “represent” a
> line, a statement and/or a semantically distinct subpart of a statement.
>
> and entries 1 and 2 of my original example were for the same instruction,
> 0x401126, and they disagreed on if the instruction should or shouldn't be a
> breakpoint location.
I don't see how that is an issue because one entry is to be used for the
breakpoint location (at a specific column) while the other one is not to be
used for a breakpoint location.
It looks like you are not printing out the column info from what is read in
from the dwarf either.
Looking at the original `.loc` at that is on the same address:
```
.loc 1 8 5 view .LVU1
.loc 1 8 23 is_stmt 0 view .LVU2
mov x0, 0
.LVL1:
.loc 1 8 23 view .LVU3
```
Note for the first address, the first line info is column 5 while the second
one is column 23. Yes both are line 8 but different coumns. And then you have a
second line info for :8:23 which does not have is_stmt set.
More information about the Gcc-bugs
mailing list