IDAPython 9.0
Loading...
Searching...
No Matches
macro_constructor_t Class Reference

Proxy of C++ macro_constructor_t class.

Inheritance diagram for macro_constructor_t:

Public Member Functions

"bool" construct_macro (self, "insn_t" insn, "bool" enable)
 construct_macro(self, insn, enable) -> bool Construct a macro instruction.
 
"bool" build_macro (self, "insn_t" insn, "bool" may_go_forward)
 build_macro(self, insn, may_go_forward) -> bool Try to extend the instruction.
 
 __init__ (self)
 init(self) -> macro_constructor_t
 
 __disown__ (self)
 

Static Public Attributes

str reserved = property(_ida_ua.macro_constructor_t_reserved_get, _ida_ua.macro_constructor_t_reserved_set, doc=)
 

Properties

 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
 

Constructor & Destructor Documentation

◆ __init__()

__init__ ( self)
Parameters
selfPyObject *

Member Function Documentation

◆ __disown__()

__disown__ ( self)

◆ build_macro()

"bool" build_macro ( self,
"insn_t" insn,
"bool" may_go_forward )
Parameters
insn(C++: insn_t *) Instruction to modify, usually the first instruction of the macro
may_go_forward(C++: bool) 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. 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.

◆ construct_macro()

"bool" construct_macro ( self,
"insn_t" insn,
"bool" enable )

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.

Parameters
insn(C++: insn_t *) the instruction to modify into a macro
enable(C++: bool) enable macro generation
Return values
truethe macro instruction is generated in 'insn'
falsedid not create a macro

Member Data Documentation

◆ reserved

str reserved = property(_ida_ua.macro_constructor_t_reserved_get, _ida_ua.macro_constructor_t_reserved_set, doc=)
static

Property Documentation

◆ thisown

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

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