[Lldb-commits] [lldb] [lldb-dap] Refactoring IOStream into Transport handler. (PR #130026)

John Harrison via lldb-commits lldb-commits at lists.llvm.org
Thu Mar 6 15:02:12 PST 2025


================
@@ -1526,7 +1526,8 @@ static void addStatistic(lldb::SBTarget &target, llvm::json::Object &event) {
     const char *key = keys.GetStringAtIndex(i);
     FilterAndGetValueForKey(statistics, key, stats_body);
   }
-  event.try_emplace("statistics", std::move(stats_body));
+  llvm::json::Object body{{"$__lldb_statistics", std::move(stats_body)}};
+  event.try_emplace("body", std::move(body));
----------------
ashgti wrote:

Since I am serializing to `protocol::Message` the unknown field is dropped, so I'd either need to put a `statistics` field on `protocol::Event` or I'd need to move the stats to the body.

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


More information about the lldb-commits mailing list