apply_types
Apply an existing datatype or array at a target address or label, clearing conflicting code/data if needed. Use with Ghidra projects to define data structures at specific locations.
Instructions
Apply an existing datatype, or an array of it, at an address or label.
The datatype must already exist in the selected program's datatype manager;
create it first with `set_types` when needed. `data_type` can be an exact
datatype name or full datatype path. It may also include a simple array
suffix such as `uds27_dispatch_entry[8]`; otherwise pass `count` to create
an array. When `clear_existing` is true, conflicting code/data units across
the target byte range are cleared before the new data is created.
Args:
target: Address or exact label where the data should be created.
data_type: Existing datatype name/path, optionally with `[count]`.
program: Required Ghidra project path or name to target.
count: Number of elements to apply. Use 1 for a single item.
clear_existing: Clear conflicting code/data over the byte range first.
timeout: Bridge execution timeout in seconds.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| count | No | ||
| target | Yes | ||
| program | Yes | ||
| timeout | No | ||
| data_type | Yes | ||
| clear_existing | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |