Enhance debugserver's err reporting on attach fails
authorJason Molenda <jmolenda@apple.com>
Wed, 5 Feb 2020 03:43:33 +0000 (19:43 -0800)
committerJason Molenda <jmolenda@apple.com>
Wed, 5 Feb 2020 03:46:55 +0000 (19:46 -0800)
commit843a0f97717a006fd21cd89fd229b064506e5d05
tree142416b393d1036faf7cd9ccc38237ddd40a3f1b
parentb8004b7308b490b93231789cd05f86294a77d663
Enhance debugserver's err reporting on attach fails

Explicitly check for a request to attach to a pid that doesn't
exist, to attach to a pid that is already being debugged, unify the
SIP process check, and an attempt at checking if developer mode is
enabled on the system (which isn't working in debugserver, for some
reason; I can't get the authorization record which should be an
unprivileged operation and works in a standalone program I wrote).

I'll debug the developer mode check later, but I wanted to land it
along with everything else; right now it will claim that developer
mode is always enabled so it's harmless to include as-is.
lldb/tools/debugserver/source/DNB.cpp
lldb/tools/debugserver/source/DNB.h
lldb/tools/debugserver/source/RNBRemote.cpp
lldb/tools/debugserver/source/RNBServices.cpp