@@ -57,10 +57,6 @@ static hook_type *exec_file_extra_hooks; /* Array of additional
hooks. */
static int exec_file_hook_count = 0; /* Size of array. */
-/* Binary file diddling handle for the core file. */
-
-bfd *core_bfd = NULL;
-
/* corelow.c target. It is never NULL after GDB initialization. */
struct target_ops *core_target;
@@ -138,7 +138,7 @@ extern void specify_exec_file_hook (void (*hook) (char *filename));
/* Binary File Diddler for the core file. */
-extern bfd *core_bfd;
+#define core_bfd (current_program_space->cbfd)
extern struct target_ops *core_target;
@@ -206,6 +206,9 @@ struct program_space
This is so we can properly report solib changes to the user. */
VEC (char_ptr) *deleted_solibs;
+ /* Binary file diddling handle for the core file. */
+ bfd *cbfd;
+
/* Per pspace data-pointers required by other GDB modules. */
REGISTRY_FIELDS;
};