aboutsummaryrefslogtreecommitdiff
path: root/gdb/target.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/target.c')
-rw-r--r--gdb/target.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/gdb/target.c b/gdb/target.c
index fe7cb08..8579c19 100644
--- a/gdb/target.c
+++ b/gdb/target.c
@@ -106,10 +106,8 @@ static enum exec_direction_kind default_execution_direction
static std::unordered_map<const target_info *, target_open_ftype *>
target_factories;
-/* The initial current target, so that there is always a semi-valid
- current target. */
+/* The singleton debug target. */
-static struct target_ops *the_dummy_target;
static struct target_ops *the_debug_target;
/* The target stack. */
@@ -3239,6 +3237,10 @@ dummy_make_corefile_notes (struct target_ops *self,
#include "target-delegates.c"
+/* The initial current target, so that there is always a semi-valid
+ current target. */
+
+static dummy_target the_dummy_target;
static const target_info dummy_target_info = {
"None",
@@ -3976,8 +3978,7 @@ set_write_memory_permission (const char *args, int from_tty,
void
initialize_targets (void)
{
- the_dummy_target = new dummy_target ();
- push_target (the_dummy_target);
+ push_target (&the_dummy_target);
the_debug_target = new debug_target ();