[Lldb-commits] [lldb] [lldb-dap] Including more detailed exception information. (PR #176273)

John Harrison via lldb-commits lldb-commits at lists.llvm.org
Fri Jan 16 10:58:36 PST 2026


================
@@ -64,4 +66,49 @@ llvm::json::Value toJSON(const MemoryEventBody &MEB) {
       {"count", MEB.count}};
 }
 
+static llvm::json::Value toJSON(const StopReason &SR) {
+  switch (SR) {
+  case eStopReasonStep:
+    return "step";
+  case eStopReasonBreakpoint:
+    return "breakpoint";
+  case eStopReasonException:
+    return "exception";
+  case eStopReasonPause:
+    return "pause";
+  case eStopReasonEntry:
+    return "entry";
+  case eStopReasonGoto:
+    return "goto";
+  case eStopReasonFunctionBreakpoint:
+    return "function breakpoint";
+  case eStopReasonDataBreakpoint:
+    return "data breakpoint";
+  case eStopReasonInstructionBreakpoint:
+    return "instruction breakpoint";
+  case eStopReasonInvalid:
+    llvm_unreachable("invalid stop reason");
+    break;
+  }
----------------
ashgti wrote:

This is the `lldb_dap::protocol::StopReason` stop reason, not the `lldb::StopReason`, the invalid one would mean the code did not set a stop reason, which indicates an internal logic error.

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


More information about the lldb-commits mailing list