[Lldb-commits] [PATCH] D119131: [lldb] List platform plugin *instances* in "platform list"

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Feb 7 04:57:23 PST 2022


labath created this revision.
labath added reviewers: jingham, clayborg, JDevlieghere.
labath requested review of this revision.
Herald added a project: LLDB.

Following up on the discussion on the mailing list
https://discourse.llvm.org/t/multiple-platforms-with-the-same-name/59594,
this patch is the first of the series meant to bring more structure into
our handling of platform plugins and their instances.

It enhances the "platform list" command so that it gives a more
complete picture of the state of the debugger. In addition to listing
the available plugins (the current behavior), it also prints a list of
active instances to each plugin type. Currently, its main effect is to
illustrate the current nonsensical behavior of creating multiple plugin
instances with identical names, but once this is fixed (in subsequent
patches), the command output will be more sensible, and the command
itself can be then used to test the effects of other commands.

This patch also removes the registration of a host macos platform
plugin. The plugin could never be instantiated (host platform is created
at startup), none of the other platform plugins register a noop
platform, and its presence was messing up the command output.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D119131

Files:
  lldb/source/Commands/CommandObjectPlatform.cpp
  lldb/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp
  lldb/source/Plugins/Platform/MacOSX/PlatformMacOSX.h
  lldb/test/API/commands/platform/basic/TestPlatformCommand.py
  lldb/test/Shell/Commands/command-platform-list.test

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D119131.406402.patch
Type: text/x-patch
Size: 6041 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20220207/5aa1d657/attachment.bin>


More information about the lldb-commits mailing list