aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbcore.h
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2018-05-11 19:10:14 +0100
committerPedro Alves <palves@redhat.com>2018-05-11 19:11:55 +0100
commit451953fa440aa0ade02b652159155fae689483a3 (patch)
tree211c8f7378b761b74037e6914212d61de6c41d78 /gdb/gdbcore.h
parente540a5a22319f2ab5661db882639839d1d867542 (diff)
downloadfsf-binutils-gdb-451953fa440aa0ade02b652159155fae689483a3.zip
fsf-binutils-gdb-451953fa440aa0ade02b652159155fae689483a3.tar.gz
fsf-binutils-gdb-451953fa440aa0ade02b652159155fae689483a3.tar.bz2
Eliminate the 'the_core_target' global
(previously called 'core_target', but since renamed because 'core_target' is the name of the target_ops class now.) This eliminates the "the_core_target" global, as preparation for being able to have more than one core loaded. When we get there, we will instantiate one core_target object per core instead. Essentially, this replaces the reference to the_core_target in core_file_command by a reference to core_bfd, which is per program_space. Currently, core_file_command calls 'the_core_target->detach()' even if the core target is not open and pushed on the target stack. If it is indeed not open, then the practical effect is that core_target::detach() prints "No core file now.". That is preserved by printing that directly from within core_file_command if not debugging a core. gdb/ChangeLog: 2018-05-11 Pedro Alves <palves@redhat.com> * corefile.c (core_file_command): Move to corelow.c. * corelow.c (the_core_target): Delete. (core_file_command): Moved from corefile.c. Check exec_bfd instead of the_core_target. Use target_detach instead of calling into the_core_target directly. (maybe_say_no_core_file_now): New. (core_target::detach): Use it. (_initialize_corelow): Remove references to the_core_target. * gdbcore.h (the_core_target): Delete.
Diffstat (limited to 'gdb/gdbcore.h')
-rw-r--r--gdb/gdbcore.h4
1 files changed, 0 insertions, 4 deletions
diff --git a/gdb/gdbcore.h b/gdb/gdbcore.h
index d06ccc3..04a4b47 100644
--- a/gdb/gdbcore.h
+++ b/gdb/gdbcore.h
@@ -135,10 +135,6 @@ extern void specify_exec_file_hook (void (*hook) (const char *filename));
#define core_bfd (current_program_space->cbfd)
-/* corelow.c target. It is never NULL after GDB initialization. */
-
-extern struct target_ops *the_core_target;
-
/* Whether to open exec and core files read-only or read-write. */
extern int write_files;