[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 |
|
---|
| 7 | <!ENTITY gdb-download-http "http://ftp.gnu.org/gnu/gdb/gdb-&gdb-version;.tar.bz2">
|
---|
| 8 | <!ENTITY gdb-download-ftp "ftp://ftp.gnu.org/gnu/gdb/gdb-&gdb-version;.tar.bz2">
|
---|
[87dddd1e] | 9 | <!ENTITY gdb-md5sum "77b20b515e7c25f032cb9732a66620fe">
|
---|
[3c0ba9f] | 10 | <!ENTITY gdb-size "24 MB">
|
---|
[87dddd1e] | 11 | <!ENTITY gdb-buildsize "311 MB (474 MB with checks)">
|
---|
| 12 | <!ENTITY gdb-time "2.2 SBU (13 SBU with 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 |
|
---|
[a55a187] | 41 | &lfs75_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">
|
---|
[56605b9] | 81 | <xref linkend="dejagnu"/> (for tests) and
|
---|
[4890200] | 82 | <xref linkend="python2"/>
|
---|
[d4c9b7c] | 83 | </para>
|
---|
| 84 |
|
---|
[4b0ebf70] | 85 | <para condition="html" role="usernotes">User Notes:
|
---|
[d3970e1] | 86 | <ulink url="&blfs-wiki;/gdb"/>
|
---|
| 87 | </para>
|
---|
[4b0ebf70] | 88 | </sect2>
|
---|
| 89 |
|
---|
| 90 | <sect2 role="installation">
|
---|
[d3970e1] | 91 | <title>Installation of GDB</title>
|
---|
[4b0ebf70] | 92 |
|
---|
[d3970e1] | 93 | <para>
|
---|
| 94 | Install <application>GDB</application> by running the following
|
---|
| 95 | commands:
|
---|
| 96 | </para>
|
---|
[4b0ebf70] | 97 |
|
---|
[a55a187] | 98 | <screen><userinput>./configure --prefix=/usr --with-system-readline &&
|
---|
[4b0ebf70] | 99 | make</userinput></screen>
|
---|
| 100 |
|
---|
[d3970e1] | 101 | <para>
|
---|
[87dddd1e] | 102 | To test the results, issue: <command>make -k check</command>. There are
|
---|
| 103 | many problems with the test suite. Depends on installed compilers,
|
---|
| 104 | differences if run locally or remotely, many timeouts (there is a
|
---|
| 105 | variable that can be set to increase time for timeout, but changing it,
|
---|
| 106 | apparently the total number of tests is not conserved) and also depends
|
---|
| 107 | on some environment variables being set.
|
---|
| 108 | Failures are of the order of 1000.
|
---|
[d3970e1] | 109 | </para>
|
---|
[4b0ebf70] | 110 |
|
---|
[d3970e1] | 111 | <para>
|
---|
| 112 | Now, as the <systemitem class="username">root</systemitem> user:
|
---|
| 113 | </para>
|
---|
[4b0ebf70] | 114 |
|
---|
| 115 | <screen role="root"><userinput>make -C gdb install</userinput></screen>
|
---|
| 116 |
|
---|
| 117 | </sect2>
|
---|
[d3970e1] | 118 |
|
---|
[4b0ebf70] | 119 | <sect2 role="content">
|
---|
| 120 | <title>Contents</title>
|
---|
| 121 |
|
---|
| 122 | <segmentedlist>
|
---|
| 123 | <segtitle>Installed Programs</segtitle>
|
---|
| 124 | <segtitle>Installed Library</segtitle>
|
---|
| 125 | <segtitle>Installed Directories</segtitle>
|
---|
| 126 |
|
---|
| 127 | <seglistitem>
|
---|
[4890200] | 128 | <seg>
|
---|
[6cd96df] | 129 | gcore, gdb and gdbserver
|
---|
[4890200] | 130 | </seg>
|
---|
| 131 | <seg>
|
---|
| 132 | libinproctrace.so
|
---|
| 133 | </seg>
|
---|
| 134 | <seg>
|
---|
| 135 | /usr/include/gdb and
|
---|
| 136 | /usr/share/gdb
|
---|
| 137 | </seg>
|
---|
[4b0ebf70] | 138 | </seglistitem>
|
---|
| 139 | </segmentedlist>
|
---|
| 140 |
|
---|
| 141 | <variablelist>
|
---|
| 142 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 143 | <?dbfo list-presentation="list"?>
|
---|
| 144 | <?dbhtml list-presentation="table"?>
|
---|
| 145 |
|
---|
[a55a187] | 146 | <varlistentry id="gcore">
|
---|
| 147 | <term><command>gcore</command></term>
|
---|
| 148 | <listitem>
|
---|
| 149 | <para>
|
---|
| 150 | generates a core dump of a running program.
|
---|
| 151 | </para>
|
---|
| 152 | <indexterm zone="gdb gcore">
|
---|
| 153 | <primary sortas="b-gcore">gcore</primary>
|
---|
| 154 | </indexterm>
|
---|
| 155 | </listitem>
|
---|
| 156 | </varlistentry>
|
---|
| 157 |
|
---|
[4b0ebf70] | 158 | <varlistentry id="gdb-prog">
|
---|
| 159 | <term><command>gdb</command></term>
|
---|
| 160 | <listitem>
|
---|
[d3970e1] | 161 | <para>
|
---|
| 162 | is the GNU Debugger.
|
---|
| 163 | </para>
|
---|
[4b0ebf70] | 164 | <indexterm zone="gdb gdb-prog">
|
---|
| 165 | <primary sortas="b-gdb-prog">gdb-prog</primary>
|
---|
| 166 | </indexterm>
|
---|
| 167 | </listitem>
|
---|
| 168 | </varlistentry>
|
---|
| 169 |
|
---|
| 170 | <varlistentry id="gdbserver">
|
---|
| 171 | <term><command>gdbserver</command></term>
|
---|
| 172 | <listitem>
|
---|
[d3970e1] | 173 | <para>
|
---|
[4890200] | 174 | is a remote server for the GNU debugger (it allows programs
|
---|
| 175 | to be debugged from a different machine).
|
---|
[d3970e1] | 176 | </para>
|
---|
[4b0ebf70] | 177 | <indexterm zone="gdb gdbserver">
|
---|
| 178 | <primary sortas="b-gdbserver">gdbserver</primary>
|
---|
| 179 | </indexterm>
|
---|
| 180 | </listitem>
|
---|
| 181 | </varlistentry>
|
---|
| 182 |
|
---|
| 183 | <varlistentry id="libinproctrace">
|
---|
[4890200] | 184 | <term><filename class="libraryfile">libinproctrace.so</filename></term>
|
---|
[4b0ebf70] | 185 | <listitem>
|
---|
[d3970e1] | 186 | <para>
|
---|
| 187 | contains functions for the in-process tracing agent. The agent
|
---|
| 188 | allows for installing fast tracepoints, listing static tracepoint
|
---|
| 189 | markers, probing static tracepoints markers, and starting trace
|
---|
| 190 | monitoring.
|
---|
| 191 | </para>
|
---|
[4b0ebf70] | 192 | <indexterm zone="gdb libinproctrace">
|
---|
| 193 | <primary sortas="c-libinproctrace">libinproctrace.so</primary>
|
---|
| 194 | </indexterm>
|
---|
| 195 | </listitem>
|
---|
[d3970e1] | 196 | </varlistentry>
|
---|
[4b0ebf70] | 197 |
|
---|
| 198 | </variablelist>
|
---|
| 199 |
|
---|
| 200 | </sect2>
|
---|
| 201 |
|
---|
| 202 | </sect1>
|
---|