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 /runtime | |
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 'runtime')
-rw-r--r-- | runtime/runtime.h | 10 | ||||
-rw-r--r-- | runtime/stack-i386.c | 2 | ||||
-rw-r--r-- | runtime/stack-x86_64.c | 2 | ||||
-rw-r--r-- | runtime/stack.c | 14 |
4 files changed, 16 insertions, 12 deletions
diff --git a/runtime/runtime.h b/runtime/runtime.h index 0fd2a380..91c48d57 100644 --- a/runtime/runtime.h +++ b/runtime/runtime.h @@ -31,16 +31,6 @@ #include <linux/sched.h> #include <linux/mm.h> -/* If uprobes isn't in the kernel, pull it in from the runtime. */ -#if defined(CONFIG_UPROBES) || defined(CONFIG_UPROBES_MODULE) -#include <linux/uprobes.h> -#else -#include "uprobes/uprobes.h" -#endif -#ifndef UPROBES_API_VERSION -#define UPROBES_API_VERSION 1 -#endif - #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15) #if !defined (CONFIG_DEBUG_FS) && !defined (CONFIG_DEBUG_FS_MODULE) diff --git a/runtime/stack-i386.c b/runtime/stack-i386.c index 4bd3cc53..66d892d3 100644 --- a/runtime/stack-i386.c +++ b/runtime/stack-i386.c @@ -63,7 +63,7 @@ static void __stp_stack_print (struct pt_regs *regs, int verbose, int levels, while (levels && (tsk || !arch_unw_user_mode(&info))) { int ret = unwind(&info, tsk); -#if UPROBES_API_VERSION > 1 +#if defined(UPROBES_API_VERSION) && UPROBES_API_VERSION > 1 unsigned long maybe_pc = 0; if (ri) { maybe_pc = uprobe_get_pc(ri, UNW_PC(&info), diff --git a/runtime/stack-x86_64.c b/runtime/stack-x86_64.c index 80ebd3e7..d6c63412 100644 --- a/runtime/stack-x86_64.c +++ b/runtime/stack-x86_64.c @@ -38,7 +38,7 @@ static void __stp_stack_print(struct pt_regs *regs, int verbose, int levels, while (levels && (tsk || !arch_unw_user_mode(&info))) { int ret = unwind(&info, tsk); -#if UPROBES_API_VERSION > 1 +#if defined(UPROBES_API_VERSION) && UPROBES_API_VERSION > 1 unsigned long maybe_pc = 0; if (ri) { maybe_pc = uprobe_get_pc(ri, UNW_PC(&info), 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 <linux/uprobes.h> +#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 <linux/stacktrace.h> #include <asm/stacktrace.h> |