mirror of
https://github.com/siemens-mobile-hacks/llvm-c166.git
synced 2026-11-26 06:28:13 +00:00
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>
|
||
|---|---|---|
| .. | ||
| accelerator/mock | ||
| android/platform | ||
| api | ||
| arm | ||
| assert_messages_test | ||
| clear-sbvalue-nonaddressable-bits | ||
| commands | ||
| debuginfod | ||
| driver | ||
| functionalities | ||
| iohandler | ||
| lang | ||
| linux | ||
| lldbutil-tests/failed-to-hit-breakpoint | ||
| lua_api | ||
| macosx | ||
| pointer-nonaddressable-bits | ||
| python_api | ||
| qemu | ||
| repl/clang | ||
| riscv | ||
| sample_test | ||
| sanity | ||
| source-manager | ||
| symbol_ondemand | ||
| symstore | ||
| terminal | ||
| test_runner/test | ||
| test_utils | ||
| tools | ||
| types | ||
| windows | ||
| CMakeLists.txt | ||
| dotest.py | ||
| get_darwin_real_python.py | ||
| lit.cfg.py | ||
| lit.site.cfg.py.in | ||
| lldbtest.py | ||
| use_lldb_suite.py | ||