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 "https://ftp.gnu.org/gnu/gdb/gdb-&gdb-version;.tar.xz">
|
---|
8 | <!ENTITY gdb-download-ftp "ftp://ftp.gnu.org/gnu/gdb/gdb-&gdb-version;.tar.xz">
|
---|
9 | <!ENTITY gdb-md5sum "b5c784685e1cde65ba135feea86b6d75">
|
---|
10 | <!ENTITY gdb-size "18 MB">
|
---|
11 | <!ENTITY gdb-buildsize "399 MB (additional 173 MB for tests, additional 1.3 GB for documentation)">
|
---|
12 | <!ENTITY gdb-time "2.6 SBU (add up to 13 SBU for tests)">
|
---|
13 | ]>
|
---|
14 |
|
---|
15 | <sect1 id="gdb" xreflabel="GDB-&gdb-version;">
|
---|
16 | <?dbhtml filename="gdb.html"?>
|
---|
17 |
|
---|
18 | <sect1info>
|
---|
19 | <othername>$LastChangedBy$</othername>
|
---|
20 | <date>$Date$</date>
|
---|
21 | </sect1info>
|
---|
22 |
|
---|
23 | <title>GDB-&gdb-version;</title>
|
---|
24 |
|
---|
25 | <indexterm zone="gdb">
|
---|
26 | <primary sortas="a-GDB">GDB</primary>
|
---|
27 | </indexterm>
|
---|
28 |
|
---|
29 | <sect2 role="package">
|
---|
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>
|
---|
40 |
|
---|
41 | &lfs79_checked;&gcc6_checked;
|
---|
42 |
|
---|
43 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
44 | <itemizedlist spacing="compact">
|
---|
45 | <listitem>
|
---|
46 | <para>
|
---|
47 | Download (HTTP): <ulink url="&gdb-download-http;"/>
|
---|
48 | </para>
|
---|
49 | </listitem>
|
---|
50 | <listitem>
|
---|
51 | <para>
|
---|
52 | Download (FTP): <ulink url="&gdb-download-ftp;"/>
|
---|
53 | </para>
|
---|
54 | </listitem>
|
---|
55 | <listitem>
|
---|
56 | <para>
|
---|
57 | Download MD5 sum: &gdb-md5sum;
|
---|
58 | </para>
|
---|
59 | </listitem>
|
---|
60 | <listitem>
|
---|
61 | <para>
|
---|
62 | Download size: &gdb-size;
|
---|
63 | </para>
|
---|
64 | </listitem>
|
---|
65 | <listitem>
|
---|
66 | <para>
|
---|
67 | Estimated disk space required: &gdb-buildsize;
|
---|
68 | </para>
|
---|
69 | </listitem>
|
---|
70 | <listitem>
|
---|
71 | <para>
|
---|
72 | Estimated build time: &gdb-time;
|
---|
73 | </para>
|
---|
74 | </listitem>
|
---|
75 | </itemizedlist>
|
---|
76 |
|
---|
77 | <bridgehead renderas="sect3">GDB Dependencies</bridgehead>
|
---|
78 |
|
---|
79 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
80 | <para role="optional">
|
---|
81 | <xref linkend="dejagnu"/> (for tests),
|
---|
82 | <xref linkend="doxygen"/>,
|
---|
83 | <xref linkend="guile"/>,
|
---|
84 | <xref linkend="python2"/>,
|
---|
85 | <xref linkend="valgrind"/>, and
|
---|
86 | <ulink url="https://sourceware.org/systemtap/">SystemTap</ulink>
|
---|
87 | (run-time dependency, also used in a few tests)
|
---|
88 | </para>
|
---|
89 |
|
---|
90 | <para condition="html" role="usernotes">User Notes:
|
---|
91 | <ulink url="&blfs-wiki;/gdb"/>
|
---|
92 | </para>
|
---|
93 | </sect2>
|
---|
94 |
|
---|
95 | <sect2 role="installation">
|
---|
96 | <title>Installation of GDB</title>
|
---|
97 |
|
---|
98 | <para>
|
---|
99 | Install <application>GDB</application> by running the following
|
---|
100 | commands:
|
---|
101 | </para>
|
---|
102 |
|
---|
103 | <screen><userinput>./configure --prefix=/usr --with-system-readline &&
|
---|
104 | make</userinput></screen>
|
---|
105 |
|
---|
106 | <para>
|
---|
107 | Optionally, to build the API documentation using
|
---|
108 | <xref linkend="doxygen"/>, run:
|
---|
109 | </para>
|
---|
110 |
|
---|
111 | <screen><userinput>make -C gdb/doc doxy</userinput></screen>
|
---|
112 |
|
---|
113 | <para>
|
---|
114 | To test the results, issue:
|
---|
115 | </para>
|
---|
116 |
|
---|
117 | <screen><userinput>pushd gdb/testsuite &&
|
---|
118 | make site.exp &&
|
---|
119 | echo "set gdb_test_timeout 120" >> site.exp &&
|
---|
120 | runtest TRANSCRIPT=y
|
---|
121 | popd</userinput></screen>
|
---|
122 |
|
---|
123 | <para>
|
---|
124 | See <emphasis>gdb/testsuite/README</emphasis> and <ulink
|
---|
125 | url="https://sourceware.org/gdb/wiki/TestingGDB">TestingGDB</ulink>.
|
---|
126 | There are many problems with the test suite:
|
---|
127 | </para>
|
---|
128 |
|
---|
129 | <itemizedlist>
|
---|
130 | <listitem>
|
---|
131 | <para>
|
---|
132 | Clean directories ire needed if re-running the tests. For that
|
---|
133 | reason, it is recommended to make a copy of the compiled source code
|
---|
134 | directory before the tests in case you need to run the tests again.
|
---|
135 | </para>
|
---|
136 | </listitem>
|
---|
137 |
|
---|
138 | <listitem>
|
---|
139 | <para>
|
---|
140 | Results depend on installed compilers.
|
---|
141 | </para>
|
---|
142 | </listitem>
|
---|
143 |
|
---|
144 | <listitem>
|
---|
145 | <para>
|
---|
146 | If run remotely over an ssh connection, the tests will hang
|
---|
147 | and require a hard (power cycle) reset of the sytem.
|
---|
148 | </para>
|
---|
149 | </listitem>
|
---|
150 |
|
---|
151 | <listitem>
|
---|
152 | <para>
|
---|
153 | There are a large number of timeouts (there is a variable
|
---|
154 | that can be set to increase time for timeout, but
|
---|
155 | changing it will result in a different number of tests being
|
---|
156 | run.
|
---|
157 | </para>
|
---|
158 | </listitem>
|
---|
159 |
|
---|
160 | <listitem>
|
---|
161 | <para>
|
---|
162 | There are failures associated with system readline 6.x.
|
---|
163 | </para>
|
---|
164 | </listitem>
|
---|
165 |
|
---|
166 | <listitem>
|
---|
167 | <para>
|
---|
168 | A few tests assume that the header file
|
---|
169 | <filename><sys/sdt.h></filename>, part of <ulink
|
---|
170 | url="https://sourceware.org/systemtap/">SystemTap</ulink>, is
|
---|
171 | present.
|
---|
172 | </para>
|
---|
173 | </listitem>
|
---|
174 |
|
---|
175 | <listitem>
|
---|
176 | <para>
|
---|
177 | About 3% of the tests fail (out of over 35000 tests).
|
---|
178 | </para>
|
---|
179 | </listitem>
|
---|
180 |
|
---|
181 | </itemizedlist>
|
---|
182 |
|
---|
183 | <para>
|
---|
184 | Now, as the <systemitem class="username">root</systemitem> user:
|
---|
185 | </para>
|
---|
186 |
|
---|
187 | <screen role="root"><userinput>make -C gdb install</userinput></screen>
|
---|
188 |
|
---|
189 | <para>
|
---|
190 | If you have built the API documentation, it is now in gdb/doc/doxy.
|
---|
191 | You can install it (as the <systemitem class="username">root</systemitem>
|
---|
192 | user):
|
---|
193 | </para>
|
---|
194 |
|
---|
195 | <screen role="root"><userinput>install -d /usr/share/doc/gdb-&gdb-version; &&
|
---|
196 | rm -rf gdb/doc/doxy/xml &&
|
---|
197 | cp -Rv gdb/doc/doxy /usr/share/doc/gdb-&gdb-version;</userinput></screen>
|
---|
198 |
|
---|
199 | </sect2>
|
---|
200 |
|
---|
201 | <sect2 role="content">
|
---|
202 | <title>Contents</title>
|
---|
203 |
|
---|
204 | <segmentedlist>
|
---|
205 | <segtitle>Installed Programs</segtitle>
|
---|
206 | <segtitle>Installed Library</segtitle>
|
---|
207 | <segtitle>Installed Directories</segtitle>
|
---|
208 |
|
---|
209 | <seglistitem>
|
---|
210 | <seg>
|
---|
211 | gcore, gdb and gdbserver
|
---|
212 | </seg>
|
---|
213 | <seg>
|
---|
214 | libinproctrace.so
|
---|
215 | </seg>
|
---|
216 | <seg>
|
---|
217 | /usr/{include,share}/gdb and /usr/share/doc/gdb-&gdb-version;
|
---|
218 | </seg>
|
---|
219 | </seglistitem>
|
---|
220 | </segmentedlist>
|
---|
221 |
|
---|
222 | <variablelist>
|
---|
223 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
224 | <?dbfo list-presentation="list"?>
|
---|
225 | <?dbhtml list-presentation="table"?>
|
---|
226 |
|
---|
227 | <varlistentry id="gcore">
|
---|
228 | <term><command>gcore</command></term>
|
---|
229 | <listitem>
|
---|
230 | <para>
|
---|
231 | generates a core dump of a running program.
|
---|
232 | </para>
|
---|
233 | <indexterm zone="gdb gcore">
|
---|
234 | <primary sortas="b-gcore">gcore</primary>
|
---|
235 | </indexterm>
|
---|
236 | </listitem>
|
---|
237 | </varlistentry>
|
---|
238 |
|
---|
239 | <varlistentry id="gdb-prog">
|
---|
240 | <term><command>gdb</command></term>
|
---|
241 | <listitem>
|
---|
242 | <para>
|
---|
243 | is the GNU Debugger.
|
---|
244 | </para>
|
---|
245 | <indexterm zone="gdb gdb-prog">
|
---|
246 | <primary sortas="b-gdb-prog">gdb-prog</primary>
|
---|
247 | </indexterm>
|
---|
248 | </listitem>
|
---|
249 | </varlistentry>
|
---|
250 |
|
---|
251 | <varlistentry id="gdbserver">
|
---|
252 | <term><command>gdbserver</command></term>
|
---|
253 | <listitem>
|
---|
254 | <para>
|
---|
255 | is a remote server for the GNU debugger (it allows programs
|
---|
256 | to be debugged from a different machine).
|
---|
257 | </para>
|
---|
258 | <indexterm zone="gdb gdbserver">
|
---|
259 | <primary sortas="b-gdbserver">gdbserver</primary>
|
---|
260 | </indexterm>
|
---|
261 | </listitem>
|
---|
262 | </varlistentry>
|
---|
263 |
|
---|
264 | <varlistentry id="libinproctrace">
|
---|
265 | <term><filename class="libraryfile">libinproctrace.so</filename></term>
|
---|
266 | <listitem>
|
---|
267 | <para>
|
---|
268 | contains functions for the in-process tracing agent. The agent
|
---|
269 | allows for installing fast tracepoints, listing static tracepoint
|
---|
270 | markers, probing static tracepoints markers, and starting trace
|
---|
271 | monitoring.
|
---|
272 | </para>
|
---|
273 | <indexterm zone="gdb libinproctrace">
|
---|
274 | <primary sortas="c-libinproctrace">libinproctrace.so</primary>
|
---|
275 | </indexterm>
|
---|
276 | </listitem>
|
---|
277 | </varlistentry>
|
---|
278 |
|
---|
279 | </variablelist>
|
---|
280 |
|
---|
281 | </sect2>
|
---|
282 |
|
---|
283 | </sect1>
|
---|