[Lldb-commits] [lldb] [lldb][Windows] ignore loader breakpoints in system modules (PR #208233)
Charles Zablit via lldb-commits
lldb-commits at lists.llvm.org
Wed Jul 22 03:52:16 PDT 2026
================
@@ -293,8 +297,12 @@ Status ProcessWindows::DoDestroy() {
Status ProcessWindows::DoHalt(bool &caused_stop) {
StateType state = GetPrivateState();
- if (state != eStateStopped)
- return HaltProcess(caused_stop);
+ if (state != eStateStopped) {
+ m_pending_halt = true;
----------------
charles-zablit wrote:
On Windows there's no SIGSTOP to pause a debuggee. To pause a running process from the debugger `DebugBreakProcess()` is used. It works by injecting a new thread into the target process that executes an `int3` instruction. The `int3` causes an `EXCEPTION_BREAKPOINT`.
`EXCEPTION_BREAKPOINT` is ambiguous because it can mean either of the following, without side data to differentiate them:
- Did the debuggee hit a breakpoint lldb set?: real stop, report it.
- Is this the loader's startup int3?: ignore it.
- Is this the artificial int3 lldb just injected to implement `Halt/Interrupt`? it's not a "real" breakpoint at all, ignore it.
`m_expecting_loader_int3` resolves the 2nd case.
`m_pending_halt` resolves the 3rd case.
https://github.com/llvm/llvm-project/pull/208233
More information about the lldb-commits
mailing list