[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 |
|
---|
[99c32731] | 7 | <!ENTITY gdb-download-http "https://ftp.gnu.org/gnu/gdb/gdb-&gdb-version;.tar.xz">
|
---|
[d81eda8] | 8 | <!ENTITY gdb-download-ftp "ftp://ftp.gnu.org/gnu/gdb/gdb-&gdb-version;.tar.xz">
|
---|
[0b8d9023] | 9 | <!ENTITY gdb-md5sum "35374c77a70884eb430c97061053a36e">
|
---|
| 10 | <!ENTITY gdb-size "18 MB">
|
---|
| 11 | <!ENTITY gdb-buildsize "406 MB (additional 105 MB for checks)">
|
---|
| 12 | <!ENTITY gdb-time "2.2 SBU (add up to 6.0 SBU for checks)">
|
---|
[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 |
|
---|
[0b8d9023] | 41 | &lfs77_checked; &gcc5_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 |
|
---|
| 79 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
| 80 | <para role="optional">
|
---|
[d81eda8] | 81 | <xref linkend="dejagnu"/> (for tests),
|
---|
[852fc810] | 82 | <xref linkend="doxygen"/>,
|
---|
| 83 | <xref linkend="guile"/>, and
|
---|
[4890200] | 84 | <xref linkend="python2"/>
|
---|
[d4c9b7c] | 85 | </para>
|
---|
| 86 |
|
---|
[4b0ebf70] | 87 | <para condition="html" role="usernotes">User Notes:
|
---|
[d3970e1] | 88 | <ulink url="&blfs-wiki;/gdb"/>
|
---|
| 89 | </para>
|
---|
[4b0ebf70] | 90 | </sect2>
|
---|
| 91 |
|
---|
| 92 | <sect2 role="installation">
|
---|
[d3970e1] | 93 | <title>Installation of GDB</title>
|
---|
[4b0ebf70] | 94 |
|
---|
[d3970e1] | 95 | <para>
|
---|
| 96 | Install <application>GDB</application> by running the following
|
---|
| 97 | commands:
|
---|
| 98 | </para>
|
---|
[4b0ebf70] | 99 |
|
---|
[a55a187] | 100 | <screen><userinput>./configure --prefix=/usr --with-system-readline &&
|
---|
[4b0ebf70] | 101 | make</userinput></screen>
|
---|
| 102 |
|
---|
[46fd248] | 103 | <para>
|
---|
| 104 | Optionally, to build the API documentation using
|
---|
| 105 | <xref linkend="doxygen"/>, run:
|
---|
| 106 | </para>
|
---|
| 107 |
|
---|
| 108 | <screen><userinput>make -C gdb/doc doxy</userinput></screen>
|
---|
| 109 |
|
---|
[d3970e1] | 110 | <para>
|
---|
[87dddd1e] | 111 | To test the results, issue: <command>make -k check</command>. There are
|
---|
[d81eda8] | 112 | many problems with the test suite. Depends on installed compilers, there
|
---|
| 113 | are differences if run locally or remotely, a large number of timeouts
|
---|
| 114 | (there is a variable that can be set to increase time for timeout, but
|
---|
| 115 | changing it, apparently the total number of tests is not conserved),
|
---|
| 116 | there are failures associated with system readline 6.x, between others.
|
---|
[8864c307] | 117 | Unexpected failures are of the order of 0.5%.
|
---|
[d3970e1] | 118 | </para>
|
---|
[4b0ebf70] | 119 |
|
---|
[d3970e1] | 120 | <para>
|
---|
| 121 | Now, as the <systemitem class="username">root</systemitem> user:
|
---|
| 122 | </para>
|
---|
[4b0ebf70] | 123 |
|
---|
| 124 | <screen role="root"><userinput>make -C gdb install</userinput></screen>
|
---|
| 125 |
|
---|
[852fc810] | 126 | <para>
|
---|
[46fd248] | 127 | If you have built the API documentation, it is now in gdb/doc/doxy.
|
---|
| 128 | You can install it (as the <systemitem class="username">root</systemitem>
|
---|
| 129 | user):
|
---|
[852fc810] | 130 | </para>
|
---|
| 131 |
|
---|
| 132 | <screen role="root"><userinput>install -d /usr/share/doc/gdb-&gdb-version; &&
|
---|
| 133 | cp -Rv gdb/doc/doxy /usr/share/doc/gdb-&gdb-version;</userinput></screen>
|
---|
| 134 |
|
---|
[4b0ebf70] | 135 | </sect2>
|
---|
[d3970e1] | 136 |
|
---|
[4b0ebf70] | 137 | <sect2 role="content">
|
---|
| 138 | <title>Contents</title>
|
---|
| 139 |
|
---|
| 140 | <segmentedlist>
|
---|
| 141 | <segtitle>Installed Programs</segtitle>
|
---|
| 142 | <segtitle>Installed Library</segtitle>
|
---|
| 143 | <segtitle>Installed Directories</segtitle>
|
---|
| 144 |
|
---|
| 145 | <seglistitem>
|
---|
[4890200] | 146 | <seg>
|
---|
[6cd96df] | 147 | gcore, gdb and gdbserver
|
---|
[4890200] | 148 | </seg>
|
---|
| 149 | <seg>
|
---|
| 150 | libinproctrace.so
|
---|
| 151 | </seg>
|
---|
| 152 | <seg>
|
---|
| 153 | /usr/include/gdb and
|
---|
| 154 | /usr/share/gdb
|
---|
| 155 | </seg>
|
---|
[4b0ebf70] | 156 | </seglistitem>
|
---|
| 157 | </segmentedlist>
|
---|
| 158 |
|
---|
| 159 | <variablelist>
|
---|
| 160 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 161 | <?dbfo list-presentation="list"?>
|
---|
| 162 | <?dbhtml list-presentation="table"?>
|
---|
| 163 |
|
---|
[a55a187] | 164 | <varlistentry id="gcore">
|
---|
| 165 | <term><command>gcore</command></term>
|
---|
| 166 | <listitem>
|
---|
| 167 | <para>
|
---|
| 168 | generates a core dump of a running program.
|
---|
| 169 | </para>
|
---|
| 170 | <indexterm zone="gdb gcore">
|
---|
| 171 | <primary sortas="b-gcore">gcore</primary>
|
---|
| 172 | </indexterm>
|
---|
| 173 | </listitem>
|
---|
| 174 | </varlistentry>
|
---|
| 175 |
|
---|
[4b0ebf70] | 176 | <varlistentry id="gdb-prog">
|
---|
| 177 | <term><command>gdb</command></term>
|
---|
| 178 | <listitem>
|
---|
[d3970e1] | 179 | <para>
|
---|
| 180 | is the GNU Debugger.
|
---|
| 181 | </para>
|
---|
[4b0ebf70] | 182 | <indexterm zone="gdb gdb-prog">
|
---|
| 183 | <primary sortas="b-gdb-prog">gdb-prog</primary>
|
---|
| 184 | </indexterm>
|
---|
| 185 | </listitem>
|
---|
| 186 | </varlistentry>
|
---|
| 187 |
|
---|
| 188 | <varlistentry id="gdbserver">
|
---|
| 189 | <term><command>gdbserver</command></term>
|
---|
| 190 | <listitem>
|
---|
[d3970e1] | 191 | <para>
|
---|
[4890200] | 192 | is a remote server for the GNU debugger (it allows programs
|
---|
| 193 | to be debugged from a different machine).
|
---|
[d3970e1] | 194 | </para>
|
---|
[4b0ebf70] | 195 | <indexterm zone="gdb gdbserver">
|
---|
| 196 | <primary sortas="b-gdbserver">gdbserver</primary>
|
---|
| 197 | </indexterm>
|
---|
| 198 | </listitem>
|
---|
| 199 | </varlistentry>
|
---|
| 200 |
|
---|
| 201 | <varlistentry id="libinproctrace">
|
---|
[4890200] | 202 | <term><filename class="libraryfile">libinproctrace.so</filename></term>
|
---|
[4b0ebf70] | 203 | <listitem>
|
---|
[d3970e1] | 204 | <para>
|
---|
| 205 | contains functions for the in-process tracing agent. The agent
|
---|
| 206 | allows for installing fast tracepoints, listing static tracepoint
|
---|
| 207 | markers, probing static tracepoints markers, and starting trace
|
---|
| 208 | monitoring.
|
---|
| 209 | </para>
|
---|
[4b0ebf70] | 210 | <indexterm zone="gdb libinproctrace">
|
---|
| 211 | <primary sortas="c-libinproctrace">libinproctrace.so</primary>
|
---|
| 212 | </indexterm>
|
---|
| 213 | </listitem>
|
---|
[d3970e1] | 214 | </varlistentry>
|
---|
[4b0ebf70] | 215 |
|
---|
| 216 | </variablelist>
|
---|
| 217 |
|
---|
| 218 | </sect2>
|
---|
| 219 |
|
---|
| 220 | </sect1>
|
---|