This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Identifying source file locations.


kalmquist2@hotmail.com (Kenneth Almquist) writes:


> 
>  * Since RTL code is identified by line, it is not possible to
>    provide debuggers with the information required to implement
>    an "execute on statement" command that will work properly when
>    two statements appear on the same line.  I'm not aware of any
>    debuggers which provide this functionality, or any object file
>    formats which allow the required information to be stored, so
>    this may not be an issue.

Errr, DWARF2 does it fine.
And  i'm aware of many debuggers that support it.
GDB doesn't.  Yet. It's on my list.


> 
>  * When a statement spans multiple lines, the statement is
>    identified in the RTL (and hence in the debugging info) by
>    line containing the last token of the statement.  I note that
>    the Ada front end (GNAT) uses the line containing the first
>    token.  This seems to be largely a matter of taste; I can
>    see no convincing reason to believe that one is better than
>    the other.

When a statement spans multiple lines, we should say, in the debugging
info, and the RTL, that it spans multiple lines.

This is important for optimized code debugging.

This isn't that tricky to do, either, it just means we have to label
the INSN's with the line number they are for, rather than add notes with the line
number in front of them.

That way, when some optimization moves some code, we still know where
it really originated.

--Dan



-- 
"(Later:)  I bought one of those little glass ball things with
the snow in it...  Just checking.
"-Steven Wright


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]