|
IDAPython 9.0
|
Proxy of C++ Hexrays_Hooks class.
Public Member Functions | |
| __init__ (self, "uint32" _flags=0, "uint32" _hkcb_flags=0x0001) | |
| init(self, _flags=0, _hkcb_flags=0x0001) -> Hexrays_Hooks | |
| "bool" | hook (self) |
| hook(self) -> bool | |
| "bool" | unhook (self) |
| unhook(self) -> bool | |
| "int" | flowchart (self, "qflow_chart_t" fc, "mba_t" mba) |
| flowchart(self, fc, mba) -> int Flowchart has been generated. | |
| "int" | stkpnts (self, "mba_t" mba, "stkpnts_t *" _sps) |
| stkpnts(self, mba, _sps) -> int SP change points have been calculated. | |
| "int" | prolog (self, "mba_t" mba, "qflow_chart_t" fc, "bitset_t" reachable_blocks, "int" decomp_flags) |
| prolog(self, mba, fc, reachable_blocks, decomp_flags) -> int Prolog analysis has been finished. | |
| "int" | microcode (self, "mba_t" mba) |
| microcode(self, mba) -> int Microcode has been generated. | |
| "int" | preoptimized (self, "mba_t" mba) |
| preoptimized(self, mba) -> int Microcode has been preoptimized. | |
| "int" | locopt (self, "mba_t" mba) |
| locopt(self, mba) -> int Basic block level optimization has been finished. | |
| "int" | prealloc (self, "mba_t" mba) |
| prealloc(self, mba) -> int Local variables: preallocation step begins. | |
| "int" | glbopt (self, "mba_t" mba) |
| glbopt(self, mba) -> int Global optimization has been finished. | |
| "int" | pre_structural (self, "control_graph_t *" ct, "cfunc_t" cfunc, "simple_graph_t" g) |
| pre_structural(self, ct, cfunc, g) -> int Structure analysis is starting. | |
| "int" | structural (self, "control_graph_t *" ct) |
| structural(self, ct) -> int Structural analysis has been finished. | |
| "int" | maturity (self, "cfunc_t" cfunc, "ctree_maturity_t" new_maturity) |
| maturity(self, cfunc, new_maturity) -> int Ctree maturity level is being changed. | |
| "int" | interr (self, "int" errcode) |
| interr(self, errcode) -> int Internal error has occurred. | |
| "int" | combine (self, "mblock_t" blk, "minsn_t" insn) |
| combine(self, blk, insn) -> int Trying to combine instructions of basic block. | |
| "int" | print_func (self, "cfunc_t" cfunc, "vc_printer_t" vp) |
| print_func(self, cfunc, vp) -> int Printing ctree and generating text. | |
| "int" | func_printed (self, "cfunc_t" cfunc) |
| func_printed(self, cfunc) -> int Function text has been generated. | |
| "int" | resolve_stkaddrs (self, "mba_t" mba) |
| resolve_stkaddrs(self, mba) -> int The optimizer is about to resolve stack addresses. | |
| "PyObject *" | build_callinfo (self, "mblock_t" blk, "tinfo_t" type) |
| build_callinfo(self, blk, type) -> PyObject * Analyzing a call instruction. | |
| "int" | callinfo_built (self, "mblock_t" blk) |
| callinfo_built(self, blk) -> int A call instruction has been anallyzed. | |
| "int" | calls_done (self, "mba_t" mba) |
| calls_done(self, mba) -> int All calls have been analyzed. | |
| "int" | begin_inlining (self, "codegen_t" cdg, "int" decomp_flags) |
| begin_inlining(self, cdg, decomp_flags) -> int Starting to inline outlined functions. | |
| "int" | inlining_func (self, "codegen_t" cdg, "int" blk, "mba_ranges_t" mbr) |
| inlining_func(self, cdg, blk, mbr) -> int A set of ranges is going to be inlined. | |
| "int" | inlined_func (self, "codegen_t" cdg, "int" blk, "mba_ranges_t" mbr, "int" i1, "int" i2) |
| inlined_func(self, cdg, blk, mbr, i1, i2) -> int A set of ranges got inlined. | |
| "int" | collect_warnings (self, "qstrvec_t *" warnings, "cfunc_t" cfunc) |
| collect_warnings(self, warnings, cfunc) -> int Collect warning messages from plugins. | |
| "int" | open_pseudocode (self, "vdui_t" vu) |
| open_pseudocode(self, vu) -> int New pseudocode view has been opened. | |
| "int" | switch_pseudocode (self, "vdui_t" vu) |
| switch_pseudocode(self, vu) -> int Existing pseudocode view has been reloaded with a new function. | |
| "int" | refresh_pseudocode (self, "vdui_t" vu) |
| refresh_pseudocode(self, vu) -> int Existing pseudocode text has been refreshed. | |
| "int" | close_pseudocode (self, "vdui_t" vu) |
| close_pseudocode(self, vu) -> int Pseudocode view is being closed. | |
| "int" | keyboard (self, "vdui_t" vu, "int" key_code, "int" shift_state) |
| keyboard(self, vu, key_code, shift_state) -> int Keyboard has been hit. | |
| "int" | right_click (self, "vdui_t" vu) |
| right_click(self, vu) -> int Mouse right click. | |
| "int" | double_click (self, "vdui_t" vu, "int" shift_state) |
| double_click(self, vu, shift_state) -> int Mouse double click. | |
| "int" | curpos (self, "vdui_t" vu) |
| curpos(self, vu) -> int Current cursor position has been changed. | |
| "PyObject *" | create_hint (self, "vdui_t" vu) |
| create_hint(self, vu) -> PyObject * Create a hint for the current item. | |
| "int" | text_ready (self, "vdui_t" vu) |
| text_ready(self, vu) -> int Decompiled text is ready. | |
| "int" | populating_popup (self, "TWidget *" widget, "TPopupMenu *" popup_handle, "vdui_t" vu) |
| populating_popup(self, widget, popup_handle, vu) -> int Populating popup menu. | |
| "int" | lvar_name_changed (self, "vdui_t" vu, "lvar_t" v, "char const *" name, "bool" is_user_name) |
| lvar_name_changed(self, vu, v, name, is_user_name) -> int Local variable got renamed. | |
| "int" | lvar_type_changed (self, "vdui_t" vu, "lvar_t" v, "tinfo_t" tinfo) |
| lvar_type_changed(self, vu, v, tinfo) -> int Local variable type got changed. | |
| "int" | lvar_cmt_changed (self, "vdui_t" vu, "lvar_t" v, "char const *" cmt) |
| lvar_cmt_changed(self, vu, v, cmt) -> int Local variable comment got changed. | |
| "int" | lvar_mapping_changed (self, "vdui_t" vu, "lvar_t" frm, "lvar_t" to) |
| lvar_mapping_changed(self, vu, frm, to) -> int Local variable mapping got changed. | |
| "int" | cmt_changed (self, "cfunc_t" cfunc, "treeloc_t" loc, "char const *" cmt) |
| 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") | |
| __init__ | ( | self, | |
| "uint32" | _flags = 0, | ||
| "uint32" | _hkcb_flags = 0x0001 ) |
| _flags | uint32 |
| _hkcb_flags | uint32 |
| __disown__ | ( | self | ) |
| "int" begin_inlining | ( | self, | |
| "codegen_t" | cdg, | ||
| "int" | decomp_flags ) |
| cdg | (codegen_t *) |
| decomp_flags | (int) |
| "PyObject *" build_callinfo | ( | self, | |
| "mblock_t" | blk, | ||
| "tinfo_t" | type ) |
| blk | (mblock_t *) blk->tail is the call. |
| type | (tinfo_t *) buffer for the output type. |
| "int" callinfo_built | ( | self, | |
| "mblock_t" | blk ) |
| blk | (mblock_t *) blk->tail is the call. |
| "int" calls_done | ( | self, | |
| "mba_t" | mba ) |
| mba | (mba_t *) This event is generated immediately after analyzing all calls, before any optimizitions, call unmerging and block merging. |
| "int" close_pseudocode | ( | self, | |
| "vdui_t" | vu ) |
| vu | (vdui_t *) |
| "int" cmt_changed | ( | self, | |
| "cfunc_t" | cfunc, | ||
| "treeloc_t" | loc, | ||
| "char const *" | cmt ) |
| "int" collect_warnings | ( | self, | |
| "qstrvec_t *" | warnings, | ||
| "cfunc_t" | cfunc ) |
These warnings will be displayed at the function header, after the user-defined comments.
| warnings | (qstrvec_t *) |
| cfunc | (cfunc_t *) |
| "int" combine | ( | self, | |
| "mblock_t" | blk, | ||
| "minsn_t" | insn ) |
| "PyObject *" create_hint | ( | self, | |
| "vdui_t" | vu ) |
| vu | (vdui_t *) |
| 0 | continue collecting hints with other subscribers |
| 1 | stop collecting hints |
| "int" curpos | ( | self, | |
| "vdui_t" | vu ) |
(for example, by left-clicking or using keyboard)
| vu | (vdui_t *) |
| "int" double_click | ( | self, | |
| "vdui_t" | vu, | ||
| "int" | shift_state ) |
| vu | (vdui_t *) |
| shift_state | (int) Should return: 1 if the event has been handled |
| "int" flowchart | ( | self, | |
| "qflow_chart_t" | fc, | ||
| "mba_t" | mba ) |
| fc | (qflow_chart_t *) |
| mba | (mba_t *) |
| "int" func_printed | ( | self, | |
| "cfunc_t" | cfunc ) |
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.
| cfunc | (cfunc_t *) |
| "int" glbopt | ( | self, | |
| "mba_t" | mba ) |
If microcode is modified, MERR_LOOP must be returned. It will cause a complete restart of the optimization.
| mba | (mba_t *) |
| "bool" hook | ( | self | ) |
| "int" inlined_func | ( | self, | |
| "codegen_t" | cdg, | ||
| "int" | blk, | ||
| "mba_ranges_t" | mbr, | ||
| "int" | i1, | ||
| "int" | i2 ) |
| cdg | (codegen_t *) |
| blk | (int) the block containing call/jump to inline |
| mbr | (mba_ranges_t *) the range to inline |
| i1 | (int) blknum of the first inlined block |
| i2 | (int) blknum of the last inlined block (excluded) |
| "int" inlining_func | ( | self, | |
| "codegen_t" | cdg, | ||
| "int" | blk, | ||
| "mba_ranges_t" | mbr ) |
| cdg | (codegen_t *) |
| blk | (int) the block containing call/jump to inline |
| mbr | (mba_ranges_t *) the range to inline |
| "int" interr | ( | self, | |
| "int" | errcode ) |
| errcode | (int ) |
| "int" keyboard | ( | self, | |
| "vdui_t" | vu, | ||
| "int" | key_code, | ||
| "int" | shift_state ) |
| vu | (vdui_t *) |
| key_code | (int) VK_... |
| shift_state | (int) Should return: 1 if the event has been handled |
| "int" locopt | ( | self, | |
| "mba_t" | mba ) |
| mba | (mba_t *) |
| "int" lvar_cmt_changed | ( | self, | |
| "vdui_t" | vu, | ||
| "lvar_t" | v, | ||
| "char const *" | cmt ) |
| "int" lvar_mapping_changed | ( | self, | |
| "vdui_t" | vu, | ||
| "lvar_t" | frm, | ||
| "lvar_t" | to ) |
| "int" lvar_name_changed | ( | self, | |
| "vdui_t" | vu, | ||
| "lvar_t" | v, | ||
| "char const *" | name, | ||
| "bool" | is_user_name ) |
| "int" lvar_type_changed | ( | self, | |
| "vdui_t" | vu, | ||
| "lvar_t" | v, | ||
| "tinfo_t" | tinfo ) |
| "int" maturity | ( | self, | |
| "cfunc_t" | cfunc, | ||
| "ctree_maturity_t" | new_maturity ) |
| cfunc | (cfunc_t *) |
| new_maturity | (ctree_maturity_t) |
| "int" microcode | ( | self, | |
| "mba_t" | mba ) |
| mba | (mba_t *) |
| "int" open_pseudocode | ( | self, | |
| "vdui_t" | vu ) |
| vu | (vdui_t *) |
| "int" populating_popup | ( | self, | |
| "TWidget *" | widget, | ||
| "TPopupMenu *" | popup_handle, | ||
| "vdui_t" | vu ) |
We can add menu items now.
| widget | (TWidget *) |
| popup_handle | (TPopupMenu *) |
| vu | (vdui_t *) |
| "int" pre_structural | ( | self, | |
| "control_graph_t *" | ct, | ||
| "cfunc_t" | cfunc, | ||
| "simple_graph_t" | g ) |
| ct | (control_graph_t *) in/out: control graph |
| cfunc | (cfunc_t *) in: the current function |
| g | (const simple_graph_t *) in: control flow graph |
| "int" prealloc | ( | self, | |
| "mba_t" | mba ) |
| mba | (mba_t *) This event may occur several times. Should return: 1 if modified microcode Negative values are Microcode error codes error codes |
| "int" preoptimized | ( | self, | |
| "mba_t" | mba ) |
| mba | (mba_t *) |
| "int" print_func | ( | self, | |
| "cfunc_t" | cfunc, | ||
| "vc_printer_t" | vp ) |
| 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. |
| "int" prolog | ( | self, | |
| "mba_t" | mba, | ||
| "qflow_chart_t" | fc, | ||
| "bitset_t" | reachable_blocks, | ||
| "int" | decomp_flags ) |
| "int" refresh_pseudocode | ( | self, | |
| "vdui_t" | vu ) |
Adding/removing pseudocode lines is forbidden in this event.
| vu | (vdui_t *) See also hxe_text_ready, which happens earlier |
| "int" resolve_stkaddrs | ( | self, | |
| "mba_t" | mba ) |
| mba | (mba_t *) |
| "int" right_click | ( | self, | |
| "vdui_t" | vu ) |
Use hxe_populating_popup instead, in case you want to add items in the popup menu.
| vu | (vdui_t *) |
| "int" stkpnts | ( | self, | |
| "mba_t" | mba, | ||
| "stkpnts_t *" | _sps ) |
| mba | (mba_t *) |
| _sps | stkpnts_t * |
| "int" structural | ( | self, | |
| "control_graph_t *" | ct ) |
| ct | (control_graph_t *) |
| "int" switch_pseudocode | ( | self, | |
| "vdui_t" | vu ) |
Its text has not been refreshed yet, only cfunc and mba pointers are ready.
| vu | (vdui_t *) |
| "int" text_ready | ( | self, | |
| "vdui_t" | vu ) |
| vu | (vdui_t *) This event can be used to modify the output text (sv). Obsolete. Please use hxe_func_printed instead. |
| "bool" unhook | ( | self | ) |
|
static |