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

12.1 12.2 gimp3 ken/TL2024 ken/tuningfonts lazarus plabs/newcss python3.11 rahul/power-profiles-daemon renodr/vulkan-addition trunk xry111/for-12.3 xry111/llvm18 xry111/spidermonkey128
Last change on this file since 8cc537fe was 44b3f440, checked in by Xi Ruoyao <xry111@…>, 12 months ago

treewide: Really remove commented out references to Python 2

It helps using grep for finding packages depending on Python 2.

  • Property mode set to 100644
File size: 11.0 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">
[da73c1c]9 <!ENTITY gdb-md5sum "fbd3cdae16c581e8a742cb766ba35076">
[6f0a8c86]10 <!ENTITY gdb-size "23 MB">
[da73c1c]11 <!ENTITY gdb-buildsize "914 MB (add 805 MB for docs; add 575 MB for tests)">
12 <!ENTITY gdb-time "2.1 SBU (add 0.4 SBU for docs; add 18 SBU for tests; all using parallelism=4)">
[4b0ebf70]13]>
14
[d3970e1]15<sect1 id="gdb" xreflabel="GDB-&gdb-version;">
[4b0ebf70]16 <?dbhtml filename="gdb.html"?>
17
18
[d3970e1]19 <title>GDB-&gdb-version;</title>
[4b0ebf70]20
21 <indexterm zone="gdb">
[4890200]22 <primary sortas="a-GDB">GDB</primary>
[4b0ebf70]23 </indexterm>
24
25 <sect2 role="package">
[d3970e1]26 <title>Introduction to GDB</title>
27
28 <para>
29 <application>GDB</application>, the GNU Project debugger, allows you
30 to see what is going on <quote>inside</quote> another program while it
31 executes -- or what another program was doing at the moment it crashed.
32 Note that <application>GDB</application> is most effective when tracing
33 programs and libraries that were built with debugging symbols and not
34 stripped.
35 </para>
[4b0ebf70]36
[ed345e7]37 &lfs120_checked;
[4b0ebf70]38
39 <bridgehead renderas="sect3">Package Information</bridgehead>
40 <itemizedlist spacing="compact">
41 <listitem>
[4890200]42 <para>
43 Download (HTTP): <ulink url="&gdb-download-http;"/>
44 </para>
[4b0ebf70]45 </listitem>
46 <listitem>
[4890200]47 <para>
48 Download (FTP): <ulink url="&gdb-download-ftp;"/>
49 </para>
[4b0ebf70]50 </listitem>
51 <listitem>
[4890200]52 <para>
53 Download MD5 sum: &gdb-md5sum;
54 </para>
[4b0ebf70]55 </listitem>
56 <listitem>
[4890200]57 <para>
58 Download size: &gdb-size;
59 </para>
[4b0ebf70]60 </listitem>
61 <listitem>
[4890200]62 <para>
63 Estimated disk space required: &gdb-buildsize;
64 </para>
[4b0ebf70]65 </listitem>
66 <listitem>
[4890200]67 <para>
68 Estimated build time: &gdb-time;
69 </para>
[4b0ebf70]70 </listitem>
71 </itemizedlist>
[da73c1c]72 <!--
[17817c8]73 <bridgehead renderas="sect3">Additional Downloads</bridgehead>
74 <itemizedlist spacing="compact">
75 <listitem>
76 <para>
77 Required patch:
78 <ulink url="&patch-root;/gdb-&gdb-version;-upstream_fixes-1.patch"/>
79 </para>
80 </listitem>
81 </itemizedlist>
[da73c1c]82 -->
[d3970e1]83 <bridgehead renderas="sect3">GDB Dependencies</bridgehead>
[d4c9b7c]84
[9533795]85 <bridgehead renderas="sect4">Recommended Runtime Dependency</bridgehead>
86 <para role="recommended">
87 <xref linkend="six"/> (Python 3 module, required at run-time to
88 use GDB scripts from various LFS/BLFS packages with Python 3
89 installed in LFS)
90 </para>
91
[d4c9b7c]92 <bridgehead renderas="sect4">Optional</bridgehead>
93 <para role="optional">
[852fc810]94 <xref linkend="doxygen"/>,
[a2e21ee]95 <xref linkend="gcc"/> (ada, gfortran, and go are used for tests),
[51cb7cd]96 <xref linkend="guile"/>,
97 <xref linkend="rust"/> (used for some tests),
[2029b72]98 <xref linkend="valgrind"/>, and
99 <ulink url="https://sourceware.org/systemtap/">SystemTap</ulink>
[51cb7cd]100 (run-time, used for tests)
[d4c9b7c]101 </para>
102
[4b0ebf70]103 </sect2>
104
105 <sect2 role="installation">
[d3970e1]106 <title>Installation of GDB</title>
[da73c1c]107 <!--
[d1e4f43]108 <para>
109 First, apply a patch that fixes problems when debugging programs compiled
110 with <xref linkend="rust" role="nodep"/>:
111 </para>
112
113<screen><userinput remap="pre">patch -Np1 -i ../gdb-&gdb-version;-upstream_fixes-1.patch</userinput></screen>
[da73c1c]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. -->
[e440af5]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.-->
[da73c1c]209<!-- for gdb-13.0, gcc-12.2.0 - bdubbs
[6f0a8c86]210 A test run of the test suite had 33 unexpected failures
[da73c1c]211 out of over 106000 tests. -->
212<!-- for gdb-13.2, gcc-13.1.0 - pierre -->
213 A test run of the test suite had 183 unexpected failures
214 out of over 105000 tests.
[39e42c88]215 </para>
216 </listitem>
[aea8090f]217
[bfbc72a]218 <listitem>
219 <para>
220 On some systems, the gdb.tui test suite will fail if running over
221 SSH.
222 </para>
223 </listitem>
224
[aea8090f]225 <listitem>
226 <para>
227 On some AMD-based systems, over 200 additional tests
228 may fail due to a difference in the threading implementation
229 on those CPUs.
230 </para>
231 </listitem>
232
[39e42c88]233 </itemizedlist>
[4b0ebf70]234
[d3970e1]235 <para>
236 Now, as the <systemitem class="username">root</systemitem> user:
237 </para>
[4b0ebf70]238
[da73c1c]239<screen role="root"><userinput>make -C gdb install &amp;&amp;
240make -C gdbserver install</userinput></screen>
[4b0ebf70]241
[852fc810]242 <para>
[46fd248]243 If you have built the API documentation, it is now in gdb/doc/doxy.
244 You can install it (as the <systemitem class="username">root</systemitem>
245 user):
[852fc810]246 </para>
247
[a42c273]248<screen role="root"
249 remap="doc"><userinput>install -d /usr/share/doc/gdb-&gdb-version; &amp;&amp;
[03b05e7]250rm -rf gdb/doc/doxy/xml &amp;&amp;
[852fc810]251cp -Rv gdb/doc/doxy /usr/share/doc/gdb-&gdb-version;</userinput></screen>
252
[4b0ebf70]253 </sect2>
[d3970e1]254
[870e9f05]255 <sect2 role="commands">
256 <title>Command Explanations</title>
[8558044]257
[870e9f05]258 <para>
259 <parameter>--with-system-readline</parameter>: This switch forces
260 <application>GDB</application> to use the copy of
261 <application>Readline</application> installed in LFS.
262 </para>
263
[d38dc9a]264 <para>
265 <parameter>--with-python=/usr/bin/python3</parameter>: This switch
[54bd123]266 forces <application>GDB</application> to use Python 3.
[d38dc9a]267 </para>
268
[870e9f05]269 </sect2>
270
[4b0ebf70]271 <sect2 role="content">
272 <title>Contents</title>
273
274 <segmentedlist>
275 <segtitle>Installed Programs</segtitle>
276 <segtitle>Installed Library</segtitle>
277 <segtitle>Installed Directories</segtitle>
278
279 <seglistitem>
[4890200]280 <seg>
[da73c1c]281 gcore, gdb, gdbserver, and gdb-add-index
[4890200]282 </seg>
283 <seg>
[da73c1c]284 libinproctrace.so
[4890200]285 </seg>
286 <seg>
[03b05e7]287 /usr/{include,share}/gdb and /usr/share/doc/gdb-&gdb-version;
[4890200]288 </seg>
[4b0ebf70]289 </seglistitem>
290 </segmentedlist>
291
292 <variablelist>
293 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
294 <?dbfo list-presentation="list"?>
295 <?dbhtml list-presentation="table"?>
296
[a55a187]297 <varlistentry id="gcore">
298 <term><command>gcore</command></term>
299 <listitem>
300 <para>
[4c24eb0a]301 generates a core dump of a running program
[a55a187]302 </para>
303 <indexterm zone="gdb gcore">
304 <primary sortas="b-gcore">gcore</primary>
305 </indexterm>
306 </listitem>
307 </varlistentry>
308
[4b0ebf70]309 <varlistentry id="gdb-prog">
310 <term><command>gdb</command></term>
311 <listitem>
[d3970e1]312 <para>
[4c24eb0a]313 is the GNU Debugger
[d3970e1]314 </para>
[4b0ebf70]315 <indexterm zone="gdb gdb-prog">
316 <primary sortas="b-gdb-prog">gdb-prog</primary>
317 </indexterm>
318 </listitem>
319 </varlistentry>
320
321 <varlistentry id="gdbserver">
322 <term><command>gdbserver</command></term>
323 <listitem>
[d3970e1]324 <para>
[4890200]325 is a remote server for the GNU debugger (it allows programs
[4c24eb0a]326 to be debugged from a different machine)
[d3970e1]327 </para>
[4b0ebf70]328 <indexterm zone="gdb gdbserver">
329 <primary sortas="b-gdbserver">gdbserver</primary>
330 </indexterm>
331 </listitem>
332 </varlistentry>
333
[11f9b1d1]334 <varlistentry id="gdb-add-index">
335 <term><command>gdb-add-index</command></term>
336 <listitem>
337 <para>
338 Allows adding index files to ELF binaries. This speeds up
339 <command>gdb</command> start on large programs.
340 </para>
341 <indexterm zone="gdb gdb-add-index">
342 <primary sortas="b-gdb-add-index">gdb-add-index</primary>
343 </indexterm>
344 </listitem>
345 </varlistentry>
346
[4b0ebf70]347 <varlistentry id="libinproctrace">
[4890200]348 <term><filename class="libraryfile">libinproctrace.so</filename></term>
[4b0ebf70]349 <listitem>
[d3970e1]350 <para>
351 contains functions for the in-process tracing agent. The agent
352 allows for installing fast tracepoints, listing static tracepoint
353 markers, probing static tracepoints markers, and starting trace
354 monitoring.
355 </para>
[4b0ebf70]356 <indexterm zone="gdb libinproctrace">
357 <primary sortas="c-libinproctrace">libinproctrace.so</primary>
358 </indexterm>
359 </listitem>
[d3970e1]360 </varlistentry>
[11f9b1d1]361
[4b0ebf70]362 </variablelist>
363
364 </sect2>
365
366</sect1>
Note: See TracBrowser for help on using the repository browser.