source: general/prog/gdb.xml@ e7d893b

elogind
Last change on this file since e7d893b was e7d893b, checked in by DJ Lucas <dj@…>, 5 years ago

Merge to HEAD 21602.

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/branches/BOOK-elogind@21603 af4574ff-66df-0310-9fd7-8a98e5e911e0

  • Property mode set to 100644
File size: 9.2 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 %general-entities;
6
7 <!ENTITY gdb-download-http "&gnu-http;/gdb/gdb-&gdb-version;.tar.xz">
8 <!ENTITY gdb-download-ftp "&gnu-ftp;/gdb/gdb-&gdb-version;.tar.xz">
9 <!ENTITY gdb-md5sum "bbd95b2f9b34621ad7a19a3965476314">
10 <!ENTITY gdb-size "20 MB">
11 <!ENTITY gdb-buildsize "630 MB (add 57 MB for tests, add 750 MB for docs)">
12 <!ENTITY gdb-time "2.0 SBU (Using parallelism=4; add 66 SBU for tests, add 0.6 SBU for docs)">
13]>
14
15<sect1 id="gdb" xreflabel="GDB-&gdb-version;">
16 <?dbhtml filename="gdb.html"?>
17
18 <sect1info>
19 <othername>$LastChangedBy$</othername>
20 <date>$Date$</date>
21 </sect1info>
22
23 <title>GDB-&gdb-version;</title>
24
25 <indexterm zone="gdb">
26 <primary sortas="a-GDB">GDB</primary>
27 </indexterm>
28
29 <sect2 role="package">
30 <title>Introduction to GDB</title>
31
32 <para>
33 <application>GDB</application>, the GNU Project debugger, allows you
34 to see what is going on <quote>inside</quote> another program while it
35 executes -- or what another program was doing at the moment it crashed.
36 Note that <application>GDB</application> is most effective when tracing
37 programs and libraries that were built with debugging symbols and not
38 stripped.
39 </para>
40
41 &lfs84_checked;
42
43 <bridgehead renderas="sect3">Package Information</bridgehead>
44 <itemizedlist spacing="compact">
45 <listitem>
46 <para>
47 Download (HTTP): <ulink url="&gdb-download-http;"/>
48 </para>
49 </listitem>
50 <listitem>
51 <para>
52 Download (FTP): <ulink url="&gdb-download-ftp;"/>
53 </para>
54 </listitem>
55 <listitem>
56 <para>
57 Download MD5 sum: &gdb-md5sum;
58 </para>
59 </listitem>
60 <listitem>
61 <para>
62 Download size: &gdb-size;
63 </para>
64 </listitem>
65 <listitem>
66 <para>
67 Estimated disk space required: &gdb-buildsize;
68 </para>
69 </listitem>
70 <listitem>
71 <para>
72 Estimated build time: &gdb-time;
73 </para>
74 </listitem>
75 </itemizedlist>
76
77 <bridgehead renderas="sect3">GDB Dependencies</bridgehead>
78
79 <bridgehead renderas="sect4">Recommended Runtime Dependency</bridgehead>
80 <para role="recommended">
81 <xref linkend="six"/> (Python 3 module, required at run-time to
82 use GDB scripts from various LFS/BLFS packages with Python 3
83 installed in LFS)
84 </para>
85
86 <bridgehead renderas="sect4">Optional</bridgehead>
87 <para role="optional">
88 <xref linkend="dejagnu"/> (required for tests),
89 <xref linkend="doxygen"/>,
90 <xref linkend="gcc"/> (ada and gfortran are used for tests),
91 <xref linkend="guile"/>,
92 <xref linkend="python2"/>,
93 <xref linkend="rust"/> (used for some tests),
94 <xref linkend="valgrind"/>, and
95 <ulink url="https://sourceware.org/systemtap/">SystemTap</ulink>
96 (run-time, used for tests)
97 </para>
98
99 <para condition="html" role="usernotes">User Notes:
100 <ulink url="&blfs-wiki;/gdb"/>
101 </para>
102 </sect2>
103
104 <sect2 role="installation">
105 <title>Installation of GDB</title>
106
107 <para>
108 Install <application>GDB</application> by running the following
109 commands:
110 </para>
111
112<screen><userinput>./configure --prefix=/usr \
113 --with-system-readline \
114 --with-python=/usr/bin/python3 &amp;&amp;
115make</userinput></screen>
116
117 <para>
118 Optionally, to build the API documentation using
119 <xref linkend="doxygen"/>, run:
120 </para>
121
122<screen><userinput>make -C gdb/doc doxy</userinput></screen>
123
124 <para>
125 To test the results, issue:
126 </para>
127
128<screen><userinput>pushd gdb/testsuite &amp;&amp;
129make site.exp &amp;&amp;
130echo "set gdb_test_timeout 120" &gt;&gt; site.exp &amp;&amp;
131runtest
132popd</userinput></screen>
133
134 <para>
135 See <emphasis>gdb/testsuite/README</emphasis> and <ulink
136 url="https://sourceware.org/gdb/wiki/TestingGDB">TestingGDB</ulink>.
137 There are many problems with the test suite:
138 </para>
139
140 <itemizedlist>
141 <listitem>
142 <para>
143 Clean directories are needed if re-running the tests. For that
144 reason, make a copy of the compiled source code
145 directory before the tests in case you need to run the tests again.
146 </para>
147 </listitem>
148
149 <listitem>
150 <para>
151 Results depend on installed compilers.
152 </para>
153 </listitem>
154
155 <listitem>
156 <para>
157 There are a large number of timeouts (there is a variable
158 that can be set to increase time for timeout, but
159 changing it will result in a different number of tests being
160 run).
161 </para>
162 </listitem>
163
164 <listitem>
165 <para>
166 There are failures associated with system readline 6.x.
167 </para>
168 </listitem>
169
170 <listitem>
171 <para>
172 A few tests assume that the header file
173 <filename>&lt;sys/sdt.h&gt;</filename>, part of <ulink
174 url="https://sourceware.org/systemtap/">SystemTap</ulink>, is
175 present.
176 </para>
177 </listitem>
178
179 <listitem>
180 <para>
181 If the test suite is run on a Skylake-based Intel CPU or newer,
182 many tests will fail due to the removal of the deprecated/problematic
183 libmpx library in GCC.
184 </para>
185 </listitem>
186
187 <listitem>
188 <para>
189 Approximately 1-3% of the tests fail (out of over 56000 tests).
190 </para>
191 </listitem>
192
193 </itemizedlist>
194
195 <para>
196 Now, as the <systemitem class="username">root</systemitem> user:
197 </para>
198
199<screen role="root"><userinput>make -C gdb install</userinput></screen>
200
201 <para>
202 If you have built the API documentation, it is now in gdb/doc/doxy.
203 You can install it (as the <systemitem class="username">root</systemitem>
204 user):
205 </para>
206
207<screen role="root"><userinput>install -d /usr/share/doc/gdb-&gdb-version; &amp;&amp;
208rm -rf gdb/doc/doxy/xml &amp;&amp;
209cp -Rv gdb/doc/doxy /usr/share/doc/gdb-&gdb-version;</userinput></screen>
210
211 </sect2>
212
213 <sect2 role="commands">
214 <title>Command Explanations</title>
215
216 <para>
217 <parameter>--with-system-readline</parameter>: This switch forces
218 <application>GDB</application> to use the copy of
219 <application>Readline</application> installed in LFS.
220 </para>
221
222 <para>
223 <parameter>--with-python=/usr/bin/python3</parameter>: This switch
224 forces <application>GDB</application> to use Python 3 installed
225 in LFS. Remove this switch if you have installed
226 <xref linkend="python2"/> and want to use it instead of Python 3.
227 </para>
228
229 </sect2>
230
231 <sect2 role="content">
232 <title>Contents</title>
233
234 <segmentedlist>
235 <segtitle>Installed Programs</segtitle>
236 <segtitle>Installed Library</segtitle>
237 <segtitle>Installed Directories</segtitle>
238
239 <seglistitem>
240 <seg>
241 gcore, gdb and gdbserver
242 </seg>
243 <seg>
244 libinproctrace.so
245 </seg>
246 <seg>
247 /usr/{include,share}/gdb and /usr/share/doc/gdb-&gdb-version;
248 </seg>
249 </seglistitem>
250 </segmentedlist>
251
252 <variablelist>
253 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
254 <?dbfo list-presentation="list"?>
255 <?dbhtml list-presentation="table"?>
256
257 <varlistentry id="gcore">
258 <term><command>gcore</command></term>
259 <listitem>
260 <para>
261 generates a core dump of a running program.
262 </para>
263 <indexterm zone="gdb gcore">
264 <primary sortas="b-gcore">gcore</primary>
265 </indexterm>
266 </listitem>
267 </varlistentry>
268
269 <varlistentry id="gdb-prog">
270 <term><command>gdb</command></term>
271 <listitem>
272 <para>
273 is the GNU Debugger.
274 </para>
275 <indexterm zone="gdb gdb-prog">
276 <primary sortas="b-gdb-prog">gdb-prog</primary>
277 </indexterm>
278 </listitem>
279 </varlistentry>
280
281 <varlistentry id="gdbserver">
282 <term><command>gdbserver</command></term>
283 <listitem>
284 <para>
285 is a remote server for the GNU debugger (it allows programs
286 to be debugged from a different machine).
287 </para>
288 <indexterm zone="gdb gdbserver">
289 <primary sortas="b-gdbserver">gdbserver</primary>
290 </indexterm>
291 </listitem>
292 </varlistentry>
293
294 <varlistentry id="libinproctrace">
295 <term><filename class="libraryfile">libinproctrace.so</filename></term>
296 <listitem>
297 <para>
298 contains functions for the in-process tracing agent. The agent
299 allows for installing fast tracepoints, listing static tracepoint
300 markers, probing static tracepoints markers, and starting trace
301 monitoring.
302 </para>
303 <indexterm zone="gdb libinproctrace">
304 <primary sortas="c-libinproctrace">libinproctrace.so</primary>
305 </indexterm>
306 </listitem>
307 </varlistentry>
308
309 </variablelist>
310
311 </sect2>
312
313</sect1>
Note: See TracBrowser for help on using the repository browser.