summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--tapsets.cxx10
2 files changed, 13 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index b5ceb2e0..9243d4f8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-11-03 Mark Wielaard <mjw@redhat.com>
+
+ * tapsets.cxx (literal_stmt_for_return): Add function name and file
+ to semantic error messages.
+
2008-10-29 Frank Ch. Eigler <fche@elastic.org>
* translate.cxx (dump_unwindsyms): Work on CONFIG_RELOCATABLE=n
diff --git a/tapsets.cxx b/tapsets.cxx
index 8b871ac7..0df55d51 100644
--- a/tapsets.cxx
+++ b/tapsets.cxx
@@ -2295,12 +2295,16 @@ struct dwflpp
&locops);
if (nlocops < 0)
{
- throw semantic_error("failed to retrieve return value location");
+ throw semantic_error("failed to retrieve return value location"
+ " for " + string (dwarf_diename (scope_die))
+ + "(" + string (dwarf_diename (cu)) + ")");
}
// the function has no return value (e.g. "void" in C)
else if (nlocops == 0)
{
- throw semantic_error("function has no return value");
+ throw semantic_error("function " + string (dwarf_diename (scope_die))
+ + "(" + string (dwarf_diename (cu))
+ + ") has no return value");
}
struct location *head = c_translate_location (&pool, &loc2c_error, this,
@@ -2328,6 +2332,8 @@ struct dwflpp
print_members(die,alternatives);
throw semantic_error("unable to find return value"
" near pc " + lex_cast_hex<string>(pc)
+ + " for " + dwarf_diename (scope_die)
+ + "(" + dwarf_diename (cu) + ")"
+ (alternatives.str() == "" ? "" : (" (alternatives:" + alternatives.str () + ")")));
}