summaryrefslogtreecommitdiffstats
path: root/runtime/runtime.h
diff options
context:
space:
mode:
authorhunt <hunt>2005-09-22 20:10:38 +0000
committerhunt <hunt>2005-09-22 20:10:38 +0000
commitf1f13fef01f716999db4eb764c9e0d87ceb2af1f (patch)
treeb27da63ba46c7cced2ef9698bffdd9e2c19a477d /runtime/runtime.h
parent07885a7317c11c71a73706fc8af3e32e7da9f4d8 (diff)
downloadsystemtap-steved-f1f13fef01f716999db4eb764c9e0d87ceb2af1f.tar.gz
systemtap-steved-f1f13fef01f716999db4eb764c9e0d87ceb2af1f.tar.xz
systemtap-steved-f1f13fef01f716999db4eb764c9e0d87ceb2af1f.zip
2005-09-22 Martin Hunt <hunt@redhat.com>
* runtime.h (init_module): Only initialize _stp_kta and _stp_kallsyms_lookup on i386 and x86_64. Define HAS_LOOKUP. * sym.c (_stp_symbol_sprint): If HAS_LOOKUP is not defined, just print address in hex. * current.c (_stp_ret_addr): Add ppc64 version. (_stp_sprint_regs): PPC64 version from Ananth N Mavinakayanahalli <ananth@in.ibm.com>
Diffstat (limited to 'runtime/runtime.h')
-rw-r--r--runtime/runtime.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/runtime/runtime.h b/runtime/runtime.h
index b0fc5b5d..94a210a6 100644
--- a/runtime/runtime.h
+++ b/runtime/runtime.h
@@ -61,15 +61,15 @@ static struct
#include "arith.c"
#include "copy.c"
+/************* Module Stuff ********************/
+#if defined (__x86_64__) || defined (__i386__)
+#define HAS_LOOKUP 1
static int (*_stp_kta)(unsigned long addr);
static const char * (*_stp_kallsyms_lookup)(unsigned long addr,
unsigned long *symbolsize,
unsigned long *offset,
char **modname, char *namebuf);
-/************* Module Stuff ********************/
-int probe_start(void);
-
int init_module (void)
{
_stp_kta = (int (*)(unsigned long))kallsyms_lookup_name("__kernel_text_address");
@@ -77,6 +77,14 @@ int init_module (void)
kallsyms_lookup_name("kallsyms_lookup");
return _stp_transport_init();
}
+#else
+int init_module (void)
+{
+ return _stp_transport_init();
+}
+#endif
+
+int probe_start(void);
void cleanup_module(void)
{