create_function
Create a function at a target address, automatically disassembling if needed and respecting existing function boundaries. Optionally assign a custom name.
Instructions
Create a function at target, optionally with a user-defined name.
If a function already starts at `target`, it is returned and renamed when a
`name` is provided. If `target` falls inside an existing function, no new
function is created and the containing function is returned.
When `target` is not yet an instruction, it is first disassembled in the
language's correct default ISA mode (PowerPC VLE, ARM Thumb-default, or
microMIPS), clearing any conflicting data, so entries are not mis-decoded
into broken boundaries.
Args:
target: Address, exact label, or function name where the function
should start.
program: Required Ghidra project path or name to target.
name: Optional user-defined function name.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | ||
| target | Yes | ||
| program | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |