Check results of get_darwin_inferior
I noticed that the existing kill-detach-inferiors-cmd.exp test was
causing gdb to crash on macOS 10.13. The bug was that an inferior
that hadn't yet been started would cause get_darwin_inferior to return
NULL, and this was not checked.
I went through the places calling get_darwin_inferior and added checks
where appropriate. This makes the test get a bit further. Not all of
these spots are exercised by the test, but they seem safe enough in
any case.
gdb/ChangeLog
2018-08-02 Tom Tromey <tom@tromey.com>
* darwin-nat.c (find_inferior_task_it, darwin_find_thread)
(darwin_suspend_inferior, darwin_resume_inferior)
(darwin_decode_notify_message, darwin_resume_inferior_threads)
(darwin_check_new_threads): Check result of get_darwin_inferior.