This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

PATCH: stap fails if !CONFIG_FRAME_POINTER && !CONFIG_UTRACE


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]