[Lldb-commits] [lldb] [lldb][Windows] Don't cut the loader helper off after 250ms (PR #213010)
Charles Zablit via lldb-commits
lldb-commits at lists.llvm.org
Thu Jul 30 11:54:01 PDT 2026
https://github.com/charles-zablit updated https://github.com/llvm/llvm-project/pull/213010
>From 91d3dd41c260fa8a1625c11220f861a69d175ad6 Mon Sep 17 00:00:00 2001
From: Charles Zablit <c_zablit at apple.com>
Date: Thu, 30 Jul 2026 13:20:49 +0100
Subject: [PATCH 1/4] [lldb][Windows] Don't cut the loader helper off after
250ms
---
lldb/source/Plugins/Platform/Windows/PlatformWindows.cpp | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/lldb/source/Plugins/Platform/Windows/PlatformWindows.cpp b/lldb/source/Plugins/Platform/Windows/PlatformWindows.cpp
index fdf6983801ae5..8868b497bd49d 100644
--- a/lldb/source/Plugins/Platform/Windows/PlatformWindows.cpp
+++ b/lldb/source/Plugins/Platform/Windows/PlatformWindows.cpp
@@ -8,6 +8,7 @@
#include "PlatformWindows.h"
+#include <chrono>
#include <cstdio>
#include <optional>
#if defined(_WIN32)
@@ -422,6 +423,8 @@ uint32_t PlatformWindows::DoLoadImage(Process *process,
// handle currently.
options.SetTrapExceptions(false);
options.SetTimeout(process->GetUtilityExpressionTimeout());
+ options.SetOneThreadTimeout(
+ std::min<std::chrono::microseconds>(5, process->GetUtilityExpressionTimeout() / 2));
options.SetIsForUtilityExpr(true);
ExpressionResults result =
@@ -932,6 +935,8 @@ extern "C" {
// handle currently.
options.SetTrapExceptions(false);
options.SetTimeout(process->GetUtilityExpressionTimeout());
+ options.SetOneThreadTimeout(
+ std::min<std::chrono::microseconds>(5, process->GetUtilityExpressionTimeout() / 2));
ExpressionResults result = UserExpression::Evaluate(
context, options, expression, kLoaderDecls, value);
>From 78955fdf54cdc4f7813595f334d85bf368bb6ab8 Mon Sep 17 00:00:00 2001
From: Charles Zablit <c_zablit at apple.com>
Date: Thu, 30 Jul 2026 13:26:37 +0100
Subject: [PATCH 2/4] fix formatting
---
lldb/source/Plugins/Platform/Windows/PlatformWindows.cpp | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/lldb/source/Plugins/Platform/Windows/PlatformWindows.cpp b/lldb/source/Plugins/Platform/Windows/PlatformWindows.cpp
index 8868b497bd49d..8e81c1de5e917 100644
--- a/lldb/source/Plugins/Platform/Windows/PlatformWindows.cpp
+++ b/lldb/source/Plugins/Platform/Windows/PlatformWindows.cpp
@@ -423,8 +423,8 @@ uint32_t PlatformWindows::DoLoadImage(Process *process,
// handle currently.
options.SetTrapExceptions(false);
options.SetTimeout(process->GetUtilityExpressionTimeout());
- options.SetOneThreadTimeout(
- std::min<std::chrono::microseconds>(5, process->GetUtilityExpressionTimeout() / 2));
+ options.SetOneThreadTimeout(std::min<std::chrono::microseconds>(
+ 5, process->GetUtilityExpressionTimeout() / 2));
options.SetIsForUtilityExpr(true);
ExpressionResults result =
@@ -935,8 +935,8 @@ extern "C" {
// handle currently.
options.SetTrapExceptions(false);
options.SetTimeout(process->GetUtilityExpressionTimeout());
- options.SetOneThreadTimeout(
- std::min<std::chrono::microseconds>(5, process->GetUtilityExpressionTimeout() / 2));
+ options.SetOneThreadTimeout(std::min<std::chrono::microseconds>(
+ 5, process->GetUtilityExpressionTimeout() / 2));
ExpressionResults result = UserExpression::Evaluate(
context, options, expression, kLoaderDecls, value);
>From e6e37fad87f4480391eaaf7477b35c94ac10a984 Mon Sep 17 00:00:00 2001
From: Charles Zablit <c_zablit at apple.com>
Date: Thu, 30 Jul 2026 13:51:44 +0100
Subject: [PATCH 3/4] fixup! [lldb][Windows] Don't cut the loader helper off
after 250ms
---
lldb/source/Plugins/Platform/Windows/PlatformWindows.cpp | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/lldb/source/Plugins/Platform/Windows/PlatformWindows.cpp b/lldb/source/Plugins/Platform/Windows/PlatformWindows.cpp
index 8e81c1de5e917..5b04e3089bebb 100644
--- a/lldb/source/Plugins/Platform/Windows/PlatformWindows.cpp
+++ b/lldb/source/Plugins/Platform/Windows/PlatformWindows.cpp
@@ -424,7 +424,8 @@ uint32_t PlatformWindows::DoLoadImage(Process *process,
options.SetTrapExceptions(false);
options.SetTimeout(process->GetUtilityExpressionTimeout());
options.SetOneThreadTimeout(std::min<std::chrono::microseconds>(
- 5, process->GetUtilityExpressionTimeout() / 2));
+ std::chrono::microseconds(5),
+ process->GetUtilityExpressionTimeout() / 2));
options.SetIsForUtilityExpr(true);
ExpressionResults result =
@@ -936,7 +937,8 @@ extern "C" {
options.SetTrapExceptions(false);
options.SetTimeout(process->GetUtilityExpressionTimeout());
options.SetOneThreadTimeout(std::min<std::chrono::microseconds>(
- 5, process->GetUtilityExpressionTimeout() / 2));
+ std::chrono::microseconds(5),
+ process->GetUtilityExpressionTimeout() / 2));
ExpressionResults result = UserExpression::Evaluate(
context, options, expression, kLoaderDecls, value);
>From 22f86cc39b85ed6995e573779a34ae06e08d5190 Mon Sep 17 00:00:00 2001
From: Charles Zablit <c_zablit at apple.com>
Date: Thu, 30 Jul 2026 19:53:44 +0100
Subject: [PATCH 4/4] fix typo
---
lldb/source/Plugins/Platform/Windows/PlatformWindows.cpp | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/lldb/source/Plugins/Platform/Windows/PlatformWindows.cpp b/lldb/source/Plugins/Platform/Windows/PlatformWindows.cpp
index 5b04e3089bebb..f471a957e8361 100644
--- a/lldb/source/Plugins/Platform/Windows/PlatformWindows.cpp
+++ b/lldb/source/Plugins/Platform/Windows/PlatformWindows.cpp
@@ -424,8 +424,7 @@ uint32_t PlatformWindows::DoLoadImage(Process *process,
options.SetTrapExceptions(false);
options.SetTimeout(process->GetUtilityExpressionTimeout());
options.SetOneThreadTimeout(std::min<std::chrono::microseconds>(
- std::chrono::microseconds(5),
- process->GetUtilityExpressionTimeout() / 2));
+ std::chrono::seconds(5), process->GetUtilityExpressionTimeout() / 2));
options.SetIsForUtilityExpr(true);
ExpressionResults result =
@@ -937,8 +936,7 @@ extern "C" {
options.SetTrapExceptions(false);
options.SetTimeout(process->GetUtilityExpressionTimeout());
options.SetOneThreadTimeout(std::min<std::chrono::microseconds>(
- std::chrono::microseconds(5),
- process->GetUtilityExpressionTimeout() / 2));
+ std::chrono::seconds(5), process->GetUtilityExpressionTimeout() / 2));
ExpressionResults result = UserExpression::Evaluate(
context, options, expression, kLoaderDecls, value);
More information about the lldb-commits
mailing list