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
diff --git a/lldb/tools/debugserver/source/MacOSX/MachTask.cpp b/lldb/tools/debugserver/source/MacOSX/MachTask.cpp
index 88f3f46..49605a9 100644
--- a/lldb/tools/debugserver/source/MacOSX/MachTask.cpp
+++ b/lldb/tools/debugserver/source/MacOSX/MachTask.cpp
@@ -33,7 +33,7 @@
#include "DNBDataRef.h"
#include "stack_logging.h"
-#if defined (__arm__)
+#ifdef WITH_SPRINGBOARD
#include <CoreFoundation/CoreFoundation.h>
#include <SpringBoardServices/SpringBoardServer.h>
@@ -444,7 +444,7 @@
task_t task = mach_task->TaskPort();
mach_msg_timeout_t periodic_timeout = 0;
-#if defined (__arm__)
+#ifdef WITH_SPRINGBOARD
mach_msg_timeout_t watchdog_elapsed = 0;
mach_msg_timeout_t watchdog_timeout = 60 * 1000;
pid_t pid = mach_proc->ProcessID();
@@ -474,7 +474,7 @@
if (periodic_timeout == 0 || periodic_timeout > watchdog_timeout)
periodic_timeout = watchdog_timeout;
}
-#endif // #if defined (__arm__)
+#endif // #ifdef WITH_SPRINGBOARD
while (mach_task->ExceptionPortIsValid())
{
@@ -555,7 +555,7 @@
continue;
}
-#if defined (__arm__)
+#ifdef WITH_SPRINGBOARD
if (watchdog.get())
{
watchdog_elapsed += periodic_timeout;
@@ -583,7 +583,7 @@
}
}
-#if defined (__arm__)
+#ifdef WITH_SPRINGBOARD
if (watchdog.get())
{
// TODO: change SBSWatchdogAssertionRelease to SBSWatchdogAssertionCancel when we
@@ -593,7 +593,7 @@
DNBLogThreadedIf(LOG_TASK, "::SBSWatchdogAssertionRelease(%p)", watchdog.get());
::SBSWatchdogAssertionRelease (watchdog.get());
}
-#endif // #if defined (__arm__)
+#endif // #ifdef WITH_SPRINGBOARD
DNBLogThreadedIf(LOG_EXCEPTIONS, "MachTask::%s (%p): thread exiting...", __FUNCTION__, arg);
return NULL;