Skip to content

Commit 40e364c

Browse files
[lldb] Disable delayed breakpoints on Windows (llvm#195241)
Tests started failing on a mysterious way there, potentially related to: llvm#191222 (cherry picked from commit f5eb7a9) (cherry picked from commit 12328fa)
1 parent c4d5981 commit 40e364c

3 files changed

Lines changed: 10 additions & 1 deletion

File tree

lldb/include/lldb/Target/Process.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2300,6 +2300,13 @@ class Process : public std::enable_shared_from_this<Process>,
23002300

23012301
bool IsBreakpointSitePhysicallyEnabled(const BreakpointSite &site);
23022302

2303+
/// Reports whether this process should delay physically enabling/disabling
2304+
/// breakpoints until the process is about to resume. The default honors the
2305+
/// user-facing `target.process.use-delayed-breakpoints` setting.
2306+
virtual bool ShouldUseDelayedBreakpoints() const {
2307+
return GetUseDelayedBreakpoints();
2308+
}
2309+
23032310
// BreakpointLocations use RemoveConstituentFromBreakpointSite to remove
23042311
// themselves from the constituent's list of this breakpoint sites.
23052312
void RemoveConstituentFromBreakpointSite(lldb::user_id_t site_id,

lldb/source/Plugins/Process/Windows/Common/ProcessWindows.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ class ProcessWindows : public Process, public ProcessDebugger {
4444
Status EnableBreakpointSite(BreakpointSite *bp_site) override;
4545
Status DisableBreakpointSite(BreakpointSite *bp_site) override;
4646

47+
bool ShouldUseDelayedBreakpoints() const override { return false; }
48+
4749
Status DoDetach(bool keep_stopped) override;
4850
Status DoLaunch(Module *exe_module, ProcessLaunchInfo &launch_info) override;
4951
Status DoAttachToProcessWithID(

lldb/source/Target/Process.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1777,7 +1777,7 @@ llvm::Error Process::ExecuteBreakpointSiteAction(BreakpointSite &site,
17771777
if (IsBreakpointSiteEnabled(*site_sp) == (action == BreakpointAction::Enable))
17781778
return llvm::Error::success();
17791779

1780-
if (GetUseDelayedBreakpoints()) {
1780+
if (ShouldUseDelayedBreakpoints()) {
17811781
m_delayed_breakpoints.Enqueue(site_sp, action);
17821782
return llvm::Error::success();
17831783
}

0 commit comments

Comments
 (0)