PATCH: stap fails if !CONFIG_FRAME_POINTER && !CONFIG_UTRACE

Tony Jones tonyj@suse.de
Thu Jun 10 11:18:00 GMT 2010


In a kernel without FRAME_POINTERS (using the DWARF UNWINDER) and without
UTRACE I see the following in latest git master:

# make -C `pwd` M=/tmp/stapPHqTen
make: Entering directory `/usr/src/linux-2.6.34-8-obj/i386/default'
make -C ../../../linux-2.6.34-8 O=/usr/src/linux-2.6.34-8-obj/i386/default/. 
  CC [M]  /tmp/stapPHqTen/stap_12068.o
In file included from /tmp/stap/share/systemtap/runtime/stack.c:56:0,
                 from /tmp/stapPHqTen/stap_12068.c:52:
/tmp/stap/share/systemtap/runtime/stack-i386.c: In function ‘__stp_stack_print’:
/tmp/stap/share/systemtap/runtime/stack-i386.c:69:25: error: implicit declaration of function ‘uprobe_get_pc’
In file included from /tmp/stapPHqTen/stap_12068.c:52:0:
/tmp/stap/share/systemtap/runtime/stack.c: In function ‘_stp_stack_print’:
/tmp/stap/share/systemtap/runtime/stack.c:144:26: error: dereferencing pointer to incomplete type
/tmp/stap/share/systemtap/runtime/stack.c:146:26: error: dereferencing pointer to incomplete type
/tmp/stap/share/systemtap/runtime/stack.c:149:23: error: dereferencing pointer to incomplete type

AFAICT the autoconf test should result in STAPCONF_UPROBE_GET_PC=0 for the
case where CONFIG_UTRACE is unset since UPROBES requires UTRACE.

Signed-off-by: Tony Jones <tonyj@suse.de>

diff --git a/runtime/autoconf-uprobe-get-pc.c b/runtime/autoconf-uprobe-get-pc.c
index 2bd41c8..bf26e52 100644
--- a/runtime/autoconf-uprobe-get-pc.c
+++ b/runtime/autoconf-uprobe-get-pc.c
@@ -1,3 +1,4 @@
+#if defined(CONFIG_UTRACE)
 #if defined(CONFIG_UPROBES) || defined(CONFIG_UPROBES_MODULE)
 #include <linux/uprobes.h>
 #else
@@ -8,3 +9,6 @@ unsigned long foo (struct uretprobe_instance *ri, unsigned long pc, unsigned lon
 {
   return uprobe_get_pc (ri, pc, sp);
 }
+#else
+#error "CONFIG_UTRACE not enabled"
+#endif



More information about the Systemtap mailing list