summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/SystemRuntime/MacOSX/AppleGetThreadItemInfoHandler.cpp
diff options
context:
space:
mode:
authorJason Molenda <jmolenda@apple.com>2014-05-13 22:02:48 +0000
committerJason Molenda <jmolenda@apple.com>2014-05-13 22:02:48 +0000
commitb4892cd266dfafb9c6986ee46a8025c8031c3792 (patch)
tree5b127dbb778899f9efbdd51026ef74edeceefbd1 /lldb/source/Plugins/SystemRuntime/MacOSX/AppleGetThreadItemInfoHandler.cpp
parent1b91aa2cf5141ee3dc4cbbf2e6bdb931b51411ff (diff)
downloadbcm5719-llvm-b4892cd266dfafb9c6986ee46a8025c8031c3792.tar.gz
bcm5719-llvm-b4892cd266dfafb9c6986ee46a8025c8031c3792.zip
Add a new SBThread::SafeToCallFunctions API; this calls over to
the SystemRuntime to check if a thread will have any problems performing an inferior function call so the driver can skip making that function call on that thread. Often the function call can be executed on another thread instead. <rdar://problem/16777874> llvm-svn: 208732
Diffstat (limited to 'lldb/source/Plugins/SystemRuntime/MacOSX/AppleGetThreadItemInfoHandler.cpp')
-rw-r--r--lldb/source/Plugins/SystemRuntime/MacOSX/AppleGetThreadItemInfoHandler.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/lldb/source/Plugins/SystemRuntime/MacOSX/AppleGetThreadItemInfoHandler.cpp b/lldb/source/Plugins/SystemRuntime/MacOSX/AppleGetThreadItemInfoHandler.cpp
index 40b61fe9981..46e76663c47 100644
--- a/lldb/source/Plugins/SystemRuntime/MacOSX/AppleGetThreadItemInfoHandler.cpp
+++ b/lldb/source/Plugins/SystemRuntime/MacOSX/AppleGetThreadItemInfoHandler.cpp
@@ -273,6 +273,14 @@ AppleGetThreadItemInfoHandler::GetThreadItemInfo (Thread &thread, tid_t thread_i
error.Clear();
+ if (thread.SafeToCallFunctions() == false)
+ {
+ if (log)
+ log->Printf ("Not safe to call functions on thread 0x%" PRIx64, thread.GetID());
+ error.SetErrorString ("Not safe to call functions on this thread.");
+ return return_value;
+ }
+
// Set up the arguments for a call to
// struct get_thread_item_info_return_values
OpenPOWER on IntegriCloud