source: general/prog/gdb.xml@ b112f043

11.3 12.0 12.1 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts lazarus lxqt plabs/newcss python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition trunk xry111/llvm18 xry111/xf86-video-removal
Last change on this file since b112f043 was 3f2db3a6, checked in by Pierre Labastie <pierre.labastie@…>, 18 months ago

Remove sect1info tags

They only contain a date tag that is nowhere used.

  • Property mode set to 100644
File size: 10.7 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 "759a1b8d2b4d403367dd0e14fa04643d">
10 <!ENTITY gdb-size "21 MB">
11 <!ENTITY gdb-buildsize "716 MB (add 742 MB for docs; add 582 MB for tests)">
12 <!ENTITY gdb-time "1.8 SBU (Using parallelism=4; add 0.5 SBU for docs; add 32 SBU for tests)">
13]>
14
15<!-- I skipped running the full tests for this 8.3.1 point version. Bruce -->
16
17<sect1 id="gdb" xreflabel="GDB-&gdb-version;">
18 <?dbhtml filename="gdb.html"?>
19
20
21 <title>GDB-&gdb-version;</title>
22
23 <indexterm zone="gdb">
24 <primary sortas="a-GDB">GDB</primary>
25 </indexterm>
26
27 <sect2 role="package">
28 <title>Introduction to GDB</title>
29
30 <para>
31 <application>GDB</application>, the GNU Project debugger, allows you
32 to see what is going on <quote>inside</quote> another program while it
33 executes -- or what another program was doing at the moment it crashed.
34 Note that <application>GDB</application> is most effective when tracing
35 programs and libraries that were built with debugging symbols and not
36 stripped.
37 </para>
38
39 &lfs112_checked;
40
41 <bridgehead renderas="sect3">Package Information</bridgehead>
42 <itemizedlist spacing="compact">
43 <listitem>
44 <para>
45 Download (HTTP): <ulink url="&gdb-download-http;"/>
46 </para>
47 </listitem>
48 <listitem>
49 <para>
50 Download (FTP): <ulink url="&gdb-download-ftp;"/>
51 </para>
52 </listitem>
53 <listitem>
54 <para>
55 Download MD5 sum: &gdb-md5sum;
56 </para>
57 </listitem>
58 <listitem>
59 <para>
60 Download size: &gdb-size;
61 </para>
62 </listitem>
63 <listitem>
64 <para>
65 Estimated disk space required: &gdb-buildsize;
66 </para>
67 </listitem>
68 <listitem>
69 <para>
70 Estimated build time: &gdb-time;
71 </para>
72 </listitem>
73 </itemizedlist>
74<!--
75 <bridgehead renderas="sect3">Additional Downloads</bridgehead>
76 <itemizedlist spacing="compact">
77 <listitem>
78 <para>
79 Required patch:
80 <ulink url="&patch-root;/gdb-&gdb-version;-upstream_fixes-1.patch"/>
81 </para>
82 </listitem>
83 </itemizedlist>
84-->
85 <bridgehead renderas="sect3">GDB Dependencies</bridgehead>
86
87 <bridgehead renderas="sect4">Recommended Runtime Dependency</bridgehead>
88 <para role="recommended">
89 <xref linkend="six"/> (Python 3 module, required at run-time to
90 use GDB scripts from various LFS/BLFS packages with Python 3
91 installed in LFS)
92 </para>
93
94 <bridgehead renderas="sect4">Optional</bridgehead>
95 <para role="optional">
96 <!-- <xref linkend="dejagnu"/> (required for tests), -->
97 <xref linkend="doxygen"/>,
98 <xref linkend="gcc"/> (ada, gfortran, and go are used for tests),
99 <xref linkend="guile"/>,
100 <xref linkend="python2"/>,
101 <xref linkend="rust"/> (used for some tests),
102 <xref linkend="valgrind"/>, and
103 <ulink url="https://sourceware.org/systemtap/">SystemTap</ulink>
104 (run-time, used for tests)
105 </para>
106
107 <para condition="html" role="usernotes">User Notes:
108 <ulink url="&blfs-wiki;/gdb"/>
109 </para>
110 </sect2>
111
112 <sect2 role="installation">
113 <title>Installation of GDB</title>
114
115 <!-- https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=1add37b
116 Will be included in 13.1, but not 12.2 (if there will be 12.2). -->
117 <para>
118 First, apply a change from upstream to fix issues with readline-8.2
119 or later:
120 </para>
121
122<screen><userinput remap="pre">sed '/return/s/rl.*characters/(char *) &amp;/' -i gdb/completer.c</userinput></screen>
123
124
125 <para>
126 Install <application>GDB</application> by running the following
127 commands:
128 </para>
129
130<screen><userinput>mkdir build &amp;&amp;
131cd build &amp;&amp;
132
133../configure --prefix=/usr \
134 --with-system-readline \
135 --with-python=/usr/bin/python3 &amp;&amp;
136make</userinput></screen>
137
138 <para>
139 Optionally, to build the API documentation using
140 <xref linkend="doxygen"/>, run:
141 </para>
142
143<screen remap="doc"><userinput>make -C gdb/doc doxy</userinput></screen>
144
145 <para>
146 To test the results, issue:
147 </para>
148
149<screen remap="test"><userinput>pushd gdb/testsuite &amp;&amp;
150make site.exp &amp;&amp;
151echo "set gdb_test_timeout 120" &gt;&gt; site.exp &amp;&amp;
152runtest
153popd</userinput></screen>
154
155 <para>
156 See <emphasis>gdb/testsuite/README</emphasis> and <ulink
157 url="https://sourceware.org/gdb/wiki/TestingGDB">TestingGDB</ulink>.
158 There are many problems with the test suite:
159 </para>
160
161 <itemizedlist>
162 <listitem>
163 <para>
164 Clean directories are needed if re-running the tests. For that
165 reason, make a copy of the compiled source code
166 directory before the tests in case you need to run the tests again.
167 </para>
168 </listitem>
169
170 <listitem>
171 <para>
172 Results depend on installed compilers.
173 </para>
174 </listitem>
175<!-- I did not see this
176 <listitem>
177 <para>
178 There are a large number of timeouts (there is a variable
179 that can be set to increase time for timeout, but
180 changing it will result in a different number of tests being
181 run).
182 </para>
183 </listitem>
184or this
185 <listitem>
186 <para>
187 There are failures associated with system readline 6.x.
188 </para>
189 </listitem>
190-->
191<!--
192 <listitem>
193 <para>
194 A few tests assume that the header file
195 <filename>&lt;sys/sdt.h&gt;</filename>, part of <ulink
196 url="https://sourceware.org/systemtap/">SystemTap</ulink>, is
197 present.
198 </para>
199 </listitem>
200-->
201<!-- I don't know if this is true or not. I tested on a Haswell.
202 <listitem>
203 <para>
204 If the test suite is run on a Skylake-based Intel CPU or newer,
205 many tests will fail due to the removal of the deprecated/problematic
206 libmpx library in GCC.
207 </para>
208 </listitem>
209-->
210 <listitem>
211 <para>
212<!-- for gdb-11.1, gcc-11.2 - pierre
213 A test run of the test suite had about 1700 unexpected failures
214 (out of over 80000 tests). Over 1370 of the failures were related
215 to FORTRAN tests. -->
216<!-- for gdb-12.1, gcc-11.3.0 - bdubbs -->
217 A test run of the test suite had a little over 200 unexpected failures
218 out of over 94000 tests.
219 </para>
220 </listitem>
221
222 <listitem>
223 <para>
224 On some systems, the gdb.tui test suite will fail if running over
225 SSH.
226 </para>
227 </listitem>
228
229 <listitem>
230 <para>
231 On some AMD-based systems, over 200 additional tests
232 may fail due to a difference in the threading implementation
233 on those CPUs.
234 </para>
235 </listitem>
236
237 </itemizedlist>
238
239 <para>
240 Now, as the <systemitem class="username">root</systemitem> user:
241 </para>
242
243<screen role="root"><userinput>make -C gdb install</userinput></screen>
244
245 <para>
246 If you have built the API documentation, it is now in gdb/doc/doxy.
247 You can install it (as the <systemitem class="username">root</systemitem>
248 user):
249 </para>
250
251<screen role="root"
252 remap="doc"><userinput>install -d /usr/share/doc/gdb-&gdb-version; &amp;&amp;
253rm -rf gdb/doc/doxy/xml &amp;&amp;
254cp -Rv gdb/doc/doxy /usr/share/doc/gdb-&gdb-version;</userinput></screen>
255
256 </sect2>
257
258 <sect2 role="commands">
259 <title>Command Explanations</title>
260
261 <para>
262 <parameter>--with-system-readline</parameter>: This switch forces
263 <application>GDB</application> to use the copy of
264 <application>Readline</application> installed in LFS.
265 </para>
266
267 <para>
268 <parameter>--with-python=/usr/bin/python3</parameter>: This switch
269 forces <application>GDB</application> to use Python 3.
270 Remove this switch if you have installed
271 <xref linkend="python2"/> and want to use it instead of Python 3.
272 </para>
273
274 </sect2>
275
276 <sect2 role="content">
277 <title>Contents</title>
278
279 <segmentedlist>
280 <segtitle>Installed Programs</segtitle>
281 <segtitle>Installed Library</segtitle>
282 <segtitle>Installed Directories</segtitle>
283
284 <seglistitem>
285 <seg>
286 gcore, gdb and gdbserver
287 </seg>
288 <seg>
289 <!--libinproctrace.so-->
290 None
291 </seg>
292 <seg>
293 /usr/{include,share}/gdb and /usr/share/doc/gdb-&gdb-version;
294 </seg>
295 </seglistitem>
296 </segmentedlist>
297
298 <variablelist>
299 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
300 <?dbfo list-presentation="list"?>
301 <?dbhtml list-presentation="table"?>
302
303 <varlistentry id="gcore">
304 <term><command>gcore</command></term>
305 <listitem>
306 <para>
307 generates a core dump of a running program
308 </para>
309 <indexterm zone="gdb gcore">
310 <primary sortas="b-gcore">gcore</primary>
311 </indexterm>
312 </listitem>
313 </varlistentry>
314
315 <varlistentry id="gdb-prog">
316 <term><command>gdb</command></term>
317 <listitem>
318 <para>
319 is the GNU Debugger
320 </para>
321 <indexterm zone="gdb gdb-prog">
322 <primary sortas="b-gdb-prog">gdb-prog</primary>
323 </indexterm>
324 </listitem>
325 </varlistentry>
326
327 <varlistentry id="gdbserver">
328 <term><command>gdbserver</command></term>
329 <listitem>
330 <para>
331 is a remote server for the GNU debugger (it allows programs
332 to be debugged from a different machine)
333 </para>
334 <indexterm zone="gdb gdbserver">
335 <primary sortas="b-gdbserver">gdbserver</primary>
336 </indexterm>
337 </listitem>
338 </varlistentry>
339
340<!-- Not present with 10.1
341 <varlistentry id="libinproctrace">
342 <term><filename class="libraryfile">libinproctrace.so</filename></term>
343 <listitem>
344 <para>
345 contains functions for the in-process tracing agent. The agent
346 allows for installing fast tracepoints, listing static tracepoint
347 markers, probing static tracepoints markers, and starting trace
348 monitoring.
349 </para>
350 <indexterm zone="gdb libinproctrace">
351 <primary sortas="c-libinproctrace">libinproctrace.so</primary>
352 </indexterm>
353 </listitem>
354 </varlistentry>
355 -->
356 </variablelist>
357
358 </sect2>
359
360</sect1>
Note: See TracBrowser for help on using the repository browser.