| <html lang="en"> |
| <head> |
| <title>File Caching - 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="GDB-Files.html#GDB-Files" title="GDB Files"> |
| <link rel="prev" href="Files.html#Files" title="Files"> |
| <link rel="next" href="Separate-Debug-Files.html#Separate-Debug-Files" title="Separate Debug Files"> |
| <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="File-Caching"></a> |
| <p> |
| Next: <a rel="next" accesskey="n" href="Separate-Debug-Files.html#Separate-Debug-Files">Separate Debug Files</a>, |
| Previous: <a rel="previous" accesskey="p" href="Files.html#Files">Files</a>, |
| Up: <a rel="up" accesskey="u" href="GDB-Files.html#GDB-Files">GDB Files</a> |
| <hr> |
| </div> |
| |
| <h3 class="section">18.2 File Caching</h3> |
| |
| <p><a name="index-caching-of-opened-files-1265"></a><a name="index-caching-of-bfd-objects-1266"></a> |
| To speed up file loading, and reduce memory usage, <span class="sc">gdb</span> will |
| reuse the <code>bfd</code> objects used to track open files. See <a href="../bfd/index.html#Top">BFD</a>. The following commands |
| allow visibility and control of the caching behavior. |
| |
| |
| <a name="index-maint-info-bfds-1267"></a> |
| <dl><dt><code>maint info bfds</code><dd>This prints information about each <code>bfd</code> object that is known to |
| <span class="sc">gdb</span>. |
| |
| <p><a name="index-maint-set-bfd_002dsharing-1268"></a><a name="index-maint-show-bfd_002dsharing-1269"></a><a name="index-bfd-caching-1270"></a><br><dt><code>maint set bfd-sharing</code><br><dt><code>maint show bfd-sharing</code><dd>Control whether <code>bfd</code> objects can be shared. When sharing is |
| enabled <span class="sc">gdb</span> reuses already open <code>bfd</code> objects rather |
| than reopening the same file. Turning sharing off does not cause |
| already shared <code>bfd</code> objects to be unshared, but all future files |
| that are opened will create a new <code>bfd</code> object. Similarly, |
| re-enabling sharing does not cause multiple existing <code>bfd</code> |
| objects to be collapsed into a single shared <code>bfd</code> object. |
| |
| <p><a name="index-set-debug-bfd_002dcache-_0040var_007blevel_007d-1271"></a><a name="index-bfd-caching-1272"></a><br><dt><code>set debug bfd-cache </code><var>level</var><dd>Turns on debugging of the bfd cache, setting the level to <var>level</var>. |
| |
| <p><a name="index-show-debug-bfd_002dcache-1273"></a><a name="index-bfd-caching-1274"></a><br><dt><code>show debug bfd-cache</code><dd>Show the current debugging level of the bfd cache. |
| </dl> |
| |
| </body></html> |
| |