From 433dc780ca48944b6905bdbb82c0ca01d24080d5 Mon Sep 17 00:00:00 2001 From: Arnaldo Carvalho de Melo Date: Fri, 12 Nov 2021 15:16:51 -0300 Subject: [PATCH] fprintf: Add DWARF5 tags added in elfutils 0.170 Now we know what that 0x4a thing is: $ pahole ~/c/split/foo.o die__process: DW_TAG_compile_unit, DW_TAG_type_unit or DW_TAG_partial_unit expected got skeleton_unit (0x4a)! $ Signed-off-by: Arnaldo Carvalho de Melo --- dwarves_fprintf.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/dwarves_fprintf.c b/dwarves_fprintf.c index 64a8c93..c5921d7 100644 --- a/dwarves_fprintf.c +++ b/dwarves_fprintf.c @@ -84,6 +84,15 @@ static const char *dwarf_tag_names[] = { [DW_TAG_type_unit] = "type_unit", [DW_TAG_rvalue_reference_type] = "rvalue_reference_type", #endif +#if _ELFUTILS_PREREQ(0, 170) + [DW_TAG_coarray_type] = "coarray_type", + [DW_TAG_generic_subrange] = "generic_subrange", + [DW_TAG_dynamic_type] = "dynamic_type", + [DW_TAG_call_site] = "call_site", + [DW_TAG_call_site_parameter] = "call_site_parameter", + [DW_TAG_skeleton_unit] = "skeleton_unit", + [DW_TAG_immutable_type] = "immutable_type", +#endif }; static const char *dwarf_gnu_tag_names[] = { @@ -107,10 +116,14 @@ static const char *dwarf_gnu_tag_names[] = { const char *dwarf_tag_name(const uint32_t tag) { if (tag >= DW_TAG_array_type && tag <= +#if _ELFUTILS_PREREQ(0, 170) + DW_TAG_immutable_type +#else #ifdef STB_GNU_UNIQUE DW_TAG_rvalue_reference_type #else DW_TAG_shared_type +#endif #endif ) return dwarf_tag_names[tag];