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
| Name | Required | Description | Default |
|---|---|---|---|
| params | Yes |
Implementation Reference
- lldb_mcp_server.py:1211-1239 (handler)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```"
- lldb_mcp_server.py:428-435 (schema)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")
- lldb_mcp_server.py:1201-1210 (registration)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, }, )