aboutsummaryrefslogtreecommitdiff
path: root/gdb/darwin-nat.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/darwin-nat.c')
-rw-r--r--gdb/darwin-nat.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gdb/darwin-nat.c b/gdb/darwin-nat.c
index 478429c..f3d510d 100644
--- a/gdb/darwin-nat.c
+++ b/gdb/darwin-nat.c
@@ -1214,8 +1214,6 @@ darwin_mourn_inferior (struct target_ops *ops)
mach_port_t prev;
int i;
- unpush_target (darwin_ops);
-
/* Deallocate threads. */
if (inf->private->threads)
{
@@ -1271,6 +1269,7 @@ darwin_mourn_inferior (struct target_ops *ops)
inf->private = NULL;
generic_mourn_inferior ();
+ inf_child_maybe_unpush_target (ops);
}
static void
@@ -1506,7 +1505,8 @@ impact on the debugging session."));
"returned: %d"),
kret);
- push_target (darwin_ops);
+ if (!target_is_pushed (darwin_ops))
+ push_target (darwin_ops);
}
static void