When debugserver fails to attach to a process on a Darwin
authorJason Molenda <jmolenda@apple.com>
Wed, 29 Jul 2015 01:42:16 +0000 (01:42 +0000)
committerJason Molenda <jmolenda@apple.com>
Wed, 29 Jul 2015 01:42:16 +0000 (01:42 +0000)
commit752e1e833b6c09cc18f81e0af3aebf04f6650345
tree5a80efff3645368996484dd3a9089451c3215e92
parent6a40cd71f69c0456e1004e3e057d663b0f1e69c3
When debugserver fails to attach to a process on a Darwin
system, make a couple of additional checks to see if the
attach was denied via the System Integrity Protection that
is new in Mac OS X 10.11.  If so, return a special E87
error code to indicate this to lldb.

Up in lldb, if we receive the E87 error code, be specific
about why the attach failed.

Also detect the more common case of general attach failure
and print a better error message than "lost connection".

I believe this code will all build on Mac OS X 10.10 systems.
It may not compile or run on earlier versions of the OS.
None of this should build on other non-darwin systems.

llvm-svn: 243511
lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
lldb/tools/debugserver/source/DNB.cpp
lldb/tools/debugserver/source/DNB.h
lldb/tools/debugserver/source/RNBRemote.cpp