]> sourceware.org Git - systemtap.git/commitdiff
warn about missing kernel symbol table
authorFrank Ch. Eigler <fche@redhat.com>
Sat, 17 May 2014 16:31:46 +0000 (12:31 -0400)
committerFrank Ch. Eigler <fche@redhat.com>
Sat, 17 May 2014 16:33:40 +0000 (12:33 -0400)
On some distros (e.g., arch linux), no System.map* file survives the
build process, but there may be ways to fabricate doppelgangers.

* session.cxx (systemtap_session::parse_kernel_functions): Warn if
  none found.
* warning::symbols: new man page
* warning::debuginfo: xref.

man/warning::debuginfo.7stap
man/warning::symbols.7stap [new file with mode: 0644]
session.cxx

index 3a9e3943fc9f72613e908ca1e76e386f6c3e4e54..81bcd742e7644ff305101e4e93e2115448896e8f 100644 (file)
@@ -125,6 +125,7 @@ option, in case such a server is already running.
 .IR stap-server (8),
 .IR stap-prep (1),
 .IR strip (1),
+.IR warning::symbols (7stap),
 .IR error::dwarf (7stap),
 .IR error::reporting (7stap),
 .IR error::contextvars (7stap),
diff --git a/man/warning::symbols.7stap b/man/warning::symbols.7stap
new file mode 100644 (file)
index 0000000..441a5fe
--- /dev/null
@@ -0,0 +1,65 @@
+.\" T
+.TH WARNING::SYMBOLS 7stap
+.SH NAME
+warning::symbols \- systemtap missing-symbols warnings
+
+.\" macros
+.de SAMPLE
+
+.nr oldin \\n(.i
+.br
+.RS
+.nf
+.nh
+..
+.de ESAMPLE
+.hy
+.fi
+.RE
+.in \\n[oldin]u
+
+..
+
+.SH DESCRIPTION
+
+For some probing operations, where DWARF debugging data is not available,
+systemtap needs ELF symbols for the relevant binaries.  This allows at
+least probe addresses to be calculated, some variables resolved, and with
+@cast() and headers, maybe even some types.
+
+.TP
+kernel symbol table
+Systemtap may need a linux-build style \fBSystem.map\fR file to find
+addresses of kernel functions/data.  It may be possible to create it
+by hand:
+.SAMPLE
+% su
+# cp /proc/kallsyms /boot/System.map-`uname -r`
+or
+# nm /lib/modules/`uname -r`/build/vmlinux > /boot/System.map-`uname -r`
+.ESAMPLE
+
+.TP
+minisymbols
+On some systems, binaries may be compiled with a subset of symbols
+useful for function tracing and backtraces.  This 'Minisymbols' is
+a xz compressed section labeled .gnu_debugdata.  Support for
+minisymbols relies on elfutils version 0.156 or later.
+
+.TP
+compressed symbols
+On some systems, symbols may be available, but compressed into
+.IR .zdebug_*
+sections.  Support for compressed symbols relies on elfutils
+version 0.153 or later.
+
+.SH SEE ALSO
+.nh
+.nf
+.IR stap (1),
+.IR stappaths (7),
+.IR strip (1),
+.IR warning::debuginfo (7stap),
+.IR error::dwarf (7stap),
+.IR error::reporting (7stap),
+.IR http://fedoraproject.org/wiki/Features/MiniDebugInfo
index a8dd7533a22f2f2a65ea91ecf8fa699820a53174..8d1ec26c17a3544644478ad55c4ddea83cbc9bb9 100644 (file)
@@ -1766,6 +1766,9 @@ systemtap_session::parse_kernel_functions ()
     }
   system_map.close();
 
+  if (kernel_functions.size() == 0)
+    print_warning ("Kernel function symbol table missing [man warning::symbols]", 0);
+
   if (verbose > 2)
     clog << _F("Parsed kernel \"%s\", ", system_map_path.c_str())
          << _NF("containing %zu symbol", "containing %zu symbols",
This page took 0.036046 seconds and 5 git commands to generate.