From 23d106b9c554c2b32dfb8c94dc963834f65ef7df Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Fri, 7 Aug 2009 18:51:19 -0700 Subject: Zap dwarf_diename_integrate The dwarf_diename in elfutils learned a long time ago to use dwarf_attr_integrate when looking up the name. Our minimum elfutils 0.126 has this, so we don't need to kludge it ourselves. --- dwflpp.cxx | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'dwflpp.cxx') diff --git a/dwflpp.cxx b/dwflpp.cxx index ff62265f..9d0f3f4d 100644 --- a/dwflpp.cxx +++ b/dwflpp.cxx @@ -1561,7 +1561,7 @@ dwflpp::print_members(Dwarf_Die *vardie, ostream &o) if (typetag != DW_TAG_structure_type && typetag != DW_TAG_union_type) { o << " Error: " - << (dwarf_diename_integrate (vardie) ?: "") + << (dwarf_diename (vardie) ?: "") << " isn't a struct/union"; return; } @@ -1573,14 +1573,14 @@ dwflpp::print_members(Dwarf_Die *vardie, ostream &o) { case 1: // No children. o << ((typetag == DW_TAG_union_type) ? " union " : " struct ") - << (dwarf_diename_integrate (die) ?: "") + << (dwarf_diename (die) ?: "") << " is empty"; break; case -1: // Error. default: // Shouldn't happen. o << ((typetag == DW_TAG_union_type) ? " union " : " struct ") - << (dwarf_diename_integrate (die) ?: "") + << (dwarf_diename (die) ?: "") << ": " << dwarf_errmsg (-1); break; @@ -1591,7 +1591,7 @@ dwflpp::print_members(Dwarf_Die *vardie, ostream &o) // Output each sibling's name to 'o'. while (dwarf_tag (die) == DW_TAG_member) { - const char *member = dwarf_diename_integrate (die) ; + const char *member = dwarf_diename (die) ; if ( member != NULL ) o << " " << member; @@ -1641,7 +1641,7 @@ dwflpp::find_struct_member(const target_symbol::component& c, case -1: /* Error. */ default: /* Shouldn't happen */ throw semantic_error (string (dwarf_tag(&die) == DW_TAG_union_type ? "union" : "struct") - + string (dwarf_diename_integrate (&die) ?: "") + + string (dwarf_diename (&die) ?: "") + string (dwarf_errmsg (-1)), c.tok); } @@ -1651,7 +1651,7 @@ dwflpp::find_struct_member(const target_symbol::component& c, if (dwarf_tag(&die) != DW_TAG_member) continue; - const char *name = dwarf_diename_integrate(&die); + const char *name = dwarf_diename(&die); if (name == NULL) { // need to recurse for anonymous structs/unions @@ -1774,7 +1774,7 @@ dwflpp::translate_components(struct obstack *pool, Dwarf_Die *tmpdie = dwflpp::declaration_resolve(dwarf_diename(die)); if (tmpdie == NULL) throw semantic_error ("unresolved struct " - + string (dwarf_diename_integrate (die) ?: ""), + + string (dwarf_diename (die) ?: ""), c.tok); *die_mem = *tmpdie; } @@ -1790,7 +1790,7 @@ dwflpp::translate_components(struct obstack *pool, alternatives = " (alternatives:" + members.str(); throw semantic_error("unable to find member '" + c.member + "' for struct " - + string(dwarf_diename_integrate(die) ?: "") + + string(dwarf_diename(die) ?: "") + alternatives, c.tok); } @@ -1806,14 +1806,14 @@ dwflpp::translate_components(struct obstack *pool, throw semantic_error ("invalid access '" + lex_cast(c) + "' vs. enum type " - + string(dwarf_diename_integrate (die) ?: ""), + + string(dwarf_diename (die) ?: ""), c.tok); break; case DW_TAG_base_type: throw semantic_error ("invalid access '" + lex_cast(c) + "' vs. base type " - + string(dwarf_diename_integrate (die) ?: ""), + + string(dwarf_diename (die) ?: ""), c.tok); break; case -1: @@ -1822,7 +1822,7 @@ dwflpp::translate_components(struct obstack *pool, break; default: - throw semantic_error (string(dwarf_diename_integrate (die) ?: "") + throw semantic_error (string(dwarf_diename (die) ?: "") + ": unexpected type tag " + lex_cast(dwarf_tag (die)), c.tok); -- cgit