summaryrefslogtreecommitdiffstats
path: root/tapsets.cxx
diff options
context:
space:
mode:
authorfche <fche>2005-08-01 17:40:26 +0000
committerfche <fche>2005-08-01 17:40:26 +0000
commitd8067b24c81ff89a28ece9c52ba35fe6136d35f2 (patch)
treeec264e0422a39daf7a99a67823dc33f94786fbb6 /tapsets.cxx
parenta85c5829d137b452d1fa5839e8450e08ec61e406 (diff)
downloadsystemtap-steved-d8067b24c81ff89a28ece9c52ba35fe6136d35f2.tar.gz
systemtap-steved-d8067b24c81ff89a28ece9c52ba35fe6136d35f2.tar.xz
systemtap-steved-d8067b24c81ff89a28ece9c52ba35fe6136d35f2.zip
2005-08-01 Frank Ch. Eigler <fche@elastic.org>
* elaborate.cxx (derive_probes): Print error if results empty. * tapsets.cxx (dwflpp_assert): Handle positive RCs, which likely came from errno. (dwflpp::setup): Improve missing debug-info messages. * testsuite/semko/sixteen,seventeen.stp: New tests. * runtest.sh: Save stdout/stderr of FAIL/XPASS test cases. * Makefile.am (clean-local): Clean up testsuite/. * Makefile.in, aclocal.m4: Regenerated.
Diffstat (limited to 'tapsets.cxx')
-rw-r--r--tapsets.cxx14
1 files changed, 9 insertions, 5 deletions
diff --git a/tapsets.cxx b/tapsets.cxx
index e6d1c7dd..a51ce4e4 100644
--- a/tapsets.cxx
+++ b/tapsets.cxx
@@ -315,11 +315,13 @@ dwflpp
return t;
}
- void dwflpp_assert(string desc, int rc)
+ void dwflpp_assert(string desc, int rc) // NB: "rc == 0" means OK in this case
{
+ string msg = "dwfl failure (" + desc + "): ";
+ if (rc < 0) msg += dwfl_errmsg (rc);
+ else if (rc > 0) msg += strerror (rc);
if (rc != 0)
- throw semantic_error("dwfl failure (" + desc + "): "
- + dwfl_errmsg(rc));
+ throw semantic_error (msg);
}
dwflpp(systemtap_session & sess)
@@ -357,8 +359,10 @@ dwflpp
if (!dwfl)
throw semantic_error("cannot open dwfl");
dwfl_report_begin(dwfl);
- dwflpp_assert("report_kernel", dwfl_linux_kernel_report_kernel(dwfl));
- dwflpp_assert("report_modules", dwfl_linux_kernel_report_modules(dwfl));
+ // XXX: if we have only kernel.* probe points, we shouldn't waste time
+ // looking for module debug-info (and vice versa).
+ dwflpp_assert("find kernel debug-info", dwfl_linux_kernel_report_kernel(dwfl));
+ dwflpp_assert("find modules debug-info", dwfl_linux_kernel_report_modules(dwfl));
}
else
{