Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def test_terminated_event(self):
self.continue_to_breakpoints(breakpoint_ids)
self.continue_to_exit()

statistics = self.dap_server.wait_for_terminated()["statistics"]
statistics = self.dap_server.wait_for_terminated()["body"]["$__lldb_statistics"]
self.assertGreater(statistics["totalDebugInfoByteSize"], 0)
self.assertGreater(statistics["totalDebugInfoEnabled"], 0)
self.assertGreater(statistics["totalModuleCountHasDebugInfo"], 0)
Expand Down
3 changes: 2 additions & 1 deletion lldb/tools/lldb-dap/JSONUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}

llvm::json::Object CreateTerminatedEventObject(lldb::SBTarget &target) {
Expand Down