================ @@ -97,27 +98,44 @@ class Progress { /// Used to indicate a non-deterministic progress report static constexpr uint64_t kNonDeterministicTotal = UINT64_MAX; + /// Use a struct to send data from a Progress object to + /// the progress manager. + struct ProgressData { + /// The title of the progress activity, also used as a category to group + /// reports. + std::string title; + /// More specific information about the current file being displayed in the + /// report. + std::string details; + /// A unique integer identifier for progress reporting. + uint64_t progress_id; + /// How much work ([0...m_total]) that has been completed. + uint64_t completed; + /// Total amount of work, use a std::nullopt in the constructor for non + /// deterministic progress. + uint64_t total; + /// The optional debugger ID to report progress to. If this has no value + /// then all debuggers will receive this event. + std::optional<lldb::user_id_t> debugger_id; + }; + private: + friend class Debugger; void ReportProgress(); static std::atomic<uint64_t> g_id; - /// The title of the progress activity. std::string m_title; std::string m_details; ---------------- JDevlieghere wrote:
You're still storing the same fields as in `ProgressData`. You should only have the latter and initialize the progress data in the constructor. https://github.com/llvm/llvm-project/pull/83069 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits