diff options
-rw-r--r-- | tapset-itrace.cxx | 2 | ||||
-rw-r--r-- | tapset-utrace.cxx | 3 | ||||
-rw-r--r-- | tapsets.cxx | 3 | ||||
-rwxr-xr-x | testsuite/semko/utrace.stp | 3 |
4 files changed, 11 insertions, 0 deletions
diff --git a/tapset-itrace.cxx b/tapset-itrace.cxx index 9fc59d42..84cfbf90 100644 --- a/tapset-itrace.cxx +++ b/tapset-itrace.cxx @@ -75,6 +75,8 @@ itrace_derived_probe::itrace_derived_probe (systemtap_session &s, ): derived_probe(p, l), has_path(hp), path(pn), pid(pd), single_step(ss) { + if (s.kernel_config["CONFIG_UTRACE"] != string("y")) + throw semantic_error ("process probes not available without kernel CONFIG_UTRACE"); } diff --git a/tapset-utrace.cxx b/tapset-utrace.cxx index d2ce9dd7..4e98fbf6 100644 --- a/tapset-utrace.cxx +++ b/tapset-utrace.cxx @@ -118,6 +118,9 @@ utrace_derived_probe::utrace_derived_probe (systemtap_session &s, has_path(hp), path(pn), pid(pd), flags(f), target_symbol_seen(false) { + if (s.kernel_config["CONFIG_UTRACE"] != string("y")) + throw semantic_error ("process probes not available without kernel CONFIG_UTRACE"); + // Expand local variables in the probe body utrace_var_expanding_visitor v (s, l, name, flags); v.replace (this->body); diff --git a/tapsets.cxx b/tapsets.cxx index 09ead991..9aa4964f 100644 --- a/tapsets.cxx +++ b/tapsets.cxx @@ -3882,6 +3882,9 @@ dwarf_builder::build(systemtap_session & sess, { module_name = find_executable (module_name); // canonicalize it + if (sess.kernel_config["CONFIG_UTRACE"] != string("y")) + throw semantic_error ("process probes not available without kernel CONFIG_UTRACE"); + // user-space target; we use one dwflpp instance per module name // (= program or shared library) dw = get_user_dw(sess, module_name); diff --git a/testsuite/semko/utrace.stp b/testsuite/semko/utrace.stp new file mode 100755 index 00000000..5cc649e9 --- /dev/null +++ b/testsuite/semko/utrace.stp @@ -0,0 +1,3 @@ +#! stap -p2 + +probe %( CONFIG_UTRACE != "y" %? process.begin %: never %) { } |