mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-26 17:18:55 +00:00
Make "cbfd" a gdb_bfd_ref_ptr
This changes program_space::cbfd to be a gdb_bfd_ref_ptr. This makes it somewhat less error-prone to use, because now it manages the reference counting automatically. Tested by the buildbot. 2018-05-16 Tom Tromey <tom@tromey.com> * gdbcore.h (core_bfd): Redefine. * corelow.c (core_target::close): Update. (core_target_open): Update. * progspace.h (struct program_space) <cbfd>: Now a gdb_bfd_ref_ptr.
This commit is contained in:
@@ -133,7 +133,7 @@ extern void specify_exec_file_hook (void (*hook) (const char *filename));
|
||||
|
||||
/* Binary File Diddler for the core file. */
|
||||
|
||||
#define core_bfd (current_program_space->cbfd)
|
||||
#define core_bfd (current_program_space->cbfd.get ())
|
||||
|
||||
/* Whether to open exec and core files read-only or read-write. */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user