diff options
author | Tom Tromey <tom@tromey.com> | 2018-05-11 12:36:19 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2018-05-16 11:45:03 -0600 |
commit | 06333fea767dc1eaf88ac286293fcbaa0ef2de9e (patch) | |
tree | 69d1ea0454bb40bd7407c990c8edc203fd9d7b58 /gdb/progspace.h | |
parent | 921222e2e8e8427c6a609b1ff66265dceb0d07eb (diff) | |
download | binutils-gdb-06333fea767dc1eaf88ac286293fcbaa0ef2de9e.tar.gz |
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/progspace.h')
-rw-r--r-- | gdb/progspace.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gdb/progspace.h b/gdb/progspace.h index 835fcfdd5d5..456911b29b1 100644 --- a/gdb/progspace.h +++ b/gdb/progspace.h @@ -23,6 +23,7 @@ #include "target.h" #include "vec.h" +#include "gdb_bfd.h" #include "gdb_vecs.h" #include "registry.h" @@ -158,7 +159,7 @@ struct program_space char *pspace_exec_filename = NULL; /* Binary file diddling handle for the core file. */ - bfd *cbfd = NULL; + gdb_bfd_ref_ptr cbfd; /* The address space attached to this program space. More than one program space may be bound to the same address space. In the |