diff options
author | fche <fche> | 2005-07-28 16:12:38 +0000 |
---|---|---|
committer | fche <fche> | 2005-07-28 16:12:38 +0000 |
commit | 377b88310b59601c0d967c55bd6a46ec024dc2de (patch) | |
tree | ab049a3ab79a7312c0f8cdf00098d1994df66677 /tapsets.cxx | |
parent | bc7a7312e332cc37c9ee22964fc586e3aa1ff903 (diff) | |
download | systemtap-steved-377b88310b59601c0d967c55bd6a46ec024dc2de.tar.gz systemtap-steved-377b88310b59601c0d967c55bd6a46ec024dc2de.tar.xz systemtap-steved-377b88310b59601c0d967c55bd6a46ec024dc2de.zip |
2005-07-28 Frank Ch. Eigler <fche@redhat.com>
translator/1120
translator/1123
* elaborate.cxx (semantic_pass_symbols): Print a more helpful
error message around exceptions.
* elaborate.h (systemtap_session): Add guru_mode field.
* main.cxx (main): Initialize it to false. Add version-sensitive
script library searching. Add more failure messages.
* tapsets.cxx (dwflpp_assert): Add a decorative text parameter.
Update callers.
Diffstat (limited to 'tapsets.cxx')
-rw-r--r-- | tapsets.cxx | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/tapsets.cxx b/tapsets.cxx index 43d50fb5..0d51d8f0 100644 --- a/tapsets.cxx +++ b/tapsets.cxx @@ -302,10 +302,11 @@ dwflpp return t; } - void dwflpp_assert(int rc) + void dwflpp_assert(string desc, int rc) { if (rc != 0) - throw semantic_error(string("dwfl failure: ") + dwfl_errmsg(rc)); + throw semantic_error("dwfl failure (" + desc + "): " + + dwfl_errmsg(rc)); } dwflpp(systemtap_session & sess) @@ -343,8 +344,8 @@ dwflpp if (!dwfl) throw semantic_error("cannot open dwfl"); dwfl_report_begin(dwfl); - dwflpp_assert(dwfl_linux_kernel_report_kernel(dwfl)); - dwflpp_assert(dwfl_linux_kernel_report_modules(dwfl)); + dwflpp_assert("report_kernel", dwfl_linux_kernel_report_kernel(dwfl)); + dwflpp_assert("report_modules", dwfl_linux_kernel_report_modules(dwfl)); } else { @@ -355,7 +356,7 @@ dwflpp // XXX: Find pids or processes, do userspace stuff. } - dwflpp_assert(dwfl_report_end(dwfl, NULL, NULL)); + dwflpp_assert("report_end", dwfl_report_end(dwfl, NULL, NULL)); } void iterate_over_modules(int (* callback)(Dwfl_Module *, void **, @@ -373,7 +374,7 @@ dwflpp while (off > 0); if (sess.verbose) clog << "finished iterating over modules" << endl; - dwflpp_assert(off); + dwflpp_assert("getdwarf", off); } void iterate_over_cus (int (*callback)(Dwarf_Die * die, void * arg), @@ -462,9 +463,9 @@ dwflpp assert(module); assert(cu); - dwflpp_assert(dwarf_getsrclines(cu, &lines, &nlines)); + dwflpp_assert("getsrclines", dwarf_getsrclines(cu, &lines, &nlines)); linep = dwarf_onesrcline(lines, line); - dwflpp_assert(dwarf_lineaddr(linep, &addr)); + dwflpp_assert("lineaddr", dwarf_lineaddr(linep, &addr)); if (sess.verbose) clog << "line " << line << " of cu " << cu_name |