forked from Imagelibrary/binutils-gdb
hurd: fix pushing target on inferior creation
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.
This commit is contained in:
@@ -2146,6 +2146,9 @@ gnu_nat_target::create_inferior (const char *exec_file,
|
||||
|
||||
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);
|
||||
|
||||
@@ -2159,8 +2162,6 @@ gnu_nat_target::create_inferior (const char *exec_file,
|
||||
|
||||
inf_attach (inf, pid);
|
||||
|
||||
push_target (this);
|
||||
|
||||
inf->pending_execs = 1;
|
||||
inf->nomsg = 1;
|
||||
inf->traced = 1;
|
||||
|
||||
Reference in New Issue
Block a user