Communitygithub.com

cli-anything-lldb (LLDBデバッグCLIスキル)

LLDB Python API を使用したステートフルなLLDBデバッグワークフローをJSON出力で実行するためのCLIスキルです。

cli-anything-lldb (LLDBデバッグCLIスキル) とは?

このスキルは、AIエージェント(Claude Code、Cursor、Codexなど)がLLDBデバッガをプログラム的に制御できるようにするCLIツールです。LLDB Python APIを活用し、JSON形式で構造化された出力を提供するため、AIによる解析が容易です。デバッグターゲットの作成、プロセスの起動・アタッチ、ブレークポイント管理、スレッド・フレームの調査、式評価、メモリ読み取り・検索、コアダンプの読み込みなど、主要なデバッグ機能を網羅しています。さらに、DAP(Debug Adapter Protocol)サーバーモードを備えており、AIクライアントやエディタから完全なデバッグアダプタライフサイクルを利用できます。セッションは永続的で、複数のCLI呼び出し間で状態を維持するため、対話的なデバッグが可能です。

対応~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/HKUDS/CLI-Anything/tree/main/skills/cli-anything-lldb

お気に入りのAIに質問する

このエージェントスキルを事前に読み込んだ状態で新しいチャットを開きます。

ドキュメント

LLDB CLIスキル

このCLIを使用して、JSON出力付きの構造化LLDBデバッグワークフローを実行します。

機能

  • 実行可能ファイルパスからデバッグターゲットを作成
  • プロセスの起動、またはPID/名前によるアタッチ
  • ブレークポイントの管理(設定/一覧表示/削除/有効化/無効化)
  • スレッド、フレーム、ローカル変数、バックトレースの調査
  • 現在のフレームでの式評価
  • プロセスメモリの読み取り/検索
  • コアダンプの読み込み
  • 永続的セッション状態を持つ対話型REPL
  • AI/エディタクライアント向けの正式なstdio Debug Adapter Protocolサーバー

クイックコマンド

cli-anything-lldb --json target create --exe /path/to/exe
cli-anything-lldb --json process launch --arg foo --arg bar
cli-anything-lldb --json breakpoint set --function main
cli-anything-lldb --json breakpoint set --function PluginEntry --allow-pending
cli-anything-lldb --json process continue
cli-anything-lldb --json process interrupt
cli-anything-lldb --json thread backtrace --limit 20
cli-anything-lldb --json frame locals
cli-anything-lldb --json expr "myVar"
cli-anything-lldb --json memory read --address 0x1000 --size 64
cli-anything-lldb --json session close

Debug Adapter Protocol

AIクライアントが個別のCLIコマンドをシェルアウトする代わりに、実際のデバッグアダプタライフサイクルを必要とする場合は、DAPエントリポイントを使用します:

cli-anything-lldb-dap
cli-anything-lldb-dap --profile /path/to/stop-rules.json

または:

cli-anything-lldb dap
cli-anything-lldb dap --profile /path/to/stop-rules.json

DAPサーバーはstdio Content-Length フレームを使用し、排他的にstdoutを使用する必要があります。その周辺でログをstdoutに出力しないでください。サポートされているリクエストには、initialize、launch、attach、configurationDone、setBreakpoints、setFunctionBreakpoints、threads、stackTrace、scopes、variables、setVariable、evaluate、continue、pause、next、stepIn、stepOut、source、loadedSources、readMemory、modules、exceptionInfo、disassemble、disconnect が含まれます。

DAP変数は、構造体/クラス/配列の子参照を公開できます。setVariable は停止中のみ使用してください。最適化により除去された値や読み取り専用の値に対して、LLDBは書き込みを拒否する場合があります。

長時間実行されるGUIデバッグ対象の場合、DAP continue はクライアントから見て非ブロッキングです:アダプタは最初にレスポンスと continued イベントを送信し、その後バックグラウンドスレッドでLLDBを待機します。DAP pause はLLDB非同期割り込みを使用します。エージェントがデバッグ対象の実行中にブレークポイントを変更する必要がある場合、アダプタは最初に割り込みをかけ、停止状態を待ってからLLDBブレークポイントを変更します。対象が時間内に停止しない場合は、明示的な pause/stopped サイクルの後に再試行してください。

デバッガ内部の起動時やシェーダーJITブレークポイントで停止するGUIアプリの場合、launch および attach は非標準のブール引数 autoContinueInternalBreakpoints を受け入れます。これらの内部停止がタスクにとってノイズである場合にのみ有効にしてください。アダプタは自動継続の前に output イベントを発行します。ターゲット固有のノイズに対しては、インライン stopRules または外部の stopRuleProfile/--profile JSONファイルによる構造化された停止ルールを推奨します。ルールは reason、module、function、または regex で一致し、明確な cliAnythingStop.origin メタデータとともに stop するか、自動的に continue できます。C4Dなどのアプリでは、NVIDIAシェーダーJIT/起動トラップが汎用アダプタの外部に存在するようにプロファイルを使用します。

DAP stopped イベントには、body.cliAnythingStop.origin が含まれます:クライアントの一時停止リクエストの場合は manualPause、一致した内部ルールの場合は internalTrap、通常のプログラム停止の場合は debuggee。既存の cli-anything-lldb-dap プロセスは新しいコードやプロファイルの内容をホットロードしません。新しいルールを適用する前に、アダプタを再起動して再アタッチまたは再起動してください。

コマンドグループ

target

cli-anything-lldb --json target create --exe /path/to/exe [--arch x86_64]
cli-anything-lldb --json target info

process

cli-anything-lldb --json process launch [--arg ARG ...] [--env KEY=VALUE ...] [--cwd DIR] [--stop-at-entry]
cli-anything-lldb --json process attach --pid 1234
cli-anything-lldb --json process attach --name myapp --wait-for
cli-anything-lldb --json process continue
cli-anything-lldb --json process interrupt
cli-anything-lldb --json process detach
cli-anything-lldb --json process info

breakpoint

cli-anything-lldb --json breakpoint set --function main
cli-anything-lldb --json breakpoint set --file main.c --line 42 --condition "i > 10"
cli-anything-lldb --json breakpoint set --function LateLoadedSymbol --allow-pending
cli-anything-lldb --json breakpoint list
cli-anything-lldb --json breakpoint delete --id 1
cli-anything-lldb --json breakpoint enable --id 1
cli-anything-lldb --json breakpoint disable --id 1

thread / frame / step

cli-anything-lldb --json thread list
cli-anything-lldb --json thread select --id 11111
cli-anything-lldb --json thread backtrace --limit 50
cli-anything-lldb --json frame select --index 0
cli-anything-lldb --json frame info
cli-anything-lldb --json frame locals
cli-anything-lldb --json step over
cli-anything-lldb --json step into
cli-anything-lldb --json step out

expr / memory / core

cli-anything-lldb --json expr "argc"
cli-anything-lldb --json memory read --address 0x1000 --size 128
cli-anything-lldb --json memory find "needle" --start 0x1000 --size 4096
cli-anything-lldb --json core load --path /path/to/core

エージェント使用上の注意

  • すべての自動化フローでは --json を推奨します。
  • REPL以外の呼び出しは、デフォルトで永続的なセッションデーモンを共有します。
  • --session-file PATH または CLI_ANYTHING_LLDB_SESSION_FILE を使用して、タスクの明示的なセッションを固定します。
  • 終了時に cli-anything-lldb --json session close を実行して、アタッチされたプロセスをデタッチし、起動されたデバッグ対象をクリーンアップします。
  • 人間のような対話型シェルがより便利な場合にREPLを使用します。永続性が必要だからではありません。
  • 未解決のCLIブレークポイントはデフォルトで失敗します。将来のモジュール/シンボルロードが予想される場合にのみ --allow-pending を渡します。
  • DAP未解決ブレークポイントはプロトコルセマンティクスを使用します:解決されるまで verified: false。
  • 長時間実行されるGUIプロセスの場合、DAP continue は非ブロッキングで、DAP pause は非同期割り込みを使用します。
  • アクティブな継続中のDAPブレークポイント変更は、最初に割り込みをかけ、停止状態を待ってからLLDBを変更します。
  • アプリ固有の内部トラップにはDAP停止ルールプロファイルを使用します。プロファイルの変更後は再起動して再アタッチ/再起動します。
  • memory find はチャンクスキャンを使用し、呼び出しごとに最大1 MiBに制限されています。
  • プロセスまたはコアコマンドの前に target create を呼び出します。
  • 構造化エラーを想定します:{"error": "...", "type": "..."}

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

cli-anything-adguardhome

>-

cli-anything-anygen

>-

cli-anything-audacity

>-

cli-anything-blender

>-

cli-anything-browser

Browser automation CLI using DOMShell MCP server. Maps Chrome

cli-anything-calibre

>-

cli-anything-ccswitch

CLI interface for CC Switch — manage AI coding tool configurations from the terminal

cli-anything-chromadb

>-

cli-anything-cloudanalyzer

Command-line interface for CloudAnalyzer — Agent-friendly harness for CloudAnalyzer, a QA platform for mapping, localization, and perception outputs. Supports 27 commands across 8 groups: point cloud evaluation, trajectory evaluation, ground segmentation QA, config-driven quality gates, baseline evolution, processing, visualization, and interactive REPL.

cli-anything-cloudcompare

Command-line interface for CloudCompare — Agent-friendly harness for CloudCompare, the open-source 3D point cloud and mesh processing software. Supports 41 commands across 9 groups: project management, session control, point cloud operations (subsample, filter, segment, analyze), mesh operations, distance computation (C2C, C2M), transformations (ICP, matrix), export (LAS/LAZ/PLY/PCD/OBJ/STL/E57), and interactive REPL.

cli-anything-comfyui

>-

cli-anything-dify-workflow

Wrapper for the Dify workflow DSL CLI. Create, inspect, validate, edit, and export Dify workflow files through a CLI-Anything harness.

cli-anything-drawio

>-

cli-anything-eez-studio

Use EEZ Studio from the command line: inspect and modify native .eez-project files, edit LVGL screens/widgets, manage SCPI commands, and invoke the real EEZ Studio backend for LVGL builds.

cli-anything-eth2-quickstart

>-

cli-anything-exa

>-

cli-anything-firefly-iii

Firefly III CLI - Personal finance management via CLI-Anything

cli-anything-freecad

Complete CLI harness for FreeCAD parametric 3D CAD modeler (258 commands). Covers ALL workbenches: Part (29 primitives + boolean + mirror + loft + sweep), Sketcher (26 cmds: geometry + constraints + editing), PartDesign (38 cmds: pad/pocket/groove/fillet/chamfer/patterns/hole/datum), Assembly (11 cmds), Mesh (16 cmds), TechDraw (15 cmds: views + dimensions + PDF/SVG), Draft (33 cmds: 2D shapes + arrays + transforms), FEM (12 cmds), CAM/CNC (10 cmds), Surface (6 cmds), Spreadsheet (7 cmds), Import (13 formats), Export (17 formats), Measure (12 cmds), Materials (21 presets). Headless FreeCAD export to STEP/IGES/STL/OBJ/DXF/PDF/glTF/3MF.

cli-anything-gimp

>-

cli-anything-godot

>-

関連スキル