summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/LanguageRuntime
diff options
context:
space:
mode:
authorPavel Labath <labath@google.com>2016-12-06 11:24:51 +0000
committerPavel Labath <labath@google.com>2016-12-06 11:24:51 +0000
commit43d354182f44fac52247a4340462e7471e59a00a (patch)
tree2caef34124c24c3bf8d636da465758edfdc3cce3 /lldb/source/Plugins/LanguageRuntime
parent9335c020c61addbcb8de944d3f44dbfa4a1abafc (diff)
downloadbcm5719-llvm-43d354182f44fac52247a4340462e7471e59a00a.tar.gz
bcm5719-llvm-43d354182f44fac52247a4340462e7471e59a00a.zip
Use Timeout<> in EvaluateExpressionOptions class
llvm-svn: 288797
Diffstat (limited to 'lldb/source/Plugins/LanguageRuntime')
-rw-r--r--lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp4
-rw-r--r--lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp6
2 files changed, 5 insertions, 5 deletions
diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp
index 24eddb51600..4a90f5c1663 100644
--- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp
+++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp
@@ -40,7 +40,7 @@
using namespace lldb;
using namespace lldb_private;
-#define PO_FUNCTION_TIMEOUT_USEC 15 * 1000 * 1000
+static constexpr std::chrono::seconds g_po_function_timeout(15);
AppleObjCRuntime::~AppleObjCRuntime() {}
@@ -169,7 +169,7 @@ bool AppleObjCRuntime::GetObjectDescription(Stream &strm, Value &value,
options.SetTryAllThreads(true);
options.SetStopOthers(true);
options.SetIgnoreBreakpoints(true);
- options.SetTimeoutUsec(PO_FUNCTION_TIMEOUT_USEC);
+ options.SetTimeout(g_po_function_timeout);
ExpressionResults results = m_print_object_caller_up->ExecuteFunction(
exe_ctx, &wrapper_struct_addr, options, diagnostics, ret);
diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
index 47bf4acd497..e9958a5ef75 100644
--- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
+++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
@@ -66,7 +66,7 @@ using namespace lldb;
using namespace lldb_private;
// 2 second timeout when running utility functions
-#define UTILITY_FUNCTION_TIMEOUT_USEC 2 * 1000 * 1000
+static constexpr std::chrono::seconds g_utility_function_timeout(2);
static const char *g_get_dynamic_class_info_name =
"__lldb_apple_objc_v2_get_dynamic_class_info";
@@ -1411,7 +1411,7 @@ AppleObjCRuntimeV2::UpdateISAToDescriptorMapDynamic(
options.SetTryAllThreads(false);
options.SetStopOthers(true);
options.SetIgnoreBreakpoints(true);
- options.SetTimeoutUsec(UTILITY_FUNCTION_TIMEOUT_USEC);
+ options.SetTimeout(g_utility_function_timeout);
Value return_value;
return_value.SetValueType(Value::eValueTypeScalar);
@@ -1656,7 +1656,7 @@ AppleObjCRuntimeV2::UpdateISAToDescriptorMapSharedCache() {
options.SetTryAllThreads(false);
options.SetStopOthers(true);
options.SetIgnoreBreakpoints(true);
- options.SetTimeoutUsec(UTILITY_FUNCTION_TIMEOUT_USEC);
+ options.SetTimeout(g_utility_function_timeout);
Value return_value;
return_value.SetValueType(Value::eValueTypeScalar);
OpenPOWER on IntegriCloud