lldb_images
List loaded executable images and shared libraries with addresses and file paths for debugging C/C++ programs. Filter results by name pattern to analyze program structure.
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 handler function that executes the lldb_images tool logic, running LLDB commands to list loaded images and applying optional filtering.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:1201-1210 (registration)The MCP tool registration decorator that registers the lldb_images tool with name and annotations.@mcp.tool( name="lldb_images", annotations={ "title": "List Loaded Images", "readOnlyHint": True, "destructiveHint": False, "idempotentHint": True, "openWorldHint": False, }, )
- lldb_mcp_server.py:428-435 (schema)Pydantic input schema for the lldb_images tool parameters.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")