aboutsummaryrefslogtreecommitdiff
path: root/libiberty
diff options
context:
space:
mode:
authorMark Wielaard <mark@klomp.org>2020-09-23 16:41:06 +0200
committerMark Wielaard <mark@klomp.org>2020-09-24 22:55:24 +0200
commitd7b477c541bd31045483f37345727bd8335a052a (patch)
tree31f245e1c2ef5994cd8b0f5aa764a5172586cccf /libiberty
parentec47b32a85294af959457ad19bd98dd13f6389fd (diff)
downloadfsf-binutils-gdb-d7b477c541bd31045483f37345727bd8335a052a.zip
fsf-binutils-gdb-d7b477c541bd31045483f37345727bd8335a052a.tar.gz
fsf-binutils-gdb-d7b477c541bd31045483f37345727bd8335a052a.tar.bz2
Sync libiberty and include with GCC for get_DW_UT_name.
This adds a get_DW_UT_name function to dwarfnames using dwarf2.def for use in binutils readelf to show the unit types in a DWARF5 header. include/ChangeLog: Sync with GCC * dwarf2.def: Add DWARF5 Unit type header encoding macros DW_UT_FIRST, DW_UT and DW_UT_END. * dwarf2.h (enum dwarf_unit_type): Removed and define using DW_UT_FIRST, DW_UT and DW_UT_END macros. (get_DW_UT_name): New function declaration. libiberty/ChangeLog: Sync with GCC * dwarfnames.c (get_DW_UT_name): Define using DW_UT_FIRST, DW_UT and DW_UT_END.
Diffstat (limited to 'libiberty')
-rw-r--r--libiberty/ChangeLog6
-rw-r--r--libiberty/dwarfnames.c7
2 files changed, 13 insertions, 0 deletions
diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog
index e6280d5..b8d4169 100644
--- a/libiberty/ChangeLog
+++ b/libiberty/ChangeLog
@@ -1,3 +1,9 @@
+2020-09-23 Mark Wielaard <mark@klomp.org>
+
+ Sync with GCC
+ * dwarfnames.c (get_DW_UT_name): Define using DW_UT_FIRST, DW_UT
+ and DW_UT_END.
+
2020-09-11 Felix Willgerodt <felix.willgerodt@intel.com>
Sync with GCC
diff --git a/libiberty/dwarfnames.c b/libiberty/dwarfnames.c
index 968d191..af11668 100644
--- a/libiberty/dwarfnames.c
+++ b/libiberty/dwarfnames.c
@@ -64,6 +64,11 @@ Boston, MA 02110-1301, USA. */
switch (idx) { \
DW_IDX (name, value)
#define DW_END_IDX } return 0; }
+#define DW_FIRST_UT(name, value) \
+ const char *get_DW_UT_name (unsigned int ut) { \
+ switch (ut) { \
+ DW_UT (name, value)
+#define DW_END_UT } return 0; }
#define DW_TAG(name, value) case name: return # name ;
#define DW_TAG_DUP(name, value)
@@ -78,6 +83,7 @@ Boston, MA 02110-1301, USA. */
#define DW_CFA_DUP(name, value)
#define DW_IDX(name, value) case name: return # name ;
#define DW_IDX_DUP(name, value)
+#define DW_UT(name, value) case name: return # name ;
#include "dwarf2.def"
@@ -95,6 +101,7 @@ Boston, MA 02110-1301, USA. */
#undef DW_END_CFA
#undef DW_FIRST_IDX
#undef DW_END_IDX
+#undef DW_END_UT
#undef DW_TAG
#undef DW_TAG_DUP