source: general/prog/gdb.xml@ 3fcb10e1

10.0 10.1 11.0 9.0 9.1 ken/refactor-virt lazarus qt5new trunk upgradedb xry111/git-date xry111/git-date-for-trunk xry111/git-date-test
Last change on this file since 3fcb10e1 was 3fcb10e1, checked in by Douglas R. Reno <renodr@…>, 2 years ago

Tags

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

  • Property mode set to 100644
File size: 9.3 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 &lfs90_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 remap="doc"><userinput>make -C gdb/doc doxy</userinput></screen>
123
124 <para>
125 To test the results, issue:
126 </para>
127
128<screen remap="test"><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"
208 remap="doc"><userinput>install -d /usr/share/doc/gdb-&gdb-version; &amp;&amp;
209rm -rf gdb/doc/doxy/xml &amp;&amp;
210cp -Rv gdb/doc/doxy /usr/share/doc/gdb-&gdb-version;</userinput></screen>
211
212 </sect2>
213
214 <sect2 role="commands">
215 <title>Command Explanations</title>
216
217 <para>
218 <parameter>--with-system-readline</parameter>: This switch forces
219 <application>GDB</application> to use the copy of
220 <application>Readline</application> installed in LFS.
221 </para>
222
223 <para>
224 <parameter>--with-python=/usr/bin/python3</parameter>: This switch
225 forces <application>GDB</application> to use Python 3 installed
226 in LFS. Remove this switch if you have installed
227 <xref linkend="python2"/> and want to use it instead of Python 3.
228 </para>
229
230 </sect2>
231
232 <sect2 role="content">
233 <title>Contents</title>
234
235 <segmentedlist>
236 <segtitle>Installed Programs</segtitle>
237 <segtitle>Installed Library</segtitle>
238 <segtitle>Installed Directories</segtitle>
239
240 <seglistitem>
241 <seg>
242 gcore, gdb and gdbserver
243 </seg>
244 <seg>
245 libinproctrace.so
246 </seg>
247 <seg>
248 /usr/{include,share}/gdb and /usr/share/doc/gdb-&gdb-version;
249 </seg>
250 </seglistitem>
251 </segmentedlist>
252
253 <variablelist>
254 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
255 <?dbfo list-presentation="list"?>
256 <?dbhtml list-presentation="table"?>
257
258 <varlistentry id="gcore">
259 <term><command>gcore</command></term>
260 <listitem>
261 <para>
262 generates a core dump of a running program.
263 </para>
264 <indexterm zone="gdb gcore">
265 <primary sortas="b-gcore">gcore</primary>
266 </indexterm>
267 </listitem>
268 </varlistentry>
269
270 <varlistentry id="gdb-prog">
271 <term><command>gdb</command></term>
272 <listitem>
273 <para>
274 is the GNU Debugger.
275 </para>
276 <indexterm zone="gdb gdb-prog">
277 <primary sortas="b-gdb-prog">gdb-prog</primary>
278 </indexterm>
279 </listitem>
280 </varlistentry>
281
282 <varlistentry id="gdbserver">
283 <term><command>gdbserver</command></term>
284 <listitem>
285 <para>
286 is a remote server for the GNU debugger (it allows programs
287 to be debugged from a different machine).
288 </para>
289 <indexterm zone="gdb gdbserver">
290 <primary sortas="b-gdbserver">gdbserver</primary>
291 </indexterm>
292 </listitem>
293 </varlistentry>
294
295 <varlistentry id="libinproctrace">
296 <term><filename class="libraryfile">libinproctrace.so</filename></term>
297 <listitem>
298 <para>
299 contains functions for the in-process tracing agent. The agent
300 allows for installing fast tracepoints, listing static tracepoint
301 markers, probing static tracepoints markers, and starting trace
302 monitoring.
303 </para>
304 <indexterm zone="gdb libinproctrace">
305 <primary sortas="c-libinproctrace">libinproctrace.so</primary>
306 </indexterm>
307 </listitem>
308 </varlistentry>
309
310 </variablelist>
311
312 </sect2>
313
314</sect1>
Note: See TracBrowser for help on using the repository browser.