source: general/prog/gdb.xml@ e07baac6

11.2 11.3 12.0 12.1 12.2 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 xry111/for-12.3 xry111/llvm18 xry111/soup3 xry111/spidermonkey128 xry111/xf86-video-removal
Last change on this file since e07baac6 was 8c415ea, checked in by Douglas R. Reno <renodr@…>, 3 years ago

Tags

  • Property mode set to 100644
File size: 10.4 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">
[1895c552]9 <!ENTITY gdb-md5sum "433bd0904caa31c247b1b1867f2f911d">
[a2e21ee]10 <!ENTITY gdb-size "21 MB">
[1895c552]11 <!ENTITY gdb-buildsize "674 MB (add 729 MB for docs; add 538 MB for tests)">
12 <!ENTITY gdb-time "1.8 SBU (Using parallelism=4; add 0.5 SBU for docs; add 30 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 <sect1info>
21 <date>$Date$</date>
22 </sect1info>
23
[d3970e1]24 <title>GDB-&gdb-version;</title>
[4b0ebf70]25
26 <indexterm zone="gdb">
[4890200]27 <primary sortas="a-GDB">GDB</primary>
[4b0ebf70]28 </indexterm>
29
30 <sect2 role="package">
[d3970e1]31 <title>Introduction to GDB</title>
32
33 <para>
34 <application>GDB</application>, the GNU Project debugger, allows you
35 to see what is going on <quote>inside</quote> another program while it
36 executes -- or what another program was doing at the moment it crashed.
37 Note that <application>GDB</application> is most effective when tracing
38 programs and libraries that were built with debugging symbols and not
39 stripped.
40 </para>
[4b0ebf70]41
[8c415ea]42 &lfs111_checked;
[4b0ebf70]43
44 <bridgehead renderas="sect3">Package Information</bridgehead>
45 <itemizedlist spacing="compact">
46 <listitem>
[4890200]47 <para>
48 Download (HTTP): <ulink url="&gdb-download-http;"/>
49 </para>
[4b0ebf70]50 </listitem>
51 <listitem>
[4890200]52 <para>
53 Download (FTP): <ulink url="&gdb-download-ftp;"/>
54 </para>
[4b0ebf70]55 </listitem>
56 <listitem>
[4890200]57 <para>
58 Download MD5 sum: &gdb-md5sum;
59 </para>
[4b0ebf70]60 </listitem>
61 <listitem>
[4890200]62 <para>
63 Download size: &gdb-size;
64 </para>
[4b0ebf70]65 </listitem>
66 <listitem>
[4890200]67 <para>
68 Estimated disk space required: &gdb-buildsize;
69 </para>
[4b0ebf70]70 </listitem>
71 <listitem>
[4890200]72 <para>
73 Estimated build time: &gdb-time;
74 </para>
[4b0ebf70]75 </listitem>
76 </itemizedlist>
77
[17817c8]78 <bridgehead renderas="sect3">Additional Downloads</bridgehead>
79 <itemizedlist spacing="compact">
80 <listitem>
81 <para>
82 Required patch:
83 <ulink url="&patch-root;/gdb-&gdb-version;-upstream_fixes-1.patch"/>
84 </para>
85 </listitem>
86 </itemizedlist>
87
[d3970e1]88 <bridgehead renderas="sect3">GDB Dependencies</bridgehead>
[d4c9b7c]89
[9533795]90 <bridgehead renderas="sect4">Recommended Runtime Dependency</bridgehead>
91 <para role="recommended">
92 <xref linkend="six"/> (Python 3 module, required at run-time to
93 use GDB scripts from various LFS/BLFS packages with Python 3
94 installed in LFS)
95 </para>
96
[d4c9b7c]97 <bridgehead renderas="sect4">Optional</bridgehead>
98 <para role="optional">
[f4002c5]99 <!-- <xref linkend="dejagnu"/> (required for tests), -->
[852fc810]100 <xref linkend="doxygen"/>,
[a2e21ee]101 <xref linkend="gcc"/> (ada, gfortran, and go are used for tests),
[51cb7cd]102 <xref linkend="guile"/>,
[9533795]103 <xref linkend="python2"/>,
[51cb7cd]104 <xref linkend="rust"/> (used for some tests),
[2029b72]105 <xref linkend="valgrind"/>, and
106 <ulink url="https://sourceware.org/systemtap/">SystemTap</ulink>
[51cb7cd]107 (run-time, used for tests)
[d4c9b7c]108 </para>
109
[4b0ebf70]110 <para condition="html" role="usernotes">User Notes:
[d3970e1]111 <ulink url="&blfs-wiki;/gdb"/>
112 </para>
[4b0ebf70]113 </sect2>
114
115 <sect2 role="installation">
[d3970e1]116 <title>Installation of GDB</title>
[4b0ebf70]117
[17817c8]118 <para>
119 First, apply some changes from upstream to fix issues with glibc-2.35:
120 </para>
121
122<screen><userinput remap="pre">patch -Np1 -i ../gdb-&gdb-version;-upstream_fixes-1.patch</userinput></screen>
123
[d3970e1]124 <para>
125 Install <application>GDB</application> by running the following
126 commands:
127 </para>
[4b0ebf70]128
[29d11601]129<screen><userinput>mkdir build &amp;&amp;
130cd build &amp;&amp;
131
132../configure --prefix=/usr \
133 --with-system-readline \
134 --with-python=/usr/bin/python3 &amp;&amp;
[4b0ebf70]135make</userinput></screen>
136
[46fd248]137 <para>
138 Optionally, to build the API documentation using
139 <xref linkend="doxygen"/>, run:
140 </para>
141
[a42c273]142<screen remap="doc"><userinput>make -C gdb/doc doxy</userinput></screen>
[46fd248]143
[d3970e1]144 <para>
[03b05e7]145 To test the results, issue:
146 </para>
147
[a42c273]148<screen remap="test"><userinput>pushd gdb/testsuite &amp;&amp;
[03b05e7]149make site.exp &amp;&amp;
150echo "set gdb_test_timeout 120" &gt;&gt; site.exp &amp;&amp;
[a114fcc]151runtest
[03b05e7]152popd</userinput></screen>
153
154 <para>
155 See <emphasis>gdb/testsuite/README</emphasis> and <ulink
156 url="https://sourceware.org/gdb/wiki/TestingGDB">TestingGDB</ulink>.
[39e42c88]157 There are many problems with the test suite:
[d3970e1]158 </para>
[8558044]159
[39e42c88]160 <itemizedlist>
161 <listitem>
162 <para>
[3e42104]163 Clean directories are needed if re-running the tests. For that
[6a1237d]164 reason, make a copy of the compiled source code
[8558044]165 directory before the tests in case you need to run the tests again.
[39e42c88]166 </para>
167 </listitem>
[8558044]168
[39e42c88]169 <listitem>
170 <para>
171 Results depend on installed compilers.
172 </para>
173 </listitem>
[8558044]174<!-- I did not see this
[39e42c88]175 <listitem>
176 <para>
[8558044]177 There are a large number of timeouts (there is a variable
178 that can be set to increase time for timeout, but
179 changing it will result in a different number of tests being
[3e42104]180 run).
[39e42c88]181 </para>
182 </listitem>
[29d11601]183or this
[39e42c88]184 <listitem>
185 <para>
186 There are failures associated with system readline 6.x.
187 </para>
188 </listitem>
[29d11601]189-->
[39e42c88]190 <listitem>
191 <para>
192 A few tests assume that the header file
193 <filename>&lt;sys/sdt.h&gt;</filename>, part of <ulink
194 url="https://sourceware.org/systemtap/">SystemTap</ulink>, is
195 present.
196 </para>
197 </listitem>
[29d11601]198<!-- I don't know if this is true or not. I tested on a Haswell.
[24c0a06e]199 <listitem>
200 <para>
201 If the test suite is run on a Skylake-based Intel CPU or newer,
202 many tests will fail due to the removal of the deprecated/problematic
203 libmpx library in GCC.
204 </para>
205 </listitem>
[8558044]206-->
[39e42c88]207 <listitem>
208 <para>
[54bd123]209<!-- for gdb-11.1, gcc-11.2 - pierre -->
210 A test run of the test suite had about 1700 unexpected failures
[f863fd7d]211 (out of over 80000 tests). Over 1370 of the failures were related
212 to FORTRAN tests.
[39e42c88]213 </para>
214 </listitem>
[aea8090f]215
[bfbc72a]216 <listitem>
217 <para>
218 On some systems, the gdb.tui test suite will fail if running over
219 SSH.
220 </para>
221 </listitem>
222
[aea8090f]223 <listitem>
224 <para>
225 On some AMD-based systems, over 200 additional tests
226 may fail due to a difference in the threading implementation
227 on those CPUs.
228 </para>
229 </listitem>
230
[39e42c88]231 </itemizedlist>
[4b0ebf70]232
[d3970e1]233 <para>
234 Now, as the <systemitem class="username">root</systemitem> user:
235 </para>
[4b0ebf70]236
237<screen role="root"><userinput>make -C gdb install</userinput></screen>
238
[852fc810]239 <para>
[46fd248]240 If you have built the API documentation, it is now in gdb/doc/doxy.
241 You can install it (as the <systemitem class="username">root</systemitem>
242 user):
[852fc810]243 </para>
244
[a42c273]245<screen role="root"
246 remap="doc"><userinput>install -d /usr/share/doc/gdb-&gdb-version; &amp;&amp;
[03b05e7]247rm -rf gdb/doc/doxy/xml &amp;&amp;
[852fc810]248cp -Rv gdb/doc/doxy /usr/share/doc/gdb-&gdb-version;</userinput></screen>
249
[4b0ebf70]250 </sect2>
[d3970e1]251
[870e9f05]252 <sect2 role="commands">
253 <title>Command Explanations</title>
[8558044]254
[870e9f05]255 <para>
256 <parameter>--with-system-readline</parameter>: This switch forces
257 <application>GDB</application> to use the copy of
258 <application>Readline</application> installed in LFS.
259 </para>
260
[d38dc9a]261 <para>
262 <parameter>--with-python=/usr/bin/python3</parameter>: This switch
[54bd123]263 forces <application>GDB</application> to use Python 3.
264 Remove this switch if you have installed
[9533795]265 <xref linkend="python2"/> and want to use it instead of Python 3.
[d38dc9a]266 </para>
267
[870e9f05]268 </sect2>
269
[4b0ebf70]270 <sect2 role="content">
271 <title>Contents</title>
272
273 <segmentedlist>
274 <segtitle>Installed Programs</segtitle>
275 <segtitle>Installed Library</segtitle>
276 <segtitle>Installed Directories</segtitle>
277
278 <seglistitem>
[4890200]279 <seg>
[6cd96df]280 gcore, gdb and gdbserver
[4890200]281 </seg>
282 <seg>
[a2e21ee]283 <!--libinproctrace.so-->
284 None
[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
[a2e21ee]334<!-- Not present with 10.1
[4b0ebf70]335 <varlistentry id="libinproctrace">
[4890200]336 <term><filename class="libraryfile">libinproctrace.so</filename></term>
[4b0ebf70]337 <listitem>
[d3970e1]338 <para>
339 contains functions for the in-process tracing agent. The agent
340 allows for installing fast tracepoints, listing static tracepoint
341 markers, probing static tracepoints markers, and starting trace
342 monitoring.
343 </para>
[4b0ebf70]344 <indexterm zone="gdb libinproctrace">
345 <primary sortas="c-libinproctrace">libinproctrace.so</primary>
346 </indexterm>
347 </listitem>
[d3970e1]348 </varlistentry>
[a2e21ee]349 -->
[4b0ebf70]350 </variablelist>
351
352 </sect2>
353
354</sect1>
Note: See TracBrowser for help on using the repository browser.