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

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 xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since 8c415ea was 8c415ea, checked in by Douglas R. Reno <renodr@…>, 2 years ago

Tags

  • Property mode set to 100644
File size: 10.4 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 &lfs111_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">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
88 <bridgehead renderas="sect3">GDB Dependencies</bridgehead>
89
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
97 <bridgehead renderas="sect4">Optional</bridgehead>
98 <para role="optional">
99 <!-- <xref linkend="dejagnu"/> (required for tests), -->
100 <xref linkend="doxygen"/>,
101 <xref linkend="gcc"/> (ada, gfortran, and go are used for tests),
102 <xref linkend="guile"/>,
103 <xref linkend="python2"/>,
104 <xref linkend="rust"/> (used for some tests),
105 <xref linkend="valgrind"/>, and
106 <ulink url="https://sourceware.org/systemtap/">SystemTap</ulink>
107 (run-time, used for tests)
108 </para>
109
110 <para condition="html" role="usernotes">User Notes:
111 <ulink url="&blfs-wiki;/gdb"/>
112 </para>
113 </sect2>
114
115 <sect2 role="installation">
116 <title>Installation of GDB</title>
117
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
124 <para>
125 Install <application>GDB</application> by running the following
126 commands:
127 </para>
128
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;
135make</userinput></screen>
136
137 <para>
138 Optionally, to build the API documentation using
139 <xref linkend="doxygen"/>, run:
140 </para>
141
142<screen remap="doc"><userinput>make -C gdb/doc doxy</userinput></screen>
143
144 <para>
145 To test the results, issue:
146 </para>
147
148<screen remap="test"><userinput>pushd gdb/testsuite &amp;&amp;
149make site.exp &amp;&amp;
150echo "set gdb_test_timeout 120" &gt;&gt; site.exp &amp;&amp;
151runtest
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>.
157 There are many problems with the test suite:
158 </para>
159
160 <itemizedlist>
161 <listitem>
162 <para>
163 Clean directories are needed if re-running the tests. For that
164 reason, make a copy of the compiled source code
165 directory before the tests in case you need to run the tests again.
166 </para>
167 </listitem>
168
169 <listitem>
170 <para>
171 Results depend on installed compilers.
172 </para>
173 </listitem>
174<!-- I did not see this
175 <listitem>
176 <para>
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
180 run).
181 </para>
182 </listitem>
183or this
184 <listitem>
185 <para>
186 There are failures associated with system readline 6.x.
187 </para>
188 </listitem>
189-->
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>
198<!-- I don't know if this is true or not. I tested on a Haswell.
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>
206-->
207 <listitem>
208 <para>
209<!-- for gdb-11.1, gcc-11.2 - pierre -->
210 A test run of the test suite had about 1700 unexpected failures
211 (out of over 80000 tests). Over 1370 of the failures were related
212 to FORTRAN tests.
213 </para>
214 </listitem>
215
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
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
231 </itemizedlist>
232
233 <para>
234 Now, as the <systemitem class="username">root</systemitem> user:
235 </para>
236
237<screen role="root"><userinput>make -C gdb install</userinput></screen>
238
239 <para>
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):
243 </para>
244
245<screen role="root"
246 remap="doc"><userinput>install -d /usr/share/doc/gdb-&gdb-version; &amp;&amp;
247rm -rf gdb/doc/doxy/xml &amp;&amp;
248cp -Rv gdb/doc/doxy /usr/share/doc/gdb-&gdb-version;</userinput></screen>
249
250 </sect2>
251
252 <sect2 role="commands">
253 <title>Command Explanations</title>
254
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
261 <para>
262 <parameter>--with-python=/usr/bin/python3</parameter>: This switch
263 forces <application>GDB</application> to use Python 3.
264 Remove this switch if you have installed
265 <xref linkend="python2"/> and want to use it instead of Python 3.
266 </para>
267
268 </sect2>
269
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>
279 <seg>
280 gcore, gdb and gdbserver
281 </seg>
282 <seg>
283 <!--libinproctrace.so-->
284 None
285 </seg>
286 <seg>
287 /usr/{include,share}/gdb and /usr/share/doc/gdb-&gdb-version;
288 </seg>
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
297 <varlistentry id="gcore">
298 <term><command>gcore</command></term>
299 <listitem>
300 <para>
301 generates a core dump of a running program
302 </para>
303 <indexterm zone="gdb gcore">
304 <primary sortas="b-gcore">gcore</primary>
305 </indexterm>
306 </listitem>
307 </varlistentry>
308
309 <varlistentry id="gdb-prog">
310 <term><command>gdb</command></term>
311 <listitem>
312 <para>
313 is the GNU Debugger
314 </para>
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>
324 <para>
325 is a remote server for the GNU debugger (it allows programs
326 to be debugged from a different machine)
327 </para>
328 <indexterm zone="gdb gdbserver">
329 <primary sortas="b-gdbserver">gdbserver</primary>
330 </indexterm>
331 </listitem>
332 </varlistentry>
333
334<!-- Not present with 10.1
335 <varlistentry id="libinproctrace">
336 <term><filename class="libraryfile">libinproctrace.so</filename></term>
337 <listitem>
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>
344 <indexterm zone="gdb libinproctrace">
345 <primary sortas="c-libinproctrace">libinproctrace.so</primary>
346 </indexterm>
347 </listitem>
348 </varlistentry>
349 -->
350 </variablelist>
351
352 </sect2>
353
354</sect1>
Note: See TracBrowser for help on using the repository browser.