IDAPython 9.0
Loading...
Searching...
No Matches
macro_constructor_t Class Reference
Inheritance diagram for macro_constructor_t:

Public Member Functions

bool construct_macro (self, 'insn_t' insn, bool enable)
 
bool build_macro (self, 'insn_t' insn, bool may_go_forward)
 
 __init__ (self)
 
 __disown__ (self)
 

Static Public Attributes

str reserved
 

Properties

 thisown
 

Constructor & Destructor Documentation

◆ __init__()

__init__ ( self)

Member Function Documentation

◆ __disown__()

__disown__ ( self)

◆ build_macro()

bool build_macro ( self,
'insn_t' insn,
bool may_go_forward )
Try to extend the instruction.
This function may modify 'insn' and return false; these changes will be accepted by the kernel but the instruction will not be considered as a macro.

@param insn: Instruction to modify, usually the first instruction of the macro
@param may_go_forward: Is it ok to consider the next instruction for the macro? This argument may be false, for example, if there is a cross reference to the end of INSN. In this case creating a macro is not desired. However, it may still be useful to perform minor tweaks to the instruction using the information about the surrounding instructions.
@returns true if created an macro instruction.

◆ construct_macro()

bool construct_macro ( self,
'insn_t' insn,
bool enable )
Construct a macro instruction. This function may be called from ana() to generate a macro instruction.
The real work is done by the 'build_macro()' virtual function. It must be defined by the processor module.
construct_macro() modifies the database using the info provided by build_macro(). It verifies if the instruction can really be created (for example, that other items do not hinder), may plan to reanalyze the macro, etc. If the macro instructions are disabled by the user, construct_macro() will destroy the macro instruction. Note: if INSN_MODMAC is not set in insn.flags, the database will not be modified.

@param insn: the instruction to modify into a macro
@param enable: enable macro generation
@retval true: the macro instruction is generated in 'insn'
@retval false: did not create a macro

Member Data Documentation

◆ reserved

str reserved
static
Initial value:
= property(_ida_ua.macro_constructor_t_reserved_get,
_ida_ua.macro_constructor_t_reserved_set)

Property Documentation

◆ thisown

thisown
static
Initial value:
= property(lambda x: x.this.own(), lambda x, v: x.this.own(v),
doc='The membership flag')

The documentation for this class was generated from the following file: