llvm-c166/lldb/source/Core
Med Ismail Bennani 514b75bbc5
[lldb/script] Improve scripting extension list output and filtering (#209400)
This patch improves `scripting extension list` in three ways.

First, it groups the output by `ScriptedExtension`: instead of one row
per registered plugin instance, one entry per extension is printed with
a combined `Language` field.

Second, it colorizes and visually separates the output. Each entry is
preceded by a dimmed dashed separator; field labels are printed in bold
green, the extension name value in bold cyan as a mini-heading, and
`None` usage values are dimmed, all via the same
`ansi::FormatAnsiTerminalCodes(..., use_color)` idiom
`Breakpoint::GetDescription` uses elsewhere, gracefully no-op when color
is disabled or unsupported. `ScriptedInterfaceUsages::Dump` takes an
optional `use_color` parameter so its own `API Usages:` / `Command
Interpreter Usages:` labels can match.

Third, it adds `-j`/`--json` to emit a JSON array of `{name,
description, languages, api_usages, command_interpreter_usages}` per
extension, mirroring `plugin list`'s existing `-j`. `DoExecute` now
computes the extension grouping once and branches into
`OutputJsonFormat` or `OutputTextFormat`, sharing a
`GetLanguagesForExtension` helper. It also accepts optional positional
`<extension-name>` arguments to filter the listing to specific
extensions (matched via the same case-insensitive
`ScriptInterpreter::StringToExtension` used by `scripting extension
generate`), with completion wired up via `eScriptedExtensionCompletion`.

Also fix a latent lifetime bug in the shared language-collection helper
so it owns its `std::string` values instead of holding `StringRef`s to
temporaries; the JSON path made it observable.

Signed-off-by: Med Ismail Bennani <ismail@bennani.ma>
2026-07-14 15:38:47 -07:00
..
Address.cpp [lldb] Remove ConstString getters from FileSpec (#206802) 2026-06-30 14:44:20 -07:00
AddressRange.cpp [lldb] Remove ConstString getters from FileSpec (#206802) 2026-06-30 14:44:20 -07:00
AddressRangeListImpl.cpp
AddressResolver.cpp
AddressResolverFileLine.cpp [lldb] Remove ConstString getters from FileSpec (#206802) 2026-06-30 14:44:20 -07:00
CMakeLists.txt [lldb] Move Diagnostics from Utility to Core (NFC) (#206152) 2026-06-26 20:08:23 +00:00
Communication.cpp
CoreProperties.td [lldb] Add tab-mode to autosuggestion feature (#206728) 2026-06-30 16:42:24 +01:00
DataFileCache.cpp [lldb] Edits and clarifications to DataFileCache comments, NFC (#199787) 2026-05-27 14:33:54 -07:00
Debugger.cpp [lldb] Return llvm::Error from EnableLogChannel (#206479) 2026-07-01 14:59:55 +01:00
DebuggerEvents.cpp
Declaration.cpp [lldb] Remove ConstString getters from FileSpec (#206802) 2026-06-30 14:44:20 -07:00
DemangledNameInfo.cpp
Diagnostics.cpp [lldb] Collect a diagnostics bundle on the Diagnostics class (#206189) 2026-06-29 13:09:32 -07:00
Disassembler.cpp [lldb] Remove ConstString getters from FileSpec (#206802) 2026-06-30 14:44:20 -07:00
DumpDataExtractor.cpp [lldb][Utility] Remove address size from Stream class (NFC) (#190375) 2026-04-03 21:36:52 +03:00
DumpRegisterInfo.cpp [lldb] Move RegisterFlags from Target to Utility (#206861) 2026-07-01 18:30:32 +00:00
DumpRegisterValue.cpp [lldb] Correct alignment of register fields (#209140) 2026-07-13 11:22:09 +00:00
DynamicLoader.cpp Fix ProcessElfCore::FindModuleUUID() so it work with symlinks. (#206601) 2026-06-30 10:44:00 -07:00
EmulateInstruction.cpp [lldb] Use Expected in BreakpointLocationPredictor (#197730) 2026-05-15 07:19:51 +00:00
FileLineResolver.cpp [lldb] Remove ConstString getters from FileSpec (#206802) 2026-06-30 14:44:20 -07:00
FormatEntity.cpp [lldb] Remove ConstString getters from FileSpec (#206802) 2026-06-30 14:44:20 -07:00
Highlighter.cpp
IOHandler.cpp [lldb] Add tab-mode to autosuggestion feature (#206728) 2026-06-30 16:42:24 +01:00
IOHandlerCursesGUI.cpp [lldb] Remove ConstString getters from FileSpec (#206802) 2026-06-30 14:44:20 -07:00
Mangled.cpp [lldb] Remove unused MemorySize methods (NFC) (#205463) 2026-06-24 13:57:25 -07:00
Module.cpp [lldb] Remove ConstString getters from FileSpec (#206802) 2026-06-30 14:44:20 -07:00
ModuleChild.cpp
ModuleList.cpp [lldb] Remove ConstString getters from FileSpec (#206802) 2026-06-30 14:44:20 -07:00
Opcode.cpp
PluginManager.cpp [lldb/script] Improve scripting extension list output and filtering (#209400) 2026-07-14 15:38:47 -07:00
Progress.cpp
ProtocolServer.cpp
RichManglingContext.cpp
SafeAutoloadPaths.inc.in [lldb] Add mechanism for auto-loading Python scripts from pre-configured paths (#187031) 2026-03-21 00:22:34 +00:00
SearchFilter.cpp [lldb] Remove ConstString getters from FileSpec (#206802) 2026-06-30 14:44:20 -07:00
Section.cpp [lldb] Remove ConstString from SectionList::FindSectionByName (#207296) 2026-07-06 13:29:08 -07:00
SourceLocationSpec.cpp
SourceManager.cpp [lldb] Find the default source file's main by base name (#207043) 2026-07-01 15:58:21 -07:00
Statusline.cpp [lldb] Recompute the statusline on resize without clearing the screen (#202691) 2026-06-15 08:44:50 -07:00
StreamAsynchronousIO.cpp [lldb][Utility] Remove address size from Stream class (NFC) (#190375) 2026-04-03 21:36:52 +03:00
Telemetry.cpp
ThreadedCommunication.cpp
UserSettingsController.cpp [LLDB] Include components of settings paths in apropos search (#194873) 2026-05-18 09:54:14 +01:00
Value.cpp