[Lldb-commits] [PATCH] D143690: [lldb] Add the ability to provide a message to a progress event update

Jonas Devlieghere via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Feb 9 16:00:24 PST 2023


JDevlieghere created this revision.
JDevlieghere added reviewers: clayborg, mib, kastiglione, bulbazord.
Herald added a project: All.
JDevlieghere requested review of this revision.

This patch adds the ability to add a message to a progress event update.

Consider the following example as motivation. Say you have to load symbols for 3 dynamic libraries: `libFoo`, `libBar`, `libBaz`. Currently, there are two ways to report this:

- As 3 separate progress instances. In this case you create a `progress` instance with the message "Loading symbols: libFoo", ""Loading symbols: libBar", and "Loading symbols: libBaz" respectively. If the operations are completely separate, i.e. they belong to different modules, this approach makes sense. This is what we do for parsing the symbol table, loading the dwarf index, etc.
- As 1 progress instance with 3 units of work. This is the preferred approach is you know the number of units of work in advance, because you can report determinate progress. The title would be "Loading symbols" and you call `Progress::Increment` for each of the libraries. Note that with the current design, there's no way to include the name of the libraries, which is what this patch addresses.


https://reviews.llvm.org/D143690

Files:
  lldb/include/lldb/Core/Debugger.h
  lldb/include/lldb/Core/DebuggerEvents.h
  lldb/include/lldb/Core/Progress.h
  lldb/source/Core/Debugger.cpp
  lldb/source/Core/DebuggerEvents.cpp
  lldb/source/Core/Progress.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D143690.496268.patch
Type: text/x-patch
Size: 7673 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20230210/80e6a2e0/attachment.bin>


More information about the lldb-commits mailing list