From: Frank Ch. Eigler Date: Sat, 17 May 2014 16:31:46 +0000 (-0400) Subject: warn about missing kernel symbol table X-Git-Tag: release-2.6~107^2~51 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=80a71c5a5de57d0feec8a40775fc5f1c17c41c9e;p=systemtap.git warn about missing kernel symbol table 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. --- diff --git a/man/warning::debuginfo.7stap b/man/warning::debuginfo.7stap index 3a9e3943f..81bcd742e 100644 --- a/man/warning::debuginfo.7stap +++ b/man/warning::debuginfo.7stap @@ -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 index 000000000..441a5fe98 --- /dev/null +++ b/man/warning::symbols.7stap @@ -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 diff --git a/session.cxx b/session.cxx index a8dd7533a..8d1ec26c1 100644 --- a/session.cxx +++ b/session.cxx @@ -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",