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]

On ia64 #include "task_finder.c" need some function from regs-ia64.c


When compiling recent checkout of systemtap on ia64 the inclusion of
"task_finder.c" ended up needed some code in reg-ia64.h. Did some permutations
of includes to make sure that regs.c and regs-ia64.c are included before
task_finder.c. That patch has verified to work on ia64 and x86_64. Below is the
error message before the added patch.

-Will

$ ../install/bin/stap -vv
/home/wcohen/systemtap_write/systemtap/testsuite/systemtap.base/add.stp
...
Running make -C "/lib/modules/2.6.18-128.1.6.el5/build" M="/tmp/stapXrytey"
modules >/dev/null
In file included from
/home/wcohen/systemtap_write/install/share/systemtap/runtime/task_finder.c:43,
                 from
/home/wcohen/systemtap_write/install/share/systemtap/runtime/runtime.h:90,
                 from /tmp/stapXrytey/stap_5484.c:45:
/home/wcohen/systemtap_write/install/share/systemtap/runtime/syscall.h: In
function â____stp_user_syscall_argâ:
/home/wcohen/systemtap_write/install/share/systemtap/runtime/syscall.h:275:
error: implicit declaration of function â__ia64_fetch_registerâ
cc1: warnings being treated as errors
/home/wcohen/systemtap_write/install/share/systemtap/runtime/syscall.h:275:
warning: return makes pointer from integer without a cast
In file included from /tmp/stapXrytey/stap_5484.c:48:
/home/wcohen/systemtap_write/install/share/systemtap/runtime/regs-ia64.c: At top
level:
/home/wcohen/systemtap_write/install/share/systemtap/runtime/regs-ia64.c:75:
error: conflicting types for â__ia64_fetch_registerâ
/home/wcohen/systemtap_write/install/share/systemtap/runtime/syscall.h:275:
error: previous implicit declaration of â__ia64_fetch_registerâ was here

diff --git a/runtime/runtime.h b/runtime/runtime.h
index 822562a..0a656b7 100644
--- a/runtime/runtime.h
+++ b/runtime/runtime.h
@@ -86,6 +86,8 @@ static struct
 #include "io.c"
 #include "arith.c"
 #include "copy.c"
+#include "regs.c"
+#include "regs-ia64.c"
 
 #include "task_finder.c"
 
diff --git a/translate.cxx b/translate.cxx
index 9085349..cab3748 100644
--- a/translate.cxx
+++ b/translate.cxx
@@ -4967,9 +4967,7 @@ translate_pass (systemtap_session& s)
 	s.op->newline() << "#define STP_PERFMON";
 
       s.op->newline() << "#include \"runtime.h\"";
-      s.op->newline() << "#include \"regs.c\"";
       s.op->newline() << "#include \"stack.c\"";
-      s.op->newline() << "#include \"regs-ia64.c\"";
       s.op->newline() << "#include \"stat.c\"";
       s.op->newline() << "#include <linux/string.h>";
       s.op->newline() << "#include <linux/timer.h>";

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