[Lldb-commits] [lldb] [lldb][NFC] Disable delayed breakpoints on Windows (PR #195241)

Felipe de Azevedo Piovezan via lldb-commits lldb-commits at lists.llvm.org
Fri May 1 02:20:10 PDT 2026


https://github.com/felipepiovezan created https://github.com/llvm/llvm-project/pull/195241

Tests started failing on a mysterious way there, potentially related to: https://github.com/llvm/llvm-project/issues/191222

>From 3ef53afde414e21faf43200e47f8e3e8532477cd Mon Sep 17 00:00:00 2001
From: Felipe de Azevedo Piovezan <fpiovezan at apple.com>
Date: Fri, 1 May 2026 10:06:32 +0100
Subject: [PATCH] [lldb][NFC] Disable delayed breakpoints on Windows

Tests started failing on a mysterious way there, potentially related to:
https://github.com/llvm/llvm-project/issues/191222
---
 lldb/include/lldb/Target/Process.h                         | 7 +++++++
 .../source/Plugins/Process/Windows/Common/ProcessWindows.h | 2 ++
 lldb/source/Target/Process.cpp                             | 2 +-
 3 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/lldb/include/lldb/Target/Process.h b/lldb/include/lldb/Target/Process.h
index 045fa9ee2a05a..67a9a883cd36c 100644
--- a/lldb/include/lldb/Target/Process.h
+++ b/lldb/include/lldb/Target/Process.h
@@ -2310,6 +2310,13 @@ class Process : public std::enable_shared_from_this<Process>,
 
   bool IsBreakpointSitePhysicallyEnabled(const BreakpointSite &site);
 
+  /// Reports whether this process should delay physically enabling/disabling
+  /// breakpoints until the process is about to resume. The default honors the
+  /// user-facing `target.process.use-delayed-breakpoints` setting.
+  virtual bool ShouldUseDelayedBreakpoints() const {
+    return GetUseDelayedBreakpoints();
+  }
+
   // BreakpointLocations use RemoveConstituentFromBreakpointSite to remove
   // themselves from the constituent's list of this breakpoint sites.
   void RemoveConstituentFromBreakpointSite(lldb::user_id_t site_id,
diff --git a/lldb/source/Plugins/Process/Windows/Common/ProcessWindows.h b/lldb/source/Plugins/Process/Windows/Common/ProcessWindows.h
index c1478dd30c4d2..228619d0e3d5e 100644
--- a/lldb/source/Plugins/Process/Windows/Common/ProcessWindows.h
+++ b/lldb/source/Plugins/Process/Windows/Common/ProcessWindows.h
@@ -44,6 +44,8 @@ class ProcessWindows : public Process, public ProcessDebugger {
   Status EnableBreakpointSite(BreakpointSite *bp_site) override;
   Status DisableBreakpointSite(BreakpointSite *bp_site) override;
 
+  bool ShouldUseDelayedBreakpoints() const override { return false; }
+
   Status DoDetach(bool keep_stopped) override;
   Status DoLaunch(Module *exe_module, ProcessLaunchInfo &launch_info) override;
   Status DoAttachToProcessWithID(
diff --git a/lldb/source/Target/Process.cpp b/lldb/source/Target/Process.cpp
index cb9a13e5bc80c..114bbd7355f0c 100644
--- a/lldb/source/Target/Process.cpp
+++ b/lldb/source/Target/Process.cpp
@@ -1601,7 +1601,7 @@ llvm::Error Process::ExecuteBreakpointSiteAction(BreakpointSite &site,
   if (IsBreakpointSiteEnabled(*site_sp) == (action == BreakpointAction::Enable))
     return llvm::Error::success();
 
-  if (GetUseDelayedBreakpoints()) {
+  if (ShouldUseDelayedBreakpoints()) {
     m_delayed_breakpoints.Enqueue(site_sp, action);
     return llvm::Error::success();
   }



More information about the lldb-commits mailing list