Skip to content

Commit f5eb7a9

Browse files
[lldb] Disable delayed breakpoints on Windows (#195241)
Tests started failing on a mysterious way there, potentially related to: #191222
1 parent 21de0fb commit f5eb7a9

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
@@ -2310,6 +2310,13 @@ class Process : public std::enable_shared_from_this<Process>,
23102310

23112311
bool IsBreakpointSitePhysicallyEnabled(const BreakpointSite &site);
23122312

2313+
/// Reports whether this process should delay physically enabling/disabling
2314+
/// breakpoints until the process is about to resume. The default honors the
2315+
/// user-facing `target.process.use-delayed-breakpoints` setting.
2316+
virtual bool ShouldUseDelayedBreakpoints() const {
2317+
return GetUseDelayedBreakpoints();
2318+
}
2319+
23132320
// BreakpointLocations use RemoveConstituentFromBreakpointSite to remove
23142321
// themselves from the constituent's list of this breakpoint sites.
23152322
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
@@ -1601,7 +1601,7 @@ llvm::Error Process::ExecuteBreakpointSiteAction(BreakpointSite &site,
16011601
if (IsBreakpointSiteEnabled(*site_sp) == (action == BreakpointAction::Enable))
16021602
return llvm::Error::success();
16031603

1604-
if (GetUseDelayedBreakpoints()) {
1604+
if (ShouldUseDelayedBreakpoints()) {
16051605
m_delayed_breakpoints.Enqueue(site_sp, action);
16061606
return llvm::Error::success();
16071607
}

0 commit comments

Comments
 (0)