]> sourceware.org Git - systemtap.git/commitdiff
PR14655: more politely fail if kallsyms_lookup_name unexported
authorFrank Ch. Eigler <fche@redhat.com>
Tue, 9 Oct 2012 18:44:26 +0000 (14:44 -0400)
committerFrank Ch. Eigler <fche@redhat.com>
Tue, 9 Oct 2012 18:45:35 +0000 (14:45 -0400)
* buildrun.cxx (compile_pass): Look for said export.
* runtime/sym.c: Provide a _stp_error()-laden backup.

buildrun.cxx
runtime/sym.c

index 2bb0b9630518a2f5fcf722d53edc796ea535aa3b..6108c0f5fc19fd0a1de1e4172198a3546cac4390 100644 (file)
@@ -376,6 +376,7 @@ compile_pass (systemtap_session& s)
   output_exportconf(s, o, "task_work_add", "STAPCONF_TASK_WORK_ADD_EXPORTED");
 
   output_autoconf(s, o, "autoconf-pagefault_disable.c", "STAPCONF_PAGEFAULT_DISABLE", NULL);
+  output_exportconf(s, o, "kallsyms_lookup_name", "STAPCONF_KALLSYMS");
 
   o << module_cflags << " += -include $(STAPCONF_HEADER)" << endl;
 
index 4fce3b7f103c6c67bf08647f8384def72348a11e..0c9ec9303b8f4e9e1fe6618ad7bd18f898442b7d 100644 (file)
@@ -644,5 +644,14 @@ static void _stp_kmodule_update_address(const char* module,
 }
 
 
+#ifndef STAPCONF_KALLSYMS
+unsigned long kallsyms_lookup_name (const char *name)
+{
+        _stp_error ("kallsyms_lookup_name unavailable for %s\n", name);
+        return 0;
+}
+#endif
+
+
 
 #endif /* _STP_SYM_C_ */
This page took 0.033339 seconds and 5 git commands to generate.