HomePhabricator

[DebugInfo] Introduce GNU macro extension entry encodings

Authored by dstenb on Aug 11 2020, 1:53 AM.

Description

[DebugInfo] Introduce GNU macro extension entry encodings

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

Reviewed By: dblaikie

Differential Revision: https://reviews.llvm.org/D82972

Details

Committed
dstenbAug 11 2020, 4:30 AM
Reviewer
dblaikie
Differential Revision
D82972: [DebugInfo] Introduce GNU macro extension entry encodings
Parents
rGa73008c1aed2: [DebugInfo] Refactor .debug_macro checks. NFCI
Branches
Unknown
Tags
Unknown