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