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

--- Comment #9 from Guinevere Larsen <blarsen at redhat dot com> ---
(In reply to Andrew Pinski from comment #8)
> (In reply to Guinevere Larsen from comment #7)
> > I understand that you could have multiple lines related to a single
> > instruction (even if I disagree it should happen at -Og). My question is,
> > why is it ok for an entry to have is_stmt and !is_stmt for the same
> > instruction?
> 
> I don't see that as an issue because they both are different column info.
> Why do you think that is an issue?

I misspoke in my last message. My question should have used "instruction"
instead of "entry", as in, how can a single instruction in the binary at once
have is_stmt and !is_stmt?

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.

> 
> Note try adding `-gno-as-loc-support ` and seeing if the special opcode is
> used because I didn't see it being used by GCC; it is the binutils assembly
> which generates it from the `.loc` and such.

I still see some special opcodes used when compiling with `g++
-gno-as-loc-support -fPIC -Og -g gcc_reproducer.cpp -o no_loc`, though the
output is slightly better than not using it.

Reply via email to