disassemble
Mark an address or selection as code in Ghidra, returning a summary of disassembled byte ranges. Supports contiguous or non-contiguous ranges, restricted flow, and architecture-specific modes.
Instructions
Mark an address or address selection as code using Ghidra disassembly commands.
Returns a compact text summary of the disassembled byte ranges.
With a single `target`, this behaves like the GUI Disassemble action at the
current location. With `end`, `length`, or `ranges`, it behaves like
invoking Disassemble with a listing selection. `restricted=True` uses the
same restricted-set behavior as Ghidra's Disassemble (Restricted) action.
`mode="default"` chooses the normal Ghidra disassembler, except for
architecture/language combinations where a more specific default is known:
PowerPC VLE languages default to VLE, ARM Thumb-default languages default
to Thumb, and MIPS microMIPS language variants default to their alternate
ISA mode.
Architecture-specific modes are available when supported by the selected
program language:
- `thumb` or `arm` for ARM/Thumb
- `vle` or `book-e`/`ppc` for PowerPC VLE languages
- `mips16` or `mips` for MIPS16/MicroMIPS-capable languages
- `xgate` or `hcs12` for HCS12/XGATE
- `x86_32` or `x86_64` for 32-bit compatibility disassembly in x86-64
Args:
program: Required Ghidra project path or name to target.
target: Address, exact label, or function name. Required unless
`ranges` is supplied.
end: Inclusive end address for a contiguous selection.
length: Byte length for a contiguous selection starting at `target`.
ranges: Optional list of range objects, each with `start` plus optional
`end` or `length`, for non-contiguous selections.
mode: Disassembly mode. Default uses Ghidra's normal Disassemble
command, but resolves to architecture-specific defaults for
PowerPC VLE, ARM Thumb-default, and MIPS microMIPS languages.
Special modes include `thumb`, `vle`, `book-e`, `mips16`,
`xgate`, and `x86_32`.
restricted: Restrict disassembly flow to the supplied selection/range.
enable_analysis: Submit new instructions for incremental analysis.
timeout: Bridge execution timeout in seconds.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| end | No | ||
| mode | No | default | |
| length | No | ||
| ranges | No | ||
| target | No | ||
| program | Yes | ||
| timeout | No | ||
| restricted | No | ||
| enable_analysis | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |