llvm-c166/lldb/source
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
..
API [LLDB] Add an API to check whether a variable is writable (#208042) 2026-07-08 15:50:14 -07:00
Breakpoint [lldb] Add comma separator in watchpoint description (#209176) 2026-07-14 08:31:08 +00:00
Commands [lldb/script] Improve scripting extension list output and filtering (#209400) 2026-07-14 15:38:47 -07:00
Core [lldb/script] Improve scripting extension list output and filtering (#209400) 2026-07-14 15:38:47 -07:00
DataFormatters [lldb] TypeCategoryMap: Replace ConstString with StringRef (#208117) 2026-07-10 17:02:12 -07:00
Expression [lldb] Allow generic operands in DWARF binary type check (#209641) 2026-07-14 22:15:26 +00:00
Host [lldb/Host] Add foreground argument to Host::OpenFileInExternalEditor (#209331) 2026-07-13 16:23:38 -07:00
Initialization
Interpreter [lldb/script] Improve scripting extension list output and filtering (#209400) 2026-07-14 15:38:47 -07:00
Plugins [lldb] Prefer DW_AT_bit_size for DW_OP_convert type width (#208478) 2026-07-14 13:39:24 -07:00
Protocol [lldb-mcp] Multiplex across all discovered LLDB instances (#208827) 2026-07-11 23:35:46 +00:00
Symbol [NFC][lldb] Simplify Typelist::GetTypeAtIndex (#208411) 2026-07-09 15:15:07 +01:00
Target [lldb] Allow generic operands in DWARF binary type check (#209641) 2026-07-14 22:15:26 +00:00
Utility [lldb] Gate PolicyStack::Current() log behind verbose (#209527) 2026-07-14 10:54:58 -07:00
ValueObject [LLDB] Add an API to check whether a variable is writable (#208042) 2026-07-08 15:50:14 -07:00
Version
CMakeLists.txt