gdb: Add debug tracing for bfd cache activity.

This patch adds a new debug flag bfd-cache, which when set to non-zero
produces debugging log messages relating to gdb's bfd cache.

gdb/ChangeLog:

	* gdb_bfd.c (debug_bfd_cache): New variable.
	(show_bfd_cache_debug): New function.
	(gdb_bfd_open): Add debug logging.
	(gdb_bfd_ref): Likewise.
	(gdb_bfd_unref): Likewise.
	(_initialize_gdb_bfd): Add new set/show command.
	* NEWS: Mention new command.

gdb/doc/ChangeLog:

	* gdb.texinfo (File Caching): Document "set/show debug bfd-cache".
This commit is contained in:
Andrew Burgess 2015-04-13 16:56:23 +01:00
parent 18989b3c56
commit 566f5e3b38
5 changed files with 78 additions and 1 deletions

View file

@ -1,3 +1,7 @@
2015-08-18 Andrew Burgess <andrew.burgess@embecosm.com>
* gdb.texinfo (File Caching): Document "set/show debug bfd-cache".
2015-08-18 Andrew Burgess <andrew.burgess@embecosm.com>
* gdb.texinfo (Maintenance Commands): Move documentation of "main

View file

@ -18371,6 +18371,16 @@ 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.
@kindex set debug bfd-cache @var{level}
@kindex bfd caching
@item set debug bfd-cache @var{level}
Turns on debugging of the bfd cache, setting the level to @var{level}.
@kindex show debug bfd-cache
@kindex bfd caching
@item show debug bfd-cache
Show the current debugging level of the bfd cache.
@end table
@node Separate Debug Files