source: general/prog/gdb.xml@ 3fcb10e1

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 9.0 9.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 3fcb10e1 was 3fcb10e1, checked in by Douglas R. Reno <renodr@…>, 5 years ago

Tags

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@21985 af4574ff-66df-0310-9fd7-8a98e5e911e0

  • Property mode set to 100644
File size: 9.3 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">
[6a1237d]9 <!ENTITY gdb-md5sum "bbd95b2f9b34621ad7a19a3965476314">
10 <!ENTITY gdb-size "20 MB">
11 <!ENTITY gdb-buildsize "630 MB (add 57 MB for tests, add 750 MB for docs)">
12 <!ENTITY gdb-time "2.0 SBU (Using parallelism=4; add 66 SBU for tests, add 0.6 SBU for docs)">
[4b0ebf70]13]>
14
[d3970e1]15<sect1 id="gdb" xreflabel="GDB-&gdb-version;">
[4b0ebf70]16 <?dbhtml filename="gdb.html"?>
17
18 <sect1info>
19 <othername>$LastChangedBy$</othername>
20 <date>$Date$</date>
21 </sect1info>
22
[d3970e1]23 <title>GDB-&gdb-version;</title>
[4b0ebf70]24
25 <indexterm zone="gdb">
[4890200]26 <primary sortas="a-GDB">GDB</primary>
[4b0ebf70]27 </indexterm>
28
29 <sect2 role="package">
[d3970e1]30 <title>Introduction to GDB</title>
31
32 <para>
33 <application>GDB</application>, the GNU Project debugger, allows you
34 to see what is going on <quote>inside</quote> another program while it
35 executes -- or what another program was doing at the moment it crashed.
36 Note that <application>GDB</application> is most effective when tracing
37 programs and libraries that were built with debugging symbols and not
38 stripped.
39 </para>
[4b0ebf70]40
[3fcb10e1]41 &lfs90_checked;
[4b0ebf70]42
43 <bridgehead renderas="sect3">Package Information</bridgehead>
44 <itemizedlist spacing="compact">
45 <listitem>
[4890200]46 <para>
47 Download (HTTP): <ulink url="&gdb-download-http;"/>
48 </para>
[4b0ebf70]49 </listitem>
50 <listitem>
[4890200]51 <para>
52 Download (FTP): <ulink url="&gdb-download-ftp;"/>
53 </para>
[4b0ebf70]54 </listitem>
55 <listitem>
[4890200]56 <para>
57 Download MD5 sum: &gdb-md5sum;
58 </para>
[4b0ebf70]59 </listitem>
60 <listitem>
[4890200]61 <para>
62 Download size: &gdb-size;
63 </para>
[4b0ebf70]64 </listitem>
65 <listitem>
[4890200]66 <para>
67 Estimated disk space required: &gdb-buildsize;
68 </para>
[4b0ebf70]69 </listitem>
70 <listitem>
[4890200]71 <para>
72 Estimated build time: &gdb-time;
73 </para>
[4b0ebf70]74 </listitem>
75 </itemizedlist>
76
[d3970e1]77 <bridgehead renderas="sect3">GDB Dependencies</bridgehead>
[d4c9b7c]78
[9533795]79 <bridgehead renderas="sect4">Recommended Runtime Dependency</bridgehead>
80 <para role="recommended">
81 <xref linkend="six"/> (Python 3 module, required at run-time to
82 use GDB scripts from various LFS/BLFS packages with Python 3
83 installed in LFS)
84 </para>
85
[d4c9b7c]86 <bridgehead renderas="sect4">Optional</bridgehead>
87 <para role="optional">
[51cb7cd]88 <xref linkend="dejagnu"/> (required for tests),
[852fc810]89 <xref linkend="doxygen"/>,
[51cb7cd]90 <xref linkend="gcc"/> (ada and gfortran are used for tests),
91 <xref linkend="guile"/>,
[9533795]92 <xref linkend="python2"/>,
[51cb7cd]93 <xref linkend="rust"/> (used for some tests),
[2029b72]94 <xref linkend="valgrind"/>, and
95 <ulink url="https://sourceware.org/systemtap/">SystemTap</ulink>
[51cb7cd]96 (run-time, used for tests)
[d4c9b7c]97 </para>
98
[4b0ebf70]99 <para condition="html" role="usernotes">User Notes:
[d3970e1]100 <ulink url="&blfs-wiki;/gdb"/>
101 </para>
[4b0ebf70]102 </sect2>
103
104 <sect2 role="installation">
[d3970e1]105 <title>Installation of GDB</title>
[4b0ebf70]106
[d3970e1]107 <para>
108 Install <application>GDB</application> by running the following
109 commands:
110 </para>
[4b0ebf70]111
[9533795]112<screen><userinput>./configure --prefix=/usr \
113 --with-system-readline \
114 --with-python=/usr/bin/python3 &amp;&amp;
[4b0ebf70]115make</userinput></screen>
116
[46fd248]117 <para>
118 Optionally, to build the API documentation using
119 <xref linkend="doxygen"/>, run:
120 </para>
121
[a42c273]122<screen remap="doc"><userinput>make -C gdb/doc doxy</userinput></screen>
[46fd248]123
[d3970e1]124 <para>
[03b05e7]125 To test the results, issue:
126 </para>
127
[a42c273]128<screen remap="test"><userinput>pushd gdb/testsuite &amp;&amp;
[03b05e7]129make site.exp &amp;&amp;
130echo "set gdb_test_timeout 120" &gt;&gt; site.exp &amp;&amp;
[a114fcc]131runtest
[03b05e7]132popd</userinput></screen>
133
134 <para>
135 See <emphasis>gdb/testsuite/README</emphasis> and <ulink
136 url="https://sourceware.org/gdb/wiki/TestingGDB">TestingGDB</ulink>.
[39e42c88]137 There are many problems with the test suite:
[d3970e1]138 </para>
[39e42c88]139
140 <itemizedlist>
141 <listitem>
142 <para>
[3e42104]143 Clean directories are needed if re-running the tests. For that
[6a1237d]144 reason, make a copy of the compiled source code
[39e42c88]145 directory before the tests in case you need to run the tests again.
146 </para>
147 </listitem>
148
149 <listitem>
150 <para>
151 Results depend on installed compilers.
152 </para>
153 </listitem>
154
155 <listitem>
156 <para>
157 There are a large number of timeouts (there is a variable
158 that can be set to increase time for timeout, but
159 changing it will result in a different number of tests being
[3e42104]160 run).
[39e42c88]161 </para>
162 </listitem>
163
164 <listitem>
165 <para>
166 There are failures associated with system readline 6.x.
167 </para>
168 </listitem>
169
170 <listitem>
171 <para>
172 A few tests assume that the header file
173 <filename>&lt;sys/sdt.h&gt;</filename>, part of <ulink
174 url="https://sourceware.org/systemtap/">SystemTap</ulink>, is
175 present.
176 </para>
177 </listitem>
[24c0a06e]178
179 <listitem>
180 <para>
181 If the test suite is run on a Skylake-based Intel CPU or newer,
182 many tests will fail due to the removal of the deprecated/problematic
183 libmpx library in GCC.
184 </para>
185 </listitem>
[39e42c88]186
187 <listitem>
188 <para>
[a114fcc]189 Approximately 1-3% of the tests fail (out of over 56000 tests).
[39e42c88]190 </para>
191 </listitem>
192
193 </itemizedlist>
[4b0ebf70]194
[d3970e1]195 <para>
196 Now, as the <systemitem class="username">root</systemitem> user:
197 </para>
[4b0ebf70]198
199<screen role="root"><userinput>make -C gdb install</userinput></screen>
200
[852fc810]201 <para>
[46fd248]202 If you have built the API documentation, it is now in gdb/doc/doxy.
203 You can install it (as the <systemitem class="username">root</systemitem>
204 user):
[852fc810]205 </para>
206
[a42c273]207<screen role="root"
208 remap="doc"><userinput>install -d /usr/share/doc/gdb-&gdb-version; &amp;&amp;
[03b05e7]209rm -rf gdb/doc/doxy/xml &amp;&amp;
[852fc810]210cp -Rv gdb/doc/doxy /usr/share/doc/gdb-&gdb-version;</userinput></screen>
211
[4b0ebf70]212 </sect2>
[d3970e1]213
[870e9f05]214 <sect2 role="commands">
215 <title>Command Explanations</title>
216
217 <para>
218 <parameter>--with-system-readline</parameter>: This switch forces
219 <application>GDB</application> to use the copy of
220 <application>Readline</application> installed in LFS.
221 </para>
222
[d38dc9a]223 <para>
224 <parameter>--with-python=/usr/bin/python3</parameter>: This switch
225 forces <application>GDB</application> to use Python 3 installed
[9533795]226 in LFS. Remove this switch if you have installed
227 <xref linkend="python2"/> and want to use it instead of Python 3.
[d38dc9a]228 </para>
229
[870e9f05]230 </sect2>
231
[4b0ebf70]232 <sect2 role="content">
233 <title>Contents</title>
234
235 <segmentedlist>
236 <segtitle>Installed Programs</segtitle>
237 <segtitle>Installed Library</segtitle>
238 <segtitle>Installed Directories</segtitle>
239
240 <seglistitem>
[4890200]241 <seg>
[6cd96df]242 gcore, gdb and gdbserver
[4890200]243 </seg>
244 <seg>
245 libinproctrace.so
246 </seg>
247 <seg>
[03b05e7]248 /usr/{include,share}/gdb and /usr/share/doc/gdb-&gdb-version;
[4890200]249 </seg>
[4b0ebf70]250 </seglistitem>
251 </segmentedlist>
252
253 <variablelist>
254 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
255 <?dbfo list-presentation="list"?>
256 <?dbhtml list-presentation="table"?>
257
[a55a187]258 <varlistentry id="gcore">
259 <term><command>gcore</command></term>
260 <listitem>
261 <para>
262 generates a core dump of a running program.
263 </para>
264 <indexterm zone="gdb gcore">
265 <primary sortas="b-gcore">gcore</primary>
266 </indexterm>
267 </listitem>
268 </varlistentry>
269
[4b0ebf70]270 <varlistentry id="gdb-prog">
271 <term><command>gdb</command></term>
272 <listitem>
[d3970e1]273 <para>
274 is the GNU Debugger.
275 </para>
[4b0ebf70]276 <indexterm zone="gdb gdb-prog">
277 <primary sortas="b-gdb-prog">gdb-prog</primary>
278 </indexterm>
279 </listitem>
280 </varlistentry>
281
282 <varlistentry id="gdbserver">
283 <term><command>gdbserver</command></term>
284 <listitem>
[d3970e1]285 <para>
[4890200]286 is a remote server for the GNU debugger (it allows programs
287 to be debugged from a different machine).
[d3970e1]288 </para>
[4b0ebf70]289 <indexterm zone="gdb gdbserver">
290 <primary sortas="b-gdbserver">gdbserver</primary>
291 </indexterm>
292 </listitem>
293 </varlistentry>
294
295 <varlistentry id="libinproctrace">
[4890200]296 <term><filename class="libraryfile">libinproctrace.so</filename></term>
[4b0ebf70]297 <listitem>
[d3970e1]298 <para>
299 contains functions for the in-process tracing agent. The agent
300 allows for installing fast tracepoints, listing static tracepoint
301 markers, probing static tracepoints markers, and starting trace
302 monitoring.
303 </para>
[4b0ebf70]304 <indexterm zone="gdb libinproctrace">
305 <primary sortas="c-libinproctrace">libinproctrace.so</primary>
306 </indexterm>
307 </listitem>
[d3970e1]308 </varlistentry>
[4b0ebf70]309
310 </variablelist>
311
312 </sect2>
313
314</sect1>
Note: See TracBrowser for help on using the repository browser.