IDA C++ SDK 9.2
Loading...
Searching...
No Matches
ea-based frame manipulation

Functions

idaman bool ida_export add_frame_ea (ea_t func_ea, sval_t frsize, ushort frregs, asize_t argsize)
 Add function frame.
idaman bool ida_export del_frame_ea (ea_t func_ea)
 Delete a function frame.
idaman bool ida_export set_frame_size_ea (ea_t func_ea, asize_t frsize, ushort frregs, asize_t argsize)
 Set size of function frame.
idaman asize_t ida_export get_frame_size_ea (ea_t func_ea)
 Get full size of a function frame.
idaman int ida_export get_frame_retsize_ea (ea_t func_ea)
 Get size of function return address.
idaman bool ida_export get_frame_part_ea (range_t *range, ea_t func_ea, frame_part_t part)
 Get offsets of the frame part in the frame.
ea_t frame_off_args_ea (ea_t func_ea)
 Get starting address of arguments section.
ea_t frame_off_retaddr_ea (ea_t func_ea)
 Get starting address of return address section.
ea_t frame_off_savregs_ea (ea_t func_ea)
 Get starting address of saved registers section.
ea_t frame_off_lvars_ea (ea_t func_ea)
 Get start address of local variables section.
DEPRECATED ea_t frame_off_args (const func_t *pfn)
 Get starting address of arguments section.
DEPRECATED ea_t frame_off_retaddr (const func_t *pfn)
 Get starting address of return address section.
DEPRECATED ea_t frame_off_savregs (const func_t *pfn)
 Get starting address of saved registers section.
DEPRECATED ea_t frame_off_lvars (const func_t *pfn)
 Get start address of local variables section.
idaman bool ida_export get_func_frame_ea (tinfo_t *out, ea_t func_ea)
 Get type of function frame.
bool get_func_frame (tinfo_t *tif, ea_t ea)
idaman sval_t ida_export soff_to_fpoff_ea (ea_t func_ea, uval_t soff)
 Convert struct offsets into fp-relative offsets.
idaman bool ida_export update_fpd_ea (ea_t func_ea, asize_t fpd)
 Update frame pointer delta.
bool processor_t::is_funcarg_off_ea (ea_t func_ea, uval_t frameoff) const
 Does the given offset lie within the arguments section?
sval_t processor_t::lvar_off_ea (ea_t func_ea, uval_t frameoff) const
 Does the given offset lie within the local variables section?
bool processor_t::is_funcarg_off (const func_t *pfn, uval_t frameoff) const
 Does the given offset lie within the arguments section?
sval_t processor_t::lvar_off (const func_t *pfn, uval_t frameoff) const
 Does the given offset lie within the local variables section?

Detailed Description

Function Documentation

◆ add_frame_ea()

idaman bool ida_export add_frame_ea ( ea_t func_ea,
sval_t frsize,
ushort frregs,
asize_t argsize )

Add function frame.

Parameters
func_eaany address of the function
frsizesize of function local variables
frregssize of saved registers
argsizesize of function arguments range which will be purged upon return. this parameter is used for __stdcall and __pascal calling conventions. for other calling conventions please pass 0.
Return values
1ok
0failed (no function at func_ea, frame already exists)

◆ del_frame_ea()

idaman bool ida_export del_frame_ea ( ea_t func_ea)

Delete a function frame.

Parameters
func_eaany address of the function
Returns
success

◆ set_frame_size_ea()

idaman bool ida_export set_frame_size_ea ( ea_t func_ea,
asize_t frsize,
ushort frregs,
asize_t argsize )

Set size of function frame.

Parameters
func_eaany address of the function
frsizesize of function local variables
frregssize of saved registers
argsizesize of function arguments that will be purged from the stack upon return
Returns
success

◆ get_frame_size_ea()

idaman asize_t ida_export get_frame_size_ea ( ea_t func_ea)

Get full size of a function frame.

This function takes into account size of local variables + size of saved registers + size of return address + number of purged bytes.

Parameters
func_eaany address of the function
Returns
size of frame in bytes or zero

◆ get_frame_retsize_ea()

idaman int ida_export get_frame_retsize_ea ( ea_t func_ea)

Get size of function return address.

Parameters
func_eaany address of the function
Returns
return address size or 0

◆ get_frame_part_ea()

idaman bool ida_export get_frame_part_ea ( range_t * range,
ea_t func_ea,
frame_part_t part )

Get offsets of the frame part in the frame.

Parameters
[out]rangepointer to the output buffer with the frame part start/end(exclusive) offsets, can't be nullptr
func_eaany address of the function
partframe part
Returns
false if no function at func_ea

◆ frame_off_args_ea()

ea_t frame_off_args_ea ( ea_t func_ea)
inline

Get starting address of arguments section.

Parameters
func_eaany address of the function
Returns
offset in frame or BADADDR on failure

◆ frame_off_retaddr_ea()

ea_t frame_off_retaddr_ea ( ea_t func_ea)
inline

Get starting address of return address section.

Parameters
func_eaany address of the function
Returns
offset in frame or BADADDR on failure

◆ frame_off_savregs_ea()

ea_t frame_off_savregs_ea ( ea_t func_ea)
inline

Get starting address of saved registers section.

Parameters
func_eaany address of the function
Returns
offset in frame or BADADDR on failure

◆ frame_off_lvars_ea()

ea_t frame_off_lvars_ea ( ea_t func_ea)
inline

Get start address of local variables section.

Parameters
func_eaany address of the function
Returns
offset in frame or BADADDR on failure

◆ frame_off_args()

DEPRECATED ea_t frame_off_args ( const func_t * pfn)
inline

Get starting address of arguments section.

Deprecated
Use frame_off_args_ea() for safer access.

◆ frame_off_retaddr()

DEPRECATED ea_t frame_off_retaddr ( const func_t * pfn)
inline

Get starting address of return address section.

Deprecated
Use frame_off_retaddr_ea() for safer access.

◆ frame_off_savregs()

DEPRECATED ea_t frame_off_savregs ( const func_t * pfn)
inline

Get starting address of saved registers section.

Deprecated
Use frame_off_savregs_ea() for safer access.

◆ frame_off_lvars()

DEPRECATED ea_t frame_off_lvars ( const func_t * pfn)
inline

Get start address of local variables section.

Deprecated
Use frame_off_lvars_ea() for safer access.

◆ get_func_frame_ea()

idaman bool ida_export get_func_frame_ea ( tinfo_t * out,
ea_t func_ea )

Get type of function frame.

Parameters
[out]outtype info
func_eaany address of the function
Returns
success

◆ get_func_frame()

bool get_func_frame ( tinfo_t * tif,
ea_t ea )
inline

◆ soff_to_fpoff_ea()

idaman sval_t ida_export soff_to_fpoff_ea ( ea_t func_ea,
uval_t soff )

Convert struct offsets into fp-relative offsets.

Parameters
func_eaany address of the function
soffstruct offset
Returns
fp-relative offset, or soff if no function at func_ea

◆ update_fpd_ea()

idaman bool ida_export update_fpd_ea ( ea_t func_ea,
asize_t fpd )

Update frame pointer delta.

Parameters
func_eaany address of the function
fpdnew fpd value. cannot be bigger than the local variable range size.
Returns
success

◆ is_funcarg_off_ea()

bool processor_t::is_funcarg_off_ea ( ea_t func_ea,
uval_t frameoff ) const
inline

Does the given offset lie within the arguments section?

Parameters
func_eaany address of the function
frameoffoffset in frame

◆ lvar_off_ea()

sval_t processor_t::lvar_off_ea ( ea_t func_ea,
uval_t frameoff ) const
inline

Does the given offset lie within the local variables section?

Parameters
func_eaany address of the function
frameoffoffset in frame

◆ is_funcarg_off()

DEPRECATED bool processor_t::is_funcarg_off ( const func_t * pfn,
uval_t frameoff ) const
inline

Does the given offset lie within the arguments section?

Deprecated
Use processor_t::is_funcarg_off_ea() for safer access.

◆ lvar_off()

DEPRECATED sval_t processor_t::lvar_off ( const func_t * pfn,
uval_t frameoff ) const
inline

Does the given offset lie within the local variables section?

Deprecated
Use processor_t::lvar_off_ea() for safer access.