source: general/prog/gdb.xml@ 179da23c

lazarus
Last change on this file since 179da23c was 179da23c, checked in by Thomas Trepl (Moody) <thomas@…>, 2 years ago

Fixes on FP

  • Property mode set to 100644
File size: 10.5 KB
Line 
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
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">
9 <!ENTITY gdb-md5sum "433bd0904caa31c247b1b1867f2f911d">
10 <!ENTITY gdb-size "21 MB">
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)">
13]>
14
15<!-- I skipped running the full tests for this 8.3.1 point version. Bruce -->
16
17<sect1 id="gdb" xreflabel="GDB-&gdb-version;">
18 <?dbhtml filename="gdb.html"?>
19
20 <sect1info>
21 <date>$Date$</date>
22 </sect1info>
23
24 <title>GDB-&gdb-version;</title>
25
26 <indexterm zone="gdb">
27 <primary sortas="a-GDB">GDB</primary>
28 </indexterm>
29
30 <sect2 role="package">
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>
41
42 &lfs110a_checked;
43
44 <bridgehead renderas="sect3">Package Information</bridgehead>
45 <itemizedlist spacing="compact">
46 <listitem>
47 <para>
48 Download (HTTP): <ulink url="&gdb-download-http;"/>
49 </para>
50 </listitem>
51 <listitem>
52 <para>
53 Download (FTP): <ulink url="&gdb-download-ftp;"/>
54 </para>
55 </listitem>
56 <listitem>
57 <para>
58 Download MD5 sum: &gdb-md5sum;
59 </para>
60 </listitem>
61 <listitem>
62 <para>
63 Download size: &gdb-size;
64 </para>
65 </listitem>
66 <listitem>
67 <para>
68 Estimated disk space required: &gdb-buildsize;
69 </para>
70 </listitem>
71 <listitem>
72 <para>
73 Estimated build time: &gdb-time;
74 </para>
75 </listitem>
76 </itemizedlist>
77
78 <bridgehead renderas="sect3">GDB Dependencies</bridgehead>
79
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
87 <bridgehead renderas="sect4">Optional</bridgehead>
88 <para role="optional">
89 <!-- <xref linkend="dejagnu"/> (required for tests), -->
90 <xref linkend="doxygen"/>,
91 <xref linkend="gcc"/> (ada, gfortran, and go are used for tests),
92 <xref linkend="guile"/>,
93 <xref linkend="python2"/>,
94 <xref linkend="rust"/> (used for some tests),
95 <xref linkend="valgrind"/>, and
96 <ulink url="https://sourceware.org/systemtap/">SystemTap</ulink>
97 (run-time, used for tests)
98 </para>
99
100 <para condition="html" role="usernotes">User Notes:
101 <ulink url="&blfs-wiki;/gdb"/>
102 </para>
103 </sect2>
104
105 <sect2 role="installation">
106 <title>Installation of GDB</title>
107
108 <para>
109 Install <application>GDB</application> by running the following
110 commands:
111 </para>
112
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;
119make</userinput></screen>
120
121 <para>
122 Optionally, to build the API documentation using
123 <xref linkend="doxygen"/>, run:
124 </para>
125
126<screen remap="doc"><userinput>make -C gdb/doc doxy</userinput></screen>
127
128 <para>
129 To test the results, issue:
130 </para>
131
132<screen remap="test"><userinput>pushd gdb/testsuite &amp;&amp;
133make site.exp &amp;&amp;
134echo "set gdb_test_timeout 120" &gt;&gt; site.exp &amp;&amp;
135runtest
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>.
141 There are many problems with the test suite:
142 </para>
143
144 <itemizedlist>
145 <listitem>
146 <para>
147 Clean directories are needed if re-running the tests. For that
148 reason, make a copy of the compiled source code
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>
158<!-- I did not see this
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
164 run).
165 </para>
166 </listitem>
167or this
168 <listitem>
169 <para>
170 There are failures associated with system readline 6.x.
171 </para>
172 </listitem>
173-->
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>
182<!-- I don't know if this is true or not. I tested on a Haswell.
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>
190-->
191 <listitem>
192 <para>
193<!-- for gdb-11.1, gcc-11.2 - pierre -->
194 A test run of the test suite had about 1700 unexpected failures
195 (out of over 80000 tests). Over 1370 of the failures were related
196 to FORTRAN tests.
197 </para>
198 </listitem>
199
200 <listitem>
201 <para>
202 On some systems, the gdb.tui test suite will fail if running over
203 SSH.
204 </para>
205 </listitem>
206
207 <listitem>
208 <para>
209 On some AMD-based systems, over 200 additional tests
210 may fail due to a difference in the threading implementation
211 on those CPUs.
212 </para>
213 </listitem>
214
215 </itemizedlist>
216
217 <para>
218 Now, as the <systemitem class="username">root</systemitem> user:
219 </para>
220
221<screen role="root"><userinput>make -C gdb install</userinput></screen>
222
223<!-- no longer needed for FP
224 <para>
225 If it is planned to install packages which might need a static
226 GDB library (for instance <xref linkend="fpc"/>) create the
227 library by executing:
228 </para>
229
230<screen><userinput>make -C gdb libgdb.a</userinput></screen>
231
232 <para>
233 Install the library as the <systemitem class="username">root</systemitem> user:
234 </para>
235
236<screen role="root"><userinput>install -v -m644 gdb/libgdb.a /usr/lib/</userinput></screen>
237-->
238 <para>
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):
242 </para>
243
244<screen role="root"
245 remap="doc"><userinput>install -d /usr/share/doc/gdb-&gdb-version; &amp;&amp;
246rm -rf gdb/doc/doxy/xml &amp;&amp;
247cp -Rv gdb/doc/doxy /usr/share/doc/gdb-&gdb-version;</userinput></screen>
248
249 </sect2>
250
251 <sect2 role="commands">
252 <title>Command Explanations</title>
253
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
260 <para>
261 <parameter>--with-python=/usr/bin/python3</parameter>: This switch
262 forces <application>GDB</application> to use Python 3.
263 Remove this switch if you have installed
264 <xref linkend="python2"/> and want to use it instead of Python 3.
265 </para>
266
267 </sect2>
268
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>
278 <seg>
279 gcore, gdb and gdbserver
280 </seg>
281 <seg>
282 <!--libinproctrace.so-->
283 libgdb.a (if choosen to build it)
284 </seg>
285 <seg>
286 /usr/{include,share}/gdb and /usr/share/doc/gdb-&gdb-version;
287 </seg>
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
296 <varlistentry id="gcore">
297 <term><command>gcore</command></term>
298 <listitem>
299 <para>
300 generates a core dump of a running program
301 </para>
302 <indexterm zone="gdb gcore">
303 <primary sortas="b-gcore">gcore</primary>
304 </indexterm>
305 </listitem>
306 </varlistentry>
307
308 <varlistentry id="gdb-prog">
309 <term><command>gdb</command></term>
310 <listitem>
311 <para>
312 is the GNU Debugger
313 </para>
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>
323 <para>
324 is a remote server for the GNU debugger (it allows programs
325 to be debugged from a different machine)
326 </para>
327 <indexterm zone="gdb gdbserver">
328 <primary sortas="b-gdbserver">gdbserver</primary>
329 </indexterm>
330 </listitem>
331 </varlistentry>
332
333<!-- Not present with 10.1
334 <varlistentry id="libinproctrace">
335 <term><filename class="libraryfile">libinproctrace.so</filename></term>
336 <listitem>
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>
343 <indexterm zone="gdb libinproctrace">
344 <primary sortas="c-libinproctrace">libinproctrace.so</primary>
345 </indexterm>
346 </listitem>
347 </varlistentry>
348 -->
349 </variablelist>
350
351 </sect2>
352
353</sect1>
Note: See TracBrowser for help on using the repository browser.