[Lldb-commits] [PATCH] D97739: Add a progress class that can track and report long running operations that happen in LLDB.

Jim Ingham via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Mar 5 14:20:34 PST 2021


jingham added a comment.

This way of doing progress is going to look odd in anything that uses multiple debuggers.  If I'm reading the code aright, if I have two debuggers, and a target in Debugger A starts doing something that would cause progress traffic, both debuggers will show activity.  Given that the candidate for progress that is most common is down in SymbolFile, it's going to be hard to fix that.  You'd have to have some way of marking the API boundary from "where you have a Target" to "where you don't have a Target" and record (maybe with TSD) that this target is using this API on this thread...  Then you could use that to send the progress to the right actor.

Note, this is the way Xcode runs lldb, so this isn't a trivial concern.  OTOH, it might be more trouble than it's worth to fix.

However, if this is explicitly a "All Debuggers" feature, it might be better to have callbacks held outside of any debugger, a static method on SBDebugger, perhaps?

I also wonder a little bit why you went with a callback rather than sending progress events?  You wouldn't have had to invent a callback mechanism, then.  Whoever cared about progress events would sign up for the "ProgressEvent" bit on their Debugger, and could do what they like.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D97739



More information about the lldb-commits mailing list