diff options
author | Petr Machata <pmachata@redhat.com> | 2011-02-25 14:39:41 +0100 |
---|---|---|
committer | Petr Machata <pmachata@redhat.com> | 2011-02-25 14:39:41 +0100 |
commit | e986339ce83fd920de4e2aee1ab5c300b1518eeb (patch) | |
tree | d8645172dc907748423b6bf7ca9bed1f283f2240 | |
parent | 5d8edbd228a56595c0261d23ad73e1cf0b4d9bc6 (diff) | |
parent | b0ce9efa2135e22cc7fdb3e796522817788bb53b (diff) | |
download | elfutils-e986339ce83fd920de4e2aee1ab5c300b1518eeb.tar.gz |
Merge branch 'dwarf' of ssh://git.fedorahosted.org/git/elfutils into dwarf
-rw-r--r-- | src/dwarfstrings.c | 28 | ||||
-rw-r--r-- | tests/Makefile.am | 3 | ||||
-rw-r--r-- | tests/dwarf_edit_output.cc | 10 | ||||
-rwxr-xr-x | tests/run-dwarfcmp-self.sh | 2 |
4 files changed, 34 insertions, 9 deletions
diff --git a/src/dwarfstrings.c b/src/dwarfstrings.c index b340f026..3909e131 100644 --- a/src/dwarfstrings.c +++ b/src/dwarfstrings.c @@ -97,6 +97,9 @@ dwarf_tag_string (unsigned int tag) [DW_TAG_mutable_type] = "mutable_type", [DW_TAG_condition] = "condition", [DW_TAG_shared_type] = "shared_type", + [DW_TAG_type_unit] = "type_unit", + [DW_TAG_rvalue_reference_type] = "rvalue_reference_type", + [DW_TAG_template_alias] = "template_alias", }; const unsigned int nknown_tags = (sizeof (known_tags) / sizeof (known_tags[0])); @@ -126,6 +129,26 @@ dwarf_tag_string (unsigned int tag) result = "class_template"; break; + case DW_TAG_GNU_BINCL: + result = "GNU_BINCL"; + break; + + case DW_TAG_GNU_EINCL: + result = "GNU_EINCL"; + break; + + case DW_TAG_GNU_template_template_param: + result = "GNU_template_template_param"; + break; + + case DW_TAG_GNU_template_parameter_pack: + result = "GNU_template_parameter_pack"; + break; + + case DW_TAG_GNU_formal_parameter_pack: + result = "GNU_formal_parameter_pack"; + break; + default: if (tag < DW_TAG_lo_user) snprintf (buf, sizeof buf, gettext ("unknown tag %hx"), tag); @@ -233,6 +256,11 @@ dwarf_attr_string (unsigned int attrnum) [DW_AT_elemental] = "elemental", [DW_AT_pure] = "pure", [DW_AT_recursive] = "recursive", + [DW_AT_signature] = "signature", + [DW_AT_main_subprogram] = "main_subprogram", + [DW_AT_data_bit_offset] = "data_bit_offset", + [DW_AT_const_expr] = "const_expr", + [DW_AT_enum_class] = "enum_class", [DW_AT_linkage_name] = "linkage_name", }; const unsigned int nknown_attrs = (sizeof (known_attrs) diff --git a/tests/Makefile.am b/tests/Makefile.am index a33e0521..641bce2e 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -214,8 +214,7 @@ dwarf_print_LDADD = $(libdwpp) $(libmudflap) -ldl dwarf_edit_SOURCES = dwarf_edit.cc print-die.cc dwarf_edit_LDADD = $(libdwpp) $(libmudflap) -ldl -dwarf_edit_output_SOURCES = dwarf_edit_output.cc print-die.cc \ - ../src/dwarfstrings.c +dwarf_edit_output_SOURCES = dwarf_edit_output.cc print-die.cc dwarf_edit_output_LDADD = $(libdwpp) $(libmudflap) -ldl arextract_LDADD = $(libelf) $(libmudflap) diff --git a/tests/dwarf_edit_output.cc b/tests/dwarf_edit_output.cc index b1483d19..7e3def94 100644 --- a/tests/dwarf_edit_output.cc +++ b/tests/dwarf_edit_output.cc @@ -37,8 +37,6 @@ #include "c++/subr.hh" -#include "../src/dwarfstrings.h" - using namespace elfutils; using namespace std; @@ -520,7 +518,7 @@ test_last_two_dies (dwarf_edit &in, dwarf_output &out, int tag, bool same, cmp compare; if (compare.compare_dies (*die1, *die2, in) != same) error (-1, 0, "dwarf_comparator fail %s test #%d '%s'", - dwarf_tag_string (tag), n, name); + dwarf::tags::name (tag).c_str (), n, name); } dwarf_output::compile_units_type::const_iterator cu; @@ -537,7 +535,7 @@ test_last_two_dies (dwarf_edit &in, dwarf_output &out, int tag, bool same, it++; } if (show_output) - cout << "offset last (" << dwarf_tag_string (tag) << ") cu1: " + cout << "offset last (" << dwarf::tags::name (tag) << ") cu1: " << hex << off1 << endl; cu++; @@ -549,14 +547,14 @@ test_last_two_dies (dwarf_edit &in, dwarf_output &out, int tag, bool same, it++; } if (show_output) - cout << "offset last (" << dwarf_tag_string (tag) << ") cu2: " + cout << "offset last (" << dwarf::tags::name (tag) << ") cu2: " << hex << off2 << endl; bool both_zero = off1 == 0 && off2 == 0; bool equal = off1 == off2; if (! both_zero && equal != same) error (-1, 0, "dwarf_comparator fail %s test #%d '%s'", - dwarf_tag_string (tag), n, name); + dwarf::tags::name (tag).c_str (), n, name); } diff --git a/tests/run-dwarfcmp-self.sh b/tests/run-dwarfcmp-self.sh index efc14047..02bf4be4 100755 --- a/tests/run-dwarfcmp-self.sh +++ b/tests/run-dwarfcmp-self.sh @@ -62,7 +62,7 @@ runtest ../src/unstrip runtest ../*/*.so # These are the biggest ones. -runtest ../src/dwarflint +runtest ../dwarflint/dwarflint runtest ../src/dwarfcmp runtest ../src/dwarfcmp-test |