본문으로 건너뛰기
Skillpedia
테스트58k · #3219

cli-anything-lldb

하는 일

이 스킬은 컴파일된 프로그램의 문제를 찾는 도구인 LLDB로 디버깅 세션을 실행하게 합니다. 코드를 단계별로 살펴보고 무슨 일이 일어나는지 확인해야 하는 개발자를 위한 스킬입니다.

사용하는 경우

  • ✓프로그램이 충돌해서 백트레이스와 변수를 보고 싶을 때.
  • ✓중단점을 설정하고 코드를 단계별로 실행하고 싶을 때.
  • ✓코어 덤프를 불러와 살펴보고 싶을 때.

스킬 링크

https://github.com/HKUDS/CLI-Anything/blob/main/lldb/agent-harness/cli_anything/lldb/skills/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/HKUDS/CLI-Anything/blob/main/lldb/agent-harness/cli_anything/lldb/skills/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“LLDB에서 제 프로그램을 실행하고, main에 중단점을 설정한 뒤, 멈췄을 때 백트레이스를 보여 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

스킬은 LLDB Python 인터페이스를 사용해 명령 사이에 디버깅 세션을 유지하고, 결과를 JSON으로 돌려줍니다. 편집기와 AI 클라이언트를 위한 디버그 어댑터로도 실행할 수 있습니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

LLDB CLI Skill

Use this CLI to run structured LLDB debugging workflows with JSON output.

Capabilities

  • Create debug target from executable path
  • Launch process or attach by pid/name
  • Manage breakpoints (set/list/delete/enable/disable)
  • Inspect threads, frames, locals, and backtrace
  • Evaluate expressions in current frame
  • Read/find process memory
  • Load core dumps
  • Interactive REPL with persistent session state
  • Formal stdio Debug Adapter Protocol server for AI/editor clients

Quick Commands

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

Use the DAP entry point when an AI client needs a real debug adapter lifecycle instead of shelling out separate CLI commands:

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

or:

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

The DAP server speaks stdio Content-Length frames and must have exclusive stdout. Do not print logs to stdout around it. Supported requests include initialize, launch, attach, configurationDone, setBreakpoints, setFunctionBreakpoints, threads, stackTrace, scopes, variables, setVariable, evaluate, continue, pause, next, stepIn, stepOut, source, loadedSources, readMemory, modules, exceptionInfo, disassemble, and disconnect.

DAP variables can expose child references for structs/classes/arrays. Use setVariable only while stopped; LLDB may reject writes to optimized-out or read-only values.

For long-running GUI debuggees, DAP continue is non-blocking from the client's point of view: the adapter sends the response and continued event first, then waits for LLDB on a background thread. DAP pause uses LLDB async interrupt. If an agent needs to change breakpoints while the debuggee is running, the adapter interrupts first and waits for a stopped state before mutating LLDB breakpoints; if the target does not stop in time, retry after an explicit pause/stopped cycle.

For GUI apps that stop on debugger-internal startup or shader-JIT breakpoints, launch and attach accept the non-standard boolean argument autoContinueInternalBreakpoints. Enable it only when those internal stops are noise for the task; the adapter emits an output event before auto-continuing. For target-specific noise, prefer structured stop rules through inline stopRules or an external stopRuleProfile/--profile JSON file. Rules can match by reason, module, function, and/or regex, then either stop with clear cliAnythingStop.origin metadata or continue automatically. Use profiles for apps such as C4D so their NVIDIA shader-JIT/startup traps live outside the generic adapter.

DAP stopped events include body.cliAnythingStop.origin: manualPause for a client pause request, internalTrap for a matched internal rule, and debuggee for ordinary program stops. Existing cli-anything-lldb-dap processes do not hot-load new code or profile contents; restart the adapter and re-attach or re-launch before expecting new rules to apply.

Command Groups

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 breakpoin
자주 묻는 질문

LLDB가 설치되어 있어야 하나요?

네. 스킬은 LLDB와 그 Python API가 사용 가능해야 합니다.

편집기에서 쓸 수 있나요?

네. 편집기와 AI 클라이언트가 연결할 수 있는 Debug Adapter Protocol 서버를 제공합니다.

메모리를 확인할 수 있나요?

네. 프로세스 메모리를 읽고 검색할 수 있습니다.

상세 정보

작성자의 원본 설명

Stateful LLDB debugging via LLDB Python API

repo: HKUDS/CLI-Anything

인기도

GitHub 스타
58k
순위
#3219
라이선스
Apache-2.0
업데이트
2026. 9. 21.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬