diff options
author | Mark Wielaard <mjw@redhat.com> | 2008-11-03 11:22:39 +0100 |
---|---|---|
committer | Mark Wielaard <mjw@redhat.com> | 2008-11-03 11:22:39 +0100 |
commit | 194c6687d9ae044585bef5361a39c6a4373b6fbd (patch) | |
tree | 383ea7df7c7876afed9d092875f1a135341b2cdc | |
parent | 8576ea4be5619d9c169cab385ac0d31174fdee41 (diff) | |
download | systemtap-steved-194c6687d9ae044585bef5361a39c6a4373b6fbd.tar.gz systemtap-steved-194c6687d9ae044585bef5361a39c6a4373b6fbd.tar.xz systemtap-steved-194c6687d9ae044585bef5361a39c6a4373b6fbd.zip |
Add function name and file to semantic error messages for $return.
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | tapsets.cxx | 10 |
2 files changed, 13 insertions, 2 deletions
@@ -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 () + ")"))); } |