summaryrefslogtreecommitdiffstats
path: root/translate.cxx
diff options
context:
space:
mode:
authorfche <fche>2006-11-17 20:35:46 +0000
committerfche <fche>2006-11-17 20:35:46 +0000
commit9f36b77f43db9975865f01f5bda68a824d24fcfb (patch)
tree60261fe605b33632d186073155b592e36a5b9ed1 /translate.cxx
parent2566011f0b812d7b4e7cbcf8b28c1e8c05de5d94 (diff)
downloadsystemtap-steved-9f36b77f43db9975865f01f5bda68a824d24fcfb.tar.gz
systemtap-steved-9f36b77f43db9975865f01f5bda68a824d24fcfb.tar.xz
systemtap-steved-9f36b77f43db9975865f01f5bda68a824d24fcfb.zip
2006-11-17 Frank Ch. Eigler <fche@redhat.com>
* 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 <fche@redhat.com> * semko/thirtysix.stp, transko/three.stp: New tests.
Diffstat (limited to 'translate.cxx')
-rw-r--r--translate.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/translate.cxx b/translate.cxx
index 1a1ae09e..d427fdba 100644
--- a/translate.cxx
+++ b/translate.cxx
@@ -1169,7 +1169,8 @@ c_unparser::emit_function (functiondecl* v)
for (unsigned i=0; i<v->locals.size(); i++)
{
if (v->locals[i]->index_types.size() > 0) // array?
- throw semantic_error ("array locals not supported", v->locals[i]->tok);
+ throw semantic_error ("array locals not supported, missing global declaration?",
+ v->locals[i]->tok);
o->newline() << getvar (v->locals[i]).init();
}
@@ -1274,7 +1275,8 @@ c_unparser::emit_probe (derived_probe* v)
for (unsigned j=0; j<v->locals.size(); j++)
{
if (v->locals[j]->index_types.size() > 0) // array?
- throw semantic_error ("array locals not supported", v->tok);
+ throw semantic_error ("array locals not supported, missing global declaration?",
+ v->locals[j]->tok);
else if (v->locals[j]->type == pe_long)
o->newline() << "l->" << c_varname (v->locals[j]->name)
<< " = 0;";