Author: jmolenda
Date: Mon Jul  6 23:15:43 2015
New Revision: 241553

URL: http://llvm.org/viewvc/llvm-project?rev=241553&view=rev
Log:
When debugserver is running on an iOS device, call
proc_set_wakemon_params() to raise the limit on the # of wakeups
per second that are acceptable before the system may send an 
EXC_RESOURCE signal to debugserver.  

<rdar://problem/19631512> 

Modified:
    lldb/trunk/tools/debugserver/source/debugserver.cpp

Modified: lldb/trunk/tools/debugserver/source/debugserver.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/debugserver/source/debugserver.cpp?rev=241553&r1=241552&r2=241553&view=diff
==============================================================================
--- lldb/trunk/tools/debugserver/source/debugserver.cpp (original)
+++ lldb/trunk/tools/debugserver/source/debugserver.cpp Mon Jul  6 23:15:43 2015
@@ -27,6 +27,7 @@
 
 #if defined (__APPLE__)
 #include <sched.h>
+extern "C" int proc_set_wakemon_params(pid_t, int, int); // 
<libproc_internal.h> SPI
 #endif
 
 #include "CFString.h"
@@ -891,6 +892,8 @@ main (int argc, char *argv[])
         thread_param.sched_priority = 47;
         pthread_setschedparam(pthread_self(), thread_sched_policy, 
&thread_param);
     }
+
+    ::proc_set_wakemon_params (getpid(), 500, 0); // Allow up to 500 
wakeups/sec to avoid EXC_RESOURCE for normal use.
 #endif
 #endif
 


_______________________________________________
lldb-commits mailing list
lldb-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits

Reply via email to