[Lldb-commits] [PATCH] D29895: Refactor log channel registration mechanism

Zachary Turner via lldb-commits lldb-commits at lists.llvm.org
Mon Feb 13 09:47:10 PST 2017

Is it possible to add some unittests for this? In addition to just
tests=good, it would also serve as documentation for the new api
On Mon, Feb 13, 2017 at 9:09 AM Pavel Labath via Phabricator <
reviews at reviews.llvm.org> wrote:

> labath created this revision.
> Herald added a subscriber: aprantl.
> We currently have two log channel registration mechanisms. One uses a
> set of function pointers and the other one is based on the
> PluginManager.
> The PluginManager dependency is unfortunate, as logging
> is also used in lldb-server, and the PluginManager pulls in a lot of
> classes which are not used in lldb-server.
> Both approach have the problem that they leave too much to do for the
> user, and so the individual log channels end up reimplementing command
> line argument parsing, category listing, etc.
> Here, I replace the PluginManager-based approach with a one. The new API
> is more declarative, so the user only needs to specify the list of list
> of channels, their descriptions, etc., and all the common tasks like
> enabling/disabling categories are hadled by common code. I migrate the
> LogChannelDWARF (only user of the PluginManager method) to the new API.
> In the follow-up commits I'll replace the other channels with something
> similar.
> https://reviews.llvm.org/D29895
> Files:
>   include/lldb/Core/Log.h
>   include/lldb/Core/PluginManager.h
>   include/lldb/lldb-forward.h
>   include/lldb/lldb-private-interfaces.h
>   source/Commands/CommandObjectLog.cpp
>   source/Core/Log.cpp
>   source/Core/PluginManager.cpp
>   source/Plugins/SymbolFile/DWARF/LogChannelDWARF.cpp
>   source/Plugins/SymbolFile/DWARF/LogChannelDWARF.h
>   source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
>   unittests/Core/LogTest.cpp
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20170213/a8895f5d/attachment.html>

More information about the lldb-commits mailing list