diff options
author | Tim Moore <timoore@redhat.com> | 2009-12-18 17:56:24 +0100 |
---|---|---|
committer | Tim Moore <timoore@redhat.com> | 2009-12-18 19:11:07 +0100 |
commit | 471fca5e53a239f7fa4d04b7b6d6f53765a3d598 (patch) | |
tree | 405a6cda2f7c18c26ac20fcfb42c7849f56c0e73 /tapsets.cxx | |
parent | 4180475982d87f720897baa6f988a48b4c654ee5 (diff) | |
download | systemtap-steved-471fca5e53a239f7fa4d04b7b6d6f53765a3d598.tar.gz systemtap-steved-471fca5e53a239f7fa4d04b7b6d6f53765a3d598.tar.xz systemtap-steved-471fca5e53a239f7fa4d04b7b6d6f53765a3d598.zip |
Remove uprobes.h declaration from runtime.h
Turns out that it breaks on kernels that don't have utrace.
* runtime/runtime.h : Don't include uprobes.h
* runtime/stack.c: Include uprobes.h
* runtime/stack-i386.c: Check if uprobes is included at all.
* runtime/stack-x86_64.c: ditto
* tapsets.cxx (uprobe_derived_probe_group::emit_module_decls): put
uprobes.h include back in.
Diffstat (limited to 'tapsets.cxx')
-rw-r--r-- | tapsets.cxx | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tapsets.cxx b/tapsets.cxx index 5729757b..007aea6d 100644 --- a/tapsets.cxx +++ b/tapsets.cxx @@ -4576,6 +4576,16 @@ uprobe_derived_probe_group::emit_module_decls (systemtap_session& s) { if (probes.empty()) return; s.op->newline() << "/* ---- user probes ---- */"; + // If uprobes isn't in the kernel, pull it in from the runtime. + + s.op->newline() << "#if defined(CONFIG_UPROBES) || defined(CONFIG_UPROBES_MODULE)"; + s.op->newline() << "#include <linux/uprobes.h>"; + s.op->newline() << "#else"; + s.op->newline() << "#include \"uprobes/uprobes.h\""; + s.op->newline() << "#endif"; + s.op->newline() << "#ifndef UPROBES_API_VERSION"; + s.op->newline() << "#define UPROBES_API_VERSION 1"; + s.op->newline() << "#endif"; // We'll probably need at least this many: unsigned minuprobes = probes.size(); |