Skip to content

[lldb] Disable delayed breakpoints on Windows#195241

Merged
felipepiovezan merged 1 commit into
llvm:mainfrom
felipepiovezan:felipe/disabledelayedonwindows
May 1, 2026
Merged

[lldb] Disable delayed breakpoints on Windows#195241
felipepiovezan merged 1 commit into
llvm:mainfrom
felipepiovezan:felipe/disabledelayedonwindows

Conversation

@felipepiovezan

Copy link
Copy Markdown
Contributor

Tests started failing on a mysterious way there, potentially related to: #191222

Tests started failing on a mysterious way there, potentially related to:
llvm#191222
@felipepiovezan
felipepiovezan enabled auto-merge (squash) May 1, 2026 09:20
@llvmorg-github-actions

Copy link
Copy Markdown

@llvm/pr-subscribers-lldb

Author: Felipe de Azevedo Piovezan (felipepiovezan)

Changes

Tests started failing on a mysterious way there, potentially related to: #191222


Full diff: https://github.com/llvm/llvm-project/pull/195241.diff

3 Files Affected:

  • (modified) lldb/include/lldb/Target/Process.h (+7)
  • (modified) lldb/source/Plugins/Process/Windows/Common/ProcessWindows.h (+2)
  • (modified) lldb/source/Target/Process.cpp (+1-1)
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();
   }

@felipepiovezan felipepiovezan changed the title [lldb][NFC] Disable delayed breakpoints on Windows [lldb] Disable delayed breakpoints on Windows May 1, 2026
@felipepiovezan
felipepiovezan disabled auto-merge May 1, 2026 09:22
@felipepiovezan
felipepiovezan enabled auto-merge (squash) May 1, 2026 09:22
@felipepiovezan
felipepiovezan merged commit f5eb7a9 into llvm:main May 1, 2026
12 checks passed
@felipepiovezan
felipepiovezan deleted the felipe/disabledelayedonwindows branch May 1, 2026 09:35
@slydiman

slydiman commented May 1, 2026

Copy link
Copy Markdown
Contributor

It seems it is not enough
https://lab.llvm.org/buildbot/#/builders/211/builds/7892
Something caused an access violation.
The same tests failed
#192971 (comment)

@slydiman

slydiman commented May 1, 2026

Copy link
Copy Markdown
Contributor

I'm building the debug version on Windows to localize the problem.

@felipepiovezan

Copy link
Copy Markdown
Contributor Author

I'm building the debug version on Windows to localize the problem.

There were 3 PRs in the first failing build, right? Maybe it was one of the other two?

@felipepiovezan

Copy link
Copy Markdown
Contributor Author

So they randomly passed on recent runs? https://lab.llvm.org/buildbot/#/builders/211/builds/7894

@slydiman

slydiman commented May 1, 2026

Copy link
Copy Markdown
Contributor

Maybe it was one of the other two?

Two other are Darwin and Arm related.

https://lab.llvm.org/buildbot/#/builders/211/builds/7893 is already green. It contains no changes related to lldb.
And my local build is green too.
But https://lab.llvm.org/buildbot/#/builders/211/builds/7892 includes this patch and failed.
No idea.

@felipepiovezan

Copy link
Copy Markdown
Contributor Author

Maybe it was one of the other two?

Two other are Darwin and Arm related.

https://lab.llvm.org/buildbot/#/builders/211/builds/7893 is already green. It contains no changes related to lldb. And my local build is green too. But https://lab.llvm.org/buildbot/#/builders/211/builds/7892 includes this patch and failed. No idea.

Do these bots perform incremental compilation / re-use build directories with the occasional clean build?

medismailben pushed a commit to medismailben/llvm-project that referenced this pull request May 1, 2026
Tests started failing on a mysterious way there, potentially related to:
llvm#191222

(cherry picked from commit f5eb7a9)
enferex pushed a commit to enferex/llvm-project that referenced this pull request May 5, 2026
Tests started failing on a mysterious way there, potentially related to:
llvm#191222
JDevlieghere pushed a commit to swiftlang/llvm-project that referenced this pull request May 11, 2026
Tests started failing on a mysterious way there, potentially related to:
llvm#191222

(cherry picked from commit f5eb7a9)
moar55 pushed a commit to moar55/llvm-project that referenced this pull request May 12, 2026
Tests started failing on a mysterious way there, potentially related to:
llvm#191222
JDevlieghere pushed a commit to swiftlang/llvm-project that referenced this pull request May 13, 2026
Tests started failing on a mysterious way there, potentially related to:
llvm#191222

(cherry picked from commit f5eb7a9)
(cherry picked from commit 12328fa)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants