source: general/prog/gdb.xml@ 8ccee9ac

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
Last change on this file since 8ccee9ac was 6f0a8c86, checked in by Bruce Dubbs <bdubbs@…>, 16 months ago

Update to gdb-13.1.

  • Property mode set to 100644
File size: 10.5 KB
RevLine 
[4b0ebf70]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
[8dfc5c3]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">
[6f0a8c86]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)">
[4b0ebf70]13]>
14
[5ad8a1f]15<!-- I skipped running the full tests for this 8.3.1 point version. Bruce -->
16
[d3970e1]17<sect1 id="gdb" xreflabel="GDB-&gdb-version;">
[4b0ebf70]18 <?dbhtml filename="gdb.html"?>
19
20
[d3970e1]21 <title>GDB-&gdb-version;</title>
[4b0ebf70]22
23 <indexterm zone="gdb">
[4890200]24 <primary sortas="a-GDB">GDB</primary>
[4b0ebf70]25 </indexterm>
26
27 <sect2 role="package">
[d3970e1]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>
[4b0ebf70]38
[9c87711]39 &lfs113_checked;
[4b0ebf70]40
41 <bridgehead renderas="sect3">Package Information</bridgehead>
42 <itemizedlist spacing="compact">
43 <listitem>
[4890200]44 <para>
45 Download (HTTP): <ulink url="&gdb-download-http;"/>
46 </para>
[4b0ebf70]47 </listitem>
48 <listitem>
[4890200]49 <para>
50 Download (FTP): <ulink url="&gdb-download-ftp;"/>
51 </para>
[4b0ebf70]52 </listitem>
53 <listitem>
[4890200]54 <para>
55 Download MD5 sum: &gdb-md5sum;
56 </para>
[4b0ebf70]57 </listitem>
58 <listitem>
[4890200]59 <para>
60 Download size: &gdb-size;
61 </para>
[4b0ebf70]62 </listitem>
63 <listitem>
[4890200]64 <para>
65 Estimated disk space required: &gdb-buildsize;
66 </para>
[4b0ebf70]67 </listitem>
68 <listitem>
[4890200]69 <para>
70 Estimated build time: &gdb-time;
71 </para>
[4b0ebf70]72 </listitem>
73 </itemizedlist>
[56244269]74<!--
[17817c8]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>
[56244269]84-->
[d3970e1]85 <bridgehead renderas="sect3">GDB Dependencies</bridgehead>
[d4c9b7c]86
[9533795]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
[d4c9b7c]94 <bridgehead renderas="sect4">Optional</bridgehead>
95 <para role="optional">
[f4002c5]96 <!-- <xref linkend="dejagnu"/> (required for tests), -->
[852fc810]97 <xref linkend="doxygen"/>,
[a2e21ee]98 <xref linkend="gcc"/> (ada, gfortran, and go are used for tests),
[51cb7cd]99 <xref linkend="guile"/>,
[9533795]100 <xref linkend="python2"/>,
[51cb7cd]101 <xref linkend="rust"/> (used for some tests),
[2029b72]102 <xref linkend="valgrind"/>, and
103 <ulink url="https://sourceware.org/systemtap/">SystemTap</ulink>
[51cb7cd]104 (run-time, used for tests)
[d4c9b7c]105 </para>
106
[4b0ebf70]107 <para condition="html" role="usernotes">User Notes:
[d3970e1]108 <ulink url="&blfs-wiki;/gdb"/>
109 </para>
[4b0ebf70]110 </sect2>
111
112 <sect2 role="installation">
[d3970e1]113 <title>Installation of GDB</title>
[661e7eb]114
[d3970e1]115 <para>
116 Install <application>GDB</application> by running the following
117 commands:
118 </para>
[4b0ebf70]119
[29d11601]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;
[4b0ebf70]126make</userinput></screen>
127
[46fd248]128 <para>
129 Optionally, to build the API documentation using
130 <xref linkend="doxygen"/>, run:
131 </para>
132
[a42c273]133<screen remap="doc"><userinput>make -C gdb/doc doxy</userinput></screen>
[46fd248]134
[d3970e1]135 <para>
[03b05e7]136 To test the results, issue:
137 </para>
138
[a42c273]139<screen remap="test"><userinput>pushd gdb/testsuite &amp;&amp;
[03b05e7]140make site.exp &amp;&amp;
141echo "set gdb_test_timeout 120" &gt;&gt; site.exp &amp;&amp;
[a114fcc]142runtest
[03b05e7]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>.
[39e42c88]148 There are many problems with the test suite:
[d3970e1]149 </para>
[8558044]150
[39e42c88]151 <itemizedlist>
152 <listitem>
153 <para>
[3e42104]154 Clean directories are needed if re-running the tests. For that
[6a1237d]155 reason, make a copy of the compiled source code
[8558044]156 directory before the tests in case you need to run the tests again.
[39e42c88]157 </para>
158 </listitem>
[8558044]159
[39e42c88]160 <listitem>
161 <para>
162 Results depend on installed compilers.
163 </para>
164 </listitem>
[8558044]165<!-- I did not see this
[39e42c88]166 <listitem>
167 <para>
[8558044]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
[3e42104]171 run).
[39e42c88]172 </para>
173 </listitem>
[29d11601]174or this
[39e42c88]175 <listitem>
176 <para>
177 There are failures associated with system readline 6.x.
178 </para>
179 </listitem>
[29d11601]180-->
[e2fe6d4]181<!--
[39e42c88]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>
[e2fe6d4]190-->
[29d11601]191<!-- I don't know if this is true or not. I tested on a Haswell.
[24c0a06e]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>
[8558044]199-->
[39e42c88]200 <listitem>
201 <para>
[1fe05eb]202<!-- for gdb-11.1, gcc-11.2 - pierre
[54bd123]203 A test run of the test suite had about 1700 unexpected failures
[f863fd7d]204 (out of over 80000 tests). Over 1370 of the failures were related
[e2fe6d4]205 to FORTRAN tests. -->
[6f0a8c86]206<!-- for gdb-12.1, gcc-11.3.0 - bdubbs
[e2fe6d4]207 A test run of the test suite had a little over 200 unexpected failures
[6f0a8c86]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.
[39e42c88]212 </para>
213 </listitem>
[aea8090f]214
[bfbc72a]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
[aea8090f]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
[39e42c88]230 </itemizedlist>
[4b0ebf70]231
[d3970e1]232 <para>
233 Now, as the <systemitem class="username">root</systemitem> user:
234 </para>
[4b0ebf70]235
236<screen role="root"><userinput>make -C gdb install</userinput></screen>
237
[852fc810]238 <para>
[46fd248]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):
[852fc810]242 </para>
243
[a42c273]244<screen role="root"
245 remap="doc"><userinput>install -d /usr/share/doc/gdb-&gdb-version; &amp;&amp;
[03b05e7]246rm -rf gdb/doc/doxy/xml &amp;&amp;
[852fc810]247cp -Rv gdb/doc/doxy /usr/share/doc/gdb-&gdb-version;</userinput></screen>
248
[4b0ebf70]249 </sect2>
[d3970e1]250
[870e9f05]251 <sect2 role="commands">
252 <title>Command Explanations</title>
[8558044]253
[870e9f05]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
[d38dc9a]260 <para>
261 <parameter>--with-python=/usr/bin/python3</parameter>: This switch
[54bd123]262 forces <application>GDB</application> to use Python 3.
263 Remove this switch if you have installed
[9533795]264 <xref linkend="python2"/> and want to use it instead of Python 3.
[d38dc9a]265 </para>
266
[870e9f05]267 </sect2>
268
[4b0ebf70]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>
[4890200]278 <seg>
[6cd96df]279 gcore, gdb and gdbserver
[4890200]280 </seg>
281 <seg>
[a2e21ee]282 <!--libinproctrace.so-->
283 None
[4890200]284 </seg>
285 <seg>
[03b05e7]286 /usr/{include,share}/gdb and /usr/share/doc/gdb-&gdb-version;
[4890200]287 </seg>
[4b0ebf70]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
[a55a187]296 <varlistentry id="gcore">
297 <term><command>gcore</command></term>
298 <listitem>
299 <para>
[4c24eb0a]300 generates a core dump of a running program
[a55a187]301 </para>
302 <indexterm zone="gdb gcore">
303 <primary sortas="b-gcore">gcore</primary>
304 </indexterm>
305 </listitem>
306 </varlistentry>
307
[4b0ebf70]308 <varlistentry id="gdb-prog">
309 <term><command>gdb</command></term>
310 <listitem>
[d3970e1]311 <para>
[4c24eb0a]312 is the GNU Debugger
[d3970e1]313 </para>
[4b0ebf70]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>
[d3970e1]323 <para>
[4890200]324 is a remote server for the GNU debugger (it allows programs
[4c24eb0a]325 to be debugged from a different machine)
[d3970e1]326 </para>
[4b0ebf70]327 <indexterm zone="gdb gdbserver">
328 <primary sortas="b-gdbserver">gdbserver</primary>
329 </indexterm>
330 </listitem>
331 </varlistentry>
332
[a2e21ee]333<!-- Not present with 10.1
[4b0ebf70]334 <varlistentry id="libinproctrace">
[4890200]335 <term><filename class="libraryfile">libinproctrace.so</filename></term>
[4b0ebf70]336 <listitem>
[d3970e1]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>
[4b0ebf70]343 <indexterm zone="gdb libinproctrace">
344 <primary sortas="c-libinproctrace">libinproctrace.so</primary>
345 </indexterm>
346 </listitem>
[d3970e1]347 </varlistentry>
[a2e21ee]348 -->
[4b0ebf70]349 </variablelist>
350
351 </sect2>
352
353</sect1>
Note: See TracBrowser for help on using the repository browser.