Module ida_idp :: Class processor_t
[frames] | no frames]

Class processor_t

object --+    
         |    
 IDP_Hooks --+
             |
            processor_t

Instance Methods
IDP_Hooks
__init__(self)
x.__init__(...) initializes x; see help(type(x)) for signature
 
auto_empty(self, *args)
 
auto_empty_finally(self, *args)
 
closebase(self, *args)
 
compiler_changed(self, *args)
 
deleting_func(self, pfn)
 
determined_main(self, *args)
bool
ev_ana_insn(self, *args)
Analyzes and decodes an instruction at insn.ea
PyObject *
ev_assemble(self, *args)
Assembles an instruction
 
ev_auto_queue_empty(self, *args)
int
ev_calc_step_over(self, target, ip)
int
ev_can_have_type(self, *args)
int
ev_cmp_operands(self, *args)
int
ev_coagulate(self, *args)
int
ev_coagulate_dref(self, from_ea, to_ea, may_define, _code_ea)
int
ev_create_func_frame(self, pfn)
int
ev_create_switch_xrefs(self, *args)
int
ev_creating_segm(self, s)
bool
ev_emu_insn(self, *args)
Emulate instruction, create cross-references, plan to analyze subsequent instructions, modify flags etc.
int
ev_endbinary(self, *args)
 
ev_func_bounds(self, _possible_return_code, pfn, max_func_end_ea)
int
ev_gen_map_file(self, nlines, fp)
int
ev_gen_regvar_def(self, ctx, v)
int
ev_gen_src_file_lnnum(self, *args)
PyObject *
ev_get_autocmt(self, *args)
int
ev_get_frame_retsize(self, frsize, pfn)
PyObject *
ev_get_operand_string(self, buf, insn, opnum)
int
ev_is_align_insn(self, *args)
int
ev_is_alloca_probe(self, *args)
int
ev_is_basic_block_end(self, *args)
int
ev_is_call_insn(self, *args)
Is the instruction a "call"?
int
ev_is_far_jump(self, *args)
int
ev_is_indirect_jump(self, *args)
int
ev_is_insn_table_jump(self, *args)
int
ev_is_ret_insn(self, *args)
Is the instruction a "return"?
int
ev_is_sane_insn(self, *args)
is the instruction sane for the current file type?
int
ev_is_sp_based(self, mode, insn, op)
int
ev_is_switch(self, *args)
int
ev_may_be_func(self, *args)
Can a function start here?
int
ev_may_show_sreg(self, *args)
int
ev_moving_segm(self, s, to_ea, flags)
int
ev_newbinary(self, *args)
int
ev_newfile(self, *args)
int
ev_newprc(self, *args)
int
ev_oldfile(self, *args)
int
ev_out_assumes(self, *args)
int
ev_out_data(self, *args)
 
ev_out_footer(self, *args)
 
ev_out_header(self, *args)
bool
ev_out_insn(self, *args)
Outputs the instruction defined in 'ctx.insn'
int
ev_out_label(self, *args)
int
ev_out_mnem(self, *args)
bool
ev_out_operand(self, *args)
Notification to generate operand text.
int
ev_out_segend(self, ctx, s)
int
ev_out_segstart(self, ctx, s)
int
ev_out_special_item(self, *args)
int
ev_rename(self, *args)
The kernel is going to rename a byte.
int
ev_set_idp_options(self, keyword, value_type, value)
int
ev_set_proc_options(self, *args)
int
ev_str2reg(self, *args)
int
ev_treat_hindering_item(self, *args)
int
ev_undefine(self, *args)
An item in the database (insn or data) is being deleted
int
ev_validate_flirt_func(self, *args)
int
ev_verify_noreturn(self, pfn)
int
ev_verify_sp(self, pfn)
 
func_added(self, pfn)
 
get_auxpref(self, insn)
This function returns insn.auxpref value
 
get_idpdesc(self)
This function must be present and should return the list of short processor names similar to the one in ph.psnames.
 
get_uFlag(self)
Use this utility function to retrieve the 'uFlag' global variable
 
idasgn_loaded(self, *args)
 
kernel_config_loaded(self, *args)
 
make_code(self, *args)
 
make_data(self, *args)
 
renamed(self, *args)
 
savebase(self, *args)
 
segm_moved(self, from_ea, to_ea, size, changed_netmap)
 
set_func_end(self, *args)
 
set_func_start(self, *args)
 
sgr_changed(self, *args)

Inherited from IDP_Hooks: __disown__, __repr__, __swig_destroy__, ev_add_cref, ev_add_dref, ev_adjust_argloc, ev_adjust_libfunc_ea, ev_adjust_refinfo, ev_analyze_prolog, ev_arg_addrs_ready, ev_calc_arglocs, ev_calc_cdecl_purged_bytes, ev_calc_next_eas, ev_calc_purged_bytes, ev_calc_retloc, ev_calc_spdelta, ev_calc_switch_cases, ev_calc_varglocs, ev_calcrel, ev_clean_tbit, ev_create_flat_group, ev_decorate_name, ev_del_cref, ev_del_dref, ev_delay_slot_insn, ev_demangle_name, ev_ending_undo, ev_equal_reglocs, ev_extract_address, ev_find_op_value, ev_find_reg_value, ev_gen_asm_or_lst, ev_gen_stkvar_def, ev_get_abi_info, ev_get_bg_color, ev_get_cc_regs, ev_get_code16_mode, ev_get_dbr_opnum, ev_get_default_enum_size, ev_get_macro_insn_head, ev_get_reg_info, ev_get_reg_name, ev_get_simd_types, ev_get_stkarg_offset, ev_get_stkvar_scale_factor, ev_getreg, ev_init, ev_insn_reads_tbit, ev_is_cond_insn, ev_is_jump_func, ev_last_cb_before_loader, ev_loader, ev_lower_func_type, ev_max_ptr_size, ev_newasm, ev_next_exec_insn, ev_realcvt, ev_replaying_undo, ev_set_code16_mode, ev_setup_til, ev_shadow_args_size, ev_term, ev_use_arg_types, ev_use_regarg_type, ev_use_stkarg_type, hook, unhook

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables
  __idc_cvt_id__ = 2
Properties

Inherited from IDP_Hooks: thisown

Inherited from object: __class__

Method Details

__init__(self)
(Constructor)

 

x.__init__(...) initializes x; see help(type(x)) for signature

Returns: IDP_Hooks
Overrides: object.__init__
(inherited documentation)

ev_ana_insn(self, *args)

 

Analyzes and decodes an instruction at insn.ea

  • insn.itype must be set >= idaapi.CUSTOM_CMD_ITYPE
  • insn.size must be set to the instruction length
Returns: bool
Boolean
  • False if the instruction is not recognized
  • True if the instruction was decoded. 'insn' should be filled in that case.
Overrides: IDP_Hooks.ev_ana_insn
(inherited documentation)

ev_assemble(self, *args)

 

Assembles an instruction

Parameters:
  • ea - linear address of instruction
  • cs - cs of instruction
  • ip - ip of instruction
  • use32 - is 32bit segment?
  • line - line to assemble
Returns: PyObject *
- None to let the underlying processor module assemble the line
  • or a string containing the assembled buffer
Overrides: IDP_Hooks.ev_assemble
(inherited documentation)

ev_auto_queue_empty(self, *args)

 
Overrides: IDP_Hooks.ev_auto_queue_empty
(inherited documentation)

ev_calc_step_over(self, target, ip)

 
Returns: int
Overrides: IDP_Hooks.ev_calc_step_over
(inherited documentation)

ev_can_have_type(self, *args)

 
Returns: int
Overrides: IDP_Hooks.ev_can_have_type
(inherited documentation)

ev_cmp_operands(self, *args)

 
Returns: int
Overrides: IDP_Hooks.ev_cmp_operands
(inherited documentation)

ev_coagulate(self, *args)

 
Returns: int
Overrides: IDP_Hooks.ev_coagulate
(inherited documentation)

ev_coagulate_dref(self, from_ea, to_ea, may_define, _code_ea)

 
Returns: int
Overrides: IDP_Hooks.ev_coagulate_dref
(inherited documentation)

ev_create_func_frame(self, pfn)

 
Returns: int
Overrides: IDP_Hooks.ev_create_func_frame
(inherited documentation)

ev_create_switch_xrefs(self, *args)

 
Returns: int
Overrides: IDP_Hooks.ev_create_switch_xrefs
(inherited documentation)

ev_creating_segm(self, s)

 
Returns: int
Overrides: IDP_Hooks.ev_creating_segm
(inherited documentation)

ev_emu_insn(self, *args)

 

Emulate instruction, create cross-references, plan to analyze subsequent instructions, modify flags etc. Upon entrance to this function all information about the instruction is in 'insn' structure.

Returns: bool
Boolean (whether this instruction has been emulated or not)
Overrides: IDP_Hooks.ev_emu_insn
(inherited documentation)

ev_endbinary(self, *args)

 
Returns: int
Overrides: IDP_Hooks.ev_endbinary
(inherited documentation)

ev_func_bounds(self, _possible_return_code, pfn, max_func_end_ea)

 
Overrides: IDP_Hooks.ev_func_bounds
(inherited documentation)

ev_gen_map_file(self, nlines, fp)

 
Returns: int
Overrides: IDP_Hooks.ev_gen_map_file
(inherited documentation)

ev_gen_regvar_def(self, ctx, v)

 
Returns: int
Overrides: IDP_Hooks.ev_gen_regvar_def
(inherited documentation)

ev_gen_src_file_lnnum(self, *args)

 
Returns: int
Overrides: IDP_Hooks.ev_gen_src_file_lnnum
(inherited documentation)

ev_get_autocmt(self, *args)

 
Returns: PyObject *
Overrides: IDP_Hooks.ev_get_autocmt
(inherited documentation)

ev_get_frame_retsize(self, frsize, pfn)

 
Returns: int
Overrides: IDP_Hooks.ev_get_frame_retsize
(inherited documentation)

ev_get_operand_string(self, buf, insn, opnum)

 
Returns: PyObject *
Overrides: IDP_Hooks.ev_get_operand_string
(inherited documentation)

ev_is_align_insn(self, *args)

 
Returns: int
Overrides: IDP_Hooks.ev_is_align_insn
(inherited documentation)

ev_is_alloca_probe(self, *args)

 
Returns: int
Overrides: IDP_Hooks.ev_is_alloca_probe
(inherited documentation)

ev_is_basic_block_end(self, *args)

 
Returns: int
Overrides: IDP_Hooks.ev_is_basic_block_end
(inherited documentation)

ev_is_call_insn(self, *args)

 

Is the instruction a "call"?

Parameters:
  • insn - instruction
Returns: int
0-unknown, 1-yes, -1-no
Overrides: IDP_Hooks.ev_is_call_insn
(inherited documentation)

ev_is_far_jump(self, *args)

 
Returns: int
Overrides: IDP_Hooks.ev_is_far_jump
(inherited documentation)

ev_is_indirect_jump(self, *args)

 
Returns: int
Overrides: IDP_Hooks.ev_is_indirect_jump
(inherited documentation)

ev_is_insn_table_jump(self, *args)

 
Returns: int
Overrides: IDP_Hooks.ev_is_insn_table_jump
(inherited documentation)

ev_is_ret_insn(self, *args)

 

Is the instruction a "return"?

Parameters:
  • insn - instruction
  • strict - - True: report only ret instructions False: include instructions like "leave" which begins the function epilog
Returns: int
0-unknown, 1-yes, -1-no
Overrides: IDP_Hooks.ev_is_ret_insn
(inherited documentation)

ev_is_sane_insn(self, *args)

 

is the instruction sane for the current file type?

Parameters:
  • insn - the instruction
  • no_crefs -
    • 1: the instruction has no code refs to it. ida just tries to convert unexplored bytes to an instruction (but there is no other reason to convert them into an instruction)
    • 0: the instruction is created because of some coderef, user request or another weighty reason.
Returns: int
>=0-ok, <0-no, the instruction isn't likely to appear in the program
Overrides: IDP_Hooks.ev_is_sane_insn
(inherited documentation)

ev_is_sp_based(self, mode, insn, op)

 
Returns: int
Overrides: IDP_Hooks.ev_is_sp_based
(inherited documentation)

ev_is_switch(self, *args)

 
Returns: int
Overrides: IDP_Hooks.ev_is_switch
(inherited documentation)

ev_may_be_func(self, *args)

 

Can a function start here?

Parameters:
  • insn - the instruction
  • state - autoanalysis phase 0: creating functions 1: creating chunks
Returns: int
integer (probability 0..100)
Overrides: IDP_Hooks.ev_may_be_func
(inherited documentation)

ev_may_show_sreg(self, *args)

 
Returns: int
Overrides: IDP_Hooks.ev_may_show_sreg
(inherited documentation)

ev_moving_segm(self, s, to_ea, flags)

 
Returns: int
Overrides: IDP_Hooks.ev_moving_segm
(inherited documentation)

ev_newbinary(self, *args)

 
Returns: int
Overrides: IDP_Hooks.ev_newbinary
(inherited documentation)

ev_newfile(self, *args)

 
Returns: int
Overrides: IDP_Hooks.ev_newfile
(inherited documentation)

ev_newprc(self, *args)

 
Returns: int
Overrides: IDP_Hooks.ev_newprc
(inherited documentation)

ev_oldfile(self, *args)

 
Returns: int
Overrides: IDP_Hooks.ev_oldfile
(inherited documentation)

ev_out_assumes(self, *args)

 
Returns: int
Overrides: IDP_Hooks.ev_out_assumes
(inherited documentation)

ev_out_data(self, *args)

 
Returns: int
Overrides: IDP_Hooks.ev_out_data
(inherited documentation)

ev_out_footer(self, *args)

 
Overrides: IDP_Hooks.ev_out_footer
(inherited documentation)

ev_out_header(self, *args)

 
Overrides: IDP_Hooks.ev_out_header
(inherited documentation)

ev_out_insn(self, *args)

 

Outputs the instruction defined in 'ctx.insn'

Returns: bool
Boolean (whether this instruction can be outputted or not)
Overrides: IDP_Hooks.ev_out_insn
(inherited documentation)

ev_out_label(self, *args)

 
Returns: int
Overrides: IDP_Hooks.ev_out_label
(inherited documentation)

ev_out_mnem(self, *args)

 
Returns: int
Overrides: IDP_Hooks.ev_out_mnem
(inherited documentation)

ev_out_operand(self, *args)

 

Notification to generate operand text. If False was returned, then the standard operand output function will be called.

this notification may use out_...() functions to form the operand text

Returns: bool
Boolean (whether the operand has been outputted or not)
Overrides: IDP_Hooks.ev_out_operand
(inherited documentation)

ev_out_segend(self, ctx, s)

 
Returns: int
Overrides: IDP_Hooks.ev_out_segend
(inherited documentation)

ev_out_segstart(self, ctx, s)

 
Returns: int
Overrides: IDP_Hooks.ev_out_segstart
(inherited documentation)

ev_out_special_item(self, *args)

 
Returns: int
Overrides: IDP_Hooks.ev_out_special_item
(inherited documentation)

ev_rename(self, *args)

 

The kernel is going to rename a byte.

Parameters:
  • ea - Address
  • new_name - The new name
Returns: int
  • If returns value <0, then the kernel should not rename it. See also the 'renamed' event
Overrides: IDP_Hooks.ev_rename
(inherited documentation)

ev_set_idp_options(self, keyword, value_type, value)

 
Returns: int
Overrides: IDP_Hooks.ev_set_idp_options
(inherited documentation)

ev_set_proc_options(self, *args)

 
Returns: int
Overrides: IDP_Hooks.ev_set_proc_options
(inherited documentation)

ev_str2reg(self, *args)

 
Returns: int
Overrides: IDP_Hooks.ev_str2reg
(inherited documentation)

ev_treat_hindering_item(self, *args)

 
Returns: int
Overrides: IDP_Hooks.ev_treat_hindering_item
(inherited documentation)

ev_undefine(self, *args)

 

An item in the database (insn or data) is being deleted

Parameters:
  • ea - Address
Returns: int
  • 1 - do not delete srranges at the item end
  • 0 - srranges can be deleted
Overrides: IDP_Hooks.ev_undefine
(inherited documentation)

ev_validate_flirt_func(self, *args)

 
Returns: int
Overrides: IDP_Hooks.ev_validate_flirt_func
(inherited documentation)

ev_verify_noreturn(self, pfn)

 
Returns: int
Overrides: IDP_Hooks.ev_verify_noreturn
(inherited documentation)

ev_verify_sp(self, pfn)

 
Returns: int
Overrides: IDP_Hooks.ev_verify_sp
(inherited documentation)

get_idpdesc(self)

 

This function must be present and should return the list of short processor names similar to the one in ph.psnames. This method can be overridden to return to the kernel a different IDP description.