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.
This commit is contained in:
Mark Wielaard
2020-09-23 16:41:06 +02:00
parent ec47b32a85
commit d7b477c541
5 changed files with 44 additions and 13 deletions

View File

@@ -805,3 +805,14 @@ DW_IDX (DW_IDX_hi_user, 0x3fff)
DW_IDX (DW_IDX_GNU_internal, 0x2000)
DW_IDX (DW_IDX_GNU_external, 0x2001)
DW_END_IDX
/* DWARF5 Unit type header encodings */
DW_FIRST_UT (DW_UT_compile, 0x01)
DW_UT (DW_UT_type, 0x02)
DW_UT (DW_UT_partial, 0x03)
DW_UT (DW_UT_skeleton, 0x04)
DW_UT (DW_UT_split_compile, 0x05)
DW_UT (DW_UT_split_type, 0x06)
DW_UT (DW_UT_lo_user, 0x80)
DW_UT (DW_UT_hi_user, 0xff)
DW_END_UT