Skip to main content
Glama

pwndbg_piebase

Calculate runtime virtual address from PIE-relative offset for PIE binaries. Converts file offset to address by adding PIE base.

Instructions

Calculate the virtual address from a PIE-relative offset.

pwndbg command: piebase Source: pwndbg/commands/pie.py Category: Linux/libc/ELF

For PIE binaries, converts a file offset (RVA) to a runtime virtual address by adding the PIE base.

Args: session_id: The UUID of the session. offset: Offset from PIE base to calculate (default: 0 = show base). module: Optional module name (default: main binary).

See: https://pwndbg.re/2025.05.30/reference/pwndbg/commands/pie/

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
session_idYes
offsetNo
moduleNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description must convey all behavioral traits. It explains the core operation (adding PIE base to offset) and lists parameters. However, it omits edge cases (e.g., behavior if module is invalid or PIE base unknown) and potential side effects, which lowers transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise and well-structured: a summary line followed by metadata (command, source, category), a clear explanation, a formatted Args list, and a reference link. Every sentence contributes meaning without redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given that an output schema exists (so return values are documented elsewhere), the description covers all necessary aspects: purpose, usage context, and parameter meanings. The reference link provides additional details. For a tool with low complexity, this is complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 0% description coverage, so the description's parameter documentation adds significant value. It explains each parameter: session_id, offset (with default and meaning), and module (with default). This compensates for the schema's lack of descriptions, though it could be more precise about module names and session_id format.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Calculate the virtual address from a PIE-relative offset.' It specifies it works for PIE binaries and converts file offsets to runtime virtual addresses. The verb 'calculate' and resource 'virtual address' are specific and unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage for PIE binaries and explains the default behavior for offset (0 shows base). However, it does not explicitly state when not to use this tool or mention alternatives among the many sibling tools, such as pwndbg_distance or pwndbg_telescope, which also deal with addresses.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/Micro-Evaluation-Group/pwndbg-lldb-mcp'

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