source: general/prog/gdb.xml@ a8c1294

11.3 12.0 12.1 kea ken/TL2024 ken/tuningfonts lazarus lxqt plabs/newcss python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition trunk xry111/llvm18 xry111/xf86-video-removal r11.3
Last change on this file since a8c1294 was 6f0a8c86, checked in by Bruce Dubbs <bdubbs@…>, 15 months ago

Update to gdb-13.1.

  • Property mode set to 100644
File size: 10.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 "4aaad768ff2585464173c091947287ec">
10 <!ENTITY gdb-size "23 MB">
11 <!ENTITY gdb-buildsize "1.1 GB (add 406 MB for docs; add 373 MB for tests)">
12 <!ENTITY gdb-time "2.1 SBU (Using parallelism=4; add 0.5 SBU for docs; add 20 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 &lfs113_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 <para>
116 Install <application>GDB</application> by running the following
117 commands:
118 </para>
119
120<screen><userinput>mkdir build &amp;&amp;
121cd build &amp;&amp;
122
123../configure --prefix=/usr \
124 --with-system-readline \
125 --with-python=/usr/bin/python3 &amp;&amp;
126make</userinput></screen>
127
128 <para>
129 Optionally, to build the API documentation using
130 <xref linkend="doxygen"/>, run:
131 </para>
132
133<screen remap="doc"><userinput>make -C gdb/doc doxy</userinput></screen>
134
135 <para>
136 To test the results, issue:
137 </para>
138
139<screen remap="test"><userinput>pushd gdb/testsuite &amp;&amp;
140make site.exp &amp;&amp;
141echo "set gdb_test_timeout 120" &gt;&gt; site.exp &amp;&amp;
142runtest
143popd</userinput></screen>
144
145 <para>
146 See <emphasis>gdb/testsuite/README</emphasis> and <ulink
147 url="https://sourceware.org/gdb/wiki/TestingGDB">TestingGDB</ulink>.
148 There are many problems with the test suite:
149 </para>
150
151 <itemizedlist>
152 <listitem>
153 <para>
154 Clean directories are needed if re-running the tests. For that
155 reason, make a copy of the compiled source code
156 directory before the tests in case you need to run the tests again.
157 </para>
158 </listitem>
159
160 <listitem>
161 <para>
162 Results depend on installed compilers.
163 </para>
164 </listitem>
165<!-- I did not see this
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>
174or this
175 <listitem>
176 <para>
177 There are failures associated with system readline 6.x.
178 </para>
179 </listitem>
180-->
181<!--
182 <listitem>
183 <para>
184 A few tests assume that the header file
185 <filename>&lt;sys/sdt.h&gt;</filename>, part of <ulink
186 url="https://sourceware.org/systemtap/">SystemTap</ulink>, is
187 present.
188 </para>
189 </listitem>
190-->
191<!-- I don't know if this is true or not. I tested on a Haswell.
192 <listitem>
193 <para>
194 If the test suite is run on a Skylake-based Intel CPU or newer,
195 many tests will fail due to the removal of the deprecated/problematic
196 libmpx library in GCC.
197 </para>
198 </listitem>
199-->
200 <listitem>
201 <para>
202<!-- for gdb-11.1, gcc-11.2 - pierre
203 A test run of the test suite had about 1700 unexpected failures
204 (out of over 80000 tests). Over 1370 of the failures were related
205 to FORTRAN tests. -->
206<!-- for gdb-12.1, gcc-11.3.0 - bdubbs
207 A test run of the test suite had a little over 200 unexpected failures
208 out of over 94000 tests.-->
209<!-- for gdb-13.0, gcc-12.2.0 - bdubbs -->
210 A test run of the test suite had 33 unexpected failures
211 out of over 106000 tests.
212 </para>
213 </listitem>
214
215 <listitem>
216 <para>
217 On some systems, the gdb.tui test suite will fail if running over
218 SSH.
219 </para>
220 </listitem>
221
222 <listitem>
223 <para>
224 On some AMD-based systems, over 200 additional tests
225 may fail due to a difference in the threading implementation
226 on those CPUs.
227 </para>
228 </listitem>
229
230 </itemizedlist>
231
232 <para>
233 Now, as the <systemitem class="username">root</systemitem> user:
234 </para>
235
236<screen role="root"><userinput>make -C gdb install</userinput></screen>
237
238 <para>
239 If you have built the API documentation, it is now in gdb/doc/doxy.
240 You can install it (as the <systemitem class="username">root</systemitem>
241 user):
242 </para>
243
244<screen role="root"
245 remap="doc"><userinput>install -d /usr/share/doc/gdb-&gdb-version; &amp;&amp;
246rm -rf gdb/doc/doxy/xml &amp;&amp;
247cp -Rv gdb/doc/doxy /usr/share/doc/gdb-&gdb-version;</userinput></screen>
248
249 </sect2>
250
251 <sect2 role="commands">
252 <title>Command Explanations</title>
253
254 <para>
255 <parameter>--with-system-readline</parameter>: This switch forces
256 <application>GDB</application> to use the copy of
257 <application>Readline</application> installed in LFS.
258 </para>
259
260 <para>
261 <parameter>--with-python=/usr/bin/python3</parameter>: This switch
262 forces <application>GDB</application> to use Python 3.
263 Remove this switch if you have installed
264 <xref linkend="python2"/> and want to use it instead of Python 3.
265 </para>
266
267 </sect2>
268
269 <sect2 role="content">
270 <title>Contents</title>
271
272 <segmentedlist>
273 <segtitle>Installed Programs</segtitle>
274 <segtitle>Installed Library</segtitle>
275 <segtitle>Installed Directories</segtitle>
276
277 <seglistitem>
278 <seg>
279 gcore, gdb and gdbserver
280 </seg>
281 <seg>
282 <!--libinproctrace.so-->
283 None
284 </seg>
285 <seg>
286 /usr/{include,share}/gdb and /usr/share/doc/gdb-&gdb-version;
287 </seg>
288 </seglistitem>
289 </segmentedlist>
290
291 <variablelist>
292 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
293 <?dbfo list-presentation="list"?>
294 <?dbhtml list-presentation="table"?>
295
296 <varlistentry id="gcore">
297 <term><command>gcore</command></term>
298 <listitem>
299 <para>
300 generates a core dump of a running program
301 </para>
302 <indexterm zone="gdb gcore">
303 <primary sortas="b-gcore">gcore</primary>
304 </indexterm>
305 </listitem>
306 </varlistentry>
307
308 <varlistentry id="gdb-prog">
309 <term><command>gdb</command></term>
310 <listitem>
311 <para>
312 is the GNU Debugger
313 </para>
314 <indexterm zone="gdb gdb-prog">
315 <primary sortas="b-gdb-prog">gdb-prog</primary>
316 </indexterm>
317 </listitem>
318 </varlistentry>
319
320 <varlistentry id="gdbserver">
321 <term><command>gdbserver</command></term>
322 <listitem>
323 <para>
324 is a remote server for the GNU debugger (it allows programs
325 to be debugged from a different machine)
326 </para>
327 <indexterm zone="gdb gdbserver">
328 <primary sortas="b-gdbserver">gdbserver</primary>
329 </indexterm>
330 </listitem>
331 </varlistentry>
332
333<!-- Not present with 10.1
334 <varlistentry id="libinproctrace">
335 <term><filename class="libraryfile">libinproctrace.so</filename></term>
336 <listitem>
337 <para>
338 contains functions for the in-process tracing agent. The agent
339 allows for installing fast tracepoints, listing static tracepoint
340 markers, probing static tracepoints markers, and starting trace
341 monitoring.
342 </para>
343 <indexterm zone="gdb libinproctrace">
344 <primary sortas="c-libinproctrace">libinproctrace.so</primary>
345 </indexterm>
346 </listitem>
347 </varlistentry>
348 -->
349 </variablelist>
350
351 </sect2>
352
353</sect1>
Note: See TracBrowser for help on using the repository browser.