Page MenuHomePhabricator

[DebugInfo] Introduce GNU macro extension entry encodings
ClosedPublic

Authored by dstenb on Jul 1 2020, 8:51 AM.

Details

Summary

This is a preparatory patch for allowing the GNU .debug_macro extension,
which is a precursor to the DWARF 5 format, to be emitted by LLVM for
earlier DWARF versions.

The entries share the same encoding and behavior as in DWARF5; there are
just more entries in the DWARF 5 format. Therefore, we could have used
those existing DWARF 5 entries, but I think that explicitly referring to
the GNU macro variants makes the code more clear.

The defines that this patch introduces can be found in GCC in the dwarf2.h header:

https://gcc.gnu.org/git/?p=gcc.git;a=blob;
f=include/dwarf2.h;
h=0b6facfd4cf4c02320c7328114231b128ab42d5e;
hb=dccbf1e2a6e544f71b4a5795f0c79015db019fc3#l425

Diff Detail

Event Timeline

dstenb created this revision.Jul 1 2020, 8:51 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 1 2020, 8:51 AM
dblaikie accepted this revision.Jul 1 2020, 12:58 PM

looks good - please include a link to the source of these values (literally the GCC source code, or some other reference) in the commit message and maybe in a comment near the "GNU .debug_macro extension." bit.

This revision is now accepted and ready to land.Jul 1 2020, 12:58 PM

Do we really need this ?, Please have a look at https://sourceware.org/legacy-ml/gdb-patches/2017-02/msg00528.html
IMO, it would be unwise to commit it till the discussion thread in D82975 converges ?

dstenb edited the summary of this revision. (Show Details)Jul 6 2020, 7:53 AM
dstenb edited the summary of this revision. (Show Details)
dstenb added a comment.Jul 6 2020, 7:55 AM

Do we really need this ?, Please have a look at https://sourceware.org/legacy-ml/gdb-patches/2017-02/msg00528.html
IMO, it would be unwise to commit it till the discussion thread in D82975 converges ?

As I write in the commit message this patch is not strictly needed, but I think it makes the code more clear.

I'll wait with this patch until we decide in D82975.

This revision was landed with ongoing or failed builds.Tue, Aug 11, 4:31 AM
This revision was automatically updated to reflect the committed changes.