================
@@ -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
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to