From 2a99f48ff1f873f537784d6f70d7641ada1ed7bd Mon Sep 17 00:00:00 2001 From: fche Date: Tue, 14 Feb 2006 22:12:07 +0000 Subject: 2006-02-14 Frank Ch. Eigler * stapfuncs.5.in: Document new queue_stats tapset. * elaborate.cxx (*): Put "while:" clarification messages before a thrown semantic error. * staptree.cxx (print_format::string_to_components): Correct parse of "%%" formatting element. * queue_stats.stp: New tapset. * systemtap.samples/queue_demo.*: New test. --- elaborate.cxx | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'elaborate.cxx') diff --git a/elaborate.cxx b/elaborate.cxx index ce8844ce..a906bb87 100644 --- a/elaborate.cxx +++ b/elaborate.cxx @@ -391,10 +391,10 @@ systemtap_session::register_library_aliases() } catch (const semantic_error& e) { - print_error (e); - cerr << " while: registering probe alias "; + cerr << "while: registering probe alias "; alias->printsig(cerr); cerr << endl; + print_error (e); } } } @@ -442,7 +442,7 @@ derive_probes (systemtap_session& s, { // XXX: prefer not to print_error at every nest/unroll level s.print_error (e); - cerr << " while: resolving probe point " << *loc << endl; + cerr << "while: resolving probe point " << *loc << endl; // if (! exc_outermost) // throw; } @@ -935,7 +935,11 @@ symresolution_info::visit_foreach_loop (foreach_loop* e) if (d) array->referent = d; else - throw semantic_error ("unresolved global array " + array->name, e->tok); + { + cerr << "while searching for arity " << e->indexes.size() + << " array:\n"; + throw semantic_error ("unresolved global array " + array->name, e->tok); + } } } else @@ -1071,7 +1075,10 @@ symresolution_info::visit_functioncall (functioncall* e) if (d) e->referent = d; else - throw semantic_error ("unresolved function call", e->tok); + { + cerr << "while searching for arity " << e->args.size() << " function:\n"; + throw semantic_error ("unresolved function call", e->tok); + } } -- cgit