Add doc and news for DWARF index cache
authorSimon Marchi <simon.marchi@ericsson.com>
Tue, 7 Aug 2018 22:15:28 +0000 (18:15 -0400)
committerSimon Marchi <simon.marchi@ericsson.com>
Tue, 7 Aug 2018 22:15:28 +0000 (18:15 -0400)
New in v3:

- Address Eli's comments.

This patch adds doc and news for the feature introduced by the previous
patch.

gdb/ChangeLog:

* NEWS: Mention the index cache.

gdb/doc/ChangeLog:

* gdb.texinfo (Index Files Speed Up GDB): Add section about
symbol index cache.

gdb/ChangeLog
gdb/NEWS
gdb/doc/ChangeLog
gdb/doc/gdb.texinfo

index d6e3b71..352a864 100644 (file)
@@ -1,5 +1,9 @@
 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
 
+       * NEWS: Mention the index cache.
+
+2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
+
        * common/pathstuff.h (get_standard_cache_dir): New.
        * common/pathstuff.c (get_standard_cache_dir): New.
        * build-id.h (build_id_to_string): New.
index 669ed2d..7f94665 100644 (file)
--- a/gdb/NEWS
+++ b/gdb/NEWS
@@ -7,6 +7,9 @@
   can be passed using the '[ADDRESS]:PORT' notation, or the regular
   'ADDRESS:PORT' method.
 
+* DWARF index cache: GDB can now automatically save indices of DWARF
+  symbols on disk to speed up further loading of the same binaries.
+
 * New commands
 
 frame apply [all | COUNT | -COUNT | level LEVEL...] [FLAG]... COMMAND
index 90784b5..ceb4043 100644 (file)
@@ -1,3 +1,8 @@
+2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
+
+       * gdb.texinfo (Index Files Speed Up GDB): Add section about
+       symbol index cache.
+
 2018-07-27  Sergio Durigan Junior  <sergiodj@redhat.com>
 
        * gdb.texinfo (gcore man): Rewrite "Description" and "-o"
index 71aef22..b931834 100644 (file)
@@ -20095,6 +20095,34 @@ There are currently some limitation on indices.  They only work when
 for DWARF debugging information, not stabs.  And, they do not
 currently work for programs using Ada.
 
+@subsection Automatic symbol index cache
+
+It is possible for @value{GDBN} to automatically save a copy of this index in a
+cache on disk and retrieve it from there when loading the same binary in the
+future.  This feature can be turned on with @kbd{set index-cache on}.  The
+following commands can be used to tweak the behavior of the index cache.
+
+@table @code
+
+@item set index-cache on
+@itemx set index-cache off
+Enable or disable the use of the symbol index cache.
+
+@item set index-cache directory @var{directory}
+@itemx show index-cache directory
+Set/show the directory where index files will be saved.  By default, the index
+is cached in the @file{gdb} subdirectory of the directory pointed to by the
+@env{XDG_CACHE_HOME} environment variable, if it is defined, else in the
+@file{.cache/gdb} subdirectory of your home directory.
+
+There is no limit on the disk space used by index cache.  It is perfectly safe
+to delete the content of that directory to free up disk space.
+
+@item show index-cache stats
+Print the number of cache hits and misses since the launch of @value{GDBN}.
+
+@end table
+
 @node Symbol Errors
 @section Errors Reading Symbol Files