[Lldb-commits] [lldb] [lldb][progress][NFC] Add groundwork to keep track of progress reports (PR #81026)
Chelsea Cassanova via lldb-commits
lldb-commits at lists.llvm.org
Wed Feb 7 15:18:39 PST 2024
================
@@ -99,6 +105,10 @@ class Progress {
private:
void ReportProgress();
static std::atomic<uint64_t> g_id;
+ static std::atomic<uint64_t> g_refcount;
+ /// Map that tracks each progress object and if we've seen its start and stop
+ /// events
+ static std::unordered_map<std::string, uint64_t> g_map;
----------------
chelcassanova wrote:
Having the debugger instance keep track of a map of progress reports falls in line with what I spoke about with Ismail offline and is the direction I'd vote to go in so that the bookkeeping isn't done in the progress objects (I'm sure this isn't impossible, but given that LLDB is hierarchical it would make more sense that debuggers have progress reports rather than progress reports looking after themselves).
So we still want to keep `is_debugger_specific`/ having a debugger pointer in a progress object, but do all the bookkeeping in all active debuggers and using that debugger pointer to only update the specific reports as needed if I'm understanding your approach correctly.
https://github.com/llvm/llvm-project/pull/81026
More information about the lldb-commits
mailing list