From 194c6687d9ae044585bef5361a39c6a4373b6fbd Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Mon, 3 Nov 2008 11:22:39 +0100 Subject: Add function name and file to semantic error messages for $return. --- ChangeLog | 5 +++++ tapsets.cxx | 10 ++++++++-- 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 + + * tapsets.cxx (literal_stmt_for_return): Add function name and file + to semantic error messages. + 2008-10-29 Frank Ch. Eigler * 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(pc) + + " for " + dwarf_diename (scope_die) + + "(" + dwarf_diename (cu) + ")" + (alternatives.str() == "" ? "" : (" (alternatives:" + alternatives.str () + ")"))); } -- cgit