[RFA] Fix crash in "run" on macOS when gdb is not signed
Commit Message
>>>>> "Pedro" == Pedro Alves <palves@redhat.com> writes:
Pedro> Hi Tom, I happened to notice that you pushed the wrong version of
Pedro> the patch.
Oops, sorry about that.
I'm checking in the appended.
Tom
commit a7d0f0f000b39269c25509a22a12549c6ef26b1f
Author: Tom Tromey <tom@tromey.com>
Date: Wed Jul 4 11:32:50 2018 -0600
Use exit_inferior in darwin_attach_pid
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.
@@ -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.
@@ -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);