[PATCH] D15460: Add DWARF 5 macro attributes and macro information entry types.

Siva Chandra via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 11 11:52:10 PST 2015


sivachandra created this revision.
sivachandra added a reviewer: echristo.
sivachandra added a subscriber: llvm-commits.

This adds support for the .debug_macro section of the DWARF 5 spec.

http://reviews.llvm.org/D15460

Files:
  include/llvm/Support/Dwarf.h

Index: include/llvm/Support/Dwarf.h
===================================================================
--- include/llvm/Support/Dwarf.h
+++ include/llvm/Support/Dwarf.h
@@ -196,6 +196,7 @@
   DW_AT_dwo_name = 0x76,
   DW_AT_reference = 0x77,
   DW_AT_rvalue_reference = 0x78,
+  DW_AT_macros = 0x79,
 
   DW_AT_lo_user = 0x2000,
   DW_AT_hi_user = 0x3fff,
@@ -231,6 +232,7 @@
   DW_AT_GNU_template_name = 0x2110,
 
   DW_AT_GNU_odr_signature = 0x210f,
+  DW_AT_GNU_macros = 0x2119,
 
   // Extensions for Fission proposal.
   DW_AT_GNU_dwo_name = 0x2130,
@@ -458,6 +460,24 @@
   DW_MACINFO_vendor_ext = 0xff
 };
 
+enum MacroEntryType {
+  // Macro Information Entry Type Encodings
+  DW_MACRO_define = 0x01,
+  DW_MACRO_undef = 0x02,
+  DW_MACRO_start_file = 0x03,
+  DW_MACRO_end_file = 0x04,
+  DW_MACRO_define_indirect = 0x05,
+  DW_MACRO_undef_indirect = 0x06,
+  DW_MACRO_transparent_include = 0x07,
+  DW_MACRO_define_indirect_sup = 0x08,
+  DW_MACRO_undef_indirect_sup = 0x09,
+  DW_MACRO_transparent_include_sup = 0x0a,
+  DW_MACRO_define_indirectx = 0x0b,
+  DW_MACRO_undef_indirectx = 0x0c,
+  DW_MACRO_lo_user = 0xe0,
+  DW_MACRO_hi_user = 0xff
+};
+
 enum CallFrameInfo {
   // Call frame instruction encodings
   DW_CFA_extended = 0x00,


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D15460.42553.patch
Type: text/x-patch
Size: 1252 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151211/37c75f91/attachment.bin>


More information about the llvm-commits mailing list