[Lldb-commits] [lldb] [lldb][windows] Keep int3 breakpoints inside the debugger on lldb-server (PR #197669)

via lldb-commits lldb-commits at lists.llvm.org
Thu May 14 06:00:06 PDT 2026


================
@@ -564,7 +564,18 @@ NativeProcessWindows::OnDebugException(bool first_chance,
       return ExceptionResult::BreakInDebugger;
     }
 
-    [[fallthrough]];
+    // 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.
+    std::string desc =
+        formatv("Exception {0} encountered at address {1}",
+                llvm::format_hex(record.GetExceptionCode(), 8),
+                llvm::format_hex(record.GetExceptionAddress(), 8))
----------------
Nerixyz wrote:

It's not well documented in the programmer's manual, but you can use `{0:x8}` to specify the number of digits.
I always need to search this up. The reference is here: https://github.com/llvm/llvm-project/blob/c5695b8f60a57caa46491ce78c7be9e336ad7fe9/llvm/include/llvm/Support/FormatProviders.h#L96-L102

https://github.com/llvm/llvm-project/pull/197669


More information about the lldb-commits mailing list