From 471fca5e53a239f7fa4d04b7b6d6f53765a3d598 Mon Sep 17 00:00:00 2001 From: Tim Moore Date: Fri, 18 Dec 2009 17:56:24 +0100 Subject: 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. --- runtime/stack.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'runtime/stack.c') diff --git a/runtime/stack.c b/runtime/stack.c index 3d907a7f..4dd1dca3 100644 --- a/runtime/stack.c +++ b/runtime/stack.c @@ -27,6 +27,20 @@ #define MAXBACKTRACE 20 +/* If uprobes isn't in the kernel, pull it in from the runtime. */ +#if defined(CONFIG_UTRACE) /* uprobes doesn't work without utrace */ +#if defined(CONFIG_UPROBES) || defined(CONFIG_UPROBES_MODULE) +#include +#else +#include "uprobes/uprobes.h" +#endif +#ifndef UPROBES_API_VERSION +#define UPROBES_API_VERSION 1 +#endif +#else +struct uretprobe_instance; +#endif + #if defined(STAPCONF_KERNEL_STACKTRACE) #include #include -- cgit