https://github.com/charles-zablit created https://github.com/llvm/llvm-project/pull/213655
This is a follow up to https://github.com/llvm/llvm-project/pull/213010. >From 58285c68f76bf33dc13b54737993ed86bf2b00f1 Mon Sep 17 00:00:00 2001 From: Charles Zablit <[email protected]> Date: Mon, 3 Aug 2026 14:30:05 +0200 Subject: [PATCH] [lldb][Windows] Document thread timeout variable --- lldb/source/Plugins/Platform/Windows/PlatformWindows.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lldb/source/Plugins/Platform/Windows/PlatformWindows.cpp b/lldb/source/Plugins/Platform/Windows/PlatformWindows.cpp index 497a78e85ed58..224d13babfd12 100644 --- a/lldb/source/Plugins/Platform/Windows/PlatformWindows.cpp +++ b/lldb/source/Plugins/Platform/Windows/PlatformWindows.cpp @@ -48,6 +48,10 @@ LLDB_PLUGIN_DEFINE(PlatformWindows) static uint32_t g_initialize_count = 0; +// Upper bound on the timeout used when running a utility expression with +// only one thread allowed to run. +static constexpr std::chrono::seconds g_max_one_thread_timeout(5); + namespace { #define LLDB_PROPERTIES_windows @@ -426,7 +430,7 @@ uint32_t PlatformWindows::DoLoadImage(Process *process, options.SetTrapExceptions(false); options.SetTimeout(process->GetUtilityExpressionTimeout()); options.SetOneThreadTimeout(std::min<std::chrono::microseconds>( - std::chrono::seconds(5), process->GetUtilityExpressionTimeout() / 2)); + g_max_one_thread_timeout, process->GetUtilityExpressionTimeout() / 2)); options.SetIsForUtilityExpr(true); ExpressionResults result = @@ -941,7 +945,7 @@ extern "C" { options.SetTrapExceptions(false); options.SetTimeout(process->GetUtilityExpressionTimeout()); options.SetOneThreadTimeout(std::min<std::chrono::microseconds>( - std::chrono::seconds(5), process->GetUtilityExpressionTimeout() / 2)); + g_max_one_thread_timeout, process->GetUtilityExpressionTimeout() / 2)); ExpressionResults result = UserExpression::Evaluate( context, options, expression, kLoaderDecls, value); _______________________________________________ lldb-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
