================
@@ -64,4 +66,48 @@ llvm::json::Value toJSON(const MemoryEventBody &MEB) {
       {"count", MEB.count}};
 }
 
+static llvm::json::Value toJSON(const StopReason &SR) {
+  switch (SR) {
+  case eStopReasonEmpty:
+    return "";
+  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";
+  }
+}
+
+llvm::json::Value toJSON(const StoppedEventBody &SEB) {
----------------
DrSergei wrote:

Maybe add assert that `SEB.reason` is not `eStopReasonEmpty`

https://github.com/llvm/llvm-project/pull/176273
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to