clayborg added a comment.

This version should address all comments and issue that I am aware of. Now the 
callbacks are registered with each debugger and the Progress class no longer 
has any global state. The Progress class calls a static method on the debugger 
which allows the Debugger class to iterate over the global debugger list and 
report progress to any debuggers that have callbacks. This also means that 
later we can modify the Progress class to allow debugger specific progress 
notifications by modifying the Progress class to take a debugger ID or pointer 
as an optional constructor argument and then that progress can be reported to 
only that debugger instance. I don't have any places I need this yet, so I 
haven't added support for it.



================
Comment at: lldb/include/lldb/Core/Progress.h:106
+  /// Total amount of work, llvm::None for non deterministic progress.
+  const uint64_t m_total;
+  /// Set to true when progress has been reported where m_completed == m_total
----------------
Using llvm::Optional was too messy. I tried, but since the callback requires a 
completed amount and total to be supplied at all times, it was much easier and 
cleaner to use UINT64_MAX since that would need to be sent anyway.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D97739/new/

https://reviews.llvm.org/D97739

_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to