blob: 65ed5c67f094eb26167ad04e7f1b1fea8e22b4e9 [file] [log] [blame]
<html lang="en">
<head>
<title>gdb-add-index man - Debugging with GDB</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Debugging with GDB">
<meta name="generator" content="makeinfo 4.13">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="Man-Pages.html#Man-Pages" title="Man Pages">
<link rel="prev" href="gdbinit-man.html#gdbinit-man" title="gdbinit man">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
Copyright (C) 1988-2019 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with the
Invariant Sections being ``Free Software'' and ``Free Software Needs
Free Documentation'', with the Front-Cover Texts being ``A GNU Manual,''
and with the Back-Cover Texts as in (a) below.
(a) The FSF's Back-Cover Text is: ``You are free to copy and modify
this GNU Manual. Buying copies from GNU Press supports the FSF in
developing GNU and promoting software freedom.''
-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<div class="node">
<a name="gdb-add-index-man"></a>
<a name="gdb_002dadd_002dindex-man"></a>
<p>
Previous:&nbsp;<a rel="previous" accesskey="p" href="gdbinit-man.html#gdbinit-man">gdbinit man</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="Man-Pages.html#Man-Pages">Man Pages</a>
<hr>
</div>
<h3 class="heading">gdb-add-index</h3>
<p><a name="index-gdb_002dadd_002dindex-3682"></a><a name="gdb_002dadd_002dindex"></a><!-- man title gdb-add-index Add index files to speed up GDB -->
<!-- man begin SYNOPSIS gdb-add-index -->
<p>gdb-add-index <var>filename</var>
<!-- man end -->
<!-- man begin DESCRIPTION gdb-add-index -->
<p>When <span class="sc">gdb</span> finds a symbol file, it scans the symbols in the
file in order to construct an internal symbol table. This lets most
<span class="sc">gdb</span> operations work quickly&ndash;at the cost of a delay early on.
For large programs, this delay can be quite lengthy, so <span class="sc">gdb</span>
provides a way to build an index, which speeds up startup.
<p>To determine whether a file contains such an index, use the command
<kbd>readelf -S filename</kbd>: the index is stored in a section named
<code>.gdb_index</code>. The index file can only be produced on systems
which use ELF binaries and DWARF debug information (i.e., sections
named <code>.debug_*</code>).
<p><samp><span class="command">gdb-add-index</span></samp> uses <span class="sc">gdb</span> and <samp><span class="command">objdump</span></samp> found
in the <samp><span class="env">PATH</span></samp> environment variable. If you want to use different
versions of these programs, you can specify them through the
<samp><span class="env">GDB</span></samp> and <samp><span class="env">OBJDUMP</span></samp> environment variables.
<p>See more in
<a href="Index-Files.html#Index-Files">Index Files</a>.
<!-- man end -->
<!-- man begin SEEALSO gdb-add-index -->
<!-- man end -->
</body></html>