aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbcore.h
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2018-05-11 12:36:19 -0600
committerTom Tromey <tom@tromey.com>2018-05-16 11:45:03 -0600
commit06333fea767dc1eaf88ac286293fcbaa0ef2de9e (patch)
tree69d1ea0454bb40bd7407c990c8edc203fd9d7b58 /gdb/gdbcore.h
parent921222e2e8e8427c6a609b1ff66265dceb0d07eb (diff)
downloadgdb-06333fea767dc1eaf88ac286293fcbaa0ef2de9e.zip
gdb-06333fea767dc1eaf88ac286293fcbaa0ef2de9e.tar.gz
gdb-06333fea767dc1eaf88ac286293fcbaa0ef2de9e.tar.bz2
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.
Diffstat (limited to 'gdb/gdbcore.h')
-rw-r--r--gdb/gdbcore.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/gdbcore.h b/gdb/gdbcore.h
index 04a4b47..18ba0d7 100644
--- a/gdb/gdbcore.h
+++ b/gdb/gdbcore.h
@@ -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. */