[Lldb-commits] [lldb] [LLDB-DAP] SBDebugger don't prefix title on progress updates (PR #124648)
Jacob Lalonde via lldb-commits
lldb-commits at lists.llvm.org
Tue Jan 28 09:06:50 PST 2025
================
@@ -44,12 +44,16 @@ class ProgressEventData : public EventData {
uint64_t GetCompleted() const { return m_completed; }
uint64_t GetTotal() const { return m_total; }
std::string GetMessage() const {
- std::string message = m_title;
- if (!m_details.empty()) {
- message.append(": ");
- message.append(m_details);
- }
- return message;
+ // Only put the title in the message of the progress create event.
+ if (m_completed == 0) {
+ std::string message = m_title;
+ if (!m_details.empty()) {
+ message.append(": ");
+ message.append(m_details);
+ }
+ return message;
+ } else
+ return !m_details.empty() ? m_details : std::string();
----------------
Jlalond wrote:
> Can we use `SBDebugger::GetProgressDataFromEvent` which returns `SBStructuredData` with all the fields and then construct the message in `lldb-dap`?
This was going to be my alternative proposal. I assumed this wouldn't fly because I didn't know how many consumers need a workflow that doesn't follow the DAP rules. But based on the conversation I had with Greg offline the DAP progress events needs to handle it's own branching. I think the best way is returning a structured data to give us flexibility in the future.
https://github.com/llvm/llvm-project/pull/124648
More information about the lldb-commits
mailing list