source: general/prog/gdb.xml@ 9533795

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 9.0 9.1 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts lazarus lxqt plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition trunk upgradedb xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since 9533795 was 9533795, checked in by Xi Ruoyao <xry111@…>, 5 years ago

Recommend P3 with six for GDB

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

  • Property mode set to 100644
File size: 9.5 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 "f8b2562e830a4098dd5b5ea9e9296c70">
10 <!ENTITY gdb-size "19 MB">
11 <!ENTITY gdb-buildsize "599 MB (add 55 MB for tests, add 723 MB for docs)">
12 <!ENTITY gdb-time "1.8 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, it is recommended to 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<!-- They worked fine for me. [renodr] 7.11.1 -->
156
157<!--
158 <listitem>
159 <para>
160 If run remotely over an ssh connection, the tests will hang
161 and require a hard (power cycle) reset of the system.
162 </para>
163 </listitem>
164-->
165
166 <listitem>
167 <para>
168 There are a large number of timeouts (there is a variable
169 that can be set to increase time for timeout, but
170 changing it will result in a different number of tests being
171 run).
172 </para>
173 </listitem>
174
175 <listitem>
176 <para>
177 There are failures associated with system readline 6.x.
178 </para>
179 </listitem>
180
181 <listitem>
182 <para>
183 A few tests assume that the header file
184 <filename>&lt;sys/sdt.h&gt;</filename>, part of <ulink
185 url="https://sourceware.org/systemtap/">SystemTap</ulink>, is
186 present.
187 </para>
188 </listitem>
189
190 <listitem>
191 <para>
192 If the test suite is run on a Skylake-based Intel CPU or newer,
193 many tests will fail due to the removal of the deprecated/problematic
194 libmpx library in GCC.
195 </para>
196 </listitem>
197
198 <listitem>
199 <para>
200 Approximately 1-3% of the tests fail (out of over 56000 tests).
201 </para>
202 </listitem>
203
204 </itemizedlist>
205
206 <para>
207 Now, as the <systemitem class="username">root</systemitem> user:
208 </para>
209
210<screen role="root"><userinput>make -C gdb install</userinput></screen>
211
212 <para>
213 If you have built the API documentation, it is now in gdb/doc/doxy.
214 You can install it (as the <systemitem class="username">root</systemitem>
215 user):
216 </para>
217
218<screen role="root"><userinput>install -d /usr/share/doc/gdb-&gdb-version; &amp;&amp;
219rm -rf gdb/doc/doxy/xml &amp;&amp;
220cp -Rv gdb/doc/doxy /usr/share/doc/gdb-&gdb-version;</userinput></screen>
221
222 </sect2>
223
224 <sect2 role="commands">
225 <title>Command Explanations</title>
226
227 <para>
228 <parameter>--with-system-readline</parameter>: This switch forces
229 <application>GDB</application> to use the copy of
230 <application>Readline</application> installed in LFS.
231 </para>
232
233 <para>
234 <parameter>--with-python=/usr/bin/python3</parameter>: This switch
235 forces <application>GDB</application> to use Python 3 installed
236 in LFS. Remove this switch if you have installed
237 <xref linkend="python2"/> and want to use it instead of Python 3.
238 </para>
239
240 </sect2>
241
242 <sect2 role="content">
243 <title>Contents</title>
244
245 <segmentedlist>
246 <segtitle>Installed Programs</segtitle>
247 <segtitle>Installed Library</segtitle>
248 <segtitle>Installed Directories</segtitle>
249
250 <seglistitem>
251 <seg>
252 gcore, gdb and gdbserver
253 </seg>
254 <seg>
255 libinproctrace.so
256 </seg>
257 <seg>
258 /usr/{include,share}/gdb and /usr/share/doc/gdb-&gdb-version;
259 </seg>
260 </seglistitem>
261 </segmentedlist>
262
263 <variablelist>
264 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
265 <?dbfo list-presentation="list"?>
266 <?dbhtml list-presentation="table"?>
267
268 <varlistentry id="gcore">
269 <term><command>gcore</command></term>
270 <listitem>
271 <para>
272 generates a core dump of a running program.
273 </para>
274 <indexterm zone="gdb gcore">
275 <primary sortas="b-gcore">gcore</primary>
276 </indexterm>
277 </listitem>
278 </varlistentry>
279
280 <varlistentry id="gdb-prog">
281 <term><command>gdb</command></term>
282 <listitem>
283 <para>
284 is the GNU Debugger.
285 </para>
286 <indexterm zone="gdb gdb-prog">
287 <primary sortas="b-gdb-prog">gdb-prog</primary>
288 </indexterm>
289 </listitem>
290 </varlistentry>
291
292 <varlistentry id="gdbserver">
293 <term><command>gdbserver</command></term>
294 <listitem>
295 <para>
296 is a remote server for the GNU debugger (it allows programs
297 to be debugged from a different machine).
298 </para>
299 <indexterm zone="gdb gdbserver">
300 <primary sortas="b-gdbserver">gdbserver</primary>
301 </indexterm>
302 </listitem>
303 </varlistentry>
304
305 <varlistentry id="libinproctrace">
306 <term><filename class="libraryfile">libinproctrace.so</filename></term>
307 <listitem>
308 <para>
309 contains functions for the in-process tracing agent. The agent
310 allows for installing fast tracepoints, listing static tracepoint
311 markers, probing static tracepoints markers, and starting trace
312 monitoring.
313 </para>
314 <indexterm zone="gdb libinproctrace">
315 <primary sortas="c-libinproctrace">libinproctrace.so</primary>
316 </indexterm>
317 </listitem>
318 </varlistentry>
319
320 </variablelist>
321
322 </sect2>
323
324</sect1>
Note: See TracBrowser for help on using the repository browser.