[Lldb-commits] [PATCH] D143687: [lldb] Add an SB API to get progress events as SBStructuredData
Med Ismail Bennani via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Thu Feb 9 15:31:53 PST 2023
mib added inline comments.
================
Comment at: lldb/source/API/SBDebugger.cpp:175-186
+ const ProgressEventData *progress_data =
+ ProgressEventData::GetEventDataFromEvent(event.get());
+ if (!progress_data)
+ return {};
+
+ auto dictionary = std::make_unique<StructuredData::Dictionary>();
+ dictionary->AddStringItem("message", progress_data->GetMessage());
----------------
It feels wrong me that we're doing this at the SB API levels, I feel like we should have an overload of `ProgressEventData::GetEventDataFromEvent` that returns an actual structured data dictionary. This way, when we extend the progress events, we won't need to update all the places where `GetEventDataFromEvent` is called from.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D143687/new/
https://reviews.llvm.org/D143687
More information about the lldb-commits
mailing list