source: general/prog/gdb.xml@ 3166e3c

11.0 11.1 11.2 11.3 12.0 12.1 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 upgradedb xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since 3166e3c was 3166e3c, checked in by Douglas R. Reno <renodr@…>, 3 years ago

Tags

  • Property mode set to 100644
File size: 10.1 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">
[aa61a13]9 <!ENTITY gdb-md5sum "c044b7146903ec51c9d2337a29aee93b">
[a2e21ee]10 <!ENTITY gdb-size "21 MB">
11 <!ENTITY gdb-buildsize "761 MB (add 750 MB for docs; add 633 MB for tests)">
12 <!ENTITY gdb-time "1.7 SBU (Using parallelism=4; add 30 SBU for tests; add 0.5 SBU for docs)">
[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
[3166e3c]42 &lfs110a_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
[d3970e1]78 <bridgehead renderas="sect3">GDB Dependencies</bridgehead>
[d4c9b7c]79
[9533795]80 <bridgehead renderas="sect4">Recommended Runtime Dependency</bridgehead>
81 <para role="recommended">
82 <xref linkend="six"/> (Python 3 module, required at run-time to
83 use GDB scripts from various LFS/BLFS packages with Python 3
84 installed in LFS)
85 </para>
86
[d4c9b7c]87 <bridgehead renderas="sect4">Optional</bridgehead>
88 <para role="optional">
[f4002c5]89 <!-- <xref linkend="dejagnu"/> (required for tests), -->
[852fc810]90 <xref linkend="doxygen"/>,
[a2e21ee]91 <xref linkend="gcc"/> (ada, gfortran, and go are used for tests),
[51cb7cd]92 <xref linkend="guile"/>,
[9533795]93 <xref linkend="python2"/>,
[51cb7cd]94 <xref linkend="rust"/> (used for some tests),
[2029b72]95 <xref linkend="valgrind"/>, and
96 <ulink url="https://sourceware.org/systemtap/">SystemTap</ulink>
[51cb7cd]97 (run-time, used for tests)
[d4c9b7c]98 </para>
99
[4b0ebf70]100 <para condition="html" role="usernotes">User Notes:
[d3970e1]101 <ulink url="&blfs-wiki;/gdb"/>
102 </para>
[4b0ebf70]103 </sect2>
104
105 <sect2 role="installation">
[d3970e1]106 <title>Installation of GDB</title>
[4b0ebf70]107
[d3970e1]108 <para>
109 Install <application>GDB</application> by running the following
110 commands:
111 </para>
[4b0ebf70]112
[29d11601]113<screen><userinput>mkdir build &amp;&amp;
114cd build &amp;&amp;
115
116../configure --prefix=/usr \
117 --with-system-readline \
118 --with-python=/usr/bin/python3 &amp;&amp;
[4b0ebf70]119make</userinput></screen>
120
[46fd248]121 <para>
122 Optionally, to build the API documentation using
123 <xref linkend="doxygen"/>, run:
124 </para>
125
[a42c273]126<screen remap="doc"><userinput>make -C gdb/doc doxy</userinput></screen>
[46fd248]127
[d3970e1]128 <para>
[03b05e7]129 To test the results, issue:
130 </para>
131
[a42c273]132<screen remap="test"><userinput>pushd gdb/testsuite &amp;&amp;
[03b05e7]133make site.exp &amp;&amp;
134echo "set gdb_test_timeout 120" &gt;&gt; site.exp &amp;&amp;
[a114fcc]135runtest
[03b05e7]136popd</userinput></screen>
137
138 <para>
139 See <emphasis>gdb/testsuite/README</emphasis> and <ulink
140 url="https://sourceware.org/gdb/wiki/TestingGDB">TestingGDB</ulink>.
[39e42c88]141 There are many problems with the test suite:
[d3970e1]142 </para>
[39e42c88]143
144 <itemizedlist>
145 <listitem>
146 <para>
[3e42104]147 Clean directories are needed if re-running the tests. For that
[6a1237d]148 reason, make a copy of the compiled source code
[39e42c88]149 directory before the tests in case you need to run the tests again.
150 </para>
151 </listitem>
152
153 <listitem>
154 <para>
155 Results depend on installed compilers.
156 </para>
157 </listitem>
[29d11601]158<!-- I did not see this
[39e42c88]159 <listitem>
160 <para>
161 There are a large number of timeouts (there is a variable
162 that can be set to increase time for timeout, but
163 changing it will result in a different number of tests being
[3e42104]164 run).
[39e42c88]165 </para>
166 </listitem>
[29d11601]167or this
[39e42c88]168 <listitem>
169 <para>
170 There are failures associated with system readline 6.x.
171 </para>
172 </listitem>
[29d11601]173-->
[39e42c88]174 <listitem>
175 <para>
176 A few tests assume that the header file
177 <filename>&lt;sys/sdt.h&gt;</filename>, part of <ulink
178 url="https://sourceware.org/systemtap/">SystemTap</ulink>, is
179 present.
180 </para>
181 </listitem>
[29d11601]182<!-- I don't know if this is true or not. I tested on a Haswell.
[24c0a06e]183 <listitem>
184 <para>
185 If the test suite is run on a Skylake-based Intel CPU or newer,
186 many tests will fail due to the removal of the deprecated/problematic
187 libmpx library in GCC.
188 </para>
189 </listitem>
[29d11601]190-->
[39e42c88]191 <listitem>
192 <para>
[800323ec]193 A test run of the test suite had 230 unexpected failures
[29d11601]194 (out of over 70000 tests).
[39e42c88]195 </para>
196 </listitem>
[aea8090f]197
[bfbc72a]198 <listitem>
199 <para>
200 On some systems, the gdb.tui test suite will fail if running over
201 SSH.
202 </para>
203 </listitem>
204
[aea8090f]205 <listitem>
206 <para>
207 On some AMD-based systems, over 200 additional tests
208 may fail due to a difference in the threading implementation
209 on those CPUs.
210 </para>
211 <!-- On my Turion 64 X2 system, I had 498 failures, a majority
212 of which failed on my workstation as well when I rebuilt it
213 in March 2020. My skylake-based system has 228 failures. -renodr -->
214 </listitem>
215
[39e42c88]216 </itemizedlist>
[4b0ebf70]217
[d3970e1]218 <para>
219 Now, as the <systemitem class="username">root</systemitem> user:
220 </para>
[4b0ebf70]221
222<screen role="root"><userinput>make -C gdb install</userinput></screen>
223
[852fc810]224 <para>
[46fd248]225 If you have built the API documentation, it is now in gdb/doc/doxy.
226 You can install it (as the <systemitem class="username">root</systemitem>
227 user):
[852fc810]228 </para>
229
[a42c273]230<screen role="root"
231 remap="doc"><userinput>install -d /usr/share/doc/gdb-&gdb-version; &amp;&amp;
[03b05e7]232rm -rf gdb/doc/doxy/xml &amp;&amp;
[852fc810]233cp -Rv gdb/doc/doxy /usr/share/doc/gdb-&gdb-version;</userinput></screen>
234
[4b0ebf70]235 </sect2>
[d3970e1]236
[870e9f05]237 <sect2 role="commands">
238 <title>Command Explanations</title>
239
240 <para>
241 <parameter>--with-system-readline</parameter>: This switch forces
242 <application>GDB</application> to use the copy of
243 <application>Readline</application> installed in LFS.
244 </para>
245
[d38dc9a]246 <para>
247 <parameter>--with-python=/usr/bin/python3</parameter>: This switch
248 forces <application>GDB</application> to use Python 3 installed
[9533795]249 in LFS. Remove this switch if you have installed
250 <xref linkend="python2"/> and want to use it instead of Python 3.
[d38dc9a]251 </para>
252
[870e9f05]253 </sect2>
254
[4b0ebf70]255 <sect2 role="content">
256 <title>Contents</title>
257
258 <segmentedlist>
259 <segtitle>Installed Programs</segtitle>
260 <segtitle>Installed Library</segtitle>
261 <segtitle>Installed Directories</segtitle>
262
263 <seglistitem>
[4890200]264 <seg>
[6cd96df]265 gcore, gdb and gdbserver
[4890200]266 </seg>
267 <seg>
[a2e21ee]268 <!--libinproctrace.so-->
269 None
[4890200]270 </seg>
271 <seg>
[03b05e7]272 /usr/{include,share}/gdb and /usr/share/doc/gdb-&gdb-version;
[4890200]273 </seg>
[4b0ebf70]274 </seglistitem>
275 </segmentedlist>
276
277 <variablelist>
278 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
279 <?dbfo list-presentation="list"?>
280 <?dbhtml list-presentation="table"?>
281
[a55a187]282 <varlistentry id="gcore">
283 <term><command>gcore</command></term>
284 <listitem>
285 <para>
[4c24eb0a]286 generates a core dump of a running program
[a55a187]287 </para>
288 <indexterm zone="gdb gcore">
289 <primary sortas="b-gcore">gcore</primary>
290 </indexterm>
291 </listitem>
292 </varlistentry>
293
[4b0ebf70]294 <varlistentry id="gdb-prog">
295 <term><command>gdb</command></term>
296 <listitem>
[d3970e1]297 <para>
[4c24eb0a]298 is the GNU Debugger
[d3970e1]299 </para>
[4b0ebf70]300 <indexterm zone="gdb gdb-prog">
301 <primary sortas="b-gdb-prog">gdb-prog</primary>
302 </indexterm>
303 </listitem>
304 </varlistentry>
305
306 <varlistentry id="gdbserver">
307 <term><command>gdbserver</command></term>
308 <listitem>
[d3970e1]309 <para>
[4890200]310 is a remote server for the GNU debugger (it allows programs
[4c24eb0a]311 to be debugged from a different machine)
[d3970e1]312 </para>
[4b0ebf70]313 <indexterm zone="gdb gdbserver">
314 <primary sortas="b-gdbserver">gdbserver</primary>
315 </indexterm>
316 </listitem>
317 </varlistentry>
318
[a2e21ee]319<!-- Not present with 10.1
[4b0ebf70]320 <varlistentry id="libinproctrace">
[4890200]321 <term><filename class="libraryfile">libinproctrace.so</filename></term>
[4b0ebf70]322 <listitem>
[d3970e1]323 <para>
324 contains functions for the in-process tracing agent. The agent
325 allows for installing fast tracepoints, listing static tracepoint
326 markers, probing static tracepoints markers, and starting trace
327 monitoring.
328 </para>
[4b0ebf70]329 <indexterm zone="gdb libinproctrace">
330 <primary sortas="c-libinproctrace">libinproctrace.so</primary>
331 </indexterm>
332 </listitem>
[d3970e1]333 </varlistentry>
[a2e21ee]334 -->
[4b0ebf70]335 </variablelist>
336
337 </sect2>
338
339</sect1>
Note: See TracBrowser for help on using the repository browser.