This fixes creating inferiors, which was broken since
5b6d1e4fa
('Multi-target support')
gdb/ChangeLog:
* gnu-nat.c (gnu_nat_target::create_inferior): Move push_target call
before fork_inferior call. Avoid calling it if target_is_pushed returns
true.
+2020-05-30 Samuel Thibault <samuel.thibault@ens-lyon.org>
+
+ * gnu-nat.c (gnu_nat_target::create_inferior): Move push_target call
+ before fork_inferior call. Avoid calling it if target_is_pushed returns
+ true.
+
2020-05-30 Samuel Thibault <samuel.thibault@ens-lyon.org>
* gnu-nat.h (gnu_target): New variable declaration.
inf_debug (inf, "creating inferior");
+ if (!target_is_pushed (this))
+ push_target (this);
+
pid = fork_inferior (exec_file, allargs, env, gnu_ptrace_me,
NULL, NULL, NULL, NULL);
inf_attach (inf, pid);
- push_target (this);
-
inf->pending_execs = 1;
inf->nomsg = 1;
inf->traced = 1;