================ @@ -35,14 +59,47 @@ static void ProgressEventThreadFunction(DAP &dap) { done = true; } } else { - uint64_t progress_id = 0; - uint64_t completed = 0; - uint64_t total = 0; - bool is_debugger_specific = false; - const char *message = lldb::SBDebugger::GetProgressFromEvent( - event, progress_id, completed, total, is_debugger_specific); - if (message) - dap.SendProgressEvent(progress_id, message, completed, total); + lldb::SBStructuredData data = + lldb::SBDebugger::GetProgressDataFromEvent(event); + + const uint64_t progress_id = + GetUintFromStructuredData(data, "progress_id"); + const uint64_t completed = GetUintFromStructuredData(data, "completed"); + const uint64_t total = GetUintFromStructuredData(data, "total"); + const std::string details = + GetStringFromStructuredData(data, "details"); + + if (completed == 0) { + if (total == 1) { ---------------- clayborg wrote:
Reading the internal Progress.h and Progress.cpp, this value should be reported as ``` static constexpr uint64_t kNonDeterministicTotal = UINT64_MAX; ``` This test must not be working then or this code is never executed? We really should add a function to `SBProgress`: ``` bool SBProgress::IsDeterministic(); ``` Or "total" should not be in the structured data if it isn't deterministic. https://github.com/llvm/llvm-project/pull/124648 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits