[Lldb-commits] [lldb] [lldb][Windows] Surface DebugBreakProcess Halt() as a SIGSTOP signal stop (PR #201885)
Charles Zablit via lldb-commits
lldb-commits at lists.llvm.org
Mon Jun 8 09:39:58 PDT 2026
================
@@ -581,6 +586,33 @@ NativeProcessWindows::HandleBreakpointException(const ExceptionRecord &record) {
// Any remaining STATUS_BREAKPOINT is a breakpoint instruction in the
// program's own code (e.g. `__debugbreak()` or `__builtin_debugtrap()`).
// Stop the debugger and let the user decide what to do.
+ if (m_pending_halt) {
+ LLDB_LOG(log,
+ "DebugBreakProcess injection treated as Halt SIGSTOP for tid "
+ "{0:x}",
+ thread_id);
+ m_pending_halt = false;
+ ThreadStopInfo signal_info;
+ signal_info.reason = StopReason::eStopReasonSignal;
+ signal_info.signo = 19; // SIGSTOP on POSIX
+
+ // Halt all threads at the kernel level.
+ for (uint32_t i = 0; i < m_threads.size(); ++i) {
+ auto t = static_cast<NativeThreadWindows *>(m_threads[i].get());
+ if (t->DoStop().Fail())
+ exit(1);
----------------
charles-zablit wrote:
Good call. Fixed, thanks!
https://github.com/llvm/llvm-project/pull/201885
More information about the lldb-commits
mailing list