darwin-nat.c: Do not use gdb_assert on system call outcomes.
There were many cases were we make a system call which could fail
due to reasons outside of the debugger control. We should handle
these situations a little more gracefully than triggering an
internal error.
gdb/ChangeLog:
* darwin-nat.c (darwin_mourn_inferior): Replace call to
gdb_assert by call to MACH_CHECK_ERROR.
(darwin_attach_pid): Raise an error rather than a failed
assertion when various system calls failed. Report a warning
instead of raising a failed assertion when PREV_NOT is not NULL
after call to mach_port_request_notification.
(darwin_ptrace_me): Raise an error rather than a failed
assertion when read returns nonzero.