[Lldb-commits] [lldb] [lldb][progress] Add discrete boolean flag to progress reports (PR #69516)
Greg Clayton via lldb-commits
lldb-commits at lists.llvm.org
Thu Nov 30 13:50:22 PST 2023
================
@@ -63,13 +68,30 @@ class Progress {
///
/// @param [in] title The title of this progress activity.
///
+ /// @param [in] report_type Enum value indicating how the progress is being
+ /// reported. Progress reports considered "aggregate" are reports done for
+ /// operations that may happen multiple times during a debug session.
+ ///
+ /// For example, when a debug session is first started it needs to parse the
+ /// symbol tables for all files that were initially included and this
+ /// operation will deliver progress reports. If new dSYMs are added later
+ /// during the session then these will also be parsed and deliver more
+ /// progress reports. This type of operation would use the
+ /// eAggregateProgressReport enum. Using this enum would allow these progress
+ /// reports to be grouped together as one, even though their reports are
+ /// happening individually.
+ ///
/// @param [in] total The total units of work to be done if specified, if
/// set to UINT64_MAX then an indeterminate progress indicator should be
/// displayed.
///
/// @param [in] debugger An optional debugger pointer to specify that this
/// progress is to be reported only to specific debuggers.
- Progress(std::string title, uint64_t total = UINT64_MAX,
+ ///
+ Progress(std::string title,
+ ProgressReportType report_type =
+ ProgressReportType::eNonAggregateProgressReport,
+ uint64_t total = UINT64_MAX,
----------------
clayborg wrote:
Since we are modifying the API a bit, it might be nice to start using a `std::optional<uint64_t> total` for the parameter and for the instance variable to make things clear and avoid people having to specify `UINT64_MAX` (they can use `std::nullopt`).
https://github.com/llvm/llvm-project/pull/69516
More information about the lldb-commits
mailing list