1WARNING::DEBUGINFO(7stap) WARNING::DEBUGINFO(7stap)
2
3
4
6 warning::debuginfo - systemtap missing-debuginfo warnings
7
8
9
11 For many symbolic probing operations, systemtap needs DWARF debuginfo
12 for the relevant binaries. This often includes resolving func‐
13 tion/statement probes, or $context variables in related handlers.
14 DWARF debuginfo is created by the compiler when using CFLAGS -g, and
15 may be found in the original binaries built during compilation, or may
16 have been split into separate files. The SYSTEMTAP_DEBUGINFO_PATH
17 environment variable affects where systemtap looks for these files.
18
19 If your operating system came from a distributor, check with them if
20 debuginfo packages or variants are available. If your distributor does
21 not have debuginfo-equipped binaries at all, you may need to rebuild
22 it.
23
24 Systemtap uses the elfutils library to process ELF/DWARF files. The
25 version of elfutils used by systemtap is the number after the slash in
26 the -V output:
27
28 % stap -V
29 Systemtap translator/driver (version 4.2/0.178, rpm 4.2-1.fc30)
30 Copyright (C) 2005-2019 Red Hat, Inc. and others
31 [...]
32
33 This indicates systemtap version 4.2 with elfutils version 0.178.
34
35 New enough versions of elfutils (0.178+) enable systemtap to automati‐
36 cally download correct debuginfo from servers run by you, your organi‐
37 zation, and/or someone on the public internet. Try:
38
39 % export DEBUGINFOD_URLS=https://debuginfod.elfutils.org/
40 % export DEBUGINFOD_PROGRESS=1 # for progress messages, if you like
41
42 and rerun systemtap. It might just work. If it doesn't, read on.
43
44
45 kernel debuginfo
46 For scripts that target the kernel, systemtap may search for the
47 vmlinux file created during its original build. This is dis‐
48 tinct from the boot-loader's compressed/stripped vmlinuz file,
49 and much larger. If you have a hand-built kernel, make sure it
50 was built with the CONFIG_DEBUG_INFO=y option. Some Linux dis‐
51 tributions may include several kernel variants, including a con‐
52 fusingly named kernel-debug (an alternative kernel, with its own
53 kernel-debug-debuginfo package), which is not the same thing as
54 the kernel-debuginfo (DWARF data for the base kernel). The
55 stap-prep program can help install the right set.
56
57
58 process debuginfo
59 For scripts that target user-space, systemtap may search for de‐
60 buginfo. If you have hand-built binaries, use CFLAGS=-g -O2 to
61 compile them.
62
63
64 minidebuginfo
65 On some systems, binaries may be compiled with a subset of de‐
66 buginfo useful for function tracing and backtraces. This
67 'Minidebuginfo' is a xz compressed section labeled .gnu_debugda‐
68 ta. Support for minidebuginfo relies on elfutils version 0.156
69 or later.
70
71
72 compressed debuginfo
73 On some systems, debuginfo may be available, but compressed into
74 .zdebug_* sections. Support for compressed debuginfo relies on
75 elfutils version 0.153 or later.
76
77
78 unnecessary debuginfo
79 In some cases, a script may be altered to avoid requiring debug‐
80 info. For example, as script that uses probe syscall.* probes
81 could try instead probe nd_syscall.* (for non-DWARF syscall):
82 these work similarly, and use more intricate (fragile) tapset
83 functions to extract system call arguments. Another option is
84 use of compiled-in instrumentation such as kernel tracepoints or
85 user-space <sys/sdt.h> markers in libraries or executables,
86 which do not require debuginfo. If debuginfo was required for
87 resolving a complicated $var->foo->bar expression, it may be
88 possible to use @cast(var,"foo","foo.h")->foo->bar to synthesize
89 debuginfo for that type from a header file.
90
91
93 On some platforms, systemtap may advise what commands to run, in order
94 to download needed debuginfo. Another possibility is to invoke system‐
95 tap with the --download-debuginfo flag, which uses ABRT. The stap-prep
96 script included with systemtap may be able to download the appropriate
97 kernel debuginfo. Another possibility is to install and use a
98 stap-server remote-compilation instance on a machine on your network,
99 where debuginfo and compilation resources can be centralized. Try the
100 stap --use-server option, in case such a server is already running.
101
102
104 gcc(1),
105 stap(1),
106 stappaths(7),
107 stap-server(8),
108 stap-prep(1),
109 strip(1),
110 warning::symbols(7stap),
111 error::dwarf(7stap),
112 error::reporting(7stap),
113 error::contextvars(7stap),
114 debuginfod(8),
115 http://elfutils.org/,
116 https://sourceware.org/elfutils/Debuginfod.html,
117 http://fedoraproject.org/wiki/Features/MiniDebugInfo
118
119
120
121 WARNING::DEBUGINFO(7stap)