diff options
author | Andrew Burgess <andrew.burgess@embecosm.com> | 2015-04-13 16:31:21 +0100 |
---|---|---|
committer | Andrew Burgess <andrew.burgess@embecosm.com> | 2015-08-18 14:03:14 +0100 |
commit | 18989b3c5642e2ba533e02737797dcf06134229b (patch) | |
tree | 71762e63cc8aa431f9d047994b660f8b51d7de20 /gdb/doc | |
parent | c04fe68f6b94815d3f49c9aed64b2c388d45f4aa (diff) | |
download | gdb-18989b3c5642e2ba533e02737797dcf06134229b.zip gdb-18989b3c5642e2ba533e02737797dcf06134229b.tar.gz gdb-18989b3c5642e2ba533e02737797dcf06134229b.tar.bz2 |
gdb: New maintenance command to disable bfd sharing.
In some rare maintainer cases it is desirable to be able to disable bfd
sharing. This patch adds new commands maintenance set/show commands for
bfd-sharing, allowing gdb's bfd cache to be turned off.
gdb/ChangeLog:
* gdb_bfd.c (bfd_sharing): New variable.
(show_bfd_sharing): New function.
(gdb_bfd_open): Check bfd_sharing variable.
(_initialize_gdb_bfd): Add new set/show command.
* NEWS: Mention new command.
gdb/doc/ChangeLog:
* gdb.texinfo (Maintenance Commands): Move documentation of "main
info bfds" to...
(File Caching): A New section. Outline bfd caching, and add new
description for "main set/show bfd-sharing".
Diffstat (limited to 'gdb/doc')
-rw-r--r-- | gdb/doc/ChangeLog | 7 | ||||
-rw-r--r-- | gdb/doc/gdb.texinfo | 35 |
2 files changed, 37 insertions, 5 deletions
diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog index 806dac4..7716917 100644 --- a/gdb/doc/ChangeLog +++ b/gdb/doc/ChangeLog @@ -1,3 +1,10 @@ +2015-08-18 Andrew Burgess <andrew.burgess@embecosm.com> + + * gdb.texinfo (Maintenance Commands): Move documentation of "main + info bfds" to... + (File Caching): A New section. Outline bfd caching, and add new + description for "main set/show bfd-sharing". + 2015-08-14 Doug Evans <xdje42@gmail.com> * gdb.texinfo (Machine Code): Update docs for mixed source/assembly diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index c876ed6..bd6b8e4 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -18343,6 +18343,36 @@ Set whether a source file may have multiple base names. Show whether a source file may have multiple base names. @end table +@node File Caching +@section File Caching +@cindex caching of opened files +@cindex caching of bfd objects + +To speed up file loading, and reduce memory usage, @value{GDBN} will +reuse the @code{bfd} objects used to track open files. @xref{Top, , +BFD, bfd, The Binary File Descriptor Library}. The following commands +allow visibility and control of the caching behavior. + +@table @code +@kindex maint info bfds +@item maint info bfds +This prints information about each @code{bfd} object that is known to +@value{GDBN}. + +@kindex maint set bfd-sharing +@kindex maint show bfd-sharing +@kindex bfd caching +@item maint set bfd-sharing +@item maint show bfd-sharing +Control whether @code{bfd} objects can be shared. When sharing is +enabled @value{GDBN} reuses already open @code{bfd} objects rather +than reopening the same file. Turning sharing off does not cause +already shared @code{bfd} objects to be unshared, but all future files +that are opened will create a new @code{bfd} object. Similarly, +re-enabling sharing does not cause multiple existing @code{bfd} +objects to be collapsed into a single shared @code{bfd} object. +@end table + @node Separate Debug Files @section Debugging Information in Separate Files @cindex separate debugging information files @@ -34162,11 +34192,6 @@ Shared library events. @end table -@kindex maint info bfds -@item maint info bfds -This prints information about each @code{bfd} object that is known to -@value{GDBN}. @xref{Top, , BFD, bfd, The Binary File Descriptor Library}. - @kindex maint info btrace @item maint info btrace Pint information about raw branch tracing data. |