[Lldb-commits] [lldb] [lldb][progress] Hook up new broadcast bit and progress manager (PR #83069)
Jonas Devlieghere via lldb-commits
lldb-commits at lists.llvm.org
Mon Feb 26 14:23:31 PST 2024
================
@@ -97,12 +98,32 @@ 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
+ /// ProgressManager::ReportProgress. In addition to the Progress member fields
+ /// this also passes the debugger progress broadcast bit. Using the progress
+ /// category bit indicates that the given progress report is the initial or
+ /// final report for its category.
+ struct ProgressData {
+ std::string title;
+ std::string details;
+ uint64_t progress_id;
+ uint64_t completed;
+ uint64_t total;
+ std::optional<lldb::user_id_t> debugger_id;
+ uint32_t progress_broadcast_bit;
+ };
+
private:
+ friend class Debugger;
void ReportProgress();
static std::atomic<uint64_t> g_id;
- /// The title of the progress activity.
+ /// The title of the progress activity, also used as a category to group
+ /// reports.
std::string m_title;
+ /// More specific information about the current file being displayed in the
+ /// report.
std::string m_details;
+ /// Mutex for synchronization.
std::mutex m_mutex;
/// A unique integer identifier for progress reporting.
----------------
JDevlieghere wrote:
Given that you store the ProgressData, did you mean to document the fields in the new Struct and remove these?
https://github.com/llvm/llvm-project/pull/83069
More information about the lldb-commits
mailing list