From 1c7643a90117ffb88fa5f1e8e8aea24a8436de83 Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Tue, 11 Nov 2008 13:26:47 +0100 Subject: Add scope name to semantic error messages if available when finding locals. --- tapsets.cxx | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tapsets.cxx') diff --git a/tapsets.cxx b/tapsets.cxx index 8d371a8a..f3b6d3ff 100644 --- a/tapsets.cxx +++ b/tapsets.cxx @@ -1677,6 +1677,9 @@ struct dwflpp { throw semantic_error ("unable to find any scopes containing " + lex_cast_hex(pc) + + ((scope_die == NULL) ? "" + : (string (" in ") + dwarf_diename (scope_die) + + "(" + dwarf_diename (cu) + ")")) + " while searching for local '" + local + "'"); } @@ -1690,6 +1693,9 @@ struct dwflpp print_locals (scopes, alternatives); throw semantic_error ("unable to find local '" + local + "'" + " near pc " + lex_cast_hex(pc) + + ((scope_die == NULL) ? "" + : (string (" in ") + dwarf_diename (scope_die) + + "(" + dwarf_diename (cu) + ")")) + (alternatives.str() == "" ? "" : (" (alternatives:" + alternatives.str () + ")"))); } -- cgit