To speed up file loading, and reduce memory usage, gdb will
reuse the bfd objects used to track open files. See BFD. The following commands
allow visibility and control of the caching behavior.
maint info bfdsbfd object that is known to
gdb.
maint set bfd-sharingmaint show bfd-sharingbfd objects can be shared. When sharing is
enabled gdb reuses already open bfd objects rather
than reopening the same file. Turning sharing off does not cause
already shared bfd objects to be unshared, but all future files
that are opened will create a new bfd object. Similarly,
re-enabling sharing does not cause multiple existing bfd
objects to be collapsed into a single shared bfd object.
set debug bfd-cache levelshow debug bfd-cache