set_register
Set a register value across an address range or non-contiguous ranges in a Ghidra program to define or modify its execution context.
Instructions
Set or assume a register value over an address range or selection.
This writes a Ghidra program-context register value. Pass a single `target`,
optionally with `end` or `length`, or pass non-contiguous `ranges` entries
with `start` plus optional `end` or `length`.
Args:
register: Register name.
value: Integer register value, for example `0`, `13`, or `0x40000000`.
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.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| end | No | ||
| value | Yes | ||
| length | No | ||
| ranges | No | ||
| target | No | ||
| program | Yes | ||
| register | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |