summaryrefslogtreecommitdiffstats
path: root/lldb/tools/debugserver/source/MacOSX/MachProcess.cpp
diff options
context:
space:
mode:
authorJason Molenda <jmolenda@apple.com>2012-02-22 02:18:59 +0000
committerJason Molenda <jmolenda@apple.com>2012-02-22 02:18:59 +0000
commit42999a48f9cfce6f84c3a6f9b8f0a263130a0ce8 (patch)
treeb6d20feb6a01c474249f6956fa301bc97bc3b64b /lldb/tools/debugserver/source/MacOSX/MachProcess.cpp
parenta1bed4cd96141eb92e94acd56d02167ec007626e (diff)
downloadbcm5719-llvm-42999a48f9cfce6f84c3a6f9b8f0a263130a0ce8.tar.gz
bcm5719-llvm-42999a48f9cfce6f84c3a6f9b8f0a263130a0ce8.zip
Change #ifdef markers around lockdown and SpringBoard
calls to dpeend on WITH_SPRINGBOARD and WITH_LOCKDOWN instead of __arm__. Add an RNBSocket::useFD method. llvm-svn: 151119
Diffstat (limited to 'lldb/tools/debugserver/source/MacOSX/MachProcess.cpp')
-rw-r--r--lldb/tools/debugserver/source/MacOSX/MachProcess.cpp18
1 files changed, 8 insertions, 10 deletions
diff --git a/lldb/tools/debugserver/source/MacOSX/MachProcess.cpp b/lldb/tools/debugserver/source/MacOSX/MachProcess.cpp
index 264c7362e61..d0d4c8d09be 100644
--- a/lldb/tools/debugserver/source/MacOSX/MachProcess.cpp
+++ b/lldb/tools/debugserver/source/MacOSX/MachProcess.cpp
@@ -40,13 +40,12 @@
static CFStringRef CopyBundleIDForPath (const char *app_buncle_path, DNBError &err_str);
-#if defined (__arm__)
+#ifdef WITH_SPRINGBOARD
#include <CoreFoundation/CoreFoundation.h>
#include <SpringBoardServices/SpringBoardServer.h>
#include <SpringBoardServices/SBSWatchdogAssertion.h>
-
static bool
IsSBProcess (nub_process_t pid)
{
@@ -74,7 +73,6 @@ IsSBProcess (nub_process_t pid)
return false;
}
-
#endif
#if 0
@@ -1328,7 +1326,7 @@ MachProcess::AttachForDebug (pid_t pid, char *err_str, size_t err_len)
SetState(eStateAttaching);
m_pid = pid;
// Let ourselves know we are going to be using SBS if the correct flag bit is set...
-#if defined (__arm__)
+#ifdef WITH_SPRINGBOARD
if (IsSBProcess(pid))
m_flags |= eMachProcessFlagsUsingSBS;
#endif
@@ -1377,7 +1375,7 @@ MachProcess::AttachForDebug (pid_t pid, char *err_str, size_t err_len)
const void *
MachProcess::PrepareForAttach (const char *path, nub_launch_flavor_t launch_flavor, bool waitfor, DNBError &err_str)
{
-#if defined (__arm__)
+#ifdef WITH_SPRINGBOARD
// Tell SpringBoard to halt the next launch of this application on startup.
if (!waitfor)
@@ -1444,7 +1442,7 @@ MachProcess::CheckForProcess (const void *attach_token)
if (attach_token == NULL)
return INVALID_NUB_PROCESS;
-#if defined (__arm__)
+#ifdef WITH_SPRINGBOARD
CFStringRef bundleIDCFStr = (CFStringRef) attach_token;
Boolean got_it;
nub_process_t attach_pid;
@@ -1465,7 +1463,7 @@ MachProcess::CheckForProcess (const void *attach_token)
void
MachProcess::CleanupAfterAttach (const void *attach_token, bool success, DNBError &err_str)
{
-#if defined (__arm__)
+#ifdef WITH_SPRINGBOARD
if (attach_token == NULL)
return;
@@ -1540,7 +1538,7 @@ MachProcess::LaunchForDebug
launch_err);
break;
-#if defined (__arm__)
+#ifdef WITH_SPRINGBOARD
case eLaunchFlavorSpringBoard:
{
@@ -1898,7 +1896,7 @@ MachProcess::ForkChildForPTraceDebugging
return pid;
}
-#if defined (__arm__)
+#ifdef WITH_SPRINGBOARD
pid_t
MachProcess::SBLaunchForDebug (const char *path, char const *argv[], char const *envp[], bool no_stdio, DNBError &launch_err)
@@ -2151,6 +2149,6 @@ MachProcess::SBForkChildForPTraceDebugging (const char *app_bundle_path, char co
return INVALID_NUB_PROCESS;
}
-#endif // #if defined (__arm__)
+#endif // #ifdef WITH_SPRINGBOARD
OpenPOWER on IntegriCloud