This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Designs for better debug info in GCC
- From: Alexandre Oliva <aoliva at redhat dot com>
- To: "Steven Bosscher" <stevenb dot gcc at gmail dot com>
- Cc: "Mark Mitchell" <mark at codesourcery dot com>, "Ian Lance Taylor" <iant at google dot com>, "Richard Guenther" <richard dot guenther at gmail dot com>, gcc-patches at gcc dot gnu dot org, gcc at gcc dot gnu dot org
- Date: Fri, 23 Nov 2007 18:45:15 -0200
- Subject: Re: Designs for better debug info in GCC
- References: <571f6b510711121208m2bf7c77fp884f52d458df118b@mail.gmail.com>
On Nov 12, 2007, "Steven Bosscher" <stevenb.gcc@gmail.com> wrote:
> DEBUG_INSN in RTL (with one noteworthy difference, namely that having
> note-like GIPMLE statements is a totally new concept
Not quite. There were codeless gimple constructs before (think
labels, for one). Or empty asm statements. But then, I'm not sure
what you mean by note-like; maybe it's something else. As I explained
before, debug insns and debug stmts are more like code than like
notes, because notes generally don't need adjusting as code is
modified elsewhere, whereas code does. And debug insns and stmts
definitely need adjusting like regular insns.
> while DEBUG_INSN is just a wannabe-real-insn INSN_NOTE).
Except for this tiny detail that INSN_NOTEs are never adjusted as code
is modified, because in general they don't even contain RTL.
VAR_LOCATION is a recent exception, and it used to be introduced so
late precisely because there's no infrastructure to keep notes
up-to-date as code transformations are performed.
So, yes, debug stmts and insns are notes in the sense that they don't
output code. Like USE insns, labels, empty asm insns and other
UNSPECs. But wait, those are insns, not notes. And they do generate
code, just not in the .text section, but rather in .debug sections.
So, what's this prejudice against debug insns? Why do you regard them
as notes rather than insns?
--
Alexandre Oliva http://www.lsd.ic.unicamp.br/~oliva/
FSF Latin America Board Member http://www.fsfla.org/
Red Hat Compiler Engineer aoliva@{redhat.com, gcc.gnu.org}
Free Software Evangelist oliva@{lsd.ic.unicamp.br, gnu.org}