]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - gdb/gnu-nat.c
Allow making GDB not automatically connect to the native target.
[thirdparty/binutils-gdb.git] / gdb / gnu-nat.c
index 82358112ee848459cac2490243ed5c662ed71cc8..3317215b17eda28990773d11ccde66f19630c6e8 100644 (file)
@@ -2080,8 +2080,8 @@ gnu_mourn_inferior (struct target_ops *ops)
 {
   inf_debug (gnu_current_inf, "rip");
   inf_detach (gnu_current_inf);
-  unpush_target (ops);
   generic_mourn_inferior ();
+  inf_child_maybe_unpush_target (ops);
 }
 
 \f
@@ -2253,7 +2253,7 @@ gnu_detach (struct target_ops *ops, const char *args, int from_tty)
   inferior_ptid = null_ptid;
   detach_inferior (pid);
 
-  unpush_target (ops); /* Pop out of handling an inferior.  */
+  inf_child_maybe_unpush_target (ops);
 }
 \f
 static void