]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit - gdb/darwin-nat.c
darwin-nat.c: Do not use gdb_assert on system call outcomes.
authorJoel Brobecker <brobecker@gnat.com>
Mon, 6 May 2013 12:35:46 +0000 (12:35 +0000)
committerJoel Brobecker <brobecker@gnat.com>
Mon, 6 May 2013 12:35:46 +0000 (12:35 +0000)
commitfda184b63953cef0f058748b74ebf8d29b4aa8a2
tree8814be911c936008af1cab2a3e9e73f920a67bc0
parentd1d69afb196e15a77882a9a196dd66520b924149
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.
gdb/ChangeLog
gdb/darwin-nat.c