Use exit_inferior in darwin_attach_pid
authorTom Tromey <tom@tromey.com>
Wed, 4 Jul 2018 17:32:50 +0000 (11:32 -0600)
committerTom Tromey <tom@tromey.com>
Wed, 4 Jul 2018 17:32:50 +0000 (11:32 -0600)
Commit a50c11c666 was intended to use exit_inferior in
darwin_attach_pid, but I accidentally pushed the wrong version of the
patch.  This fixes the problem.

gdb/ChangeLog
2018-07-04  Tom Tromey  <tom@tromey.com>

* darwin-nat.c (darwin_attach_pid): Use exit_inferior.

gdb/ChangeLog
gdb/darwin-nat.c

index d2319c06d5257420f181dcd3bb8a159e6286ba60..7bd0cc4f95e8f2cd5c2e976c18be44d3a71af9c8 100644 (file)
@@ -1,3 +1,7 @@
+2018-07-04  Tom Tromey  <tom@tromey.com>
+
+       * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
+
 2018-07-04  Simon Marchi  <simon.marchi@polymtl.ca>
 
        * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
index 8104de53e7f869850504fbb48f0fbfd220ff954e..5aed285ad46163e2e73824696b9fadbd994c1f3e 100644 (file)
@@ -1662,8 +1662,7 @@ darwin_attach_pid (struct inferior *inf)
     }
   CATCH (ex, RETURN_MASK_ALL)
     {
-      inf->pid = 0;
-      inf->priv.reset ();
+      exit_inferior (inf);
       inferior_ptid = null_ptid;
 
       throw_exception (ex);