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

Proxy of C++ mba_t class.

Inheritance diagram for mba_t:

Public Member Functions

 __init__ (self, *args, **kwargs)
 
"bool" precise_defeas (self)
 precise_defeas(self) -> bool
 
"bool" optimized (self)
 optimized(self) -> bool
 
"bool" short_display (self)
 short_display(self) -> bool
 
"bool" show_reduction (self)
 show_reduction(self) -> bool
 
"bool" graph_insns (self)
 graph_insns(self) -> bool
 
"bool" loaded_gdl (self)
 loaded_gdl(self) -> bool
 
"bool" should_beautify (self)
 should_beautify(self) -> bool
 
"bool" rtype_refined (self)
 rtype_refined(self) -> bool
 
"bool" may_refine_rettype (self)
 may_refine_rettype(self) -> bool
 
"bool" use_wingraph32 (self)
 use_wingraph32(self) -> bool
 
"bool" display_numaddrs (self)
 display_numaddrs(self) -> bool
 
"bool" display_valnums (self)
 display_valnums(self) -> bool
 
"bool" is_pattern (self)
 is_pattern(self) -> bool
 
"bool" is_thunk (self)
 is_thunk(self) -> bool
 
"bool" saverest_done (self)
 saverest_done(self) -> bool
 
"bool" callinfo_built (self)
 callinfo_built(self) -> bool
 
"bool" really_alloc (self)
 really_alloc(self) -> bool
 
"bool" lvars_allocated (self)
 lvars_allocated(self) -> bool
 
"bool" chain_varnums_ok (self)
 chain_varnums_ok(self) -> bool
 
"bool" returns_fpval (self)
 returns_fpval(self) -> bool
 
"bool" has_passregs (self)
 has_passregs(self) -> bool
 
"bool" generated_asserts (self)
 generated_asserts(self) -> bool
 
"bool" propagated_asserts (self)
 propagated_asserts(self) -> bool
 
"bool" deleted_pairs (self)
 deleted_pairs(self) -> bool
 
"bool" common_stkvars_stkargs (self)
 common_stkvars_stkargs(self) -> bool
 
"bool" lvar_names_ok (self)
 lvar_names_ok(self) -> bool
 
"bool" lvars_renamed (self)
 lvars_renamed(self) -> bool
 
"bool" has_over_chains (self)
 has_over_chains(self) -> bool
 
"bool" valranges_done (self)
 valranges_done(self) -> bool
 
"bool" argidx_ok (self)
 argidx_ok(self) -> bool
 
"bool" argidx_sorted (self)
 argidx_sorted(self) -> bool
 
"bool" code16_bit_removed (self)
 code16_bit_removed(self) -> bool
 
"bool" has_stack_retval (self)
 has_stack_retval(self) -> bool
 
"bool" has_outlines (self)
 has_outlines(self) -> bool
 
"bool" is_ctr (self)
 is_ctr(self) -> bool
 
"bool" is_dtr (self)
 is_dtr(self) -> bool
 
"bool" is_cdtr (self)
 is_cdtr(self) -> bool
 
"bool" prop_complex (self)
 prop_complex(self) -> bool
 
"int" get_mba_flags (self)
 get_mba_flags(self) -> int
 
"int" get_mba_flags2 (self)
 get_mba_flags2(self) -> int
 
"void" set_mba_flags (self, "int" f)
 set_mba_flags(self, f)
 
"void" clr_mba_flags (self, "int" f)
 clr_mba_flags(self, f)
 
"void" set_mba_flags2 (self, "int" f)
 set_mba_flags2(self, f)
 
"void" clr_mba_flags2 (self, "int" f)
 clr_mba_flags2(self, f)
 
"void" clr_cdtr (self)
 clr_cdtr(self)
 
"int" calc_shins_flags (self)
 calc_shins_flags(self) -> int
 
"sval_t" stkoff_vd2ida (self, "sval_t" off)
 stkoff_vd2ida(self, off) -> sval_t
 
"sval_t" stkoff_ida2vd (self, "sval_t" off)
 stkoff_ida2vd(self, off) -> sval_t
 
"sval_t" argbase (self)
 argbase(self) -> sval_t
 
"vdloc_t" idaloc2vd (self, "argloc_t" loc, "int" width)
 idaloc2vd(self, loc, width) -> vdloc_t
 
"argloc_t" vd2idaloc (self, *args)
 vd2idaloc(self, loc, width, spd) -> argloc_t
 
"bool" is_stkarg (self, "lvar_t" v)
 is_stkarg(self, v) -> bool
 
"argloc_t" get_ida_argloc (self, "lvar_t" v)
 get_ida_argloc(self, v) -> argloc_t
 
"bool" write_to_const_detected (self)
 write_to_const_detected(self) -> bool
 
"bool" bad_call_sp_detected (self)
 bad_call_sp_detected(self) -> bool
 
"bool" regargs_is_not_aligned (self)
 regargs_is_not_aligned(self) -> bool
 
"bool" has_bad_sp (self)
 has_bad_sp(self) -> bool
 
"void" term (self)
 term(self)
 
"func_t *" get_curfunc (self)
 get_curfunc(self) -> func_t *
 
"bool" use_frame (self)
 use_frame(self) -> bool
 
"bool" is_snippet (self)
 is_snippet(self) -> bool
 
"bool" set_maturity (self, "mba_maturity_t" mat)
 set_maturity(self, mat) -> bool Set maturity level.
 
"int" optimize_local (self, "int" locopt_bits)
 optimize_local(self, locopt_bits) -> int Optimize each basic block locally
 
"merror_t" build_graph (self)
 build_graph(self) -> merror_t Build control flow graph.
 
"mbl_graph_t *" get_graph (self)
 get_graph(self) -> mbl_graph_t Get control graph.
 
"int" analyze_calls (self, "int" acflags)
 analyze_calls(self, acflags) -> int Analyze calls and determine calling conventions.
 
"merror_t" optimize_global (self)
 optimize_global(self) -> merror_t Optimize microcode globally.
 
"void" alloc_lvars (self)
 alloc_lvars(self) Allocate local variables.
 
"void" dump (self)
 dump(self) Dump microcode to a file.
 
"void" dump_mba (self, "bool" _verify, "char const *" title)
 dump_mba(self, _verify, title)
 
"void" verify (self, "bool" always)
 verify(self, always) Verify microcode consistency.
 
"void" mark_chains_dirty (self)
 mark_chains_dirty(self) Mark the microcode use-def chains dirty.
 
"mblock_t *" get_mblock (self, *args)
 get_mblock(self, n) -> mblock_t
 
"mblock_t *" insert_block (self, "int" bblk)
 insert_block(self, bblk) -> mblock_t Insert a block in the middle of the mbl array.
 
"mblock_t *" split_block (self, "mblock_t" blk, "minsn_t" start_insn)
 split_block(self, blk, start_insn) -> mblock_t Split a block: insert a new one after the block, move some instructions to new block
 
"bool" remove_block (self, "mblock_t" blk)
 remove_block(self, blk) -> bool Delete a block.
 
"bool" remove_blocks (self, "int" start_blk, "int" end_blk)
 remove_blocks(self, start_blk, end_blk) -> bool
 
"mblock_t *" copy_block (self, "mblock_t" blk, "int" new_serial, "int" cpblk_flags=3)
 copy_block(self, blk, new_serial, cpblk_flags=3) -> mblock_t Make a copy of a block.
 
"bool" remove_empty_and_unreachable_blocks (self)
 remove_empty_and_unreachable_blocks(self) -> bool Delete all empty and unreachable blocks.
 
"bool" merge_blocks (self)
 merge_blocks(self) -> bool Merge blocks.
 
"int" for_all_ops (self, "mop_visitor_t" mv)
 for_all_ops(self, mv) -> int Visit all operands of all instructions.
 
"int" for_all_insns (self, "minsn_visitor_t" mv)
 for_all_insns(self, mv) -> int Visit all instructions.
 
"int" for_all_topinsns (self, "minsn_visitor_t" mv)
 for_all_topinsns(self, mv) -> int Visit all top level instructions.
 
"mop_t *" find_mop (self, "op_parent_info_t" ctx, "ea_t" ea, "bool" is_dest, "mlist_t" list)
 find_mop(self, ctx, ea, is_dest, list) -> mop_t Find an operand in the microcode.
 
"minsn_t *" create_helper_call (self, "ea_t" ea, "char const *" helper, "tinfo_t" rettype=None, "mcallargs_t" callargs=None, "mop_t" out=None)
 create_helper_call(self, ea, helper, rettype=None, callargs=None, out=None) -> minsn_t Create a call of a helper function.
 
"void" get_func_output_lists (self, *args)
 get_func_output_lists(self, return_regs, spoiled, type, call_ea=BADADDR, tail_call=False) Prepare the lists of registers & memory that are defined/killed by a function
 
"lvar_t const &" arg (self, *args)
 arg(self, n) -> lvar_t
 
"ea_t" alloc_fict_ea (self, "ea_t" real_ea)
 alloc_fict_ea(self, real_ea) -> ea_t Allocate a fictional address.
 
"ea_t" map_fict_ea (self, "ea_t" fict_ea)
 map_fict_ea(self, fict_ea) -> ea_t Resolve a fictional address.
 
"ivl_t const &" get_std_region (self, "memreg_index_t" idx)
 get_std_region(self, idx) -> ivl_t Get information about various memory regions.
 
"ivl_t const &" get_lvars_region (self)
 get_lvars_region(self) -> ivl_t
 
"ivl_t const &" get_shadow_region (self)
 get_shadow_region(self) -> ivl_t
 
"ivl_t const &" get_args_region (self)
 get_args_region(self) -> ivl_t
 
"ivl_t" get_stack_region (self)
 get_stack_region(self) -> ivl_t
 
"void" serialize (self)
 serialize(self) Serialize mbl array into a sequence of bytes.
 
"void" save_snapshot (self, "char const *" description)
 save_snapshot(self, description) Create and save microcode snapshot.
 
"mreg_t" alloc_kreg (self, "size_t" size, "bool" check_size=True)
 alloc_kreg(self, size, check_size=True) -> mreg_t Allocate a kernel register.
 
"void" free_kreg (self, "mreg_t" reg, "size_t" size)
 free_kreg(self, reg, size) Free a kernel register.
 
"merror_t" inline_func (self, "codegen_t" cdg, "int" blknum, "mba_ranges_t" ranges, "int" decomp_flags=0, "int" inline_flags=0)
 inline_func(self, cdg, blknum, ranges, decomp_flags=0, inline_flags=0) -> merror_t Inline a range.
 
"stkpnt_t const *" locate_stkpnt (self, "ea_t" ea)
 locate_stkpnt(self, ea) -> stkpnt_t const *
 
"bool" set_lvar_name (self, "lvar_t" v, "char const *" name, "int" flagbits)
 set_lvar_name(self, v, name, flagbits) -> bool
 
"bool" set_nice_lvar_name (self, "lvar_t" v, "char const *" name)
 set_nice_lvar_name(self, v, name) -> bool
 
"bool" set_user_lvar_name (self, "lvar_t" v, "char const *" name)
 set_user_lvar_name(self, v, name) -> bool
 

Static Public Member Functions

"mba_t *" deserialize ("uchar const *" bytes)
 deserialize(bytes) -> mba_t Deserialize a byte sequence into mbl array.
 

Static Public Attributes

str mbr = property(_ida_hexrays.mba_t_mbr_get, _ida_hexrays.mba_t_mbr_set, doc=!)
 
str entry_ea = property(_ida_hexrays.mba_t_entry_ea_get, _ida_hexrays.mba_t_entry_ea_set, doc=)
 
str last_prolog_ea = property(_ida_hexrays.mba_t_last_prolog_ea_get, _ida_hexrays.mba_t_last_prolog_ea_set, doc=)
 
str first_epilog_ea = property(_ida_hexrays.mba_t_first_epilog_ea_get, _ida_hexrays.mba_t_first_epilog_ea_set, doc=)
 
str qty = property(_ida_hexrays.mba_t_qty_get, _ida_hexrays.mba_t_qty_set, doc=)
 
str npurged = property(_ida_hexrays.mba_t_npurged_get, _ida_hexrays.mba_t_npurged_set, doc=)
 
str cc = property(_ida_hexrays.mba_t_cc_get, _ida_hexrays.mba_t_cc_set, doc=)
 
str tmpstk_size = property(_ida_hexrays.mba_t_tmpstk_size_get, _ida_hexrays.mba_t_tmpstk_size_set, doc=)
 
str frsize = property(_ida_hexrays.mba_t_frsize_get, _ida_hexrays.mba_t_frsize_set, doc=)
 
str frregs = property(_ida_hexrays.mba_t_frregs_get, _ida_hexrays.mba_t_frregs_set, doc=)
 
str fpd = property(_ida_hexrays.mba_t_fpd_get, _ida_hexrays.mba_t_fpd_set, doc=)
 
str pfn_flags = property(_ida_hexrays.mba_t_pfn_flags_get, _ida_hexrays.mba_t_pfn_flags_set, doc=)
 
str retsize = property(_ida_hexrays.mba_t_retsize_get, _ida_hexrays.mba_t_retsize_set, doc=)
 
str shadow_args = property(_ida_hexrays.mba_t_shadow_args_get, _ida_hexrays.mba_t_shadow_args_set, doc=)
 
str fullsize = property(_ida_hexrays.mba_t_fullsize_get, _ida_hexrays.mba_t_fullsize_set, doc=)
 
str stacksize = property(_ida_hexrays.mba_t_stacksize_get, _ida_hexrays.mba_t_stacksize_set, doc=)
 
str inargoff = property(_ida_hexrays.mba_t_inargoff_get, _ida_hexrays.mba_t_inargoff_set, doc=)
 
str minstkref = property(_ida_hexrays.mba_t_minstkref_get, _ida_hexrays.mba_t_minstkref_set, doc=)
 
str minstkref_ea = property(_ida_hexrays.mba_t_minstkref_ea_get, _ida_hexrays.mba_t_minstkref_ea_set, doc=)
 
str minargref = property(_ida_hexrays.mba_t_minargref_get, _ida_hexrays.mba_t_minargref_set, doc=)
 
str spd_adjust = property(_ida_hexrays.mba_t_spd_adjust_get, _ida_hexrays.mba_t_spd_adjust_set, doc=)
 
str gotoff_stkvars = property(_ida_hexrays.mba_t_gotoff_stkvars_get, _ida_hexrays.mba_t_gotoff_stkvars_set, doc=)
 
str restricted_memory = property(_ida_hexrays.mba_t_restricted_memory_get, _ida_hexrays.mba_t_restricted_memory_set, doc=)
 
str aliased_memory = property(_ida_hexrays.mba_t_aliased_memory_get, _ida_hexrays.mba_t_aliased_memory_set, doc=)
 
str nodel_memory = property(_ida_hexrays.mba_t_nodel_memory_get, _ida_hexrays.mba_t_nodel_memory_set, doc=)
 
str consumed_argregs = property(_ida_hexrays.mba_t_consumed_argregs_get, _ida_hexrays.mba_t_consumed_argregs_set, doc=)
 
str maturity = property(_ida_hexrays.mba_t_maturity_get, _ida_hexrays.mba_t_maturity_set, doc=)
 
str reqmat = property(_ida_hexrays.mba_t_reqmat_get, _ida_hexrays.mba_t_reqmat_set, doc=)
 
str final_type = property(_ida_hexrays.mba_t_final_type_get, _ida_hexrays.mba_t_final_type_set, doc=)
 
str idb_type = property(_ida_hexrays.mba_t_idb_type_get, _ida_hexrays.mba_t_idb_type_set, doc=)
 
str idb_spoiled = property(_ida_hexrays.mba_t_idb_spoiled_get, _ida_hexrays.mba_t_idb_spoiled_set, doc=)
 
str spoiled_list = property(_ida_hexrays.mba_t_spoiled_list_get, _ida_hexrays.mba_t_spoiled_list_set, doc=)
 
str fti_flags = property(_ida_hexrays.mba_t_fti_flags_get, _ida_hexrays.mba_t_fti_flags_set, doc=)
 
str label = property(_ida_hexrays.mba_t_label_get, _ida_hexrays.mba_t_label_set, doc=)
 
str vars = property(_ida_hexrays.mba_t_vars_get, _ida_hexrays.mba_t_vars_set, doc=)
 
str argidx = property(_ida_hexrays.mba_t_argidx_get, _ida_hexrays.mba_t_argidx_set, doc=)
 
str retvaridx = property(_ida_hexrays.mba_t_retvaridx_get, _ida_hexrays.mba_t_retvaridx_set, doc=)
 
str error_ea = property(_ida_hexrays.mba_t_error_ea_get, _ida_hexrays.mba_t_error_ea_set, doc=)
 
str error_strarg = property(_ida_hexrays.mba_t_error_strarg_get, _ida_hexrays.mba_t_error_strarg_set, doc=)
 
str blocks = property(_ida_hexrays.mba_t_blocks_get, _ida_hexrays.mba_t_blocks_set, doc=)
 
str natural = property(_ida_hexrays.mba_t_natural_get, _ida_hexrays.mba_t_natural_set, doc=)
 
str std_ivls = property(_ida_hexrays.mba_t_std_ivls_get, _ida_hexrays.mba_t_std_ivls_set, doc=)
 
str notes = property(_ida_hexrays.mba_t_notes_get, _ida_hexrays.mba_t_notes_set, doc=)
 
str occurred_warns = property(_ida_hexrays.mba_t_occurred_warns_get, _ida_hexrays.mba_t_occurred_warns_set, doc=)
 

Protected Member Functions

"void" _print (self, "vd_printer_t" vp)
 _print(self, vp)
 
"void" _register (self)
 _register(self)
 
"void" _deregister (self)
 _deregister(self)
 

Properties

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

Constructor & Destructor Documentation

◆ __init__()

__init__ ( self,
* args,
** kwargs )

Member Function Documentation

◆ _deregister()

"void" _deregister ( self)
protected

◆ _print()

"void" _print ( self,
"vd_printer_t" vp )
protected

Parameters

vp: vd_printer_t &

◆ _register()

"void" _register ( self)
protected

◆ alloc_fict_ea()

"ea_t" alloc_fict_ea ( self,
"ea_t" real_ea )

This function can be used to allocate a new unique address for a new instruction, if re-using any existing address leads to conflicts. For example, if the last instruction of the function modifies R0 and falls through to the next function, it will be a tail call: LDM R0!, {R4,R7} end of the function start of another function In this case R0 generates two different lvars at the same address:

  • one modified by LDM
  • another that represents the return value from the tail call Another example: a third-party plugin makes a copy of an instruction. This may lead to the generation of two variables at the same address. Example 3: fictional addresses can be used for new instructions created while modifying the microcode. This function can be used to allocate a new unique address for a new instruction or a variable. The fictional address is selected from an unallocated address range.
Parameters
real_ea(C++: ea_t) real instruction address (BADADDR is ok too)
Returns
: a unique fictional address

◆ alloc_kreg()

"mreg_t" alloc_kreg ( self,
"size_t" size,
"bool" check_size = True )
Parameters
size(C++: size_t) size of the register in bytes
check_size(C++: bool) if true, only the sizes that correspond to a size of a basic type will be accepted.
Returns
: allocated register. mr_none means failure.

◆ alloc_lvars()

"void" alloc_lvars ( self)

Must be called only immediately after optimize_global(), with no modifications to the microcode. Converts registers, stack variables, and similar operands into mop_l. This call will not fail because all necessary checks were performed in optimize_global(). After this call the microcode reaches its final state.

◆ analyze_calls()

"int" analyze_calls ( self,
"int" acflags )
Parameters
acflags(C++: int) permitted actions that are necessary for successful detection of calling conventions. See Bits for analyze_calls()
Returns
: number of calls. -1 means error.

◆ arg()

"lvar_t const &" arg ( self,
* args )
Parameters
nint

◆ argbase()

"sval_t" argbase ( self)

◆ argidx_ok()

"bool" argidx_ok ( self)

◆ argidx_sorted()

"bool" argidx_sorted ( self)

◆ bad_call_sp_detected()

"bool" bad_call_sp_detected ( self)

◆ build_graph()

"merror_t" build_graph ( self)

This function may be called only once. It calculates the type of each basic block and the adjacency list. optimize_local() calls this function if necessary. You need to call this function only before MMAT_LOCOPT.

Returns
: error code

◆ calc_shins_flags()

"int" calc_shins_flags ( self)

◆ callinfo_built()

"bool" callinfo_built ( self)

◆ chain_varnums_ok()

"bool" chain_varnums_ok ( self)

◆ clr_cdtr()

"void" clr_cdtr ( self)

◆ clr_mba_flags()

"void" clr_mba_flags ( self,
"int" f )
Parameters
fint

◆ clr_mba_flags2()

"void" clr_mba_flags2 ( self,
"int" f )
Parameters
fint

◆ code16_bit_removed()

"bool" code16_bit_removed ( self)

◆ common_stkvars_stkargs()

"bool" common_stkvars_stkargs ( self)

◆ copy_block()

"mblock_t *" copy_block ( self,
"mblock_t" blk,
"int" new_serial,
"int" cpblk_flags = 3 )

This function makes a simple copy of the block. It does not fix the predecessor and successor lists, they must be fixed if necessary.

Parameters
blk(C++: mblock_t *) block to copy
new_serial(C++: int) position of the copied block
cpblk_flags(C++: int) combination of Batch decompilation bits... bits
Returns
: pointer to the new copy

◆ create_helper_call()

"minsn_t *" create_helper_call ( self,
"ea_t" ea,
"char const *" helper,
"tinfo_t" rettype = None,
"mcallargs_t" callargs = None,
"mop_t" out = None )
Parameters
ea(C++: ea_t) The desired address of the instruction
helper(C++: const char *) The helper name
rettype(C++: const tinfo_t *) The return type (nullptr or empty type means 'void')
callargs(C++: const mcallargs_t *) The helper arguments (nullptr-no arguments)
out(C++: const mop_t *) The operand where the call result should be stored. If this argument is not nullptr, "mov helper_call(), out" will be generated. Otherwise "call helper()" will be generated. Note: the size of this operand must be equal to the RETTYPE size
Returns
: pointer to the created instruction or nullptr if error

◆ deleted_pairs()

"bool" deleted_pairs ( self)

◆ deserialize()

"mba_t *" deserialize ( "uchar const *" bytes)
static
Parameters
bytes(C++: const uchar *) pointer to the beginning of the byte sequence.
Returns
: new mbl array

◆ display_numaddrs()

"bool" display_numaddrs ( self)

◆ display_valnums()

"bool" display_valnums ( self)

◆ dump()

"void" dump ( self)

The file will be created in the directory pointed by IDA_DUMPDIR envvar. Dump will be created only if IDA is run under debugger.

◆ dump_mba()

"void" dump_mba ( self,
"bool" _verify,
"char const *" title )
Parameters
_verifybool
titlechar const *

◆ find_mop()

"mop_t *" find_mop ( self,
"op_parent_info_t" ctx,
"ea_t" ea,
"bool" is_dest,
"mlist_t" list )

This function tries to find the operand that matches LIST. Any operand that overlaps with LIST is considered as a match.

Parameters
ctx(C++: op_parent_info_t *) context information for the result
ea(C++: ea_t) desired address of the operand. BADADDR means to accept any address.
is_dest(C++: bool) search for destination operand? this argument may be ignored if the exact match could not be found
list(C++: const mlist_t &) list of locations the correspond to the operand
Returns
: pointer to the operand or nullptr.

◆ for_all_insns()

"int" for_all_insns ( self,
"minsn_visitor_t" mv )

This function visits all instruction and subinstructions.

Parameters
mv(C++: minsn_visitor_t &) instruction visitor
Returns
: non-zero value returned by mv.visit_mop() or zero

◆ for_all_ops()

"int" for_all_ops ( self,
"mop_visitor_t" mv )
Parameters
mv(C++: mop_visitor_t &) operand visitor
Returns
: non-zero value returned by mv.visit_mop() or zero

◆ for_all_topinsns()

"int" for_all_topinsns ( self,
"minsn_visitor_t" mv )
Parameters
mv(C++: minsn_visitor_t &) instruction visitor
Returns
: non-zero value returned by mv.visit_mop() or zero

◆ free_kreg()

"void" free_kreg ( self,
"mreg_t" reg,
"size_t" size )

If wrong arguments are passed, this function will generate an internal error.

Parameters
reg(C++: mreg_t) a previously allocated kernel register
size(C++: size_t) size of the register in bytes

◆ generated_asserts()

"bool" generated_asserts ( self)

◆ get_args_region()

"ivl_t const &" get_args_region ( self)

◆ get_curfunc()

"func_t *" get_curfunc ( self)

◆ get_func_output_lists()

"void" get_func_output_lists ( self,
* args )
Parameters
return_regs(C++: mlist_t *) defined regs to return (eax,edx)
spoiled(C++: mlist_t *) spoiled regs (flags,ecx,mem)
type(C++: const tinfo_t &) the function type
call_ea(C++: ea_t) the call insn address (if known)
tail_call(C++: bool) is it the tail call?

◆ get_graph()

"mbl_graph_t *" get_graph ( self)

Call build_graph() if you need the graph before MMAT_LOCOPT.

◆ get_ida_argloc()

"argloc_t" get_ida_argloc ( self,
"lvar_t" v )
Parameters
vlvar_t const &

◆ get_lvars_region()

"ivl_t const &" get_lvars_region ( self)

◆ get_mba_flags()

"int" get_mba_flags ( self)

◆ get_mba_flags2()

"int" get_mba_flags2 ( self)

◆ get_mblock()

"mblock_t *" get_mblock ( self,
* args )
Parameters
nuint

◆ get_shadow_region()

"ivl_t const &" get_shadow_region ( self)

◆ get_stack_region()

"ivl_t" get_stack_region ( self)

◆ get_std_region()

"ivl_t const &" get_std_region ( self,
"memreg_index_t" idx )

We map the stack frame to the global memory, to some unused range.

Parameters
idx(C++: memreg_index_t) enum memreg_index_t

◆ graph_insns()

"bool" graph_insns ( self)

◆ has_bad_sp()

"bool" has_bad_sp ( self)

◆ has_outlines()

"bool" has_outlines ( self)

◆ has_over_chains()

"bool" has_over_chains ( self)

◆ has_passregs()

"bool" has_passregs ( self)

◆ has_stack_retval()

"bool" has_stack_retval ( self)

◆ idaloc2vd()

"vdloc_t" idaloc2vd ( self,
"argloc_t" loc,
"int" width )
Parameters
locargloc_t const &
widthint

◆ inline_func()

"merror_t" inline_func ( self,
"codegen_t" cdg,
"int" blknum,
"mba_ranges_t" ranges,
"int" decomp_flags = 0,
"int" inline_flags = 0 )

Currently only functions are supported, not arbitrary ranges. This function may be called only during the initial microcode generation phase.

Parameters
cdg(C++: codegen_t &) the codegenerator object
blknum(C++: int) the block contaning the call/jump instruction to inline
ranges(C++: mba_ranges_t &) the set of ranges to inline
decomp_flags(C++: int) combination of decompile() flags bits
inline_flags(C++: int) combination of inline_func() flags bits
Returns
: error code

◆ insert_block()

"mblock_t *" insert_block ( self,
"int" bblk )

The very first block of microcode must be empty, it is the entry block. The very last block of microcode must be BLT_STOP, it is the exit block. Therefore inserting a new block before the entry point or after the exit block is not a good idea.

Parameters
bblk(C++: int) the new block will be inserted before BBLK
Returns
: ptr to the new block

◆ is_cdtr()

"bool" is_cdtr ( self)

◆ is_ctr()

"bool" is_ctr ( self)

◆ is_dtr()

"bool" is_dtr ( self)

◆ is_pattern()

"bool" is_pattern ( self)

◆ is_snippet()

"bool" is_snippet ( self)

◆ is_stkarg()

"bool" is_stkarg ( self,
"lvar_t" v )
Parameters
vlvar_t const &

◆ is_thunk()

"bool" is_thunk ( self)

◆ loaded_gdl()

"bool" loaded_gdl ( self)

◆ locate_stkpnt()

"stkpnt_t const *" locate_stkpnt ( self,
"ea_t" ea )
Parameters
eaea_t

◆ lvar_names_ok()

"bool" lvar_names_ok ( self)

◆ lvars_allocated()

"bool" lvars_allocated ( self)

◆ lvars_renamed()

"bool" lvars_renamed ( self)

◆ map_fict_ea()

"ea_t" map_fict_ea ( self,
"ea_t" fict_ea )

This function provides a reverse of the mapping made by alloc_fict_ea().

Parameters
fict_ea(C++: ea_t) fictional definition address
Returns
: the real instruction address

◆ mark_chains_dirty()

"void" mark_chains_dirty ( self)

Call this function is any inter-block data dependencies got changed because of your modifications to the microcode. Failing to do so may cause an internal error.

◆ may_refine_rettype()

"bool" may_refine_rettype ( self)

◆ merge_blocks()

"bool" merge_blocks ( self)

This function merges blocks constituting linear flow. It calls remove_empty_and_unreachable_blocks() as well.

Returns
: true if changed any blocks

◆ optimize_global()

"merror_t" optimize_global ( self)

This function applies various optimization methods until we reach the fixed point. After that it preallocates lvars unless reqmat forbids it.

Returns
: error code

◆ optimize_local()

"int" optimize_local ( self,
"int" locopt_bits )
Parameters
locopt_bits(C++: int) combination of Bits for optimize_local() bits
Returns
: number of changes. 0 means nothing changed This function is called by the decompiler, usually there is no need to call it explicitly.

◆ optimized()

"bool" optimized ( self)

◆ precise_defeas()

"bool" precise_defeas ( self)

◆ prop_complex()

"bool" prop_complex ( self)

◆ propagated_asserts()

"bool" propagated_asserts ( self)

◆ really_alloc()

"bool" really_alloc ( self)

◆ regargs_is_not_aligned()

"bool" regargs_is_not_aligned ( self)

◆ remove_block()

"bool" remove_block ( self,
"mblock_t" blk )
Parameters
blk(C++: mblock_t *) block to delete
Returns
: true if at least one of the other blocks became empty or unreachable

◆ remove_blocks()

"bool" remove_blocks ( self,
"int" start_blk,
"int" end_blk )
Parameters
start_blkint
end_blkint

◆ remove_empty_and_unreachable_blocks()

"bool" remove_empty_and_unreachable_blocks ( self)

Blocks marked with MBL_KEEP won't be deleted.

◆ returns_fpval()

"bool" returns_fpval ( self)

◆ rtype_refined()

"bool" rtype_refined ( self)

◆ save_snapshot()

"void" save_snapshot ( self,
"char const *" description )
Parameters
description(C++: const char *) char const *

◆ saverest_done()

"bool" saverest_done ( self)

◆ serialize()

"void" serialize ( self)

◆ set_lvar_name()

"bool" set_lvar_name ( self,
"lvar_t" v,
"char const *" name,
"int" flagbits )
Parameters
vlvar_t &
namechar const *
flagbitsint

◆ set_maturity()

"bool" set_maturity ( self,
"mba_maturity_t" mat )
Parameters
mat(C++: mba_maturity_t) new maturity level
Returns
: true if it is time to stop analysis Plugins may use this function to skip some parts of the analysis. The maturity level cannot be decreased.

◆ set_mba_flags()

"void" set_mba_flags ( self,
"int" f )
Parameters
fint

◆ set_mba_flags2()

"void" set_mba_flags2 ( self,
"int" f )
Parameters
fint

◆ set_nice_lvar_name()

"bool" set_nice_lvar_name ( self,
"lvar_t" v,
"char const *" name )
Parameters
vlvar_t &
namechar const *

◆ set_user_lvar_name()

"bool" set_user_lvar_name ( self,
"lvar_t" v,
"char const *" name )
Parameters
vlvar_t &
namechar const *

◆ short_display()

"bool" short_display ( self)

◆ should_beautify()

"bool" should_beautify ( self)

◆ show_reduction()

"bool" show_reduction ( self)

◆ split_block()

"mblock_t *" split_block ( self,
"mblock_t" blk,
"minsn_t" start_insn )
Parameters
blk(C++: mblock_t *) block to be split
start_insn(C++: minsn_t *) all instructions to be moved to new block: starting with this one up to the end
Returns
: ptr to the new block

◆ stkoff_ida2vd()

"sval_t" stkoff_ida2vd ( self,
"sval_t" off )
Parameters
offsval_t

◆ stkoff_vd2ida()

"sval_t" stkoff_vd2ida ( self,
"sval_t" off )
Parameters
offsval_t

◆ term()

"void" term ( self)

◆ use_frame()

"bool" use_frame ( self)

◆ use_wingraph32()

"bool" use_wingraph32 ( self)

◆ valranges_done()

"bool" valranges_done ( self)

◆ vd2idaloc()

"argloc_t" vd2idaloc ( self,
* args )
Parameters
locvdloc_t const &
widthint
spdsval_t

vd2idaloc(self, loc, width) -> argloc_t

Parameters
locvdloc_t const &
widthint

◆ verify()

"void" verify ( self,
"bool" always )
Parameters
always(C++: bool) if false, the check will be performed only if ida runs under debugger If any inconsistency is discovered, an internal error will be generated. We strongly recommend you to call this function before returing control to the decompiler from your callbacks, in the case if you modified the microcode. If the microcode is inconsistent, this function will generate an internal error. We provide the source code of this function in the plugins/hexrays_sdk/verifier directory for your reference.

◆ write_to_const_detected()

"bool" write_to_const_detected ( self)

Member Data Documentation

◆ aliased_memory

str aliased_memory = property(_ida_hexrays.mba_t_aliased_memory_get, _ida_hexrays.mba_t_aliased_memory_set, doc=)
static

◆ argidx

str argidx = property(_ida_hexrays.mba_t_argidx_get, _ida_hexrays.mba_t_argidx_set, doc=)
static

◆ blocks

str blocks = property(_ida_hexrays.mba_t_blocks_get, _ida_hexrays.mba_t_blocks_set, doc=)
static

◆ cc

str cc = property(_ida_hexrays.mba_t_cc_get, _ida_hexrays.mba_t_cc_set, doc=)
static

◆ consumed_argregs

str consumed_argregs = property(_ida_hexrays.mba_t_consumed_argregs_get, _ida_hexrays.mba_t_consumed_argregs_set, doc=)
static

◆ entry_ea

str entry_ea = property(_ida_hexrays.mba_t_entry_ea_get, _ida_hexrays.mba_t_entry_ea_set, doc=)
static

◆ error_ea

str error_ea = property(_ida_hexrays.mba_t_error_ea_get, _ida_hexrays.mba_t_error_ea_set, doc=)
static

◆ error_strarg

str error_strarg = property(_ida_hexrays.mba_t_error_strarg_get, _ida_hexrays.mba_t_error_strarg_set, doc=)
static

◆ final_type

str final_type = property(_ida_hexrays.mba_t_final_type_get, _ida_hexrays.mba_t_final_type_set, doc=)
static

◆ first_epilog_ea

str first_epilog_ea = property(_ida_hexrays.mba_t_first_epilog_ea_get, _ida_hexrays.mba_t_first_epilog_ea_set, doc=)
static

◆ fpd

str fpd = property(_ida_hexrays.mba_t_fpd_get, _ida_hexrays.mba_t_fpd_set, doc=)
static

◆ frregs

str frregs = property(_ida_hexrays.mba_t_frregs_get, _ida_hexrays.mba_t_frregs_set, doc=)
static

◆ frsize

str frsize = property(_ida_hexrays.mba_t_frsize_get, _ida_hexrays.mba_t_frsize_set, doc=)
static

◆ fti_flags

str fti_flags = property(_ida_hexrays.mba_t_fti_flags_get, _ida_hexrays.mba_t_fti_flags_set, doc=)
static

◆ fullsize

str fullsize = property(_ida_hexrays.mba_t_fullsize_get, _ida_hexrays.mba_t_fullsize_set, doc=)
static

◆ gotoff_stkvars

str gotoff_stkvars = property(_ida_hexrays.mba_t_gotoff_stkvars_get, _ida_hexrays.mba_t_gotoff_stkvars_set, doc=)
static

◆ idb_spoiled

str idb_spoiled = property(_ida_hexrays.mba_t_idb_spoiled_get, _ida_hexrays.mba_t_idb_spoiled_set, doc=)
static

◆ idb_type

str idb_type = property(_ida_hexrays.mba_t_idb_type_get, _ida_hexrays.mba_t_idb_type_set, doc=)
static

◆ inargoff

str inargoff = property(_ida_hexrays.mba_t_inargoff_get, _ida_hexrays.mba_t_inargoff_set, doc=)
static

◆ label

str label = property(_ida_hexrays.mba_t_label_get, _ida_hexrays.mba_t_label_set, doc=)
static

◆ last_prolog_ea

str last_prolog_ea = property(_ida_hexrays.mba_t_last_prolog_ea_get, _ida_hexrays.mba_t_last_prolog_ea_set, doc=)
static

◆ maturity

str maturity = property(_ida_hexrays.mba_t_maturity_get, _ida_hexrays.mba_t_maturity_set, doc=)
static

◆ mbr

str mbr = property(_ida_hexrays.mba_t_mbr_get, _ida_hexrays.mba_t_mbr_set, doc=!)
static

◆ minargref

str minargref = property(_ida_hexrays.mba_t_minargref_get, _ida_hexrays.mba_t_minargref_set, doc=)
static

◆ minstkref

str minstkref = property(_ida_hexrays.mba_t_minstkref_get, _ida_hexrays.mba_t_minstkref_set, doc=)
static

◆ minstkref_ea

str minstkref_ea = property(_ida_hexrays.mba_t_minstkref_ea_get, _ida_hexrays.mba_t_minstkref_ea_set, doc=)
static

◆ natural

str natural = property(_ida_hexrays.mba_t_natural_get, _ida_hexrays.mba_t_natural_set, doc=)
static

◆ nodel_memory

str nodel_memory = property(_ida_hexrays.mba_t_nodel_memory_get, _ida_hexrays.mba_t_nodel_memory_set, doc=)
static

◆ notes

str notes = property(_ida_hexrays.mba_t_notes_get, _ida_hexrays.mba_t_notes_set, doc=)
static

◆ npurged

str npurged = property(_ida_hexrays.mba_t_npurged_get, _ida_hexrays.mba_t_npurged_set, doc=)
static

◆ occurred_warns

str occurred_warns = property(_ida_hexrays.mba_t_occurred_warns_get, _ida_hexrays.mba_t_occurred_warns_set, doc=)
static

◆ pfn_flags

str pfn_flags = property(_ida_hexrays.mba_t_pfn_flags_get, _ida_hexrays.mba_t_pfn_flags_set, doc=)
static

◆ qty

str qty = property(_ida_hexrays.mba_t_qty_get, _ida_hexrays.mba_t_qty_set, doc=)
static

◆ reqmat

str reqmat = property(_ida_hexrays.mba_t_reqmat_get, _ida_hexrays.mba_t_reqmat_set, doc=)
static

◆ restricted_memory

str restricted_memory = property(_ida_hexrays.mba_t_restricted_memory_get, _ida_hexrays.mba_t_restricted_memory_set, doc=)
static

◆ retsize

str retsize = property(_ida_hexrays.mba_t_retsize_get, _ida_hexrays.mba_t_retsize_set, doc=)
static

◆ retvaridx

str retvaridx = property(_ida_hexrays.mba_t_retvaridx_get, _ida_hexrays.mba_t_retvaridx_set, doc=)
static

◆ shadow_args

str shadow_args = property(_ida_hexrays.mba_t_shadow_args_get, _ida_hexrays.mba_t_shadow_args_set, doc=)
static

◆ spd_adjust

str spd_adjust = property(_ida_hexrays.mba_t_spd_adjust_get, _ida_hexrays.mba_t_spd_adjust_set, doc=)
static

◆ spoiled_list

str spoiled_list = property(_ida_hexrays.mba_t_spoiled_list_get, _ida_hexrays.mba_t_spoiled_list_set, doc=)
static

◆ stacksize

str stacksize = property(_ida_hexrays.mba_t_stacksize_get, _ida_hexrays.mba_t_stacksize_set, doc=)
static

◆ std_ivls

str std_ivls = property(_ida_hexrays.mba_t_std_ivls_get, _ida_hexrays.mba_t_std_ivls_set, doc=)
static

◆ tmpstk_size

str tmpstk_size = property(_ida_hexrays.mba_t_tmpstk_size_get, _ida_hexrays.mba_t_tmpstk_size_set, doc=)
static

◆ vars

str vars = property(_ida_hexrays.mba_t_vars_get, _ida_hexrays.mba_t_vars_set, doc=)
static

Property Documentation

◆ idb_node

idb_node = property(lambda self: self.deprecated_idb_node)
static

◆ 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: