summaryrefslogtreecommitdiffstats
path: root/libdw/dwarf.h
diff options
context:
space:
mode:
authorMark Wielaard <mark@klomp.org>2017-07-26 23:02:18 +0200
committerMark Wielaard <mark@klomp.org>2017-08-02 13:51:52 +0200
commitf9d791a92bce59cd68a909d77b94e5ece3c66c01 (patch)
treeb9543b782a92ff790100370fbac3f7f6ebc3ead0 /libdw/dwarf.h
parent274f28ce24955b2e6a17e9ff2eb0c7c2e5751f97 (diff)
libdw: Add DW_MACRO constants and DW_MACRO_GNU compatibility defines.
Accept version 5 .debug_macro format, which is identical to the GNU version 4 format. No real support yet for the new supplementary object file (sup) and indirect string references (strx). GCC doesn't generate them yet. readelf does recognize them, but doesn't try to decode them. dwarf_getmacros currently rejects the new formats. Signed-off-by: Mark Wielaard <mark@klomp.org>
Diffstat (limited to 'libdw/dwarf.h')
-rw-r--r--libdw/dwarf.h38
1 files changed, 28 insertions, 10 deletions
diff --git a/libdw/dwarf.h b/libdw/dwarf.h
index 82a68f26..902d2617 100644
--- a/libdw/dwarf.h
+++ b/libdw/dwarf.h
@@ -780,20 +780,38 @@ enum
};
-/* DWARF debug_macro type encodings. GNU/DWARF5 extension. */
+/* DWARF debug_macro type encodings. */
enum
{
- DW_MACRO_GNU_define = 0x01,
- DW_MACRO_GNU_undef = 0x02,
- DW_MACRO_GNU_start_file = 0x03,
- DW_MACRO_GNU_end_file = 0x04,
- DW_MACRO_GNU_define_indirect = 0x05,
- DW_MACRO_GNU_undef_indirect = 0x06,
- DW_MACRO_GNU_transparent_include = 0x07,
- DW_MACRO_GNU_lo_user = 0xe0,
- DW_MACRO_GNU_hi_user = 0xff
+ DW_MACRO_define = 0x01,
+ DW_MACRO_undef = 0x02,
+ DW_MACRO_start_file = 0x03,
+ DW_MACRO_end_file = 0x04,
+ DW_MACRO_define_strp = 0x05,
+ DW_MACRO_undef_strp = 0x06,
+ DW_MACRO_import = 0x07,
+ DW_MACRO_define_sup = 0x08,
+ DW_MACRO_undef_sup = 0x09,
+ DW_MACRO_import_sup = 0x0a,
+ DW_MACRO_define_strx = 0x0b,
+ DW_MACRO_undef_strx = 0x0c,
+ DW_MACRO_lo_user = 0xe0,
+ DW_MACRO_hi_user = 0xff
};
+/* Old GNU extension names for DWARF5 debug_macro type encodings.
+ There are no equivalents for the supplementary object file (sup)
+ and indirect string references (strx). */
+#define DW_MACRO_GNU_define DW_MACRO_define
+#define DW_MACRO_GNU_undef DW_MACRO_undef
+#define DW_MACRO_GNU_start_file DW_MACRO_start_file
+#define DW_MACRO_GNU_end_file DW_MACRO_end_file
+#define DW_MACRO_GNU_define_indirect DW_MACRO_define_strp
+#define DW_MACRO_GNU_undef_indirect DW_MACRO_undef_strp
+#define DW_MACRO_GNU_transparent_include DW_MACRO_import
+#define DW_MACRO_GNU_lo_user DW_MACRO_lo_user
+#define DW_MACRO_GNU_hi_user DW_MACRO_hi_user
+
/* DWARF call frame instruction encodings. */
enum