From 9f36b77f43db9975865f01f5bda68a824d24fcfb Mon Sep 17 00:00:00 2001 From: fche Date: Fri, 17 Nov 2006 20:35:46 +0000 Subject: 2006-11-17 Frank Ch. Eigler * tapsets.cxx (d_v_e_c_v::visit_target_symbol): Restore lost exception-saving functionality that improves error messages for incorrect $target expressions. (translate_components): Systematize error messages somewhat. * translate.cxx (emit_function, emit_probe): Clarify "array locals" error message. 2006-11-17 Frank Ch. Eigler * semko/thirtysix.stp, transko/three.stp: New tests. --- tapsets.cxx | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'tapsets.cxx') diff --git a/tapsets.cxx b/tapsets.cxx index d8e068d8..c17b43c2 100644 --- a/tapsets.cxx +++ b/tapsets.cxx @@ -1396,7 +1396,7 @@ struct dwflpp || ({ const char *member = dwarf_diename_integrate (die); member == NULL || string(member) != components[i].second; })) if (dwarf_siblingof (die, die_mem) != 0) - throw semantic_error ("field name " + components[i].second + " not found"); + throw semantic_error ("field '" + components[i].second + "' not found"); if (dwarf_attr_integrate (die, DW_AT_data_member_location, attr_mem) == NULL) @@ -1404,9 +1404,9 @@ struct dwflpp /* Union members don't usually have a location, but just use the containing union's location. */ if (typetag != DW_TAG_union_type) - throw semantic_error ("no location for field " + throw semantic_error ("no location for field '" + components[i].second - + " :" + string(dwarf_errmsg (-1))); + + "' :" + string(dwarf_errmsg (-1))); } else translate_location (pool, attr_mem, pc, NULL, tail); @@ -1414,9 +1414,9 @@ struct dwflpp break; case DW_TAG_base_type: - throw semantic_error ("field " + throw semantic_error ("field '" + components[i].second - + " vs base type " + + "' vs. base type " + string(dwarf_diename_integrate (die) ?: "")); break; case -1: @@ -2937,6 +2937,9 @@ dwarf_var_expanding_copy_visitor::visit_target_symbol (target_symbol *e) // up not being referenced after all, so it can be optimized out // quietly. provide (this, e); + semantic_error* saveme = new semantic_error (er); // copy it + saveme->tok1 = e->tok; // XXX: token not passed to q.dw code generation routines + e->saved_conversion_error = saveme; delete fdecl; delete ec; return; -- cgit