From 022b623fa22d305b1d294bf404ec88ca9112f210 Mon Sep 17 00:00:00 2001 From: dsmith Date: Mon, 26 Mar 2007 18:19:53 +0000 Subject: 2007-03-26 David Smith * tapsets.cxx (dwflpp::translate_final_fetch_or_store): Improved error messages for invalid types. * elaborate.cxx (typeresolution_info::invalid): Improved the error message for invalid operators. --- tapsets.cxx | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'tapsets.cxx') diff --git a/tapsets.cxx b/tapsets.cxx index 9fe3fba7..d05b548a 100644 --- a/tapsets.cxx +++ b/tapsets.cxx @@ -1624,6 +1624,8 @@ struct dwflpp Dwarf_Die typedie_mem; Dwarf_Die *typedie; int typetag; + char const *dname; + string diestr; typedie = resolve_unqualified_inner_typedie (&typedie_mem, attr_mem); typetag = dwarf_tag (typedie); @@ -1634,8 +1636,19 @@ struct dwflpp switch (typetag) { default: + dname = dwarf_diename(die); + diestr = (dname != NULL) ? dname : ""; throw semantic_error ("unsupported type tag " - + lex_cast(typetag)); + + lex_cast(typetag) + + " for " + diestr); + break; + + case DW_TAG_structure_type: + case DW_TAG_union_type: + dname = dwarf_diename(die); + diestr = (dname != NULL) ? dname : ""; + throw semantic_error ("struct/union '" + diestr + + "' is being accessed instead of a member of the struct/union"); break; case DW_TAG_enumeration_type: -- cgit