IDAPython 8.4
Loading...
Searching...
No Matches
Hexrays_Hooks Class Reference

Proxy of C++ Hexrays_Hooks class.

Inheritance diagram for Hexrays_Hooks:

Public Member Functions

 __init__ (self, *args)
 init(self, _flags=0, _hkcb_flags=0x0001) -> Hexrays_Hooks
 
"bool" hook (self, *args)
 hook(self) -> bool
 
"bool" unhook (self, *args)
 unhook(self) -> bool
 
"int" flowchart (self, *args)
 flowchart(self, fc) -> int Flowchart has been generated.
 
"int" stkpnts (self, *args)
 stkpnts(self, mba, _sps) -> int SP change points have been calculated.
 
"int" prolog (self, *args)
 prolog(self, mba, fc, reachable_blocks, decomp_flags) -> int Prolog analysis has been finished.
 
"int" microcode (self, *args)
 microcode(self, mba) -> int Microcode has been generated.
 
"int" preoptimized (self, *args)
 preoptimized(self, mba) -> int Microcode has been preoptimized.
 
"int" locopt (self, *args)
 locopt(self, mba) -> int Basic block level optimization has been finished.
 
"int" prealloc (self, *args)
 prealloc(self, mba) -> int Local variables: preallocation step begins.
 
"int" glbopt (self, *args)
 glbopt(self, mba) -> int Global optimization has been finished.
 
"int" structural (self, *args)
 structural(self, ct) -> int Structural analysis has been finished.
 
"int" maturity (self, *args)
 maturity(self, cfunc, new_maturity) -> int Ctree maturity level is being changed.
 
"int" interr (self, *args)
 interr(self, errcode) -> int Internal error has occurred.
 
"int" combine (self, *args)
 combine(self, blk, insn) -> int Trying to combine instructions of basic block.
 
"int" print_func (self, *args)
 print_func(self, cfunc, vp) -> int Printing ctree and generating text.
 
"int" func_printed (self, *args)
 func_printed(self, cfunc) -> int Function text has been generated.
 
"int" resolve_stkaddrs (self, *args)
 resolve_stkaddrs(self, mba) -> int The optimizer is about to resolve stack addresses.
 
"PyObject *" build_callinfo (self, *args)
 build_callinfo(self, blk, type) -> PyObject * Analyzing a call instruction.
 
"int" callinfo_built (self, *args)
 callinfo_built(self, blk) -> int A call instruction has been anallyzed.
 
"int" calls_done (self, *args)
 calls_done(self, mba) -> int All calls have been analyzed.
 
"int" open_pseudocode (self, *args)
 open_pseudocode(self, vu) -> int New pseudocode view has been opened.
 
"int" switch_pseudocode (self, *args)
 switch_pseudocode(self, vu) -> int Existing pseudocode view has been reloaded with a new function.
 
"int" refresh_pseudocode (self, *args)
 refresh_pseudocode(self, vu) -> int Existing pseudocode text has been refreshed.
 
"int" close_pseudocode (self, *args)
 close_pseudocode(self, vu) -> int Pseudocode view is being closed.
 
"int" keyboard (self, *args)
 keyboard(self, vu, key_code, shift_state) -> int Keyboard has been hit.
 
"int" right_click (self, *args)
 right_click(self, vu) -> int Mouse right click.
 
"int" double_click (self, *args)
 double_click(self, vu, shift_state) -> int Mouse double click.
 
"int" curpos (self, *args)
 curpos(self, vu) -> int Current cursor position has been changed.
 
"PyObject *" create_hint (self, *args)
 create_hint(self, vu) -> PyObject * Create a hint for the current item.
 
"int" text_ready (self, *args)
 text_ready(self, vu) -> int Decompiled text is ready.
 
"int" populating_popup (self, *args)
 populating_popup(self, widget, popup_handle, vu) -> int Populating popup menu.
 
"int" lvar_name_changed (self, *args)
 lvar_name_changed(self, vu, v, name, is_user_name) -> int Local variable got renamed.
 
"int" lvar_type_changed (self, *args)
 lvar_type_changed(self, vu, v, tinfo) -> int Local variable type got changed.
 
"int" lvar_cmt_changed (self, *args)
 lvar_cmt_changed(self, vu, v, cmt) -> int Local variable comment got changed.
 
"int" lvar_mapping_changed (self, *args)
 lvar_mapping_changed(self, vu, frm, to) -> int Local variable mapping got changed.
 
"int" cmt_changed (self, *args)
 cmt_changed(self, cfunc, loc, cmt) -> int Comment got changed.
 
 __disown__ (self)
 

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,
* args )
Parameters
_flagsuint32
_hkcb_flagsuint32

Member Function Documentation

◆ __disown__()

__disown__ ( self)

◆ build_callinfo()

"PyObject *" build_callinfo ( self,
* args )
Parameters
blk(mblock_t *) blk->tail is the call.
type(tinfo_t *) buffer for the output type.

◆ callinfo_built()

"int" callinfo_built ( self,
* args )
Parameters
blk(mblock_t *) blk->tail is the call.

◆ calls_done()

"int" calls_done ( self,
* args )
Parameters
mba(mba_t *) This event is generated immediately after analyzing all calls, before any optimizitions, call unmerging and block merging.

◆ close_pseudocode()

"int" close_pseudocode ( self,
* args )
Parameters
vu(vdui_t *)

◆ cmt_changed()

"int" cmt_changed ( self,
* args )
Parameters
cfunc(cfunc_t *)
loc(const treeloc_t *)
cmt(const char *)

◆ combine()

"int" combine ( self,
* args )
Parameters
blk(mblock_t *)
insn(minsn_t *) Should return: 1 if combined the current instruction with a preceding one -1 if the instruction should not be combined 0 else

◆ create_hint()

"PyObject *" create_hint ( self,
* args )
See also
: ui_get_custom_viewer_hint
Parameters
vu(vdui_t *)
Return values
0continue collecting hints with other subscribers
1stop collecting hints

◆ curpos()

"int" curpos ( self,
* args )

(for example, by left-clicking or using keyboard)

Parameters
vu(vdui_t *)

◆ double_click()

"int" double_click ( self,
* args )
Parameters
vu(vdui_t *)
shift_state(int) Should return: 1 if the event has been handled

◆ flowchart()

"int" flowchart ( self,
* args )
Parameters
fc(qflow_chart_t *)

◆ func_printed()

"int" func_printed ( self,
* args )

Plugins may modify the text in cfunc_t::sv. The text uses regular color codes (see lines.hpp) COLOR_ADDR is used to store pointers to ctree items.

Parameters
cfunc(cfunc_t *)

◆ glbopt()

"int" glbopt ( self,
* args )

If microcode is modified, MERR_LOOP must be returned. It will cause a complete restart of the optimization.

Parameters
mba(mba_t *) return Microcode error codes code

◆ hook()

"bool" hook ( self,
* args )

◆ interr()

"int" interr ( self,
* args )
Parameters
errcode(int )

◆ keyboard()

"int" keyboard ( self,
* args )
Parameters
vu(vdui_t *)
key_code(int) VK_...
shift_state(int) Should return: 1 if the event has been handled

◆ locopt()

"int" locopt ( self,
* args )
Parameters
mba(mba_t *) return Microcode error codes code

◆ lvar_cmt_changed()

"int" lvar_cmt_changed ( self,
* args )
Parameters
vu(vdui_t *)
v(lvar_t *)
cmt(const char *) Please note that it is possible to read/write user settings for lvars directly from the idb.

◆ lvar_mapping_changed()

"int" lvar_mapping_changed ( self,
* args )
Parameters
vu(vdui_t *)
fromlvar_t *
to(lvar_t *) Please note that it is possible to read/write user settings for lvars directly from the idb.

◆ lvar_name_changed()

"int" lvar_name_changed ( self,
* args )
Parameters
vu(vdui_t *)
v(lvar_t *)
name(const char *)
is_user_name(bool) Please note that it is possible to read/write user settings for lvars directly from the idb.

◆ lvar_type_changed()

"int" lvar_type_changed ( self,
* args )
Parameters
vu(vdui_t *)
v(lvar_t *)
tinfo(const tinfo_t *) Please note that it is possible to read/write user settings for lvars directly from the idb.

◆ maturity()

"int" maturity ( self,
* args )
Parameters
cfunc(cfunc_t *)
new_maturity(ctree_maturity_t)

◆ microcode()

"int" microcode ( self,
* args )
Parameters
mba(mba_t *) return Microcode error codes code

◆ open_pseudocode()

"int" open_pseudocode ( self,
* args )
Parameters
vu(vdui_t *)

◆ populating_popup()

"int" populating_popup ( self,
* args )

We can add menu items now.

Parameters
widget(TWidget *)
popup_handle(TPopupMenu *)
vu(vdui_t *)

◆ prealloc()

"int" prealloc ( self,
* args )
Parameters
mba(mba_t *) This event may occur several times. Should return: 1 if modified microcode Negative values are Microcode error codes error codes

◆ preoptimized()

"int" preoptimized ( self,
* args )
Parameters
mba(mba_t *) return Microcode error codes code

◆ print_func()

"int" print_func ( self,
* args )
Parameters
cfunc(cfunc_t *)
vp(vc_printer_t *) Returns: 1 if text has been generated by the plugin It is forbidden to modify ctree at this event.

◆ prolog()

"int" prolog ( self,
* args )
Parameters
mba(mba_t *)
fc(qflow_chart_t *)
reachable_blocks(bitset_t *)
decomp_flags(int) return Microcode error codes code

◆ refresh_pseudocode()

"int" refresh_pseudocode ( self,
* args )

Adding/removing pseudocode lines is forbidden in this event.

Parameters
vu(vdui_t *) See also hxe_text_ready, which happens earlier

◆ resolve_stkaddrs()

"int" resolve_stkaddrs ( self,
* args )
Parameters
mba(mba_t *)

◆ right_click()

"int" right_click ( self,
* args )

Use hxe_populating_popup instead, in case you want to add items in the popup menu.

Parameters
vu(vdui_t *)

◆ stkpnts()

"int" stkpnts ( self,
* args )
Parameters
mba(mba_t *)
stkpnts(stkpnts_t *) return Microcode error codes code

◆ structural()

"int" structural ( self,
* args )
Parameters
ct(control_graph_t *)

◆ switch_pseudocode()

"int" switch_pseudocode ( self,
* args )

Its text has not been refreshed yet, only cfunc and mba pointers are ready.

Parameters
vu(vdui_t *)

◆ text_ready()

"int" text_ready ( self,
* args )
Parameters
vu(vdui_t *) This event can be used to modify the output text (sv). Obsolete. Please use hxe_func_printed instead.

◆ unhook()

"bool" unhook ( self,
* args )

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: