darwin-nat.c: handle Darwin 16 (aka Sierra).
authorTristan Gingold <gingold@adacore.com>
Wed, 9 Nov 2016 09:25:00 +0000 (10:25 +0100)
committerTristan Gingold <gingold@adacore.com>
Wed, 9 Nov 2016 09:28:53 +0000 (10:28 +0100)
commit82b19a4d2f9c9e8d56fdffdd702f7db4af486386
treefb90c6b7129c3472739cc294ed54d7298a54a6b2
parent4c1d4908aa9e61a35a2555e5529997d7f996a516
darwin-nat.c: handle Darwin 16 (aka Sierra).

Support message from new task and dead name notification on task of an
existing process.
With Sierra, exec(2) terminate the current task and creates a new one.
'set startup-with-shell off' must still be used on Darwin 16.

2016-11-09  Tristan Gingold  <gingold@adacore.com>

* darwin-nat.c (find_inferior_task_it): Fix indentation.
(find_inferior_notify_it): Remove.
(find_inferior_pid_it): New function.
(darwin_find_inferior_by_notify): Remove.
(darwin_find_inferior_by_pid): New function.
(darwin_find_new_inferior): New function.
(darwin_check_message_ndr): New function from
darwin_decode_exception_message.
(darwin_decode_exception_message): Call darwin_check_message_ndr.
Handle SIGTRAP addressed to an unknown task (when a task spawned).
(darwin_decode_notify_message): New function.
(darwin_decode_message): Handle unknown task.
(darwin_deallocate_threads): New function from darwin_mourn_inferior.
(darwin_mourn_inferior): Use darwin_deallocate_threads and
darwin_deallocate_exception_ports.
(darwin_deallocate_exception_ports): New function from
darwin_mourn_inferior.
(darwin_setup_exceptions): New function from darwin_attach_pid.
(darwin_setup_request_notification): Likewise.
(darwin_attach_pid): Call darwin_setup_request_notification and
darwin_setup_request_notification.
gdb/ChangeLog
gdb/darwin-nat.c