diff options
author | Pavel Labath <labath@google.com> | 2016-12-06 11:24:51 +0000 |
---|---|---|
committer | Pavel Labath <labath@google.com> | 2016-12-06 11:24:51 +0000 |
commit | 1c59cdf8a34a8c2f5e888b666e009f8ed37396a8 (patch) | |
tree | 681d8bc540c14219bd4db5f93d86eec0da40b1df /lldb/source/Plugins/InstrumentationRuntime | |
parent | d3532d4e7378eb8883fb7a9bd7561b6c9e49f56f (diff) |
Use Timeout<> in EvaluateExpressionOptions class
Diffstat (limited to 'lldb/source/Plugins/InstrumentationRuntime')
-rw-r--r-- | lldb/source/Plugins/InstrumentationRuntime/AddressSanitizer/AddressSanitizerRuntime.cpp | 4 | ||||
-rw-r--r-- | lldb/source/Plugins/InstrumentationRuntime/ThreadSanitizer/ThreadSanitizerRuntime.cpp | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/lldb/source/Plugins/InstrumentationRuntime/AddressSanitizer/AddressSanitizerRuntime.cpp b/lldb/source/Plugins/InstrumentationRuntime/AddressSanitizer/AddressSanitizerRuntime.cpp index 2f82328864a..db626b06615 100644 --- a/lldb/source/Plugins/InstrumentationRuntime/AddressSanitizer/AddressSanitizerRuntime.cpp +++ b/lldb/source/Plugins/InstrumentationRuntime/AddressSanitizer/AddressSanitizerRuntime.cpp @@ -72,7 +72,7 @@ bool AddressSanitizerRuntime::CheckIfRuntimeIsValid( return symbol != nullptr; } -#define RETRIEVE_REPORT_DATA_FUNCTION_TIMEOUT_USEC 2 * 1000 * 1000 +static constexpr std::chrono::seconds g_retrieve_report_data_function_timeout(2); const char *address_sanitizer_retrieve_report_data_prefix = R"( extern "C" { @@ -127,7 +127,7 @@ StructuredData::ObjectSP AddressSanitizerRuntime::RetrieveReportData() { options.SetTryAllThreads(true); options.SetStopOthers(true); options.SetIgnoreBreakpoints(true); - options.SetTimeoutUsec(RETRIEVE_REPORT_DATA_FUNCTION_TIMEOUT_USEC); + options.SetTimeout(g_retrieve_report_data_function_timeout); options.SetPrefix(address_sanitizer_retrieve_report_data_prefix); options.SetAutoApplyFixIts(false); options.SetLanguage(eLanguageTypeObjC_plus_plus); diff --git a/lldb/source/Plugins/InstrumentationRuntime/ThreadSanitizer/ThreadSanitizerRuntime.cpp b/lldb/source/Plugins/InstrumentationRuntime/ThreadSanitizer/ThreadSanitizerRuntime.cpp index 84c8b6443f7..3010724306e 100644 --- a/lldb/source/Plugins/InstrumentationRuntime/ThreadSanitizer/ThreadSanitizerRuntime.cpp +++ b/lldb/source/Plugins/InstrumentationRuntime/ThreadSanitizer/ThreadSanitizerRuntime.cpp @@ -59,7 +59,7 @@ lldb::InstrumentationRuntimeType ThreadSanitizerRuntime::GetTypeStatic() { ThreadSanitizerRuntime::~ThreadSanitizerRuntime() { Deactivate(); } -#define RETRIEVE_REPORT_DATA_FUNCTION_TIMEOUT_USEC 2 * 1000 * 1000 +static constexpr std::chrono::seconds g_retrieve_data_function_timeout(2); const char *thread_sanitizer_retrieve_report_data_prefix = R"( extern "C" @@ -308,7 +308,7 @@ ThreadSanitizerRuntime::RetrieveReportData(ExecutionContextRef exe_ctx_ref) { options.SetTryAllThreads(true); options.SetStopOthers(true); options.SetIgnoreBreakpoints(true); - options.SetTimeoutUsec(RETRIEVE_REPORT_DATA_FUNCTION_TIMEOUT_USEC); + options.SetTimeout(g_retrieve_data_function_timeout); options.SetPrefix(thread_sanitizer_retrieve_report_data_prefix); options.SetAutoApplyFixIts(false); options.SetLanguage(eLanguageTypeObjC_plus_plus); |