source: general/prog/gdb.xml@ d38dc9a

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 12.2 9.0 9.1 gimp3 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/for-12.3 xry111/intltool xry111/llvm18 xry111/soup3 xry111/spidermonkey128 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since d38dc9a was d38dc9a, checked in by Xi Ruoyao <xry111@…>, 5 years ago

Add a note about building GDB with Python 3

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@21480 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 "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">Optional</bridgehead>
80 <para role="optional">
81 <xref linkend="dejagnu"/> (required for tests),
82 <xref linkend="doxygen"/>,
83 <xref linkend="gcc"/> (ada and gfortran are used for tests),
84 <xref linkend="guile"/>,
85 <xref linkend="python2"/> or <xref linkend="six"/> (Python 3 module,
86 run-time),
87 <xref linkend="rust"/> (used for some tests),
88 <xref linkend="valgrind"/>, and
89 <ulink url="https://sourceware.org/systemtap/">SystemTap</ulink>
90 (run-time, used for tests)
91 </para>
92
93 <para condition="html" role="usernotes">User Notes:
94 <ulink url="&blfs-wiki;/gdb"/>
95 </para>
96 </sect2>
97
98 <sect2 role="installation">
99 <title>Installation of GDB</title>
100
101 <para>
102 Install <application>GDB</application> by running the following
103 commands:
104 </para>
105
106<screen><userinput>./configure --prefix=/usr --with-system-readline &amp;&amp;
107make</userinput></screen>
108
109 <para>
110 Optionally, to build the API documentation using
111 <xref linkend="doxygen"/>, run:
112 </para>
113
114<screen><userinput>make -C gdb/doc doxy</userinput></screen>
115
116 <para>
117 To test the results, issue:
118 </para>
119
120<screen><userinput>pushd gdb/testsuite &amp;&amp;
121make site.exp &amp;&amp;
122echo "set gdb_test_timeout 120" &gt;&gt; site.exp &amp;&amp;
123runtest
124popd</userinput></screen>
125
126 <para>
127 See <emphasis>gdb/testsuite/README</emphasis> and <ulink
128 url="https://sourceware.org/gdb/wiki/TestingGDB">TestingGDB</ulink>.
129 There are many problems with the test suite:
130 </para>
131
132 <itemizedlist>
133 <listitem>
134 <para>
135 Clean directories are needed if re-running the tests. For that
136 reason, it is recommended to make a copy of the compiled source code
137 directory before the tests in case you need to run the tests again.
138 </para>
139 </listitem>
140
141 <listitem>
142 <para>
143 Results depend on installed compilers.
144 </para>
145 </listitem>
146
147<!-- They worked fine for me. [renodr] 7.11.1 -->
148
149<!--
150 <listitem>
151 <para>
152 If run remotely over an ssh connection, the tests will hang
153 and require a hard (power cycle) reset of the system.
154 </para>
155 </listitem>
156-->
157
158 <listitem>
159 <para>
160 There are a large number of timeouts (there is a variable
161 that can be set to increase time for timeout, but
162 changing it will result in a different number of tests being
163 run).
164 </para>
165 </listitem>
166
167 <listitem>
168 <para>
169 There are failures associated with system readline 6.x.
170 </para>
171 </listitem>
172
173 <listitem>
174 <para>
175 A few tests assume that the header file
176 <filename>&lt;sys/sdt.h&gt;</filename>, part of <ulink
177 url="https://sourceware.org/systemtap/">SystemTap</ulink>, is
178 present.
179 </para>
180 </listitem>
181
182 <listitem>
183 <para>
184 If the test suite is run on a Skylake-based Intel CPU or newer,
185 many tests will fail due to the removal of the deprecated/problematic
186 libmpx library in GCC.
187 </para>
188 </listitem>
189
190 <listitem>
191 <para>
192 Approximately 1-3% of the tests fail (out of over 56000 tests).
193 </para>
194 </listitem>
195
196 </itemizedlist>
197
198 <para>
199 Now, as the <systemitem class="username">root</systemitem> user:
200 </para>
201
202<screen role="root"><userinput>make -C gdb install</userinput></screen>
203
204 <para>
205 If you have built the API documentation, it is now in gdb/doc/doxy.
206 You can install it (as the <systemitem class="username">root</systemitem>
207 user):
208 </para>
209
210<screen role="root"><userinput>install -d /usr/share/doc/gdb-&gdb-version; &amp;&amp;
211rm -rf gdb/doc/doxy/xml &amp;&amp;
212cp -Rv gdb/doc/doxy /usr/share/doc/gdb-&gdb-version;</userinput></screen>
213
214 </sect2>
215
216 <sect2 role="commands">
217 <title>Command Explanations</title>
218
219 <para>
220 <parameter>--with-system-readline</parameter>: This switch forces
221 <application>GDB</application> to use the copy of
222 <application>Readline</application> installed in LFS.
223 </para>
224
225 <para>
226 <parameter>--with-python=/usr/bin/python3</parameter>: This switch
227 forces <application>GDB</application> to use Python 3 installed
228 in LFS. Note that many GDB scripts shipped with LFS/BLFS packages
229 require <xref linkend="six"/> to work with Python 3.
230 </para>
231
232 </sect2>
233
234 <sect2 role="content">
235 <title>Contents</title>
236
237 <segmentedlist>
238 <segtitle>Installed Programs</segtitle>
239 <segtitle>Installed Library</segtitle>
240 <segtitle>Installed Directories</segtitle>
241
242 <seglistitem>
243 <seg>
244 gcore, gdb and gdbserver
245 </seg>
246 <seg>
247 libinproctrace.so
248 </seg>
249 <seg>
250 /usr/{include,share}/gdb and /usr/share/doc/gdb-&gdb-version;
251 </seg>
252 </seglistitem>
253 </segmentedlist>
254
255 <variablelist>
256 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
257 <?dbfo list-presentation="list"?>
258 <?dbhtml list-presentation="table"?>
259
260 <varlistentry id="gcore">
261 <term><command>gcore</command></term>
262 <listitem>
263 <para>
264 generates a core dump of a running program.
265 </para>
266 <indexterm zone="gdb gcore">
267 <primary sortas="b-gcore">gcore</primary>
268 </indexterm>
269 </listitem>
270 </varlistentry>
271
272 <varlistentry id="gdb-prog">
273 <term><command>gdb</command></term>
274 <listitem>
275 <para>
276 is the GNU Debugger.
277 </para>
278 <indexterm zone="gdb gdb-prog">
279 <primary sortas="b-gdb-prog">gdb-prog</primary>
280 </indexterm>
281 </listitem>
282 </varlistentry>
283
284 <varlistentry id="gdbserver">
285 <term><command>gdbserver</command></term>
286 <listitem>
287 <para>
288 is a remote server for the GNU debugger (it allows programs
289 to be debugged from a different machine).
290 </para>
291 <indexterm zone="gdb gdbserver">
292 <primary sortas="b-gdbserver">gdbserver</primary>
293 </indexterm>
294 </listitem>
295 </varlistentry>
296
297 <varlistentry id="libinproctrace">
298 <term><filename class="libraryfile">libinproctrace.so</filename></term>
299 <listitem>
300 <para>
301 contains functions for the in-process tracing agent. The agent
302 allows for installing fast tracepoints, listing static tracepoint
303 markers, probing static tracepoints markers, and starting trace
304 monitoring.
305 </para>
306 <indexterm zone="gdb libinproctrace">
307 <primary sortas="c-libinproctrace">libinproctrace.so</primary>
308 </indexterm>
309 </listitem>
310 </varlistentry>
311
312 </variablelist>
313
314 </sect2>
315
316</sect1>
Note: See TracBrowser for help on using the repository browser.