SL

stass/lldb-mcp

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

114 stars 15 forks 质量 64 趋势 0BSD-2-Clause

stass/lldb-mcp 是从 https://github.com/stass/lldb-mcp. 导入的 MCP 服务器候选。

概览

stass/lldb-mcp 是从 https://github.com/stass/lldb-mcp. 导入的 MCP 服务器候选。

概述(AI 翻译)

在这里,在acton中可以看到它,自动调试缓冲区溢出:https://x.com/full_duplex/status/1904770477698277847

概述

LLDB-MCP 是一个将 LLDB 调试器与 Claude 模型上下文协议(MCP)集成的工具。这种集成使 Claude 能够直接启动、控制并交互 LLDB 调试会话,从而实现 AI 辅助调试工作流程。

该工具提供了一套全面的命令,用于使用 LLDB,包括:

  • 启动和管理LLDB会话
  • 加载程序用于调试
  • 设置断点和观察点
  • 控制程序执行
  • 检查内存、寄存器和变量
  • 分析栈跟踪和程序状态

特色

  • 创建和管理多个LLDB调试会话
  • 加载可执行文件并附加到正在运行的进程
  • 用于尸检分析的加载核心导出文件
  • 执行任意LLDB命令
  • 对程序执行进行细致控制
  • 记忆检查与拆解
  • 螺纹和堆叠框架检查

安装

  1. 克隆仓库:

  2. 安装依赖:

  3. 配置 Claude 以使用 LLDB-MCP 服务器:

  • 打开 Claude 桌面应用配置

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

LLDB-MCP

See it in acton here, automatically debugging a buffer overflow: https://x.com/full_duplex/status/1904770477698277847

Overview

LLDB-MCP is a tool that integrates the LLDB debugger with Claude’s Model Context Protocol (MCP). This integration allows Claude to start, control, and interact with LLDB debugging sessions directly, enabling AI-assisted debugging workflows.

The tool provides a comprehensive set of commands for working with LLDB, including:

  • Starting and managing LLDB sessions
  • Loading programs for debugging
  • Setting breakpoints and watchpoints
  • Controlling program execution
  • Examining memory, registers, and variables
  • Analyzing stack traces and program state

Features

  • Create and manage multiple LLDB debugging sessions
  • Load executables and attach to running processes
  • Load core dump files for post-mortem analysis
  • Execute arbitrary LLDB commands
  • Fine-grained control over program execution
  • Memory examination and disassembly
  • Thread and stack frame inspection

Installation

  1. Clone the repository:

    git clone https://github.com/stass/lldb-mcp.git
    cd lldb-mcp
    
  2. Install dependencies:

    pip install mcp
    
  3. Configure Claude to use the LLDB-MCP server:

    • Open the Claude desktop app configuration
    • Add the following to your MCP configuration:
    "mcpServers": {
      "lldb-mcp": {
        "command": "python3",
        "args": ["/path/to/lldb-mcp/lldb_mcp.py"],
        "disabled": false
      }
    }
    

Usage

Once installed and configured, you can interact with LLDB through Claude using natural language.

Basic Workflow

  1. Start a new LLDB session
  2. Load a program
  3. Set breakpoints
  4. Run the program
  5. Inspect variables and memory
  6. Control execution (continue, step, next, etc.)
  7. Terminate the session when done

Example Commands

Here are some examples of how to interact with LLDB-MCP through Claude:

  • “Start a new LLDB session”
  • “Load the program ‘/path/to/executable’”
  • “Set a breakpoint at main”
  • “Run the program”
  • “Show backtrace”
  • “Print the value of variable ‘count’”
  • “Step over the next line”
  • “Examine memory at address 0x1000”
  • “Show register values”
  • “Continue execution”
  • “Kill the process”
  • “Terminate the LLDB session”

Supported Commands

Session Management

  • lldb_start: Start a new LLDB session
  • lldb_terminate: Terminate an LLDB session
  • lldb_list_sessions: List all active LLDB sessions

Program Loading

  • lldb_load: Load a program into LLDB
  • lldb_attach: Attach to a running process
  • lldb_load_core: Load a core dump file

Execution Control

  • lldb_run: Run the loaded program
  • lldb_continue: Continue program execution
  • lldb_step: Step to next line or instruction
  • lldb_next: Step over function calls
  • lldb_finish: Execute until the current function returns
  • lldb_kill: Kill the running process

Breakpoints and Watchpoints

在 GitHub 查看完整 README

安装

This server does not publish a one-line install command.

Open the repository installation guide 新手?先看 mcpskill.org 教程 →

配置

"mcpServers": { "lldb-mcp": { "command": "python3", "args": ["/path/to/lldb-mcp/lldb_mcp.py"], "disabled": false } }