Skip to main content
Glama

lldb_images

List loaded executable images and shared libraries with their addresses and file paths during debugging sessions.

Instructions

List loaded executable images and shared libraries.

Shows: - Main executable - Shared libraries (.so, .dylib, .dll) - Load addresses - File paths Args: params: ImageListInput with executable and optional filter Returns: str: List of loaded images with addresses

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paramsYes

Implementation Reference

  • The main asynchronous handler function for the 'lldb_images' tool. It creates an LLDB target from the executable, runs 'image list' command, optionally filters the output by pattern, and returns formatted markdown output listing loaded images with addresses.
    async def lldb_images(params: ImageListInput) -> str: """List loaded executable images and shared libraries. Shows: - Main executable - Shared libraries (.so, .dylib, .dll) - Load addresses - File paths Args: params: ImageListInput with executable and optional filter Returns: str: List of loaded images with addresses """ commands = [f"target create {params.executable}", "image list"] result = _run_lldb_script(commands) output = result["output"] # Apply filter if specified if params.filter_pattern and result["success"]: filtered_lines = [ line for line in output.split("\n") if params.filter_pattern.lower() in line.lower() ] output = "\n".join(filtered_lines) if filtered_lines else "No images matching filter" return f"## Loaded Images\n\n```\n{output.strip()}\n```"
  • Pydantic BaseModel schema defining the input parameters for the lldb_images tool: required 'executable' path and optional 'filter_pattern' for matching image names.
    class ImageListInput(BaseModel): """Input for listing loaded images/modules.""" model_config = ConfigDict(str_strip_whitespace=True) executable: str = Field(..., description="Path to the executable", min_length=1) filter_pattern: str | None = Field(default=None, description="Filter images by name pattern")
  • The @mcp.tool decorator that registers the lldb_images function as an MCP tool with name 'lldb_images' and metadata annotations indicating it's read-only, non-destructive, idempotent, and not open-world.
    @mcp.tool( name="lldb_images", annotations={ "title": "List Loaded Images", "readOnlyHint": True, "destructiveHint": False, "idempotentHint": True, "openWorldHint": False, }, )

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/benpm/claude_lldb_mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server