# index.html.md # IDAPython API Reference IDAPython allows you to create custom scripts and plugins that enhance IDA’s core functionality. This reference documentation covers 50+ modules for disassembly manipulation, decompilation, debugging, and UI customization. You can explore the IDAPython API by navigating the modules below, or use the quick reference to jump straight to what you need. ## Quick Reference by Task ### Reading/Writing Bytes * [ida_bytes](ida_bytes/index.md): [`get_byte`](ida_bytes/index.md#ida_bytes.get_byte), [`patch_byte`](ida_bytes/index.md#ida_bytes.patch_byte), [`get_flags`](ida_bytes/index.md#ida_bytes.get_flags), [`get_strlit_contents`](ida_bytes/index.md#ida_bytes.get_strlit_contents) * [idc](idc/index.md): [`get_wide_byte`](idc/index.md#idc.get_wide_byte), [`patch_byte`](idc/index.md#idc.patch_byte), [`get_strlit_contents`](idc/index.md#idc.get_strlit_contents) ### Working with Functions * [ida_funcs](ida_funcs/index.md): [`get_func`](ida_funcs/index.md#id6), [`add_func`](ida_funcs/index.md#ida_funcs.add_func), [`get_func_name`](ida_funcs/index.md#ida_funcs.get_func_name), [`func_t`](ida_funcs/index.md#ida_funcs.func_t) * [ida_frame](ida_frame/index.md): `get_frame`, `add_stkvar`, [`get_spd`](ida_frame/index.md#id46) * [idautils](idautils/index.md): [`Functions()`](idautils/index.md#idautils.Functions), [`FuncItems()`](idautils/index.md#idautils.FuncItems) ### Names and Labels * [ida_name](ida_name/index.md): [`set_name`](ida_name/index.md#ida_name.set_name), [`get_name`](ida_name/index.md#ida_name.get_name), [`demangle_name`](ida_name/index.md#ida_name.demangle_name) * [idc](idc/index.md): [`set_name`](idc/index.md#idc.set_name), [`get_name`](idc/index.md#idc.get_name) ### Segments * [ida_segment](ida_segment/index.md): [`get_segm_by_name`](ida_segment/index.md#id11), [`add_segm`](ida_segment/index.md#ida_segment.add_segm), [`segment_t`](ida_segment/index.md#ida_segment.segment_t) * [idautils](idautils/index.md): [`Segments()`](idautils/index.md#idautils.Segments) ### Cross-References * [ida_xref](ida_xref/index.md): [`add_cref`](ida_xref/index.md#ida_xref.add_cref), [`add_dref`](ida_xref/index.md#ida_xref.add_dref), [`get_first_cref_to`](ida_xref/index.md#ida_xref.get_first_cref_to) * [idautils](idautils/index.md): [`XrefsTo()`](idautils/index.md#idautils.XrefsTo), [`XrefsFrom()`](idautils/index.md#idautils.XrefsFrom) ### Types and Structures * [ida_typeinf](ida_typeinf/index.md): [`tinfo_t`](ida_typeinf/index.md#ida_typeinf.tinfo_t), [`get_idati`](ida_typeinf/index.md#ida_typeinf.get_idati), [`parse_decl`](ida_typeinf/index.md#ida_typeinf.parse_decl) * `ida_struct` *(deprecated — use ida_typeinf instead)*: `get_struc`, `add_struc_member` ### Decompilation * [ida_hexrays](ida_hexrays/index.md): [`decompile`](ida_hexrays/index.md#id0), [`cfunc_t`](ida_hexrays/index.md#ida_hexrays.cfunc_t), [`citem_t`](ida_hexrays/index.md#ida_hexrays.citem_t), [`mba_t`](ida_hexrays/index.md#ida_hexrays.mba_t), [`Hexrays_Hooks`](ida_hexrays/index.md#ida_hexrays.Hexrays_Hooks) ### UI and Dialogs * [ida_kernwin](ida_kernwin/index.md): [`ask_yn`](ida_kernwin/index.md#ida_kernwin.ask_yn), [`ask_str`](ida_kernwin/index.md#ida_kernwin.ask_str), [`Choose`](ida_kernwin/index.md#ida_kernwin.Choose), [`action_handler_t`](ida_kernwin/index.md#ida_kernwin.action_handler_t), [`register_action`](ida_kernwin/index.md#ida_kernwin.register_action) * [ida_graph](ida_graph/index.md): [`GraphViewer`](ida_graph/index.md#ida_graph.GraphViewer) ### Debugging * [ida_dbg](ida_dbg/index.md): [`run_to`](ida_dbg/index.md#ida_dbg.run_to), [`step_into`](ida_dbg/index.md#ida_dbg.step_into), [`get_reg_val`](ida_dbg/index.md#ida_dbg.get_reg_val), [`add_bpt`](ida_dbg/index.md#ida_dbg.add_bpt) ### Search * [ida_search](ida_search/index.md): `find_binary`, [`find_text`](ida_search/index.md#ida_search.find_text) * [idautils](idautils/index.md): [`Heads()`](idautils/index.md#idautils.Heads) ## Module Reference ### Essential (Start Here) * [idautils](idautils/index.md) — High-level iteration: [`Functions()`](idautils/index.md#idautils.Functions), [`Segments()`](idautils/index.md#idautils.Segments), [`Heads()`](idautils/index.md#idautils.Heads), [`XrefsTo()`](idautils/index.md#idautils.XrefsTo), [`XrefsFrom()`](idautils/index.md#idautils.XrefsFrom), [`Names()`](idautils/index.md#idautils.Names) * [idc](idc/index.md) — IDC compatibility layer: [`get_wide_byte`](idc/index.md#idc.get_wide_byte), [`set_name`](idc/index.md#idc.set_name), [`get_func_name`](idc/index.md#idc.get_func_name), [`add_func`](idc/index.md#idc.add_func) * [ida_idaapi](ida_idaapi/index.md) — Plugin base class, [`BADADDR`](ida_idaapi/index.md#ida_idaapi.BADADDR), [`ea_t`](ida_idaapi/index.md#ida_idaapi.ea_t), [`plugin_t`](ida_idaapi/index.md#ida_idaapi.plugin_t) * [idaapi](idaapi/index.md) — Legacy compatibility module ### Bytes and Flags * [ida_bytes](ida_bytes/index.md) — [`get_byte`](ida_bytes/index.md#ida_bytes.get_byte), [`patch_byte`](ida_bytes/index.md#ida_bytes.patch_byte), [`get_flags`](ida_bytes/index.md#ida_bytes.get_flags), [`del_items`](ida_bytes/index.md#ida_bytes.del_items), [`create_data`](ida_bytes/index.md#ida_bytes.create_data), [`get_strlit_contents`](ida_bytes/index.md#ida_bytes.get_strlit_contents); `flags64_t` manipulation * [ida_nalt](ida_nalt/index.md) — Netnode altvals/supvals: [`get_aflags`](ida_nalt/index.md#ida_nalt.get_aflags), [`set_aflags`](ida_nalt/index.md#ida_nalt.set_aflags), [`refinfo_t`](ida_nalt/index.md#ida_nalt.refinfo_t) ### Functions * [ida_funcs](ida_funcs/index.md) — [`func_t`](ida_funcs/index.md#ida_funcs.func_t), [`get_func`](ida_funcs/index.md#id6), [`add_func`](ida_funcs/index.md#ida_funcs.add_func), [`del_func`](ida_funcs/index.md#ida_funcs.del_func), [`get_func_qty`](ida_funcs/index.md#ida_funcs.get_func_qty), [`set_func_cmt`](ida_funcs/index.md#id13); use with [ida_frame](ida_frame/index.md), [ida_name](ida_name/index.md) * [ida_frame](ida_frame/index.md) — Stack frames: `get_frame`, `add_stkvar`, [`get_spd`](ida_frame/index.md#id46) ### Names * [ida_name](ida_name/index.md) — [`set_name`](ida_name/index.md#ida_name.set_name), [`get_name`](ida_name/index.md#ida_name.get_name), [`get_name_ea`](ida_name/index.md#ida_name.get_name_ea), [`demangle_name`](ida_name/index.md#ida_name.demangle_name), `SN_*` flags * [ida_entry](ida_entry/index.md) — Entry points: [`add_entry`](ida_entry/index.md#ida_entry.add_entry), [`get_entry_qty`](ida_entry/index.md#ida_entry.get_entry_qty), [`get_entry`](ida_entry/index.md#ida_entry.get_entry) ### Segments * [ida_segment](ida_segment/index.md) — [`segment_t`](ida_segment/index.md#ida_segment.segment_t), [`get_segm_by_name`](ida_segment/index.md#id11), [`add_segm_ex`](ida_segment/index.md#id4), [`getseg`](ida_segment/index.md#id5), [`get_segm_qty`](ida_segment/index.md#ida_segment.get_segm_qty) * [ida_segregs](ida_segregs/index.md) — Segment registers: [`get_sreg`](ida_segregs/index.md#ida_segregs.get_sreg), [`set_default_sreg_value`](ida_segregs/index.md#id0) * [ida_range](ida_range/index.md) — [`range_t`](ida_range/index.md#ida_range.range_t) base class for address ranges ### Cross-References * [ida_xref](ida_xref/index.md) — [`add_cref`](ida_xref/index.md#ida_xref.add_cref), [`add_dref`](ida_xref/index.md#ida_xref.add_dref), [`del_cref`](ida_xref/index.md#ida_xref.del_cref), [`get_first_cref_to`](ida_xref/index.md#ida_xref.get_first_cref_to), [`xrefblk_t`](ida_xref/index.md#ida_xref.xrefblk_t); `fl_*` and `dr_*` constants ### Search * [ida_search](ida_search/index.md) — `find_binary`, [`find_text`](ida_search/index.md#ida_search.find_text), [`find_code`](ida_search/index.md#ida_search.find_code), `SEARCH_*` flags ### Decompiler (Hex-Rays) * [ida_hexrays](ida_hexrays/index.md) — [`decompile`](ida_hexrays/index.md#id0), [`cfunc_t`](ida_hexrays/index.md#ida_hexrays.cfunc_t), [`citem_t`](ida_hexrays/index.md#ida_hexrays.citem_t), [`cexpr_t`](ida_hexrays/index.md#ida_hexrays.cexpr_t), [`cinsn_t`](ida_hexrays/index.md#ida_hexrays.cinsn_t), [`mba_t`](ida_hexrays/index.md#ida_hexrays.mba_t), [`minsn_t`](ida_hexrays/index.md#ida_hexrays.minsn_t), [`lvar_t`](ida_hexrays/index.md#ida_hexrays.lvar_t), [`Hexrays_Hooks`](ida_hexrays/index.md#ida_hexrays.Hexrays_Hooks), [`ctree_visitor_t`](ida_hexrays/index.md#ida_hexrays.ctree_visitor_t) ### Types * [ida_typeinf](ida_typeinf/index.md) — [`tinfo_t`](ida_typeinf/index.md#ida_typeinf.tinfo_t), [`parse_decl`](ida_typeinf/index.md#ida_typeinf.parse_decl), [`get_idati`](ida_typeinf/index.md#ida_typeinf.get_idati), [`apply_tinfo`](ida_typeinf/index.md#ida_typeinf.apply_tinfo), [`udt_type_data_t`](ida_typeinf/index.md#ida_typeinf.udt_type_data_t), [`func_type_data_t`](ida_typeinf/index.md#ida_typeinf.func_type_data_t) ### UI * [ida_kernwin](ida_kernwin/index.md) — [`ask_yn`](ida_kernwin/index.md#ida_kernwin.ask_yn), [`ask_str`](ida_kernwin/index.md#ida_kernwin.ask_str), [`jumpto`](ida_kernwin/index.md#ida_kernwin.jumpto), [`refresh_idaview`](ida_kernwin/index.md#ida_kernwin.refresh_idaview), [`Choose`](ida_kernwin/index.md#ida_kernwin.Choose), [`simplecustviewer_t`](ida_kernwin/index.md#ida_kernwin.simplecustviewer_t), [`action_handler_t`](ida_kernwin/index.md#ida_kernwin.action_handler_t), [`register_action`](ida_kernwin/index.md#ida_kernwin.register_action), [`UI_Hooks`](ida_kernwin/index.md#ida_kernwin.UI_Hooks) * [ida_lines](ida_lines/index.md) — [`generate_disasm_line`](ida_lines/index.md#ida_lines.generate_disasm_line), [`tag_remove`](ida_lines/index.md#ida_lines.tag_remove), [`COLSTR`](ida_lines/index.md#ida_lines.COLSTR), `COLOR_*` * [ida_graph](ida_graph/index.md) — [`GraphViewer`](ida_graph/index.md#ida_graph.GraphViewer), [`set_node_info`](ida_graph/index.md#ida_graph.set_node_info), [`get_graph_viewer`](ida_graph/index.md#ida_graph.get_graph_viewer) ### Debugging * [ida_dbg](ida_dbg/index.md) — [`run_to`](ida_dbg/index.md#ida_dbg.run_to), [`step_into`](ida_dbg/index.md#ida_dbg.step_into), [`step_over`](ida_dbg/index.md#ida_dbg.step_over), [`get_reg_val`](ida_dbg/index.md#ida_dbg.get_reg_val), [`add_bpt`](ida_dbg/index.md#ida_dbg.add_bpt), [`DBG_Hooks`](ida_dbg/index.md#ida_dbg.DBG_Hooks) * [ida_idd](ida_idd/index.md) — [`debugger_t`](ida_idd/index.md#ida_idd.debugger_t), [`register_info_t`](ida_idd/index.md#ida_idd.register_info_t), `bpt_t` ### Instructions * [ida_ua](ida_ua/index.md) — [`insn_t`](ida_ua/index.md#ida_ua.insn_t), [`op_t`](ida_ua/index.md#ida_ua.op_t), [`decode_insn`](ida_ua/index.md#ida_ua.decode_insn), [`create_insn`](ida_ua/index.md#ida_ua.create_insn), [`print_insn_mnem`](ida_ua/index.md#ida_ua.print_insn_mnem) * [ida_idp](ida_idp/index.md) — [`processor_t`](ida_idp/index.md#ida_idp.processor_t), [`ph`](ida_idp/index.md#ida_idp.ph) (processor handle), [`IDP_Hooks`](ida_idp/index.md#ida_idp.IDP_Hooks) * `ida_allins` — Instruction opcodes (`NN_*`, `ARM_*`, etc.) ### Database * [ida_netnode](ida_netnode/index.md) — [`netnode`](ida_netnode/index.md#ida_netnode.netnode) class for persistent storage: [`altval`](ida_netnode/index.md#ida_netnode.netnode.altval), [`supval`](ida_netnode/index.md#ida_netnode.netnode.supval), [`hashval`](ida_netnode/index.md#ida_netnode.netnode.hashval) * [ida_loader](ida_loader/index.md) — `load_file`, [`save_database`](ida_loader/index.md#ida_loader.save_database), [`snapshot_t`](ida_loader/index.md#ida_loader.snapshot_t) * [ida_auto](ida_auto/index.md) — [`auto_wait`](ida_auto/index.md#ida_auto.auto_wait), [`plan_ea`](ida_auto/index.md#ida_auto.plan_ea), `AU_*` queue constants ### Analysis * [ida_problems](ida_problems/index.md) — `PR_*` problem types, [`get_problem`](ida_problems/index.md#ida_problems.get_problem) * [ida_offset](ida_offset/index.md) — [`op_offset`](ida_offset/index.md#ida_offset.op_offset), [`get_offbase`](ida_offset/index.md#ida_offset.get_offbase) * [ida_fixup](ida_fixup/index.md) — [`fixup_data_t`](ida_fixup/index.md#ida_fixup.fixup_data_t), [`set_fixup`](ida_fixup/index.md#ida_fixup.set_fixup), [`get_fixup`](ida_fixup/index.md#ida_fixup.get_fixup) * [ida_libfuncs](ida_libfuncs/index.md) — `apply_idasgn_to` (FLIRT) ### Lumina * [ida_lumina](ida_lumina/index.md) — [`calc_func_metadata`](ida_lumina/index.md#id0), [`apply_metadata`](ida_lumina/index.md#ida_lumina.apply_metadata), [`score_metadata`](ida_lumina/index.md#ida_lumina.score_metadata), [`backup_metadata`](ida_lumina/index.md#ida_lumina.backup_metadata), [`revert_metadata`](ida_lumina/index.md#ida_lumina.revert_metadata), [`get_server_connection`](ida_lumina/index.md#ida_lumina.get_server_connection), [`func_info_t`](ida_lumina/index.md#ida_lumina.func_info_t), [`lumina_client_t`](ida_lumina/index.md#ida_lumina.lumina_client_t) * [lumina_model](lumina_model/index.md) — High-level helpers: [`func_md_t`](lumina_model/index.md#lumina_model.func_md_t), [`idb_md_t`](lumina_model/index.md#lumina_model.idb_md_t), [`differ_t`](lumina_model/index.md#lumina_model.differ_t) ### Utility * [ida_pro](ida_pro/index.md) — `qvector`, `qstring`, `ea_t`, `BADADDR` * [ida_ida](ida_ida/index.md) — [`idainfo`](ida_ida/index.md#ida_ida.idainfo) (`inf` structure), `cvar.inf` * [ida_expr](ida_expr/index.md) — [`idc_value_t`](ida_expr/index.md#ida_expr.idc_value_t), [`eval_idc_expr`](ida_expr/index.md#ida_expr.eval_idc_expr) * [ida_strlist](ida_strlist/index.md) — [`string_info_t`](ida_strlist/index.md#ida_strlist.string_info_t), [`get_strlist_qty`](ida_strlist/index.md#ida_strlist.get_strlist_qty) * [ida_diskio](ida_diskio/index.md) — [`idadir`](ida_diskio/index.md#ida_diskio.idadir), [`getsysfile`](ida_diskio/index.md#ida_diskio.getsysfile) * [ida_registry](ida_registry/index.md) — [`reg_read_string`](ida_registry/index.md#ida_registry.reg_read_string), [`reg_write_string`](ida_registry/index.md#ida_registry.reg_write_string) ### Less Common * [ida_gdl](ida_gdl/index.md) — [`qflow_chart_t`](ida_gdl/index.md#ida_gdl.qflow_chart_t), GDL graph export * [ida_bitrange](ida_bitrange/index.md) — [`bitrange_t`](ida_bitrange/index.md#ida_bitrange.bitrange_t) for bit-level operations * [ida_tryblks](ida_tryblks/index.md) — [`tryblk_t`](ida_tryblks/index.md#ida_tryblks.tryblk_t) exception handling info * [ida_undo](ida_undo/index.md) — [`perform_undo`](ida_undo/index.md#ida_undo.perform_undo), [`create_undo_point`](ida_undo/index.md#ida_undo.create_undo_point) * [ida_merge](ida_merge/index.md) — Database merging * [ida_mergemod](ida_mergemod/index.md) — Merge module interface * [ida_srclang](ida_srclang/index.md) — Source language detection * [ida_regfinder](ida_regfinder/index.md) — Register value tracking * [ida_fpro](ida_fpro/index.md) — File operations * [ida_ieee](ida_ieee/index.md) — IEEE float conversion * [ida_dirtree](ida_dirtree/index.md) — Folder organization * [ida_moves](ida_moves/index.md) — Navigation history * [idadex](idadex/index.md) — Extension utilities * [init](init/index.md) — Initialization ## Common Patterns ```python # Iterate all functions for ea in idautils.Functions(): name = idc.get_func_name(ea) # Get xrefs to address for xref in idautils.XrefsTo(ea): print(hex(xref.frm)) # Decompile function cfunc = ida_hexrays.decompile(ea) print(cfunc) # Create action class MyHandler(ida_kernwin.action_handler_t): def activate(self, ctx): ... def update(self, ctx): return ida_kernwin.AST_ENABLE_ALWAYS ``` ## Other Documentation Resources Explore the [Developer Guide](https://docs.hex-rays.com/developer-guide) in our Hex-Rays Documentation Hub: * **Cookbook**: Check our [examples library](https://docs.hex-rays.com/developer-guide/idapython/idapython-examples), which demonstrates practical implementation for the IDAPython API, complementing this reference. The samples include recent examples for [working with types](https://docs.hex-rays.com/developer-guide/idapython/idapython-examples#working-with-types). * **Getting Started**: If you’re new to IDAPython, we recommend starting with [Getting Started with IDAPython](https://docs.hex-rays.com/developer-guide/idapython/idapython-getting-started). These docs introduce key concepts and help you begin exploring IDAPython’s capabilities. * **Migration Guide**: Read our [Porting Guide](https://docs.hex-rays.com/developer-guide/idapython/idapython-porting-guide-ida-9#how-to-examples) that streamlines the process of updating your current scripts and plugins to the latest version of IDAPython API, along with how-to examples. * **Release Notes**: For a complete list of recent API changes, refer to the latest [Release Notes](https://docs.hex-rays.com/release-notes). * **C++ SDK**: For the native C++ SDK reference, see the [C++ SDK documentation](https://cpp.docs.hex-rays.com/). If you need further assistance, you can [contact us](https://hex-rays.com/contact) or [submit a request](https://get.support.hex-rays.com/servicedesk/customer/portals) to our support team. # index.html.md # create_structure_programmatically summary: create & populate a structure description: : Usage of the API to create & populate a structure with members of different types. author: Gergely Erdelyi ([gergely.erdelyi@d-dome.net](mailto:gergely.erdelyi@d-dome.net)) level: intermediate ## Attributes | [`tif`](#create_structure_programmatically.tif) | | |-----------------------------------------------------------------------------|----| | [`simple_types_data`](#create_structure_programmatically.simple_types_data) | | | [`udm`](#id5) | | | [`repr_`](#create_structure_programmatically.repr_) | | | [`udm`](#id5) | | | [`mtif`](#create_structure_programmatically.mtif) | | | [`mudt`](#create_structure_programmatically.mudt) | | | [`tif_btf_int`](#create_structure_programmatically.tif_btf_int) | | | [`udm`](#id5) | | | [`udm`](#id5) | | | [`udm`](#id5) | | | [`udm`](#id5) | | | [`btif`](#create_structure_programmatically.btif) | | | [`bf_nbits`](#create_structure_programmatically.bf_nbits) | | | [`udm`](#id5) | | | [`pflags`](#create_structure_programmatically.pflags) | | ## Module Contents ### create_structure_programmatically.tif ### create_structure_programmatically.simple_types_data ### create_structure_programmatically.udm ### create_structure_programmatically.repr_ ### create_structure_programmatically.udm ### create_structure_programmatically.mtif ### create_structure_programmatically.mudt ### create_structure_programmatically.tif_btf_int ### create_structure_programmatically.udm ### create_structure_programmatically.udm ### create_structure_programmatically.udm ### create_structure_programmatically.udm ### create_structure_programmatically.btif ### create_structure_programmatically.bf_nbits *= 2* ### create_structure_programmatically.udm ### create_structure_programmatically.pflags # index.html.md # lines_rendering summary: dynamically colorize [parts of] lines description: : shows how one can dynamically alter the lines background rendering (as opposed to, say, using ida_nalt.set_item_color()), and also shows how that rendering can be limited to just a few glyphs, not the whole line. level: intermediate ## Attributes | [`lrh`](#lines_rendering.lrh) | | |---------------------------------|----| ## Classes | [`lines_rendering_hooks_t`](#lines_rendering.lines_rendering_hooks_t) | | |-------------------------------------------------------------------------|----| ## Module Contents ### *class* lines_rendering.lines_rendering_hooks_t Bases: [`ida_kernwin.UI_Hooks`](../ida_kernwin/index.md#ida_kernwin.UI_Hooks) #### instantiated_at #### color_info *= []* #### get_lines_rendering_info(out, widget, rin) get lines rendering information * **Parameters:** * **out** – (lines_rendering_output_t ``` * ``` ) * **widget** – (const TWidget ``` * ``` ) * **info** – (const lines_rendering_input_t ``` * ``` ) * **Returns:** void ### lines_rendering.lrh # index.html.md # operand_to_struct_member summary: turn instruction operand into a structure offset description: : The goal of this script is to demonstrate some usage of the type API. In this script, we:
> * ask the user to choose the structure that will be used for
> the conversion. > \* build the structure path and call ida_bytes.op_stroff. In case > an enum is found a modal chooser is displayed in order to select > a member. level: advanced ## Classes | [`union_member_chooser_t`](#operand_to_struct_member.union_member_chooser_t) | Chooser wrapper class. | |--------------------------------------------------------------------------------|--------------------------| ## Functions | [`choose_union_member`](#operand_to_struct_member.choose_union_member)(tif) | Display a chooser containing the list of the union | |-------------------------------------------------------------------------------|------------------------------------------------------| | [`build_strpath`](#operand_to_struct_member.build_strpath)(tif, offset) | Build the structure path and return it. | | [`main`](#operand_to_struct_member.main)(ea) | | ## Module Contents ### *class* operand_to_struct_member.union_member_chooser_t(title, udm_list) Bases: [`ida_kernwin.Choose`](../ida_kernwin/index.md#ida_kernwin.Choose) Chooser wrapper class. Some constants are defined in this class. Please refer to kernwin.hpp for more information. #### items #### icon *= 5* #### OnGetSize() Get the number of elements in the chooser. This callback is mandatory * **Returns:** the number of elements #### OnGetLine(n) Get data for an element This callback is mandatory * **Parameters:** **n** – the index to fetch data for * **Returns:** a list of strings ### operand_to_struct_member.choose_union_member(tif) Display a chooser containing the list of the union members. The selected entry (0-based) is returned or -1. ### operand_to_struct_member.build_strpath(tif, offset) Build the structure path and return it. ### operand_to_struct_member.main(ea) # index.html.md # prevent_jump summary: prevent an action from being triggered description: : Using ida_kernwin.UI_Hooks.preprocess_action, it is possible to respond to a command instead of the action that would otherwise do it. level: beginner ## Attributes | [`phh`](#prevent_jump.phh) | | |------------------------------|----| ## Classes | [`prevent_jump_t`](#prevent_jump.prevent_jump_t) | | |----------------------------------------------------|----| ## Module Contents ### *class* prevent_jump.prevent_jump_t(\_flags: [int](https://docs.python.org/3/library/functions.html#int) = 0, \_hkcb_flags: [int](https://docs.python.org/3/library/functions.html#int) = 1) Bases: [`ida_kernwin.UI_Hooks`](../ida_kernwin/index.md#ida_kernwin.UI_Hooks) #### preprocess_action(action_name) ida ui is about to handle a user action. * **Parameters:** **name** – (const char ``` * ``` ) ui action name. these names can be looked up in ida[tg]ui.cfg * **Returns:** 0: ok * **Returns:** nonzero: a plugin has handled the command ### prevent_jump.phh # index.html.md # list_struct_xrefs summary: list cross-references to a structure description: : The goal of this script is to demonstrate some usage of the type API. In this script, we: \* Ask the user for a structure name. It must already be present in the local types. \* Get its tid \* Create the list of all the reference. \* Print it level: beginner ## Attributes | [`tif`](#list_struct_xrefs.tif) | | |-----------------------------------------|----| | [`ref_eas`](#list_struct_xrefs.ref_eas) | | | [`tid`](#list_struct_xrefs.tid) | | ## Module Contents ### list_struct_xrefs.tif ### list_struct_xrefs.ref_eas *= []* ### list_struct_xrefs.tid # index.html.md # ida_registry Registry related functions. IDA uses the registry to store global configuration options that must persist after IDA has been closed. On Windows, IDA uses the Windows registry directly. On Unix systems, the registry is stored in a file (typically ~/.idapro/ida.reg). The root key for accessing IDA settings in the registry is defined by ROOT_KEY_NAME. ## Attributes | [`IDA_REGISTRY_NAME`](#ida_registry.IDA_REGISTRY_NAME) | | |----------------------------------------------------------|-----------------------------------------------------------------------| | [`HVUI_REGISTRY_NAME`](#ida_registry.HVUI_REGISTRY_NAME) | | | [`ROOT_KEY_NAME`](#ida_registry.ROOT_KEY_NAME) | Default key used to store IDA settings in registry (Windows version). | | [`reg_unknown`](#ida_registry.reg_unknown) | unknown | | [`reg_sz`](#ida_registry.reg_sz) | utf8 string | | [`reg_binary`](#ida_registry.reg_binary) | binary data | | [`reg_dword`](#ida_registry.reg_dword) | 32-bit number | ## Functions | [`reg_read_string`](#ida_registry.reg_read_string)(→ PyObject \*) | Read a string from the registry. | |---------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------| | [`reg_data_type`](#ida_registry.reg_data_type)(→ regval_type_t) | Get data type of a given value. | | [`reg_read_binary`](#ida_registry.reg_read_binary)(→ PyObject \*) | Read binary data from the registry. | | [`reg_write_binary`](#ida_registry.reg_write_binary)(→ PyObject \*) | Write binary data to the registry. | | [`reg_subkey_subkeys`](#ida_registry.reg_subkey_subkeys)(→ PyObject \*) | Get all subkey names of given key. | | [`reg_subkey_values`](#ida_registry.reg_subkey_values)(→ PyObject \*) | Get all value names under given key. | | [`reg_delete_subkey`](#ida_registry.reg_delete_subkey)(→ bool) | Delete a key from the registry. | | [`reg_delete_tree`](#ida_registry.reg_delete_tree)(→ bool) | Delete a subtree from the registry. | | [`reg_delete`](#ida_registry.reg_delete)(→ bool) | Delete a value from the registry. | | [`reg_subkey_exists`](#ida_registry.reg_subkey_exists)(→ bool) | Is there already a key with the given name? | | [`reg_exists`](#ida_registry.reg_exists)(→ bool) | Is there already a value with the given name? | | [`reg_read_strlist`](#ida_registry.reg_read_strlist)(→ List[str]) | Retrieve all string values associated with the given key. | | [`reg_write_strlist`](#ida_registry.reg_write_strlist)(items, subkey) | Write string values associated with the given key. | | [`reg_update_strlist`](#ida_registry.reg_update_strlist)(subkey, add, maxrecs[, rem, ignorecase]) | Add and/or remove items from the list, and possibly trim that list. | | [`reg_write_string`](#ida_registry.reg_write_string)(→ None) | Write a string to the registry. | | [`reg_read_int`](#ida_registry.reg_read_int)(→ int) | Read integer value from the registry. | | [`reg_write_int`](#ida_registry.reg_write_int)(→ None) | Write integer value to the registry. | | [`reg_read_bool`](#ida_registry.reg_read_bool)(→ bool) | Read boolean value from the registry. | | [`reg_write_bool`](#ida_registry.reg_write_bool)(→ None) | Write boolean value to the registry. | | [`reg_update_filestrlist`](#ida_registry.reg_update_filestrlist)(→ None) | Update registry with a file list. Case sensitivity will vary depending on the target OS. | | [`set_registry_name`](#ida_registry.set_registry_name)(→ bool) | | ## Module Contents ### ida_registry.reg_read_string(name: [str](https://docs.python.org/3/library/stdtypes.html#str), subkey: [str](https://docs.python.org/3/library/stdtypes.html#str) = None, \_def: [str](https://docs.python.org/3/library/stdtypes.html#str) = None) → PyObject \* Read a string from the registry. * **Parameters:** * **name** – value name * **subkey** – key name * **Returns:** success ### ida_registry.reg_data_type(name: [str](https://docs.python.org/3/library/stdtypes.html#str), subkey: [str](https://docs.python.org/3/library/stdtypes.html#str) = None) → regval_type_t Get data type of a given value. * **Parameters:** * **name** – value name * **subkey** – key name * **Returns:** false if the [key+]value doesn’t exist ### ida_registry.reg_read_binary(name: [str](https://docs.python.org/3/library/stdtypes.html#str), subkey: [str](https://docs.python.org/3/library/stdtypes.html#str) = None) → PyObject \* Read binary data from the registry. * **Parameters:** * **name** – value name * **subkey** – key name * **Returns:** false if ‘data’ is not large enough to hold all data present. in this case ‘data’ is left untouched. ### ida_registry.reg_write_binary(name: str, py_bytes: PyObject \*, subkey: str = None) → PyObject \* Write binary data to the registry. * **Parameters:** * **name** – value name * **subkey** – key name ### ida_registry.reg_subkey_subkeys(name: [str](https://docs.python.org/3/library/stdtypes.html#str)) → PyObject \* Get all subkey names of given key. ### ida_registry.reg_subkey_values(name: [str](https://docs.python.org/3/library/stdtypes.html#str)) → PyObject \* Get all value names under given key. ### ida_registry.IDA_REGISTRY_NAME ### ida_registry.HVUI_REGISTRY_NAME ### ida_registry.ROOT_KEY_NAME Default key used to store IDA settings in registry (Windows version). ### ida_registry.reg_unknown unknown ### ida_registry.reg_sz utf8 string ### ida_registry.reg_binary binary data ### ida_registry.reg_dword 32-bit number ### ida_registry.reg_delete_subkey(name: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [bool](https://docs.python.org/3/library/functions.html#bool) Delete a key from the registry. ### ida_registry.reg_delete_tree(name: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [bool](https://docs.python.org/3/library/functions.html#bool) Delete a subtree from the registry. ### ida_registry.reg_delete(name: [str](https://docs.python.org/3/library/stdtypes.html#str), subkey: [str](https://docs.python.org/3/library/stdtypes.html#str) = None) → [bool](https://docs.python.org/3/library/functions.html#bool) Delete a value from the registry. * **Parameters:** * **name** – value name * **subkey** – parent key * **Returns:** success ### ida_registry.reg_subkey_exists(name: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [bool](https://docs.python.org/3/library/functions.html#bool) Is there already a key with the given name? ### ida_registry.reg_exists(name: [str](https://docs.python.org/3/library/stdtypes.html#str), subkey: [str](https://docs.python.org/3/library/stdtypes.html#str) = None) → [bool](https://docs.python.org/3/library/functions.html#bool) Is there already a value with the given name? * **Parameters:** * **name** – value name * **subkey** – parent key ### ida_registry.reg_read_strlist(subkey: [str](https://docs.python.org/3/library/stdtypes.html#str)) → List[[str](https://docs.python.org/3/library/stdtypes.html#str)] Retrieve all string values associated with the given key. * **Parameters:** **subkey** – a key from which to read the list of items * **Returns:** the list of items ### ida_registry.reg_write_strlist(items: List[[str](https://docs.python.org/3/library/stdtypes.html#str)], subkey: [str](https://docs.python.org/3/library/stdtypes.html#str)) Write string values associated with the given key. * **Parameters:** * **items** – the list of items to write * **subkey** – a key under which to write the list of items ### ida_registry.reg_update_strlist(subkey: [str](https://docs.python.org/3/library/stdtypes.html#str), add: [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None), maxrecs: [int](https://docs.python.org/3/library/functions.html#int), rem: [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None) = None, ignorecase: [bool](https://docs.python.org/3/library/functions.html#bool) = False) Add and/or remove items from the list, and possibly trim that list. * **Parameters:** * **subkey** – the key under which the list is located * **add** – an item to add to the list, or None * **maxrecs** – the maximum number of items the list should hold * **rem** – an item to remove from the list, or None * **ignorecase** – ignore case for ‘add’ and ‘rem’ ### ida_registry.reg_write_string(name: [str](https://docs.python.org/3/library/stdtypes.html#str), utf8: [str](https://docs.python.org/3/library/stdtypes.html#str), subkey: [str](https://docs.python.org/3/library/stdtypes.html#str) = None) → [None](https://docs.python.org/3/library/constants.html#None) Write a string to the registry. * **Parameters:** * **name** – value name * **utf8** – utf8-encoded string * **subkey** – key name ### ida_registry.reg_read_int(name: [str](https://docs.python.org/3/library/stdtypes.html#str), defval: [int](https://docs.python.org/3/library/functions.html#int), subkey: [str](https://docs.python.org/3/library/stdtypes.html#str) = None) → [int](https://docs.python.org/3/library/functions.html#int) Read integer value from the registry. * **Parameters:** * **name** – value name * **defval** – default value * **subkey** – key name * **Returns:** the value read from the registry, or ‘defval’ if the read failed ### ida_registry.reg_write_int(name: [str](https://docs.python.org/3/library/stdtypes.html#str), value: [int](https://docs.python.org/3/library/functions.html#int), subkey: [str](https://docs.python.org/3/library/stdtypes.html#str) = None) → [None](https://docs.python.org/3/library/constants.html#None) Write integer value to the registry. * **Parameters:** * **name** – value name * **value** – value to write * **subkey** – key name ### ida_registry.reg_read_bool(name: [str](https://docs.python.org/3/library/stdtypes.html#str), defval: [bool](https://docs.python.org/3/library/functions.html#bool), subkey: [str](https://docs.python.org/3/library/stdtypes.html#str) = None) → [bool](https://docs.python.org/3/library/functions.html#bool) Read boolean value from the registry. * **Parameters:** * **name** – value name * **defval** – default value * **subkey** – key name * **Returns:** boolean read from registry, or ‘defval’ if the read failed ### ida_registry.reg_write_bool(name: [str](https://docs.python.org/3/library/stdtypes.html#str), value: [int](https://docs.python.org/3/library/functions.html#int), subkey: [str](https://docs.python.org/3/library/stdtypes.html#str) = None) → [None](https://docs.python.org/3/library/constants.html#None) Write boolean value to the registry. * **Parameters:** * **name** – value name * **value** – boolean to write (nonzero = true) * **subkey** – key name ### ida_registry.reg_update_filestrlist(subkey: [str](https://docs.python.org/3/library/stdtypes.html#str), add: [str](https://docs.python.org/3/library/stdtypes.html#str), maxrecs: [int](https://docs.python.org/3/library/functions.html#int), rem: [str](https://docs.python.org/3/library/stdtypes.html#str) = None) → [None](https://docs.python.org/3/library/constants.html#None) Update registry with a file list. Case sensitivity will vary depending on the target OS. ### ida_registry.set_registry_name(name: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [bool](https://docs.python.org/3/library/functions.html#bool) # index.html.md # init ## Attributes | [`base`](#init.base) | | |----------------------------------------------------------|----| | [`IDAPYTHON_DYNLOAD_BASE`](#init.IDAPYTHON_DYNLOAD_BASE) | | | [`lib_dynload`](#init.lib_dynload) | | | [`all_mods`](#init.all_mods) | | | [`help`](#init.help) | | | [`idausr_python_list`](#init.idausr_python_list) | | | [`userrc`](#init.userrc) | | ## Classes | [`IDAPythonStdOut`](#init.IDAPythonStdOut) | Dummy file-like class that receives stdout and stderr | |--------------------------------------------------------|---------------------------------------------------------| | [`IDAPythonHelpPrompter`](#init.IDAPythonHelpPrompter) | | | [`IDAPythonHelp`](#init.IDAPythonHelp) | | ## Functions | [`runscript`](#init.runscript)(script) | Executes a script. | |------------------------------------------|----------------------| | [`print_banner`](#init.print_banner)() | | ## Module Contents ### init.base *= '/opt/homebrew/opt/python@3.13/Frameworks/Python.framework/Versions/3.13'* ### init.IDAPYTHON_DYNLOAD_BASE *= b'.'* ### init.lib_dynload ### init.all_mods *= 'idaapi,hexrays,allins,auto,bitrange,bytes,dbg,diskio,dirtree,dscu,entry,expr,fixup,fpro,frame,fu...* ### *class* init.IDAPythonStdOut Dummy file-like class that receives stdout and stderr #### encoding *= 'UTF-8'* #### write(text) #### flush() #### isatty() ### init.runscript(script) Executes a script. This function is present for backward compatiblity. Please use idaapi.IDAPython_ExecScript() instead * **Parameters:** **script** – script path * **Returns:** Error string or None on success ### init.print_banner() ### *class* init.IDAPythonHelpPrompter Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### readline() ### *class* init.IDAPythonHelp Bases: `pydoc.Helper` #### help(\*args) ### init.help ### init.idausr_python_list ### init.userrc # index.html.md # list_segment_functions_using_idautils summary: list all functions (and cross-references) in segment description: : List all the functions in the current segment, as well as all the cross-references to them.
Contrary to @list_segment_functions, this uses the somewhat higher-level idautils module. keywords: xrefs see_also: list_segment_functions level: beginner ## Functions | [`main`](#list_segment_functions_using_idautils.main)() | | |-----------------------------------------------------------|----| ## Module Contents ### list_segment_functions_using_idautils.main() # index.html.md # insert_struct_member summary: inject a member in the middle of a structure description: : This sample will retrieve the type info object by its name, find the member at the specified offset, and insert a new member right before it level: intermediate ## Functions | [`insert_gap`](#insert_struct_member.insert_gap)(struct_name, byte_offset, member_type) | | |-------------------------------------------------------------------------------------------|----| ## Module Contents ### insert_struct_member.insert_gap(struct_name: [str](https://docs.python.org/3/library/stdtypes.html#str), byte_offset: [int](https://docs.python.org/3/library/functions.html#int), member_type: [ida_typeinf.tinfo_t](../ida_typeinf/index.md#ida_typeinf.tinfo_t)) # index.html.md # save_and_restore_listing_pos summary: save, and then restore, positions in a listing description: : Shows how it is possible re-implement IDA’s bookmark capability, using 2 custom actions: one action saves the current location, and the other restores it.
Note that, contrary to actual bookmarks, this example:
> * remembers only 1 saved position > * doesn’t save that position in the IDB (and therefore cannot > be restored if IDA is closed & reopened.) keywords: listing, actions see_also: jump_next_comment level: intermediate ## Attributes | [`last_pos`](#save_and_restore_listing_pos.last_pos) | | |--------------------------------------------------------|----| | [`klasses`](#save_and_restore_listing_pos.klasses) | | ## Classes | [`listing_action_handler_t`](#save_and_restore_listing_pos.listing_action_handler_t) | | |----------------------------------------------------------------------------------------|----| | [`last_pos_t`](#save_and_restore_listing_pos.last_pos_t) | | | [`save_position_ah_t`](#save_and_restore_listing_pos.save_position_ah_t) | | | [`restore_position_ah_t`](#save_and_restore_listing_pos.restore_position_ah_t) | | ## Module Contents ### *class* save_and_restore_listing_pos.listing_action_handler_t Bases: [`ida_kernwin.action_handler_t`](../ida_kernwin/index.md#ida_kernwin.action_handler_t) #### update(ctx) Update an action. This is called when the context of the UI changed, and we need to let the action update some of its properties if needed (label, icon, …) In addition, this lets IDA know whether the action is enabled, and when it should be queried for availability again. Note: This callback is not meant to change anything in the application’s state, except by calling one (or many) of the “update_action_\*()” functions on this very action. ### *class* save_and_restore_listing_pos.last_pos_t(widget_title, lochist_entry) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### widget_title #### lochist_entry ### save_and_restore_listing_pos.last_pos *= None* ### *class* save_and_restore_listing_pos.save_position_ah_t Bases: [`listing_action_handler_t`](#save_and_restore_listing_pos.listing_action_handler_t) #### ACTION_NAME *= 'save_and_restore_listing_pos:save_position'* #### ACTION_LABEL *= 'Save position'* #### ACTION_SHORTCUT *= 'Ctrl+Shift+S'* #### HELP_TEXT *= "Press Ctrl+Shift+S in a 'listing' widget such as 'IDA View-A', 'Local Types', 'Pseudocode-A',...* #### activate(ctx) Activate an action. This function implements the core behavior of an action. It is called when the action is triggered, from a menu, from a popup menu, from the toolbar, or programmatically. * **Returns:** non-zero: all IDA windows will be refreshed ### *class* save_and_restore_listing_pos.restore_position_ah_t Bases: [`listing_action_handler_t`](#save_and_restore_listing_pos.listing_action_handler_t) #### ACTION_NAME *= 'save_and_restore_listing_pos:restore_position'* #### ACTION_LABEL *= 'Restore position'* #### ACTION_SHORTCUT *= 'Ctrl+Shift+O'* #### HELP_TEXT *= "Press Ctrl+Shift+O in a 'listing' widget such as 'IDA View-A', 'Local Types', 'Pseudocode-A',...* #### activate(ctx) Activate an action. This function implements the core behavior of an action. It is called when the action is triggered, from a menu, from a popup menu, from the toolbar, or programmatically. * **Returns:** non-zero: all IDA windows will be refreshed ### save_and_restore_listing_pos.klasses # index.html.md # ida_segment Functions that deal with segments. IDA requires that all program addresses belong to segments (each address must belong to exactly one segment). The situation when an address doesn’t belong to any segment is allowed as a temporary situation only when the user changes program segmentation. Bytes outside a segment can’t be converted to instructions, have names, comments, etc. Each segment has its start address, ending address and represents a contiguous range of addresses. There might be unused holes between segments. Each segment has its unique segment selector. This selector is used to distinguish the segment from other segments. For 16-bit programs the selector is equal to the segment base paragraph. For 32-bit programs there is special array to translate the selectors to the segment base paragraphs. A selector is a 32/64 bit value. The segment base paragraph determines the offsets in the segment. If the start address of the segment == (base << 4) then the first offset in the segment will be 0. The start address should be higher or equal to (base << 4). We will call the offsets in the segment ‘virtual addresses’. So, the virtual address of the first byte of the segment is (start address of segment - segment base linear address). For IBM PC, the virtual address corresponds to the offset part of the address. For other processors (Z80, for example), virtual addresses correspond to Z80 addresses and linear addresses are used only internally. For MS Windows programs the segment base paragraph is 0 and therefore the segment virtual addresses are equal to linear addresses. ## Attributes | [`SREG_NUM`](#ida_segment.SREG_NUM) | Maximum number of segment registers is 16 (see segregs.hpp). | |---------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [`SFL_COMORG`](#ida_segment.SFL_COMORG) | IDP dependent field (IBM PC: if set, ORG directive is not commented out) | | [`SFL_OBOK`](#ida_segment.SFL_OBOK) | Orgbase is present? (IDP dependent field). | | [`SFL_HIDDEN`](#ida_segment.SFL_HIDDEN) | Is the segment hidden? | | [`SFL_DEBUG`](#ida_segment.SFL_DEBUG) | Is the segment created for the debugger? Such segments are temporary and do not have permanent flags. | | [`SFL_LOADER`](#ida_segment.SFL_LOADER) | Is the segment created by the loader? | | [`SFL_HIDETYPE`](#ida_segment.SFL_HIDETYPE) | Hide segment type (do not print it in the listing). | | [`SFL_HEADER`](#ida_segment.SFL_HEADER) | Header segment (do not create offsets to it in the disassembly). | | [`SEG_NORM`](#ida_segment.SEG_NORM) | unknown type, no assumptions | | [`SEG_XTRN`](#ida_segment.SEG_XTRN) | | | [`SEG_CODE`](#ida_segment.SEG_CODE) | code segment | | [`SEG_DATA`](#ida_segment.SEG_DATA) | data segment | | [`SEG_IMP`](#ida_segment.SEG_IMP) | java: implementation segment | | [`SEG_GRP`](#ida_segment.SEG_GRP) | | | [`SEG_NULL`](#ida_segment.SEG_NULL) | zero-length segment | | [`SEG_UNDF`](#ida_segment.SEG_UNDF) | undefined segment type (not used) | | [`SEG_BSS`](#ida_segment.SEG_BSS) | uninitialized segment | | [`SEG_ABSSYM`](#ida_segment.SEG_ABSSYM) | | | [`SEG_COMM`](#ida_segment.SEG_COMM) | | | [`SEG_IMEM`](#ida_segment.SEG_IMEM) | internal processor memory & sfr (8051) | | [`SEG_MAX_SEGTYPE_CODE`](#ida_segment.SEG_MAX_SEGTYPE_CODE) | maximum value segment type can take | | [`SEGPERM_EXEC`](#ida_segment.SEGPERM_EXEC) | Execute. | | [`SEGPERM_WRITE`](#ida_segment.SEGPERM_WRITE) | Write. | | [`SEGPERM_READ`](#ida_segment.SEGPERM_READ) | Read. | | [`SEGPERM_MAXVAL`](#ida_segment.SEGPERM_MAXVAL) | Execute + Write + Read. | | [`saAbs`](#ida_segment.saAbs) | Absolute segment. | | [`saRelByte`](#ida_segment.saRelByte) | Relocatable, byte aligned. | | [`saRelWord`](#ida_segment.saRelWord) | Relocatable, word (2-byte) aligned. | | [`saRelPara`](#ida_segment.saRelPara) | Relocatable, paragraph (16-byte) aligned. | | [`saRelPage`](#ida_segment.saRelPage) | Relocatable, aligned on 256-byte boundary. | | [`saRelDble`](#ida_segment.saRelDble) | Relocatable, aligned on a double word (4-byte) boundary. | | [`saRel4K`](#ida_segment.saRel4K) | This value is used by the PharLap OMF for page (4K) alignment. It is not supported by LINK. | | [`saGroup`](#ida_segment.saGroup) | Segment group. | | [`saRel32Bytes`](#ida_segment.saRel32Bytes) | 32 bytes | | [`saRel64Bytes`](#ida_segment.saRel64Bytes) | 64 bytes | | [`saRelQword`](#ida_segment.saRelQword) | 8 bytes | | [`saRel128Bytes`](#ida_segment.saRel128Bytes) | 128 bytes | | [`saRel512Bytes`](#ida_segment.saRel512Bytes) | 512 bytes | | [`saRel1024Bytes`](#ida_segment.saRel1024Bytes) | 1024 bytes | | [`saRel2048Bytes`](#ida_segment.saRel2048Bytes) | 2048 bytes | | [`saRel_MAX_ALIGN_CODE`](#ida_segment.saRel_MAX_ALIGN_CODE) | | | [`scPriv`](#ida_segment.scPriv) | Private. Do not combine with any other program segment. | | [`scGroup`](#ida_segment.scGroup) | Segment group. | | [`scPub`](#ida_segment.scPub) | Public. Combine by appending at an offset that meets the alignment requirement. | | [`scPub2`](#ida_segment.scPub2) | As defined by Microsoft, same as C=2 (public). | | [`scStack`](#ida_segment.scStack) | Stack. Combine as for C=2. This combine type forces byte alignment. | | [`scCommon`](#ida_segment.scCommon) | Common. Combine by overlay using maximum size. | | [`scPub3`](#ida_segment.scPub3) | As defined by Microsoft, same as C=2 (public). | | [`sc_MAX_COMB_CODE`](#ida_segment.sc_MAX_COMB_CODE) | | | [`SEG_MAX_BITNESS_CODE`](#ida_segment.SEG_MAX_BITNESS_CODE) | Maximum segment bitness value. | | [`ADDSEG_NOSREG`](#ida_segment.ADDSEG_NOSREG) | set all default segment register values to BADSEL (undefine all default segment registers) | | [`ADDSEG_OR_DIE`](#ida_segment.ADDSEG_OR_DIE) | qexit() if can't add a segment | | [`ADDSEG_NOTRUNC`](#ida_segment.ADDSEG_NOTRUNC) | don't truncate the new segment at the beginning of the next segment if they overlap. destroy/truncate old segments instead. | | [`ADDSEG_QUIET`](#ida_segment.ADDSEG_QUIET) | silent mode, no "Adding segment..." in the messages window | | [`ADDSEG_FILLGAP`](#ida_segment.ADDSEG_FILLGAP) | fill gap between new segment and previous one. i.e. if such a gap exists, and this gap is less than 64K, then fill the gap by extending the previous segment and adding .align directive to it. This way we avoid gaps between segments. too many gaps lead to a virtual array failure. it cannot hold more than ~1000 gaps. | | [`ADDSEG_SPARSE`](#ida_segment.ADDSEG_SPARSE) | use sparse storage method for the new ranges of the created segment. please note that the ranges that were already enabled before creating the segment will not change their storage type. | | [`ADDSEG_NOAA`](#ida_segment.ADDSEG_NOAA) | do not mark new segment for auto-analysis | | [`ADDSEG_IDBENC`](#ida_segment.ADDSEG_IDBENC) | 'name' and 'sclass' are given in the IDB encoding; non-ASCII bytes will be decoded accordingly | | [`ADDSEG_KEEP_TYPE`](#ida_segment.ADDSEG_KEEP_TYPE) | do not set segment type according to segment class | | [`SEGMOD_KILL`](#ida_segment.SEGMOD_KILL) | disable addresses if segment gets shrinked or deleted | | [`SEGMOD_KEEP`](#ida_segment.SEGMOD_KEEP) | keep information (code & data, etc) | | [`SEGMOD_SILENT`](#ida_segment.SEGMOD_SILENT) | be silent | | [`SEGMOD_KEEP0`](#ida_segment.SEGMOD_KEEP0) | flag for internal use, don't set | | [`SEGMOD_KEEPSEL`](#ida_segment.SEGMOD_KEEPSEL) | do not try to delete unused selector | | [`SEGMOD_NOMOVE`](#ida_segment.SEGMOD_NOMOVE) | don't move info from the start of segment to the new start address (for set_segm_start()) | | [`SEGMOD_SPARSE`](#ida_segment.SEGMOD_SPARSE) | use sparse storage if extending the segment (for set_segm_start(), set_segm_end()) | | [`GSI_NAME`](#ida_segment.GSI_NAME) | Fill segment name string. | | [`GSI_SCLASS`](#ida_segment.GSI_SCLASS) | Fill segment class string. | | [`GSI_CMT_REG`](#ida_segment.GSI_CMT_REG) | Fill regular comment string. | | [`GSI_CMT_RPT`](#ida_segment.GSI_CMT_RPT) | Fill repeatable comment string. | | [`GSI_COMMENTS`](#ida_segment.GSI_COMMENTS) | Fill both comments. | | [`GSI_ALL`](#ida_segment.GSI_ALL) | Fill all string fields. | | [`GSI_UPDATED`](#ida_segment.GSI_UPDATED) | Mark name and/or class strings as updated. | | [`MOVE_SEGM_OK`](#ida_segment.MOVE_SEGM_OK) | all ok | | [`MOVE_SEGM_PARAM`](#ida_segment.MOVE_SEGM_PARAM) | The specified segment does not exist. | | [`MOVE_SEGM_ROOM`](#ida_segment.MOVE_SEGM_ROOM) | Not enough free room at the target address. | | [`MOVE_SEGM_IDP`](#ida_segment.MOVE_SEGM_IDP) | IDP module forbids moving the segment. | | [`MOVE_SEGM_CHUNK`](#ida_segment.MOVE_SEGM_CHUNK) | Too many chunks are defined, can't move. | | [`MOVE_SEGM_LOADER`](#ida_segment.MOVE_SEGM_LOADER) | The segment has been moved but the loader complained. | | [`MOVE_SEGM_ODD`](#ida_segment.MOVE_SEGM_ODD) | Cannot move segments by an odd number of bytes. | | [`MOVE_SEGM_ORPHAN`](#ida_segment.MOVE_SEGM_ORPHAN) | Orphan bytes hinder segment movement. | | [`MOVE_SEGM_DEBUG`](#ida_segment.MOVE_SEGM_DEBUG) | Debugger segments cannot be moved. | | [`MOVE_SEGM_SOURCEFILES`](#ida_segment.MOVE_SEGM_SOURCEFILES) | Source files ranges of addresses hinder segment movement. | | [`MOVE_SEGM_MAPPING`](#ida_segment.MOVE_SEGM_MAPPING) | Memory mapping ranges of addresses hinder segment movement. | | [`MOVE_SEGM_INVAL`](#ida_segment.MOVE_SEGM_INVAL) | Invalid argument (delta/target does not fit the address space). | | [`MSF_SILENT`](#ida_segment.MSF_SILENT) | don't display a "please wait" box on the screen | | [`MSF_NOFIX`](#ida_segment.MSF_NOFIX) | don't call the loader to fix relocations | | [`MSF_LDKEEP`](#ida_segment.MSF_LDKEEP) | keep the loader in the memory (optimization) | | [`MSF_FIXONCE`](#ida_segment.MSF_FIXONCE) | call loader only once with the special calling method. valid for rebase_program(). see loader_t::move_segm. | | [`MSF_PRIORITY`](#ida_segment.MSF_PRIORITY) | loader segments will overwrite any existing debugger segments when moved. valid for move_segm() | | [`MSF_NETNODES`](#ida_segment.MSF_NETNODES) | move netnodes instead of changing inf.netdelta (this is slower); valid for rebase_program() | | [`CSS_OK`](#ida_segment.CSS_OK) | ok | | [`CSS_NODBG`](#ida_segment.CSS_NODBG) | debugger is not running | | [`CSS_NORANGE`](#ida_segment.CSS_NORANGE) | could not find corresponding memory range | | [`CSS_NOMEM`](#ida_segment.CSS_NOMEM) | not enough memory (might be because the segment is too big) | | [`CSS_BREAK`](#ida_segment.CSS_BREAK) | memory reading process stopped by user | | [`SNAP_ALL_SEG`](#ida_segment.SNAP_ALL_SEG) | Take a snapshot of all segments. | | [`SNAP_LOAD_SEG`](#ida_segment.SNAP_LOAD_SEG) | Take a snapshot of loader segments. | | [`SNAP_CUR_SEG`](#ida_segment.SNAP_CUR_SEG) | Take a snapshot of current segment. | | [`MAX_GROUPS`](#ida_segment.MAX_GROUPS) | max number of segment groups | | [`MAX_SEGM_TRANSLATIONS`](#ida_segment.MAX_SEGM_TRANSLATIONS) | max number of segment translations | | [`set_visible_segm`](#id0) | | | [`lock_segm`](#id1) | | | [`is_segm_locked`](#id2) | | | [`get_segm_by_sel`](#id3) | | | [`add_segm_ex`](#id4) | | | [`getseg`](#id5) | | | [`getnseg`](#id6) | | | [`get_next_seg`](#id7) | | | [`get_prev_seg`](#id8) | | | [`get_first_seg`](#id9) | | | [`get_last_seg`](#id10) | | | [`get_segm_by_name`](#id11) | | | [`move_segm`](#id12) | | | [`change_segment_status`](#id13) | | | [`set_segm_base`](#id14) | | | [`get_segment_cmt`](#id15) | | | [`set_segment_cmt`](#id16) | | | [`std_out_segm_footer`](#id17) | | | [`set_segm_name`](#id18) | | | [`get_segm_name`](#id19) | | | [`get_visible_segm_name`](#id20) | | | [`get_segm_class`](#id21) | | | [`set_segm_class`](#id22) | | | [`get_segm_para`](#id23) | | | [`get_segm_base`](#id24) | | | [`set_segm_addressing`](#id25) | | | [`segm_adjust_diff`](#id26) | | | [`segm_adjust_ea`](#id27) | | ## Classes | [`segment_defsr_array`](#ida_segment.segment_defsr_array) | | |-------------------------------------------------------------|----| | [`segment_info_t`](#ida_segment.segment_info_t) | | | [`segment_t`](#ida_segment.segment_t) | | | [`lock_segment`](#ida_segment.lock_segment) | | | [`lock_segment_ea`](#ida_segment.lock_segment_ea) | | ## Functions | [`set_segment_translations`](#ida_segment.set_segment_translations)(→ bool) | Set new translation list. | |------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [`is_visible_segm`](#ida_segment.is_visible_segm)(→ bool) | See SFL_HIDDEN. | | [`is_finally_visible_segm`](#ida_segment.is_finally_visible_segm)(→ bool) | See SFL_HIDDEN, SCF_SHHID_SEGM. | | [`set_visible_segm`](#id0) | | | [`set_visible_segment`](#ida_segment.set_visible_segment)(→ None) | Set segment visibility by address. | | [`is_spec_segm`](#ida_segment.is_spec_segm)(→ bool) | Has segment a special type? (SEG_XTRN, SEG_GRP, SEG_ABSSYM, SEG_COMM) | | [`is_spec_ea`](#ida_segment.is_spec_ea)(→ bool) | Does the address belong to a segment with a special type? (SEG_XTRN, SEG_GRP, SEG_ABSSYM, SEG_COMM) | | [`lock_segm`](#id1) | | | [`lock_segment_by_ea`](#ida_segment.lock_segment_by_ea)(→ None) | Lock segment by address. Locked segments cannot be deleted or moved. | | [`is_segm_locked`](#id2) | | | [`is_segment_locked`](#ida_segment.is_segment_locked)(→ bool) | Is segment locked by address? | | [`getn_selector`](#ida_segment.getn_selector)(→ sel_t \*, ea_t \*) | Get description of selector (0..get_selector_qty()-1). | | [`get_selector_qty`](#ida_segment.get_selector_qty)(→ int) | Get number of defined selectors. | | [`setup_selector`](#ida_segment.setup_selector)(→ sel_t) | Allocate a selector for a segment if necessary. You must call this function before calling add_segm_ex(). add_segm() calls this function itself, so you don't need to allocate a selector. This function will allocate a selector if 'segbase' requires more than 16 bits and the current processor is IBM PC. Otherwise it will return the segbase value. | | [`allocate_selector`](#ida_segment.allocate_selector)(→ sel_t) | Allocate a selector for a segment unconditionally. You must call this function before calling add_segm_ex(). add_segm() calls this function itself, so you don't need to allocate a selector. This function will allocate a new free selector and setup its mapping using find_free_selector() and set_selector() functions. | | [`find_free_selector`](#ida_segment.find_free_selector)(→ sel_t) | Find first unused selector. | | [`set_selector`](#ida_segment.set_selector)(→ int) | Set mapping of selector to a paragraph. You should call this function \_before_ creating a segment which uses the selector, otherwise the creation of the segment will fail. | | [`del_selector`](#ida_segment.del_selector)(→ None) | Delete mapping of a selector. Be wary of deleting selectors that are being used in the program, this can make a mess in the segments. | | [`sel2para`](#ida_segment.sel2para)(→ ida_idaapi.ea_t) | Get mapping of a selector. | | [`sel2ea`](#ida_segment.sel2ea)(→ ida_idaapi.ea_t) | Get mapping of a selector as a linear address. | | [`find_selector`](#ida_segment.find_selector)(→ sel_t) | Find a selector that has mapping to the specified paragraph. | | [`get_segm_by_sel`](#id3) | | | [`get_segment_ea_by_sel`](#ida_segment.get_segment_ea_by_sel)(→ ida_idaapi.ea_t) | Get segment start address by its selector. This function finds a segment by its selector. If there are several segments with the same selectors, the last one will be returned. | | [`add_segm_ex`](#id4) | | | [`add_segment_ex`](#ida_segment.add_segment_ex)(→ bool) | Add a new segment using segment_info_t. If a segment already exists at the specified range of addresses, this segment will be truncated. Instructions and data in the old segment will be deleted if the new segment has another addressing mode or another segment base address. The segment name and class and comments are taken from the segment_info_t structure. | | [`add_segm`](#ida_segment.add_segm)(→ bool) | Add a new segment, second form. Segment alignment is set to saRelByte. Segment combination is "public" or "stack" (if segment class is "STACK"). Addressing mode of segment is taken as default (16-bit or 32-bit). Default segment registers are set to BADSEL. If a segment already exists at the specified range of addresses, this segment will be truncated. Instructions and data in the old segment will be deleted if the new segment has another addressing mode or another segment base address. | | [`del_segm`](#ida_segment.del_segm)(→ bool) | Delete a segment. | | [`get_segm_qty`](#ida_segment.get_segm_qty)(→ int) | Get number of segments. | | [`getseg`](#id5) | | | [`get_segment_info`](#ida_segment.get_segment_info)(→ bool) | Fill segment_info_t structure for segment at the specified address. By default, only fields present in segment_t are filled. Use GSI_\* flags to request additional string fields (name, class, comments). | | [`set_segment_info`](#ida_segment.set_segment_info)(→ bool) | Apply segment_info_t modifications to the database. Uses start_ea as the segment handle. | | [`get_segment_ea`](#ida_segment.get_segment_ea)(→ ida_idaapi.ea_t) | Get segment start address. | | [`getnseg`](#id6) | | | [`get_segment_info_by_num`](#ida_segment.get_segment_info_by_num)(→ bool) | Fill segment_info_t structure for segment by its number. By default, only fields present in segment_t are filled. Use GSI_\* flags to request additional string fields (name, class, comments). | | [`get_segment_ea_by_num`](#ida_segment.get_segment_ea_by_num)(→ ida_idaapi.ea_t) | Get segment start address by its number. The returned address can be used as a handle for other segment_\* functions. | | [`get_segm_num`](#ida_segment.get_segm_num)(→ int) | Get number of segment by address. | | [`get_next_seg`](#id7) | | | [`get_next_segment_ea`](#ida_segment.get_next_segment_ea)(→ ida_idaapi.ea_t) | Get start address of the next segment. | | [`get_prev_seg`](#id8) | | | [`get_prev_segment_ea`](#ida_segment.get_prev_segment_ea)(→ ida_idaapi.ea_t) | Get start address of the previous segment. | | [`get_first_seg`](#id9) | | | [`get_first_segment_ea`](#ida_segment.get_first_segment_ea)(→ ida_idaapi.ea_t) | Get start address of the first segment. The returned address can be used as a handle for other segment_\* functions. | | [`get_last_seg`](#id10) | | | [`get_last_segment_ea`](#ida_segment.get_last_segment_ea)(→ ida_idaapi.ea_t) | Get start address of the last segment. | | [`get_segm_by_name`](#id11) | | | [`get_segment_ea_by_name`](#ida_segment.get_segment_ea_by_name)(→ ida_idaapi.ea_t) | Get segment start address by its name. If there are several segments with the same name, returns the first of them. | | [`set_segm_end`](#ida_segment.set_segm_end)(→ bool) | Set segment end address. The next segment is shrinked to allow expansion of the specified segment. The kernel might even delete the next segment if necessary. The kernel will ask the user for a permission to destroy instructions or data going out of segment scope if such instructions exist. | | [`set_segm_start`](#ida_segment.set_segm_start)(→ bool) | Set segment start address. The previous segment is trimmed to allow expansion of the specified segment. The kernel might even delete the previous segment if necessary. The kernel will ask the user for a permission to destroy instructions or data going out of segment scope if such instructions exist. | | [`move_segm_start`](#ida_segment.move_segm_start)(→ bool) | Move segment start. The main difference between this function and set_segm_start() is that this function may expand the previous segment while set_segm_start() never does it. So, this function allows to change bounds of two segments simultaneously. If the previous segment and the specified segment have the same addressing mode and segment base, then instructions and data are not destroyed - they simply move from one segment to another. Otherwise all instructions/data which migrate from one segment to another are destroyed. | | [`move_segm_strerror`](#ida_segment.move_segm_strerror)(→ str) | Return string describing error

```
MOVE_SEGM_
```

... code. | | [`move_segm`](#id12) | | | [`move_segment`](#ida_segment.move_segment)(→ move_segm_code_t) | Move segment to a new address. It fixes up address sensitive information in the kernel. The total effect is equal to reloading the segment to the target address. For the file format dependent address sensitive information, loader_t::move_segm is called. Also IDB notification event idb_event::segm_moved is called. | | [`change_segment_status`](#id13) | | | [`change_segment_status_by_ea`](#ida_segment.change_segment_status_by_ea)(→ int) | Convert a debugger segment to a regular segment and vice versa by address. When converting debug->regular, the memory contents will be copied to the database. | | [`take_memory_snapshot`](#ida_segment.take_memory_snapshot)(→ bool) | Take a memory snapshot of the running process. | | [`is_miniidb`](#ida_segment.is_miniidb)(→ bool) | Is the database a miniidb created by the debugger? | | [`set_segm_base`](#id14) | | | [`set_segment_base_ea`](#ida_segment.set_segment_base_ea)(→ bool) | Set segment base. Internal function. | | [`set_group_selector`](#ida_segment.set_group_selector)(→ int) | Create a new group of segments (used OMF files). | | [`get_group_selector`](#ida_segment.get_group_selector)(→ sel_t) | Get common selector for a group of segments. | | [`add_segment_translation`](#ida_segment.add_segment_translation)(→ bool) | Add segment translation. | | [`del_segment_translations`](#ida_segment.del_segment_translations)(→ None) | Delete the translation list | | [`get_segment_translations`](#ida_segment.get_segment_translations)(→ ssize_t) | Get segment translation list. | | [`get_segment_cmt`](#id15) | | | [`get_segment_cmt_by_ea`](#ida_segment.get_segment_cmt_by_ea)(→ Union[str, None]) | Get segment comment by address. | | [`set_segment_cmt`](#id16) | | | [`set_segment_cmt_by_ea`](#ida_segment.set_segment_cmt_by_ea)(→ None) | Set segment comment by address. | | [`std_out_segm_footer`](#id17) | | | [`std_out_segment_footer`](#ida_segment.std_out_segment_footer)(→ None) | Generate segment footer line as a comment line by address. This function may be used in IDP modules to generate segment footer if the target assembler doesn't have 'ends' directive. | | [`set_segm_name`](#id18) | | | [`set_segment_name`](#ida_segment.set_segment_name)(→ int) | Rename segment by address. The new name is validated (see validate_name). A segment always has a name. If you hadn't specified a name, the kernel will assign it "seg###" name where ### is segment number. | | [`get_segm_name`](#id19) | | | [`get_segment_name`](#ida_segment.get_segment_name)(→ str) | Get segment name by address. | | [`get_visible_segm_name`](#id20) | | | [`get_segm_class`](#id21) | | | [`get_segment_class`](#ida_segment.get_segment_class)(→ Union[str, None]) | Get segment class by address. Segment class is arbitrary text (max 8 characters). | | [`set_segm_class`](#id22) | | | [`set_segment_class`](#ida_segment.set_segment_class)(→ int) | Set segment class by address. | | [`segtype`](#ida_segment.segtype)(→ uchar) | Get segment type. | | [`get_segment_alignment`](#ida_segment.get_segment_alignment)(→ str) | Get text representation of segment alignment code. | | [`get_segment_combination`](#ida_segment.get_segment_combination)(→ str) | Get text representation of segment combination code. | | [`get_segm_para`](#id23) | | | [`get_segment_para`](#ida_segment.get_segment_para)(→ ida_idaapi.ea_t) | Get segment base paragraph by address. Segment base paragraph may be converted to segment base linear address using to_ea() function. | | [`get_segm_base`](#id24) | | | [`get_segment_base`](#ida_segment.get_segment_base)(→ ida_idaapi.ea_t) | Get segment base linear address by address. Segment base linear address is used to calculate virtual addresses. The virtual address of the first byte of the segment will be (start address of segment - segment base linear address) | | [`set_segm_addressing`](#id25) | | | [`set_segment_addressing`](#ida_segment.set_segment_addressing)(→ bool) | Change segment addressing mode (16, 32, 64 bits) by address. You must use this function to change segment addressing, never change the 'bitness' field directly. This function will delete all instructions, comments and names in the segment | | [`is_same_segment`](#ida_segment.is_same_segment)(→ bool) | Check two addresses belong to one segment. | | [`update_segm`](#ida_segment.update_segm)(→ bool) | | | [`segm_adjust_diff`](#id26) | | | [`adjust_segment_diff`](#ida_segment.adjust_segment_diff)(→ adiff_t) | Truncate and sign extend a delta depending on the segment by address. | | [`segm_adjust_ea`](#id27) | | | [`adjust_segment_ea`](#ida_segment.adjust_segment_ea)(→ ida_idaapi.ea_t) | Truncate an address depending on the segment by address. | | [`get_defsr`](#ida_segment.get_defsr)(s, reg) | Deprecated, use instead: | | [`set_defsr`](#ida_segment.set_defsr)(s, reg, value) | Deprecated, use instead: | | [`rebase_program`](#ida_segment.rebase_program)(→ int) | Rebase the whole program by 'delta' bytes. | ## Module Contents ### *class* ida_segment.segment_defsr_array(data: unsigned long long (&)[SREG_NUM]) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### data *: unsigned long long (&)[SREG_NUM]* #### bytes ### ida_segment.set_segment_translations(segstart: ida_idaapi.ea_t, transmap: eavec_t const &) → [bool](https://docs.python.org/3/library/functions.html#bool) Set new translation list. * **Parameters:** * **segstart** – start address of the segment to add translation to * **transmap** – vector of segment start addresses for the translation list. If transmap is empty, the translation list is deleted. * **Returns:** 1: ok * **Returns:** 0: too many translations or bad segstart ### ida_segment.SREG_NUM Maximum number of segment registers is 16 (see segregs.hpp). ### ida_segment.SFL_COMORG IDP dependent field (IBM PC: if set, ORG directive is not commented out) ### ida_segment.SFL_OBOK Orgbase is present? (IDP dependent field). ### ida_segment.SFL_HIDDEN Is the segment hidden? ### ida_segment.SFL_DEBUG Is the segment created for the debugger? Such segments are temporary and do not have permanent flags. ### ida_segment.SFL_LOADER Is the segment created by the loader? ### ida_segment.SFL_HIDETYPE Hide segment type (do not print it in the listing). ### ida_segment.SFL_HEADER Header segment (do not create offsets to it in the disassembly). ### ida_segment.SEG_NORM unknown type, no assumptions ### ida_segment.SEG_XTRN * segment with ‘extern’ definitions. no instructions are allowed ### ida_segment.SEG_CODE code segment ### ida_segment.SEG_DATA data segment ### ida_segment.SEG_IMP java: implementation segment ### ida_segment.SEG_GRP * group of segments ### ida_segment.SEG_NULL zero-length segment ### ida_segment.SEG_UNDF undefined segment type (not used) ### ida_segment.SEG_BSS uninitialized segment ### ida_segment.SEG_ABSSYM * segment with definitions of absolute symbols ### ida_segment.SEG_COMM * segment with communal definitions ### ida_segment.SEG_IMEM internal processor memory & sfr (8051) ### ida_segment.SEG_MAX_SEGTYPE_CODE maximum value segment type can take ### ida_segment.SEGPERM_EXEC Execute. ### ida_segment.SEGPERM_WRITE Write. ### ida_segment.SEGPERM_READ Read. ### ida_segment.SEGPERM_MAXVAL Execute + Write + Read. ### ida_segment.saAbs Absolute segment. ### ida_segment.saRelByte Relocatable, byte aligned. ### ida_segment.saRelWord Relocatable, word (2-byte) aligned. ### ida_segment.saRelPara Relocatable, paragraph (16-byte) aligned. ### ida_segment.saRelPage Relocatable, aligned on 256-byte boundary. ### ida_segment.saRelDble Relocatable, aligned on a double word (4-byte) boundary. ### ida_segment.saRel4K This value is used by the PharLap OMF for page (4K) alignment. It is not supported by LINK. ### ida_segment.saGroup Segment group. ### ida_segment.saRel32Bytes 32 bytes ### ida_segment.saRel64Bytes 64 bytes ### ida_segment.saRelQword 8 bytes ### ida_segment.saRel128Bytes 128 bytes ### ida_segment.saRel512Bytes 512 bytes ### ida_segment.saRel1024Bytes 1024 bytes ### ida_segment.saRel2048Bytes 2048 bytes ### ida_segment.saRel_MAX_ALIGN_CODE ### ida_segment.scPriv Private. Do not combine with any other program segment. ### ida_segment.scGroup Segment group. ### ida_segment.scPub Public. Combine by appending at an offset that meets the alignment requirement. ### ida_segment.scPub2 As defined by Microsoft, same as C=2 (public). ### ida_segment.scStack Stack. Combine as for C=2. This combine type forces byte alignment. ### ida_segment.scCommon Common. Combine by overlay using maximum size. ### ida_segment.scPub3 As defined by Microsoft, same as C=2 (public). ### ida_segment.sc_MAX_COMB_CODE ### ida_segment.SEG_MAX_BITNESS_CODE Maximum segment bitness value. ### *class* ida_segment.segment_info_t Bases: [`ida_range.range_t`](../ida_range/index.md#ida_range.range_t) #### thisown #### is_valid() → [bool](https://docs.python.org/3/library/functions.html#bool) Is the segment info valid? #### has(gsi_flags: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) Check if a string field was populated by get_segment_info(). * **Parameters:** **gsi_flags** – combination of Get segment info flags flags to check * **Returns:** true if all specified fields are available #### get_name() → [str](https://docs.python.org/3/library/stdtypes.html#str) A segment always has a name. If you hadn’t specified a name, the kernel will assign it “seg###” name where ### is segment number. The new name is validated (see validate_name). #### visible_name() → [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None) #### set_name(v: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [None](https://docs.python.org/3/library/constants.html#None) #### get_sclass() → [str](https://docs.python.org/3/library/stdtypes.html#str) Segment class is arbitrary text (max 8 characters) If segment type is SEG_NORM and segment class is one of predefined names, then segment type is changed to: \* “CODE” -> SEG_CODE \* “DATA” -> SEG_DATA \* “STACK” -> SEG_BSS \* “BSS” -> SEG_BSS \* if “UNK” then segment type is reset to SEG_NORM. #### set_sclass(v: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [None](https://docs.python.org/3/library/constants.html#None) #### get_orgbase() → [int](https://docs.python.org/3/library/functions.html#int) This field is IDP dependent. you may keep your information about the segment here #### set_orgbase(v: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### get_align() → uchar Segment alignment Segment alignment codes. #### set_align(v: uchar) → [None](https://docs.python.org/3/library/constants.html#None) #### get_comb() → uchar Segment combination Segment combination codes. #### set_comb(v: uchar) → [None](https://docs.python.org/3/library/constants.html#None) #### get_perm() → uchar Segment permissions Segment permissions. #### set_perm(v: uchar) → [None](https://docs.python.org/3/library/constants.html#None) #### get_bitness() → uchar Addressing mode (0=16bit, 1=32bit, 2=64bit). #### set_bitness(v: uchar) → [None](https://docs.python.org/3/library/constants.html#None) #### is_16bit() → [bool](https://docs.python.org/3/library/functions.html#bool) Is a 16-bit segment? #### is_32bit() → [bool](https://docs.python.org/3/library/functions.html#bool) Is a 32-bit segment? #### is_64bit() → [bool](https://docs.python.org/3/library/functions.html#bool) Is a 64-bit segment? #### abits() → [int](https://docs.python.org/3/library/functions.html#int) Get number of address bits. #### abytes() → [int](https://docs.python.org/3/library/functions.html#int) Get number of address bytes. #### get_flags() → ushort Segment flags Segment flags. #### set_flags(v: ushort) → [None](https://docs.python.org/3/library/constants.html#None) #### comorg() → [bool](https://docs.python.org/3/library/functions.html#bool) #### set_comorg(v: [bool](https://docs.python.org/3/library/functions.html#bool) = True) → [None](https://docs.python.org/3/library/constants.html#None) #### ob_ok() → [bool](https://docs.python.org/3/library/functions.html#bool) #### set_ob_ok(v: [bool](https://docs.python.org/3/library/functions.html#bool) = True) → [None](https://docs.python.org/3/library/constants.html#None) #### is_visible_segm() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_finally_visible_segm() → [bool](https://docs.python.org/3/library/functions.html#bool) #### set_visible_segm(visible: [bool](https://docs.python.org/3/library/functions.html#bool) = True) → [None](https://docs.python.org/3/library/constants.html#None) #### set_debugger_segm(debseg: [bool](https://docs.python.org/3/library/functions.html#bool) = True) → [None](https://docs.python.org/3/library/constants.html#None) #### is_loader_segm() → [bool](https://docs.python.org/3/library/functions.html#bool) #### set_loader_segm(ldrseg: [bool](https://docs.python.org/3/library/functions.html#bool) = True) → [None](https://docs.python.org/3/library/constants.html#None) #### is_hidden_segtype() → [bool](https://docs.python.org/3/library/functions.html#bool) #### set_hidden_segtype(hide: [bool](https://docs.python.org/3/library/functions.html#bool) = True) → [None](https://docs.python.org/3/library/constants.html#None) #### is_header_segm() → [bool](https://docs.python.org/3/library/functions.html#bool) #### set_header_segm(on: [bool](https://docs.python.org/3/library/functions.html#bool) = True) → [None](https://docs.python.org/3/library/constants.html#None) #### get_sel() → sel_t Segment selector - should be unique. You can’t change this field after creating the segment. Exception: 16-bit OMF files may have several segments with the same selector, but this is not good (no way to denote a segment exactly) so it should be fixed in the future. #### set_sel(v: sel_t) → [None](https://docs.python.org/3/library/constants.html#None) #### para() → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) Get segment base paragraph. #### base() → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) Get segment base linear address. #### get_defsr(sr_idx: [int](https://docs.python.org/3/library/functions.html#int)) → sel_t Get default segment register value. * **Parameters:** **sr_idx** – segment register index (0..SREG_NUM-1) * **Returns:** segment register value, or BADSEL if sr_idx is out of range #### set_defsr(sr_idx: [int](https://docs.python.org/3/library/functions.html#int), v: sel_t) → [None](https://docs.python.org/3/library/constants.html#None) #### get_type() → uchar Segment type Segment types The kernel treats different segment types differently. Segments marked with ‘\*’ contain no instructions or data and are not declared as ‘segments’ in the disassembly. #### set_type(v: uchar) → [None](https://docs.python.org/3/library/constants.html#None) #### get_color() → bgcolor_t The segment color. #### set_color(v: bgcolor_t) → [None](https://docs.python.org/3/library/constants.html#None) #### get_cmt_reg() → [str](https://docs.python.org/3/library/stdtypes.html#str) Regular segment comment #### set_cmt_reg(v: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [None](https://docs.python.org/3/library/constants.html#None) #### get_cmt_rpt() → [str](https://docs.python.org/3/library/stdtypes.html#str) Repeatable segment comment #### set_cmt_rpt(v: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [None](https://docs.python.org/3/library/constants.html#None) ### *class* ida_segment.segment_t Bases: [`ida_range.range_t`](../ida_range/index.md#ida_range.range_t) #### thisown #### name *: [int](https://docs.python.org/3/library/functions.html#int)* use get/set_segm_name() functions #### sclass *: [int](https://docs.python.org/3/library/functions.html#int)* use get/set_segm_class() functions #### orgbase *: [int](https://docs.python.org/3/library/functions.html#int)* this field is IDP dependent. you may keep your information about the segment here #### align *: uchar* Segment alignment codes #### comb *: uchar* Segment combination codes #### perm *: uchar* Segment permissions (0 means no information) #### bitness *: uchar* Number of bits in the segment addressing \* 0: 16 bits \* 1: 32 bits \* 2: 64 bits #### is_16bit() → [bool](https://docs.python.org/3/library/functions.html#bool) Is a 16-bit segment? #### is_32bit() → [bool](https://docs.python.org/3/library/functions.html#bool) Is a 32-bit segment? #### is_64bit() → [bool](https://docs.python.org/3/library/functions.html#bool) Is a 64-bit segment? #### abits() → [int](https://docs.python.org/3/library/functions.html#int) Get number of address bits. #### abytes() → [int](https://docs.python.org/3/library/functions.html#int) Get number of address bytes. #### flags *: ushort* Segment flags #### comorg() → [bool](https://docs.python.org/3/library/functions.html#bool) #### set_comorg() → [None](https://docs.python.org/3/library/constants.html#None) #### clr_comorg() → [None](https://docs.python.org/3/library/constants.html#None) #### ob_ok() → [bool](https://docs.python.org/3/library/functions.html#bool) #### set_ob_ok() → [None](https://docs.python.org/3/library/constants.html#None) #### clr_ob_ok() → [None](https://docs.python.org/3/library/constants.html#None) #### is_visible_segm() → [bool](https://docs.python.org/3/library/functions.html#bool) #### set_visible_segm(visible: [bool](https://docs.python.org/3/library/functions.html#bool)) → [None](https://docs.python.org/3/library/constants.html#None) #### set_debugger_segm(debseg: [bool](https://docs.python.org/3/library/functions.html#bool)) → [None](https://docs.python.org/3/library/constants.html#None) #### is_loader_segm() → [bool](https://docs.python.org/3/library/functions.html#bool) #### set_loader_segm(ldrseg: [bool](https://docs.python.org/3/library/functions.html#bool)) → [None](https://docs.python.org/3/library/constants.html#None) #### is_hidden_segtype() → [bool](https://docs.python.org/3/library/functions.html#bool) #### set_hidden_segtype(hide: [bool](https://docs.python.org/3/library/functions.html#bool)) → [None](https://docs.python.org/3/library/constants.html#None) #### is_header_segm() → [bool](https://docs.python.org/3/library/functions.html#bool) #### set_header_segm(on: [bool](https://docs.python.org/3/library/functions.html#bool)) → [None](https://docs.python.org/3/library/constants.html#None) #### sel *: sel_t* segment selector - should be unique. You can’t change this field after creating the segment. Exception: 16-bit OMF files may have several segments with the same selector, but this is not good (no way to denote a segment exactly) so it should be fixed in the future. #### defsr *: sel_t[16]* default segment register values. first element of this array keeps information about value of processor_t::reg_first_sreg #### type *: uchar* segment type (see Segment types). The kernel treats different segment types differently. Segments marked with ‘\*’ contain no instructions or data and are not declared as ‘segments’ in the disassembly. #### color *: bgcolor_t* the segment color #### update() → [bool](https://docs.python.org/3/library/functions.html#bool) Update segment information. You must call this function after modification of segment characteristics. Note that not all fields of segment structure may be modified directly, there are special functions to modify some fields. * **Returns:** success #### start_ea *: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)* start_ea included #### end_ea *: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)* end_ea excluded #### use64 ### ida_segment.is_visible_segm(s: [segment_t](#ida_segment.segment_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) See SFL_HIDDEN. ### ida_segment.is_finally_visible_segm(s: [segment_t](#ida_segment.segment_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) See SFL_HIDDEN, SCF_SHHID_SEGM. ### ida_segment.set_visible_segm(s: [segment_t](#ida_segment.segment_t), visible: [bool](https://docs.python.org/3/library/functions.html#bool)) → [None](https://docs.python.org/3/library/constants.html#None) See SFL_HIDDEN ### ida_segment.set_visible_segment(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), visible: [bool](https://docs.python.org/3/library/functions.html#bool)) → [None](https://docs.python.org/3/library/constants.html#None) Set segment visibility by address. * **Parameters:** * **ea** – any address within the segment * **visible** – true to make visible, false to hide ### ida_segment.is_spec_segm(seg_type: uchar) → [bool](https://docs.python.org/3/library/functions.html#bool) Has segment a special type? (SEG_XTRN, SEG_GRP, SEG_ABSSYM, SEG_COMM) ### ida_segment.is_spec_ea(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Does the address belong to a segment with a special type? (SEG_XTRN, SEG_GRP, SEG_ABSSYM, SEG_COMM) * **Parameters:** **ea** – linear address ### ida_segment.lock_segm(segm: [segment_t](#ida_segment.segment_t), lock: [bool](https://docs.python.org/3/library/functions.html#bool)) → [None](https://docs.python.org/3/library/constants.html#None) Lock segment pointer ### ida_segment.lock_segment_by_ea(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), lock: [bool](https://docs.python.org/3/library/functions.html#bool)) → [None](https://docs.python.org/3/library/constants.html#None) Lock segment by address. Locked segments cannot be deleted or moved. * **Parameters:** * **ea** – any address within the segment * **lock** – true to lock, false to unlock ### *class* ida_segment.lock_segment(segm: [segment_t](#ida_segment.segment_t)) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown ### *class* ida_segment.lock_segment_ea(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown ### ida_segment.is_segm_locked(segm: [segment_t](#ida_segment.segment_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Is a segment pointer locked? ### ida_segment.is_segment_locked(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Is segment locked by address? * **Parameters:** **ea** – any address within the segment * **Returns:** true if the segment is locked ### ida_segment.getn_selector(n: [int](https://docs.python.org/3/library/functions.html#int)) → sel_t \*, ea_t \* Get description of selector (0..get_selector_qty()-1). ### ida_segment.get_selector_qty() → [int](https://docs.python.org/3/library/functions.html#int) Get number of defined selectors. ### ida_segment.setup_selector(segbase: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → sel_t Allocate a selector for a segment if necessary. You must call this function before calling add_segm_ex(). add_segm() calls this function itself, so you don’t need to allocate a selector. This function will allocate a selector if ‘segbase’ requires more than 16 bits and the current processor is IBM PC. Otherwise it will return the segbase value. * **Parameters:** **segbase** – a new segment base paragraph * **Returns:** the allocated selector number ### ida_segment.allocate_selector(segbase: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → sel_t Allocate a selector for a segment unconditionally. You must call this function before calling add_segm_ex(). add_segm() calls this function itself, so you don’t need to allocate a selector. This function will allocate a new free selector and setup its mapping using find_free_selector() and set_selector() functions. * **Parameters:** **segbase** – a new segment base paragraph * **Returns:** the allocated selector number ### ida_segment.find_free_selector() → sel_t Find first unused selector. * **Returns:** a number >= 1 ### ida_segment.set_selector(selector: sel_t, paragraph: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [int](https://docs.python.org/3/library/functions.html#int) Set mapping of selector to a paragraph. You should call this function \_before_ creating a segment which uses the selector, otherwise the creation of the segment will fail. * **Parameters:** **selector** – number of selector to map * if selector == BADSEL, then return 0 (fail) * if the selector has had a mapping, old mapping is destroyed * if the selector number is equal to paragraph value, then the mapping is destroyed because we don’t need to keep trivial mappings. * **Parameters:** **paragraph** – paragraph to map selector * **Returns:** 1: ok * **Returns:** 0: failure (bad selector or too many mappings) ### ida_segment.del_selector(selector: sel_t) → [None](https://docs.python.org/3/library/constants.html#None) Delete mapping of a selector. Be wary of deleting selectors that are being used in the program, this can make a mess in the segments. * **Parameters:** **selector** – number of selector to remove from the translation table ### ida_segment.sel2para(selector: sel_t) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) Get mapping of a selector. * **Parameters:** **selector** – number of selector to translate * **Returns:** paragraph the specified selector is mapped to. if there is no mapping, returns ‘selector’. ### ida_segment.sel2ea(selector: sel_t) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) Get mapping of a selector as a linear address. * **Parameters:** **selector** – number of selector to translate to linear address * **Returns:** linear address the specified selector is mapped to. if there is no mapping, returns to_ea(selector,0); ### ida_segment.find_selector(base: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → sel_t Find a selector that has mapping to the specified paragraph. * **Parameters:** **base** – paragraph to search in the translation table * **Returns:** selector value or base ### ida_segment.get_segm_by_sel(selector: sel_t) → segment_t \* Get pointer to segment structure. * **Parameters:** **selector** – a segment with the specified selector will be returned * **Returns:** pointer to segment or nullptr ### ida_segment.get_segment_ea_by_sel(selector: sel_t) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) Get segment start address by its selector. This function finds a segment by its selector. If there are several segments with the same selectors, the last one will be returned. * **Parameters:** **selector** – selector value to search for * **Returns:** segment start_ea, or BADADDR if not found ### ida_segment.add_segm_ex(s: [segment_t](#ida_segment.segment_t), name: [str](https://docs.python.org/3/library/stdtypes.html#str), sclass: [str](https://docs.python.org/3/library/stdtypes.html#str), flags: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) Add a new segment. * **Parameters:** **s** – pointer to filled segment structure. segment selector should have proper mapping (see set_selector()). * if s.start_ea==BADADDR then s.start_ea <- get_segm_base(&s) * if s.end_ea==BADADDR, then a segment up to the next segment will be created (if the next segment doesn’t exist, then 1 byte segment will be created). * if the s.end_ea < s.start_ea, then fail. * if s.end_ea is too high and the new segment would overlap the next segment, s.end_ea is adjusted properly. * **Parameters:** * **name** – name of new segment. may be nullptr. if specified, the segment is immediately renamed * **sclass** – class of the segment. may be nullptr. if specified, the segment class is immediately changed * **flags** – Add segment flags * **Returns:** 1: ok * **Returns:** 0: failed, a warning message is displayed The specified default segment register values may be modified by processor modules (see ev_creating_segm). Also, if the default data segment value is BADSEL, it will be changed to the selector of the newly created segment. This ensures that the data segment is always correctly set, which is a good default for most processors. ### ida_segment.add_segment_ex(si: [segment_info_t](#ida_segment.segment_info_t), flags: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) Add a new segment using segment_info_t. If a segment already exists at the specified range of addresses, this segment will be truncated. Instructions and data in the old segment will be deleted if the new segment has another addressing mode or another segment base address. The segment name and class and comments are taken from the segment_info_t structure. * **Parameters:** **si** – segment_info_t structure containing segment properties. Required fields: start_ea, end_ea, sel (or use setup_selector()). Optional fields: name, sclass, comments, align, comb, bitness, type, perm, flags, orgbase, defsr, color. segment selector should have proper mapping (see set_selector()). * if s.start_ea==BADADDR then s.start_ea <- get_segm_base(&s) * if s.end_ea==BADADDR, then a segment up to the next segment will be created (if the next segment doesn’t exist, then 1 byte segment will be created). * if the s.end_ea < s.start_ea, then fail. * if s.end_ea is too high and the new segment would overlap the next segment, s.end_ea is adjusted properly. * **Parameters:** **flags** – Add segment flags * **Returns:** true: segment was created successfully * **Returns:** false: failed, a warning message is displayed The specified default segment register values may be modified by processor modules (see ev_creating_segment). Also, if the default data segment value is BADSEL, it will be changed to the selector of the newly created segment. This ensures that the data segment is always correctly set, which is a good default for most processors. ### ida_segment.ADDSEG_NOSREG set all default segment register values to BADSEL (undefine all default segment registers) ### ida_segment.ADDSEG_OR_DIE qexit() if can’t add a segment ### ida_segment.ADDSEG_NOTRUNC don’t truncate the new segment at the beginning of the next segment if they overlap. destroy/truncate old segments instead. ### ida_segment.ADDSEG_QUIET silent mode, no “Adding segment…” in the messages window ### ida_segment.ADDSEG_FILLGAP fill gap between new segment and previous one. i.e. if such a gap exists, and this gap is less than 64K, then fill the gap by extending the previous segment and adding .align directive to it. This way we avoid gaps between segments. too many gaps lead to a virtual array failure. it cannot hold more than ~1000 gaps. ### ida_segment.ADDSEG_SPARSE use sparse storage method for the new ranges of the created segment. please note that the ranges that were already enabled before creating the segment will not change their storage type. ### ida_segment.ADDSEG_NOAA do not mark new segment for auto-analysis ### ida_segment.ADDSEG_IDBENC ‘name’ and ‘sclass’ are given in the IDB encoding; non-ASCII bytes will be decoded accordingly ### ida_segment.ADDSEG_KEEP_TYPE do not set segment type according to segment class ### ida_segment.add_segm(para: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), start: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), end: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), name: [str](https://docs.python.org/3/library/stdtypes.html#str), sclass: [str](https://docs.python.org/3/library/stdtypes.html#str), flags: [int](https://docs.python.org/3/library/functions.html#int) = 0) → [bool](https://docs.python.org/3/library/functions.html#bool) Add a new segment, second form. Segment alignment is set to saRelByte. Segment combination is “public” or “stack” (if segment class is “STACK”). Addressing mode of segment is taken as default (16-bit or 32-bit). Default segment registers are set to BADSEL. If a segment already exists at the specified range of addresses, this segment will be truncated. Instructions and data in the old segment will be deleted if the new segment has another addressing mode or another segment base address. * **Parameters:** * **para** – segment base paragraph. if paragraph can’t fit in 16-bit, then a new selector is allocated and mapped to the paragraph. * **start** – start address of the segment. if start==BADADDR then start <- to_ea(para,0). * **end** – end address of the segment. end address should be higher than start address. For emulate empty segments, use SEG_NULL segment type. If the end address is lower than start address, then fail. If end==BADADDR, then a segment up to the next segment will be created (if the next segment doesn’t exist, then 1 byte segment will be created). If ‘end’ is too high and the new segment would overlap the next segment, ‘end’ is adjusted properly. * **name** – name of new segment. may be nullptr * **sclass** – class of the segment. may be nullptr. type of the new segment is modified if class is one of predefined names: * “CODE” -> SEG_CODE * “DATA” -> SEG_DATA * “CONST” -> SEG_DATA * “STACK” -> SEG_BSS * “BSS” -> SEG_BSS * “XTRN” -> SEG_XTRN * “COMM” -> SEG_COMM * “ABS” -> SEG_ABSSYM * **Parameters:** **flags** – Add segment flags * **Returns:** 1: ok * **Returns:** 0: failed, a warning message is displayed ### ida_segment.del_segm(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), flags: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) Delete a segment. * **Parameters:** * **ea** – any address belonging to the segment * **flags** – Segment modification flags * **Returns:** 1: ok * **Returns:** 0: failed, no segment at ‘ea’. ### ida_segment.SEGMOD_KILL disable addresses if segment gets shrinked or deleted ### ida_segment.SEGMOD_KEEP keep information (code & data, etc) ### ida_segment.SEGMOD_SILENT be silent ### ida_segment.SEGMOD_KEEP0 flag for internal use, don’t set ### ida_segment.SEGMOD_KEEPSEL do not try to delete unused selector ### ida_segment.SEGMOD_NOMOVE don’t move info from the start of segment to the new start address (for set_segm_start()) ### ida_segment.SEGMOD_SPARSE use sparse storage if extending the segment (for set_segm_start(), set_segm_end()) ### ida_segment.get_segm_qty() → [int](https://docs.python.org/3/library/functions.html#int) Get number of segments. ### ida_segment.getseg(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → segment_t \* Get pointer to segment by linear address. * **Parameters:** **ea** – linear address belonging to the segment * **Returns:** nullptr or pointer to segment structure ### ida_segment.GSI_NAME Fill segment name string. ### ida_segment.GSI_SCLASS Fill segment class string. ### ida_segment.GSI_CMT_REG Fill regular comment string. ### ida_segment.GSI_CMT_RPT Fill repeatable comment string. ### ida_segment.GSI_COMMENTS Fill both comments. ### ida_segment.GSI_ALL Fill all string fields. ### ida_segment.GSI_UPDATED Mark name and/or class strings as updated. ### ida_segment.get_segment_info(out: [segment_info_t](#ida_segment.segment_info_t), ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), flags: [int](https://docs.python.org/3/library/functions.html#int) = 0) → [bool](https://docs.python.org/3/library/functions.html#bool) Fill segment_info_t structure for segment at the specified address. By default, only fields present in segment_t are filled. Use GSI_\* flags to request additional string fields (name, class, comments). * **Parameters:** * **out** – output structure to fill (can be nullptr) * **ea** – linear address belonging to the segment * **flags** – combination of Get segment info flags flags (default: 0) * **Returns:** true if segment found, false otherwise ### ida_segment.set_segment_info(si: [segment_info_t](#ida_segment.segment_info_t), flags: [int](https://docs.python.org/3/library/functions.html#int) = 0) → [bool](https://docs.python.org/3/library/functions.html#bool) Apply segment_info_t modifications to the database. Uses start_ea as the segment handle. * **Parameters:** * **si** – segment_info_t with modifications (set via set_\* methods) * **flags** – combination of Add segment flags flags (default: 0) * **Returns:** true on success, false if segment not found ### ida_segment.get_segment_ea(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) Get segment start address. * **Parameters:** **ea** – linear address belonging to the segment * **Returns:** segment start_ea, or BADADDR if not found ### ida_segment.getnseg(n: [int](https://docs.python.org/3/library/functions.html#int)) → segment_t \* Get pointer to segment by its number. * **Parameters:** **n** – segment number in the range (0..get_segm_qty()-1) * **Returns:** nullptr or pointer to segment structure ### ida_segment.get_segment_info_by_num(out: [segment_info_t](#ida_segment.segment_info_t), n: [int](https://docs.python.org/3/library/functions.html#int), flags: [int](https://docs.python.org/3/library/functions.html#int) = 0) → [bool](https://docs.python.org/3/library/functions.html#bool) Fill segment_info_t structure for segment by its number. By default, only fields present in segment_t are filled. Use GSI_\* flags to request additional string fields (name, class, comments). * **Parameters:** * **out** – output structure to fill (can be nullptr) * **n** – segment number (0..get_segm_qty()-1) * **flags** – combination of Get segment info flags flags (default: 0) * **Returns:** true if segment found, false otherwise ### ida_segment.get_segment_ea_by_num(n: [int](https://docs.python.org/3/library/functions.html#int)) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) Get segment start address by its number. The returned address can be used as a handle for other segment_\* functions. * **Parameters:** **n** – segment number in the range (0..get_segm_qty()-1) * **Returns:** segment start_ea, or BADADDR if not found ### ida_segment.get_segm_num(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [int](https://docs.python.org/3/library/functions.html#int) Get number of segment by address. * **Parameters:** **ea** – linear address belonging to the segment * **Returns:** -1 if no segment occupies the specified address. otherwise returns number of the specified segment (0..get_segm_qty()-1) ### ida_segment.get_next_seg(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → segment_t \* Get pointer to the next segment. ### ida_segment.get_next_segment_ea(seg_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) Get start address of the next segment. * **Parameters:** **seg_ea** – linear address belonging to the segment * **Returns:** start_ea of next segment, or BADADDR if no more segments ### ida_segment.get_prev_seg(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → segment_t \* Get pointer to the previous segment. ### ida_segment.get_prev_segment_ea(seg_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) Get start address of the previous segment. * **Parameters:** **seg_ea** – linear address belonging to the segment * **Returns:** start_ea of previous segment, or BADADDR if no more segments ### ida_segment.get_first_seg() → segment_t \* Get pointer to the first segment. ### ida_segment.get_first_segment_ea() → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) Get start address of the first segment. The returned address can be used as a handle for other segment_\* functions. * **Returns:** segment start_ea, or BADADDR if no segments exist ### ida_segment.get_last_seg() → segment_t \* Get pointer to the last segment. ### ida_segment.get_last_segment_ea() → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) Get start address of the last segment. * **Returns:** segment start_ea, or BADADDR if no segments exist ### ida_segment.get_segm_by_name(name: [str](https://docs.python.org/3/library/stdtypes.html#str)) → segment_t \* Get pointer to segment by its name. * **Parameters:** **name** – segment name. may be nullptr. * **Returns:** nullptr or pointer to segment structure ### ida_segment.get_segment_ea_by_name(name: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) Get segment start address by its name. If there are several segments with the same name, returns the first of them. * **Parameters:** **name** – segment name (may be nullptr) * **Returns:** segment start_ea, or BADADDR if not found ### ida_segment.set_segm_end(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), newend: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), flags: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) Set segment end address. The next segment is shrinked to allow expansion of the specified segment. The kernel might even delete the next segment if necessary. The kernel will ask the user for a permission to destroy instructions or data going out of segment scope if such instructions exist. * **Parameters:** * **ea** – any address belonging to the segment * **newend** – new end address of the segment * **flags** – Segment modification flags * **Returns:** 1: ok * **Returns:** 0: failed, a warning message is displayed ### ida_segment.set_segm_start(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), newstart: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), flags: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) Set segment start address. The previous segment is trimmed to allow expansion of the specified segment. The kernel might even delete the previous segment if necessary. The kernel will ask the user for a permission to destroy instructions or data going out of segment scope if such instructions exist. * **Parameters:** * **ea** – any address belonging to the segment * **newstart** – new start address of the segment note that segment start address should be higher than segment base linear address. * **flags** – Segment modification flags * **Returns:** 1: ok * **Returns:** 0: failed, a warning message is displayed ### ida_segment.move_segm_start(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), newstart: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), mode: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) Move segment start. The main difference between this function and set_segm_start() is that this function may expand the previous segment while set_segm_start() never does it. So, this function allows to change bounds of two segments simultaneously. If the previous segment and the specified segment have the same addressing mode and segment base, then instructions and data are not destroyed - they simply move from one segment to another. Otherwise all instructions/data which migrate from one segment to another are destroyed. * **Parameters:** * **ea** – any address belonging to the segment * **newstart** – new start address of the segment note that segment start address should be higher than segment base linear address. * **mode** – policy for destroying defined items * 0: if it is necessary to destroy defined items, display a dialog box and ask confirmation * 1: if it is necessary to destroy defined items, just destroy them without asking the user * -1: if it is necessary to destroy defined items, don’t destroy them (i.e. function will fail) * -2: don’t destroy defined items (function will succeed) * **Returns:** 1: ok * **Returns:** 0: failed, a warning message is displayed ### ida_segment.MOVE_SEGM_OK all ok ### ida_segment.MOVE_SEGM_PARAM The specified segment does not exist. ### ida_segment.MOVE_SEGM_ROOM Not enough free room at the target address. ### ida_segment.MOVE_SEGM_IDP IDP module forbids moving the segment. ### ida_segment.MOVE_SEGM_CHUNK Too many chunks are defined, can’t move. ### ida_segment.MOVE_SEGM_LOADER The segment has been moved but the loader complained. ### ida_segment.MOVE_SEGM_ODD Cannot move segments by an odd number of bytes. ### ida_segment.MOVE_SEGM_ORPHAN Orphan bytes hinder segment movement. ### ida_segment.MOVE_SEGM_DEBUG Debugger segments cannot be moved. ### ida_segment.MOVE_SEGM_SOURCEFILES Source files ranges of addresses hinder segment movement. ### ida_segment.MOVE_SEGM_MAPPING Memory mapping ranges of addresses hinder segment movement. ### ida_segment.MOVE_SEGM_INVAL Invalid argument (delta/target does not fit the address space). ### ida_segment.move_segm_strerror(code: move_segm_code_t) → [str](https://docs.python.org/3/library/stdtypes.html#str) Return string describing error ``` MOVE_SEGM_ ``` … code. ### ida_segment.move_segm(s: [segment_t](#ida_segment.segment_t), to: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), flags: [int](https://docs.python.org/3/library/functions.html#int) = 0) → move_segm_code_t This function moves all information to the new address. * **Parameters:** * **s** – segment to move * **to** – new segment start address * **flags** – Move segment flags * **Returns:** Move segment result codes ### ida_segment.move_segment(seg_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), to: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), flags: [int](https://docs.python.org/3/library/functions.html#int) = 0) → move_segm_code_t Move segment to a new address. It fixes up address sensitive information in the kernel. The total effect is equal to reloading the segment to the target address. For the file format dependent address sensitive information, loader_t::move_segm is called. Also IDB notification event idb_event::segm_moved is called. * **Parameters:** * **seg_ea** – any address within the segment to move * **to** – new segment start address * **flags** – Move segment flags * **Returns:** Move segment result codes ### ida_segment.MSF_SILENT don’t display a “please wait” box on the screen ### ida_segment.MSF_NOFIX don’t call the loader to fix relocations ### ida_segment.MSF_LDKEEP keep the loader in the memory (optimization) ### ida_segment.MSF_FIXONCE call loader only once with the special calling method. valid for rebase_program(). see loader_t::move_segm. ### ida_segment.MSF_PRIORITY loader segments will overwrite any existing debugger segments when moved. valid for move_segm() ### ida_segment.MSF_NETNODES move netnodes instead of changing inf.netdelta (this is slower); valid for rebase_program() ### ida_segment.change_segment_status(s: [segment_t](#ida_segment.segment_t), is_deb_segm: [bool](https://docs.python.org/3/library/functions.html#bool)) → [int](https://docs.python.org/3/library/functions.html#int) Convert a debugger segment to a regular segment and vice versa. * **Parameters:** * **s** – segment to modify * **is_deb_segm** – new status of the segment * **Returns:** Change segment status result codes ### ida_segment.change_segment_status_by_ea(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), is_deb_segm: [bool](https://docs.python.org/3/library/functions.html#bool)) → [int](https://docs.python.org/3/library/functions.html#int) Convert a debugger segment to a regular segment and vice versa by address. When converting debug->regular, the memory contents will be copied to the database. * **Parameters:** * **ea** – any address within the segment * **is_deb_segm** – new status of the segment * **Returns:** Change segment status result codes ### ida_segment.CSS_OK ok ### ida_segment.CSS_NODBG debugger is not running ### ida_segment.CSS_NORANGE could not find corresponding memory range ### ida_segment.CSS_NOMEM not enough memory (might be because the segment is too big) ### ida_segment.CSS_BREAK memory reading process stopped by user ### ida_segment.SNAP_ALL_SEG Take a snapshot of all segments. ### ida_segment.SNAP_LOAD_SEG Take a snapshot of loader segments. ### ida_segment.SNAP_CUR_SEG Take a snapshot of current segment. ### ida_segment.take_memory_snapshot(type: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) Take a memory snapshot of the running process. * **Parameters:** **type** – specifies which snapshot we want (see ``` SNAP_ ``` Snapshot types) * **Returns:** success ### ida_segment.is_miniidb() → [bool](https://docs.python.org/3/library/functions.html#bool) Is the database a miniidb created by the debugger? * **Returns:** true if the database contains no segments or only debugger segments ### ida_segment.set_segm_base(s: [segment_t](#ida_segment.segment_t), newbase: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Internal function ### ida_segment.set_segment_base_ea(seg_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), newbase: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Set segment base. Internal function. * **Parameters:** * **seg_ea** – any address within the segment * **newbase** – new base linear address * **Returns:** success ### ida_segment.set_group_selector(grp: sel_t, sel: sel_t) → [int](https://docs.python.org/3/library/functions.html#int) Create a new group of segments (used OMF files). * **Parameters:** * **grp** – selector of group segment (segment type is SEG_GRP) You should create an ‘empty’ (1 byte) group segment It won’t contain anything and will be used to redirect references to the group of segments to the common selector. * **sel** – common selector of all segments belonging to the segment You should create all segments within the group with the same selector value. * **Returns:** 1: ok * **Returns:** 0: too many groups (see MAX_GROUPS) ### ida_segment.MAX_GROUPS max number of segment groups ### ida_segment.get_group_selector(grpsel: sel_t) → sel_t Get common selector for a group of segments. * **Parameters:** **grpsel** – selector of group segment * **Returns:** common selector of the group or ‘grpsel’ if no such group is found ### ida_segment.add_segment_translation(segstart: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), mappedseg: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Add segment translation. * **Parameters:** * **segstart** – start address of the segment to add translation to * **mappedseg** – start address of the overlayed segment * **Returns:** 1: ok * **Returns:** 0: too many translations or bad segstart ### ida_segment.MAX_SEGM_TRANSLATIONS max number of segment translations ### ida_segment.del_segment_translations(segstart: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) Delete the translation list * **Parameters:** **segstart** – start address of the segment to delete translation list ### ida_segment.get_segment_translations(transmap: eavec_t \*, segstart: ida_idaapi.ea_t) → ssize_t Get segment translation list. * **Parameters:** * **transmap** – vector of segment start addresses for the translation list * **segstart** – start address of the segment to get information about * **Returns:** -1 if no translation list or bad segstart. otherwise returns size of translation list. ### ida_segment.get_segment_cmt(s: [segment_t](#ida_segment.segment_t), repeatable: [bool](https://docs.python.org/3/library/functions.html#bool)) → [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None) Get segment comment. * **Parameters:** * **s** – pointer to segment structure * **repeatable** – 0: get regular comment. 1: get repeatable comment. * **Returns:** size of comment or -1 ### ida_segment.get_segment_cmt_by_ea(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), repeatable: [bool](https://docs.python.org/3/library/functions.html#bool)) → [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None) Get segment comment by address. * **Parameters:** * **ea** – any address within the segment * **repeatable** – 0: get regular comment. 1: get repeatable comment. * **Returns:** size of comment or -1 if no segment at ea ### ida_segment.set_segment_cmt(s: [segment_t](#ida_segment.segment_t), cmt: [str](https://docs.python.org/3/library/stdtypes.html#str), repeatable: [bool](https://docs.python.org/3/library/functions.html#bool)) → [None](https://docs.python.org/3/library/constants.html#None) Set segment comment. * **Parameters:** * **s** – pointer to segment structure * **cmt** – comment string, may be multiline (with ‘ ‘). maximal size is 4096 bytes. Use empty str (“”) to delete comment :param repeatable: 0: set regular comment. 1: set repeatable comment. ### ida_segment.set_segment_cmt_by_ea(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), cmt: [str](https://docs.python.org/3/library/stdtypes.html#str), repeatable: [bool](https://docs.python.org/3/library/functions.html#bool)) → [None](https://docs.python.org/3/library/constants.html#None) Set segment comment by address. * **Parameters:** * **ea** – any address within the segment * **cmt** – comment string, may be multiline (with ‘ ‘). maximal size is 4096 bytes. Use empty str (“”) to delete comment :param repeatable: 0: set regular comment. 1: set repeatable comment. ### ida_segment.std_out_segm_footer(ctx: outctx_t &, seg: segment_t) → [None](https://docs.python.org/3/library/constants.html#None) Generate segment footer line as a comment line. ### ida_segment.std_out_segment_footer(ctx: outctx_t &, seg_ea: ida_idaapi.ea_t) → [None](https://docs.python.org/3/library/constants.html#None) Generate segment footer line as a comment line by address. This function may be used in IDP modules to generate segment footer if the target assembler doesn’t have ‘ends’ directive. * **Parameters:** * **ctx** – output context * **seg_ea** – any address within the segment ### ida_segment.set_segm_name(s: [segment_t](#ida_segment.segment_t), name: [str](https://docs.python.org/3/library/stdtypes.html#str), flags: [int](https://docs.python.org/3/library/functions.html#int) = 0) → [int](https://docs.python.org/3/library/functions.html#int) Rename segment. The new name is validated (see validate_name). A segment always has a name. If you hadn’t specified a name, the kernel will assign it “seg###” name where ### is segment number. * **Parameters:** * **s** – pointer to segment (may be nullptr) * **name** – new segment name * **flags** – ADDSEG_IDBENC or 0 * **Returns:** 1: ok, name is good and segment is renamed * **Returns:** 0: failure, name is bad or segment is nullptr ### ida_segment.set_segment_name(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), name: [str](https://docs.python.org/3/library/stdtypes.html#str), flags: [int](https://docs.python.org/3/library/functions.html#int) = 0) → [int](https://docs.python.org/3/library/functions.html#int) Rename segment by address. The new name is validated (see validate_name). A segment always has a name. If you hadn’t specified a name, the kernel will assign it “seg###” name where ### is segment number. * **Parameters:** * **ea** – any address within the segment * **name** – new segment name * **flags** – ADDSEG_IDBENC or 0 * **Returns:** 1: ok, name is good and segment is renamed * **Returns:** 0: failure, name is bad or no segment at ea ### ida_segment.get_segm_name(s: [segment_t](#ida_segment.segment_t), flags: [int](https://docs.python.org/3/library/functions.html#int) = 0) → [str](https://docs.python.org/3/library/stdtypes.html#str) Get true segment name by pointer to segment. * **Parameters:** * **s** – pointer to segment * **flags** – 0-return name as is; 1-substitute bad symbols with \_ 1 corresponds to GN_VISIBLE * **Returns:** size of segment name (-1 if s==nullptr) ### ida_segment.get_segment_name(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), flags: [int](https://docs.python.org/3/library/functions.html#int) = 0) → [str](https://docs.python.org/3/library/stdtypes.html#str) Get segment name by address. * **Parameters:** * **ea** – any address within the segment * **flags** – 0-return name as is; 1-substitute bad symbols with \_ 1 corresponds to GN_VISIBLE * **Returns:** size of segment name (-1 if no segment at ea) ### ida_segment.get_visible_segm_name(s: [segment_t](#ida_segment.segment_t)) → [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None) Get segment name by pointer to segment. * **Parameters:** **s** – pointer to segment * **Returns:** size of segment name (-1 if s==nullptr) ### ida_segment.get_segm_class(s: [segment_t](#ida_segment.segment_t)) → [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None) Get segment class. Segment class is arbitrary text (max 8 characters). * **Parameters:** **s** – pointer to segment * **Returns:** size of segment class (-1 if s==nullptr or bufsize<=0) ### ida_segment.get_segment_class(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None) Get segment class by address. Segment class is arbitrary text (max 8 characters). * **Parameters:** **ea** – any address within the segment * **Returns:** size of segment class (-1 if no segment at ea) ### ida_segment.set_segm_class(s: [segment_t](#ida_segment.segment_t), sclass: [str](https://docs.python.org/3/library/stdtypes.html#str), flags: [int](https://docs.python.org/3/library/functions.html#int) = 0) → [int](https://docs.python.org/3/library/functions.html#int) Set segment class. * **Parameters:** * **s** – pointer to segment (may be nullptr) * **sclass** – segment class (may be nullptr). If segment type is SEG_NORM and segment class is one of predefined names, then segment type is changed to: * “CODE” -> SEG_CODE * “DATA” -> SEG_DATA * “STACK” -> SEG_BSS * “BSS” -> SEG_BSS * if “UNK” then segment type is reset to SEG_NORM. * **Parameters:** **flags** – Add segment flags * **Returns:** 1: ok, name is good and segment is renamed * **Returns:** 0: failure, name is nullptr or bad or segment is nullptr ### ida_segment.set_segment_class(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), sclass: [str](https://docs.python.org/3/library/stdtypes.html#str), flags: [int](https://docs.python.org/3/library/functions.html#int) = 0) → [int](https://docs.python.org/3/library/functions.html#int) Set segment class by address. * **Parameters:** * **ea** – any address within the segment * **sclass** – segment class (may be nullptr). If segment type is SEG_NORM and segment class is one of predefined names, then segment type is changed to: * “CODE” -> SEG_CODE * “DATA” -> SEG_DATA * “STACK” -> SEG_BSS * “BSS” -> SEG_BSS * if “UNK” then segment type is reset to SEG_NORM. * **Parameters:** **flags** – Add segment flags * **Returns:** 1: ok, class is good and segment class is changed * **Returns:** 0: failure, class is nullptr or bad or no segment at ea ### ida_segment.segtype(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → uchar Get segment type. * **Parameters:** **ea** – any linear address within the segment * **Returns:** Segment types, SEG_UNDF if no segment found at ‘ea’ ### ida_segment.get_segment_alignment(align: uchar) → [str](https://docs.python.org/3/library/stdtypes.html#str) Get text representation of segment alignment code. * **Returns:** text digestable by IBM PC assembler. ### ida_segment.get_segment_combination(comb: uchar) → [str](https://docs.python.org/3/library/stdtypes.html#str) Get text representation of segment combination code. * **Returns:** text digestable by IBM PC assembler. ### ida_segment.get_segm_para(s: [segment_t](#ida_segment.segment_t)) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) Get segment base paragraph. * **Parameters:** **s** – pointer to segment * **Returns:** 0 if s == nullptr, the segment base paragraph ### ida_segment.get_segment_para(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) Get segment base paragraph by address. Segment base paragraph may be converted to segment base linear address using to_ea() function. * **Parameters:** **ea** – any linear address within the segment * **Returns:** 0 if no segment at ea, otherwise the segment base paragraph ### ida_segment.get_segm_base(s: [segment_t](#ida_segment.segment_t)) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) Get segment base linear address. * **Parameters:** **s** – pointer to segment * **Returns:** 0 if s == nullptr, otherwise segment base linear address ### ida_segment.get_segment_base(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) Get segment base linear address by address. Segment base linear address is used to calculate virtual addresses. The virtual address of the first byte of the segment will be (start address of segment - segment base linear address) * **Parameters:** **ea** – any linear address within the segment * **Returns:** 0 if no segment at ea, otherwise segment base linear address ### ida_segment.set_segm_addressing(s: [segment_t](#ida_segment.segment_t), bitness: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) Change segment addressing mode (16, 32, 64 bits). You must use this function to change segment addressing, never change the ‘bitness’ field directly. This function will delete all instructions, comments and names in the segment * **Parameters:** * **s** – pointer to segment * **bitness** – new addressing mode of segment * 2: 64-bit segment * 1: 32-bit segment * 0: 16-bit segment * **Returns:** success ### ida_segment.set_segment_addressing(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), bitness: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) Change segment addressing mode (16, 32, 64 bits) by address. You must use this function to change segment addressing, never change the ‘bitness’ field directly. This function will delete all instructions, comments and names in the segment * **Parameters:** * **ea** – any address within the segment * **bitness** – new addressing mode of segment * 2: 64-bit segment * 1: 32-bit segment * 0: 16-bit segment * **Returns:** success ### ida_segment.is_same_segment(ea1: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), ea2: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Check two addresses belong to one segment. * **Parameters:** * **ea1** – linear address * **ea2** – linear address * **Returns:** true if two addresses belong to one segment or they both are not belong to any segment ### ida_segment.update_segm(s: [segment_t](#ida_segment.segment_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_segment.segm_adjust_diff(s: [segment_t](#ida_segment.segment_t), delta: adiff_t) → adiff_t Truncate and sign extend a delta depending on the segment ### ida_segment.adjust_segment_diff(seg_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), delta: adiff_t) → adiff_t Truncate and sign extend a delta depending on the segment by address. * **Parameters:** * **seg_ea** – any address within the segment * **delta** – delta to adjust * **Returns:** adjusted delta (0 if no segment at seg_ea) ### ida_segment.segm_adjust_ea(s: [segment_t](#ida_segment.segment_t), ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) Truncate an address depending on the segment ### ida_segment.adjust_segment_ea(seg_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) Truncate an address depending on the segment by address. * **Parameters:** * **seg_ea** – any address within the segment (used to determine bitness) * **ea** – address to adjust * **Returns:** adjusted address (ea if no segment at seg_ea) ### ida_segment.get_defsr(s, reg) Deprecated, use instead: value = s.defsr[reg] ### ida_segment.set_defsr(s, reg, value) Deprecated, use instead: s.defsr[reg] = value ### ida_segment.rebase_program(delta: PyObject \*, flags: int) → [int](https://docs.python.org/3/library/functions.html#int) Rebase the whole program by ‘delta’ bytes. * **Parameters:** * **delta** – number of bytes to move the program * **flags** – Move segment flags it is recommended to use MSF_FIXONCE so that the loader takes care of global variables it stored in the database * **Returns:** Move segment result codes ### ida_segment.set_visible_segm ### ida_segment.lock_segm ### ida_segment.is_segm_locked ### ida_segment.get_segm_by_sel ### ida_segment.add_segm_ex ### ida_segment.getseg ### ida_segment.getnseg ### ida_segment.get_next_seg ### ida_segment.get_prev_seg ### ida_segment.get_first_seg ### ida_segment.get_last_seg ### ida_segment.get_segm_by_name ### ida_segment.move_segm ### ida_segment.change_segment_status ### ida_segment.set_segm_base ### ida_segment.get_segment_cmt ### ida_segment.set_segment_cmt ### ida_segment.std_out_segm_footer ### ida_segment.set_segm_name ### ida_segment.get_segm_name ### ida_segment.get_visible_segm_name ### ida_segment.get_segm_class ### ida_segment.set_segm_class ### ida_segment.get_segm_para ### ida_segment.get_segm_base ### ida_segment.set_segm_addressing ### ida_segment.segm_adjust_diff ### ida_segment.segm_adjust_ea # index.html.md # colorize_disassembly summary: assign a background color to an address, function & segment description: : This illustrates the setting/retrieval of background colours using the IDC wrappers
In order to do so, we’ll be assigning colors to specific ranges (item, function, or segment). Those will be persisted in the database. keywords: coloring, idc see_also: colorize_disassembly_on_the_fly level: beginner ## Attributes | [`BG_BLUE`](#colorize_disassembly.BG_BLUE) | | |----------------------------------------------|----| | [`BG_GREEN`](#colorize_disassembly.BG_GREEN) | | | [`BG_RED`](#colorize_disassembly.BG_RED) | | | [`ea`](#colorize_disassembly.ea) | | ## Module Contents ### colorize_disassembly.BG_BLUE *= 12591136* ### colorize_disassembly.BG_GREEN *= 2129952* ### colorize_disassembly.BG_RED *= 2105536* ### colorize_disassembly.ea # index.html.md # register_timer summary: use timers for delayed execution description: : Register (possibly repeating) timers. level: beginner ## Classes | [`timercallback_t`](#register_timer.timercallback_t) | | |--------------------------------------------------------|----| ## Functions | [`main`](#register_timer.main)() | | |------------------------------------|----| ## Module Contents ### *class* register_timer.timercallback_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### interval *= 1000* #### obj #### times *= 5* ### register_timer.main() # index.html.md # create_struct_by_parsing summary: create a structure by parsing its definition description: : The goal of this script is to demonstrate some usage of the type API. In this script, we create a structure using the “parsing” method. level: beginner ## Attributes | [`struct_name`](#create_struct_by_parsing.struct_name) | | |----------------------------------------------------------|----| | [`struct_str`](#create_struct_by_parsing.struct_str) | | | [`tif`](#create_struct_by_parsing.tif) | | ## Module Contents ### create_struct_by_parsing.struct_name *= 'pcap_hdr_s'* ### create_struct_by_parsing.struct_str *= Multiline-String*
Show Value ```python """ typedef int int32_t; typedef unsigned int uint32_t; struct pcap_hdr_s { uint32_t magic_number; /* magic number */ uint16_t version_major; /* major version number */ uint16_t version_minor; /* minor version number */ int32_t thiszone; /* GMT to local correction */ uint32_t sigfigs; /* accuracy of timestamps */ uint32_t snaplen; /* max length of captured packets, in octets */ uint32_t network; /* data link type */ }; """ ```
### create_struct_by_parsing.tif # index.html.md # idc IDC compatibility module This file contains IDA built-in function declarations and internal bit definitions. Each byte of the program has 32-bit flags (low 8 bits keep the byte value). These 32 bits are used in get_full_flags/get_flags functions. This file is subject to change without any notice. Future versions of IDA may use other definitions. ## Attributes | [`WORDMASK`](#idc.WORDMASK) | | |---------------------------------------------------------------|-------------------------------------------------------------| | [`BADADDR`](#idc.BADADDR) | | | [`BADSEL`](#idc.BADSEL) | | | [`SIZE_MAX`](#idc.SIZE_MAX) | | | [`MS_VAL`](#idc.MS_VAL) | | | [`FF_IVL`](#idc.FF_IVL) | | | [`MS_CLS`](#idc.MS_CLS) | | | [`FF_CODE`](#idc.FF_CODE) | | | [`FF_DATA`](#idc.FF_DATA) | | | [`FF_TAIL`](#idc.FF_TAIL) | | | [`FF_UNK`](#idc.FF_UNK) | | | [`MS_COMM`](#idc.MS_COMM) | | | [`FF_COMM`](#idc.FF_COMM) | | | [`FF_REF`](#idc.FF_REF) | | | [`FF_LINE`](#idc.FF_LINE) | | | [`FF_NAME`](#idc.FF_NAME) | | | [`FF_LABL`](#idc.FF_LABL) | | | [`FF_FLOW`](#idc.FF_FLOW) | | | [`FF_ANYNAME`](#idc.FF_ANYNAME) | | | [`MS_0TYPE`](#idc.MS_0TYPE) | | | [`FF_0VOID`](#idc.FF_0VOID) | | | [`FF_0NUMH`](#idc.FF_0NUMH) | | | [`FF_0NUMD`](#idc.FF_0NUMD) | | | [`FF_0CHAR`](#idc.FF_0CHAR) | | | [`FF_0SEG`](#idc.FF_0SEG) | | | [`FF_0OFF`](#idc.FF_0OFF) | | | [`FF_0NUMB`](#idc.FF_0NUMB) | | | [`FF_0NUMO`](#idc.FF_0NUMO) | | | [`FF_0ENUM`](#idc.FF_0ENUM) | | | [`FF_0FOP`](#idc.FF_0FOP) | | | [`FF_0STRO`](#idc.FF_0STRO) | | | [`FF_0STK`](#idc.FF_0STK) | | | [`MS_1TYPE`](#idc.MS_1TYPE) | | | [`FF_1VOID`](#idc.FF_1VOID) | | | [`FF_1NUMH`](#idc.FF_1NUMH) | | | [`FF_1NUMD`](#idc.FF_1NUMD) | | | [`FF_1CHAR`](#idc.FF_1CHAR) | | | [`FF_1SEG`](#idc.FF_1SEG) | | | [`FF_1OFF`](#idc.FF_1OFF) | | | [`FF_1NUMB`](#idc.FF_1NUMB) | | | [`FF_1NUMO`](#idc.FF_1NUMO) | | | [`FF_1ENUM`](#idc.FF_1ENUM) | | | [`FF_1FOP`](#idc.FF_1FOP) | | | [`FF_1STRO`](#idc.FF_1STRO) | | | [`FF_1STK`](#idc.FF_1STK) | | | [`DT_TYPE`](#idc.DT_TYPE) | | | [`FF_BYTE`](#idc.FF_BYTE) | | | [`FF_WORD`](#idc.FF_WORD) | | | [`FF_DWORD`](#idc.FF_DWORD) | | | [`FF_QWORD`](#idc.FF_QWORD) | | | [`FF_TBYTE`](#idc.FF_TBYTE) | | | [`FF_STRLIT`](#idc.FF_STRLIT) | | | [`FF_STRUCT`](#idc.FF_STRUCT) | | | [`FF_OWORD`](#idc.FF_OWORD) | | | [`FF_FLOAT`](#idc.FF_FLOAT) | | | [`FF_DOUBLE`](#idc.FF_DOUBLE) | | | [`FF_PACKREAL`](#idc.FF_PACKREAL) | | | [`FF_ALIGN`](#idc.FF_ALIGN) | | | [`MS_CODE`](#idc.MS_CODE) | | | [`FF_FUNC`](#idc.FF_FUNC) | | | [`FF_IMMD`](#idc.FF_IMMD) | | | [`FF_JUMP`](#idc.FF_JUMP) | | | [`NEF_SEGS`](#idc.NEF_SEGS) | | | [`NEF_RSCS`](#idc.NEF_RSCS) | | | [`NEF_NAME`](#idc.NEF_NAME) | | | [`NEF_MAN`](#idc.NEF_MAN) | | | [`NEF_FILL`](#idc.NEF_FILL) | | | [`NEF_IMPS`](#idc.NEF_IMPS) | | | [`NEF_FIRST`](#idc.NEF_FIRST) | | | [`NEF_CODE`](#idc.NEF_CODE) | | | [`NEF_RELOAD`](#idc.NEF_RELOAD) | | | [`NEF_FLAT`](#idc.NEF_FLAT) | | | [`IDCHK_OK`](#idc.IDCHK_OK) | | | [`IDCHK_ARG`](#idc.IDCHK_ARG) | | | [`IDCHK_KEY`](#idc.IDCHK_KEY) | | | [`IDCHK_MAX`](#idc.IDCHK_MAX) | | | [`add_idc_hotkey`](#idc.add_idc_hotkey) | | | [`del_idc_hotkey`](#idc.del_idc_hotkey) | | | [`jumpto`](#idc.jumpto) | | | [`auto_wait`](#idc.auto_wait) | | | [`DBFL_BAK`](#idc.DBFL_BAK) | | | [`qexit`](#idc.qexit) | | | [`load_and_run_plugin`](#idc.load_and_run_plugin) | | | [`plan_to_apply_idasgn`](#idc.plan_to_apply_idasgn) | | | [`create_insn`](#idc.create_insn) | | | [`SN_CHECK`](#idc.SN_CHECK) | | | [`SN_NOCHECK`](#idc.SN_NOCHECK) | | | [`SN_PUBLIC`](#idc.SN_PUBLIC) | | | [`SN_NON_PUBLIC`](#idc.SN_NON_PUBLIC) | | | [`SN_WEAK`](#idc.SN_WEAK) | | | [`SN_NON_WEAK`](#idc.SN_NON_WEAK) | | | [`SN_AUTO`](#idc.SN_AUTO) | | | [`SN_NON_AUTO`](#idc.SN_NON_AUTO) | | | [`SN_NOLIST`](#idc.SN_NOLIST) | | | [`SN_NOWARN`](#idc.SN_NOWARN) | | | [`SN_LOCAL`](#idc.SN_LOCAL) | | | [`set_cmt`](#idc.set_cmt) | | | [`create_data`](#idc.create_data) | | | [`create_custom_data`](#idc.create_custom_data) | | | [`create_align`](#idc.create_align) | | | [`del_items`](#idc.del_items) | | | [`DELIT_SIMPLE`](#idc.DELIT_SIMPLE) | | | [`DELIT_EXPAND`](#idc.DELIT_EXPAND) | | | [`DELIT_DELNAMES`](#idc.DELIT_DELNAMES) | | | [`AP_ALLOWDUPS`](#idc.AP_ALLOWDUPS) | | | [`AP_SIGNED`](#idc.AP_SIGNED) | | | [`AP_INDEX`](#idc.AP_INDEX) | | | [`AP_ARRAY`](#idc.AP_ARRAY) | | | [`AP_IDXBASEMASK`](#idc.AP_IDXBASEMASK) | | | [`AP_IDXDEC`](#idc.AP_IDXDEC) | | | [`AP_IDXHEX`](#idc.AP_IDXHEX) | | | [`AP_IDXOCT`](#idc.AP_IDXOCT) | | | [`AP_IDXBIN`](#idc.AP_IDXBIN) | | | [`op_bin`](#idc.op_bin) | | | [`op_oct`](#idc.op_oct) | | | [`op_dec`](#idc.op_dec) | | | [`op_hex`](#idc.op_hex) | | | [`op_chr`](#idc.op_chr) | | | [`OPND_OUTER`](#idc.OPND_OUTER) | | | [`op_offset`](#idc.op_offset) | | | [`REF_OFF8`](#idc.REF_OFF8) | | | [`REF_OFF16`](#idc.REF_OFF16) | | | [`REF_OFF32`](#idc.REF_OFF32) | | | [`REF_LOW8`](#idc.REF_LOW8) | | | [`REF_LOW16`](#idc.REF_LOW16) | | | [`REF_HIGH8`](#idc.REF_HIGH8) | | | [`REF_HIGH16`](#idc.REF_HIGH16) | | | [`REF_OFF64`](#idc.REF_OFF64) | | | [`REFINFO_RVA`](#idc.REFINFO_RVA) | | | [`REFINFO_PASTEND`](#idc.REFINFO_PASTEND) | | | [`REFINFO_NOBASE`](#idc.REFINFO_NOBASE) | | | [`REFINFO_SUBTRACT`](#idc.REFINFO_SUBTRACT) | | | [`REFINFO_SIGNEDOP`](#idc.REFINFO_SIGNEDOP) | | | [`op_seg`](#idc.op_seg) | | | [`op_num`](#idc.op_num) | | | [`op_flt`](#idc.op_flt) | | | [`op_man`](#idc.op_man) | | | [`toggle_sign`](#idc.toggle_sign) | | | [`op_enum`](#idc.op_enum) | | | [`op_stkvar`](#idc.op_stkvar) | | | [`E_PREV`](#idc.E_PREV) | | | [`E_NEXT`](#idc.E_NEXT) | | | [`get_extra_cmt`](#idc.get_extra_cmt) | | | [`update_extra_cmt`](#idc.update_extra_cmt) | | | [`del_extra_cmt`](#idc.del_extra_cmt) | | | [`set_manual_insn`](#idc.set_manual_insn) | | | [`get_manual_insn`](#idc.get_manual_insn) | | | [`patch_dbg_byte`](#idc.patch_dbg_byte) | | | [`patch_byte`](#idc.patch_byte) | | | [`patch_word`](#idc.patch_word) | | | [`patch_dword`](#idc.patch_dword) | | | [`patch_qword`](#idc.patch_qword) | | | [`SR_inherit`](#idc.SR_inherit) | | | [`SR_user`](#idc.SR_user) | | | [`SR_auto`](#idc.SR_auto) | | | [`SR_autostart`](#idc.SR_autostart) | | | [`auto_mark_range`](#idc.auto_mark_range) | | | [`auto_unmark`](#idc.auto_unmark) | | | [`AU_UNK`](#idc.AU_UNK) | | | [`AU_CODE`](#idc.AU_CODE) | | | [`AU_PROC`](#idc.AU_PROC) | | | [`AU_USED`](#idc.AU_USED) | | | [`AU_LIBF`](#idc.AU_LIBF) | | | [`AU_FINAL`](#idc.AU_FINAL) | | | [`OFILE_MAP`](#idc.OFILE_MAP) | | | [`OFILE_EXE`](#idc.OFILE_EXE) | | | [`OFILE_IDC`](#idc.OFILE_IDC) | | | [`OFILE_LST`](#idc.OFILE_LST) | | | [`OFILE_ASM`](#idc.OFILE_ASM) | | | [`OFILE_DIF`](#idc.OFILE_DIF) | | | [`GENFLG_MAPSEG`](#idc.GENFLG_MAPSEG) | | | [`GENFLG_MAPNAME`](#idc.GENFLG_MAPNAME) | | | [`GENFLG_MAPDMNG`](#idc.GENFLG_MAPDMNG) | | | [`GENFLG_MAPLOC`](#idc.GENFLG_MAPLOC) | | | [`GENFLG_IDCTYPE`](#idc.GENFLG_IDCTYPE) | | | [`GENFLG_ASMTYPE`](#idc.GENFLG_ASMTYPE) | | | [`GENFLG_GENHTML`](#idc.GENFLG_GENHTML) | | | [`GENFLG_ASMINC`](#idc.GENFLG_ASMINC) | | | [`CHART_PRINT_NAMES`](#idc.CHART_PRINT_NAMES) | | | [`CHART_GEN_GDL`](#idc.CHART_GEN_GDL) | | | [`CHART_WINGRAPH`](#idc.CHART_WINGRAPH) | | | [`CHART_NOLIBFUNCS`](#idc.CHART_NOLIBFUNCS) | | | [`get_root_filename`](#idc.get_root_filename) | | | [`get_input_file_path`](#idc.get_input_file_path) | | | [`set_root_filename`](#idc.set_root_filename) | | | [`retrieve_input_file_md5`](#idc.retrieve_input_file_md5) | | | [`get_full_flags`](#idc.get_full_flags) | | | [`get_db_byte`](#idc.get_db_byte) | | | [`get_wide_byte`](#idc.get_wide_byte) | | | [`read_dbg_memory`](#idc.read_dbg_memory) | | | [`get_original_byte`](#idc.get_original_byte) | | | [`get_wide_word`](#idc.get_wide_word) | | | [`get_wide_dword`](#idc.get_wide_dword) | | | [`get_qword`](#idc.get_qword) | | | [`get_name_ea`](#idc.get_name_ea) | | | [`get_screen_ea`](#idc.get_screen_ea) | | | [`next_addr`](#idc.next_addr) | | | [`prev_addr`](#idc.prev_addr) | | | [`next_not_tail`](#idc.next_not_tail) | | | [`prev_not_tail`](#idc.prev_not_tail) | | | [`get_item_head`](#idc.get_item_head) | | | [`get_item_end`](#idc.get_item_end) | | | [`GN_VISIBLE`](#idc.GN_VISIBLE) | | | [`GN_COLORED`](#idc.GN_COLORED) | | | [`GN_DEMANGLED`](#idc.GN_DEMANGLED) | | | [`GN_STRICT`](#idc.GN_STRICT) | | | [`GN_SHORT`](#idc.GN_SHORT) | | | [`GN_LONG`](#idc.GN_LONG) | | | [`GN_LOCAL`](#idc.GN_LOCAL) | | | [`GN_ISRET`](#idc.GN_ISRET) | | | [`GN_NOT_ISRET`](#idc.GN_NOT_ISRET) | | | [`calc_gtn_flags`](#idc.calc_gtn_flags) | | | [`GENDSM_FORCE_CODE`](#idc.GENDSM_FORCE_CODE) | | | [`GENDSM_MULTI_LINE`](#idc.GENDSM_MULTI_LINE) | | | [`o_void`](#idc.o_void) | | | [`o_reg`](#idc.o_reg) | | | [`o_mem`](#idc.o_mem) | | | [`o_phrase`](#idc.o_phrase) | | | [`o_displ`](#idc.o_displ) | | | [`o_imm`](#idc.o_imm) | | | [`o_far`](#idc.o_far) | | | [`o_near`](#idc.o_near) | | | [`o_idpspec0`](#idc.o_idpspec0) | | | [`o_idpspec1`](#idc.o_idpspec1) | | | [`o_idpspec2`](#idc.o_idpspec2) | | | [`o_idpspec3`](#idc.o_idpspec3) | | | [`o_idpspec4`](#idc.o_idpspec4) | | | [`o_idpspec5`](#idc.o_idpspec5) | | | [`o_trreg`](#idc.o_trreg) | | | [`o_dbreg`](#idc.o_dbreg) | | | [`o_crreg`](#idc.o_crreg) | | | [`o_fpreg`](#idc.o_fpreg) | | | [`o_mmxreg`](#idc.o_mmxreg) | | | [`o_xmmreg`](#idc.o_xmmreg) | | | [`o_reglist`](#idc.o_reglist) | | | [`o_creglist`](#idc.o_creglist) | | | [`o_creg`](#idc.o_creg) | | | [`o_fpreglist`](#idc.o_fpreglist) | | | [`o_text`](#idc.o_text) | | | [`o_cond`](#idc.o_cond) | | | [`o_spr`](#idc.o_spr) | | | [`o_twofpr`](#idc.o_twofpr) | | | [`o_shmbme`](#idc.o_shmbme) | | | [`o_crf`](#idc.o_crf) | | | [`o_crb`](#idc.o_crb) | | | [`o_dcr`](#idc.o_dcr) | | | [`GetCommentEx`](#idc.GetCommentEx) | | | [`get_cmt`](#idc.get_cmt) | | | [`get_forced_operand`](#idc.get_forced_operand) | | | [`BPU_1B`](#idc.BPU_1B) | | | [`BPU_2B`](#idc.BPU_2B) | | | [`BPU_4B`](#idc.BPU_4B) | | | [`STRWIDTH_1B`](#idc.STRWIDTH_1B) | | | [`STRWIDTH_2B`](#idc.STRWIDTH_2B) | | | [`STRWIDTH_4B`](#idc.STRWIDTH_4B) | | | [`STRWIDTH_MASK`](#idc.STRWIDTH_MASK) | | | [`STRLYT_TERMCHR`](#idc.STRLYT_TERMCHR) | | | [`STRLYT_PASCAL1`](#idc.STRLYT_PASCAL1) | | | [`STRLYT_PASCAL2`](#idc.STRLYT_PASCAL2) | | | [`STRLYT_PASCAL4`](#idc.STRLYT_PASCAL4) | | | [`STRLYT_MASK`](#idc.STRLYT_MASK) | | | [`STRLYT_SHIFT`](#idc.STRLYT_SHIFT) | | | [`STRTYPE_TERMCHR`](#idc.STRTYPE_TERMCHR) | | | [`STRTYPE_C`](#idc.STRTYPE_C) | | | [`STRTYPE_C_16`](#idc.STRTYPE_C_16) | | | [`STRTYPE_C_32`](#idc.STRTYPE_C_32) | | | [`STRTYPE_PASCAL`](#idc.STRTYPE_PASCAL) | | | [`STRTYPE_PASCAL_16`](#idc.STRTYPE_PASCAL_16) | | | [`STRTYPE_LEN2`](#idc.STRTYPE_LEN2) | | | [`STRTYPE_LEN2_16`](#idc.STRTYPE_LEN2_16) | | | [`STRTYPE_LEN4`](#idc.STRTYPE_LEN4) | | | [`STRTYPE_LEN4_16`](#idc.STRTYPE_LEN4_16) | | | [`STRTYPE_C16`](#idc.STRTYPE_C16) | | | [`find_suspop`](#idc.find_suspop) | | | [`find_code`](#idc.find_code) | | | [`find_data`](#idc.find_data) | | | [`find_unknown`](#idc.find_unknown) | | | [`find_defined`](#idc.find_defined) | | | [`find_imm`](#idc.find_imm) | | | [`find_text`](#idc.find_text) | | | [`find_bytes`](#idc.find_bytes) | | | [`INF_VERSION`](#idc.INF_VERSION) | | | [`INF_PROCNAME`](#idc.INF_PROCNAME) | | | [`INF_GENFLAGS`](#idc.INF_GENFLAGS) | | | [`INF_LFLAGS`](#idc.INF_LFLAGS) | | | [`INF_DATABASE_CHANGE_COUNT`](#idc.INF_DATABASE_CHANGE_COUNT) | | | [`INF_CHANGE_COUNTER`](#idc.INF_CHANGE_COUNTER) | | | [`INF_FILETYPE`](#idc.INF_FILETYPE) | | | [`FT_EXE_OLD`](#idc.FT_EXE_OLD) | | | [`FT_COM_OLD`](#idc.FT_COM_OLD) | | | [`FT_BIN`](#idc.FT_BIN) | | | [`FT_DRV`](#idc.FT_DRV) | | | [`FT_WIN`](#idc.FT_WIN) | | | [`FT_HEX`](#idc.FT_HEX) | | | [`FT_MEX`](#idc.FT_MEX) | | | [`FT_LX`](#idc.FT_LX) | | | [`FT_LE`](#idc.FT_LE) | | | [`FT_NLM`](#idc.FT_NLM) | | | [`FT_COFF`](#idc.FT_COFF) | | | [`FT_PE`](#idc.FT_PE) | | | [`FT_OMF`](#idc.FT_OMF) | | | [`FT_SREC`](#idc.FT_SREC) | | | [`FT_ZIP`](#idc.FT_ZIP) | | | [`FT_OMFLIB`](#idc.FT_OMFLIB) | | | [`FT_AR`](#idc.FT_AR) | | | [`FT_LOADER`](#idc.FT_LOADER) | | | [`FT_ELF`](#idc.FT_ELF) | | | [`FT_W32RUN`](#idc.FT_W32RUN) | | | [`FT_AOUT`](#idc.FT_AOUT) | | | [`FT_PRC`](#idc.FT_PRC) | | | [`FT_EXE`](#idc.FT_EXE) | | | [`FT_COM`](#idc.FT_COM) | | | [`FT_AIXAR`](#idc.FT_AIXAR) | | | [`FT_MACHO`](#idc.FT_MACHO) | | | [`INF_OSTYPE`](#idc.INF_OSTYPE) | | | [`OSTYPE_MSDOS`](#idc.OSTYPE_MSDOS) | | | [`OSTYPE_WIN`](#idc.OSTYPE_WIN) | | | [`OSTYPE_OS2`](#idc.OSTYPE_OS2) | | | [`OSTYPE_NETW`](#idc.OSTYPE_NETW) | | | [`INF_APPTYPE`](#idc.INF_APPTYPE) | | | [`APPT_CONSOLE`](#idc.APPT_CONSOLE) | | | [`APPT_GRAPHIC`](#idc.APPT_GRAPHIC) | | | [`APPT_PROGRAM`](#idc.APPT_PROGRAM) | | | [`APPT_LIBRARY`](#idc.APPT_LIBRARY) | | | [`APPT_DRIVER`](#idc.APPT_DRIVER) | | | [`APPT_1THREAD`](#idc.APPT_1THREAD) | | | [`APPT_MTHREAD`](#idc.APPT_MTHREAD) | | | [`APPT_16BIT`](#idc.APPT_16BIT) | | | [`APPT_32BIT`](#idc.APPT_32BIT) | | | [`INF_ASMTYPE`](#idc.INF_ASMTYPE) | | | [`INF_SPECSEGS`](#idc.INF_SPECSEGS) | | | [`INF_AF`](#idc.INF_AF) | | | [`INF_AF2`](#idc.INF_AF2) | | | [`INF_BASEADDR`](#idc.INF_BASEADDR) | | | [`INF_START_SS`](#idc.INF_START_SS) | | | [`INF_START_CS`](#idc.INF_START_CS) | | | [`INF_START_IP`](#idc.INF_START_IP) | | | [`INF_START_EA`](#idc.INF_START_EA) | | | [`INF_START_SP`](#idc.INF_START_SP) | | | [`INF_MAIN`](#idc.INF_MAIN) | | | [`INF_MIN_EA`](#idc.INF_MIN_EA) | | | [`INF_MAX_EA`](#idc.INF_MAX_EA) | | | [`INF_OMIN_EA`](#idc.INF_OMIN_EA) | | | [`INF_OMAX_EA`](#idc.INF_OMAX_EA) | | | [`INF_LOWOFF`](#idc.INF_LOWOFF) | | | [`INF_LOW_OFF`](#idc.INF_LOW_OFF) | | | [`INF_HIGHOFF`](#idc.INF_HIGHOFF) | | | [`INF_HIGH_OFF`](#idc.INF_HIGH_OFF) | | | [`INF_MAXREF`](#idc.INF_MAXREF) | | | [`INF_PRIVRANGE_START_EA`](#idc.INF_PRIVRANGE_START_EA) | | | [`INF_START_PRIVRANGE`](#idc.INF_START_PRIVRANGE) | | | [`INF_PRIVRANGE_END_EA`](#idc.INF_PRIVRANGE_END_EA) | | | [`INF_END_PRIVRANGE`](#idc.INF_END_PRIVRANGE) | | | [`INF_NETDELTA`](#idc.INF_NETDELTA) | | | [`INF_XREFNUM`](#idc.INF_XREFNUM) | | | [`INF_TYPE_XREFNUM`](#idc.INF_TYPE_XREFNUM) | | | [`INF_TYPE_XREFS`](#idc.INF_TYPE_XREFS) | | | [`INF_REFCMTNUM`](#idc.INF_REFCMTNUM) | | | [`INF_REFCMTS`](#idc.INF_REFCMTS) | | | [`INF_XREFFLAG`](#idc.INF_XREFFLAG) | | | [`INF_XREFS`](#idc.INF_XREFS) | | | [`INF_MAX_AUTONAME_LEN`](#idc.INF_MAX_AUTONAME_LEN) | | | [`INF_NAMETYPE`](#idc.INF_NAMETYPE) | | | [`INF_SHORT_DEMNAMES`](#idc.INF_SHORT_DEMNAMES) | | | [`INF_SHORT_DN`](#idc.INF_SHORT_DN) | | | [`INF_LONG_DEMNAMES`](#idc.INF_LONG_DEMNAMES) | | | [`INF_LONG_DN`](#idc.INF_LONG_DN) | | | [`INF_DEMNAMES`](#idc.INF_DEMNAMES) | | | [`INF_LISTNAMES`](#idc.INF_LISTNAMES) | | | [`INF_INDENT`](#idc.INF_INDENT) | | | [`INF_CMT_INDENT`](#idc.INF_CMT_INDENT) | | | [`INF_COMMENT`](#idc.INF_COMMENT) | | | [`INF_MARGIN`](#idc.INF_MARGIN) | | | [`INF_LENXREF`](#idc.INF_LENXREF) | | | [`INF_OUTFLAGS`](#idc.INF_OUTFLAGS) | | | [`INF_CMTFLG`](#idc.INF_CMTFLG) | | | [`INF_CMTFLAG`](#idc.INF_CMTFLAG) | | | [`INF_LIMITER`](#idc.INF_LIMITER) | | | [`INF_BORDER`](#idc.INF_BORDER) | | | [`INF_BIN_PREFIX_SIZE`](#idc.INF_BIN_PREFIX_SIZE) | | | [`INF_BINPREF`](#idc.INF_BINPREF) | | | [`INF_PREFFLAG`](#idc.INF_PREFFLAG) | | | [`INF_STRLIT_FLAGS`](#idc.INF_STRLIT_FLAGS) | | | [`INF_STRLIT_BREAK`](#idc.INF_STRLIT_BREAK) | | | [`INF_STRLIT_ZEROES`](#idc.INF_STRLIT_ZEROES) | | | [`INF_STRTYPE`](#idc.INF_STRTYPE) | | | [`INF_STRLIT_PREF`](#idc.INF_STRLIT_PREF) | | | [`INF_STRLIT_SERNUM`](#idc.INF_STRLIT_SERNUM) | | | [`INF_DATATYPES`](#idc.INF_DATATYPES) | | | [`INF_CC_ID`](#idc.INF_CC_ID) | | | [`COMP_MASK`](#idc.COMP_MASK) | | | [`COMP_UNK`](#idc.COMP_UNK) | | | [`COMP_MS`](#idc.COMP_MS) | | | [`COMP_BC`](#idc.COMP_BC) | | | [`COMP_WATCOM`](#idc.COMP_WATCOM) | | | [`COMP_GNU`](#idc.COMP_GNU) | | | [`COMP_VISAGE`](#idc.COMP_VISAGE) | | | [`COMP_BP`](#idc.COMP_BP) | | | [`INF_CC_CM`](#idc.INF_CC_CM) | | | [`INF_CC_SIZE_I`](#idc.INF_CC_SIZE_I) | | | [`INF_CC_SIZE_B`](#idc.INF_CC_SIZE_B) | | | [`INF_CC_SIZE_E`](#idc.INF_CC_SIZE_E) | | | [`INF_CC_DEFALIGN`](#idc.INF_CC_DEFALIGN) | | | [`INF_CC_SIZE_S`](#idc.INF_CC_SIZE_S) | | | [`INF_CC_SIZE_L`](#idc.INF_CC_SIZE_L) | | | [`INF_CC_SIZE_LL`](#idc.INF_CC_SIZE_LL) | | | [`INF_CC_SIZE_LDBL`](#idc.INF_CC_SIZE_LDBL) | | | [`INF_COMPILER`](#idc.INF_COMPILER) | | | [`INF_MODEL`](#idc.INF_MODEL) | | | [`INF_SIZEOF_INT`](#idc.INF_SIZEOF_INT) | | | [`INF_SIZEOF_BOOL`](#idc.INF_SIZEOF_BOOL) | | | [`INF_SIZEOF_ENUM`](#idc.INF_SIZEOF_ENUM) | | | [`INF_SIZEOF_ALGN`](#idc.INF_SIZEOF_ALGN) | | | [`INF_SIZEOF_SHORT`](#idc.INF_SIZEOF_SHORT) | | | [`INF_SIZEOF_LONG`](#idc.INF_SIZEOF_LONG) | | | [`INF_SIZEOF_LLONG`](#idc.INF_SIZEOF_LLONG) | | | [`INF_SIZEOF_LDBL`](#idc.INF_SIZEOF_LDBL) | | | [`INF_ABIBITS`](#idc.INF_ABIBITS) | | | [`INF_APPCALL_OPTIONS`](#idc.INF_APPCALL_OPTIONS) | | | [`set_processor_type`](#idc.set_processor_type) | | | [`SETPROC_IDB`](#idc.SETPROC_IDB) | | | [`SETPROC_LOADER`](#idc.SETPROC_LOADER) | | | [`SETPROC_LOADER_NON_FATAL`](#idc.SETPROC_LOADER_NON_FATAL) | | | [`SETPROC_USER`](#idc.SETPROC_USER) | | | [`set_target_assembler`](#idc.set_target_assembler) | | | [`ask_seg`](#idc.ask_seg) | | | [`ask_yn`](#idc.ask_yn) | | | [`msg`](#idc.msg) | | | [`warning`](#idc.warning) | | | [`error`](#idc.error) | | | [`set_ida_state`](#idc.set_ida_state) | | | [`IDA_STATUS_READY`](#idc.IDA_STATUS_READY) | | | [`IDA_STATUS_THINKING`](#idc.IDA_STATUS_THINKING) | | | [`IDA_STATUS_WAITING`](#idc.IDA_STATUS_WAITING) | | | [`IDA_STATUS_WORK`](#idc.IDA_STATUS_WORK) | | | [`refresh_idaview_anyway`](#idc.refresh_idaview_anyway) | | | [`refresh_lists`](#idc.refresh_lists) | | | [`set_selector`](#idc.set_selector) | | | [`del_selector`](#idc.del_selector) | | | [`ADDSEG_NOSREG`](#idc.ADDSEG_NOSREG) | | | [`ADDSEG_OR_DIE`](#idc.ADDSEG_OR_DIE) | | | [`ADDSEG_NOTRUNC`](#idc.ADDSEG_NOTRUNC) | | | [`ADDSEG_QUIET`](#idc.ADDSEG_QUIET) | | | [`ADDSEG_FILLGAP`](#idc.ADDSEG_FILLGAP) | | | [`ADDSEG_SPARSE`](#idc.ADDSEG_SPARSE) | | | [`del_segm`](#idc.del_segm) | | | [`SEGMOD_KILL`](#idc.SEGMOD_KILL) | | | [`SEGMOD_KEEP`](#idc.SEGMOD_KEEP) | | | [`SEGMOD_SILENT`](#idc.SEGMOD_SILENT) | | | [`saAbs`](#idc.saAbs) | | | [`saRelByte`](#idc.saRelByte) | | | [`saRelWord`](#idc.saRelWord) | | | [`saRelPara`](#idc.saRelPara) | | | [`saRelPage`](#idc.saRelPage) | | | [`saRelDble`](#idc.saRelDble) | | | [`saRel4K`](#idc.saRel4K) | | | [`saGroup`](#idc.saGroup) | | | [`saRel32Bytes`](#idc.saRel32Bytes) | | | [`saRel64Bytes`](#idc.saRel64Bytes) | | | [`saRelQword`](#idc.saRelQword) | | | [`scPriv`](#idc.scPriv) | | | [`scPub`](#idc.scPub) | | | [`scPub2`](#idc.scPub2) | | | [`scStack`](#idc.scStack) | | | [`scCommon`](#idc.scCommon) | | | [`scPub3`](#idc.scPub3) | | | [`SEG_NORM`](#idc.SEG_NORM) | | | [`SEG_XTRN`](#idc.SEG_XTRN) | | | [`SEG_CODE`](#idc.SEG_CODE) | | | [`SEG_DATA`](#idc.SEG_DATA) | | | [`SEG_IMP`](#idc.SEG_IMP) | | | [`SEG_GRP`](#idc.SEG_GRP) | | | [`SEG_NULL`](#idc.SEG_NULL) | | | [`SEG_UNDF`](#idc.SEG_UNDF) | | | [`SEG_BSS`](#idc.SEG_BSS) | | | [`SEG_ABSSYM`](#idc.SEG_ABSSYM) | | | [`SEG_COMM`](#idc.SEG_COMM) | | | [`SEG_IMEM`](#idc.SEG_IMEM) | | | [`SEGATTR_START`](#idc.SEGATTR_START) | | | [`SEGATTR_END`](#idc.SEGATTR_END) | | | [`SEGATTR_ORGBASE`](#idc.SEGATTR_ORGBASE) | | | [`SEGATTR_ALIGN`](#idc.SEGATTR_ALIGN) | | | [`SEGATTR_COMB`](#idc.SEGATTR_COMB) | | | [`SEGATTR_PERM`](#idc.SEGATTR_PERM) | | | [`SEGATTR_BITNESS`](#idc.SEGATTR_BITNESS) | | | [`SEGATTR_FLAGS`](#idc.SEGATTR_FLAGS) | | | [`SEGATTR_SEL`](#idc.SEGATTR_SEL) | | | [`SEGATTR_ES`](#idc.SEGATTR_ES) | | | [`SEGATTR_CS`](#idc.SEGATTR_CS) | | | [`SEGATTR_SS`](#idc.SEGATTR_SS) | | | [`SEGATTR_DS`](#idc.SEGATTR_DS) | | | [`SEGATTR_FS`](#idc.SEGATTR_FS) | | | [`SEGATTR_GS`](#idc.SEGATTR_GS) | | | [`SEGATTR_TYPE`](#idc.SEGATTR_TYPE) | | | [`SEGATTR_COLOR`](#idc.SEGATTR_COLOR) | | | [`SFL_COMORG`](#idc.SFL_COMORG) | | | [`SFL_OBOK`](#idc.SFL_OBOK) | | | [`SFL_HIDDEN`](#idc.SFL_HIDDEN) | | | [`SFL_DEBUG`](#idc.SFL_DEBUG) | | | [`SFL_LOADER`](#idc.SFL_LOADER) | | | [`SFL_HIDETYPE`](#idc.SFL_HIDETYPE) | | | [`MSF_SILENT`](#idc.MSF_SILENT) | | | [`MSF_NOFIX`](#idc.MSF_NOFIX) | | | [`MSF_LDKEEP`](#idc.MSF_LDKEEP) | | | [`MSF_FIXONCE`](#idc.MSF_FIXONCE) | | | [`MOVE_SEGM_OK`](#idc.MOVE_SEGM_OK) | | | [`MOVE_SEGM_PARAM`](#idc.MOVE_SEGM_PARAM) | | | [`MOVE_SEGM_ROOM`](#idc.MOVE_SEGM_ROOM) | | | [`MOVE_SEGM_IDP`](#idc.MOVE_SEGM_IDP) | | | [`MOVE_SEGM_CHUNK`](#idc.MOVE_SEGM_CHUNK) | | | [`MOVE_SEGM_LOADER`](#idc.MOVE_SEGM_LOADER) | | | [`MOVE_SEGM_ODD`](#idc.MOVE_SEGM_ODD) | | | [`MOVE_SEGM_ORPHAN`](#idc.MOVE_SEGM_ORPHAN) | | | [`MOVE_SEGM_DEBUG`](#idc.MOVE_SEGM_DEBUG) | | | [`MOVE_SEGM_SOURCEFILES`](#idc.MOVE_SEGM_SOURCEFILES) | | | [`MOVE_SEGM_MAPPING`](#idc.MOVE_SEGM_MAPPING) | | | [`MOVE_SEGM_INVAL`](#idc.MOVE_SEGM_INVAL) | | | [`rebase_program`](#idc.rebase_program) | | | [`set_storage_type`](#idc.set_storage_type) | | | [`STT_VA`](#idc.STT_VA) | | | [`STT_MM`](#idc.STT_MM) | | | [`fl_CF`](#idc.fl_CF) | | | [`fl_CN`](#idc.fl_CN) | | | [`fl_JF`](#idc.fl_JF) | | | [`fl_JN`](#idc.fl_JN) | | | [`fl_F`](#idc.fl_F) | | | [`XREF_USER`](#idc.XREF_USER) | | | [`add_cref`](#idc.add_cref) | | | [`del_cref`](#idc.del_cref) | | | [`get_first_cref_from`](#idc.get_first_cref_from) | | | [`get_next_cref_from`](#idc.get_next_cref_from) | | | [`get_first_cref_to`](#idc.get_first_cref_to) | | | [`get_next_cref_to`](#idc.get_next_cref_to) | | | [`get_first_fcref_from`](#idc.get_first_fcref_from) | | | [`get_next_fcref_from`](#idc.get_next_fcref_from) | | | [`get_first_fcref_to`](#idc.get_first_fcref_to) | | | [`get_next_fcref_to`](#idc.get_next_fcref_to) | | | [`dr_O`](#idc.dr_O) | | | [`dr_W`](#idc.dr_W) | | | [`dr_R`](#idc.dr_R) | | | [`dr_T`](#idc.dr_T) | | | [`dr_I`](#idc.dr_I) | | | [`add_dref`](#idc.add_dref) | | | [`del_dref`](#idc.del_dref) | | | [`get_first_dref_from`](#idc.get_first_dref_from) | | | [`get_next_dref_from`](#idc.get_next_dref_from) | | | [`get_first_dref_to`](#idc.get_first_dref_to) | | | [`get_next_dref_to`](#idc.get_next_dref_to) | | | [`add_func`](#idc.add_func) | | | [`del_func`](#idc.del_func) | | | [`set_func_end`](#idc.set_func_end) | | | [`FUNCATTR_START`](#idc.FUNCATTR_START) | | | [`FUNCATTR_END`](#idc.FUNCATTR_END) | | | [`FUNCATTR_FLAGS`](#idc.FUNCATTR_FLAGS) | | | [`FUNCATTR_FRAME`](#idc.FUNCATTR_FRAME) | | | [`FUNCATTR_FRSIZE`](#idc.FUNCATTR_FRSIZE) | | | [`FUNCATTR_FRREGS`](#idc.FUNCATTR_FRREGS) | | | [`FUNCATTR_ARGSIZE`](#idc.FUNCATTR_ARGSIZE) | | | [`FUNCATTR_FPD`](#idc.FUNCATTR_FPD) | | | [`FUNCATTR_COLOR`](#idc.FUNCATTR_COLOR) | | | [`FUNCATTR_OWNER`](#idc.FUNCATTR_OWNER) | | | [`FUNCATTR_REFQTY`](#idc.FUNCATTR_REFQTY) | | | [`FUNC_NORET`](#idc.FUNC_NORET) | | | [`FUNC_FAR`](#idc.FUNC_FAR) | | | [`FUNC_LIB`](#idc.FUNC_LIB) | | | [`FUNC_STATIC`](#idc.FUNC_STATIC) | | | [`FUNC_FRAME`](#idc.FUNC_FRAME) | | | [`FUNC_USERFAR`](#idc.FUNC_USERFAR) | | | [`FUNC_HIDDEN`](#idc.FUNC_HIDDEN) | | | [`FUNC_THUNK`](#idc.FUNC_THUNK) | | | [`FUNC_BOTTOMBP`](#idc.FUNC_BOTTOMBP) | | | [`FUNC_NORET_PENDING`](#idc.FUNC_NORET_PENDING) | | | [`FUNC_SP_READY`](#idc.FUNC_SP_READY) | | | [`FUNC_PURGED_OK`](#idc.FUNC_PURGED_OK) | | | [`FUNC_TAIL`](#idc.FUNC_TAIL) | | | [`FUNC_LUMINA`](#idc.FUNC_LUMINA) | | | [`FUNC_OUTLINE`](#idc.FUNC_OUTLINE) | | | [`get_fchunk_referer`](#idc.get_fchunk_referer) | | | [`add_user_stkpnt`](#idc.add_user_stkpnt) | | | [`recalc_spd`](#idc.recalc_spd) | | | [`get_entry_qty`](#idc.get_entry_qty) | | | [`add_entry`](#idc.add_entry) | | | [`get_entry_ordinal`](#idc.get_entry_ordinal) | | | [`get_entry`](#idc.get_entry) | | | [`get_entry_name`](#idc.get_entry_name) | | | [`rename_entry`](#idc.rename_entry) | | | [`get_next_fixup_ea`](#idc.get_next_fixup_ea) | | | [`get_prev_fixup_ea`](#idc.get_prev_fixup_ea) | | | [`FIXUP_OFF8`](#idc.FIXUP_OFF8) | | | [`FIXUP_OFF16`](#idc.FIXUP_OFF16) | | | [`FIXUP_SEG16`](#idc.FIXUP_SEG16) | | | [`FIXUP_PTR32`](#idc.FIXUP_PTR32) | | | [`FIXUP_OFF32`](#idc.FIXUP_OFF32) | | | [`FIXUP_PTR48`](#idc.FIXUP_PTR48) | | | [`FIXUP_HI8`](#idc.FIXUP_HI8) | | | [`FIXUP_HI16`](#idc.FIXUP_HI16) | | | [`FIXUP_LOW8`](#idc.FIXUP_LOW8) | | | [`FIXUP_LOW16`](#idc.FIXUP_LOW16) | | | [`FIXUP_OFF64`](#idc.FIXUP_OFF64) | | | [`FIXUP_CUSTOM`](#idc.FIXUP_CUSTOM) | | | [`FIXUPF_REL`](#idc.FIXUPF_REL) | | | [`FIXUPF_EXTDEF`](#idc.FIXUPF_EXTDEF) | | | [`FIXUPF_UNUSED`](#idc.FIXUPF_UNUSED) | | | [`FIXUPF_CREATED`](#idc.FIXUPF_CREATED) | | | [`del_fixup`](#idc.del_fixup) | | | [`put_bookmark`](#idc.put_bookmark) | | | [`get_bookmark`](#idc.get_bookmark) | | | [`get_bookmark_desc`](#idc.get_bookmark_desc) | | | [`ENFL_REGEX`](#idc.ENFL_REGEX) | | | [`AR_LONG`](#idc.AR_LONG) | Array of longs | | [`AR_STR`](#idc.AR_STR) | Array of strings | | [`add_sourcefile`](#idc.add_sourcefile) | | | [`get_sourcefile`](#idc.get_sourcefile) | | | [`del_sourcefile`](#idc.del_sourcefile) | | | [`set_source_linnum`](#idc.set_source_linnum) | | | [`get_source_linnum`](#idc.get_source_linnum) | | | [`del_source_linnum`](#idc.del_source_linnum) | | | [`SizeOf`](#idc.SizeOf) | | | [`TINFO_GUESSED`](#idc.TINFO_GUESSED) | | | [`TINFO_DEFINITE`](#idc.TINFO_DEFINITE) | | | [`TINFO_DELAYFUNC`](#idc.TINFO_DELAYFUNC) | | | [`PT_SIL`](#idc.PT_SIL) | | | [`PT_NDC`](#idc.PT_NDC) | | | [`PT_TYP`](#idc.PT_TYP) | | | [`PT_VAR`](#idc.PT_VAR) | | | [`PT_PACKMASK`](#idc.PT_PACKMASK) | | | [`PT_HIGH`](#idc.PT_HIGH) | | | [`PT_LOWER`](#idc.PT_LOWER) | | | [`PT_REPLACE`](#idc.PT_REPLACE) | | | [`PT_RAWARGS`](#idc.PT_RAWARGS) | | | [`PT_SILENT`](#idc.PT_SILENT) | | | [`PT_PAKDEF`](#idc.PT_PAKDEF) | | | [`PT_PAK1`](#idc.PT_PAK1) | | | [`PT_PAK2`](#idc.PT_PAK2) | | | [`PT_PAK4`](#idc.PT_PAK4) | | | [`PT_PAK8`](#idc.PT_PAK8) | | | [`PT_PAK16`](#idc.PT_PAK16) | | | [`PT_FILE`](#idc.PT_FILE) | | | [`PT_STANDALONE`](#idc.PT_STANDALONE) | | | [`PDF_INCL_DEPS`](#idc.PDF_INCL_DEPS) | | | [`PDF_DEF_FWD`](#idc.PDF_DEF_FWD) | | | [`PDF_DEF_BASE`](#idc.PDF_DEF_BASE) | | | [`PDF_HEADER_CMT`](#idc.PDF_HEADER_CMT) | | | [`PRTYPE_1LINE`](#idc.PRTYPE_1LINE) | | | [`PRTYPE_MULTI`](#idc.PRTYPE_MULTI) | | | [`PRTYPE_TYPE`](#idc.PRTYPE_TYPE) | | | [`PRTYPE_PRAGMA`](#idc.PRTYPE_PRAGMA) | | | [`PRTYPE_SEMI`](#idc.PRTYPE_SEMI) | | | [`PRTYPE_CPP`](#idc.PRTYPE_CPP) | | | [`PRTYPE_DEF`](#idc.PRTYPE_DEF) | | | [`PRTYPE_NOARGS`](#idc.PRTYPE_NOARGS) | | | [`PRTYPE_NOARRS`](#idc.PRTYPE_NOARRS) | | | [`PRTYPE_NORES`](#idc.PRTYPE_NORES) | | | [`PRTYPE_RESTORE`](#idc.PRTYPE_RESTORE) | | | [`PRTYPE_NOREGEX`](#idc.PRTYPE_NOREGEX) | | | [`PRTYPE_COLORED`](#idc.PRTYPE_COLORED) | | | [`PRTYPE_METHODS`](#idc.PRTYPE_METHODS) | | | [`PRTYPE_1LINCMT`](#idc.PRTYPE_1LINCMT) | | | [`add_hidden_range`](#idc.add_hidden_range) | | | [`del_hidden_range`](#idc.del_hidden_range) | | | [`load_debugger`](#idc.load_debugger) | | | [`start_process`](#idc.start_process) | | | [`exit_process`](#idc.exit_process) | | | [`suspend_process`](#idc.suspend_process) | | | [`get_processes`](#idc.get_processes) | | | [`attach_process`](#idc.attach_process) | | | [`detach_process`](#idc.detach_process) | | | [`get_thread_qty`](#idc.get_thread_qty) | | | [`getn_thread`](#idc.getn_thread) | | | [`get_current_thread`](#idc.get_current_thread) | | | [`getn_thread_name`](#idc.getn_thread_name) | | | [`select_thread`](#idc.select_thread) | | | [`suspend_thread`](#idc.suspend_thread) | | | [`resume_thread`](#idc.resume_thread) | | | [`step_into`](#idc.step_into) | | | [`step_over`](#idc.step_over) | | | [`run_to`](#idc.run_to) | | | [`step_until_ret`](#idc.step_until_ret) | | | [`wait_for_next_event`](#idc.wait_for_next_event) | | | [`WFNE_ANY`](#idc.WFNE_ANY) | | | [`WFNE_SUSP`](#idc.WFNE_SUSP) | | | [`WFNE_SILENT`](#idc.WFNE_SILENT) | | | [`WFNE_CONT`](#idc.WFNE_CONT) | | | [`WFNE_NOWAIT`](#idc.WFNE_NOWAIT) | | | [`NOTASK`](#idc.NOTASK) | | | [`DBG_ERROR`](#idc.DBG_ERROR) | | | [`DBG_TIMEOUT`](#idc.DBG_TIMEOUT) | | | [`PROCESS_STARTED`](#idc.PROCESS_STARTED) | | | [`PROCESS_EXITED`](#idc.PROCESS_EXITED) | | | [`THREAD_STARTED`](#idc.THREAD_STARTED) | | | [`THREAD_EXITED`](#idc.THREAD_EXITED) | | | [`BREAKPOINT`](#idc.BREAKPOINT) | | | [`STEP`](#idc.STEP) | | | [`EXCEPTION`](#idc.EXCEPTION) | | | [`LIB_LOADED`](#idc.LIB_LOADED) | | | [`LIB_UNLOADED`](#idc.LIB_UNLOADED) | | | [`INFORMATION`](#idc.INFORMATION) | | | [`PROCESS_ATTACHED`](#idc.PROCESS_ATTACHED) | | | [`PROCESS_DETACHED`](#idc.PROCESS_DETACHED) | | | [`PROCESS_SUSPENDED`](#idc.PROCESS_SUSPENDED) | | | [`refresh_debugger_memory`](#idc.refresh_debugger_memory) | | | [`take_memory_snapshot`](#idc.take_memory_snapshot) | | | [`get_process_state`](#idc.get_process_state) | | | [`DSTATE_SUSP`](#idc.DSTATE_SUSP) | | | [`DSTATE_NOTASK`](#idc.DSTATE_NOTASK) | | | [`DSTATE_RUN`](#idc.DSTATE_RUN) | | | [`DSTATE_RUN_WAIT_ATTACH`](#idc.DSTATE_RUN_WAIT_ATTACH) | | | [`DSTATE_RUN_WAIT_END`](#idc.DSTATE_RUN_WAIT_END) | Get various information about the current debug event | | [`set_debugger_options`](#idc.set_debugger_options) | | | [`DOPT_SEGM_MSGS`](#idc.DOPT_SEGM_MSGS) | | | [`DOPT_START_BPT`](#idc.DOPT_START_BPT) | | | [`DOPT_THREAD_MSGS`](#idc.DOPT_THREAD_MSGS) | | | [`DOPT_THREAD_BPT`](#idc.DOPT_THREAD_BPT) | | | [`DOPT_BPT_MSGS`](#idc.DOPT_BPT_MSGS) | | | [`DOPT_LIB_MSGS`](#idc.DOPT_LIB_MSGS) | | | [`DOPT_LIB_BPT`](#idc.DOPT_LIB_BPT) | | | [`DOPT_INFO_MSGS`](#idc.DOPT_INFO_MSGS) | | | [`DOPT_INFO_BPT`](#idc.DOPT_INFO_BPT) | | | [`DOPT_REAL_MEMORY`](#idc.DOPT_REAL_MEMORY) | | | [`DOPT_REDO_STACK`](#idc.DOPT_REDO_STACK) | | | [`DOPT_ENTRY_BPT`](#idc.DOPT_ENTRY_BPT) | | | [`DOPT_EXCDLG`](#idc.DOPT_EXCDLG) | | | [`EXCDLG_NEVER`](#idc.EXCDLG_NEVER) | | | [`EXCDLG_UNKNOWN`](#idc.EXCDLG_UNKNOWN) | | | [`EXCDLG_ALWAYS`](#idc.EXCDLG_ALWAYS) | | | [`DOPT_LOAD_DINFO`](#idc.DOPT_LOAD_DINFO) | | | [`get_debugger_event_cond`](#idc.get_debugger_event_cond) | | | [`set_debugger_event_cond`](#idc.set_debugger_event_cond) | | | [`set_remote_debugger`](#idc.set_remote_debugger) | | | [`define_exception`](#idc.define_exception) | | | [`EXC_BREAK`](#idc.EXC_BREAK) | | | [`EXC_HANDLE`](#idc.EXC_HANDLE) | | | [`get_reg_value`](#idc.get_reg_value) | | | [`get_bpt_qty`](#idc.get_bpt_qty) | | | [`BPTATTR_EA`](#idc.BPTATTR_EA) | | | [`BPTATTR_SIZE`](#idc.BPTATTR_SIZE) | | | [`BPTATTR_TYPE`](#idc.BPTATTR_TYPE) | | | [`BPT_WRITE`](#idc.BPT_WRITE) | | | [`BPT_RDWR`](#idc.BPT_RDWR) | | | [`BPT_SOFT`](#idc.BPT_SOFT) | | | [`BPT_EXEC`](#idc.BPT_EXEC) | | | [`BPT_DEFAULT`](#idc.BPT_DEFAULT) | | | [`BPTATTR_COUNT`](#idc.BPTATTR_COUNT) | | | [`BPTATTR_FLAGS`](#idc.BPTATTR_FLAGS) | | | [`BPT_BRK`](#idc.BPT_BRK) | | | [`BPT_TRACE`](#idc.BPT_TRACE) | | | [`BPT_UPDMEM`](#idc.BPT_UPDMEM) | | | [`BPT_ENABLED`](#idc.BPT_ENABLED) | | | [`BPT_LOWCND`](#idc.BPT_LOWCND) | | | [`BPT_TRACEON`](#idc.BPT_TRACEON) | | | [`BPT_TRACE_INSN`](#idc.BPT_TRACE_INSN) | | | [`BPT_TRACE_FUNC`](#idc.BPT_TRACE_FUNC) | | | [`BPT_TRACE_BBLK`](#idc.BPT_TRACE_BBLK) | | | [`BPTATTR_COND`](#idc.BPTATTR_COND) | | | [`BPTATTR_PID`](#idc.BPTATTR_PID) | | | [`BPTATTR_TID`](#idc.BPTATTR_TID) | | | [`BPLT_ABS`](#idc.BPLT_ABS) | | | [`BPLT_REL`](#idc.BPLT_REL) | | | [`BPLT_SYM`](#idc.BPLT_SYM) | | | [`add_bpt`](#idc.add_bpt) | | | [`del_bpt`](#idc.del_bpt) | | | [`enable_bpt`](#idc.enable_bpt) | | | [`check_bpt`](#idc.check_bpt) | | | [`BPTCK_NONE`](#idc.BPTCK_NONE) | | | [`BPTCK_NO`](#idc.BPTCK_NO) | | | [`BPTCK_YES`](#idc.BPTCK_YES) | | | [`BPTCK_ACT`](#idc.BPTCK_ACT) | | | [`TRACE_STEP`](#idc.TRACE_STEP) | | | [`TRACE_INSN`](#idc.TRACE_INSN) | | | [`TRACE_FUNC`](#idc.TRACE_FUNC) | | | [`get_step_trace_options`](#idc.get_step_trace_options) | | | [`set_step_trace_options`](#idc.set_step_trace_options) | | | [`ST_OVER_DEBUG_SEG`](#idc.ST_OVER_DEBUG_SEG) | | | [`ST_OVER_LIB_FUNC`](#idc.ST_OVER_LIB_FUNC) | | | [`ST_ALREADY_LOGGED`](#idc.ST_ALREADY_LOGGED) | | | [`ST_SKIP_LOOPS`](#idc.ST_SKIP_LOOPS) | | | [`load_trace_file`](#idc.load_trace_file) | | | [`save_trace_file`](#idc.save_trace_file) | | | [`is_valid_trace_file`](#idc.is_valid_trace_file) | | | [`diff_trace_file`](#idc.diff_trace_file) | | | [`get_trace_file_desc`](#idc.get_trace_file_desc) | | | [`set_trace_file_desc`](#idc.set_trace_file_desc) | | | [`get_tev_qty`](#idc.get_tev_qty) | | | [`get_tev_ea`](#idc.get_tev_ea) | | | [`TEV_NONE`](#idc.TEV_NONE) | | | [`TEV_INSN`](#idc.TEV_INSN) | | | [`TEV_CALL`](#idc.TEV_CALL) | | | [`TEV_RET`](#idc.TEV_RET) | | | [`TEV_BPT`](#idc.TEV_BPT) | | | [`TEV_MEM`](#idc.TEV_MEM) | | | [`TEV_EVENT`](#idc.TEV_EVENT) | | | [`get_tev_type`](#idc.get_tev_type) | | | [`get_tev_tid`](#idc.get_tev_tid) | | | [`get_tev_reg`](#idc.get_tev_reg) | | | [`get_tev_mem_qty`](#idc.get_tev_mem_qty) | | | [`get_tev_mem`](#idc.get_tev_mem) | | | [`get_tev_mem_ea`](#idc.get_tev_mem_ea) | | | [`get_call_tev_callee`](#idc.get_call_tev_callee) | | | [`get_ret_tev_return`](#idc.get_ret_tev_return) | | | [`get_bpt_tev_ea`](#idc.get_bpt_tev_ea) | | | [`CIC_ITEM`](#idc.CIC_ITEM) | | | [`CIC_FUNC`](#idc.CIC_FUNC) | | | [`CIC_SEGM`](#idc.CIC_SEGM) | | | [`DEFCOLOR`](#idc.DEFCOLOR) | | | [`ARGV`](#idc.ARGV) | The command line arguments passed to IDA via the -S switch. | ## Exceptions | [`DeprecatedIDCError`](#idc.DeprecatedIDCError) | Exception for deprecated function calls | |---------------------------------------------------|-------------------------------------------| ## Functions | [`has_value`](#idc.has_value)(f) | Do flags contain byte value? (i.e. has the byte a value?) | |--------------------------------------------------------------------------------------|----------------------------------------------------------------------| | [`byte_value`](#idc.byte_value)(f) | Get byte value from flags | | [`is_loaded`](#idc.is_loaded)(ea) | Is the byte initialized? | | [`is_code`](#idc.is_code)(f) | | | [`is_data`](#idc.is_data)(f) | | | [`is_tail`](#idc.is_tail)(f) | | | [`is_unknown`](#idc.is_unknown)(f) | | | [`is_head`](#idc.is_head)(f) | | | [`is_flow`](#idc.is_flow)(f) | | | [`isExtra`](#idc.isExtra)(f) | | | [`isRef`](#idc.isRef)(f) | | | [`hasName`](#idc.hasName)(f) | | | [`hasUserName`](#idc.hasUserName)(f) | | | [`is_defarg0`](#idc.is_defarg0)(f) | | | [`is_defarg1`](#idc.is_defarg1)(f) | | | [`isDec0`](#idc.isDec0)(f) | | | [`isDec1`](#idc.isDec1)(f) | | | [`isHex0`](#idc.isHex0)(f) | | | [`isHex1`](#idc.isHex1)(f) | | | [`isOct0`](#idc.isOct0)(f) | | | [`isOct1`](#idc.isOct1)(f) | | | [`isBin0`](#idc.isBin0)(f) | | | [`isBin1`](#idc.isBin1)(f) | | | [`is_off0`](#idc.is_off0)(f) | | | [`is_off1`](#idc.is_off1)(f) | | | [`is_char0`](#idc.is_char0)(f) | | | [`is_char1`](#idc.is_char1)(f) | | | [`is_seg0`](#idc.is_seg0)(f) | | | [`is_seg1`](#idc.is_seg1)(f) | | | [`is_enum0`](#idc.is_enum0)(f) | | | [`is_enum1`](#idc.is_enum1)(f) | | | [`is_manual0`](#idc.is_manual0)(f) | | | [`is_manual1`](#idc.is_manual1)(f) | | | [`is_stroff0`](#idc.is_stroff0)(f) | | | [`is_stroff1`](#idc.is_stroff1)(f) | | | [`is_stkvar0`](#idc.is_stkvar0)(f) | | | [`is_stkvar1`](#idc.is_stkvar1)(f) | | | [`is_byte`](#idc.is_byte)(f) | | | [`is_word`](#idc.is_word)(f) | | | [`is_dword`](#idc.is_dword)(f) | | | [`is_qword`](#idc.is_qword)(f) | | | [`is_oword`](#idc.is_oword)(f) | | | [`is_tbyte`](#idc.is_tbyte)(f) | | | [`is_float`](#idc.is_float)(f) | | | [`is_double`](#idc.is_double)(f) | | | [`is_pack_real`](#idc.is_pack_real)(f) | | | [`is_strlit`](#idc.is_strlit)(f) | | | [`is_struct`](#idc.is_struct)(f) | | | [`is_align`](#idc.is_align)(f) | | | [`value_is_string`](#idc.value_is_string)(var) | | | [`value_is_long`](#idc.value_is_long)(var) | | | [`value_is_float`](#idc.value_is_float)(var) | | | [`value_is_func`](#idc.value_is_func)(var) | | | [`value_is_pvoid`](#idc.value_is_pvoid)(var) | | | [`value_is_int64`](#idc.value_is_int64)(var) | | | [`to_ea`](#idc.to_ea)(seg, off) | Return value of expression: ((seg<<4) + off) | | [`form`](#idc.form)(format, \*args) | | | [`substr`](#idc.substr)(s, x1, x2) | | | [`strstr`](#idc.strstr)(s1, s2) | | | [`strlen`](#idc.strlen)(s) | | | [`xtol`](#idc.xtol)(s) | | | [`atoa`](#idc.atoa)(ea) | Convert address value to a string | | [`ltoa`](#idc.ltoa)(n, radix) | | | [`atol`](#idc.atol)(s) | | | [`rotate_left`](#idc.rotate_left)(value, count, nbits, offset) | Rotate a value to the left (or right) | | [`rotate_dword`](#idc.rotate_dword)(x, count) | | | [`rotate_word`](#idc.rotate_word)(x, count) | | | [`rotate_byte`](#idc.rotate_byte)(x, count) | | | [`eval_idc`](#idc.eval_idc)(expr) | Evaluate an IDC expression | | [`EVAL_FAILURE`](#idc.EVAL_FAILURE)(code) | Check the result of eval_idc() for evaluation failures | | [`save_database`](#idc.save_database)(idbname[, flags]) | Save current database to the specified idb file | | [`validate_idb_names`](#idc.validate_idb_names)([do_repair]) | check consistency of IDB name records | | [`call_system`](#idc.call_system)(command) | Execute an OS command. | | [`qsleep`](#idc.qsleep)(milliseconds) | qsleep the specified number of milliseconds | | [`delete_all_segments`](#idc.delete_all_segments)() | Delete all segments, instructions, comments, i.e. everything | | [`plan_and_wait`](#idc.plan_and_wait)(sEA, eEA[, final_pass]) | Perform full analysis of the range | | [`set_name`](#idc.set_name)(ea, name[, flags]) | Rename an address | | [`make_array`](#idc.make_array)(ea, nitems) | Create an array. | | [`create_strlit`](#idc.create_strlit)(ea, endea) | Create a string. | | [`create_byte`](#idc.create_byte)(ea) | Convert the current item to a byte | | [`create_word`](#idc.create_word)(ea) | Convert the current item to a word (2 bytes) | | [`create_dword`](#idc.create_dword)(ea) | Convert the current item to a double word (4 bytes) | | [`create_qword`](#idc.create_qword)(ea) | Convert the current item to a quadro word (8 bytes) | | [`create_oword`](#idc.create_oword)(ea) | Convert the current item to an octa word (16 bytes/128 bits) | | [`create_yword`](#idc.create_yword)(ea) | Convert the current item to a ymm word (32 bytes/256 bits) | | [`create_float`](#idc.create_float)(ea) | Convert the current item to a floating point (4 bytes) | | [`create_double`](#idc.create_double)(ea) | Convert the current item to a double floating point (8 bytes) | | [`create_pack_real`](#idc.create_pack_real)(ea) | Convert the current item to a packed real (10 or 12 bytes) | | [`create_tbyte`](#idc.create_tbyte)(ea) | Convert the current item to a tbyte (10 or 12 bytes) | | [`create_struct`](#idc.create_struct)(ea, size, strname) | Convert the current item to a structure instance | | [`define_local_var`](#idc.define_local_var)(start, end, location, name) | Create a local variable | | [`set_array_params`](#idc.set_array_params)(ea, flags, litems, align) | Set array representation format | | [`op_plain_offset`](#idc.op_plain_offset)(ea, n, base) | Convert operand to an offset | | [`toggle_bnot`](#idc.toggle_bnot)(ea, n) | Toggle the bitwise not operator for the operand | | [`op_stroff`](#idc.op_stroff)(ea, n, strid, delta) | Convert operand to an offset in a structure | | [`op_offset_high16`](#idc.op_offset_high16)(ea, n, target) | Convert operand to a high offset | | [`MakeVar`](#idc.MakeVar)(ea) | | | [`split_sreg_range`](#idc.split_sreg_range)(ea, reg, value[, tag]) | Set value of a segment register. | | [`AutoMark`](#idc.AutoMark)(ea, qtype) | Plan to analyze an address | | [`gen_file`](#idc.gen_file)(filetype, path, ea1, ea2, flags) | Generate an output file | | [`gen_flow_graph`](#idc.gen_flow_graph)(outfile, title, ea1, ea2, flags) | Generate a flow chart GDL file | | [`gen_simple_call_chart`](#idc.gen_simple_call_chart)(outfile, title, flags) | Generate a function call graph GDL file | | [`idadir`](#idc.idadir)() | Get IDA directory | | [`get_idb_path`](#idc.get_idb_path)() | Get IDB full path | | [`get_bytes`](#idc.get_bytes)(ea, size[, use_dbg]) | Return the specified number of bytes of the program | | [`read_dbg_byte`](#idc.read_dbg_byte)(ea) | Get value of program byte using the debugger memory | | [`read_dbg_word`](#idc.read_dbg_word)(ea) | Get value of program word using the debugger memory | | [`read_dbg_dword`](#idc.read_dbg_dword)(ea) | Get value of program double-word using the debugger memory | | [`read_dbg_qword`](#idc.read_dbg_qword)(ea) | Get value of program quadro-word using the debugger memory | | [`write_dbg_memory`](#idc.write_dbg_memory)(ea, data) | Write to debugger memory. | | [`GetFloat`](#idc.GetFloat)(ea) | Get value of a floating point number (4 bytes) | | [`GetDouble`](#idc.GetDouble)(ea) | Get value of a floating point number (8 bytes) | | [`get_name_ea_simple`](#idc.get_name_ea_simple)(name) | Get linear address of a name | | [`get_segm_by_sel`](#idc.get_segm_by_sel)(base) | Get segment by segment base | | [`get_curline`](#idc.get_curline)() | Get the disassembly line at the cursor | | [`read_selection_start`](#idc.read_selection_start)() | Get start address of the selected range | | [`read_selection_end`](#idc.read_selection_end)() | Get end address of the selected range | | [`get_sreg`](#idc.get_sreg)(ea, reg) | Get value of segment register at the specified address | | [`next_head`](#idc.next_head)(ea[, maxea]) | Get next defined item (instruction or data) in the program | | [`prev_head`](#idc.prev_head)(ea[, minea]) | Get previous defined item (instruction or data) in the program | | [`get_item_size`](#idc.get_item_size)(ea) | Get size of instruction or data item in bytes | | [`func_contains`](#idc.func_contains)(func_ea, ea) | Does the given function contain the given address? | | [`get_name`](#idc.get_name)(ea[, gtn_flags]) | Get name at the specified address | | [`demangle_name`](#idc.demangle_name)(name, disable_mask) | demangle_name a name | | [`generate_disasm_line`](#idc.generate_disasm_line)(ea, flags) | Get disassembly line | | [`GetDisasm`](#idc.GetDisasm)(ea) | Get disassembly line | | [`print_insn_mnem`](#idc.print_insn_mnem)(ea) | Get instruction mnemonics | | [`print_operand`](#idc.print_operand)(ea, n) | Get operand of an instruction or data | | [`get_operand_type`](#idc.get_operand_type)(ea, n) | Get type of instruction operand | | [`get_operand_value`](#idc.get_operand_value)(ea, n) | Get number used in the operand | | [`get_strlit_contents`](#idc.get_strlit_contents)(ea[, length, strtype]) | Get string contents | | [`get_str_type`](#idc.get_str_type)(ea) | Get string type | | [`process_config_line`](#idc.process_config_line)(directive) | Obsolete. Please use ida_idp.process_config_directive(). | | [`get_inf_attr`](#idc.get_inf_attr)(attr) | Deprecated. Please ida_ida.inf_get_\* instead. | | [`set_inf_attr`](#idc.set_inf_attr)(attr, value) | Deprecated. Please ida_ida.inf_set_\* instead. | | [`SetPrcsr`](#idc.SetPrcsr)(processor) | | | [`get_processor_name`](#idc.get_processor_name)() | Get name of the current processor | | [`batch`](#idc.batch)(batch) | Enable/disable batch mode of operation | | [`process_ui_action`](#idc.process_ui_action)(name[, flags]) | Invokes an IDA UI action by name | | [`sel2para`](#idc.sel2para)(sel) | Get a selector value | | [`find_selector`](#idc.find_selector)(val) | Find a selector which has the specified value | | [`get_first_seg`](#idc.get_first_seg)() | Get first segment | | [`get_next_seg`](#idc.get_next_seg)(ea) | Get next segment | | [`get_segm_start`](#idc.get_segm_start)(ea) | Get start address of a segment | | [`get_segm_end`](#idc.get_segm_end)(ea) | Get end address of a segment | | [`get_segm_name`](#idc.get_segm_name)(ea) | Get name of a segment | | [`add_segm_ex`](#idc.add_segm_ex)(startea, endea, base, use32, align, comb, ...) | Create a new segment | | [`AddSeg`](#idc.AddSeg)(startea, endea, base, use32, align, comb) | | | [`set_segment_bounds`](#idc.set_segment_bounds)(ea, startea, endea, flags) | Change segment boundaries | | [`set_segm_name`](#idc.set_segm_name)(ea, name) | Change name of the segment | | [`set_segm_class`](#idc.set_segm_class)(ea, segclass) | Change class of the segment | | [`set_segm_alignment`](#idc.set_segm_alignment)(ea, alignment) | Change alignment of the segment | | [`set_segm_combination`](#idc.set_segm_combination)(segea, comb) | Change combination of the segment | | [`set_segm_addressing`](#idc.set_segm_addressing)(ea, bitness) | Change segment addressing | | [`selector_by_name`](#idc.selector_by_name)(segname) | Get segment selector by name | | [`set_default_sreg_value`](#idc.set_default_sreg_value)(ea, reg, value) | Set default segment register value for a segment | | [`set_segm_type`](#idc.set_segm_type)(segea, segtype) | Set segment type | | [`get_segm_attr`](#idc.get_segm_attr)(segea, attr) | Get segment attribute | | [`set_segm_attr`](#idc.set_segm_attr)(segea, attr, value) | Set segment attribute | | [`move_segm`](#idc.move_segm)(ea, to, flags) | Move a segment to a new address | | [`get_xref_type`](#idc.get_xref_type)() | Return type of the last xref obtained by | | [`fopen`](#idc.fopen)(f, mode) | | | [`fclose`](#idc.fclose)(handle) | | | [`filelength`](#idc.filelength)(handle) | | | [`fseek`](#idc.fseek)(handle, offset, origin) | | | [`ftell`](#idc.ftell)(handle) | | | [`LoadFile`](#idc.LoadFile)(filepath, pos, ea, size) | Load file into IDA database | | [`loadfile`](#idc.loadfile)(filepath, pos, ea, size) | | | [`SaveFile`](#idc.SaveFile)(filepath, pos, ea, size) | Save from IDA database to file | | [`savefile`](#idc.savefile)(filepath, pos, ea, size) | | | [`fgetc`](#idc.fgetc)(handle) | | | [`fputc`](#idc.fputc)(byte, handle) | | | [`fprintf`](#idc.fprintf)(handle, format, \*args) | | | [`readshort`](#idc.readshort)(handle, mostfirst) | | | [`readlong`](#idc.readlong)(handle, mostfirst) | | | [`writeshort`](#idc.writeshort)(handle, word, mostfirst) | | | [`writelong`](#idc.writelong)(handle, dword, mostfirst) | | | [`readstr`](#idc.readstr)(handle) | | | [`writestr`](#idc.writestr)(handle, s) | | | [`get_next_func`](#idc.get_next_func)(ea) | Find next function | | [`get_prev_func`](#idc.get_prev_func)(ea) | Find previous function | | [`get_func_attr`](#idc.get_func_attr)(ea, attr) | Get a function attribute | | [`set_func_attr`](#idc.set_func_attr)(ea, attr, value) | Set a function attribute | | [`get_func_flags`](#idc.get_func_flags)(ea) | Retrieve function flags | | [`set_func_flags`](#idc.set_func_flags)(ea, flags) | Change function flags | | [`get_func_name`](#idc.get_func_name)(ea) | Retrieve function name | | [`get_func_cmt`](#idc.get_func_cmt)(ea, repeatable) | Retrieve function comment | | [`set_func_cmt`](#idc.set_func_cmt)(ea, cmt, repeatable) | Set function comment | | [`choose_func`](#idc.choose_func)(title) | Ask the user to select a function | | [`get_func_off_str`](#idc.get_func_off_str)(ea) | Convert address to 'funcname+offset' string | | [`find_func_end`](#idc.find_func_end)(ea) | Determine a new function boundaries | | [`get_frame_id`](#idc.get_frame_id)(ea) | Get ID of function frame structure | | [`get_frame_lvar_size`](#idc.get_frame_lvar_size)(ea) | Get size of local variables in function frame | | [`get_frame_regs_size`](#idc.get_frame_regs_size)(ea) | Get size of saved registers in function frame | | [`get_frame_args_size`](#idc.get_frame_args_size)(ea) | Get size of arguments in function frame which are purged upon return | | [`get_frame_size`](#idc.get_frame_size)(ea) | Get full size of function frame | | [`set_frame_size`](#idc.set_frame_size)(ea, lvsize, frregs, argsize) | Make function frame | | [`get_spd`](#idc.get_spd)(ea) | Get current delta for the stack pointer | | [`get_sp_delta`](#idc.get_sp_delta)(ea) | Get modification of SP made by the instruction | | [`get_fchunk_attr`](#idc.get_fchunk_attr)(ea, attr) | Get a function chunk attribute | | [`set_fchunk_attr`](#idc.set_fchunk_attr)(ea, attr, value) | Set a function chunk attribute | | [`get_next_fchunk`](#idc.get_next_fchunk)(ea) | Get next function chunk | | [`get_prev_fchunk`](#idc.get_prev_fchunk)(ea) | Get previous function chunk | | [`append_func_tail`](#idc.append_func_tail)(funcea, ea1, ea2) | Append a function chunk to the function | | [`remove_fchunk`](#idc.remove_fchunk)(funcea, tailea) | Remove a function chunk from the function | | [`set_tail_owner`](#idc.set_tail_owner)(tailea, funcea) | Change the function chunk owner | | [`first_func_chunk`](#idc.first_func_chunk)(funcea) | Get the first function chunk of the specified function | | [`next_func_chunk`](#idc.next_func_chunk)(funcea, tailea) | Get the next function chunk of the specified function | | [`add_auto_stkpnt`](#idc.add_auto_stkpnt)(func_ea, ea, delta) | Add automatic SP register change point | | [`del_stkpnt`](#idc.del_stkpnt)(func_ea, ea) | Delete SP register change point | | [`get_min_spd_ea`](#idc.get_min_spd_ea)(func_ea) | Return the address with the minimal spd (stack pointer delta) | | [`get_fixup_target_type`](#idc.get_fixup_target_type)(ea) | Get fixup target type | | [`get_fixup_target_flags`](#idc.get_fixup_target_flags)(ea) | Get fixup target flags | | [`get_fixup_target_sel`](#idc.get_fixup_target_sel)(ea) | Get fixup target selector | | [`get_fixup_target_off`](#idc.get_fixup_target_off)(ea) | Get fixup target offset | | [`get_fixup_target_dis`](#idc.get_fixup_target_dis)(ea) | Get fixup target displacement | | [`set_fixup`](#idc.set_fixup)(ea, fixuptype, fixupflags, targetsel, ...) | Set fixup information | | [`get_struc_id`](#idc.get_struc_id)(name) | | | [`get_struc_name`](#idc.get_struc_name)(tid) | | | [`get_struc_cmt`](#idc.get_struc_cmt)(tid) | | | [`get_struc_size`](#idc.get_struc_size)(tid) | | | [`get_member_qty`](#idc.get_member_qty)(sid) | Get number of members of a structure | | [`get_member_by_idx`](#idc.get_member_by_idx)(sid, idx) | Get member ID by member ordinal number | | [`is_member_id`](#idc.is_member_id)(sid) | Is a member id? | | [`get_member_id`](#idc.get_member_id)(sid, member_offset) | | | [`get_member_offset`](#idc.get_member_offset)(sid, member_name) | Get offset of a member of a structure by the member name | | [`get_member_name`](#idc.get_member_name)(sid, member_offset) | Get name of a member of a structure | | [`get_member_cmt`](#idc.get_member_cmt)(sid, member_offset[, repeatable]) | Get comment of a member | | [`get_member_size`](#idc.get_member_size)(sid, member_offset) | Get size of a member | | [`get_member_strid`](#idc.get_member_strid)(sid, member_offset) | Get structure id of a member | | [`is_union`](#idc.is_union)(sid) | Is a structure a union? | | [`add_struc`](#idc.add_struc)(index, name, is_union) | Define a new structure type | | [`del_struc`](#idc.del_struc)(sid) | Delete a structure type | | [`set_struc_name`](#idc.set_struc_name)(sid, name) | | | [`set_struc_cmt`](#idc.set_struc_cmt)(sid, cmt[, repeatable]) | | | [`add_struc_member`](#idc.add_struc_member)(sid, name, offset, flag, typeid, nbytes) | Add structure member | | [`del_struc_member`](#idc.del_struc_member)(sid, member_offset) | Delete structure member | | [`set_member_name`](#idc.set_member_name)(sid, member_offset, name) | Change structure member name | | [`set_member_type`](#idc.set_member_type)(sid, member_offset, flag, typeid, nitems) | Change structure member type | | [`set_member_cmt`](#idc.set_member_cmt)(sid, member_offset, comment, repeatable) | Change structure member comment | | [`expand_struc`](#idc.expand_struc)(sid, offset, delta[, recalc]) | Expand or shrink a structure type | | [`get_enum`](#idc.get_enum)(name) | Get enum by name | | [`get_enum_name`](#idc.get_enum_name)(enum_id[, flags]) | Get name of enum | | [`get_enum_cmt`](#idc.get_enum_cmt)(enum_id) | Get enum comment | | [`get_enum_size`](#idc.get_enum_size)(enum_id) | Get the number of the members of the enum | | [`get_enum_width`](#idc.get_enum_width)(enum_id) | Get the width of a enum element | | [`get_enum_flag`](#idc.get_enum_flag)(enum_id) | Get flags determining the representation of the enum. | | [`get_enum_member_by_name`](#idc.get_enum_member_by_name)(name) | Get a reference to an enum member by its name | | [`get_enum_member_enum`](#idc.get_enum_member_enum)(const_id) | Get the parent enum of an enum member | | [`get_enum_member`](#idc.get_enum_member)(enum_id, value, serial, bmask) | Get id of constant | | [`get_first_bmask`](#idc.get_first_bmask)(enum_id) | Get first bitmask in the enum | | [`get_last_bmask`](#idc.get_last_bmask)(enum_id) | Get last bitmask in the enum | | [`get_next_bmask`](#idc.get_next_bmask)(enum_id, bmask) | Get next bitmask in the enum | | [`get_prev_bmask`](#idc.get_prev_bmask)(enum_id, bmask) | Get prev bitmask in the enum | | [`get_bmask_name`](#idc.get_bmask_name)(enum_id, bmask) | Get bitmask name (only for bitfields) | | [`get_bmask_cmt`](#idc.get_bmask_cmt)(enum_id, bmask, repeatable) | Get bitmask comment (only for bitfields) | | [`set_bmask_name`](#idc.set_bmask_name)(enum_id, bmask, name) | Set bitmask name (only for bitfields) | | [`set_bmask_cmt`](#idc.set_bmask_cmt)(enum_id, bmask, cmt, repeatable) | Set bitmask comment (only for bitfields) | | [`get_first_enum_member`](#idc.get_first_enum_member)(enum_id[, bmask]) | Get first constant in the enum | | [`get_last_enum_member`](#idc.get_last_enum_member)(enum_id[, bmask]) | Get last constant in the enum | | [`get_next_enum_member`](#idc.get_next_enum_member)(enum_id, value[, bmask]) | Get next constant in the enum | | [`get_prev_enum_member`](#idc.get_prev_enum_member)(enum_id, value[, bmask]) | Get prev constant in the enum | | [`get_enum_member_name`](#idc.get_enum_member_name)(const_id) | Get name of a constant | | [`get_enum_member_cmt`](#idc.get_enum_member_cmt)(const_id[, repeatable]) | Get comment of a constant | | [`get_enum_member_value`](#idc.get_enum_member_value)(const_id) | Get value of an enum member | | [`get_enum_member_bmask`](#idc.get_enum_member_bmask)(const_id) | Get bitmask of an enum member | | [`add_enum`](#idc.add_enum)(idx, name, flag) | Add a new enum type | | [`del_enum`](#idc.del_enum)(enum_id) | Delete an enum type | | [`set_enum_name`](#idc.set_enum_name)(enum_id, name) | Set name of enum type | | [`set_enum_flag`](#idc.set_enum_flag)(enum_id, flag) | Set enum constant representation flags | | [`set_enum_width`](#idc.set_enum_width)(enum_id, nbytes) | Set the width of enum base type | | [`is_bf`](#idc.is_bf)(enum_id) | Is enum a bitmask ? | | [`set_enum_bf`](#idc.set_enum_bf)(enum_id, bf) | Set or clear the 'bitmask' attribute of an enum | | [`set_enum_cmt`](#idc.set_enum_cmt)(enum_id, cmt, repeatable) | Set comment for enum type | | [`add_enum_member`](#idc.add_enum_member)(enum_id, name, value[, bmask]) | Add a member of enum - a symbolic constant | | [`del_enum_member`](#idc.del_enum_member)(enum_id, value, serial[, bmask]) | Delete a member of enum - a symbolic constant | | [`set_enum_member_name`](#idc.set_enum_member_name)(const_id, name) | Set name of enum member | | [`set_enum_member_cmt`](#idc.set_enum_member_cmt)(const_id, cmt[, repeatable]) | Set comment for enum member | | [`create_array`](#idc.create_array)(name) | Create array. | | [`get_array_id`](#idc.get_array_id)(name) | Get array array_id, by name. | | [`rename_array`](#idc.rename_array)(array_id, newname) | Rename array, by its ID. | | [`delete_array`](#idc.delete_array)(array_id) | Delete array, by its ID. | | [`set_array_long`](#idc.set_array_long)(array_id, idx, value) | Sets the long value of an array element. | | [`set_array_string`](#idc.set_array_string)(array_id, idx, value) | Sets the string value of an array element. | | [`get_array_element`](#idc.get_array_element)(tag, array_id, idx) | Get value of array element. | | [`del_array_element`](#idc.del_array_element)(tag, array_id, idx) | Delete an array element. | | [`get_first_index`](#idc.get_first_index)(tag, array_id) | Get index of the first existing array element. | | [`get_last_index`](#idc.get_last_index)(tag, array_id) | Get index of last existing array element. | | [`get_next_index`](#idc.get_next_index)(tag, array_id, idx) | Get index of the next existing array element. | | [`get_prev_index`](#idc.get_prev_index)(tag, array_id, idx) | Get index of the previous existing array element. | | [`set_hash_long`](#idc.set_hash_long)(hash_id, key, value) | Sets the long value of a hash element. | | [`get_hash_long`](#idc.get_hash_long)(hash_id, key) | Gets the long value of a hash element. | | [`set_hash_string`](#idc.set_hash_string)(hash_id, key, value) | Sets the string value of a hash element. | | [`get_hash_string`](#idc.get_hash_string)(hash_id, key) | Gets the string value of a hash element. | | [`del_hash_string`](#idc.del_hash_string)(hash_id, key) | Delete a hash element. | | [`get_first_hash_key`](#idc.get_first_hash_key)(hash_id) | Get the first key in the hash. | | [`get_last_hash_key`](#idc.get_last_hash_key)(hash_id) | Get the last key in the hash. | | [`get_next_hash_key`](#idc.get_next_hash_key)(hash_id, key) | Get the next key in the hash. | | [`get_prev_hash_key`](#idc.get_prev_hash_key)(hash_id, key) | Get the previous key in the hash. | | [`add_default_til`](#idc.add_default_til)(name) | Load a type library | | [`import_type`](#idc.import_type)(idx, type_name) | Copy information from type library to database | | [`get_type`](#idc.get_type)(ea) | Get type of function/variable | | [`sizeof`](#idc.sizeof)(typestr) | Returns the size of the type. It is equivalent | | [`get_tinfo`](#idc.get_tinfo)(ea) | Get type information of function/variable as 'typeinfo' object | | [`get_local_tinfo`](#idc.get_local_tinfo)(ordinal) | Get local type information as 'typeinfo' object | | [`guess_type`](#idc.guess_type)(ea) | Guess type of function/variable | | [`apply_type`](#idc.apply_type)(ea, py_type[, flags]) | Apply the specified type to the address | | [`SetType`](#idc.SetType)(ea, newtype) | Set type of function/variable | | [`parse_decl`](#idc.parse_decl)(inputtype, flags) | Parse type declaration | | [`parse_decls`](#idc.parse_decls)(inputtype[, flags]) | Parse type declarations | | [`print_decls`](#idc.print_decls)(ordinals, flags) | Print types in a format suitable for use in a header file | | [`get_ordinal_limit`](#idc.get_ordinal_limit)() | Get number of local types + 1 | | [`set_local_type`](#idc.set_local_type)(ordinal, input, flags) | Parse one type declaration and store it in the specified slot | | [`GetLocalType`](#idc.GetLocalType)(ordinal, flags) | Retrieve a local type declaration | | [`get_numbered_type_name`](#idc.get_numbered_type_name)(ordinal) | Retrieve a local type name | | [`update_hidden_range`](#idc.update_hidden_range)(ea, visible) | Set hidden range state | | [`get_first_module`](#idc.get_first_module)() | Enumerate process modules | | [`get_next_module`](#idc.get_next_module)(base) | Enumerate process modules | | [`get_module_name`](#idc.get_module_name)(base) | Get process module name | | [`get_module_size`](#idc.get_module_size)(base) | Get process module size | | [`resume_process`](#idc.resume_process)() | | | [`send_dbg_command`](#idc.send_dbg_command)(cmd) | Sends a command to the debugger module and | | [`get_event_id`](#idc.get_event_id)() | Get ID of debug event | | [`get_event_pid`](#idc.get_event_pid)() | Get process ID for debug event | | [`get_event_tid`](#idc.get_event_tid)() | Get type ID for debug event | | [`get_event_ea`](#idc.get_event_ea)() | Get ea for debug event | | [`is_event_handled`](#idc.is_event_handled)() | Is the debug event handled? | | [`get_event_module_name`](#idc.get_event_module_name)() | Get module name for debug event | | [`get_event_module_base`](#idc.get_event_module_base)() | Get module base for debug event | | [`get_event_module_size`](#idc.get_event_module_size)() | Get module size for debug event | | [`get_event_exit_code`](#idc.get_event_exit_code)() | Get exit code for debug event | | [`get_event_info`](#idc.get_event_info)() | Get debug event info | | [`get_event_bpt_hea`](#idc.get_event_bpt_hea)() | Get hardware address for BREAKPOINT event | | [`get_event_exc_code`](#idc.get_event_exc_code)() | Get exception code for EXCEPTION event | | [`get_event_exc_ea`](#idc.get_event_exc_ea)() | Get address for EXCEPTION event | | [`can_exc_continue`](#idc.can_exc_continue)() | Can it continue after EXCEPTION event? | | [`get_event_exc_info`](#idc.get_event_exc_info)() | Get info for EXCEPTION event | | [`set_reg_value`](#idc.set_reg_value)(value, name) | Set register value | | [`get_bpt_ea`](#idc.get_bpt_ea)(n) | Get breakpoint address | | [`get_bpt_attr`](#idc.get_bpt_attr)(ea, bptattr) | Get the characteristics of a breakpoint | | [`set_bpt_attr`](#idc.set_bpt_attr)(address, bptattr, value) | modifiable characteristics of a breakpoint | | [`set_bpt_cond`](#idc.set_bpt_cond)(ea, cnd[, is_lowcnd]) | Set breakpoint condition | | [`enable_tracing`](#idc.enable_tracing)(trace_level, enable) | Enable step tracing | | [`clear_trace`](#idc.clear_trace)(filename) | Clear the current trace buffer | | [`get_color`](#idc.get_color)(ea, what) | Get item color | | [`set_color`](#idc.set_color)(ea, what, color) | Set item color | | [`force_bl_jump`](#idc.force_bl_jump)(ea) | Some ARM compilers in Thumb mode use BL (branch-and-link) | | [`force_bl_call`](#idc.force_bl_call)(ea) | Force BL instruction to be a call | | [`set_flag`](#idc.set_flag)(off, bit, value) | | | [`here`](#idc.here)() | | | [`is_mapped`](#idc.is_mapped)(ea) | | ## Module Contents ### idc.WORDMASK *= 18446744073709551615* ### *exception* idc.DeprecatedIDCError Bases: [`Exception`](https://docs.python.org/3/library/exceptions.html#Exception) Exception for deprecated function calls ### idc.BADADDR ### idc.BADSEL ### idc.SIZE_MAX ### idc.MS_VAL ### idc.FF_IVL ### idc.has_value(f) Do flags contain byte value? (i.e. has the byte a value?) if not, the byte is uninitialized. ### idc.byte_value(f) Get byte value from flags Get value of byte provided that the byte is initialized. This macro works ok only for 8-bit byte machines. ### idc.is_loaded(ea) Is the byte initialized? ### idc.MS_CLS ### idc.FF_CODE ### idc.FF_DATA ### idc.FF_TAIL ### idc.FF_UNK ### idc.is_code(f) ### idc.is_data(f) ### idc.is_tail(f) ### idc.is_unknown(f) ### idc.is_head(f) ### idc.MS_COMM ### idc.FF_COMM ### idc.FF_REF ### idc.FF_LINE ### idc.FF_NAME ### idc.FF_LABL ### idc.FF_FLOW ### idc.FF_ANYNAME ### idc.is_flow(f) ### idc.isExtra(f) ### idc.isRef(f) ### idc.hasName(f) ### idc.hasUserName(f) ### idc.MS_0TYPE ### idc.FF_0VOID ### idc.FF_0NUMH ### idc.FF_0NUMD ### idc.FF_0CHAR ### idc.FF_0SEG ### idc.FF_0OFF ### idc.FF_0NUMB ### idc.FF_0NUMO ### idc.FF_0ENUM ### idc.FF_0FOP ### idc.FF_0STRO ### idc.FF_0STK ### idc.MS_1TYPE ### idc.FF_1VOID ### idc.FF_1NUMH ### idc.FF_1NUMD ### idc.FF_1CHAR ### idc.FF_1SEG ### idc.FF_1OFF ### idc.FF_1NUMB ### idc.FF_1NUMO ### idc.FF_1ENUM ### idc.FF_1FOP ### idc.FF_1STRO ### idc.FF_1STK ### idc.is_defarg0(f) ### idc.is_defarg1(f) ### idc.isDec0(f) ### idc.isDec1(f) ### idc.isHex0(f) ### idc.isHex1(f) ### idc.isOct0(f) ### idc.isOct1(f) ### idc.isBin0(f) ### idc.isBin1(f) ### idc.is_off0(f) ### idc.is_off1(f) ### idc.is_char0(f) ### idc.is_char1(f) ### idc.is_seg0(f) ### idc.is_seg1(f) ### idc.is_enum0(f) ### idc.is_enum1(f) ### idc.is_manual0(f) ### idc.is_manual1(f) ### idc.is_stroff0(f) ### idc.is_stroff1(f) ### idc.is_stkvar0(f) ### idc.is_stkvar1(f) ### idc.DT_TYPE ### idc.FF_BYTE ### idc.FF_WORD ### idc.FF_DWORD ### idc.FF_QWORD ### idc.FF_TBYTE ### idc.FF_STRLIT ### idc.FF_STRUCT ### idc.FF_OWORD ### idc.FF_FLOAT ### idc.FF_DOUBLE ### idc.FF_PACKREAL ### idc.FF_ALIGN ### idc.is_byte(f) ### idc.is_word(f) ### idc.is_dword(f) ### idc.is_qword(f) ### idc.is_oword(f) ### idc.is_tbyte(f) ### idc.is_float(f) ### idc.is_double(f) ### idc.is_pack_real(f) ### idc.is_strlit(f) ### idc.is_struct(f) ### idc.is_align(f) ### idc.MS_CODE ### idc.FF_FUNC ### idc.FF_IMMD ### idc.FF_JUMP ### idc.NEF_SEGS ### idc.NEF_RSCS ### idc.NEF_NAME ### idc.NEF_MAN ### idc.NEF_FILL ### idc.NEF_IMPS ### idc.NEF_FIRST ### idc.NEF_CODE ### idc.NEF_RELOAD ### idc.NEF_FLAT ### idc.value_is_string(var) ### idc.value_is_long(var) ### idc.value_is_float(var) ### idc.value_is_func(var) ### idc.value_is_pvoid(var) ### idc.value_is_int64(var) ### idc.to_ea(seg, off) Return value of expression: ((seg<<4) + off) ### idc.form(format, \*args) ### idc.substr(s, x1, x2) ### idc.strstr(s1, s2) ### idc.strlen(s) ### idc.xtol(s) ### idc.atoa(ea) Convert address value to a string Return address in the form ‘seg000:1234’ (the same as in line prefixes) * **Parameters:** **ea** – address to format ### idc.ltoa(n, radix) ### idc.atol(s) ### idc.rotate_left(value, count, nbits, offset) Rotate a value to the left (or right) * **Parameters:** * **value** – value to rotate * **count** – number of times to rotate. negative counter means rotate to the right * **nbits** – number of bits to rotate * **offset** – offset of the first bit to rotate * **Returns:** the value with the specified field rotated all other bits are not modified ### idc.rotate_dword(x, count) ### idc.rotate_word(x, count) ### idc.rotate_byte(x, count) ### idc.IDCHK_OK *= 0* ### idc.IDCHK_ARG *= -1* ### idc.IDCHK_KEY *= -2* ### idc.IDCHK_MAX *= -3* ### idc.add_idc_hotkey ### idc.del_idc_hotkey ### idc.jumpto ### idc.auto_wait ### idc.eval_idc(expr) Evaluate an IDC expression * **Parameters:** **expr** – an expression * **Returns:** the expression value. If there are problems, the returned value will be “IDC_FAILURE: xxx” where xxx is the error description NOTE: Python implementation evaluates IDC only, : while IDC can call other registered languages ### idc.EVAL_FAILURE(code) Check the result of eval_idc() for evaluation failures * **Parameters:** **code** – result of eval_idc() * **Returns:** True if there was an evaluation error ### idc.save_database(idbname, flags=0) Save current database to the specified idb file * **Parameters:** * **idbname** – name of the idb file. if empty, the current idb file will be used. * **flags** – combination of ``` ida_loader.DBFL_ ``` … bits or 0 ### idc.DBFL_BAK ### idc.validate_idb_names(do_repair=0) check consistency of IDB name records :param do_repair: try to repair netnode header it TRUE :returns: number of inconsistent name records ### idc.qexit ### idc.call_system(command) Execute an OS command. * **Parameters:** **command** – command line to execute * **Returns:** error code from OS NOTE: IDA will wait for the started program to finish. In order to start the command in parallel, use OS methods. For example, you may start another program in parallel using “start” command. ### idc.qsleep(milliseconds) qsleep the specified number of milliseconds This function suspends IDA for the specified amount of time * **Parameters:** **milliseconds** – time to sleep ### idc.load_and_run_plugin ### idc.plan_to_apply_idasgn ### idc.delete_all_segments() Delete all segments, instructions, comments, i.e. everything except values of bytes. ### idc.create_insn ### idc.plan_and_wait(sEA, eEA, final_pass=True) Perform full analysis of the range * **Parameters:** * **sEA** – starting linear address * **eEA** – ending linear address (excluded) * **final_pass** – make the final pass over the specified range * **Returns:** 1-ok, 0-Ctrl-Break was pressed. ### idc.set_name(ea, name, flags=ida_name.SN_CHECK) Rename an address * **Parameters:** * **ea** – linear address * **name** – new name of address. If name == “”, then delete old name * **flags** – combination of ``` SN_ ``` … constants * **Returns:** 1-ok, 0-failure ### idc.SN_CHECK ### idc.SN_NOCHECK ### idc.SN_PUBLIC ### idc.SN_NON_PUBLIC ### idc.SN_WEAK ### idc.SN_NON_WEAK ### idc.SN_AUTO ### idc.SN_NON_AUTO ### idc.SN_NOLIST ### idc.SN_NOWARN ### idc.SN_LOCAL ### idc.set_cmt ### idc.make_array(ea, nitems) Create an array. * **Parameters:** * **ea** – linear address * **nitems** – size of array in items NOTE: This function will create an array of the items with the same type as the type of the item at ‘ea’. If the byte at ‘ea’ is undefined, then this function will create an array of bytes. ### idc.create_strlit(ea, endea) Create a string. This function creates a string (the string type is determined by the value of get_inf_attr(INF_STRTYPE)) * **Parameters:** * **ea** – linear address * **endea** – ending address of the string (excluded) if endea == BADADDR, then length of string will be calculated by the kernel * **Returns:** 1-ok, 0-failure NOTE: The type of an existing string is returned by get_str_type() ### idc.create_data ### idc.create_byte(ea) Convert the current item to a byte * **Parameters:** **ea** – linear address * **Returns:** 1-ok, 0-failure ### idc.create_word(ea) Convert the current item to a word (2 bytes) * **Parameters:** **ea** – linear address * **Returns:** 1-ok, 0-failure ### idc.create_dword(ea) Convert the current item to a double word (4 bytes) * **Parameters:** **ea** – linear address * **Returns:** 1-ok, 0-failure ### idc.create_qword(ea) Convert the current item to a quadro word (8 bytes) * **Parameters:** **ea** – linear address * **Returns:** 1-ok, 0-failure ### idc.create_oword(ea) Convert the current item to an octa word (16 bytes/128 bits) * **Parameters:** **ea** – linear address * **Returns:** 1-ok, 0-failure ### idc.create_yword(ea) Convert the current item to a ymm word (32 bytes/256 bits) * **Parameters:** **ea** – linear address * **Returns:** 1-ok, 0-failure ### idc.create_float(ea) Convert the current item to a floating point (4 bytes) * **Parameters:** **ea** – linear address * **Returns:** 1-ok, 0-failure ### idc.create_double(ea) Convert the current item to a double floating point (8 bytes) * **Parameters:** **ea** – linear address * **Returns:** 1-ok, 0-failure ### idc.create_pack_real(ea) Convert the current item to a packed real (10 or 12 bytes) * **Parameters:** **ea** – linear address * **Returns:** 1-ok, 0-failure ### idc.create_tbyte(ea) Convert the current item to a tbyte (10 or 12 bytes) * **Parameters:** **ea** – linear address * **Returns:** 1-ok, 0-failure ### idc.create_struct(ea, size, strname) Convert the current item to a structure instance * **Parameters:** * **ea** – linear address * **size** – structure size in bytes. -1 means that the size will be calculated automatically * **strname** – name of a structure type * **Returns:** 1-ok, 0-failure ### idc.create_custom_data ### idc.create_align ### idc.define_local_var(start, end, location, name) Create a local variable * **Parameters:** * **start** – start of address range for the local variable * **end** – end of address range for the local variable * **location** – the variable location in the “[bp+xx]” form where xx is a number. The location can also be specified as a register name. * **name** – name of the local variable * **Returns:** 1-ok, 0-failure NOTE: For the stack variables the end address is ignored. : If there is no function at ‘start’ then this function will fail. ### idc.del_items ### idc.DELIT_SIMPLE ### idc.DELIT_EXPAND ### idc.DELIT_DELNAMES ### idc.set_array_params(ea, flags, litems, align) Set array representation format * **Parameters:** * **ea** – linear address * **flags** – combination of ``` AP_ ``` … constants or 0 * **litems** – number of items per line. 0 means auto * **align** – element alignment - -1: do not align - 0: automatic alignment - other values: element width * **Returns:** 1-ok, 0-failure ### idc.AP_ALLOWDUPS *= 1* ### idc.AP_SIGNED *= 2* ### idc.AP_INDEX *= 4* ### idc.AP_ARRAY *= 8* ### idc.AP_IDXBASEMASK *= 240* ### idc.AP_IDXDEC *= 0* ### idc.AP_IDXHEX *= 16* ### idc.AP_IDXOCT *= 32* ### idc.AP_IDXBIN *= 48* ### idc.op_bin ### idc.op_oct ### idc.op_dec ### idc.op_hex ### idc.op_chr ### idc.op_plain_offset(ea, n, base) Convert operand to an offset (for the explanations of ‘ea’ and ‘n’ please see op_bin()) ### Example: > seg000:2000 dw 1234h > and there is a segment at paragraph 0x1000 and there is a data item > within the segment at 0x1234: > seg000:1234 MyString db ‘Hello, world!’,0 > Then you need to specify a linear address of the segment base to > create a proper offset: > op_plain_offset([“seg000”,0x2000],0,0x10000); > and you will have: > seg000:2000 dw offset MyString Motorola 680x0 processor have a concept of “outer offsets”. If you want to create an outer offset, you need to combine number of the operand with the following bit: Please note that the outer offsets are meaningful only for Motorola 680x0. * **param ea:** linear address * **param n:** number of operand - 0 - the first operand - 1 - the second, third and all other operands - -1 - all operands * **param base:** base of the offset as a linear address If base == BADADDR then the current operand becomes non-offset ### idc.OPND_OUTER ### idc.op_offset ### idc.REF_OFF8 ### idc.REF_OFF16 ### idc.REF_OFF32 ### idc.REF_LOW8 ### idc.REF_LOW16 ### idc.REF_HIGH8 ### idc.REF_HIGH16 ### idc.REF_OFF64 ### idc.REFINFO_RVA *= 16* ### idc.REFINFO_PASTEND *= 32* ### idc.REFINFO_NOBASE *= 128* ### idc.REFINFO_SUBTRACT *= 256* ### idc.REFINFO_SIGNEDOP *= 512* ### idc.op_seg ### idc.op_num ### idc.op_flt ### idc.op_man ### idc.toggle_sign ### idc.toggle_bnot(ea, n) Toggle the bitwise not operator for the operand * **Parameters:** * **ea** – linear address * **n** – number of operand - 0 - the first operand - 1 - the second, third and all other operands - -1 - all operands ### idc.op_enum ### idc.op_stroff(ea, n, strid, delta) Convert operand to an offset in a structure * **Parameters:** * **ea** – linear address * **n** – number of operand - 0 - the first operand - 1 - the second, third and all other operands - -1 - all operands * **strid** – id of a structure type * **delta** – struct offset delta. usually 0. denotes the difference between the structure base and the pointer into the structure. ### idc.op_stkvar ### idc.op_offset_high16(ea, n, target) Convert operand to a high offset High offset is the upper 16bits of an offset. This type is used by TMS320C6 processors (and probably by other RISC processors too) * **Parameters:** * **ea** – linear address * **n** – number of operand - 0 - the first operand - 1 - the second, third and all other operands - -1 - all operands * **target** – the full value (all 32bits) of the offset ### idc.MakeVar(ea) ### idc.E_PREV ### idc.E_NEXT ### idc.get_extra_cmt ### idc.update_extra_cmt ### idc.del_extra_cmt ### idc.set_manual_insn ### idc.get_manual_insn ### idc.patch_dbg_byte ### idc.patch_byte ### idc.patch_word ### idc.patch_dword ### idc.patch_qword ### idc.SR_inherit *= 1* ### idc.SR_user *= 2* ### idc.SR_auto *= 3* ### idc.SR_autostart *= 4* ### idc.split_sreg_range(ea, reg, value, tag=SR_user) Set value of a segment register. * **Parameters:** * **ea** – linear address * **reg** – name of a register, like “cs”, “ds”, “es”, etc. * **value** – new value of the segment register. * **tag** – of ``` SR_ ``` … constants NOTE: IDA keeps tracks of all the points where : segment register change their values. This function allows you to specify the correct value of a segment register if IDA is not able to find the correct value. ### idc.auto_mark_range ### idc.auto_unmark ### idc.AutoMark(ea, qtype) Plan to analyze an address ### idc.AU_UNK ### idc.AU_CODE ### idc.AU_PROC ### idc.AU_USED ### idc.AU_LIBF ### idc.AU_FINAL ### idc.gen_file(filetype, path, ea1, ea2, flags) Generate an output file * **Parameters:** * **filetype** – type of output file. One of ``` OFILE_ ``` … symbols. See below. * **path** – the output file path (will be overwritten!) * **ea1** – start address. For some file types this argument is ignored * **ea2** – end address. For some file types this argument is ignored * **flags** – bit combination of ``` GENFLG_ ``` … * **Returns:** number of the generated lines. -1 if an error occurred OFILE_EXE: 0-can’t generate exe file, 1-ok ### idc.OFILE_MAP ### idc.OFILE_EXE ### idc.OFILE_IDC ### idc.OFILE_LST ### idc.OFILE_ASM ### idc.OFILE_DIF ### idc.GENFLG_MAPSEG ### idc.GENFLG_MAPNAME ### idc.GENFLG_MAPDMNG ### idc.GENFLG_MAPLOC ### idc.GENFLG_IDCTYPE ### idc.GENFLG_ASMTYPE ### idc.GENFLG_GENHTML ### idc.GENFLG_ASMINC ### idc.gen_flow_graph(outfile, title, ea1, ea2, flags) Generate a flow chart GDL file * **Parameters:** * **outfile** – output file name. GDL extension will be used * **title** – graph title * **ea1** – beginning of the range to flow chart * **ea2** – end of the range to flow chart. * **flags** – combination of ``` CHART_ ``` … constants NOTE: If ea2 == BADADDR then ea1 is treated as : an address within a function. That function will be flow charted. ### idc.CHART_PRINT_NAMES *= 4096* ### idc.CHART_GEN_GDL *= 16384* ### idc.CHART_WINGRAPH *= 32768* ### idc.CHART_NOLIBFUNCS *= 1024* ### idc.gen_simple_call_chart(outfile, title, flags) Generate a function call graph GDL file * **Parameters:** * **outfile** – output file name. GDL ext will be used * **title** – graph title * **flags** – combination of CHART_GEN_GDL, CHART_WINGRAPH, CHART_NOLIBFUNCS ### idc.idadir() Get IDA directory This function returns the directory where IDA.EXE resides ### idc.get_root_filename ### idc.get_input_file_path ### idc.set_root_filename ### idc.get_idb_path() Get IDB full path This function returns full path of the current IDB database ### idc.retrieve_input_file_md5 ### idc.get_full_flags ### idc.get_db_byte ### idc.get_bytes(ea, size, use_dbg=False) Return the specified number of bytes of the program * **Parameters:** * **ea** – linear address * **size** – size of buffer in normal 8-bit bytes * **use_dbg** – if True, use debugger memory, otherwise just the database * **Returns:** None on failure otherwise a string containing the read bytes ### idc.get_wide_byte ### idc.read_dbg_byte(ea) Get value of program byte using the debugger memory * **Parameters:** **ea** – linear address * **Returns:** The value or None on failure. ### idc.read_dbg_word(ea) Get value of program word using the debugger memory * **Parameters:** **ea** – linear address * **Returns:** The value or None on failure. ### idc.read_dbg_dword(ea) Get value of program double-word using the debugger memory * **Parameters:** **ea** – linear address * **Returns:** The value or None on failure. ### idc.read_dbg_qword(ea) Get value of program quadro-word using the debugger memory * **Parameters:** **ea** – linear address * **Returns:** The value or None on failure. ### idc.read_dbg_memory ### idc.write_dbg_memory(ea, data) Write to debugger memory. * **Parameters:** * **ea** – linear address * **data** – string to write * **Returns:** number of written bytes (-1 - network/debugger error) Thread-safe function (may be called only from the main thread and debthread) ### idc.get_original_byte ### idc.get_wide_word ### idc.get_wide_dword ### idc.get_qword ### idc.GetFloat(ea) Get value of a floating point number (4 bytes) This function assumes number stored using IEEE format and in the same endianness as integers. * **Parameters:** **ea** – linear address * **Returns:** float ### idc.GetDouble(ea) Get value of a floating point number (8 bytes) This function assumes number stored using IEEE format and in the same endianness as integers. * **Parameters:** **ea** – linear address * **Returns:** double ### idc.get_name_ea_simple(name) Get linear address of a name * **Parameters:** **name** – name of program byte * **Returns:** address of the name BADADDR - No such name ### idc.get_name_ea ### idc.get_segm_by_sel(base) Get segment by segment base * **Parameters:** **base** – segment base paragraph or selector * **Returns:** linear address of the start of the segment or BADADDR if no such segment ### idc.get_screen_ea ### idc.get_curline() Get the disassembly line at the cursor * **Returns:** string ### idc.read_selection_start() Get start address of the selected range returns BADADDR - the user has not selected an range ### idc.read_selection_end() Get end address of the selected range * **Returns:** BADADDR - the user has not selected an range ### idc.get_sreg(ea, reg) Get value of segment register at the specified address * **Parameters:** * **ea** – linear address * **reg** – name of segment register * **Returns:** the value of the segment register or -1 on error NOTE: The segment registers in 32bit program : usually contain selectors, so to get paragraph pointed to by the segment register you need to call sel2para(). ### idc.next_addr ### idc.prev_addr ### idc.next_head(ea, maxea=BADADDR) Get next defined item (instruction or data) in the program * **Parameters:** * **ea** – linear address to start search from * **maxea** – the search will stop at the address maxea is not included in the search range * **Returns:** BADADDR - no (more) defined items ### idc.prev_head(ea, minea=0) Get previous defined item (instruction or data) in the program * **Parameters:** * **ea** – linear address to start search from * **minea** – the search will stop at the address minea is included in the search range * **Returns:** BADADDR - no (more) defined items ### idc.next_not_tail ### idc.prev_not_tail ### idc.get_item_head ### idc.get_item_end ### idc.get_item_size(ea) Get size of instruction or data item in bytes * **Parameters:** **ea** – linear address * **Returns:** 1..n ### idc.func_contains(func_ea, ea) Does the given function contain the given address? * **Parameters:** * **func_ea** – any address belonging to the function * **ea** – linear address * **Returns:** success ### idc.GN_VISIBLE ### idc.GN_COLORED ### idc.GN_DEMANGLED ### idc.GN_STRICT ### idc.GN_SHORT ### idc.GN_LONG ### idc.GN_LOCAL ### idc.GN_ISRET ### idc.GN_NOT_ISRET ### idc.calc_gtn_flags ### idc.get_name(ea, gtn_flags=0) Get name at the specified address * **Parameters:** * **ea** – linear address * **gtn_flags** – how exactly the name should be retrieved. combination of ``` GN_ ``` bits * **Returns:** “” - byte has no name ### idc.demangle_name(name, disable_mask) demangle_name a name * **Parameters:** * **name** – name to demangle * **disable_mask** – a mask that tells how to demangle the name it is a good idea to get this mask using get_inf_attr(INF_SHORT_DN) or get_inf_attr(INF_LONG_DN) * **Returns:** a demangled name If the input name cannot be demangled, returns None ### idc.generate_disasm_line(ea, flags) Get disassembly line * **Parameters:** * **ea** – linear address of instruction * **flags** – combination of the ``` GENDSM_ ``` flags, or 0 * **Returns:** “” - could not decode instruction at the specified location NOTE: this function may not return exactly the same mnemonics : as you see on the screen. ### idc.GENDSM_FORCE_CODE ### idc.GENDSM_MULTI_LINE ### idc.GetDisasm(ea) Get disassembly line * **Parameters:** **ea** – linear address of instruction * **Returns:** “” - could not decode instruction at the specified location NOTE: this function may not return exactly the same mnemonics : as you see on the screen. ### idc.print_insn_mnem(ea) Get instruction mnemonics * **Parameters:** **ea** – linear address of instruction * **Returns:** “” - no instruction at the specified location NOTE: this function may not return exactly the same mnemonics as you see on the screen. ### idc.print_operand(ea, n) Get operand of an instruction or data * **Parameters:** * **ea** – linear address of the item * **n** – number of operand: 0 - the first operand 1 - the second operand * **Returns:** the current text representation of operand or “” ### idc.get_operand_type(ea, n) Get type of instruction operand * **Parameters:** * **ea** – linear address of instruction * **n** – number of operand: 0 - the first operand 1 - the second operand * **Returns:** any of o_\* constants or -1 on error ### idc.o_void ### idc.o_reg ### idc.o_mem ### idc.o_phrase ### idc.o_displ ### idc.o_imm ### idc.o_far ### idc.o_near ### idc.o_idpspec0 ### idc.o_idpspec1 ### idc.o_idpspec2 ### idc.o_idpspec3 ### idc.o_idpspec4 ### idc.o_idpspec5 ### idc.o_trreg ### idc.o_dbreg ### idc.o_crreg ### idc.o_fpreg ### idc.o_mmxreg ### idc.o_xmmreg ### idc.o_reglist ### idc.o_creglist ### idc.o_creg ### idc.o_fpreglist ### idc.o_text ### idc.o_cond ### idc.o_spr ### idc.o_twofpr ### idc.o_shmbme ### idc.o_crf ### idc.o_crb ### idc.o_dcr ### idc.get_operand_value(ea, n) Get number used in the operand This function returns an immediate number used in the operand * **Parameters:** * **ea** – linear address of instruction * **n** – the operand number * **Returns:** value operand is an immediate value => immediate value operand has a displacement => displacement operand is a direct memory ref => memory address operand is a register => register number operand is a register phrase => phrase number otherwise => -1 ### idc.GetCommentEx ### idc.get_cmt ### idc.get_forced_operand ### idc.BPU_1B ### idc.BPU_2B ### idc.BPU_4B ### idc.STRWIDTH_1B ### idc.STRWIDTH_2B ### idc.STRWIDTH_4B ### idc.STRWIDTH_MASK ### idc.STRLYT_TERMCHR ### idc.STRLYT_PASCAL1 ### idc.STRLYT_PASCAL2 ### idc.STRLYT_PASCAL4 ### idc.STRLYT_MASK ### idc.STRLYT_SHIFT ### idc.STRTYPE_TERMCHR ### idc.STRTYPE_C ### idc.STRTYPE_C_16 ### idc.STRTYPE_C_32 ### idc.STRTYPE_PASCAL ### idc.STRTYPE_PASCAL_16 ### idc.STRTYPE_LEN2 ### idc.STRTYPE_LEN2_16 ### idc.STRTYPE_LEN4 ### idc.STRTYPE_LEN4_16 ### idc.STRTYPE_C16 ### idc.get_strlit_contents(ea, length=-1, strtype=STRTYPE_C) Get string contents :param ea: linear address :param length: string length. -1 means to calculate > the max string length * **Parameters:** **strtype** – the string type (one of ``` STRTYPE_ ``` … constants) * **Returns:** string contents or empty string ### idc.get_str_type(ea) Get string type * **Parameters:** **ea** – linear address * **Returns:** One of ``` STRTYPE_ ``` … constants ### idc.find_suspop ### idc.find_code ### idc.find_data ### idc.find_unknown ### idc.find_defined ### idc.find_imm ### idc.find_text ### idc.find_bytes ### idc.process_config_line(directive) Obsolete. Please use ida_idp.process_config_directive(). ### idc.INF_VERSION *= 0* ### idc.INF_PROCNAME *= 1* ### idc.INF_GENFLAGS *= 2* ### idc.INF_LFLAGS *= 3* ### idc.INF_DATABASE_CHANGE_COUNT *= 4* ### idc.INF_CHANGE_COUNTER *= 4* ### idc.INF_FILETYPE *= 5* ### idc.FT_EXE_OLD *= 0* ### idc.FT_COM_OLD *= 1* ### idc.FT_BIN *= 2* ### idc.FT_DRV *= 3* ### idc.FT_WIN *= 4* ### idc.FT_HEX *= 5* ### idc.FT_MEX *= 6* ### idc.FT_LX *= 7* ### idc.FT_LE *= 8* ### idc.FT_NLM *= 9* ### idc.FT_COFF *= 10* ### idc.FT_PE *= 11* ### idc.FT_OMF *= 12* ### idc.FT_SREC *= 13* ### idc.FT_ZIP *= 14* ### idc.FT_OMFLIB *= 15* ### idc.FT_AR *= 16* ### idc.FT_LOADER *= 17* ### idc.FT_ELF *= 18* ### idc.FT_W32RUN *= 19* ### idc.FT_AOUT *= 20* ### idc.FT_PRC *= 21* ### idc.FT_EXE *= 22* ### idc.FT_COM *= 23* ### idc.FT_AIXAR *= 24* ### idc.FT_MACHO *= 25* ### idc.INF_OSTYPE *= 6* ### idc.OSTYPE_MSDOS *= 1* ### idc.OSTYPE_WIN *= 2* ### idc.OSTYPE_OS2 *= 4* ### idc.OSTYPE_NETW *= 8* ### idc.INF_APPTYPE *= 7* ### idc.APPT_CONSOLE *= 1* ### idc.APPT_GRAPHIC *= 2* ### idc.APPT_PROGRAM *= 4* ### idc.APPT_LIBRARY *= 8* ### idc.APPT_DRIVER *= 16* ### idc.APPT_1THREAD *= 32* ### idc.APPT_MTHREAD *= 64* ### idc.APPT_16BIT *= 128* ### idc.APPT_32BIT *= 256* ### idc.INF_ASMTYPE *= 8* ### idc.INF_SPECSEGS *= 9* ### idc.INF_AF *= 10* ### idc.INF_AF2 *= 11* ### idc.INF_BASEADDR *= 12* ### idc.INF_START_SS *= 13* ### idc.INF_START_CS *= 14* ### idc.INF_START_IP *= 15* ### idc.INF_START_EA *= 16* ### idc.INF_START_SP *= 17* ### idc.INF_MAIN *= 18* ### idc.INF_MIN_EA *= 19* ### idc.INF_MAX_EA *= 20* ### idc.INF_OMIN_EA *= 21* ### idc.INF_OMAX_EA *= 22* ### idc.INF_LOWOFF *= 23* ### idc.INF_LOW_OFF *= 23* ### idc.INF_HIGHOFF *= 24* ### idc.INF_HIGH_OFF *= 24* ### idc.INF_MAXREF *= 25* ### idc.INF_PRIVRANGE_START_EA *= 27* ### idc.INF_START_PRIVRANGE *= 27* ### idc.INF_PRIVRANGE_END_EA *= 28* ### idc.INF_END_PRIVRANGE *= 28* ### idc.INF_NETDELTA *= 29* ### idc.INF_XREFNUM *= 30* ### idc.INF_TYPE_XREFNUM *= 31* ### idc.INF_TYPE_XREFS *= 31* ### idc.INF_REFCMTNUM *= 32* ### idc.INF_REFCMTS *= 32* ### idc.INF_XREFFLAG *= 33* ### idc.INF_XREFS *= 33* ### idc.INF_MAX_AUTONAME_LEN *= 34* ### idc.INF_NAMETYPE *= 35* ### idc.INF_SHORT_DEMNAMES *= 36* ### idc.INF_SHORT_DN *= 36* ### idc.INF_LONG_DEMNAMES *= 37* ### idc.INF_LONG_DN *= 37* ### idc.INF_DEMNAMES *= 38* ### idc.INF_LISTNAMES *= 39* ### idc.INF_INDENT *= 40* ### idc.INF_CMT_INDENT *= 41* ### idc.INF_COMMENT *= 41* ### idc.INF_MARGIN *= 42* ### idc.INF_LENXREF *= 43* ### idc.INF_OUTFLAGS *= 44* ### idc.INF_CMTFLG *= 45* ### idc.INF_CMTFLAG *= 45* ### idc.INF_LIMITER *= 46* ### idc.INF_BORDER *= 46* ### idc.INF_BIN_PREFIX_SIZE *= 47* ### idc.INF_BINPREF *= 47* ### idc.INF_PREFFLAG *= 48* ### idc.INF_STRLIT_FLAGS *= 49* ### idc.INF_STRLIT_BREAK *= 50* ### idc.INF_STRLIT_ZEROES *= 51* ### idc.INF_STRTYPE *= 52* ### idc.INF_STRLIT_PREF *= 53* ### idc.INF_STRLIT_SERNUM *= 54* ### idc.INF_DATATYPES *= 55* ### idc.INF_CC_ID *= 57* ### idc.COMP_MASK *= 15* ### idc.COMP_UNK *= 0* ### idc.COMP_MS *= 1* ### idc.COMP_BC *= 2* ### idc.COMP_WATCOM *= 3* ### idc.COMP_GNU *= 6* ### idc.COMP_VISAGE *= 7* ### idc.COMP_BP *= 8* ### idc.INF_CC_CM *= 58* ### idc.INF_CC_SIZE_I *= 59* ### idc.INF_CC_SIZE_B *= 60* ### idc.INF_CC_SIZE_E *= 61* ### idc.INF_CC_DEFALIGN *= 62* ### idc.INF_CC_SIZE_S *= 63* ### idc.INF_CC_SIZE_L *= 64* ### idc.INF_CC_SIZE_LL *= 65* ### idc.INF_CC_SIZE_LDBL *= 66* ### idc.INF_COMPILER *= 57* ### idc.INF_MODEL *= 58* ### idc.INF_SIZEOF_INT *= 59* ### idc.INF_SIZEOF_BOOL *= 60* ### idc.INF_SIZEOF_ENUM *= 61* ### idc.INF_SIZEOF_ALGN *= 62* ### idc.INF_SIZEOF_SHORT *= 63* ### idc.INF_SIZEOF_LONG *= 64* ### idc.INF_SIZEOF_LLONG *= 65* ### idc.INF_SIZEOF_LDBL *= 66* ### idc.INF_ABIBITS *= 67* ### idc.INF_APPCALL_OPTIONS *= 68* ### idc.get_inf_attr(attr) Deprecated. Please ida_ida.inf_get_\* instead. ### idc.set_inf_attr(attr, value) Deprecated. Please ida_ida.inf_set_\* instead. ### idc.set_processor_type ### idc.SETPROC_IDB ### idc.SETPROC_LOADER ### idc.SETPROC_LOADER_NON_FATAL ### idc.SETPROC_USER ### idc.SetPrcsr(processor) ### idc.get_processor_name() Get name of the current processor :returns: processor name ### idc.set_target_assembler ### idc.batch(batch) Enable/disable batch mode of operation * **Parameters:** **batch** – batch mode 0 - ida will display dialog boxes and wait for the user input 1 - ida will not display dialog boxes, warnings, etc. * **Returns:** old balue of batch flag ### idc.process_ui_action(name, flags=0) Invokes an IDA UI action by name * **Parameters:** * **name** – Command name * **flags** – Reserved. Must be zero * **Returns:** Boolean ### idc.ask_seg ### idc.ask_yn ### idc.msg ### idc.warning ### idc.error ### idc.set_ida_state ### idc.IDA_STATUS_READY *= 0* ### idc.IDA_STATUS_THINKING *= 1* ### idc.IDA_STATUS_WAITING *= 2* ### idc.IDA_STATUS_WORK *= 3* ### idc.refresh_idaview_anyway ### idc.refresh_lists ### idc.sel2para(sel) Get a selector value * **Parameters:** **sel** – the selector number * **Returns:** selector value if found otherwise the input value (sel) NOTE: selector values are always in paragraphs ### idc.find_selector(val) Find a selector which has the specified value * **Parameters:** **val** – value to search for * **Returns:** the selector number if found, otherwise the input value (val & 0xFFFF) NOTE: selector values are always in paragraphs ### idc.set_selector ### idc.del_selector ### idc.get_first_seg() Get first segment * **Returns:** address of the start of the first segment BADADDR - no segments are defined ### idc.get_next_seg(ea) Get next segment * **Parameters:** **ea** – linear address * **Returns:** start of the next segment BADADDR - no next segment ### idc.get_segm_start(ea) Get start address of a segment * **Parameters:** **ea** – any address in the segment * **Returns:** start of segment BADADDR - the specified address doesn’t belong to any segment ### idc.get_segm_end(ea) Get end address of a segment * **Parameters:** **ea** – any address in the segment * **Returns:** end of segment (an address past end of the segment) BADADDR - the specified address doesn’t belong to any segment ### idc.get_segm_name(ea) Get name of a segment * **Parameters:** **ea** – any address in the segment * **Returns:** “” - no segment at the specified address ### idc.add_segm_ex(startea, endea, base, use32, align, comb, flags) Create a new segment * **Parameters:** * **startea** – linear address of the start of the segment * **endea** – linear address of the end of the segment this address will not belong to the segment ‘endea’ should be higher than ‘startea’ * **base** – base paragraph or selector of the segment. a paragraph is 16byte memory chunk. If a selector value is specified, the selector should be already defined. * **use32** – 0: 16bit segment, 1: 32bit segment, 2: 64bit segment * **align** – segment alignment. see below for alignment values * **comb** – segment combination. see below for combination values. * **flags** – combination of ``` ADDSEG_ ``` … bits * **Returns:** 0-failed, 1-ok ### idc.ADDSEG_NOSREG ### idc.ADDSEG_OR_DIE ### idc.ADDSEG_NOTRUNC ### idc.ADDSEG_QUIET ### idc.ADDSEG_FILLGAP ### idc.ADDSEG_SPARSE ### idc.AddSeg(startea, endea, base, use32, align, comb) ### idc.del_segm ### idc.SEGMOD_KILL ### idc.SEGMOD_KEEP ### idc.SEGMOD_SILENT ### idc.set_segment_bounds(ea, startea, endea, flags) Change segment boundaries * **Parameters:** * **ea** – any address in the segment * **startea** – new start address of the segment * **endea** – new end address of the segment * **flags** – combination of ``` SEGMOD_ ``` … flags * **Returns:** boolean success ### idc.set_segm_name(ea, name) Change name of the segment * **Parameters:** * **ea** – any address in the segment * **name** – new name of the segment * **Returns:** success (boolean) ### idc.set_segm_class(ea, segclass) Change class of the segment * **Parameters:** * **ea** – any address in the segment * **segclass** – new class of the segment * **Returns:** success (boolean) ### idc.set_segm_alignment(ea, alignment) Change alignment of the segment * **Parameters:** * **ea** – any address in the segment * **alignment** – new alignment of the segment (one of the sa… constants) * **Returns:** success (boolean) ### idc.saAbs ### idc.saRelByte ### idc.saRelWord ### idc.saRelPara ### idc.saRelPage ### idc.saRelDble ### idc.saRel4K ### idc.saGroup ### idc.saRel32Bytes ### idc.saRel64Bytes ### idc.saRelQword ### idc.set_segm_combination(segea, comb) Change combination of the segment * **Parameters:** * **segea** – any address in the segment * **comb** – new combination of the segment (one of the sc… constants) * **Returns:** success (boolean) ### idc.scPriv ### idc.scPub ### idc.scPub2 ### idc.scStack ### idc.scCommon ### idc.scPub3 ### idc.set_segm_addressing(ea, bitness) Change segment addressing * **Parameters:** * **ea** – any address in the segment * **bitness** – 0: 16bit, 1: 32bit, 2: 64bit * **Returns:** success (boolean) ### idc.selector_by_name(segname) Get segment selector by name * **Parameters:** **segname** – name of segment * **Returns:** segment selector or BADADDR ### idc.set_default_sreg_value(ea, reg, value) Set default segment register value for a segment * **Parameters:** * **ea** – any address in the segment if no segment is present at the specified address then all segments will be affected * **reg** – name of segment register * **value** – default value of the segment register. -1-undefined. ### idc.set_segm_type(segea, segtype) Set segment type * **Parameters:** * **segea** – any address within segment * **segtype** – new segment type: * **Returns:** !=0 - ok ### idc.SEG_NORM ### idc.SEG_XTRN ### idc.SEG_CODE ### idc.SEG_DATA ### idc.SEG_IMP ### idc.SEG_GRP ### idc.SEG_NULL ### idc.SEG_UNDF ### idc.SEG_BSS ### idc.SEG_ABSSYM ### idc.SEG_COMM ### idc.SEG_IMEM ### idc.get_segm_attr(segea, attr) Get segment attribute * **Parameters:** * **segea** – any address within segment * **attr** – one of ``` SEGATTR_ ``` … constants ### idc.set_segm_attr(segea, attr, value) Set segment attribute * **Parameters:** * **segea** – any address within segment * **attr** – one of ``` SEGATTR_ ``` … constants NOTE: Please note that not all segment attributes are modifiable. : Also some of them should be modified using special functions like set_segm_addressing, etc. ### idc.SEGATTR_START *= 0* ### idc.SEGATTR_END *= 1* ### idc.SEGATTR_ORGBASE *= 2* ### idc.SEGATTR_ALIGN *= 3* ### idc.SEGATTR_COMB *= 4* ### idc.SEGATTR_PERM *= 5* ### idc.SEGATTR_BITNESS *= 6* ### idc.SEGATTR_FLAGS *= 7* ### idc.SEGATTR_SEL *= 8* ### idc.SEGATTR_ES *= 9* ### idc.SEGATTR_CS *= 10* ### idc.SEGATTR_SS *= 11* ### idc.SEGATTR_DS *= 12* ### idc.SEGATTR_FS *= 13* ### idc.SEGATTR_GS *= 14* ### idc.SEGATTR_TYPE *= 15* ### idc.SEGATTR_COLOR *= 16* ### idc.SFL_COMORG *= 1* ### idc.SFL_OBOK *= 2* ### idc.SFL_HIDDEN *= 4* ### idc.SFL_DEBUG *= 8* ### idc.SFL_LOADER *= 16* ### idc.SFL_HIDETYPE *= 32* ### idc.move_segm(ea, to, flags) Move a segment to a new address This function moves all information to the new address It fixes up address sensitive information in the kernel The total effect is equal to reloading the segment to the target address * **Parameters:** * **ea** – any address within the segment to move * **to** – new segment start address * **flags** – combination ``` MFS_ ``` … constants * **Returns:** ``` MOVE_SEGM_ ``` … error code ### idc.MSF_SILENT *= 1* ### idc.MSF_NOFIX *= 2* ### idc.MSF_LDKEEP *= 4* ### idc.MSF_FIXONCE *= 8* ### idc.MOVE_SEGM_OK *= 0* ### idc.MOVE_SEGM_PARAM *= -1* ### idc.MOVE_SEGM_ROOM *= -2* ### idc.MOVE_SEGM_IDP *= -3* ### idc.MOVE_SEGM_CHUNK *= -4* ### idc.MOVE_SEGM_LOADER *= -5* ### idc.MOVE_SEGM_ODD *= -6* ### idc.MOVE_SEGM_ORPHAN *= -7* ### idc.MOVE_SEGM_DEBUG *= -8* ### idc.MOVE_SEGM_SOURCEFILES *= -9* ### idc.MOVE_SEGM_MAPPING *= -10* ### idc.MOVE_SEGM_INVAL *= -11* ### idc.rebase_program ### idc.set_storage_type ### idc.STT_VA *= 0* ### idc.STT_MM *= 1* ### idc.fl_CF *= 16* ### idc.fl_CN *= 17* ### idc.fl_JF *= 18* ### idc.fl_JN *= 19* ### idc.fl_F *= 21* ### idc.XREF_USER *= 32* ### idc.add_cref ### idc.del_cref ### idc.get_first_cref_from ### idc.get_next_cref_from ### idc.get_first_cref_to ### idc.get_next_cref_to ### idc.get_first_fcref_from ### idc.get_next_fcref_from ### idc.get_first_fcref_to ### idc.get_next_fcref_to ### idc.dr_O ### idc.dr_W ### idc.dr_R ### idc.dr_T ### idc.dr_I ### idc.add_dref ### idc.del_dref ### idc.get_first_dref_from ### idc.get_next_dref_from ### idc.get_first_dref_to ### idc.get_next_dref_to ### idc.get_xref_type() Return type of the last xref obtained by [RD]first/next[B0] functions. * **Returns:** constants fl_\* or dr_\* ### idc.fopen(f, mode) ### idc.fclose(handle) ### idc.filelength(handle) ### idc.fseek(handle, offset, origin) ### idc.ftell(handle) ### idc.LoadFile(filepath, pos, ea, size) Load file into IDA database * **Parameters:** * **filepath** – path to input file * **pos** – position in the file * **ea** – linear address to load * **size** – number of bytes to load * **Returns:** 0 - error, 1 - ok ### idc.loadfile(filepath, pos, ea, size) ### idc.SaveFile(filepath, pos, ea, size) Save from IDA database to file * **Parameters:** * **filepath** – path to output file * **pos** – position in the file * **ea** – linear address to save from * **size** – number of bytes to save * **Returns:** 0 - error, 1 - ok ### idc.savefile(filepath, pos, ea, size) ### idc.fgetc(handle) ### idc.fputc(byte, handle) ### idc.fprintf(handle, format, \*args) ### idc.readshort(handle, mostfirst) ### idc.readlong(handle, mostfirst) ### idc.writeshort(handle, word, mostfirst) ### idc.writelong(handle, dword, mostfirst) ### idc.readstr(handle) ### idc.writestr(handle, s) ### idc.add_func ### idc.del_func ### idc.set_func_end ### idc.get_next_func(ea) Find next function * **Parameters:** **ea** – any address belonging to the function * **Returns:** BADADDR - no more functions otherwise returns the next function start address ### idc.get_prev_func(ea) Find previous function * **Parameters:** **ea** – any address belonging to the function * **Returns:** BADADDR - no more functions otherwise returns the previous function start address ### idc.get_func_attr(ea, attr) Get a function attribute * **Parameters:** * **ea** – any address belonging to the function * **attr** – one of ``` FUNCATTR_ ``` … constants * **Returns:** BADADDR - error otherwise returns the attribute value ### idc.set_func_attr(ea, attr, value) Set a function attribute * **Parameters:** * **ea** – any address belonging to the function * **attr** – one of ``` FUNCATTR_ ``` … constants * **value** – new value of the attribute * **Returns:** 1-ok, 0-failed ### idc.FUNCATTR_START *= 0* ### idc.FUNCATTR_END *= 1* ### idc.FUNCATTR_FLAGS *= 2* ### idc.FUNCATTR_FRAME *= 3* ### idc.FUNCATTR_FRSIZE *= 4* ### idc.FUNCATTR_FRREGS *= 5* ### idc.FUNCATTR_ARGSIZE *= 6* ### idc.FUNCATTR_FPD *= 7* ### idc.FUNCATTR_COLOR *= 8* ### idc.FUNCATTR_OWNER *= 9* ### idc.FUNCATTR_REFQTY *= 10* ### idc.get_func_flags(ea) Retrieve function flags * **Parameters:** **ea** – any address belonging to the function * **Returns:** -1 - function doesn’t exist otherwise returns the flags ### idc.FUNC_NORET ### idc.FUNC_FAR ### idc.FUNC_LIB ### idc.FUNC_STATIC ### idc.FUNC_FRAME ### idc.FUNC_USERFAR ### idc.FUNC_HIDDEN ### idc.FUNC_THUNK ### idc.FUNC_BOTTOMBP ### idc.FUNC_NORET_PENDING ### idc.FUNC_SP_READY ### idc.FUNC_PURGED_OK ### idc.FUNC_TAIL ### idc.FUNC_LUMINA ### idc.FUNC_OUTLINE ### idc.set_func_flags(ea, flags) Change function flags * **Parameters:** * **ea** – any address belonging to the function * **flags** – see get_func_flags() for explanations * **Returns:** !=0 - ok ### idc.get_func_name(ea) Retrieve function name * **Parameters:** **ea** – any address belonging to the function * **Returns:** null string - function doesn’t exist otherwise returns function name ### idc.get_func_cmt(ea, repeatable) Retrieve function comment * **Parameters:** * **ea** – any address belonging to the function * **repeatable** – 1: get repeatable comment 0: get regular comment * **Returns:** function comment string ### idc.set_func_cmt(ea, cmt, repeatable) Set function comment * **Parameters:** * **ea** – any address belonging to the function * **cmt** – a function comment line * **repeatable** – 1: get repeatable comment 0: get regular comment * **Returns:** True on success, False on failure, or None if ‘ea’ does not belong to a function. ### idc.choose_func(title) Ask the user to select a function Arguments: * **Parameters:** **title** – title of the dialog box * **Returns:** -1 - user refused to select a function otherwise returns the selected function start address ### idc.get_func_off_str(ea) Convert address to ‘funcname+offset’ string * **Parameters:** **ea** – address to convert * **Returns:** if the address belongs to a function then return a string formed as ‘name+offset’ where ‘name’ is a function name ‘offset’ is offset within the function else return null string ### idc.find_func_end(ea) Determine a new function boundaries * **Parameters:** **ea** – starting address of a new function * **Returns:** if a function already exists, then return its end address. If a function end cannot be determined, the return BADADDR otherwise return the end address of the new function ### idc.get_frame_id(ea) Get ID of function frame structure * **Parameters:** **ea** – any address belonging to the function * **Returns:** ID of function frame or None In order to access stack variables you need to use structure member manipulaion functions with the obtained ID. ### idc.get_frame_lvar_size(ea) Get size of local variables in function frame * **Parameters:** **ea** – any address belonging to the function * **Returns:** Size of local variables in bytes. If the function doesn’t have a frame, return 0 If the function doesn’t exist, return None ### idc.get_frame_regs_size(ea) Get size of saved registers in function frame * **Parameters:** **ea** – any address belonging to the function * **Returns:** Size of saved registers in bytes. If the function doesn’t have a frame, return 0 This value is used as offset for BP (if FUNC_FRAME is set) If the function doesn’t exist, return None ### idc.get_frame_args_size(ea) Get size of arguments in function frame which are purged upon return * **Parameters:** **ea** – any address belonging to the function * **Returns:** Size of function arguments in bytes. If the function doesn’t have a frame, return 0 If the function doesn’t exist, return -1 ### idc.get_frame_size(ea) Get full size of function frame * **Parameters:** **ea** – any address belonging to the function * **Returns:** Size of function frame in bytes. This function takes into account size of local variables + size of saved registers + size of return address + size of function arguments If the function doesn’t have a frame, return size of function return address in the stack. If the function doesn’t exist, return 0 ### idc.set_frame_size(ea, lvsize, frregs, argsize) Make function frame * **Parameters:** * **ea** – any address belonging to the function * **lvsize** – size of function local variables * **frregs** – size of saved registers * **argsize** – size of function arguments * **Returns:** ID of function frame or -1 If the function did not have a frame, the frame will be created. Otherwise the frame will be modified ### idc.get_spd(ea) Get current delta for the stack pointer * **Parameters:** **ea** – end address of the instruction i.e.the last address of the instruction+1 * **Returns:** The difference between the original SP upon entering the function and SP for the specified address, or None if ‘ea’ does not belong to a function. ### idc.get_sp_delta(ea) Get modification of SP made by the instruction * **Parameters:** **ea** – end address of the instruction i.e.the last address of the instruction+1 * **Returns:** Get modification of SP made at the specified location. If the specified location doesn’t contain a SP change point, return 0. Otherwise return delta of SP modification. ### idc.get_fchunk_attr(ea, attr) Get a function chunk attribute * **Parameters:** * **ea** – any address in the chunk * **attr** – one of: FUNCATTR_START, FUNCATTR_END, FUNCATTR_OWNER, FUNCATTR_REFQTY * **Returns:** desired attribute or -1 ### idc.set_fchunk_attr(ea, attr, value) Set a function chunk attribute * **Parameters:** * **ea** – any address in the chunk * **attr** – only FUNCATTR_START, FUNCATTR_END, FUNCATTR_OWNER * **value** – desired value * **Returns:** 0 if failed, 1 if success ### idc.get_fchunk_referer ### idc.get_next_fchunk(ea) Get next function chunk * **Parameters:** **ea** – any address * **Returns:** the starting address of the next function chunk or BADADDR NOTE: This function enumerates all chunks of all functions in the database ### idc.get_prev_fchunk(ea) Get previous function chunk * **Parameters:** **ea** – any address * **Returns:** the starting address of the function chunk or BADADDR NOTE: This function enumerates all chunks of all functions in the database ### idc.append_func_tail(funcea, ea1, ea2) Append a function chunk to the function * **Parameters:** * **funcea** – any address in the function * **ea1** – start of function tail * **ea2** – end of function tail * **Returns:** 0 if failed, 1 if success NOTE: If a chunk exists at the specified addresses, it must have exactly : the specified boundaries ### idc.remove_fchunk(funcea, tailea) Remove a function chunk from the function * **Parameters:** * **funcea** – any address in the function * **tailea** – any address in the function chunk to remove * **Returns:** 0 if failed, 1 if success ### idc.set_tail_owner(tailea, funcea) Change the function chunk owner * **Parameters:** * **tailea** – any address in the function chunk * **funcea** – the starting address of the new owner * **Returns:** False if failed, True if success NOTE: The new owner must already have the chunk appended before the call ### idc.first_func_chunk(funcea) Get the first function chunk of the specified function * **Parameters:** **funcea** – any address in the function * **Returns:** the function entry point or BADADDR NOTE: This function returns the first (main) chunk of the specified function ### idc.next_func_chunk(funcea, tailea) Get the next function chunk of the specified function * **Parameters:** * **funcea** – any address in the function * **tailea** – any address in the current chunk * **Returns:** the starting address of the next function chunk or BADADDR NOTE: This function returns the next chunk of the specified function ### idc.add_auto_stkpnt(func_ea, ea, delta) Add automatic SP register change point :param func_ea: function start :param ea: linear address where SP changes > usually this is the end of the instruction which > modifies the stack pointer (insn.ea+insn.size) * **Parameters:** **delta** – difference between old and new values of SP * **Returns:** 1-ok, 0-failed ### idc.add_user_stkpnt ### idc.del_stkpnt(func_ea, ea) Delete SP register change point * **Parameters:** * **func_ea** – function start * **ea** – linear address * **Returns:** 1-ok, 0-failed ### idc.get_min_spd_ea(func_ea) Return the address with the minimal spd (stack pointer delta) If there are no SP change points, then return BADADDR. * **Parameters:** **func_ea** – function start * **Returns:** BADDADDR - no such function ### idc.recalc_spd ### idc.get_entry_qty ### idc.add_entry ### idc.get_entry_ordinal ### idc.get_entry ### idc.get_entry_name ### idc.rename_entry ### idc.get_next_fixup_ea ### idc.get_prev_fixup_ea ### idc.get_fixup_target_type(ea) Get fixup target type * **Parameters:** **ea** – address to get information about * **Returns:** 0 - no fixup at the specified address otherwise returns fixup type ### idc.FIXUP_OFF8 *= 13* ### idc.FIXUP_OFF16 *= 1* ### idc.FIXUP_SEG16 *= 2* ### idc.FIXUP_PTR32 *= 3* ### idc.FIXUP_OFF32 *= 4* ### idc.FIXUP_PTR48 *= 5* ### idc.FIXUP_HI8 *= 6* ### idc.FIXUP_HI16 *= 7* ### idc.FIXUP_LOW8 *= 8* ### idc.FIXUP_LOW16 *= 9* ### idc.FIXUP_OFF64 *= 12* ### idc.FIXUP_CUSTOM *= 32768* ### idc.get_fixup_target_flags(ea) Get fixup target flags * **Parameters:** **ea** – address to get information about * **Returns:** 0 - no fixup at the specified address otherwise returns fixup target flags ### idc.FIXUPF_REL *= 1* ### idc.FIXUPF_EXTDEF *= 2* ### idc.FIXUPF_UNUSED *= 4* ### idc.FIXUPF_CREATED *= 8* ### idc.get_fixup_target_sel(ea) Get fixup target selector * **Parameters:** **ea** – address to get information about * **Returns:** BADSEL - no fixup at the specified address otherwise returns fixup target selector ### idc.get_fixup_target_off(ea) Get fixup target offset * **Parameters:** **ea** – address to get information about * **Returns:** BADADDR - no fixup at the specified address otherwise returns fixup target offset ### idc.get_fixup_target_dis(ea) Get fixup target displacement * **Parameters:** **ea** – address to get information about * **Returns:** 0 - no fixup at the specified address otherwise returns fixup target displacement ### idc.set_fixup(ea, fixuptype, fixupflags, targetsel, targetoff, displ) Set fixup information * **Parameters:** * **ea** – address to set fixup information about * **fixuptype** – fixup type. see get_fixup_target_type() for possible fixup types. * **fixupflags** – fixup flags. see get_fixup_target_flags() for possible fixup types. * **targetsel** – target selector * **targetoff** – target offset * **displ** – displacement * **Returns:** none ### idc.del_fixup ### idc.put_bookmark ### idc.get_bookmark ### idc.get_bookmark_desc ### idc.get_struc_id(name) ### idc.get_struc_name(tid) ### idc.get_struc_cmt(tid) ### idc.get_struc_size(tid) ### idc.get_member_qty(sid) Get number of members of a structure * **Parameters:** **sid** – structure type ID * **Returns:** -1 if bad structure type ID is passed otherwise returns number of members. ### idc.get_member_by_idx(sid, idx) Get member ID by member ordinal number * **Parameters:** * **sid** – structure type ID * **idx** – member ordinal number * **Returns:** -1 if bad structure type ID is passed or there is no member with the specified index otherwise returns the member ID. ### idc.is_member_id(sid) Is a member id? * **Parameters:** **sid** – structure type ID * **Returns:** True there is structure member with the specified ID False otherwise ### idc.get_member_id(sid, member_offset) * **Parameters:** **sid** – structure type ID :param member_offset:. The offset can be any offset in the member. For example, is a member is 4 bytes long and starts at offset 2, then 2,3,4,5 denote the same structure member. * **Returns:** -1 if bad structure type ID is passed or there is no member at the specified offset. otherwise returns the member id. ### idc.get_member_offset(sid, member_name) Get offset of a member of a structure by the member name * **Parameters:** * **sid** – structure type ID * **member_name** – name of structure member * **Returns:** -1 if bad structure type ID is passed or no such member in the structure otherwise returns offset of the specified member. NOTE: Union members are, in IDA’s internals, located : at subsequent byte offsets: member 0 -> offset 0x0, member 1 -> offset 0x1, etc… ### idc.get_member_name(sid, member_offset) Get name of a member of a structure * **Parameters:** * **sid** – structure type ID * **member_offset** – member offset. The offset can be any offset in the member. For example, is a member is 4 bytes long and starts at offset 2, then 2,3,4,5 denote the same structure member. * **Returns:** None if bad structure type ID is passed or no such member in the structure otherwise returns name of the specified member. ### idc.get_member_cmt(sid, member_offset, repeatable=True) Get comment of a member * **Parameters:** * **sid** – structure type ID * **member_offset** – member offset. The offset can be any offset in the member. For example, is a member is 4 bytes long and starts at offset 2, then 2,3,4,5 denote the same structure member. * **repeatable** – is not used anymore * **Returns:** None if bad structure type ID is passed or no such member in the structure otherwise returns comment of the specified member. ### idc.get_member_size(sid, member_offset) Get size of a member * **Parameters:** * **sid** – structure type ID * **member_offset** – member offset. The offset can be any offset in the member. For example, is a member is 4 bytes long and starts at offset 2, then 2,3,4,5 denote the same structure member. * **Returns:** None if bad structure type ID is passed, or no such member in the structure otherwise returns size of the specified member in bytes. ### idc.get_member_strid(sid, member_offset) Get structure id of a member * **Parameters:** * **sid** – structure type ID * **member_offset** – member offset. The offset can be any offset in the member. For example, is a member is 4 bytes long and starts at offset 2, then 2,3,4,5 denote the same structure member. * **Returns:** -1 if bad structure type ID is passed or no such member in the structure otherwise returns structure id of the member. If the current member is not a structure, returns -1. ### idc.is_union(sid) Is a structure a union? * **Parameters:** **sid** – structure type ID * **Returns:** True: yes, this is a union id False: no NOTE: Unions are a special kind of structures ### idc.add_struc(index, name, is_union) Define a new structure type * **Parameters:** * **index** – -1 * **name** – name of the new structure type. * **is_union** – 0: structure 1: union * **Returns:** -1 if can’t define structure type because of bad structure name: the name is ill-formed or is already used in the program. otherwise returns ID of the new structure type ### idc.del_struc(sid) Delete a structure type * **Parameters:** **sid** – structure type ID * **Returns:** 0 if bad structure type ID is passed 1 otherwise the structure type is deleted. All data and other structure types referencing to the deleted structure type will be displayed as array of bytes. ### idc.set_struc_name(sid, name) ### idc.set_struc_cmt(sid, cmt, repeatable=True) ### idc.add_struc_member(sid, name, offset, flag, typeid, nbytes, target=-1, tdelta=0, reftype=REF_OFF32) Add structure member * **Parameters:** * **sid** – structure type ID * **name** – name of the new member * **offset** – offset of the new member -1 means to add at the end of the structure * **flag** – type of the new member. Should be one of FF_BYTE..FF_PACKREAL (see above) combined with FF_DATA * **typeid** – if is_struct(flag) then typeid specifies the structure id for the member. if is_off0(flag) then typeid specifies the offset base. if is_strlit(flag) then typeid specifies the string type ( ``` STRTYPE_ ``` …). if is_stroff(flag) then typeid specifies the structure id. if is_enum(flag) then typeid specifies the enum id. if is_custom(flags) then typeid specifies the dtid and fid: dtid|(fid<<16). Otherwise typeid should be -1. * **nbytes** – number of bytes in the new member * **target** – target address of the offset expr. You may specify it as -1, ida will calculate it itself * **tdelta** – offset target delta. usually 0 * **reftype** – see ``` REF_ ``` … definitions NOTE: The remaining arguments are allowed only if is_off0(flag) and you want to specify a complex offset expression * **Returns:** 0 - ok, otherwise error code (one of typeinf.TERR_\*) ### idc.del_struc_member(sid, member_offset) Delete structure member * **Parameters:** * **sid** – structure type ID * **member_offset** – offset of the member * **Returns:** != 0 - ok. NOTE: IDA allows ‘holes’ between members of a : structure. It treats these ‘holes’ as unnamed arrays of bytes. ### idc.set_member_name(sid, member_offset, name) Change structure member name * **Parameters:** * **sid** – structure type ID * **member_offset** – offset of the member * **name** – new name of the member * **Returns:** != 0 - ok. ### idc.set_member_type(sid, member_offset, flag, typeid, nitems, target=-1, tdelta=0, reftype=REF_OFF32) Change structure member type * **Parameters:** * **sid** – structure type ID * **member_offset** – offset of the member * **flag** – new type of the member. Should be one of FF_BYTE..FF_PACKREAL (see above) combined with FF_DATA * **typeid** – if is_struct(flag) then typeid specifies the structure id for the member. if is_off0(flag) then typeid specifies the offset base. if is_strlit(flag) then typeid specifies the string type ( ``` STRTYPE_ ``` …). if is_stroff(flag) then typeid specifies the structure id. if is_enum(flag) then typeid specifies the enum id. if is_custom(flags) then typeid specifies the dtid and fid: dtid|(fid<<16). Otherwise typeid should be -1. * **nitems** – number of items in the member * **target** – target address of the offset expr. You may specify it as -1, ida will calculate it itself * **tdelta** – offset target delta. usually 0 * **reftype** – see ``` REF_ ``` … definitions NOTE: The remaining arguments are allowed only if is_off0(flag) and you want to specify a complex offset expression * **Returns:** !=0 - ok. ### idc.set_member_cmt(sid, member_offset, comment, repeatable) Change structure member comment * **Parameters:** * **sid** – structure type ID * **member_offset** – offset of the member * **comment** – new comment of the structure member * **repeatable** – 1: change repeatable comment 0: change regular comment * **Returns:** != 0 - ok ### idc.expand_struc(sid, offset, delta, recalc=True) Expand or shrink a structure type :param id: structure type ID :param offset: offset in the structure :param delta: how many bytes to add or remove :param recalc: is not used anymore :returns: True if ok, False on error ### idc.ENFL_REGEX *= 1* ### idc.get_enum(name) Get enum by name * **Parameters:** **name** – enum type name * **Returns:** enum type TID or BADADDR ### idc.get_enum_name(enum_id, flags=0) Get name of enum * **Parameters:** * **enum_id** – enum TID * **flags** – use ENFL_REGEX to beautify the name * **Returns:** enum name or None ### idc.get_enum_cmt(enum_id) Get enum comment * **Parameters:** **enum_id** – enum TID * **Returns:** enum comment ### idc.get_enum_size(enum_id) Get the number of the members of the enum * **Parameters:** **enum_id** – enum TID * **Returns:** number of members ### idc.get_enum_width(enum_id) Get the width of a enum element allowed values: 0 (unspecified),1,2,4,8,16,32,64 * **Parameters:** **enum_id** – enum TID * **Returns:** enum width or -1 in case of error ### idc.get_enum_flag(enum_id) Get flags determining the representation of the enum. (currently they define the numeric base: octal, decimal, hex, bin) and signness. * **Parameters:** **enum_id** – enum TID * **Returns:** flag of 0 ### idc.get_enum_member_by_name(name) Get a reference to an enum member by its name * **Parameters:** **name** – enum member name * **Returns:** enum member TID or BADADDR ### idc.get_enum_member_enum(const_id) Get the parent enum of an enum member * **Parameters:** **const_id** – id of const * **Returns:** enum TID or BADADDR ### idc.get_enum_member(enum_id, value, serial, bmask) Get id of constant * **Parameters:** * **enum_id** – id of enum * **value** – value of constant * **serial** – serial number of the constant in the enumeration. See op_enum() for details. * **bmask** – bitmask of the constant ordinary enums accept only -1 as a bitmask * **Returns:** id of constant or -1 if error ### idc.get_first_bmask(enum_id) Get first bitmask in the enum * **Parameters:** **enum_id** – id of enum * **Returns:** id of constant or -1 if error ### idc.get_last_bmask(enum_id) Get last bitmask in the enum * **Parameters:** **enum_id** – id of enum * **Returns:** id of constant or -1 if error ### idc.get_next_bmask(enum_id, bmask) Get next bitmask in the enum * **Parameters:** **enum_id** – id of enum :param bmask * **Returns:** id of constant or -1 if error ### idc.get_prev_bmask(enum_id, bmask) Get prev bitmask in the enum * **Parameters:** **enum_id** – id of enum :param bmask * **Returns:** id of constant or -1 if error ### idc.get_bmask_name(enum_id, bmask) Get bitmask name (only for bitfields) * **Parameters:** * **enum_id** – id of enum * **bmask** – bitmask of the constant * **Returns:** name of bitmask or None ### idc.get_bmask_cmt(enum_id, bmask, repeatable) Get bitmask comment (only for bitfields) * **Parameters:** * **enum_id** – id of enum * **bmask** – bitmask of the constant * **repeatable** – type of comment, 0-regular, 1-repeatable * **Returns:** comment attached to bitmask or None ### idc.set_bmask_name(enum_id, bmask, name) Set bitmask name (only for bitfields) * **Parameters:** * **enum_id** – id of enum * **bmask** – bitmask of the constant * **name** – name of bitmask * **Returns:** True-ok, False-failed ### idc.set_bmask_cmt(enum_id, bmask, cmt, repeatable) Set bitmask comment (only for bitfields) * **Parameters:** * **enum_id** – id of enum * **bmask** – bitmask of the constant * **cmt** – comment repeatable - is not used anymore * **Returns:** 1-ok, 0-failed ### idc.get_first_enum_member(enum_id, bmask=-1) Get first constant in the enum * **Parameters:** * **enum_id** – id of enum * **bmask** – bitmask of the constant (ordinary enums accept only -1) * **Returns:** value of constant or -1 if no constants are defined. All constants are sorted by their values as unsigned longs. ### idc.get_last_enum_member(enum_id, bmask=-1) Get last constant in the enum * **Parameters:** * **enum_id** – id of enum * **bmask** – bitmask of the constant (ordinary enums accept only -1) * **Returns:** value of constant or -1 if no constants are defined All constants are sorted by their values as unsigned longs. ### idc.get_next_enum_member(enum_id, value, bmask=-1) Get next constant in the enum * **Parameters:** * **enum_id** – id of enum * **bmask** – bitmask of the constant (ordinary enums accept only -1) * **value** – value of the current constant * **Returns:** value of a constant with value higher than the specified value. -1 if no such constants exist. All constants are sorted by their values as unsigned longs. ### idc.get_prev_enum_member(enum_id, value, bmask=-1) Get prev constant in the enum * **Parameters:** **enum_id** – id of enum :param bmask : ordinary enums accept only -1 as a bitmask * **Parameters:** **value** – value of the current constant * **Returns:** value of a constant with value lower than the specified value. -1 if no such constants exist. All constants are sorted by their values as unsigned longs. ### idc.get_enum_member_name(const_id) Get name of a constant * **Parameters:** **const_id** – id of const Returns: name of constant ### idc.get_enum_member_cmt(const_id, repeatable=True) Get comment of a constant * **Parameters:** * **const_id** – id of const * **repeatable** – not used anymore * **Returns:** comment string ### idc.get_enum_member_value(const_id) Get value of an enum member * **Parameters:** **const_id** – id of const * **Returns:** member value or None ### idc.get_enum_member_bmask(const_id) Get bitmask of an enum member * **Parameters:** **const_id** – id of const * **Returns:** member value or None ### idc.add_enum(idx, name, flag) Add a new enum type * **Parameters:** * **idx** – is not used anymore * **name** – name of the enum. * **flag** – flags for representation of numeric constants in the definition of enum. * **Returns:** id of new enum or BADADDR ### idc.del_enum(enum_id) Delete an enum type * **Parameters:** **enum_id** – id of enum * **Returns:** success ### idc.set_enum_name(enum_id, name) Set name of enum type * **Parameters:** * **enum_id** – id of enum * **name** – new enum name * **Returns:** 1-ok, 0-failed ### idc.set_enum_flag(enum_id, flag) Set enum constant representation flags * **Parameters:** **enum_id** – enum TID :param flag * **Returns:** success ### idc.set_enum_width(enum_id, nbytes) Set the width of enum base type * **Parameters:** * **enum_id** – enum TID * **nbytes** – width of enum base type, allowed values: 0 (unspecified),1,2,4,8,16, 32,64 * **Returns:** success ### idc.is_bf(enum_id) Is enum a bitmask ? * **Parameters:** **enum_id** – enum TID * **Returns:** if it is a bitmask enum return True, otherwise False ### idc.set_enum_bf(enum_id, bf) Set or clear the ‘bitmask’ attribute of an enum * **Parameters:** * **enum_id** – enum TID * **bf** – bitmask enum or not * **Returns:** success ### idc.set_enum_cmt(enum_id, cmt, repeatable) Set comment for enum type * **Parameters:** * **enum_id** – enum TID * **cmt** – comment * **repeatable** – is comment repeatable ? * **Returns:** 1-ok, 0-failed ### idc.add_enum_member(enum_id, name, value, bmask=-1) Add a member of enum - a symbolic constant * **Parameters:** * **enum_id** – id of enum * **name** – name of symbolic constant. Must be unique in the program. * **value** – value of symbolic constant. * **bmask** – bitmask of the constant ordinary enums accept only -1 as a bitmask all bits set in value should be set in bmask too * **Returns:** 0-ok, otherwise error code (one of ENUM_MEMBER_ERROR_\*) ### idc.del_enum_member(enum_id, value, serial, bmask=-1) Delete a member of enum - a symbolic constant * **Parameters:** * **enum_id** – id of enum * **value** – value of symbolic constant. * **serial** – serial number of the constant in the enumeration. See op_enum() for for details. * **bmask** – bitmask of the constant ordinary enums accept only -1 as a bitmask * **Returns:** 1-ok, 0-failed ### idc.set_enum_member_name(const_id, name) Set name of enum member * **Parameters:** * **const_id** – enum constant TID * **name** – new member name * **Returns:** 1-ok, 0-failed ### idc.set_enum_member_cmt(const_id, cmt, repeatable=False) Set comment for enum member * **Parameters:** * **const_id** – enum constant TID * **cmt** – comment * **repeatable** – is not used anymore * **Returns:** 1-ok, 0-failed ### idc.AR_LONG Array of longs ### idc.AR_STR Array of strings ### idc.create_array(name) Create array. * **Parameters:** **name** – The array name. * **Returns:** -1 in case of failure, a valid array_id otherwise. ### idc.get_array_id(name) Get array array_id, by name. * **Parameters:** **name** – The array name. * **Returns:** -1 in case of failure (i.e., no array with that name exists), a valid array_id otherwise. ### idc.rename_array(array_id, newname) Rename array, by its ID. * **Parameters:** * **id** – The ID of the array to rename. * **newname** – The new name of the array. * **Returns:** 1 in case of success, 0 otherwise ### idc.delete_array(array_id) Delete array, by its ID. * **Parameters:** **array_id** – The ID of the array to delete. ### idc.set_array_long(array_id, idx, value) Sets the long value of an array element. * **Parameters:** * **array_id** – The array ID. * **idx** – Index of an element. * **value** – 32bit or 64bit value to store in the array * **Returns:** 1 in case of success, 0 otherwise ### idc.set_array_string(array_id, idx, value) Sets the string value of an array element. * **Parameters:** * **array_id** – The array ID. * **idx** – Index of an element. * **value** – String value to store in the array * **Returns:** 1 in case of success, 0 otherwise ### idc.get_array_element(tag, array_id, idx) Get value of array element. * **Parameters:** * **tag** – Tag of array, specifies one of two array types: AR_LONG, AR_STR * **array_id** – The array ID. * **idx** – Index of an element. * **Returns:** Value of the specified array element. Note that this function may return char or long result. Unexistent array elements give zero as a result. ### idc.del_array_element(tag, array_id, idx) Delete an array element. * **Parameters:** * **tag** – Tag of array, specifies one of two array types: AR_LONG, AR_STR * **array_id** – The array ID. * **idx** – Index of an element. * **Returns:** 1 in case of success, 0 otherwise. ### idc.get_first_index(tag, array_id) Get index of the first existing array element. * **Parameters:** * **tag** – Tag of array, specifies one of two array types: AR_LONG, AR_STR * **array_id** – The array ID. * **Returns:** -1 if the array is empty, otherwise index of first array element of given type. ### idc.get_last_index(tag, array_id) Get index of last existing array element. * **Parameters:** * **tag** – Tag of array, specifies one of two array types: AR_LONG, AR_STR * **array_id** – The array ID. * **Returns:** -1 if the array is empty, otherwise index of first array element of given type. ### idc.get_next_index(tag, array_id, idx) Get index of the next existing array element. * **Parameters:** * **tag** – Tag of array, specifies one of two array types: AR_LONG, AR_STR * **array_id** – The array ID. * **idx** – Index of the current element. * **Returns:** -1 if no more elements, otherwise returns index of the next array element of given type. ### idc.get_prev_index(tag, array_id, idx) Get index of the previous existing array element. * **Parameters:** * **tag** – Tag of array, specifies one of two array types: AR_LONG, AR_STR * **array_id** – The array ID. * **idx** – Index of the current element. * **Returns:** -1 if no more elements, otherwise returns index of the previous array element of given type. ### idc.set_hash_long(hash_id, key, value) Sets the long value of a hash element. * **Parameters:** * **hash_id** – The hash ID. * **key** – Key of an element. * **value** – 32bit or 64bit value to store in the hash * **Returns:** 1 in case of success, 0 otherwise ### idc.get_hash_long(hash_id, key) Gets the long value of a hash element. * **Parameters:** * **hash_id** – The hash ID. * **key** – Key of an element. * **Returns:** the 32bit or 64bit value of the element, or 0 if no such element. ### idc.set_hash_string(hash_id, key, value) Sets the string value of a hash element. * **Parameters:** * **hash_id** – The hash ID. * **key** – Key of an element. * **value** – string value to store in the hash * **Returns:** 1 in case of success, 0 otherwise ### idc.get_hash_string(hash_id, key) Gets the string value of a hash element. * **Parameters:** * **hash_id** – The hash ID. * **key** – Key of an element. * **Returns:** the string value of the element, or None if no such element. ### idc.del_hash_string(hash_id, key) Delete a hash element. * **Parameters:** * **hash_id** – The hash ID. * **key** – Key of an element * **Returns:** 1 upon success, 0 otherwise. ### idc.get_first_hash_key(hash_id) Get the first key in the hash. * **Parameters:** **hash_id** – The hash ID. * **Returns:** the key, 0 otherwise. ### idc.get_last_hash_key(hash_id) Get the last key in the hash. * **Parameters:** **hash_id** – The hash ID. * **Returns:** the key, 0 otherwise. ### idc.get_next_hash_key(hash_id, key) Get the next key in the hash. * **Parameters:** * **hash_id** – The hash ID. * **key** – The current key. * **Returns:** the next key, 0 otherwise ### idc.get_prev_hash_key(hash_id, key) Get the previous key in the hash. * **Parameters:** * **hash_id** – The hash ID. * **key** – The current key. * **Returns:** the previous key, 0 otherwise ### idc.add_sourcefile ### idc.get_sourcefile ### idc.del_sourcefile ### idc.set_source_linnum ### idc.get_source_linnum ### idc.del_source_linnum ### idc.add_default_til(name) Load a type library * **Parameters:** **name** – name of type library. * **Returns:** 1-ok, 0-failed. ### idc.import_type(idx, type_name) Copy information from type library to database Copy structure, union, or enum definition from the type library to the IDA database. * **Parameters:** * **idx** – -1, ignored * **type_name** – name of type to copy * **Returns:** BADNODE-failed, otherwise the type id (structure id or enum id) ### idc.get_type(ea) Get type of function/variable * **Parameters:** **ea** – the address of the object * **Returns:** type string or None if failed ### idc.sizeof(typestr) Returns the size of the type. It is equivalent to IDC’s sizeof(). * **Parameters:** **typestr** – can be specified as a typeinfo tuple (e.g. the result of get_tinfo()), serialized type byte string, or a string with C declaration (e.g. “int”) * **Returns:** -1 if typestring is not valid or has no size. otherwise size of the type ### idc.SizeOf ### idc.get_tinfo(ea) Get type information of function/variable as ‘typeinfo’ object * **Parameters:** **ea** – the address of the object * **Returns:** None on failure, or (type, fields) tuple. ### idc.get_local_tinfo(ordinal) Get local type information as ‘typeinfo’ object * **Parameters:** **ordinal** – slot number (1…NumberOfLocalTypes) * **Returns:** None on failure, or (type, fields) tuple. ### idc.guess_type(ea) Guess type of function/variable * **Parameters:** **ea** – the address of the object, can be the structure member id too * **Returns:** type string or None if failed ### idc.TINFO_GUESSED *= 0* ### idc.TINFO_DEFINITE *= 1* ### idc.TINFO_DELAYFUNC *= 2* ### idc.apply_type(ea, py_type, flags=TINFO_DEFINITE) Apply the specified type to the address * **Parameters:** * **ea** – the address of the object * **py_type** – typeinfo tuple (type, fields) as get_tinfo() returns : or tuple (name, type, fields) as parse_decl() returns or None if specified as None, then the item associated with ‘ea’ will be deleted. * **flags** – combination of ``` TINFO_ ``` … constants or 0 * **Returns:** Boolean ### idc.PT_SIL ### idc.PT_NDC ### idc.PT_TYP ### idc.PT_VAR ### idc.PT_PACKMASK ### idc.PT_HIGH ### idc.PT_LOWER ### idc.PT_REPLACE ### idc.PT_RAWARGS ### idc.PT_SILENT ### idc.PT_PAKDEF *= 0* ### idc.PT_PAK1 *= 16* ### idc.PT_PAK2 *= 32* ### idc.PT_PAK4 *= 48* ### idc.PT_PAK8 *= 64* ### idc.PT_PAK16 *= 80* ### idc.PT_FILE *= 65536* ### idc.PT_STANDALONE ### idc.SetType(ea, newtype) Set type of function/variable * **Parameters:** * **ea** – the address of the object * **newtype** – the type string in C declaration form. Must contain the closing ‘;’ if specified as an empty string, then the item associated with ‘ea’ will be deleted. * **Returns:** 1-ok, 0-failed. ### idc.parse_decl(inputtype, flags) Parse type declaration * **Parameters:** * **inputtype** – file name or C declarations (depending on the flags) * **flags** – combination of ``` PT_ ``` … constants or 0 * **Returns:** None on failure or (name, type, fields) tuple ### idc.parse_decls(inputtype, flags=0) Parse type declarations * **Parameters:** * **inputtype** – file name or C declarations (depending on the flags) * **flags** – combination of ``` PT_ ``` … constants or 0 * **Returns:** number of parsing errors (0 no errors) ### idc.print_decls(ordinals, flags) Print types in a format suitable for use in a header file * **Parameters:** * **ordinals** – comma-separated list of type ordinals * **flags** – combination of ``` PDF_ ``` … constants or 0 * **Returns:** string containing the type definitions ### idc.PDF_INCL_DEPS *= 1* ### idc.PDF_DEF_FWD *= 2* ### idc.PDF_DEF_BASE *= 4* ### idc.PDF_HEADER_CMT *= 8* ### idc.get_ordinal_limit() Get number of local types + 1 * **Returns:** value >= 1. 1 means that there are no local types. ### idc.set_local_type(ordinal, input, flags) Parse one type declaration and store it in the specified slot * **Parameters:** * **ordinal** – slot number (1…NumberOfLocalTypes) -1 means allocate new slot or reuse the slot of the existing named type * **input** – C declaration. Empty input empties the slot * **flags** – combination of ``` PT_ ``` … constants or 0 * **Returns:** slot number or 0 if error ### idc.GetLocalType(ordinal, flags) Retrieve a local type declaration :param flags: any of PRTYPE_\* constants :returns: local type as a C declaration or “” ### idc.PRTYPE_1LINE *= 0* ### idc.PRTYPE_MULTI *= 1* ### idc.PRTYPE_TYPE *= 2* ### idc.PRTYPE_PRAGMA *= 4* ### idc.PRTYPE_SEMI *= 8* ### idc.PRTYPE_CPP *= 16* ### idc.PRTYPE_DEF *= 32* ### idc.PRTYPE_NOARGS *= 64* ### idc.PRTYPE_NOARRS *= 128* ### idc.PRTYPE_NORES *= 256* ### idc.PRTYPE_RESTORE *= 512* ### idc.PRTYPE_NOREGEX *= 1024* ### idc.PRTYPE_COLORED *= 2048* ### idc.PRTYPE_METHODS *= 4096* ### idc.PRTYPE_1LINCMT *= 8192* ### idc.get_numbered_type_name(ordinal) Retrieve a local type name * **Parameters:** **ordinal** – slot number (1…NumberOfLocalTypes) returns: local type name or None ### idc.add_hidden_range ### idc.update_hidden_range(ea, visible) Set hidden range state * **Parameters:** * **ea** – any address belonging to the hidden range * **visible** – new state of the range * **Returns:** != 0 - ok ### idc.del_hidden_range ### idc.load_debugger ### idc.start_process ### idc.exit_process ### idc.suspend_process ### idc.get_processes ### idc.attach_process ### idc.detach_process ### idc.get_thread_qty ### idc.getn_thread ### idc.get_current_thread ### idc.getn_thread_name ### idc.select_thread ### idc.suspend_thread ### idc.resume_thread ### idc.get_first_module() Enumerate process modules * **Returns:** first module’s base address or None on failure ### idc.get_next_module(base) Enumerate process modules * **Parameters:** **base** – previous module’s base address * **Returns:** next module’s base address or None on failure ### idc.get_module_name(base) Get process module name * **Parameters:** **base** – the base address of the module * **Returns:** required info or None ### idc.get_module_size(base) Get process module size * **Parameters:** **base** – the base address of the module * **Returns:** required info or -1 ### idc.step_into ### idc.step_over ### idc.run_to ### idc.step_until_ret ### idc.wait_for_next_event ### idc.resume_process() ### idc.send_dbg_command(cmd) Sends a command to the debugger module and returns the output string. An exception will be raised if the debugger is not running or the current debugger does not export the ‘send_dbg_command’ IDC command. ### idc.WFNE_ANY *= 1* ### idc.WFNE_SUSP *= 2* ### idc.WFNE_SILENT *= 4* ### idc.WFNE_CONT *= 8* ### idc.WFNE_NOWAIT *= 16* ### idc.NOTASK *= -2* ### idc.DBG_ERROR *= -1* ### idc.DBG_TIMEOUT *= 0* ### idc.PROCESS_STARTED *= 1* ### idc.PROCESS_EXITED *= 2* ### idc.THREAD_STARTED *= 4* ### idc.THREAD_EXITED *= 8* ### idc.BREAKPOINT *= 16* ### idc.STEP *= 32* ### idc.EXCEPTION *= 64* ### idc.LIB_LOADED *= 128* ### idc.LIB_UNLOADED *= 256* ### idc.INFORMATION *= 512* ### idc.PROCESS_ATTACHED *= 1024* ### idc.PROCESS_DETACHED *= 2048* ### idc.PROCESS_SUSPENDED *= 4096* ### idc.refresh_debugger_memory ### idc.take_memory_snapshot ### idc.get_process_state ### idc.DSTATE_SUSP *= -1* ### idc.DSTATE_NOTASK *= 0* ### idc.DSTATE_RUN *= 1* ### idc.DSTATE_RUN_WAIT_ATTACH *= 2* ### idc.DSTATE_RUN_WAIT_END *= 3* Get various information about the current debug event These functions are valid only when the current event exists (the process is in the suspended state) ### idc.get_event_id() Get ID of debug event * **Returns:** event ID ### idc.get_event_pid() Get process ID for debug event * **Returns:** process ID ### idc.get_event_tid() Get type ID for debug event * **Returns:** type ID ### idc.get_event_ea() Get ea for debug event * **Returns:** ea ### idc.is_event_handled() Is the debug event handled? * **Returns:** boolean ### idc.get_event_module_name() Get module name for debug event * **Returns:** module name ### idc.get_event_module_base() Get module base for debug event * **Returns:** module base ### idc.get_event_module_size() Get module size for debug event * **Returns:** module size ### idc.get_event_exit_code() Get exit code for debug event * **Returns:** exit code for PROCESS_EXITED, THREAD_EXITED events ### idc.get_event_info() Get debug event info * **Returns:** event info: for THREAD_STARTED (thread name) for LIB_UNLOADED (unloaded library name) for INFORMATION (message to display) ### idc.get_event_bpt_hea() Get hardware address for BREAKPOINT event * **Returns:** hardware address ### idc.get_event_exc_code() Get exception code for EXCEPTION event * **Returns:** exception code ### idc.get_event_exc_ea() Get address for EXCEPTION event * **Returns:** adress of exception ### idc.can_exc_continue() Can it continue after EXCEPTION event? * **Returns:** boolean ### idc.get_event_exc_info() Get info for EXCEPTION event * **Returns:** info string ### idc.set_debugger_options ### idc.DOPT_SEGM_MSGS *= 1* ### idc.DOPT_START_BPT *= 2* ### idc.DOPT_THREAD_MSGS *= 4* ### idc.DOPT_THREAD_BPT *= 8* ### idc.DOPT_BPT_MSGS *= 16* ### idc.DOPT_LIB_MSGS *= 64* ### idc.DOPT_LIB_BPT *= 128* ### idc.DOPT_INFO_MSGS *= 256* ### idc.DOPT_INFO_BPT *= 512* ### idc.DOPT_REAL_MEMORY *= 1024* ### idc.DOPT_REDO_STACK *= 2048* ### idc.DOPT_ENTRY_BPT *= 4096* ### idc.DOPT_EXCDLG *= 24576* ### idc.EXCDLG_NEVER *= 0* ### idc.EXCDLG_UNKNOWN *= 8192* ### idc.EXCDLG_ALWAYS *= 24576* ### idc.DOPT_LOAD_DINFO *= 32768* ### idc.get_debugger_event_cond ### idc.set_debugger_event_cond ### idc.set_remote_debugger ### idc.define_exception ### idc.EXC_BREAK *= 1* ### idc.EXC_HANDLE *= 2* ### idc.get_reg_value ### idc.set_reg_value(value, name) Set register value * **Parameters:** * **name** – the register name * **value** – new register value NOTE: The debugger should be running : It is not necessary to use this function to set register values. A register name in the left side of an assignment will do too. ### idc.get_bpt_qty ### idc.get_bpt_ea(n) Get breakpoint address * **Parameters:** **n** – number of breakpoint, is in range 0..get_bpt_qty()-1 * **Returns:** address of the breakpoint or BADADDR ### idc.get_bpt_attr(ea, bptattr) Get the characteristics of a breakpoint * **Parameters:** * **ea** – any address in the breakpoint range * **bptattr** – the desired attribute code, one of ``` BPTATTR_ ``` … constants * **Returns:** the desired attribute value or -1 ### idc.BPTATTR_EA *= 1* ### idc.BPTATTR_SIZE *= 2* ### idc.BPTATTR_TYPE *= 3* ### idc.BPT_WRITE *= 1* ### idc.BPT_RDWR *= 3* ### idc.BPT_SOFT *= 4* ### idc.BPT_EXEC *= 8* ### idc.BPT_DEFAULT *= 12* ### idc.BPTATTR_COUNT *= 4* ### idc.BPTATTR_FLAGS *= 5* ### idc.BPT_BRK *= 1* ### idc.BPT_TRACE *= 2* ### idc.BPT_UPDMEM *= 4* ### idc.BPT_ENABLED *= 8* ### idc.BPT_LOWCND *= 16* ### idc.BPT_TRACEON *= 32* ### idc.BPT_TRACE_INSN *= 64* ### idc.BPT_TRACE_FUNC *= 128* ### idc.BPT_TRACE_BBLK *= 256* ### idc.BPTATTR_COND *= 6* ### idc.BPTATTR_PID *= 7* ### idc.BPTATTR_TID *= 8* ### idc.BPLT_ABS *= 0* ### idc.BPLT_REL *= 1* ### idc.BPLT_SYM *= 2* ### idc.set_bpt_attr(address, bptattr, value) > modifiable characteristics of a breakpoint * **Parameters:** * **address** – any address in the breakpoint range * **bptattr** – the attribute code, one of BPTATTR_\* constants BPTATTR_CND is not allowed, see set_bpt_cond() * **value** – the attribute value * **Returns:** success ### idc.set_bpt_cond(ea, cnd, is_lowcnd=0) Set breakpoint condition * **Parameters:** * **ea** – any address in the breakpoint range * **cnd** – breakpoint condition * **is_lowcnd** – 0 - regular condition, 1 - low level condition * **Returns:** success ### idc.add_bpt ### idc.del_bpt ### idc.enable_bpt ### idc.check_bpt ### idc.BPTCK_NONE *= -1* ### idc.BPTCK_NO *= 0* ### idc.BPTCK_YES *= 1* ### idc.BPTCK_ACT *= 2* ### idc.enable_tracing(trace_level, enable) Enable step tracing * **Parameters:** * **trace_level** – what kind of trace to modify * **enable** – 0: turn off, 1: turn on * **Returns:** success ### idc.TRACE_STEP *= 0* ### idc.TRACE_INSN *= 1* ### idc.TRACE_FUNC *= 2* ### idc.get_step_trace_options ### idc.set_step_trace_options ### idc.ST_OVER_DEBUG_SEG *= 1* ### idc.ST_OVER_LIB_FUNC *= 2* ### idc.ST_ALREADY_LOGGED *= 4* ### idc.ST_SKIP_LOOPS *= 8* ### idc.load_trace_file ### idc.save_trace_file ### idc.is_valid_trace_file ### idc.diff_trace_file ### idc.clear_trace(filename) Clear the current trace buffer ### idc.get_trace_file_desc ### idc.set_trace_file_desc ### idc.get_tev_qty ### idc.get_tev_ea ### idc.TEV_NONE *= 0* ### idc.TEV_INSN *= 1* ### idc.TEV_CALL *= 2* ### idc.TEV_RET *= 3* ### idc.TEV_BPT *= 4* ### idc.TEV_MEM *= 5* ### idc.TEV_EVENT *= 6* ### idc.get_tev_type ### idc.get_tev_tid ### idc.get_tev_reg ### idc.get_tev_mem_qty ### idc.get_tev_mem ### idc.get_tev_mem_ea ### idc.get_call_tev_callee ### idc.get_ret_tev_return ### idc.get_bpt_tev_ea ### idc.get_color(ea, what) Get item color * **Parameters:** * **ea** – address of the item * **what** – type of the item (one of CIC_\* constants) * **Returns:** color code in RGB (hex 0xBBGGRR) ### idc.CIC_ITEM *= 1* ### idc.CIC_FUNC *= 2* ### idc.CIC_SEGM *= 3* ### idc.DEFCOLOR *= 4294967295* ### idc.set_color(ea, what, color) Set item color * **Parameters:** * **ea** – address of the item * **what** – type of the item (one of CIC_\* constants) * **color** – new color code in RGB (hex 0xBBGGRR) * **Returns:** success (True or False) ### idc.force_bl_jump(ea) Some ARM compilers in Thumb mode use BL (branch-and-link) instead of B (branch) for long jumps, since BL has more range. By default, IDA tries to determine if BL is a jump or a call. You can override IDA’s decision using commands in Edit/Other menu (Force BL call/Force BL jump) or the following two functions. Force BL instruction to be a jump * **Parameters:** **ea** – address of the BL instruction * **Returns:** 1-ok, 0-failed ### idc.force_bl_call(ea) Force BL instruction to be a call * **Parameters:** **ea** – address of the BL instruction * **Returns:** 1-ok, 0-failed ### idc.set_flag(off, bit, value) ### idc.here() ### idc.is_mapped(ea) ### idc.ARGV *= []* The command line arguments passed to IDA via the -S switch. # index.html.md # ida_bytes Contains functions that deal with individual byte characteristics. Each byte of the disassembled program is represented by a 32-bit value. We will call this value ‘flags’. The structure of the flags is here. You are not allowed to inspect individual bits of flags and modify them directly. Use special functions to inspect and/or modify flags. Flags are kept in a virtual array file ( ``` * ``` .id1). Addresses (ea) are all 32-bit (or 64-bit) quantities. ## Attributes | [`ITEM_END_FIXUP`](#ida_bytes.ITEM_END_FIXUP) | stop at the first fixup | |---------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [`ITEM_END_INITED`](#ida_bytes.ITEM_END_INITED) | stop when initialization changes i.e. | | [`ITEM_END_NAME`](#ida_bytes.ITEM_END_NAME) | stop at the first named location | | [`ITEM_END_XREF`](#ida_bytes.ITEM_END_XREF) | stop at the first referenced location | | [`ITEM_END_CANCEL`](#ida_bytes.ITEM_END_CANCEL) | stop when operation cancelled, it is the responsibility of the caller to show the wait dialog | | [`GFE_VALUE`](#ida_bytes.GFE_VALUE) | get flags with FF_IVL & MS_VAL. It is much slower under remote debugging because the kernel needs to read the process memory. | | [`GFE_IDB_VALUE`](#ida_bytes.GFE_IDB_VALUE) | get flags with FF_IVL & MS_VAL. but never use the debugger memory. | | [`GFE_32BIT`](#ida_bytes.GFE_32BIT) | get only low 32 bits of flags | | [`MS_VAL`](#ida_bytes.MS_VAL) | Mask for byte value. | | [`FF_IVL`](#ida_bytes.FF_IVL) | Byte has value ? | | [`GMB_READALL`](#ida_bytes.GMB_READALL) | try to read all bytes; if this bit is not set, fail at first uninited byte | | [`GMB_WAITBOX`](#ida_bytes.GMB_WAITBOX) | show wait box (may return -1 in this case) | | [`MS_CLS`](#ida_bytes.MS_CLS) | Mask for typing. | | [`FF_CODE`](#ida_bytes.FF_CODE) | Code ? | | [`FF_DATA`](#ida_bytes.FF_DATA) | Data ? | | [`FF_TAIL`](#ida_bytes.FF_TAIL) | Tail ? | | [`FF_UNK`](#ida_bytes.FF_UNK) | Unknown ? | | [`DELIT_SIMPLE`](#ida_bytes.DELIT_SIMPLE) | simply undefine the specified item(s) | | [`DELIT_EXPAND`](#ida_bytes.DELIT_EXPAND) | propagate undefined items; for example if removing an instruction removes all references to the next instruction, then plan to convert to unexplored the next instruction too. | | [`DELIT_DELNAMES`](#ida_bytes.DELIT_DELNAMES) | delete any names at the specified address range (except for the starting address). this bit is valid if nbytes > 1 | | [`DELIT_NOTRUNC`](#ida_bytes.DELIT_NOTRUNC) | don't truncate the current function even if AF_TRFUNC is set | | [`DELIT_NOUNAME`](#ida_bytes.DELIT_NOUNAME) | reject to delete if a user name is in address range (except for the starting address). this bit is valid if nbytes > 1 | | [`DELIT_NOCMT`](#ida_bytes.DELIT_NOCMT) | reject to delete if a comment is in address range (except for the starting address). this bit is valid if nbytes > 1 | | [`DELIT_KEEPFUNC`](#ida_bytes.DELIT_KEEPFUNC) | do not undefine the function start. Just delete xrefs, ops e.t.c. | | [`MS_COMM`](#ida_bytes.MS_COMM) | Mask of common bits. | | [`FF_COMM`](#ida_bytes.FF_COMM) | Has comment? | | [`FF_REF`](#ida_bytes.FF_REF) | has references | | [`FF_LINE`](#ida_bytes.FF_LINE) | Has next or prev lines? | | [`FF_NAME`](#ida_bytes.FF_NAME) | Has name? | | [`FF_LABL`](#ida_bytes.FF_LABL) | Has dummy name? | | [`FF_FLOW`](#ida_bytes.FF_FLOW) | Exec flow from prev instruction. | | [`FF_SIGN`](#ida_bytes.FF_SIGN) | Inverted sign of operands. | | [`FF_BNOT`](#ida_bytes.FF_BNOT) | Bitwise negation of operands. | | [`FF_UNUSED`](#ida_bytes.FF_UNUSED) | unused bit (was used for variable bytes) | | [`FF_ANYNAME`](#ida_bytes.FF_ANYNAME) | Has name or dummy name? | | [`MS_N_TYPE`](#ida_bytes.MS_N_TYPE) | Mask for nth arg (a 64-bit constant). | | [`FF_N_VOID`](#ida_bytes.FF_N_VOID) | Void (unknown)? | | [`FF_N_NUMH`](#ida_bytes.FF_N_NUMH) | Hexadecimal number? | | [`FF_N_NUMD`](#ida_bytes.FF_N_NUMD) | Decimal number? | | [`FF_N_CHAR`](#ida_bytes.FF_N_CHAR) | Char ('x')? | | [`FF_N_SEG`](#ida_bytes.FF_N_SEG) | Segment? | | [`FF_N_OFF`](#ida_bytes.FF_N_OFF) | Offset? | | [`FF_N_NUMB`](#ida_bytes.FF_N_NUMB) | Binary number? | | [`FF_N_NUMO`](#ida_bytes.FF_N_NUMO) | Octal number? | | [`FF_N_ENUM`](#ida_bytes.FF_N_ENUM) | Enumeration? | | [`FF_N_FOP`](#ida_bytes.FF_N_FOP) | Forced operand? | | [`FF_N_STRO`](#ida_bytes.FF_N_STRO) | Struct offset? | | [`FF_N_STK`](#ida_bytes.FF_N_STK) | Stack variable? | | [`FF_N_FLT`](#ida_bytes.FF_N_FLT) | Floating point number? | | [`FF_N_CUST`](#ida_bytes.FF_N_CUST) | Custom representation? | | [`OPND_OUTER`](#ida_bytes.OPND_OUTER) | outer offset base (combined with operand number). used only in set, get, del_offset() functions | | [`OPND_MASK`](#ida_bytes.OPND_MASK) | mask for operand number | | [`OPND_ALL`](#ida_bytes.OPND_ALL) | all operands | | [`DT_TYPE`](#ida_bytes.DT_TYPE) | Mask for DATA typing. | | [`FF_BYTE`](#ida_bytes.FF_BYTE) | byte | | [`FF_WORD`](#ida_bytes.FF_WORD) | word | | [`FF_DWORD`](#ida_bytes.FF_DWORD) | double word | | [`FF_QWORD`](#ida_bytes.FF_QWORD) | quadro word | | [`FF_TBYTE`](#ida_bytes.FF_TBYTE) | tbyte | | [`FF_STRLIT`](#ida_bytes.FF_STRLIT) | string literal | | [`FF_STRUCT`](#ida_bytes.FF_STRUCT) | struct variable | | [`FF_OWORD`](#ida_bytes.FF_OWORD) | octaword/xmm word (16 bytes/128 bits) | | [`FF_FLOAT`](#ida_bytes.FF_FLOAT) | float | | [`FF_DOUBLE`](#ida_bytes.FF_DOUBLE) | double | | [`FF_PACKREAL`](#ida_bytes.FF_PACKREAL) | packed decimal real | | [`FF_ALIGN`](#ida_bytes.FF_ALIGN) | alignment directive | | [`FF_CUSTOM`](#ida_bytes.FF_CUSTOM) | custom data type | | [`FF_YWORD`](#ida_bytes.FF_YWORD) | ymm word (32 bytes/256 bits) | | [`FF_ZWORD`](#ida_bytes.FF_ZWORD) | zmm word (64 bytes/512 bits) | | [`ALOPT_IGNHEADS`](#ida_bytes.ALOPT_IGNHEADS) | don't stop if another data item is encountered. only the byte values will be used to determine the string length. if not set, a defined data item or instruction will truncate the string | | [`ALOPT_IGNPRINT`](#ida_bytes.ALOPT_IGNPRINT) | if set, don't stop at non-printable codepoints, but only at the terminating character (or not unicode-mapped character (e.g., 0x8f in CP1252)) | | [`ALOPT_IGNCLT`](#ida_bytes.ALOPT_IGNCLT) | if set, don't stop at codepoints that are not part of the current 'culture'; accept all those that are graphical (this is typically used used by user-initiated actions creating string literals.) | | [`ALOPT_MAX4K`](#ida_bytes.ALOPT_MAX4K) | if string length is more than 4K, return the accumulated length | | [`ALOPT_ONLYTERM`](#ida_bytes.ALOPT_ONLYTERM) | only the termination characters can be at the string end. Without this option illegal characters also terminate the string. | | [`ALOPT_APPEND`](#ida_bytes.ALOPT_APPEND) | if an existing strlit is encountered, then append it to the string. | | [`STRCONV_ESCAPE`](#ida_bytes.STRCONV_ESCAPE) | convert non-printable characters to C escapes ( | | [`STRCONV_REPLCHAR`](#ida_bytes.STRCONV_REPLCHAR) | convert non-printable characters to the Unicode replacement character (U+FFFD) | | [`STRCONV_INCLLEN`](#ida_bytes.STRCONV_INCLLEN) | for Pascal-style strings, include the prefixing length byte(s) as C-escaped sequence | | [`PSTF_TNORM`](#ida_bytes.PSTF_TNORM) | use normal name | | [`PSTF_TBRIEF`](#ida_bytes.PSTF_TBRIEF) | use brief name (e.g., in the 'Strings' window) | | [`PSTF_TINLIN`](#ida_bytes.PSTF_TINLIN) | use 'inline' name (e.g., in the structures comments) | | [`PSTF_TMASK`](#ida_bytes.PSTF_TMASK) | type mask | | [`PSTF_HOTKEY`](#ida_bytes.PSTF_HOTKEY) | have hotkey markers part of the name | | [`PSTF_ENC`](#ida_bytes.PSTF_ENC) | if encoding is specified, append it | | [`PSTF_ONLY_ENC`](#ida_bytes.PSTF_ONLY_ENC) | generate only the encoding name | | [`PSTF_ATTRIB`](#ida_bytes.PSTF_ATTRIB) | generate for type attribute usage | | [`MS_CODE`](#ida_bytes.MS_CODE) | Mask for code bits. | | [`FF_FUNC`](#ida_bytes.FF_FUNC) | function start? | | [`FF_IMMD`](#ida_bytes.FF_IMMD) | Has Immediate value ? | | [`FF_JUMP`](#ida_bytes.FF_JUMP) | Has jump table or switch_info? | | [`DTP_NODUP`](#id11) | do not use dup construct | | [`PBSENC_DEF1BPU`](#ida_bytes.PBSENC_DEF1BPU) | Use the default 1 byte-per-unit IDB encoding. | | [`PBSENC_ALL`](#ida_bytes.PBSENC_ALL) | Use all IDB encodings. | | [`BIN_SEARCH_CASE`](#ida_bytes.BIN_SEARCH_CASE) | case sensitive | | [`BIN_SEARCH_NOCASE`](#ida_bytes.BIN_SEARCH_NOCASE) | case insensitive | | [`BIN_SEARCH_NOBREAK`](#ida_bytes.BIN_SEARCH_NOBREAK) | don't check for Ctrl-Break | | [`BIN_SEARCH_INITED`](#ida_bytes.BIN_SEARCH_INITED) | find_byte, find_byter: any initilized value | | [`BIN_SEARCH_NOSHOW`](#ida_bytes.BIN_SEARCH_NOSHOW) | don't show search progress or update screen | | [`BIN_SEARCH_FORWARD`](#ida_bytes.BIN_SEARCH_FORWARD) | search forward for bytes | | [`BIN_SEARCH_BACKWARD`](#ida_bytes.BIN_SEARCH_BACKWARD) | search backward for bytes | | [`BIN_SEARCH_BITMASK`](#ida_bytes.BIN_SEARCH_BITMASK) | searching using strict bit mask | | [`MS_0TYPE`](#ida_bytes.MS_0TYPE) | | | [`FF_0VOID`](#ida_bytes.FF_0VOID) | | | [`FF_0NUMH`](#ida_bytes.FF_0NUMH) | | | [`FF_0NUMD`](#ida_bytes.FF_0NUMD) | | | [`FF_0CHAR`](#ida_bytes.FF_0CHAR) | | | [`FF_0SEG`](#ida_bytes.FF_0SEG) | | | [`FF_0OFF`](#ida_bytes.FF_0OFF) | | | [`FF_0NUMB`](#ida_bytes.FF_0NUMB) | | | [`FF_0NUMO`](#ida_bytes.FF_0NUMO) | | | [`FF_0ENUM`](#ida_bytes.FF_0ENUM) | | | [`FF_0FOP`](#ida_bytes.FF_0FOP) | | | [`FF_0STRO`](#ida_bytes.FF_0STRO) | | | [`FF_0STK`](#ida_bytes.FF_0STK) | | | [`FF_0FLT`](#ida_bytes.FF_0FLT) | | | [`FF_0CUST`](#ida_bytes.FF_0CUST) | | | [`MS_1TYPE`](#ida_bytes.MS_1TYPE) | | | [`FF_1VOID`](#ida_bytes.FF_1VOID) | | | [`FF_1NUMH`](#ida_bytes.FF_1NUMH) | | | [`FF_1NUMD`](#ida_bytes.FF_1NUMD) | | | [`FF_1CHAR`](#ida_bytes.FF_1CHAR) | | | [`FF_1SEG`](#ida_bytes.FF_1SEG) | | | [`FF_1OFF`](#ida_bytes.FF_1OFF) | | | [`FF_1NUMB`](#ida_bytes.FF_1NUMB) | | | [`FF_1NUMO`](#ida_bytes.FF_1NUMO) | | | [`FF_1ENUM`](#ida_bytes.FF_1ENUM) | | | [`FF_1FOP`](#ida_bytes.FF_1FOP) | | | [`FF_1STRO`](#ida_bytes.FF_1STRO) | | | [`FF_1STK`](#ida_bytes.FF_1STK) | | | [`FF_1FLT`](#ida_bytes.FF_1FLT) | | | [`FF_1CUST`](#ida_bytes.FF_1CUST) | | | [`update_hidden_range`](#id0) | | | [`get_hidden_range`](#id5) | | | [`getn_hidden_range`](#id6) | | | [`get_prev_hidden_range`](#id7) | | | [`get_next_hidden_range`](#id8) | | | [`get_first_hidden_range`](#id9) | | | [`get_last_hidden_range`](#id10) | | | [`DTP_NODUP`](#id11) | do not use dup construct | ## Classes | [`compiled_binpat_vec_t`](#ida_bytes.compiled_binpat_vec_t) | | |---------------------------------------------------------------|---------------------------------| | [`octet_generator_t`](#ida_bytes.octet_generator_t) | | | [`data_type_t`](#ida_bytes.data_type_t) | Information about a data type | | [`data_format_t`](#ida_bytes.data_format_t) | Information about a data format | | [`compiled_binpat_t`](#ida_bytes.compiled_binpat_t) | | | [`hidden_range_info_t`](#ida_bytes.hidden_range_info_t) | | | [`hidden_range_t`](#ida_bytes.hidden_range_t) | | ## Functions | [`enable_flags`](#ida_bytes.enable_flags)(→ error_t) | Allocate flags for address range. This function does not change the storage type of existing ranges. Exit with an error message if not enough disk space. | |----------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [`disable_flags`](#ida_bytes.disable_flags)(→ error_t) | Deallocate flags for address range. Exit with an error message if not enough disk space (this may occur too). | | [`change_storage_type`](#ida_bytes.change_storage_type)(→ error_t) | Change flag storage type for address range. | | [`next_addr`](#ida_bytes.next_addr)(→ ida_idaapi.ea_t) | Get next address in the program (i.e. next address which has flags). | | [`prev_addr`](#ida_bytes.prev_addr)(→ ida_idaapi.ea_t) | Get previous address in the program. | | [`next_chunk`](#ida_bytes.next_chunk)(→ ida_idaapi.ea_t) | Get the first address of next contiguous chunk in the program. | | [`prev_chunk`](#ida_bytes.prev_chunk)(→ ida_idaapi.ea_t) | Get the last address of previous contiguous chunk in the program. | | [`chunk_start`](#ida_bytes.chunk_start)(→ ida_idaapi.ea_t) | Get start of the contiguous address block containing 'ea'. | | [`chunk_size`](#ida_bytes.chunk_size)(→ asize_t) | Get size of the contiguous address block containing 'ea'. | | [`find_free_chunk`](#ida_bytes.find_free_chunk)(→ ida_idaapi.ea_t) | Search for a hole in the addressing space of the program. | | [`next_that`](#ida_bytes.next_that)(→ ida_idaapi.ea_t) | Find next address with a flag satisfying the function 'testf'. | | [`next_unknown`](#ida_bytes.next_unknown)(→ ida_idaapi.ea_t) | Similar to next_that(), but will find the next address that is unexplored. | | [`prev_that`](#ida_bytes.prev_that)(→ ida_idaapi.ea_t) | Find previous address with a flag satisfying the function 'testf'. | | [`prev_unknown`](#ida_bytes.prev_unknown)(→ ida_idaapi.ea_t) | Similar to prev_that(), but will find the previous address that is unexplored. | | [`prev_head`](#ida_bytes.prev_head)(→ ida_idaapi.ea_t) | Get start of previous defined item. | | [`next_head`](#ida_bytes.next_head)(→ ida_idaapi.ea_t) | Get start of next defined item. | | [`prev_not_tail`](#ida_bytes.prev_not_tail)(→ ida_idaapi.ea_t) | Get address of previous non-tail byte. | | [`next_not_tail`](#ida_bytes.next_not_tail)(→ ida_idaapi.ea_t) | Get address of next non-tail byte. | | [`prev_visea`](#ida_bytes.prev_visea)(→ ida_idaapi.ea_t) | Get previous visible address. | | [`next_visea`](#ida_bytes.next_visea)(→ ida_idaapi.ea_t) | Get next visible address. | | [`get_item_head`](#ida_bytes.get_item_head)(→ ida_idaapi.ea_t) | Get the start address of the item at 'ea'. If there is no current item, then 'ea' is returned (see definition at the end of bytes.hpp source) | | [`get_item_end`](#ida_bytes.get_item_end)(→ ida_idaapi.ea_t) | Get the end address of the item at 'ea'. The returned address does not belong to the current item. Unexplored bytes are counted as 1 byte entities. | | [`calc_max_item_end`](#ida_bytes.calc_max_item_end)(→ ida_idaapi.ea_t) | Calculate maximal reasonable end address of a new item. This function will limit the item with the current segment bounds. | | [`get_item_size`](#ida_bytes.get_item_size)(→ asize_t) | Get size of item (instruction/data) in bytes. Unexplored bytes have length of 1 byte. This function returns 0 only for BADADDR. | | [`is_mapped`](#ida_bytes.is_mapped)(→ bool) | Is the specified address 'ea' present in the program? | | [`get_flags_ex`](#ida_bytes.get_flags_ex)(→ flags64_t) | Get flags for the specified address, extended form. | | [`get_flags32`](#ida_bytes.get_flags32)(→ flags64_t) | Get only 32 low bits of flags. This function returns the most commonly used bits of the flags. However, it does not return the operand info for the operands beyond the first two operands (0,1). If you need to deal with the operands (2..n), then use get_flags(). It is customary to assign the return value to the variable named "F32", to distinguish is from 64-bit flags. | | [`get_flags`](#ida_bytes.get_flags)(→ flags64_t) | Get flags value for address 'ea'. The byte value is not included in the flags. This function should be used if the operand types of any operand beyond the first two operands is required. This function is more expensive to use than get_flags32() | | [`get_full_flags`](#ida_bytes.get_full_flags)(→ flags64_t) | Get full flags value for address 'ea'. This function returns the byte value in the flags as well. See FF_IVL and MS_VAL. This function is more expensive to use than get_flags() | | [`get_item_flag`](#ida_bytes.get_item_flag)(→ flags64_t) | Get flag of the item at 'ea' even if it is a tail byte of some array or structure. This function is used to get flags of structure members or array elements. | | [`get_item_refinfo`](#ida_bytes.get_item_refinfo)(→ bool) | Get refinfo of the item at 'ea'. This function works for a regular offset operand as well as for a tail byte of a structure variable (in this case refinfo to corresponding structure member is returned) | | [`has_value`](#ida_bytes.has_value)(→ bool) | Do flags contain byte value? | | [`del_value`](#ida_bytes.del_value)(→ None) | Delete byte value from flags. The corresponding byte becomes uninitialized. | | [`is_loaded`](#ida_bytes.is_loaded)(→ bool) | Does the specified address have a byte value (is initialized?). | | [`nbits`](#ida_bytes.nbits)(→ int) | Get number of bits in a byte at the given address. | | [`bytesize`](#ida_bytes.bytesize)(→ int) | Get number of bytes required to store a byte at the given address. | | [`get_byte`](#ida_bytes.get_byte)(→ uchar) | Get one byte (8-bit) of the program at 'ea'. This function works only for 8-bit byte processors. | | [`get_db_byte`](#ida_bytes.get_db_byte)(→ uchar) | Get one byte (8-bit) of the program at 'ea' from the database. Works even if the debugger is active. See also get_dbg_byte() to read the process memory directly. This function works only for 8-bit byte processors. | | [`get_word`](#ida_bytes.get_word)(→ ushort) | Get one word (16-bit) of the program at 'ea'. This function takes into account order of bytes specified in idainfo::is_be() This function works only for 8-bit byte processors. | | [`get_dword`](#ida_bytes.get_dword)(→ int) | Get one dword (32-bit) of the program at 'ea'. This function takes into account order of bytes specified in idainfo::is_be() This function works only for 8-bit byte processors. | | [`get_qword`](#ida_bytes.get_qword)(→ uint64) | Get one qword (64-bit) of the program at 'ea'. This function takes into account order of bytes specified in idainfo::is_be() This function works only for 8-bit byte processors. | | [`get_wide_byte`](#ida_bytes.get_wide_byte)(→ uint64) | Get one wide byte of the program at 'ea'. Some processors may access more than 8-bit quantity at an address. These processors have 32-bit byte organization from the IDA's point of view. | | [`get_wide_word`](#ida_bytes.get_wide_word)(→ uint64) | Get one wide word (2 'byte') of the program at 'ea'. Some processors may access more than 8-bit quantity at an address. These processors have 32-bit byte organization from the IDA's point of view. This function takes into account order of bytes specified in idainfo::is_be() | | [`get_wide_dword`](#ida_bytes.get_wide_dword)(→ uint64) | Get two wide words (4 'bytes') of the program at 'ea'. Some processors may access more than 8-bit quantity at an address. These processors have 32-bit byte organization from the IDA's point of view. This function takes into account order of bytes specified in idainfo::is_be() | | [`get_octet`](#ida_bytes.get_octet)(→ uchar \*) | | | [`get_16bit`](#ida_bytes.get_16bit)(→ int) | Get 16bits of the program at 'ea'. | | [`get_32bit`](#ida_bytes.get_32bit)(→ int) | Get not more than 32bits of the program at 'ea'. | | [`get_64bit`](#ida_bytes.get_64bit)(→ uint64) | Get not more than 64bits of the program at 'ea'. | | [`get_data_value`](#ida_bytes.get_data_value)(→ bool) | Get the value at of the item at 'ea'. This function works with entities up to sizeof(ea_t) (bytes, word, etc) | | [`get_original_byte`](#ida_bytes.get_original_byte)(→ uint64) | Get original byte value (that was before patching). This function works for wide byte processors too. | | [`get_original_word`](#ida_bytes.get_original_word)(→ uint64) | Get original word value (that was before patching). This function works for wide byte processors too. This function takes into account order of bytes specified in idainfo::is_be() | | [`get_original_dword`](#ida_bytes.get_original_dword)(→ uint64) | Get original dword (that was before patching) This function works for wide byte processors too. This function takes into account order of bytes specified in idainfo::is_be() | | [`get_original_qword`](#ida_bytes.get_original_qword)(→ uint64) | Get original qword value (that was before patching) This function DOESN'T work for wide byte processors too. This function takes into account order of bytes specified in idainfo::is_be() | | [`put_byte`](#ida_bytes.put_byte)(→ bool) | Set value of one byte of the program. This function modifies the database. If the debugger is active then the debugged process memory is patched too. | | [`put_word`](#ida_bytes.put_word)(→ None) | Set value of one word of the program. This function takes into account order of bytes specified in idainfo::is_be() This function works for wide byte processors too. | | [`put_dword`](#ida_bytes.put_dword)(→ None) | Set value of one dword of the program. This function takes into account order of bytes specified in idainfo::is_be() This function works for wide byte processors too. | | [`put_qword`](#ida_bytes.put_qword)(→ None) | Set value of one qword (8 bytes) of the program. This function takes into account order of bytes specified in idainfo::is_be() This function DOESN'T works for wide byte processors. | | [`patch_byte`](#ida_bytes.patch_byte)(→ bool) | Patch a byte of the program. The original value of the byte is saved and can be obtained by get_original_byte(). This function works for wide byte processors too. | | [`patch_word`](#ida_bytes.patch_word)(→ bool) | Patch a word of the program. The original value of the word is saved and can be obtained by get_original_word(). This function works for wide byte processors too. This function takes into account order of bytes specified in idainfo::is_be() | | [`patch_dword`](#ida_bytes.patch_dword)(→ bool) | Patch a dword of the program. The original value of the dword is saved and can be obtained by get_original_dword(). This function DOESN'T work for wide byte processors. This function takes into account order of bytes specified in idainfo::is_be() | | [`patch_qword`](#ida_bytes.patch_qword)(→ bool) | Patch a qword of the program. The original value of the qword is saved and can be obtained by get_original_qword(). This function DOESN'T work for wide byte processors. This function takes into account order of bytes specified in idainfo::is_be() | | [`revert_byte`](#ida_bytes.revert_byte)(→ bool) | Revert patched byte | | [`add_byte`](#ida_bytes.add_byte)(→ None) | Add a value to one byte of the program. This function works for wide byte processors too. | | [`add_word`](#ida_bytes.add_word)(→ None) | Add a value to one word of the program. This function works for wide byte processors too. This function takes into account order of bytes specified in idainfo::is_be() | | [`add_dword`](#ida_bytes.add_dword)(→ None) | Add a value to one dword of the program. This function works for wide byte processors too. This function takes into account order of bytes specified in idainfo::is_be() | | [`add_qword`](#ida_bytes.add_qword)(→ None) | Add a value to one qword of the program. This function does not work for wide byte processors. This function takes into account order of bytes specified in idainfo::is_be() | | [`get_zero_ranges`](#ida_bytes.get_zero_ranges)(→ bool) | Return set of ranges with zero initialized bytes. The returned set includes only big zero initialized ranges (at least >1KB). Some zero initialized byte ranges may be not included. Only zero bytes that use the sparse storage method (STT_MM) are reported. | | [`put_bytes`](#ida_bytes.put_bytes)(→ None) | Modify the specified number of bytes of the program. This function does not save the original values of bytes. See also patch_bytes(). | | [`patch_bytes`](#ida_bytes.patch_bytes)(→ None) | Patch the specified number of bytes of the program. Original values of bytes are saved and are available with get_original...() functions. See also put_bytes(). | | [`is_code`](#ida_bytes.is_code)(→ bool) | Does flag denote start of an instruction? | | [`is_code_ea`](#ida_bytes.is_code_ea)(→ bool) | | | [`f_is_code`](#ida_bytes.f_is_code)(→ bool) | Does flag denote start of an instruction? | | [`is_data`](#ida_bytes.is_data)(→ bool) | Does flag denote start of data? | | [`is_data_ea`](#ida_bytes.is_data_ea)(→ bool) | | | [`f_is_data`](#ida_bytes.f_is_data)(→ bool) | Does flag denote start of data? | | [`is_tail`](#ida_bytes.is_tail)(→ bool) | Does flag denote tail byte? | | [`is_tail_ea`](#ida_bytes.is_tail_ea)(→ bool) | | | [`f_is_tail`](#ida_bytes.f_is_tail)(→ bool) | Does flag denote tail byte? | | [`is_not_tail`](#ida_bytes.is_not_tail)(→ bool) | Does flag denote tail byte? | | [`f_is_not_tail`](#ida_bytes.f_is_not_tail)(→ bool) | Does flag denote tail byte? | | [`is_unknown`](#ida_bytes.is_unknown)(→ bool) | Does flag denote unexplored byte? | | [`is_unknown_ea`](#ida_bytes.is_unknown_ea)(→ bool) | | | [`is_head`](#ida_bytes.is_head)(→ bool) | Does flag denote start of instruction OR data? | | [`is_head_ea`](#ida_bytes.is_head_ea)(→ bool) | | | [`f_is_head`](#ida_bytes.f_is_head)(→ bool) | Does flag denote start of instruction OR data? | | [`del_items`](#ida_bytes.del_items)(→ bool) | Convert item (instruction/data) to unexplored bytes. The whole item (including the head and tail bytes) will be destroyed. It is allowed to pass any address in the item to this function | | [`is_manual_insn`](#ida_bytes.is_manual_insn)(→ bool) | Is the instruction overridden? | | [`get_manual_insn`](#ida_bytes.get_manual_insn)(→ Union[str, None]) | Retrieve the user-specified string for the manual instruction. | | [`set_manual_insn`](#ida_bytes.set_manual_insn)(→ None) | Set manual instruction string. | | [`is_flow`](#ida_bytes.is_flow)(→ bool) | Does the previous instruction exist and pass execution flow to the current byte? | | [`is_flow_ea`](#ida_bytes.is_flow_ea)(→ bool) | | | [`has_extra_cmts`](#ida_bytes.has_extra_cmts)(→ bool) | Does the current byte have additional anterior or posterior lines? | | [`f_has_extra_cmts`](#ida_bytes.f_has_extra_cmts)(→ bool) | | | [`has_cmt`](#ida_bytes.has_cmt)(→ bool) | Does the current byte have an indented comment? | | [`f_has_cmt`](#ida_bytes.f_has_cmt)(→ bool) | | | [`has_xref`](#ida_bytes.has_xref)(→ bool) | Does the current byte have cross-references to it? | | [`f_has_xref`](#ida_bytes.f_has_xref)(→ bool) | Does the current byte have cross-references to it? | | [`has_name`](#ida_bytes.has_name)(→ bool) | Does the current byte have non-trivial (non-dummy) name? | | [`f_has_name`](#ida_bytes.f_has_name)(→ bool) | Does the current byte have non-trivial (non-dummy) name? | | [`has_dummy_name`](#ida_bytes.has_dummy_name)(→ bool) | Does the current byte have dummy (auto-generated, with special prefix) name? | | [`f_has_dummy_name`](#ida_bytes.f_has_dummy_name)(→ bool) | Does the current byte have dummy (auto-generated, with special prefix) name? | | [`has_auto_name`](#ida_bytes.has_auto_name)(→ bool) | Does the current byte have auto-generated (no special prefix) name? | | [`has_any_name`](#ida_bytes.has_any_name)(→ bool) | Does the current byte have any name? | | [`has_user_name`](#ida_bytes.has_user_name)(→ bool) | Does the current byte have user-specified name? | | [`f_has_user_name`](#ida_bytes.f_has_user_name)(→ bool) | Does the current byte have user-specified name? | | [`is_invsign`](#ida_bytes.is_invsign)(→ bool) | Should the sign of n-th operand be inverted during output? allowed values of n: 0-first operand, 1-other operands | | [`toggle_sign`](#ida_bytes.toggle_sign)(→ bool) | Toggle sign of n-th operand. allowed values of n: 0-first operand, 1-other operands | | [`is_bnot`](#ida_bytes.is_bnot)(→ bool) | Should we negate the operand? asm_t::a_bnot should be defined in the idp module in order to work with this function | | [`toggle_bnot`](#ida_bytes.toggle_bnot)(→ bool) | Toggle binary negation of operand. also see is_bnot(). | | [`is_lzero`](#ida_bytes.is_lzero)(→ bool) | Display leading zeros? Display leading zeros in operands. The global switch for the leading zeros is in idainfo::s_genflags Note: the leading zeros does not work if for the target assembler octal numbers start with 0. | | [`set_lzero`](#ida_bytes.set_lzero)(→ bool) | Set toggle lzero bit. This function changes the display of leading zeros for the specified operand. If the default is not to display leading zeros, this function will display them and vice versa. | | [`clr_lzero`](#ida_bytes.clr_lzero)(→ bool) | Clear toggle lzero bit. This function reset the display of leading zeros for the specified operand to the default. If the default is not to display leading zeros, leading zeros will not be displayed, as vice versa. | | [`toggle_lzero`](#ida_bytes.toggle_lzero)(→ bool) | Toggle lzero bit. | | [`leading_zero_important`](#ida_bytes.leading_zero_important)(→ bool) | Check if leading zeros are important. | | [`get_operand_type_shift`](#ida_bytes.get_operand_type_shift)(→ int) | Get the shift in flags64_t for the nibble representing operand n's type | | [`get_operand_flag`](#ida_bytes.get_operand_flag)(→ flags64_t) | Place operand n's type flag in the right nibble of a 64-bit flags set. | | [`get_optype_flags`](#ida_bytes.get_optype_flags)(→ uint8) | Extract operand n's type bits from a 64-bit flags set. This is the reverse of get_operand_flag(): it extracts the type nibble from flags and returns it as a value suitable for comparison with FF_N_ constants. | | [`is_flag_for_operand`](#ida_bytes.is_flag_for_operand)(→ bool) | Check that the 64-bit flags set has the expected type for operand n. | | [`is_defarg0`](#ida_bytes.is_defarg0)(→ bool) | Is the first operand defined? Initially operand has no defined representation. | | [`is_defarg1`](#ida_bytes.is_defarg1)(→ bool) | Is the second operand defined? Initially operand has no defined representation. | | [`is_off0`](#ida_bytes.is_off0)(→ bool) | Is the first operand offset? (example: push offset xxx). | | [`is_off1`](#ida_bytes.is_off1)(→ bool) | Is the second operand offset? (example: mov ax, offset xxx). | | [`is_char0`](#ida_bytes.is_char0)(→ bool) | Is the first operand character constant? (example: push 'a'). | | [`is_char1`](#ida_bytes.is_char1)(→ bool) | Is the second operand character constant? (example: mov al, 'a'). | | [`is_seg0`](#ida_bytes.is_seg0)(→ bool) | Is the first operand segment selector? (example: push seg seg001). | | [`is_seg1`](#ida_bytes.is_seg1)(→ bool) | Is the second operand segment selector? (example: mov dx, seg dseg). | | [`is_enum0`](#ida_bytes.is_enum0)(→ bool) | Is the first operand a symbolic constant (enum member)? | | [`is_enum1`](#ida_bytes.is_enum1)(→ bool) | Is the second operand a symbolic constant (enum member)? | | [`is_stroff0`](#ida_bytes.is_stroff0)(→ bool) | Is the first operand an offset within a struct? | | [`is_stroff1`](#ida_bytes.is_stroff1)(→ bool) | Is the second operand an offset within a struct? | | [`is_stkvar0`](#ida_bytes.is_stkvar0)(→ bool) | Is the first operand a stack variable? | | [`is_stkvar1`](#ida_bytes.is_stkvar1)(→ bool) | Is the second operand a stack variable? | | [`is_float0`](#ida_bytes.is_float0)(→ bool) | Is the first operand a floating point number? | | [`is_float1`](#ida_bytes.is_float1)(→ bool) | Is the second operand a floating point number? | | [`is_custfmt0`](#ida_bytes.is_custfmt0)(→ bool) | Does the first operand use a custom data representation? | | [`is_custfmt1`](#ida_bytes.is_custfmt1)(→ bool) | Does the second operand use a custom data representation? | | [`is_numop0`](#ida_bytes.is_numop0)(→ bool) | Is the first operand a number (i.e. binary, octal, decimal or hex?). | | [`is_numop1`](#ida_bytes.is_numop1)(→ bool) | Is the second operand a number (i.e. binary, octal, decimal or hex?). | | [`get_optype_flags0`](#ida_bytes.get_optype_flags0)(→ flags64_t) | Get flags for first operand. | | [`get_optype_flags1`](#ida_bytes.get_optype_flags1)(→ flags64_t) | Get flags for second operand. | | [`is_defarg`](#ida_bytes.is_defarg)(→ bool) | is defined? | | [`is_off`](#ida_bytes.is_off)(→ bool) | is offset? | | [`is_char`](#ida_bytes.is_char)(→ bool) | is character constant? | | [`is_seg`](#ida_bytes.is_seg)(→ bool) | is segment? | | [`is_enum`](#ida_bytes.is_enum)(→ bool) | is enum? | | [`is_manual`](#ida_bytes.is_manual)(→ bool) | is forced operand? (use is_forced_operand()) | | [`is_stroff`](#ida_bytes.is_stroff)(→ bool) | is struct offset? | | [`is_stkvar`](#ida_bytes.is_stkvar)(→ bool) | is stack variable? | | [`is_fltnum`](#ida_bytes.is_fltnum)(→ bool) | is floating point number? | | [`is_custfmt`](#ida_bytes.is_custfmt)(→ bool) | is custom data format? | | [`is_numop`](#ida_bytes.is_numop)(→ bool) | is number (bin, oct, dec, hex)? | | [`is_suspop`](#ida_bytes.is_suspop)(→ bool) | is suspicious operand? | | [`op_adds_xrefs`](#ida_bytes.op_adds_xrefs)(→ bool) | Should processor module create xrefs from the operand? Currently 'offset', 'structure offset', 'stack' and 'enum' operands create xrefs | | [`set_op_type`](#ida_bytes.set_op_type)(→ bool) | (internal function) change representation of operand(s). | | [`op_seg`](#ida_bytes.op_seg)(→ bool) | Set operand representation to be 'segment'. If applied to unexplored bytes, converts them to 16-/32-bit word data | | [`op_enum`](#ida_bytes.op_enum)(→ bool) | Set operand representation to be enum type If applied to unexplored bytes, converts them to 16-/32-bit word data | | [`get_enum_id`](#ida_bytes.get_enum_id)(→ uchar \*) | Get enum id of 'enum' operand. | | [`op_based_stroff`](#ida_bytes.op_based_stroff)(→ bool) | Set operand representation to be 'struct offset' if the operand likely points to a structure member. For example, let's there is a structure at 1000 1000 stru_1000 Elf32_Sym <...> the operand #8 will be represented as '#Elf32_Sym.st_size' after the call of 'op_based_stroff(..., 8, 0x1000)' By the way, after the call of 'op_plain_offset(..., 0x1000)' it will be represented as '#(stru_1000.st_size - 0x1000)' | | [`op_stkvar`](#ida_bytes.op_stkvar)(→ bool) | Set operand representation to be 'stack variable'. Should be applied to an instruction within a function. Should be applied after creating a stack var using insn_t::create_stkvar(). | | [`set_forced_operand`](#ida_bytes.set_forced_operand)(→ bool) | Set forced operand. | | [`get_forced_operand`](#ida_bytes.get_forced_operand)(→ Union[str, None]) | Get forced operand. | | [`is_forced_operand`](#ida_bytes.is_forced_operand)(→ bool) | Is operand manually defined? | | [`combine_flags`](#ida_bytes.combine_flags)(→ flags64_t) | | | [`char_flag`](#ida_bytes.char_flag)(→ flags64_t) | see FF_opbits | | [`off_flag`](#ida_bytes.off_flag)(→ flags64_t) | see FF_opbits | | [`enum_flag`](#ida_bytes.enum_flag)(→ flags64_t) | see FF_opbits | | [`stroff_flag`](#ida_bytes.stroff_flag)(→ flags64_t) | see FF_opbits | | [`stkvar_flag`](#ida_bytes.stkvar_flag)(→ flags64_t) | see FF_opbits | | [`flt_flag`](#ida_bytes.flt_flag)(→ flags64_t) | see FF_opbits | | [`custfmt_flag`](#ida_bytes.custfmt_flag)(→ flags64_t) | see FF_opbits | | [`seg_flag`](#ida_bytes.seg_flag)(→ flags64_t) | see FF_opbits | | [`num_flag`](#ida_bytes.num_flag)(→ flags64_t) | Get number of default base (bin, oct, dec, hex) | | [`hex_flag`](#ida_bytes.hex_flag)(→ flags64_t) | Get number flag of the base, regardless of current processor - better to use num_flag(). | | [`dec_flag`](#ida_bytes.dec_flag)(→ flags64_t) | Get number flag of the base, regardless of current processor - better to use num_flag(). | | [`oct_flag`](#ida_bytes.oct_flag)(→ flags64_t) | Get number flag of the base, regardless of current processor - better to use num_flag(). | | [`bin_flag`](#ida_bytes.bin_flag)(→ flags64_t) | Get number flag of the base, regardless of current processor - better to use num_flag(). | | [`op_chr`](#ida_bytes.op_chr)(→ bool) | set op type to char_flag() | | [`op_num`](#ida_bytes.op_num)(→ bool) | set op type to num_flag() | | [`op_hex`](#ida_bytes.op_hex)(→ bool) | set op type to hex_flag() | | [`op_dec`](#ida_bytes.op_dec)(→ bool) | set op type to dec_flag() | | [`op_oct`](#ida_bytes.op_oct)(→ bool) | set op type to oct_flag() | | [`op_bin`](#ida_bytes.op_bin)(→ bool) | set op type to bin_flag() | | [`op_flt`](#ida_bytes.op_flt)(→ bool) | set op type to flt_flag() | | [`op_custfmt`](#ida_bytes.op_custfmt)(→ bool) | Set custom data format for operand (fid-custom data format id). | | [`clr_op_type`](#ida_bytes.clr_op_type)(→ bool) | Remove operand representation information. (set operand representation to be 'undefined') | | [`get_default_radix`](#ida_bytes.get_default_radix)(→ int) | Get default base of number for the current processor. | | [`get_radix`](#ida_bytes.get_radix)(→ int) | Get radix of the operand, in: flags. If the operand is not a number, returns get_default_radix() | | [`code_flag`](#ida_bytes.code_flag)(→ flags64_t) | FF_CODE | | [`byte_flag`](#ida_bytes.byte_flag)(→ flags64_t) | Get a flags64_t representing a byte. | | [`word_flag`](#ida_bytes.word_flag)(→ flags64_t) | Get a flags64_t representing a word. | | [`dword_flag`](#ida_bytes.dword_flag)(→ flags64_t) | Get a flags64_t representing a double word. | | [`qword_flag`](#ida_bytes.qword_flag)(→ flags64_t) | Get a flags64_t representing a quad word. | | [`oword_flag`](#ida_bytes.oword_flag)(→ flags64_t) | Get a flags64_t representing a octaword. | | [`yword_flag`](#ida_bytes.yword_flag)(→ flags64_t) | Get a flags64_t representing a ymm word. | | [`zword_flag`](#ida_bytes.zword_flag)(→ flags64_t) | Get a flags64_t representing a zmm word. | | [`tbyte_flag`](#ida_bytes.tbyte_flag)(→ flags64_t) | Get a flags64_t representing a tbyte. | | [`strlit_flag`](#ida_bytes.strlit_flag)(→ flags64_t) | Get a flags64_t representing a string literal. | | [`stru_flag`](#ida_bytes.stru_flag)(→ flags64_t) | Get a flags64_t representing a struct. | | [`cust_flag`](#ida_bytes.cust_flag)(→ flags64_t) | Get a flags64_t representing custom type data. | | [`align_flag`](#ida_bytes.align_flag)(→ flags64_t) | Get a flags64_t representing an alignment directive. | | [`float_flag`](#ida_bytes.float_flag)(→ flags64_t) | Get a flags64_t representing a float. | | [`double_flag`](#ida_bytes.double_flag)(→ flags64_t) | Get a flags64_t representing a double. | | [`packreal_flag`](#ida_bytes.packreal_flag)(→ flags64_t) | Get a flags64_t representing a packed decimal real. | | [`is_byte`](#ida_bytes.is_byte)(→ bool) | FF_BYTE | | [`is_word`](#ida_bytes.is_word)(→ bool) | FF_WORD | | [`is_dword`](#ida_bytes.is_dword)(→ bool) | FF_DWORD | | [`is_qword`](#ida_bytes.is_qword)(→ bool) | FF_QWORD | | [`is_oword`](#ida_bytes.is_oword)(→ bool) | FF_OWORD | | [`is_yword`](#ida_bytes.is_yword)(→ bool) | FF_YWORD | | [`is_zword`](#ida_bytes.is_zword)(→ bool) | FF_ZWORD | | [`is_tbyte`](#ida_bytes.is_tbyte)(→ bool) | FF_TBYTE | | [`is_float`](#ida_bytes.is_float)(→ bool) | FF_FLOAT | | [`is_double`](#ida_bytes.is_double)(→ bool) | FF_DOUBLE | | [`is_pack_real`](#ida_bytes.is_pack_real)(→ bool) | FF_PACKREAL | | [`is_strlit`](#ida_bytes.is_strlit)(→ bool) | FF_STRLIT | | [`is_struct`](#ida_bytes.is_struct)(→ bool) | FF_STRUCT | | [`is_align`](#ida_bytes.is_align)(→ bool) | FF_ALIGN | | [`is_custom`](#ida_bytes.is_custom)(→ bool) | FF_CUSTOM | | [`is_byte_ea`](#ida_bytes.is_byte_ea)(→ bool) | | | [`is_word_ea`](#ida_bytes.is_word_ea)(→ bool) | | | [`is_dword_ea`](#ida_bytes.is_dword_ea)(→ bool) | | | [`is_qword_ea`](#ida_bytes.is_qword_ea)(→ bool) | | | [`is_oword_ea`](#ida_bytes.is_oword_ea)(→ bool) | | | [`is_yword_ea`](#ida_bytes.is_yword_ea)(→ bool) | | | [`is_zword_ea`](#ida_bytes.is_zword_ea)(→ bool) | | | [`is_tbyte_ea`](#ida_bytes.is_tbyte_ea)(→ bool) | | | [`is_float_ea`](#ida_bytes.is_float_ea)(→ bool) | | | [`is_double_ea`](#ida_bytes.is_double_ea)(→ bool) | | | [`is_pack_real_ea`](#ida_bytes.is_pack_real_ea)(→ bool) | | | [`is_strlit_ea`](#ida_bytes.is_strlit_ea)(→ bool) | | | [`is_struct_ea`](#ida_bytes.is_struct_ea)(→ bool) | | | [`is_align_ea`](#ida_bytes.is_align_ea)(→ bool) | | | [`is_custom_ea`](#ida_bytes.is_custom_ea)(→ bool) | | | [`f_is_byte`](#ida_bytes.f_is_byte)(→ bool) | See is_byte(). | | [`f_is_word`](#ida_bytes.f_is_word)(→ bool) | See is_word(). | | [`f_is_dword`](#ida_bytes.f_is_dword)(→ bool) | See is_dword(). | | [`f_is_qword`](#ida_bytes.f_is_qword)(→ bool) | See is_qword(). | | [`f_is_oword`](#ida_bytes.f_is_oword)(→ bool) | See is_oword(). | | [`f_is_yword`](#ida_bytes.f_is_yword)(→ bool) | See is_yword(). | | [`f_is_tbyte`](#ida_bytes.f_is_tbyte)(→ bool) | See is_tbyte(). | | [`f_is_float`](#ida_bytes.f_is_float)(→ bool) | See is_float(). | | [`f_is_double`](#ida_bytes.f_is_double)(→ bool) | See is_double(). | | [`f_is_pack_real`](#ida_bytes.f_is_pack_real)(→ bool) | See is_pack_real(). | | [`f_is_strlit`](#ida_bytes.f_is_strlit)(→ bool) | See is_strlit(). | | [`f_is_struct`](#ida_bytes.f_is_struct)(→ bool) | See is_struct(). | | [`f_is_align`](#ida_bytes.f_is_align)(→ bool) | See is_align(). | | [`f_is_custom`](#ida_bytes.f_is_custom)(→ bool) | See is_custom(). | | [`is_same_data_type`](#ida_bytes.is_same_data_type)(→ bool) | Do the given flags specify the same data type? | | [`get_flags_by_size`](#ida_bytes.get_flags_by_size)(→ flags64_t) | Get flags from size (in bytes). Supported sizes: 1, 2, 4, 8, 16, 32. For other sizes, returns 0 | | [`create_data`](#ida_bytes.create_data)(→ bool) | Convert to data (byte, word, dword, etc). This function may be used to create arrays. | | [`calc_dflags`](#ida_bytes.calc_dflags)(→ flags64_t) | | | [`create_byte`](#ida_bytes.create_byte)(→ bool) | Convert to byte. | | [`create_word`](#ida_bytes.create_word)(→ bool) | Convert to word. | | [`create_dword`](#ida_bytes.create_dword)(→ bool) | Convert to dword. | | [`create_qword`](#ida_bytes.create_qword)(→ bool) | Convert to quadword. | | [`create_oword`](#ida_bytes.create_oword)(→ bool) | Convert to octaword/xmm word. | | [`create_yword`](#ida_bytes.create_yword)(→ bool) | Convert to ymm word. | | [`create_zword`](#ida_bytes.create_zword)(→ bool) | Convert to zmm word. | | [`create_tbyte`](#ida_bytes.create_tbyte)(→ bool) | Convert to tbyte. | | [`create_float`](#ida_bytes.create_float)(→ bool) | Convert to float. | | [`create_double`](#ida_bytes.create_double)(→ bool) | Convert to double. | | [`create_packed_real`](#ida_bytes.create_packed_real)(→ bool) | Convert to packed decimal real. | | [`create_struct`](#ida_bytes.create_struct)(→ bool) | Convert to struct. | | [`create_custdata`](#ida_bytes.create_custdata)(→ bool) | Convert to custom data type. | | [`create_align`](#ida_bytes.create_align)(→ bool) | Create an alignment item. | | [`calc_min_align`](#ida_bytes.calc_min_align)(→ int) | Calculate the minimal possible alignment exponent. | | [`calc_max_align`](#ida_bytes.calc_max_align)(→ int) | Calculate the maximal possible alignment exponent. | | [`calc_def_align`](#ida_bytes.calc_def_align)(→ int) | Calculate the default alignment exponent. | | [`create_16bit_data`](#ida_bytes.create_16bit_data)(→ bool) | Convert to 16-bit quantity (take the byte size into account). | | [`create_32bit_data`](#ida_bytes.create_32bit_data)(→ bool) | Convert to 32-bit quantity (take the byte size into account). | | [`get_max_strlit_length`](#ida_bytes.get_max_strlit_length)(→ int) | Determine maximum length of string literal. | | [`create_strlit`](#ida_bytes.create_strlit)(→ bool) | Convert to string literal and give a meaningful name. 'start' may be higher than 'end', the kernel will swap them in this case | | [`get_opinfo`](#ida_bytes.get_opinfo)(→ opinfo_t \*) | Get additional information about an operand representation. | | [`set_opinfo`](#ida_bytes.set_opinfo)(→ bool) | Set additional information about an operand representation. This function is a low level one. Only the kernel should use it. | | [`get_data_elsize`](#ida_bytes.get_data_elsize)(→ asize_t) | Get size of data type specified in flags 'F'. | | [`get_full_data_elsize`](#ida_bytes.get_full_data_elsize)(→ asize_t) | Get full size of data type specified in flags 'F'. takes into account processors with wide bytes e.g. returns 2 for a byte element with 16-bit bytes | | [`is_varsize_item`](#ida_bytes.is_varsize_item)(→ int) | Is the item at 'ea' variable size? | | [`get_possible_item_varsize`](#ida_bytes.get_possible_item_varsize)(→ asize_t) | Return the possible size of the item at EA of type TIF if TIF is the variable structure. | | [`can_define_item`](#ida_bytes.can_define_item)(→ bool) | Can define item (instruction/data) of the specified 'length', starting at 'ea'? | | [`has_immd`](#ida_bytes.has_immd)(→ bool) | Has immediate value? | | [`is_func`](#ida_bytes.is_func)(→ bool) | Is function start? | | [`is_func_ea`](#ida_bytes.is_func_ea)(→ bool) | | | [`set_immd`](#ida_bytes.set_immd)(→ bool) | Set 'has immediate operand' flag. Returns true if the FF_IMMD bit was not set and now is set | | [`get_custom_data_type`](#ida_bytes.get_custom_data_type)(→ data_type_t const \*) | Get definition of a registered custom data type. | | [`get_custom_data_format`](#ida_bytes.get_custom_data_format)(→ data_format_t const \*) | Get definition of a registered custom data format. | | [`attach_custom_data_format`](#ida_bytes.attach_custom_data_format)(→ bool) | | | [`detach_custom_data_format`](#ida_bytes.detach_custom_data_format)(→ bool) | | | [`is_attached_custom_data_format`](#ida_bytes.is_attached_custom_data_format)(→ bool) | | | [`get_custom_data_types`](#ida_bytes.get_custom_data_types)(→ int) | Get list of registered custom data type ids. | | [`get_custom_data_formats`](#ida_bytes.get_custom_data_formats)(→ int) | Get list of attached custom data formats for the specified data type. | | [`find_custom_data_type`](#ida_bytes.find_custom_data_type)(→ int) | Get id of a custom data type. | | [`find_custom_data_format`](#ida_bytes.find_custom_data_format)(→ int) | Get id of a custom data format. | | [`set_cmt`](#ida_bytes.set_cmt)(→ bool) | Set an indented comment. | | [`get_cmt`](#ida_bytes.get_cmt)(→ Union[str, None]) | Get an indented comment. | | [`append_cmt`](#ida_bytes.append_cmt)(→ bool) | Append to an indented comment. Creates a new comment if none exists. Appends a newline character and the specified string otherwise. | | [`get_predef_insn_cmt`](#ida_bytes.get_predef_insn_cmt)(→ Union[str, None]) | Get predefined comment. | | [`find_byte`](#ida_bytes.find_byte)(→ ida_idaapi.ea_t) | Find forward a byte with the specified value (only 8-bit value from the database). example: ea=4 size=3 will inspect addresses 4, 5, and 6 | | [`find_byter`](#ida_bytes.find_byter)(→ ida_idaapi.ea_t) | Find reverse a byte with the specified value (only 8-bit value from the database). example: ea=4 size=3 will inspect addresses 6, 5, and 4 | | [`parse_binpat_str`](#ida_bytes.parse_binpat_str)(→ bool) | Deprecated. | | [`bin_search`](#ida_bytes.bin_search)(\*args) | Search for a set of bytes in the program | | [`next_inited`](#ida_bytes.next_inited)(→ ida_idaapi.ea_t) | Find the next initialized address. | | [`prev_inited`](#ida_bytes.prev_inited)(→ ida_idaapi.ea_t) | Find the previous initialized address. | | [`equal_bytes`](#ida_bytes.equal_bytes)(→ bool) | Compare 'len' bytes of the program starting from 'ea' with 'image'. | | [`get_hidden_range_info`](#ida_bytes.get_hidden_range_info)(→ bool) | Get hidden range information by address. | | [`get_hidden_range_info_by_num`](#ida_bytes.get_hidden_range_info_by_num)(→ bool) | Get hidden range information by number. | | [`update_hidden_range_info`](#ida_bytes.update_hidden_range_info)(→ bool) | Update hidden range information in the database. You cannot use this function to change the range boundaries. Uses start_ea to identify the range, applies only modified fields. | | [`get_first_hidden_range_ea`](#ida_bytes.get_first_hidden_range_ea)(→ ida_idaapi.ea_t) | Get start address of the first hidden range. | | [`get_last_hidden_range_ea`](#ida_bytes.get_last_hidden_range_ea)(→ ida_idaapi.ea_t) | Get start address of the last hidden range. | | [`get_next_hidden_range_ea`](#ida_bytes.get_next_hidden_range_ea)(→ ida_idaapi.ea_t) | Get start address of the next hidden range. | | [`get_prev_hidden_range_ea`](#ida_bytes.get_prev_hidden_range_ea)(→ ida_idaapi.ea_t) | Get start address of the previous hidden range. | | [`add_hidden_range`](#ida_bytes.add_hidden_range)(→ bool) | Mark a range of addresses as hidden. The range will be created in the invisible state with the default color | | [`get_hidden_range_qty`](#ida_bytes.get_hidden_range_qty)(→ int) | Get number of hidden ranges. | | [`get_hidden_range_num`](#ida_bytes.get_hidden_range_num)(→ int) | Get number of a hidden range. | | [`del_hidden_range`](#ida_bytes.del_hidden_range)(→ bool) | Delete hidden range. | | [`update_hidden_range`](#id0) | | | [`get_hidden_range`](#id5) | | | [`getn_hidden_range`](#id6) | | | [`get_prev_hidden_range`](#id7) | | | [`get_next_hidden_range`](#id8) | | | [`get_first_hidden_range`](#id9) | | | [`get_last_hidden_range`](#id10) | | | [`add_mapping`](#ida_bytes.add_mapping)(→ bool) | IDA supports memory mapping. References to the addresses from the mapped range use data and meta-data from the mapping range. | | [`del_mapping`](#ida_bytes.del_mapping)(→ None) | Delete memory mapping range. | | [`use_mapping`](#ida_bytes.use_mapping)(→ ida_idaapi.ea_t) | Translate address according to current mappings. | | [`get_mappings_qty`](#ida_bytes.get_mappings_qty)(→ int) | Get number of mappings. | | [`get_mapping`](#ida_bytes.get_mapping)(→ ea_t \*, ea_t \*, asize_t \*) | Get memory mapping range by its number. | | [`visit_patched_bytes`](#ida_bytes.visit_patched_bytes)(ea1, ea2, callable) | Enumerates patched bytes in the given range and invokes a callable | | [`get_bytes`](#ida_bytes.get_bytes)(ea, size[, gmb_flags]) | Get the specified number of bytes of the program. | | [`get_bytes_and_mask`](#ida_bytes.get_bytes_and_mask)(ea, size[, gmb_flags]) | Get the specified number of bytes of the program, and a bitmask | | [`get_strlit_contents`](#ida_bytes.get_strlit_contents)(ea, len, type[, flags]) | Get contents of string literal, as UTF-8-encoded codepoints. | | [`set_operand_flag`](#ida_bytes.set_operand_flag)(→ PyObject \*) | Set operand n's type flag in the 64-bit flags set. | | [`print_strlit_type`](#ida_bytes.print_strlit_type)(→ PyObject \*) | Get string type information: the string type name (possibly decorated with hotkey markers), and the tooltip. | | [`op_stroff`](#ida_bytes.op_stroff)(→ bool) | Set operand representation to be 'struct offset'. | | [`get_stroff_path`](#ida_bytes.get_stroff_path)(\*args) | Get the structure offset path for operand n, at the | | [`register_custom_data_type`](#ida_bytes.register_custom_data_type)(dt) | Registers a custom data type. | | [`unregister_custom_data_type`](#ida_bytes.unregister_custom_data_type)(dtid) | Unregisters a custom data type. | | [`register_custom_data_format`](#ida_bytes.register_custom_data_format)(df) | Registers a custom data format with a given data type. | | [`unregister_custom_data_format`](#ida_bytes.unregister_custom_data_format)(dfid) | Unregisters a custom data format | | [`register_data_types_and_formats`](#ida_bytes.register_data_types_and_formats)(formats) | Registers multiple data types and formats at once. | | [`unregister_data_types_and_formats`](#ida_bytes.unregister_data_types_and_formats)(formats) | As opposed to register_data_types_and_formats(), this function | | [`find_bytes`](#ida_bytes.find_bytes)(→ int) | Search for bytes in the program. | | [`find_string`](#ida_bytes.find_string)(→ int) | Search for an occurrence of a string in the program. | ## Module Contents ### *class* ida_bytes.compiled_binpat_vec_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### push_back(\*args) → compiled_binpat_t & #### pop_back() → [None](https://docs.python.org/3/library/constants.html#None) #### size() → [int](https://docs.python.org/3/library/functions.html#int) #### empty() → [bool](https://docs.python.org/3/library/functions.html#bool) #### at(\_idx: [int](https://docs.python.org/3/library/functions.html#int)) → compiled_binpat_t const & #### qclear() → [None](https://docs.python.org/3/library/constants.html#None) #### clear() → [None](https://docs.python.org/3/library/constants.html#None) #### resize(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### grow(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### capacity() → [int](https://docs.python.org/3/library/functions.html#int) #### reserve(cnt: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### truncate() → [None](https://docs.python.org/3/library/constants.html#None) #### swap(r: [compiled_binpat_vec_t](#ida_bytes.compiled_binpat_vec_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extract() → compiled_binpat_t \* #### inject(s: [compiled_binpat_t](#ida_bytes.compiled_binpat_t), len: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### begin(\*args) → qvector< compiled_binpat_t >::const_iterator #### end(\*args) → qvector< compiled_binpat_t >::const_iterator #### insert(it: [compiled_binpat_t](#ida_bytes.compiled_binpat_t), x: [compiled_binpat_t](#ida_bytes.compiled_binpat_t)) → qvector< compiled_binpat_t >::iterator #### erase(\*args) → qvector< compiled_binpat_t >::iterator #### find(\*args) → qvector< compiled_binpat_t >::const_iterator #### has(x: [compiled_binpat_t](#ida_bytes.compiled_binpat_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### add_unique(x: [compiled_binpat_t](#ida_bytes.compiled_binpat_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### append(x: [compiled_binpat_t](#ida_bytes.compiled_binpat_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extend(x: [compiled_binpat_vec_t](#ida_bytes.compiled_binpat_vec_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### front #### back #### *static* parse(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), text: [str](https://docs.python.org/3/library/stdtypes.html#str), radix: [int](https://docs.python.org/3/library/functions.html#int) = -1, strlits_encoding: [int](https://docs.python.org/3/library/functions.html#int) = -1) → [compiled_binpat_vec_t](#ida_bytes.compiled_binpat_vec_t) Convert user-specified binary string to internal representation. The ‘in’ parameter contains space-separated tokens: > ``` > * > ``` > numbers (numeric base is determined by ‘radix’) > : - if value of number fits a byte, it is considered as a byte > - if value of number fits a word, it is considered as 2 bytes > - if value of number fits a dword,it is considered as 4 bytes > * “…” string constants > * ‘x’ single-character constants > * ? variable bytes Note that string constants are surrounded with double quotes. Here are a few examples (assuming base 16): > * CD 21 - bytes 0xCD, 0x21 > * 21CD - bytes 0xCD, 0x21 (little endian ) or 0x21, 0xCD (big-endian) > * “Hello”, 0 - the null terminated string “Hello” > * L”Hello” - ‘H’, 0, ‘e’, 0, ‘l’, 0, ‘l’, 0, ‘o’, 0 > * B8 ? ? ? ? 90 - byte 0xB8, 4 bytes with any value, byte 0x90 This method will throw an exception if the pattern could not be parsed * **Parameters:** * **ea** – linear address to convert for (the conversion depends on the address, because the number of bits in a byte depend on the segment type) * **text** – input text string * **radix** – numeric base of numbers (8,10,16). If -1 (the default), then the default radix will be used (see get_default_radix) * **strlits_encoding** – the target encoding into which the string literals present in ‘in’, should be encoded. Can be any from [1, get_encoding_qty()), or the special values PBSENC_\* * **Returns:** a set of patterns ### ida_bytes.enable_flags(start_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), end_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), stt: storage_type_t) → error_t Allocate flags for address range. This function does not change the storage type of existing ranges. Exit with an error message if not enough disk space. * **Parameters:** * **start_ea** – should be lower than end_ea. * **end_ea** – does not belong to the range. * **stt** – storage_type_t * **Returns:** 0 if ok, otherwise an error code ### ida_bytes.disable_flags(start_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), end_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → error_t Deallocate flags for address range. Exit with an error message if not enough disk space (this may occur too). * **Parameters:** * **start_ea** – should be lower than end_ea. * **end_ea** – does not belong to the range. * **Returns:** 0 if ok, otherwise return error code ### ida_bytes.change_storage_type(start_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), end_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), stt: storage_type_t) → error_t Change flag storage type for address range. * **Parameters:** * **start_ea** – should be lower than end_ea. * **end_ea** – does not belong to the range. * **stt** – storage_type_t * **Returns:** error code ### ida_bytes.next_addr(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) Get next address in the program (i.e. next address which has flags). * **Returns:** BADADDR if no such address exists. ### ida_bytes.prev_addr(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) Get previous address in the program. * **Returns:** BADADDR if no such address exists. ### ida_bytes.next_chunk(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) Get the first address of next contiguous chunk in the program. * **Returns:** BADADDR if next chunk does not exist. ### ida_bytes.prev_chunk(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) Get the last address of previous contiguous chunk in the program. * **Returns:** BADADDR if previous chunk does not exist. ### ida_bytes.chunk_start(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) Get start of the contiguous address block containing ‘ea’. * **Returns:** BADADDR if ‘ea’ does not belong to the program. ### ida_bytes.chunk_size(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → asize_t Get size of the contiguous address block containing ‘ea’. * **Returns:** 0 if ‘ea’ does not belong to the program. ### ida_bytes.find_free_chunk(start: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), size: asize_t, alignment: asize_t) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) Search for a hole in the addressing space of the program. * **Parameters:** * **start** – Address to start searching from * **size** – Size of the desired empty range * **alignment** – Alignment bitmask, must be a pow2-1. (for example, 0xF would align the returned range to 16 bytes). * **Returns:** Start of the found empty range or BADADDR ### ida_bytes.next_that(ea: ida_idaapi.ea_t, maxea: ida_idaapi.ea_t, testf: testf_t \*) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) Find next address with a flag satisfying the function ‘testf’. * **Parameters:** * **ea** – start searching at this address + 1 * **maxea** – not included in the search range. * **testf** – test function to find next address * **Returns:** the found address or BADADDR. ### ida_bytes.next_unknown(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), maxea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) Similar to next_that(), but will find the next address that is unexplored. ### ida_bytes.prev_that(ea: ida_idaapi.ea_t, minea: ida_idaapi.ea_t, testf: testf_t \*) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) Find previous address with a flag satisfying the function ‘testf’. * **Parameters:** * **ea** – start searching from this address - 1. * **minea** – included in the search range. * **testf** – test function to find previous address * **Returns:** the found address or BADADDR. ### ida_bytes.prev_unknown(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), minea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) Similar to prev_that(), but will find the previous address that is unexplored. ### ida_bytes.prev_head(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), minea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) Get start of previous defined item. * **Parameters:** * **ea** – begin search at this address * **minea** – included in the search range * **Returns:** BADADDR if none exists. ### ida_bytes.next_head(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), maxea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) Get start of next defined item. * **Parameters:** * **ea** – begin search at this address * **maxea** – not included in the search range * **Returns:** BADADDR if none exists. ### ida_bytes.prev_not_tail(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) Get address of previous non-tail byte. * **Returns:** BADADDR if none exists. ### ida_bytes.next_not_tail(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) Get address of next non-tail byte. * **Returns:** BADADDR if none exists. ### ida_bytes.prev_visea(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) Get previous visible address. * **Returns:** BADADDR if none exists. ### ida_bytes.next_visea(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) Get next visible address. * **Returns:** BADADDR if none exists. ### ida_bytes.get_item_head(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) Get the start address of the item at ‘ea’. If there is no current item, then ‘ea’ is returned (see definition at the end of bytes.hpp source) ### ida_bytes.get_item_end(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) Get the end address of the item at ‘ea’. The returned address does not belong to the current item. Unexplored bytes are counted as 1 byte entities. ### ida_bytes.calc_max_item_end(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), how: [int](https://docs.python.org/3/library/functions.html#int) = 15) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) Calculate maximal reasonable end address of a new item. This function will limit the item with the current segment bounds. * **Parameters:** * **ea** – linear address * **how** – when to stop the search. A combination of Item end search flags * **Returns:** end of new item. If it is not possible to create an item, it will return ‘ea’. If operation was cancelled by user, it will return ‘ea’ ### ida_bytes.ITEM_END_FIXUP stop at the first fixup ### ida_bytes.ITEM_END_INITED stop when initialization changes i.e. \* if is_loaded(ea): stop if uninitialized byte is encountered \* if !is_loaded(ea): stop if initialized byte is encountered ### ida_bytes.ITEM_END_NAME stop at the first named location ### ida_bytes.ITEM_END_XREF stop at the first referenced location ### ida_bytes.ITEM_END_CANCEL stop when operation cancelled, it is the responsibility of the caller to show the wait dialog ### ida_bytes.get_item_size(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → asize_t Get size of item (instruction/data) in bytes. Unexplored bytes have length of 1 byte. This function returns 0 only for BADADDR. ### ida_bytes.is_mapped(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Is the specified address ‘ea’ present in the program? ### ida_bytes.get_flags_ex(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), how: [int](https://docs.python.org/3/library/functions.html#int)) → flags64_t Get flags for the specified address, extended form. ### ida_bytes.GFE_VALUE get flags with FF_IVL & MS_VAL. It is much slower under remote debugging because the kernel needs to read the process memory. ### ida_bytes.GFE_IDB_VALUE get flags with FF_IVL & MS_VAL. but never use the debugger memory. ### ida_bytes.GFE_32BIT get only low 32 bits of flags ### ida_bytes.get_flags32(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → flags64_t Get only 32 low bits of flags. This function returns the most commonly used bits of the flags. However, it does not return the operand info for the operands beyond the first two operands (0,1). If you need to deal with the operands (2..n), then use get_flags(). It is customary to assign the return value to the variable named “F32”, to distinguish is from 64-bit flags. * **Returns:** 0 if address is not present in the program ### ida_bytes.get_flags(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → flags64_t Get flags value for address ‘ea’. The byte value is not included in the flags. This function should be used if the operand types of any operand beyond the first two operands is required. This function is more expensive to use than get_flags32() * **Returns:** 0 if address is not present in the program ### ida_bytes.get_full_flags(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → flags64_t Get full flags value for address ‘ea’. This function returns the byte value in the flags as well. See FF_IVL and MS_VAL. This function is more expensive to use than get_flags() * **Returns:** 0 if address is not present in the program ### ida_bytes.get_item_flag(\_from: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), n: [int](https://docs.python.org/3/library/functions.html#int), ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), appzero: [bool](https://docs.python.org/3/library/functions.html#bool)) → flags64_t Get flag of the item at ‘ea’ even if it is a tail byte of some array or structure. This function is used to get flags of structure members or array elements. * **Parameters:** * **n** – operand number which refers to ‘ea’ or OPND_ALL for one of the operands * **ea** – the referenced address * **appzero** – append a struct field name if the field offset is zero? meaningful only if the name refers to a structure. * **Returns:** flags or 0 (if failed) ### ida_bytes.get_item_refinfo(ri: [refinfo_t](../ida_nalt/index.md#ida_nalt.refinfo_t), ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), n: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) Get refinfo of the item at ‘ea’. This function works for a regular offset operand as well as for a tail byte of a structure variable (in this case refinfo to corresponding structure member is returned) * **Parameters:** * **ri** – refinfo holder * **ea** – the item address * **n** – operand number which refers to ‘ea’ or OPND_ALL for one of the operands * **Returns:** success ### ida_bytes.MS_VAL Mask for byte value. ### ida_bytes.FF_IVL Byte has value ? ### ida_bytes.has_value(F: flags64_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Do flags contain byte value? ### ida_bytes.del_value(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) Delete byte value from flags. The corresponding byte becomes uninitialized. ### ida_bytes.is_loaded(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Does the specified address have a byte value (is initialized?). ### ida_bytes.nbits(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [int](https://docs.python.org/3/library/functions.html#int) Get number of bits in a byte at the given address. * **Returns:** processor_t::dnbits() if the address does not belong to a segment, otherwise the result depends on the segment type ### ida_bytes.bytesize(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [int](https://docs.python.org/3/library/functions.html#int) Get number of bytes required to store a byte at the given address. ### ida_bytes.get_byte(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → uchar Get one byte (8-bit) of the program at ‘ea’. This function works only for 8-bit byte processors. ### ida_bytes.get_db_byte(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → uchar Get one byte (8-bit) of the program at ‘ea’ from the database. Works even if the debugger is active. See also get_dbg_byte() to read the process memory directly. This function works only for 8-bit byte processors. ### ida_bytes.get_word(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → ushort Get one word (16-bit) of the program at ‘ea’. This function takes into account order of bytes specified in idainfo::is_be() This function works only for 8-bit byte processors. ### ida_bytes.get_dword(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [int](https://docs.python.org/3/library/functions.html#int) Get one dword (32-bit) of the program at ‘ea’. This function takes into account order of bytes specified in idainfo::is_be() This function works only for 8-bit byte processors. ### ida_bytes.get_qword(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → uint64 Get one qword (64-bit) of the program at ‘ea’. This function takes into account order of bytes specified in idainfo::is_be() This function works only for 8-bit byte processors. ### ida_bytes.get_wide_byte(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → uint64 Get one wide byte of the program at ‘ea’. Some processors may access more than 8-bit quantity at an address. These processors have 32-bit byte organization from the IDA’s point of view. ### ida_bytes.get_wide_word(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → uint64 Get one wide word (2 ‘byte’) of the program at ‘ea’. Some processors may access more than 8-bit quantity at an address. These processors have 32-bit byte organization from the IDA’s point of view. This function takes into account order of bytes specified in idainfo::is_be() ### ida_bytes.get_wide_dword(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → uint64 Get two wide words (4 ‘bytes’) of the program at ‘ea’. Some processors may access more than 8-bit quantity at an address. These processors have 32-bit byte organization from the IDA’s point of view. This function takes into account order of bytes specified in idainfo::is_be() ### *class* ida_bytes.octet_generator_t(\_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### value *: uint64* #### ea *: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)* #### avail_bits *: [int](https://docs.python.org/3/library/functions.html#int)* #### high_byte_first *: [bool](https://docs.python.org/3/library/functions.html#bool)* #### invert_byte_order() → [None](https://docs.python.org/3/library/constants.html#None) ### ida_bytes.get_octet(ogen: [octet_generator_t](#ida_bytes.octet_generator_t)) → uchar \* ### ida_bytes.get_16bit(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [int](https://docs.python.org/3/library/functions.html#int) Get 16bits of the program at ‘ea’. * **Returns:** 1 byte (getFullByte()) if the current processor has 16-bit byte, otherwise return get_word() ### ida_bytes.get_32bit(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [int](https://docs.python.org/3/library/functions.html#int) Get not more than 32bits of the program at ‘ea’. * **Returns:** 32 bit value, depending on processor_t::nbits: * if ( nbits <= 8 ) return get_dword(ea); * if ( nbits <= 16) return get_wide_word(ea); * return get_wide_byte(ea); ### ida_bytes.get_64bit(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → uint64 Get not more than 64bits of the program at ‘ea’. * **Returns:** 64 bit value, depending on processor_t::nbits: * if ( nbits <= 8 ) return get_qword(ea); * if ( nbits <= 16) return get_wide_dword(ea); * return get_wide_byte(ea); ### ida_bytes.get_data_value(v: uval_t \*, ea: ida_idaapi.ea_t, size: asize_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Get the value at of the item at ‘ea’. This function works with entities up to sizeof(ea_t) (bytes, word, etc) * **Parameters:** * **v** – pointer to the result. may be nullptr * **ea** – linear address * **size** – size of data to read. If 0, then the item type at ‘ea’ will be used * **Returns:** success ### ida_bytes.get_original_byte(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → uint64 Get original byte value (that was before patching). This function works for wide byte processors too. ### ida_bytes.get_original_word(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → uint64 Get original word value (that was before patching). This function works for wide byte processors too. This function takes into account order of bytes specified in idainfo::is_be() ### ida_bytes.get_original_dword(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → uint64 Get original dword (that was before patching) This function works for wide byte processors too. This function takes into account order of bytes specified in idainfo::is_be() ### ida_bytes.get_original_qword(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → uint64 Get original qword value (that was before patching) This function DOESN’T work for wide byte processors too. This function takes into account order of bytes specified in idainfo::is_be() ### ida_bytes.put_byte(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), x: uint64) → [bool](https://docs.python.org/3/library/functions.html#bool) Set value of one byte of the program. This function modifies the database. If the debugger is active then the debugged process memory is patched too. * **Parameters:** * **ea** – linear address * **x** – byte value * **Returns:** true if the database has been modified ### ida_bytes.put_word(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), x: uint64) → [None](https://docs.python.org/3/library/constants.html#None) Set value of one word of the program. This function takes into account order of bytes specified in idainfo::is_be() This function works for wide byte processors too. ### ida_bytes.put_dword(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), x: uint64) → [None](https://docs.python.org/3/library/constants.html#None) Set value of one dword of the program. This function takes into account order of bytes specified in idainfo::is_be() This function works for wide byte processors too. * **Parameters:** * **ea** – linear address * **x** – dword value ### ida_bytes.put_qword(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), x: uint64) → [None](https://docs.python.org/3/library/constants.html#None) Set value of one qword (8 bytes) of the program. This function takes into account order of bytes specified in idainfo::is_be() This function DOESN’T works for wide byte processors. * **Parameters:** * **ea** – linear address * **x** – qword value ### ida_bytes.patch_byte(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), x: uint64) → [bool](https://docs.python.org/3/library/functions.html#bool) Patch a byte of the program. The original value of the byte is saved and can be obtained by get_original_byte(). This function works for wide byte processors too. * **Returns:** true: the database has been modified, * **Returns:** false: the debugger is running and the process’ memory has value ‘x’ at address ‘ea’, or the debugger is not running, and the IDB has value ‘x’ at address ‘ea already. ### ida_bytes.patch_word(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), x: uint64) → [bool](https://docs.python.org/3/library/functions.html#bool) Patch a word of the program. The original value of the word is saved and can be obtained by get_original_word(). This function works for wide byte processors too. This function takes into account order of bytes specified in idainfo::is_be() * **Returns:** true: the database has been modified, * **Returns:** false: the debugger is running and the process’ memory has value ‘x’ at address ‘ea’, or the debugger is not running, and the IDB has value ‘x’ at address ‘ea already. ### ida_bytes.patch_dword(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), x: uint64) → [bool](https://docs.python.org/3/library/functions.html#bool) Patch a dword of the program. The original value of the dword is saved and can be obtained by get_original_dword(). This function DOESN’T work for wide byte processors. This function takes into account order of bytes specified in idainfo::is_be() * **Returns:** true: the database has been modified, * **Returns:** false: the debugger is running and the process’ memory has value ‘x’ at address ‘ea’, or the debugger is not running, and the IDB has value ‘x’ at address ‘ea already. ### ida_bytes.patch_qword(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), x: uint64) → [bool](https://docs.python.org/3/library/functions.html#bool) Patch a qword of the program. The original value of the qword is saved and can be obtained by get_original_qword(). This function DOESN’T work for wide byte processors. This function takes into account order of bytes specified in idainfo::is_be() * **Returns:** true: the database has been modified, * **Returns:** false: the debugger is running and the process’ memory has value ‘x’ at address ‘ea’, or the debugger is not running, and the IDB has value ‘x’ at address ‘ea already. ### ida_bytes.revert_byte(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Revert patched byte * **Returns:** true: byte was patched before and reverted now ### ida_bytes.add_byte(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), value: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) Add a value to one byte of the program. This function works for wide byte processors too. * **Parameters:** * **ea** – linear address * **value** – byte value ### ida_bytes.add_word(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), value: uint64) → [None](https://docs.python.org/3/library/constants.html#None) Add a value to one word of the program. This function works for wide byte processors too. This function takes into account order of bytes specified in idainfo::is_be() * **Parameters:** * **ea** – linear address * **value** – byte value ### ida_bytes.add_dword(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), value: uint64) → [None](https://docs.python.org/3/library/constants.html#None) Add a value to one dword of the program. This function works for wide byte processors too. This function takes into account order of bytes specified in idainfo::is_be() * **Parameters:** * **ea** – linear address * **value** – byte value ### ida_bytes.add_qword(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), value: uint64) → [None](https://docs.python.org/3/library/constants.html#None) Add a value to one qword of the program. This function does not work for wide byte processors. This function takes into account order of bytes specified in idainfo::is_be() * **Parameters:** * **ea** – linear address * **value** – byte value ### ida_bytes.get_zero_ranges(zranges: [rangeset_t](../ida_range/index.md#ida_range.rangeset_t), range: [range_t](../ida_range/index.md#ida_range.range_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Return set of ranges with zero initialized bytes. The returned set includes only big zero initialized ranges (at least >1KB). Some zero initialized byte ranges may be not included. Only zero bytes that use the sparse storage method (STT_MM) are reported. * **Parameters:** * **zranges** – pointer to the return value. cannot be nullptr * **range** – the range of addresses to verify. can be nullptr - means all ranges * **Returns:** true if the result is a non-empty set ### ida_bytes.GMB_READALL try to read all bytes; if this bit is not set, fail at first uninited byte ### ida_bytes.GMB_WAITBOX show wait box (may return -1 in this case) ### ida_bytes.put_bytes(ea: ida_idaapi.ea_t, buf: void const \*) → [None](https://docs.python.org/3/library/constants.html#None) Modify the specified number of bytes of the program. This function does not save the original values of bytes. See also patch_bytes(). * **Parameters:** * **ea** – linear address * **buf** – buffer with new values of bytes ### ida_bytes.patch_bytes(ea: ida_idaapi.ea_t, buf: void const \*) → [None](https://docs.python.org/3/library/constants.html#None) Patch the specified number of bytes of the program. Original values of bytes are saved and are available with get_original…() functions. See also put_bytes(). * **Parameters:** * **ea** – linear address * **buf** – buffer with new values of bytes ### ida_bytes.MS_CLS Mask for typing. ### ida_bytes.FF_CODE Code ? ### ida_bytes.FF_DATA Data ? ### ida_bytes.FF_TAIL Tail ? ### ida_bytes.FF_UNK Unknown ? ### ida_bytes.is_code(F: flags64_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Does flag denote start of an instruction? ### ida_bytes.is_code_ea(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_bytes.f_is_code(F: flags64_t, arg2: void \*) → [bool](https://docs.python.org/3/library/functions.html#bool) Does flag denote start of an instruction? ### ida_bytes.is_data(F: flags64_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Does flag denote start of data? ### ida_bytes.is_data_ea(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_bytes.f_is_data(F: flags64_t, arg2: void \*) → [bool](https://docs.python.org/3/library/functions.html#bool) Does flag denote start of data? ### ida_bytes.is_tail(F: flags64_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Does flag denote tail byte? ### ida_bytes.is_tail_ea(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_bytes.f_is_tail(F: flags64_t, arg2: void \*) → [bool](https://docs.python.org/3/library/functions.html#bool) Does flag denote tail byte? ### ida_bytes.is_not_tail(F: flags64_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Does flag denote tail byte? ### ida_bytes.f_is_not_tail(F: flags64_t, arg2: void \*) → [bool](https://docs.python.org/3/library/functions.html#bool) Does flag denote tail byte? ### ida_bytes.is_unknown(F: flags64_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Does flag denote unexplored byte? ### ida_bytes.is_unknown_ea(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_bytes.is_head(F: flags64_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Does flag denote start of instruction OR data? ### ida_bytes.is_head_ea(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_bytes.f_is_head(F: flags64_t, arg2: void \*) → [bool](https://docs.python.org/3/library/functions.html#bool) Does flag denote start of instruction OR data? ### ida_bytes.del_items(ea: ida_idaapi.ea_t, flags: int = 0, nbytes: asize_t = 1, may_destroy: may_destroy_cb_t \* = None) → [bool](https://docs.python.org/3/library/functions.html#bool) Convert item (instruction/data) to unexplored bytes. The whole item (including the head and tail bytes) will be destroyed. It is allowed to pass any address in the item to this function * **Parameters:** * **ea** – any address within the first item to delete * **flags** – combination of Unexplored byte conversion flags * **nbytes** – number of bytes in the range to be undefined * **may_destroy** – optional routine invoked before deleting a head item. If callback returns false then item is not to be deleted and operation fails * **Returns:** true on successful operation, otherwise false ### ida_bytes.DELIT_SIMPLE simply undefine the specified item(s) ### ida_bytes.DELIT_EXPAND propagate undefined items; for example if removing an instruction removes all references to the next instruction, then plan to convert to unexplored the next instruction too. ### ida_bytes.DELIT_DELNAMES delete any names at the specified address range (except for the starting address). this bit is valid if nbytes > 1 ### ida_bytes.DELIT_NOTRUNC don’t truncate the current function even if AF_TRFUNC is set ### ida_bytes.DELIT_NOUNAME reject to delete if a user name is in address range (except for the starting address). this bit is valid if nbytes > 1 ### ida_bytes.DELIT_NOCMT reject to delete if a comment is in address range (except for the starting address). this bit is valid if nbytes > 1 ### ida_bytes.DELIT_KEEPFUNC do not undefine the function start. Just delete xrefs, ops e.t.c. ### ida_bytes.is_manual_insn(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Is the instruction overridden? * **Parameters:** **ea** – linear address of the instruction or data item ### ida_bytes.get_manual_insn(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None) Retrieve the user-specified string for the manual instruction. * **Parameters:** **ea** – linear address of the instruction or data item * **Returns:** size of manual instruction or -1 ### ida_bytes.set_manual_insn(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), manual_insn: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [None](https://docs.python.org/3/library/constants.html#None) Set manual instruction string. * **Parameters:** * **ea** – linear address of the instruction or data item * **manual_insn** – “” - delete manual string. nullptr - do nothing ### ida_bytes.MS_COMM Mask of common bits. ### ida_bytes.FF_COMM Has comment? ### ida_bytes.FF_REF has references ### ida_bytes.FF_LINE Has next or prev lines? ### ida_bytes.FF_NAME Has name? ### ida_bytes.FF_LABL Has dummy name? ### ida_bytes.FF_FLOW Exec flow from prev instruction. ### ida_bytes.FF_SIGN Inverted sign of operands. ### ida_bytes.FF_BNOT Bitwise negation of operands. ### ida_bytes.FF_UNUSED unused bit (was used for variable bytes) ### ida_bytes.is_flow(F: flags64_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Does the previous instruction exist and pass execution flow to the current byte? ### ida_bytes.is_flow_ea(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_bytes.has_extra_cmts(F: flags64_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Does the current byte have additional anterior or posterior lines? ### ida_bytes.f_has_extra_cmts(f: flags64_t, arg2: void \*) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_bytes.has_cmt(F: flags64_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Does the current byte have an indented comment? ### ida_bytes.f_has_cmt(f: flags64_t, arg2: void \*) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_bytes.has_xref(F: flags64_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Does the current byte have cross-references to it? ### ida_bytes.f_has_xref(f: flags64_t, arg2: void \*) → [bool](https://docs.python.org/3/library/functions.html#bool) Does the current byte have cross-references to it? ### ida_bytes.has_name(F: flags64_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Does the current byte have non-trivial (non-dummy) name? ### ida_bytes.f_has_name(f: flags64_t, arg2: void \*) → [bool](https://docs.python.org/3/library/functions.html#bool) Does the current byte have non-trivial (non-dummy) name? ### ida_bytes.FF_ANYNAME Has name or dummy name? ### ida_bytes.has_dummy_name(F: flags64_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Does the current byte have dummy (auto-generated, with special prefix) name? ### ida_bytes.f_has_dummy_name(f: flags64_t, arg2: void \*) → [bool](https://docs.python.org/3/library/functions.html#bool) Does the current byte have dummy (auto-generated, with special prefix) name? ### ida_bytes.has_auto_name(F: flags64_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Does the current byte have auto-generated (no special prefix) name? ### ida_bytes.has_any_name(F: flags64_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Does the current byte have any name? ### ida_bytes.has_user_name(F: flags64_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Does the current byte have user-specified name? ### ida_bytes.f_has_user_name(F: flags64_t, arg2: void \*) → [bool](https://docs.python.org/3/library/functions.html#bool) Does the current byte have user-specified name? ### ida_bytes.is_invsign(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), F: flags64_t, n: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) Should the sign of n-th operand be inverted during output? allowed values of n: 0-first operand, 1-other operands ### ida_bytes.toggle_sign(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), n: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) Toggle sign of n-th operand. allowed values of n: 0-first operand, 1-other operands ### ida_bytes.is_bnot(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), F: flags64_t, n: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) Should we negate the operand? asm_t::a_bnot should be defined in the idp module in order to work with this function ### ida_bytes.toggle_bnot(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), n: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) Toggle binary negation of operand. also see is_bnot(). ### ida_bytes.is_lzero(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), n: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) Display leading zeros? Display leading zeros in operands. The global switch for the leading zeros is in idainfo::s_genflags Note: the leading zeros does not work if for the target assembler octal numbers start with 0. * **Parameters:** * **ea** – the item (insn/data) address * **n** – the operand number (0-first operand, 1-other operands) * **Returns:** success ### ida_bytes.set_lzero(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), n: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) Set toggle lzero bit. This function changes the display of leading zeros for the specified operand. If the default is not to display leading zeros, this function will display them and vice versa. * **Parameters:** * **ea** – the item (insn/data) address * **n** – the operand number (0-first operand, 1-other operands) * **Returns:** success ### ida_bytes.clr_lzero(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), n: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) Clear toggle lzero bit. This function reset the display of leading zeros for the specified operand to the default. If the default is not to display leading zeros, leading zeros will not be displayed, as vice versa. * **Parameters:** * **ea** – the item (insn/data) address * **n** – the operand number (0-first operand, 1-other operands) * **Returns:** success ### ida_bytes.toggle_lzero(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), n: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) Toggle lzero bit. * **Parameters:** * **ea** – the item (insn/data) address * **n** – the operand number (0-first operand, 1-other operands) * **Returns:** success ### ida_bytes.leading_zero_important(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), n: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) Check if leading zeros are important. ### ida_bytes.MS_N_TYPE Mask for nth arg (a 64-bit constant). ### ida_bytes.FF_N_VOID Void (unknown)? ### ida_bytes.FF_N_NUMH Hexadecimal number? ### ida_bytes.FF_N_NUMD Decimal number? ### ida_bytes.FF_N_CHAR Char (‘x’)? ### ida_bytes.FF_N_SEG Segment? ### ida_bytes.FF_N_OFF Offset? ### ida_bytes.FF_N_NUMB Binary number? ### ida_bytes.FF_N_NUMO Octal number? ### ida_bytes.FF_N_ENUM Enumeration? ### ida_bytes.FF_N_FOP Forced operand? ### ida_bytes.FF_N_STRO Struct offset? ### ida_bytes.FF_N_STK Stack variable? ### ida_bytes.FF_N_FLT Floating point number? ### ida_bytes.FF_N_CUST Custom representation? ### ida_bytes.get_operand_type_shift(n: [int](https://docs.python.org/3/library/functions.html#int)) → [int](https://docs.python.org/3/library/functions.html#int) Get the shift in flags64_t for the nibble representing operand n’s type Note: n must be < UA_MAXOP, and is not checked * **Parameters:** **n** – the operand number * **Returns:** the shift to the nibble ### ida_bytes.get_operand_flag(typebits: uint8, n: [int](https://docs.python.org/3/library/functions.html#int)) → flags64_t Place operand n’s type flag in the right nibble of a 64-bit flags set. * **Parameters:** * **typebits** – the type bits (one of FF_N_) * **n** – the operand number * **Returns:** the shift to the nibble ### ida_bytes.get_optype_flags(F: flags64_t, n: [int](https://docs.python.org/3/library/functions.html#int)) → uint8 Extract operand n’s type bits from a 64-bit flags set. This is the reverse of get_operand_flag(): it extracts the type nibble from flags and returns it as a value suitable for comparison with FF_N_ constants. * **Parameters:** * **F** – the flags * **n** – the operand number * **Returns:** the type bits (one of FF_N_), or 0 if n is out of range ### ida_bytes.is_flag_for_operand(F: flags64_t, typebits: uint8, n: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) Check that the 64-bit flags set has the expected type for operand n. * **Parameters:** * **F** – the flags * **typebits** – the type bits (one of FF_N_) * **n** – the operand number * **Returns:** success ### ida_bytes.is_defarg0(F: flags64_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Is the first operand defined? Initially operand has no defined representation. ### ida_bytes.is_defarg1(F: flags64_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Is the second operand defined? Initially operand has no defined representation. ### ida_bytes.is_off0(F: flags64_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Is the first operand offset? (example: push offset xxx). ### ida_bytes.is_off1(F: flags64_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Is the second operand offset? (example: mov ax, offset xxx). ### ida_bytes.is_char0(F: flags64_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Is the first operand character constant? (example: push ‘a’). ### ida_bytes.is_char1(F: flags64_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Is the second operand character constant? (example: mov al, ‘a’). ### ida_bytes.is_seg0(F: flags64_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Is the first operand segment selector? (example: push seg seg001). ### ida_bytes.is_seg1(F: flags64_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Is the second operand segment selector? (example: mov dx, seg dseg). ### ida_bytes.is_enum0(F: flags64_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Is the first operand a symbolic constant (enum member)? ### ida_bytes.is_enum1(F: flags64_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Is the second operand a symbolic constant (enum member)? ### ida_bytes.is_stroff0(F: flags64_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Is the first operand an offset within a struct? ### ida_bytes.is_stroff1(F: flags64_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Is the second operand an offset within a struct? ### ida_bytes.is_stkvar0(F: flags64_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Is the first operand a stack variable? ### ida_bytes.is_stkvar1(F: flags64_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Is the second operand a stack variable? ### ida_bytes.is_float0(F: flags64_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Is the first operand a floating point number? ### ida_bytes.is_float1(F: flags64_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Is the second operand a floating point number? ### ida_bytes.is_custfmt0(F: flags64_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Does the first operand use a custom data representation? ### ida_bytes.is_custfmt1(F: flags64_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Does the second operand use a custom data representation? ### ida_bytes.is_numop0(F: flags64_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Is the first operand a number (i.e. binary, octal, decimal or hex?). ### ida_bytes.is_numop1(F: flags64_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Is the second operand a number (i.e. binary, octal, decimal or hex?). ### ida_bytes.get_optype_flags0(F: flags64_t) → flags64_t Get flags for first operand. ### ida_bytes.get_optype_flags1(F: flags64_t) → flags64_t Get flags for second operand. ### ida_bytes.OPND_OUTER outer offset base (combined with operand number). used only in set, get, del_offset() functions ### ida_bytes.OPND_MASK mask for operand number ### ida_bytes.OPND_ALL all operands ### ida_bytes.is_defarg(F: flags64_t, n: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) is defined? ### ida_bytes.is_off(F: flags64_t, n: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) is offset? ### ida_bytes.is_char(F: flags64_t, n: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) is character constant? ### ida_bytes.is_seg(F: flags64_t, n: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) is segment? ### ida_bytes.is_enum(F: flags64_t, n: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) is enum? ### ida_bytes.is_manual(F: flags64_t, n: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) is forced operand? (use is_forced_operand()) ### ida_bytes.is_stroff(F: flags64_t, n: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) is struct offset? ### ida_bytes.is_stkvar(F: flags64_t, n: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) is stack variable? ### ida_bytes.is_fltnum(F: flags64_t, n: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) is floating point number? ### ida_bytes.is_custfmt(F: flags64_t, n: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) is custom data format? ### ida_bytes.is_numop(F: flags64_t, n: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) is number (bin, oct, dec, hex)? ### ida_bytes.is_suspop(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), F: flags64_t, n: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) is suspicious operand? ### ida_bytes.op_adds_xrefs(F: flags64_t, n: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) Should processor module create xrefs from the operand? Currently ‘offset’, ‘structure offset’, ‘stack’ and ‘enum’ operands create xrefs ### ida_bytes.set_op_type(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), type: flags64_t, n: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) (internal function) change representation of operand(s). * **Parameters:** * **ea** – linear address * **type** – new flag value (should be obtained from char_flag(), num_flag() and similar functions) * **n** – 0..#UA_MAXOP-1 operand number, OPND_ALL all operands * **Returns:** 1: ok * **Returns:** 0: failed (applied to a tail byte) ### ida_bytes.op_seg(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), n: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) Set operand representation to be ‘segment’. If applied to unexplored bytes, converts them to 16-/32-bit word data * **Parameters:** * **ea** – linear address * **n** – 0..#UA_MAXOP-1 operand number, OPND_ALL all operands * **Returns:** success ### ida_bytes.op_enum(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), n: [int](https://docs.python.org/3/library/functions.html#int), id: tid_t, serial: uchar = 0) → [bool](https://docs.python.org/3/library/functions.html#bool) Set operand representation to be enum type If applied to unexplored bytes, converts them to 16-/32-bit word data * **Parameters:** * **ea** – linear address * **n** – 0..#UA_MAXOP-1 operand number, OPND_ALL all operands * **id** – id of enum * **serial** – the serial number of the constant in the enumeration, usually 0. the serial numbers are used if the enumeration contains several constants with the same value * **Returns:** success ### ida_bytes.get_enum_id(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), n: [int](https://docs.python.org/3/library/functions.html#int)) → uchar \* Get enum id of ‘enum’ operand. * **Parameters:** * **ea** – linear address * **n** – 0..#UA_MAXOP-1 operand number, OPND_ALL one of the operands * **Returns:** id of enum or BADNODE ### ida_bytes.op_based_stroff(insn: insn_t const &, n: int, opval: adiff_t, base: ida_idaapi.ea_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Set operand representation to be ‘struct offset’ if the operand likely points to a structure member. For example, let’s there is a structure at 1000 1000 stru_1000 Elf32_Sym <…> the operand #8 will be represented as ‘#Elf32_Sym.st_size’ after the call of ‘op_based_stroff(…, 8, 0x1000)’ By the way, after the call of ‘op_plain_offset(…, 0x1000)’ it will be represented as ‘#(stru_1000.st_size - 0x1000)’ * **Parameters:** * **insn** – the instruction * **n** – 0..#UA_MAXOP-1 operand number, OPND_ALL all operands * **opval** – operand value (usually op_t::value or op_t::addr) * **base** – base reference * **Returns:** success ### ida_bytes.op_stkvar(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), n: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) Set operand representation to be ‘stack variable’. Should be applied to an instruction within a function. Should be applied after creating a stack var using insn_t::create_stkvar(). * **Parameters:** * **ea** – linear address * **n** – 0..#UA_MAXOP-1 operand number, OPND_ALL all operands * **Returns:** success ### ida_bytes.set_forced_operand(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), n: [int](https://docs.python.org/3/library/functions.html#int), op: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [bool](https://docs.python.org/3/library/functions.html#bool) Set forced operand. * **Parameters:** * **ea** – linear address * **n** – 0..#UA_MAXOP-1 operand number * **op** – text of operand * nullptr: do nothing (return 0) * “” : delete forced operand * **Returns:** success ### ida_bytes.get_forced_operand(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), n: [int](https://docs.python.org/3/library/functions.html#int)) → [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None) Get forced operand. * **Parameters:** * **ea** – linear address * **n** – 0..#UA_MAXOP-1 operand number * **Returns:** size of the forced operand or -1 ### ida_bytes.is_forced_operand(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), n: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) Is operand manually defined? * **Parameters:** * **ea** – linear address * **n** – 0..#UA_MAXOP-1 operand number ### ida_bytes.combine_flags(F: flags64_t) → flags64_t ### ida_bytes.char_flag() → flags64_t see FF_opbits ### ida_bytes.off_flag() → flags64_t see FF_opbits ### ida_bytes.enum_flag() → flags64_t see FF_opbits ### ida_bytes.stroff_flag() → flags64_t see FF_opbits ### ida_bytes.stkvar_flag() → flags64_t see FF_opbits ### ida_bytes.flt_flag() → flags64_t see FF_opbits ### ida_bytes.custfmt_flag() → flags64_t see FF_opbits ### ida_bytes.seg_flag() → flags64_t see FF_opbits ### ida_bytes.num_flag() → flags64_t Get number of default base (bin, oct, dec, hex) ### ida_bytes.hex_flag() → flags64_t Get number flag of the base, regardless of current processor - better to use num_flag(). ### ida_bytes.dec_flag() → flags64_t Get number flag of the base, regardless of current processor - better to use num_flag(). ### ida_bytes.oct_flag() → flags64_t Get number flag of the base, regardless of current processor - better to use num_flag(). ### ida_bytes.bin_flag() → flags64_t Get number flag of the base, regardless of current processor - better to use num_flag(). ### ida_bytes.op_chr(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), n: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) set op type to char_flag() ### ida_bytes.op_num(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), n: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) set op type to num_flag() ### ida_bytes.op_hex(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), n: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) set op type to hex_flag() ### ida_bytes.op_dec(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), n: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) set op type to dec_flag() ### ida_bytes.op_oct(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), n: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) set op type to oct_flag() ### ida_bytes.op_bin(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), n: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) set op type to bin_flag() ### ida_bytes.op_flt(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), n: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) set op type to flt_flag() ### ida_bytes.op_custfmt(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), n: [int](https://docs.python.org/3/library/functions.html#int), fid: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) Set custom data format for operand (fid-custom data format id). ### ida_bytes.clr_op_type(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), n: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) Remove operand representation information. (set operand representation to be ‘undefined’) * **Parameters:** * **ea** – linear address * **n** – 0..#UA_MAXOP-1 operand number, OPND_ALL all operands * **Returns:** success ### ida_bytes.get_default_radix() → [int](https://docs.python.org/3/library/functions.html#int) Get default base of number for the current processor. * **Returns:** 2, 8, 10, 16 ### ida_bytes.get_radix(F: flags64_t, n: [int](https://docs.python.org/3/library/functions.html#int)) → [int](https://docs.python.org/3/library/functions.html#int) Get radix of the operand, in: flags. If the operand is not a number, returns get_default_radix() * **Parameters:** * **F** – flags * **n** – number of operand (0, 1, -1) * **Returns:** 2, 8, 10, 16 ### ida_bytes.DT_TYPE Mask for DATA typing. ### ida_bytes.FF_BYTE byte ### ida_bytes.FF_WORD word ### ida_bytes.FF_DWORD double word ### ida_bytes.FF_QWORD quadro word ### ida_bytes.FF_TBYTE tbyte ### ida_bytes.FF_STRLIT string literal ### ida_bytes.FF_STRUCT struct variable ### ida_bytes.FF_OWORD octaword/xmm word (16 bytes/128 bits) ### ida_bytes.FF_FLOAT float ### ida_bytes.FF_DOUBLE double ### ida_bytes.FF_PACKREAL packed decimal real ### ida_bytes.FF_ALIGN alignment directive ### ida_bytes.FF_CUSTOM custom data type ### ida_bytes.FF_YWORD ymm word (32 bytes/256 bits) ### ida_bytes.FF_ZWORD zmm word (64 bytes/512 bits) ### ida_bytes.code_flag() → flags64_t FF_CODE ### ida_bytes.byte_flag() → flags64_t Get a flags64_t representing a byte. ### ida_bytes.word_flag() → flags64_t Get a flags64_t representing a word. ### ida_bytes.dword_flag() → flags64_t Get a flags64_t representing a double word. ### ida_bytes.qword_flag() → flags64_t Get a flags64_t representing a quad word. ### ida_bytes.oword_flag() → flags64_t Get a flags64_t representing a octaword. ### ida_bytes.yword_flag() → flags64_t Get a flags64_t representing a ymm word. ### ida_bytes.zword_flag() → flags64_t Get a flags64_t representing a zmm word. ### ida_bytes.tbyte_flag() → flags64_t Get a flags64_t representing a tbyte. ### ida_bytes.strlit_flag() → flags64_t Get a flags64_t representing a string literal. ### ida_bytes.stru_flag() → flags64_t Get a flags64_t representing a struct. ### ida_bytes.cust_flag() → flags64_t Get a flags64_t representing custom type data. ### ida_bytes.align_flag() → flags64_t Get a flags64_t representing an alignment directive. ### ida_bytes.float_flag() → flags64_t Get a flags64_t representing a float. ### ida_bytes.double_flag() → flags64_t Get a flags64_t representing a double. ### ida_bytes.packreal_flag() → flags64_t Get a flags64_t representing a packed decimal real. ### ida_bytes.is_byte(F: flags64_t) → [bool](https://docs.python.org/3/library/functions.html#bool) FF_BYTE ### ida_bytes.is_word(F: flags64_t) → [bool](https://docs.python.org/3/library/functions.html#bool) FF_WORD ### ida_bytes.is_dword(F: flags64_t) → [bool](https://docs.python.org/3/library/functions.html#bool) FF_DWORD ### ida_bytes.is_qword(F: flags64_t) → [bool](https://docs.python.org/3/library/functions.html#bool) FF_QWORD ### ida_bytes.is_oword(F: flags64_t) → [bool](https://docs.python.org/3/library/functions.html#bool) FF_OWORD ### ida_bytes.is_yword(F: flags64_t) → [bool](https://docs.python.org/3/library/functions.html#bool) FF_YWORD ### ida_bytes.is_zword(F: flags64_t) → [bool](https://docs.python.org/3/library/functions.html#bool) FF_ZWORD ### ida_bytes.is_tbyte(F: flags64_t) → [bool](https://docs.python.org/3/library/functions.html#bool) FF_TBYTE ### ida_bytes.is_float(F: flags64_t) → [bool](https://docs.python.org/3/library/functions.html#bool) FF_FLOAT ### ida_bytes.is_double(F: flags64_t) → [bool](https://docs.python.org/3/library/functions.html#bool) FF_DOUBLE ### ida_bytes.is_pack_real(F: flags64_t) → [bool](https://docs.python.org/3/library/functions.html#bool) FF_PACKREAL ### ida_bytes.is_strlit(F: flags64_t) → [bool](https://docs.python.org/3/library/functions.html#bool) FF_STRLIT ### ida_bytes.is_struct(F: flags64_t) → [bool](https://docs.python.org/3/library/functions.html#bool) FF_STRUCT ### ida_bytes.is_align(F: flags64_t) → [bool](https://docs.python.org/3/library/functions.html#bool) FF_ALIGN ### ida_bytes.is_custom(F: flags64_t) → [bool](https://docs.python.org/3/library/functions.html#bool) FF_CUSTOM ### ida_bytes.is_byte_ea(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_bytes.is_word_ea(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_bytes.is_dword_ea(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_bytes.is_qword_ea(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_bytes.is_oword_ea(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_bytes.is_yword_ea(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_bytes.is_zword_ea(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_bytes.is_tbyte_ea(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_bytes.is_float_ea(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_bytes.is_double_ea(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_bytes.is_pack_real_ea(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_bytes.is_strlit_ea(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_bytes.is_struct_ea(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_bytes.is_align_ea(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_bytes.is_custom_ea(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_bytes.f_is_byte(F: flags64_t, arg2: void \*) → [bool](https://docs.python.org/3/library/functions.html#bool) See is_byte(). ### ida_bytes.f_is_word(F: flags64_t, arg2: void \*) → [bool](https://docs.python.org/3/library/functions.html#bool) See is_word(). ### ida_bytes.f_is_dword(F: flags64_t, arg2: void \*) → [bool](https://docs.python.org/3/library/functions.html#bool) See is_dword(). ### ida_bytes.f_is_qword(F: flags64_t, arg2: void \*) → [bool](https://docs.python.org/3/library/functions.html#bool) See is_qword(). ### ida_bytes.f_is_oword(F: flags64_t, arg2: void \*) → [bool](https://docs.python.org/3/library/functions.html#bool) See is_oword(). ### ida_bytes.f_is_yword(F: flags64_t, arg2: void \*) → [bool](https://docs.python.org/3/library/functions.html#bool) See is_yword(). ### ida_bytes.f_is_tbyte(F: flags64_t, arg2: void \*) → [bool](https://docs.python.org/3/library/functions.html#bool) See is_tbyte(). ### ida_bytes.f_is_float(F: flags64_t, arg2: void \*) → [bool](https://docs.python.org/3/library/functions.html#bool) See is_float(). ### ida_bytes.f_is_double(F: flags64_t, arg2: void \*) → [bool](https://docs.python.org/3/library/functions.html#bool) See is_double(). ### ida_bytes.f_is_pack_real(F: flags64_t, arg2: void \*) → [bool](https://docs.python.org/3/library/functions.html#bool) See is_pack_real(). ### ida_bytes.f_is_strlit(F: flags64_t, arg2: void \*) → [bool](https://docs.python.org/3/library/functions.html#bool) See is_strlit(). ### ida_bytes.f_is_struct(F: flags64_t, arg2: void \*) → [bool](https://docs.python.org/3/library/functions.html#bool) See is_struct(). ### ida_bytes.f_is_align(F: flags64_t, arg2: void \*) → [bool](https://docs.python.org/3/library/functions.html#bool) See is_align(). ### ida_bytes.f_is_custom(F: flags64_t, arg2: void \*) → [bool](https://docs.python.org/3/library/functions.html#bool) See is_custom(). ### ida_bytes.is_same_data_type(F1: flags64_t, F2: flags64_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Do the given flags specify the same data type? ### ida_bytes.get_flags_by_size(size: [int](https://docs.python.org/3/library/functions.html#int)) → flags64_t Get flags from size (in bytes). Supported sizes: 1, 2, 4, 8, 16, 32. For other sizes, returns 0 ### ida_bytes.create_data(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), dataflag: flags64_t, size: asize_t, tid: tid_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Convert to data (byte, word, dword, etc). This function may be used to create arrays. * **Parameters:** * **ea** – linear address * **dataflag** – type of data. Value of function byte_flag(), word_flag(), etc. * **size** – size of array in bytes. should be divisible by the size of one item of the specified type. for variable sized items it can be specified as 0, and the kernel will try to calculate the size. * **tid** – type id. If the specified type is a structure, then tid is structure id. Otherwise should be BADNODE. * **Returns:** success ### ida_bytes.calc_dflags(f: flags64_t, force: [bool](https://docs.python.org/3/library/functions.html#bool)) → flags64_t ### ida_bytes.create_byte(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), length: asize_t, force: [bool](https://docs.python.org/3/library/functions.html#bool) = False) → [bool](https://docs.python.org/3/library/functions.html#bool) Convert to byte. ### ida_bytes.create_word(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), length: asize_t, force: [bool](https://docs.python.org/3/library/functions.html#bool) = False) → [bool](https://docs.python.org/3/library/functions.html#bool) Convert to word. ### ida_bytes.create_dword(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), length: asize_t, force: [bool](https://docs.python.org/3/library/functions.html#bool) = False) → [bool](https://docs.python.org/3/library/functions.html#bool) Convert to dword. ### ida_bytes.create_qword(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), length: asize_t, force: [bool](https://docs.python.org/3/library/functions.html#bool) = False) → [bool](https://docs.python.org/3/library/functions.html#bool) Convert to quadword. ### ida_bytes.create_oword(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), length: asize_t, force: [bool](https://docs.python.org/3/library/functions.html#bool) = False) → [bool](https://docs.python.org/3/library/functions.html#bool) Convert to octaword/xmm word. ### ida_bytes.create_yword(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), length: asize_t, force: [bool](https://docs.python.org/3/library/functions.html#bool) = False) → [bool](https://docs.python.org/3/library/functions.html#bool) Convert to ymm word. ### ida_bytes.create_zword(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), length: asize_t, force: [bool](https://docs.python.org/3/library/functions.html#bool) = False) → [bool](https://docs.python.org/3/library/functions.html#bool) Convert to zmm word. ### ida_bytes.create_tbyte(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), length: asize_t, force: [bool](https://docs.python.org/3/library/functions.html#bool) = False) → [bool](https://docs.python.org/3/library/functions.html#bool) Convert to tbyte. ### ida_bytes.create_float(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), length: asize_t, force: [bool](https://docs.python.org/3/library/functions.html#bool) = False) → [bool](https://docs.python.org/3/library/functions.html#bool) Convert to float. ### ida_bytes.create_double(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), length: asize_t, force: [bool](https://docs.python.org/3/library/functions.html#bool) = False) → [bool](https://docs.python.org/3/library/functions.html#bool) Convert to double. ### ida_bytes.create_packed_real(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), length: asize_t, force: [bool](https://docs.python.org/3/library/functions.html#bool) = False) → [bool](https://docs.python.org/3/library/functions.html#bool) Convert to packed decimal real. ### ida_bytes.create_struct(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), length: asize_t, tid: tid_t, force: [bool](https://docs.python.org/3/library/functions.html#bool) = False) → [bool](https://docs.python.org/3/library/functions.html#bool) Convert to struct. ### ida_bytes.create_custdata(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), length: asize_t, dtid: [int](https://docs.python.org/3/library/functions.html#int), fid: [int](https://docs.python.org/3/library/functions.html#int), force: [bool](https://docs.python.org/3/library/functions.html#bool) = False) → [bool](https://docs.python.org/3/library/functions.html#bool) Convert to custom data type. ### ida_bytes.create_align(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), length: asize_t, alignment: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) Create an alignment item. * **Parameters:** * **ea** – linear address * **length** – size of the item in bytes. 0 means to infer from ALIGNMENT * **alignment** – alignment exponent. Example: 3 means align to 8 bytes. 0 means to infer from LENGTH It is forbidden to specify both LENGTH and ALIGNMENT as 0. * **Returns:** success ### ida_bytes.calc_min_align(length: asize_t) → [int](https://docs.python.org/3/library/functions.html#int) Calculate the minimal possible alignment exponent. * **Parameters:** **length** – size of the item in bytes. * **Returns:** a value in the 1..32 range ### ida_bytes.calc_max_align(endea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [int](https://docs.python.org/3/library/functions.html#int) Calculate the maximal possible alignment exponent. * **Parameters:** **endea** – end address of the alignment item. * **Returns:** a value in the 0..32 range ### ida_bytes.calc_def_align(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), mina: [int](https://docs.python.org/3/library/functions.html#int), maxa: [int](https://docs.python.org/3/library/functions.html#int)) → [int](https://docs.python.org/3/library/functions.html#int) Calculate the default alignment exponent. * **Parameters:** * **ea** – linear address * **mina** – minimal possible alignment exponent. * **maxa** – minimal possible alignment exponent. ### ida_bytes.create_16bit_data(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), length: asize_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Convert to 16-bit quantity (take the byte size into account). ### ida_bytes.create_32bit_data(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), length: asize_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Convert to 32-bit quantity (take the byte size into account). ### ida_bytes.ALOPT_IGNHEADS don’t stop if another data item is encountered. only the byte values will be used to determine the string length. if not set, a defined data item or instruction will truncate the string ### ida_bytes.ALOPT_IGNPRINT if set, don’t stop at non-printable codepoints, but only at the terminating character (or not unicode-mapped character (e.g., 0x8f in CP1252)) ### ida_bytes.ALOPT_IGNCLT if set, don’t stop at codepoints that are not part of the current ‘culture’; accept all those that are graphical (this is typically used used by user-initiated actions creating string literals.) ### ida_bytes.ALOPT_MAX4K if string length is more than 4K, return the accumulated length ### ida_bytes.ALOPT_ONLYTERM only the termination characters can be at the string end. Without this option illegal characters also terminate the string. ### ida_bytes.ALOPT_APPEND if an existing strlit is encountered, then append it to the string. ### ida_bytes.get_max_strlit_length(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), strtype: [int](https://docs.python.org/3/library/functions.html#int), options: [int](https://docs.python.org/3/library/functions.html#int) = 0) → [int](https://docs.python.org/3/library/functions.html#int) Determine maximum length of string literal. If the string literal has a length prefix (e.g., STRTYPE_LEN2 has a two-byte length prefix), the length of that prefix (i.e., 2) will be part of the returned value. * **Parameters:** * **ea** – starting address * **strtype** – string type. one of String type codes * **options** – combination of string literal length options * **Returns:** length of the string in octets (octet == 8 bits) ### ida_bytes.STRCONV_ESCAPE convert non-printable characters to C escapes ( , xNN, uNNNN) ### ida_bytes.STRCONV_REPLCHAR convert non-printable characters to the Unicode replacement character (U+FFFD) ### ida_bytes.STRCONV_INCLLEN for Pascal-style strings, include the prefixing length byte(s) as C-escaped sequence ### ida_bytes.create_strlit(start: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), len: [int](https://docs.python.org/3/library/functions.html#int), strtype: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) Convert to string literal and give a meaningful name. ‘start’ may be higher than ‘end’, the kernel will swap them in this case * **Parameters:** * **start** – starting address * **len** – length of the string in bytes. if 0, then get_max_strlit_length() will be used to determine the length * **strtype** – string type. one of String type codes * **Returns:** success ### ida_bytes.PSTF_TNORM use normal name ### ida_bytes.PSTF_TBRIEF use brief name (e.g., in the ‘Strings’ window) ### ida_bytes.PSTF_TINLIN use ‘inline’ name (e.g., in the structures comments) ### ida_bytes.PSTF_TMASK type mask ### ida_bytes.PSTF_HOTKEY have hotkey markers part of the name ### ida_bytes.PSTF_ENC if encoding is specified, append it ### ida_bytes.PSTF_ONLY_ENC generate only the encoding name ### ida_bytes.PSTF_ATTRIB generate for type attribute usage ### ida_bytes.get_opinfo(buf: [opinfo_t](../ida_nalt/index.md#ida_nalt.opinfo_t), ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), n: [int](https://docs.python.org/3/library/functions.html#int), flags: flags64_t) → opinfo_t \* Get additional information about an operand representation. * **Parameters:** * **buf** – buffer to receive the result. may not be nullptr * **ea** – linear address of item * **n** – number of operand, 0 or 1 * **flags** – flags of the item * **Returns:** nullptr if no additional representation information ### ida_bytes.set_opinfo(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), n: [int](https://docs.python.org/3/library/functions.html#int), flag: flags64_t, ti: [opinfo_t](../ida_nalt/index.md#ida_nalt.opinfo_t), suppress_events: [bool](https://docs.python.org/3/library/functions.html#bool) = False) → [bool](https://docs.python.org/3/library/functions.html#bool) Set additional information about an operand representation. This function is a low level one. Only the kernel should use it. * **Parameters:** * **ea** – linear address of the item * **n** – number of operand, 0 or 1 (see the note below) * **flag** – flags of the item * **ti** – additional representation information * **suppress_events** – do not generate changing_op_type and op_type_changed events * **Returns:** success ### ida_bytes.get_data_elsize(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), F: flags64_t, ti: [opinfo_t](../ida_nalt/index.md#ida_nalt.opinfo_t) = None) → asize_t Get size of data type specified in flags ‘F’. * **Parameters:** * **ea** – linear address of the item * **F** – flags * **ti** – additional information about the data type. For example, if the current item is a structure instance, then ti->tid is structure id. Otherwise is ignored (may be nullptr). If specified as nullptr, will be automatically retrieved from the database * **Returns:** * byte : 1 * word : 2 * etc… ### ida_bytes.get_full_data_elsize(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), F: flags64_t, ti: [opinfo_t](../ida_nalt/index.md#ida_nalt.opinfo_t) = None) → asize_t Get full size of data type specified in flags ‘F’. takes into account processors with wide bytes e.g. returns 2 for a byte element with 16-bit bytes ### ida_bytes.is_varsize_item(ea: ida_idaapi.ea_t, F: flags64_t, ti: opinfo_t = None, itemsize: asize_t \* = None) → [int](https://docs.python.org/3/library/functions.html#int) Is the item at ‘ea’ variable size? * **Parameters:** * **ea** – linear address of the item * **F** – flags * **ti** – additional information about the data type. For example, if the current item is a structure instance, then ti->tid is structure id. Otherwise is ignored (may be nullptr). If specified as nullptr, will be automatically retrieved from the database * **itemsize** – if not nullptr and the item is varsize, itemsize will contain the calculated item size (for struct types, the minimal size is returned) * **Returns:** 1: varsize item * **Returns:** 0: fixed item * **Returns:** -1: error (bad data definition) ### ida_bytes.get_possible_item_varsize(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), tif: [tinfo_t](../ida_typeinf/index.md#ida_typeinf.tinfo_t)) → asize_t Return the possible size of the item at EA of type TIF if TIF is the variable structure. * **Parameters:** * **ea** – the linear address of the item * **tif** – the item type * **Returns:** the possible size * **Returns:** asize_t(-1): TIF is not a variable structure ### ida_bytes.can_define_item(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), length: asize_t, flags: flags64_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Can define item (instruction/data) of the specified ‘length’, starting at ‘ea’? \* a new item would cross segment boundaries \* a new item would overlap with existing items (except items specified by ‘flags’) * **Parameters:** * **ea** – start of the range for the new item * **length** – length of the new item in bytes * **flags** – if not 0, then the kernel will ignore the data types specified by the flags and destroy them. For example: : 1000 dw 5 1002 db 5 ; undef 1003 db 5 ; undef 1004 dw 5 1006 dd 5 > can_define_item(1000, 6, 0) - false because of dw at 1004 can_define_item(1000, 6, word_flag()) - true, word at 1004 is destroyed * **Returns:** 1-yes, 0-no ### ida_bytes.MS_CODE Mask for code bits. ### ida_bytes.FF_FUNC function start? ### ida_bytes.FF_IMMD Has Immediate value ? ### ida_bytes.FF_JUMP Has jump table or switch_info? ### ida_bytes.has_immd(F: flags64_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Has immediate value? ### ida_bytes.is_func(F: flags64_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Is function start? ### ida_bytes.is_func_ea(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_bytes.set_immd(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Set ‘has immediate operand’ flag. Returns true if the FF_IMMD bit was not set and now is set ### *class* ida_bytes.data_type_t(\_self: PyObject \*, name: str, value_size: asize_t = 0, menu_name: str = None, hotkey: str = None, asm_keyword: str = None, props: int = 0) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) Information about a data type #### thisown #### props *: [int](https://docs.python.org/3/library/functions.html#int)* properties #### name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* name of the data type. must be unique #### menu_name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* Visible data type name to use in menus if nullptr, no menu item will be created #### hotkey *: [str](https://docs.python.org/3/library/stdtypes.html#str)* Hotkey for the corresponding menu item if nullptr, no hotkey will be associated with the menu item #### asm_keyword *: [str](https://docs.python.org/3/library/stdtypes.html#str)* keyword to use for this type in the assembly if nullptr, the data type cannot be used in the listing it can still be used in cpuregs window #### value_size *: asize_t* size of the value in bytes #### is_present_in_menus() → [bool](https://docs.python.org/3/library/functions.html#bool) Should this type be shown in UI menus * **Returns:** success #### id ### ida_bytes.DTP_NODUP do not use dup construct ### *class* ida_bytes.data_format_t(\_self: PyObject \*, name: str, value_size: asize_t = 0, menu_name: str = None, props: int = 0, hotkey: str = None, text_width: int = 0) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) Information about a data format #### thisown #### props *: [int](https://docs.python.org/3/library/functions.html#int)* properties (currently 0) #### name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* Format name, must be unique. #### menu_name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* Visible format name to use in menus if nullptr, no menu item will be created #### hotkey *: [str](https://docs.python.org/3/library/stdtypes.html#str)* Hotkey for the corresponding menu item if nullptr, no hotkey will be associated with the menu item #### value_size *: asize_t* size of the value in bytes 0 means any size is ok data formats that are registered for standard types (dtid 0) may be called with any value_size (instruction operands only) #### text_width *: [int](https://docs.python.org/3/library/functions.html#int)* Usual width of the text representation This value is used to calculate the width of the control to display values of this type #### is_present_in_menus() → [bool](https://docs.python.org/3/library/functions.html#bool) Should this format be shown in UI menus * **Returns:** success #### id ### ida_bytes.get_custom_data_type(dtid: [int](https://docs.python.org/3/library/functions.html#int)) → data_type_t const \* Get definition of a registered custom data type. * **Parameters:** **dtid** – data type id * **Returns:** data type definition or nullptr ### ida_bytes.get_custom_data_format(dfid: [int](https://docs.python.org/3/library/functions.html#int)) → data_format_t const \* Get definition of a registered custom data format. * **Parameters:** **dfid** – data format id * **Returns:** data format definition or nullptr ### ida_bytes.attach_custom_data_format(dtid: [int](https://docs.python.org/3/library/functions.html#int), dfid: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_bytes.detach_custom_data_format(dtid: [int](https://docs.python.org/3/library/functions.html#int), dfid: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_bytes.is_attached_custom_data_format(dtid: [int](https://docs.python.org/3/library/functions.html#int), dfid: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_bytes.get_custom_data_types(\*args) → [int](https://docs.python.org/3/library/functions.html#int) Get list of registered custom data type ids. * **Parameters:** * **out** – buffer for the output. may be nullptr * **min_size** – minimum value size * **max_size** – maximum value size * **Returns:** number of custom data types with the specified size limits ### ida_bytes.get_custom_data_formats(out: intvec_t \*, dtid: int) → [int](https://docs.python.org/3/library/functions.html#int) Get list of attached custom data formats for the specified data type. * **Parameters:** * **out** – buffer for the output. may be nullptr * **dtid** – data type id * **Returns:** number of returned custom data formats. if error, returns -1 ### ida_bytes.find_custom_data_type(name: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [int](https://docs.python.org/3/library/functions.html#int) Get id of a custom data type. * **Parameters:** **name** – name of the custom data type * **Returns:** id or -1 ### ida_bytes.find_custom_data_format(name: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [int](https://docs.python.org/3/library/functions.html#int) Get id of a custom data format. * **Parameters:** **name** – name of the custom data format * **Returns:** id or -1 ### ida_bytes.set_cmt(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), comm: [str](https://docs.python.org/3/library/stdtypes.html#str), rptble: [bool](https://docs.python.org/3/library/functions.html#bool)) → [bool](https://docs.python.org/3/library/functions.html#bool) Set an indented comment. * **Parameters:** * **ea** – linear address * **comm** – comment string * nullptr: do nothing (return 0) * “” : delete comment * **Parameters:** **rptble** – is repeatable? * **Returns:** success ### ida_bytes.get_cmt(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), rptble: [bool](https://docs.python.org/3/library/functions.html#bool)) → [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None) Get an indented comment. * **Parameters:** * **ea** – linear address. may point to tail byte, the function will find start of the item * **rptble** – get repeatable comment? * **Returns:** size of comment or -1 ### ida_bytes.append_cmt(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), str: append_cmt.str, rptble: [bool](https://docs.python.org/3/library/functions.html#bool)) → [bool](https://docs.python.org/3/library/functions.html#bool) Append to an indented comment. Creates a new comment if none exists. Appends a newline character and the specified string otherwise. * **Parameters:** * **ea** – linear address * **str** – comment string to append * **rptble** – append to repeatable comment? * **Returns:** success ### ida_bytes.get_predef_insn_cmt(ins: insn_t const &) → [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None) Get predefined comment. * **Parameters:** **ins** – current instruction information * **Returns:** size of comment or -1 ### ida_bytes.find_byte(sEA: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), size: asize_t, value: uchar, bin_search_flags: [int](https://docs.python.org/3/library/functions.html#int)) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) Find forward a byte with the specified value (only 8-bit value from the database). example: ea=4 size=3 will inspect addresses 4, 5, and 6 * **Parameters:** * **sEA** – linear address * **size** – number of bytes to inspect * **value** – value to find * **bin_search_flags** – combination of Search flags * **Returns:** address of byte or BADADDR ### ida_bytes.find_byter(sEA: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), size: asize_t, value: uchar, bin_search_flags: [int](https://docs.python.org/3/library/functions.html#int)) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) Find reverse a byte with the specified value (only 8-bit value from the database). example: ea=4 size=3 will inspect addresses 6, 5, and 4 * **Parameters:** * **sEA** – the lower address of the search range * **size** – number of bytes to inspect * **value** – value to find * **bin_search_flags** – combination of Search flags * **Returns:** address of byte or BADADDR ### *class* ida_bytes.compiled_binpat_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### bytes *: bytevec_t* #### mask *: bytevec_t* #### strlits *: [rangevec_t](../ida_range/index.md#ida_range.rangevec_t)* #### encidx *: [int](https://docs.python.org/3/library/functions.html#int)* #### all_bytes_defined() → [bool](https://docs.python.org/3/library/functions.html#bool) #### qclear() → [None](https://docs.python.org/3/library/constants.html#None) ### ida_bytes.PBSENC_DEF1BPU Use the default 1 byte-per-unit IDB encoding. ### ida_bytes.PBSENC_ALL Use all IDB encodings. ### ida_bytes.parse_binpat_str(out: [compiled_binpat_vec_t](#ida_bytes.compiled_binpat_vec_t), ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), \_in: [str](https://docs.python.org/3/library/stdtypes.html#str), radix: [int](https://docs.python.org/3/library/functions.html#int), strlits_encoding: [int](https://docs.python.org/3/library/functions.html#int) = 0) → [bool](https://docs.python.org/3/library/functions.html#bool) Deprecated. Please use compiled_binpat_vec_t.from_pattern() instead. ### ida_bytes.bin_search(\*args) Search for a set of bytes in the program This function has the following signatures: > 1. bin_search(start_ea: ida_idaapi.ea_t, end_ea: ida_idaapi.ea_t, data: compiled_binpat_vec_t, flags: int) -> Tuple[ida_idaapi.ea_t, int] > 2. bin_search(start_ea: ida_idaapi.ea_t, end_ea: ida_idaapi.ea_t, image: bytes, mask: bytes, len: int, flags: int) -> ida_idaapi.ea_t The return value type will differ depending on the form: > 1. a tuple (matched-address, index-in-compiled_binpat_vec_t) (1st form) > 2. the address of a match, or ida_idaapi.BADADDR if not found (2nd form) This is a low-level function; more user-friendly alternatives are available. Please see ‘find_bytes’ and ‘find_string’. * **Parameters:** * **start_ea** – linear address, start of range to search * **end_ea** – linear address, end of range to search (exclusive) * **data** – (1st form) the prepared data to search for (see parse_binpat_str()) * **bytes** – (2nd form) a set of bytes to match * **mask** – (2nd form) a mask to apply to the set of bytes * **flags** – combination of BIN_SEARCH_\* flags * **Returns:** either a tuple holding both the address of the match and the index of the compiled pattern that matched, or the address of a match (ida_idaapi.BADADDR if not found) ### ida_bytes.BIN_SEARCH_CASE case sensitive ### ida_bytes.BIN_SEARCH_NOCASE case insensitive ### ida_bytes.BIN_SEARCH_NOBREAK don’t check for Ctrl-Break ### ida_bytes.BIN_SEARCH_INITED find_byte, find_byter: any initilized value ### ida_bytes.BIN_SEARCH_NOSHOW don’t show search progress or update screen ### ida_bytes.BIN_SEARCH_FORWARD search forward for bytes ### ida_bytes.BIN_SEARCH_BACKWARD search backward for bytes ### ida_bytes.BIN_SEARCH_BITMASK searching using strict bit mask ### ida_bytes.next_inited(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), maxea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) Find the next initialized address. ### ida_bytes.prev_inited(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), minea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) Find the previous initialized address. ### ida_bytes.equal_bytes(ea: ida_idaapi.ea_t, image: uchar const \*, mask: uchar const \*, len: int, bin_search_flags: int) → [bool](https://docs.python.org/3/library/functions.html#bool) Compare ‘len’ bytes of the program starting from ‘ea’ with ‘image’. * **Parameters:** * **ea** – linear address * **image** – bytes to compare with * **mask** – array of mask bytes, it’s length is ‘len’. if the flag BIN_SEARCH_BITMASK is passsed, ‘bitwise AND’ is used to compare. if not; 1 means to perform the comparison of the corresponding byte. 0 means not to perform. if mask == nullptr, then all bytes of ‘image’ will be compared. if mask == SKIP_FF_MASK then 0xFF bytes will be skipped * **len** – length of block to compare in bytes. * **bin_search_flags** – combination of Search flags * **Returns:** 1: equal * **Returns:** 0: not equal ### *class* ida_bytes.hidden_range_info_t Bases: [`ida_range.range_t`](../ida_range/index.md#ida_range.range_t) #### thisown #### get_description() → [str](https://docs.python.org/3/library/stdtypes.html#str) Description to display if the range is collapsed. #### set_description(v: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [None](https://docs.python.org/3/library/constants.html#None) #### get_header() → [str](https://docs.python.org/3/library/stdtypes.html#str) Header lines to display if the range is expanded. #### set_header(v: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [None](https://docs.python.org/3/library/constants.html#None) #### get_footer() → [str](https://docs.python.org/3/library/stdtypes.html#str) Footer lines to display if the range is expanded. #### set_footer(v: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [None](https://docs.python.org/3/library/constants.html#None) #### get_visible() → [bool](https://docs.python.org/3/library/functions.html#bool) The range visibility state. #### set_visible(v: [bool](https://docs.python.org/3/library/functions.html#bool)) → [None](https://docs.python.org/3/library/constants.html#None) #### get_color() → bgcolor_t The range color. #### set_color(v: bgcolor_t) → [None](https://docs.python.org/3/library/constants.html#None) #### is_valid() → [bool](https://docs.python.org/3/library/functions.html#bool) Is the hidden range info valid? ### ida_bytes.get_hidden_range_info(hri: [hidden_range_info_t](#ida_bytes.hidden_range_info_t), ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Get hidden range information by address. * **Parameters:** * **hri** – pointer to output buffer, may be nullptr * **ea** – any address in the hidden range * **Returns:** true if a hidden range was found at the given address ### ida_bytes.get_hidden_range_info_by_num(hri: [hidden_range_info_t](#ida_bytes.hidden_range_info_t), n: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) Get hidden range information by number. * **Parameters:** * **hri** – pointer to output buffer, may be nullptr * **n** – number of hidden range, is in range 0..get_hidden_range_qty()-1 * **Returns:** true if a hidden range with the given number exists ### ida_bytes.update_hidden_range_info(hri: [hidden_range_info_t](#ida_bytes.hidden_range_info_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Update hidden range information in the database. You cannot use this function to change the range boundaries. Uses start_ea to identify the range, applies only modified fields. * **Parameters:** **hri** – range info to update * **Returns:** success ### ida_bytes.get_first_hidden_range_ea() → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) Get start address of the first hidden range. * **Returns:** start_ea of the first hidden range, or BADADDR ### ida_bytes.get_last_hidden_range_ea() → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) Get start address of the last hidden range. * **Returns:** start_ea of the last hidden range, or BADADDR ### ida_bytes.get_next_hidden_range_ea(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) Get start address of the next hidden range. * **Parameters:** **ea** – any address in the program * **Returns:** start_ea of the next hidden range, or BADADDR ### ida_bytes.get_prev_hidden_range_ea(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) Get start address of the previous hidden range. * **Parameters:** **ea** – any address in the program * **Returns:** start_ea of the previous hidden range, or BADADDR ### ida_bytes.add_hidden_range(\*args) → [bool](https://docs.python.org/3/library/functions.html#bool) Mark a range of addresses as hidden. The range will be created in the invisible state with the default color * **Parameters:** * **ea1** – linear address of start of the address range * **ea2** – linear address of end of the address range * **description** – range parameters * **header** – range parameters * **footer** – range parameters * **color** – the range color * **Returns:** success ### ida_bytes.get_hidden_range_qty() → [int](https://docs.python.org/3/library/functions.html#int) Get number of hidden ranges. ### ida_bytes.get_hidden_range_num(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [int](https://docs.python.org/3/library/functions.html#int) Get number of a hidden range. * **Parameters:** **ea** – any address in the hidden range * **Returns:** number of hidden range (0..get_hidden_range_qty()-1) ### ida_bytes.del_hidden_range(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Delete hidden range. * **Parameters:** **ea** – any address in the hidden range * **Returns:** success ### *class* ida_bytes.hidden_range_t Bases: [`ida_range.range_t`](../ida_range/index.md#ida_range.range_t) #### thisown #### description *: char \** description to display if the range is collapsed #### header *: char \** header lines to display if the range is expanded #### footer *: char \** footer lines to display if the range is expanded #### visible *: [bool](https://docs.python.org/3/library/functions.html#bool)* the range state #### color *: bgcolor_t* range color ### ida_bytes.update_hidden_range(ha: [hidden_range_t](#ida_bytes.hidden_range_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_bytes.get_hidden_range(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → hidden_range_t \* ### ida_bytes.getn_hidden_range(n: [int](https://docs.python.org/3/library/functions.html#int)) → hidden_range_t \* ### ida_bytes.get_prev_hidden_range(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → hidden_range_t \* ### ida_bytes.get_next_hidden_range(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → hidden_range_t \* ### ida_bytes.get_first_hidden_range() → hidden_range_t \* ### ida_bytes.get_last_hidden_range() → hidden_range_t \* ### ida_bytes.add_mapping(\_from: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), to: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), size: asize_t) → [bool](https://docs.python.org/3/library/functions.html#bool) IDA supports memory mapping. References to the addresses from the mapped range use data and meta-data from the mapping range. * **Parameters:** * **to** – start of the mapping range (existent address) * **size** – size of the range * **Returns:** success ### ida_bytes.del_mapping(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) Delete memory mapping range. * **Parameters:** **ea** – any address in the mapped range ### ida_bytes.use_mapping(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) Translate address according to current mappings. * **Parameters:** **ea** – address to translate * **Returns:** translated address ### ida_bytes.get_mappings_qty() → [int](https://docs.python.org/3/library/functions.html#int) Get number of mappings. ### ida_bytes.get_mapping(n: [int](https://docs.python.org/3/library/functions.html#int)) → ea_t \*, ea_t \*, asize_t \* Get memory mapping range by its number. * **Parameters:** **n** – number of mapping range (0..get_mappings_qty()-1) * **Returns:** false if the specified range does not exist, otherwise returns from, to, size ### ida_bytes.MS_0TYPE ### ida_bytes.FF_0VOID ### ida_bytes.FF_0NUMH ### ida_bytes.FF_0NUMD ### ida_bytes.FF_0CHAR ### ida_bytes.FF_0SEG ### ida_bytes.FF_0OFF ### ida_bytes.FF_0NUMB ### ida_bytes.FF_0NUMO ### ida_bytes.FF_0ENUM ### ida_bytes.FF_0FOP ### ida_bytes.FF_0STRO ### ida_bytes.FF_0STK ### ida_bytes.FF_0FLT ### ida_bytes.FF_0CUST ### ida_bytes.MS_1TYPE ### ida_bytes.FF_1VOID ### ida_bytes.FF_1NUMH ### ida_bytes.FF_1NUMD ### ida_bytes.FF_1CHAR ### ida_bytes.FF_1SEG ### ida_bytes.FF_1OFF ### ida_bytes.FF_1NUMB ### ida_bytes.FF_1NUMO ### ida_bytes.FF_1ENUM ### ida_bytes.FF_1FOP ### ida_bytes.FF_1STRO ### ida_bytes.FF_1STK ### ida_bytes.FF_1FLT ### ida_bytes.FF_1CUST ### ida_bytes.visit_patched_bytes(ea1: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), ea2: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), callable) Enumerates patched bytes in the given range and invokes a callable * **Parameters:** * **ea1** – start address * **ea2** – end address * **callable** – a Python callable with the following prototype: callable(ea, fpos, org_val, patch_val). If the callable returns non-zero then that value will be returned to the caller and the enumeration will be interrupted. * **Returns:** Zero if the enumeration was successful or the return value of the callback if enumeration was interrupted. ### ida_bytes.get_bytes(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), size: [int](https://docs.python.org/3/library/functions.html#int), gmb_flags: [int](https://docs.python.org/3/library/functions.html#int) = GMB_READALL) Get the specified number of bytes of the program. * **Parameters:** * **ea** – program address * **size** – number of bytes to return * **gmb_flags** – OR’ed combination of GMB_\* values (defaults to GMB_READALL) * **Returns:** the bytes (as bytes object), or None in case of failure ### ida_bytes.get_bytes_and_mask(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), size: [int](https://docs.python.org/3/library/functions.html#int), gmb_flags: [int](https://docs.python.org/3/library/functions.html#int) = GMB_READALL) Get the specified number of bytes of the program, and a bitmask specifying what bytes are defined and what bytes are not. * **Parameters:** * **ea** – program address * **size** – number of bytes to return * **gmb_flags** – OR’ed combination of GMB_\* values (defaults to GMB_READALL) * **Returns:** a tuple (bytes, mask), or None in case of failure. Both ‘bytes’ and ‘mask’ are ‘str’ instances. ### ida_bytes.get_strlit_contents(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), len: [int](https://docs.python.org/3/library/functions.html#int), type: [int](https://docs.python.org/3/library/functions.html#int), flags: [int](https://docs.python.org/3/library/functions.html#int) = 0) Get contents of string literal, as UTF-8-encoded codepoints. It works even if the string has not been created in the database yet. Note that the returned value will be of type ‘bytes’; if you want auto-conversion to unicode strings (that is: real Python strings), you should probably be using the idautils.Strings class. * **Parameters:** * **ea** – linear address of the string * **len** – length of the string in bytes (including terminating 0) * **type** – type of the string. Represents both the character encoding, and the ‘type’ of string at the given location. * **flags** – combination of ``` STRCONV_ ``` …, to perform output conversion. * **Returns:** a bytes-filled str object. ### ida_bytes.set_operand_flag(\*args) → PyObject \* Set operand n’s type flag in the 64-bit flags set. * **Parameters:** * **F** – the flags to modify * **typebits** – the type bits (one of FF_N_) * **n** – the operand number ### ida_bytes.print_strlit_type(strtype: [int](https://docs.python.org/3/library/functions.html#int), flags: [int](https://docs.python.org/3/library/functions.html#int) = 0) → PyObject \* Get string type information: the string type name (possibly decorated with hotkey markers), and the tooltip. * **Parameters:** * **strtype** – the string type * **flags** – or’ed PSTF_\* constants * **Returns:** length of generated text ### ida_bytes.op_stroff(\*args) → [bool](https://docs.python.org/3/library/functions.html#bool) Set operand representation to be ‘struct offset’. This function has the following signatures: > 1. op_stroff(ins: ida_ua.insn_t, n: int, path: List[int], delta: int) > 2. op_stroff(ins: ida_ua.insn_t, n: int, path: ida_pro.tid_array, path_len: int, delta: int) (backward-compatibility only) Here is an example using this function: > ins = ida_ua.insn_t() > if ida_ua.decode_insn(ins, some_address): > > operand = 0 > > path = [ida_typeinf.get_named_type_tid(“my_stucture_t”)] # a one-element path > > ida_bytes.op_stroff(ins, operand, path, 0) ### ida_bytes.get_stroff_path(\*args) Get the structure offset path for operand n, at the specified address. This function has the following signatures: > 1. get_stroff_path(ea: ida_idaapi.ea_t, n : int) -> Tuple[List[int], int] > 2. get_stroff_path(path: tid_array, delta: sval_pointer, ea: ida_idaapi.ea_t, n : int) (backward-compatibility only) * **Parameters:** * **ea** – address where the operand holds a path to a structure offset (1st form) * **n** – operand number (1st form) * **Returns:** a tuple holding a (list_of_tid_t’s, delta_within_the_last_type), or (None, None) ### ida_bytes.update_hidden_range ### ida_bytes.get_hidden_range ### ida_bytes.getn_hidden_range ### ida_bytes.get_prev_hidden_range ### ida_bytes.get_next_hidden_range ### ida_bytes.get_first_hidden_range ### ida_bytes.get_last_hidden_range ### ida_bytes.register_custom_data_type(dt) Registers a custom data type. * **Parameters:** **dt** – an instance of the data_type_t class * **Returns:** < 0 if failed to register * **Returns:** > 0 data type id ### ida_bytes.unregister_custom_data_type(dtid) Unregisters a custom data type. * **Parameters:** **dtid** – the data type id * **Returns:** Boolean ### ida_bytes.register_custom_data_format(df) Registers a custom data format with a given data type. * **Parameters:** **df** – an instance of data_format_t * **Returns:** < 0 if failed to register * **Returns:** > 0 data format id ### ida_bytes.unregister_custom_data_format(dfid) Unregisters a custom data format * **Parameters:** **dfid** – data format id * **Returns:** Boolean ### ida_bytes.DTP_NODUP *= 1* do not use dup construct ### ida_bytes.register_data_types_and_formats(formats) Registers multiple data types and formats at once. To register one type/format at a time use register_custom_data_type/register_custom_data_format It employs a special table of types and formats described below: The ‘formats’ is a list of tuples. If a tuple has one element then it is the format to be registered with dtid=0 If the tuple has more than one element, then tuple[0] is the data type and tuple[1:] are the data formats. For example: many_formats = [ > (pascal_data_type(), pascal_data_format()), > (simplevm_data_type(), simplevm_data_format()), > (makedword_data_format(),), > (simplevm_data_format(),) ] The first two tuples describe data types and their associated formats. The last two tuples describe two data formats to be used with built-in data types. The data format may be attached to several data types. The id of the data format is stored in the first data_format_t object. For example: assert many_formats[1][1] != -1 assert many_formats[2][0] != -1 assert many_formats[3][0] == -1 ### ida_bytes.unregister_data_types_and_formats(formats) As opposed to register_data_types_and_formats(), this function unregisters multiple data types and formats at once. ### ida_bytes.find_bytes(bs: [bytes](https://docs.python.org/3/library/stdtypes.html#bytes) | [str](https://docs.python.org/3/library/stdtypes.html#str), range_start: [int](https://docs.python.org/3/library/functions.html#int), range_size: [int](https://docs.python.org/3/library/functions.html#int) | [None](https://docs.python.org/3/library/constants.html#None) = None, range_end: [int](https://docs.python.org/3/library/functions.html#int) | [None](https://docs.python.org/3/library/constants.html#None) = ida_idaapi.BADADDR, mask: [bytes](https://docs.python.org/3/library/stdtypes.html#bytes) | [None](https://docs.python.org/3/library/constants.html#None) = None, flags: [int](https://docs.python.org/3/library/functions.html#int) | [None](https://docs.python.org/3/library/constants.html#None) = BIN_SEARCH_FORWARD | BIN_SEARCH_NOSHOW, radix: [int](https://docs.python.org/3/library/functions.html#int) | [None](https://docs.python.org/3/library/constants.html#None) = 16, strlit_encoding: [int](https://docs.python.org/3/library/functions.html#int) | [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None) = PBSENC_DEF1BPU) → [int](https://docs.python.org/3/library/functions.html#int) Search for bytes in the program. The pattern can be either a textual binary pattern (str) or a raw bytes buffer optionally combined with mask. A textual pattern is a space-separated sequence of hex bytes, ? wildcards, and quoted string literals. A ? may also stand in for a single hex nibble inside a 2-char hex byte token (e.g. A? or ?5), as long as the token is whitespace/comma-delimited on both sides. Examples (pattern contents, without surrounding Python quotes): > * B8 ? ? ? ? 90 – byte 0xB8, four wildcards, byte 0x90 > : (mov eax, imm32; nop with any immediate) > * 48 8? ?? 24 – 0x48, any byte starting with 0x8, any byte, > : 0x24 (e.g. matches mov [rsp+…] family) > * “Hello”, 0 – the bytes of “Hello” followed by a null byte The search range can be specified three ways. From highest to lowest precedence: > * by size, via range_size (then range_end = range_start + range_size) > * by range_t passed as range_start (its start_ea and end_ea > become the search range’s start and end addresses) > * by end address, via range_end The function returns ida_idaapi.BADADDR when no further match is found. To iterate over all matches in a window: > * forward (default): after a match at ea, set range_start = ea + 1 > and call again. > * backward (BIN_SEARCH_BACKWARD): the window is unchanged but the > highest-address match is returned; after a match at ea, set > range_end = ea and call again. * **Parameters:** * **bs** – the pattern. If str, parsed as a textual binary pattern (see the intro above for the syntax); quoted string literals inside it are converted to bytes per strlit_encoding. If bytes, used literally and combined with mask if provided. * **range_start** – start address of the search range (inclusive); or a range_t (see precedence list above). * **range_size** – size of the search range (see precedence list above). * **range_end** – end address of the search range (exclusive). The entire pattern must fit within the range, i.e. a match is accepted only when match_ea + len(pattern) <= range_end. Defaults to BADADDR. * **mask** – optional byte mask, applied when bs is bytes. A non-zero mask byte means the corresponding pattern byte must match; a zero mask byte makes that position a wildcard. Ignored for textual patterns (the mask is derived from ? wildcards in the pattern). * **flags** – combination of BIN_SEARCH_\* flags. Direction is controlled by BIN_SEARCH_FORWARD (default) or BIN_SEARCH_BACKWARD. Case sensitivity only affects quoted string literals in a textual pattern: they match case-insensitively by default; pass BIN_SEARCH_CASE to require exact case. Hex byte tokens are unaffected (they are literal byte values, not text). Use BIN_SEARCH_BITMASK for bit-granular mask interpretation. Note: these are *not* interchangeable with ida_search.SEARCH_\* (which belong to the legacy find_text/find_imm API). * **radix** – numeric base for tokens in a textual pattern (8, 10, or 16). * **strlit_encoding** – encoding (name or index) used to convert quoted string literals inside a textual pattern into bytes. * **Returns:** address of the next match, or ida_idaapi.BADADDR if no match. ### ida_bytes.find_string(\_str: [str](https://docs.python.org/3/library/stdtypes.html#str), range_start: [int](https://docs.python.org/3/library/functions.html#int), range_end: [int](https://docs.python.org/3/library/functions.html#int) | [None](https://docs.python.org/3/library/constants.html#None) = ida_idaapi.BADADDR, range_size: [int](https://docs.python.org/3/library/functions.html#int) | [None](https://docs.python.org/3/library/constants.html#None) = None, strlit_encoding: [int](https://docs.python.org/3/library/functions.html#int) | [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None) = PBSENC_DEF1BPU, flags: [int](https://docs.python.org/3/library/functions.html#int) | [None](https://docs.python.org/3/library/constants.html#None) = BIN_SEARCH_FORWARD | BIN_SEARCH_NOSHOW) → [int](https://docs.python.org/3/library/functions.html#int) Search for an occurrence of a string in the program. Convenience wrapper around find_bytes() that quotes \_str and delegates the search. The string is encoded according to strlit_encoding before matching, so the same call can locate ASCII, UTF-16, or any other registered encoding. The search range can be specified three ways. From highest to lowest precedence: range_size, range_t passed as range_start, or range_end. The function returns ida_idaapi.BADADDR when no further match is found. To iterate over all matches in a window: > * forward (default): after a match at ea, set range_start = ea + 1 > and call again. > * backward (BIN_SEARCH_BACKWARD): the window is unchanged but the > highest-address match is returned; after a match at ea, set > range_end = ea and call again. * **Parameters:** * **\_str** – the string to look for (plain text – no quoting needed; embedded double quotes are escaped automatically). * **range_start** – start address of the search range (inclusive); or a range_t (see precedence list above). * **range_end** – end address of the search range (exclusive). The entire encoded string must fit within the range, i.e. a match is accepted only when match_ea + len(encoded_str) <= range_end. Defaults to BADADDR. * **range_size** – size of the search range (see precedence list above). * **strlit_encoding** – encoding (name or index) used to convert \_str into bytes. * **flags** – combination of BIN_SEARCH_\* flags. Direction is controlled by BIN_SEARCH_FORWARD (default) or BIN_SEARCH_BACKWARD. By default the match is case-insensitive; pass BIN_SEARCH_CASE to require exact case. Note: these are *not* interchangeable with ida_search.SEARCH_\* (which belong to the legacy find_text/find_imm API). * **Returns:** address of the next match, or ida_idaapi.BADADDR if no match. # index.html.md # create_user_shared_data summary: create a segment, and define (complex) data in it description: : The goal of this script is to demonstrate some usage of the type API. In this script, we show how to create, set type and name of a user shared data region in an ntdll IDB: \* Load the \_KUSER_SHARED_DATA data type from a type info
> library shipped with IDA, and import it into the IDB’s “local types” * Create a data segment with UserSharedData as its name. * Apply the type to the start of the newly created segment base address. * Set the address name. level: intermediate ## Attributes | [`USE64`](#create_user_shared_data.USE64) | | |-------------------------------------------------|----| | [`PERM_RW`](#create_user_shared_data.PERM_RW) | | | [`start_ea`](#create_user_shared_data.start_ea) | | | [`tif`](#create_user_shared_data.tif) | | | [`ntddk64`](#create_user_shared_data.ntddk64) | | | [`si`](#create_user_shared_data.si) | | ## Module Contents ### create_user_shared_data.USE64 *= 2* ### create_user_shared_data.PERM_RW *= 6* ### create_user_shared_data.start_ea *= 2147352576* ### create_user_shared_data.tif ### create_user_shared_data.ntddk64 ### create_user_shared_data.si # index.html.md # apply_callee_tinfo summary: apply function prototype to call sites description: : The goal of this script is to demonstrate some usage of the type API. In this script, we: \* Open the private type libary. \* Load its declaration in the type library by parsing its declaration and keep the return tuple for future use. \* Deserialize the type info stored in the returned tuple. \* Get the address of the function. \* Get the address of the code reference to the function and apply the type info there. level: intermediate ## Functions | [`apply_type_info`](#apply_callee_tinfo.apply_type_info)(callee_name, callee_prototype_decl) | | |------------------------------------------------------------------------------------------------|----| ## Module Contents ### apply_callee_tinfo.apply_type_info(callee_name, callee_prototype_decl) # index.html.md # list_stkvar_xrefs summary: list all xrefs to a function stack variable description: : Contrary to (in-memory) data & code xrefs, retrieving stack variables xrefs requires a bit more work than just using ida_xref’s first_to(), next_to() (or higher level utilities such as idautils.XrefsTo) keywords: xrefs level: intermediate ## Attributes | [`ACTION_NAME`](#list_stkvar_xrefs.ACTION_NAME) | | |---------------------------------------------------------|----| | [`ACTION_SHORTCUT`](#list_stkvar_xrefs.ACTION_SHORTCUT) | | | [`adesc`](#list_stkvar_xrefs.adesc) | | ## Classes | [`list_stkvar_xrefs_ah_t`](#list_stkvar_xrefs.list_stkvar_xrefs_ah_t) | | |-------------------------------------------------------------------------|----| ## Module Contents ### list_stkvar_xrefs.ACTION_NAME *= 'list_stkvar_xrefs:list'* ### list_stkvar_xrefs.ACTION_SHORTCUT *= 'Ctrl+Shift+F7'* ### *class* list_stkvar_xrefs.list_stkvar_xrefs_ah_t Bases: [`ida_kernwin.action_handler_t`](../ida_kernwin/index.md#ida_kernwin.action_handler_t) #### activate(ctx) Activate an action. This function implements the core behavior of an action. It is called when the action is triggered, from a menu, from a popup menu, from the toolbar, or programmatically. * **Returns:** non-zero: all IDA windows will be refreshed #### update(ctx) Update an action. This is called when the context of the UI changed, and we need to let the action update some of its properties if needed (label, icon, …) In addition, this lets IDA know whether the action is enabled, and when it should be queried for availability again. Note: This callback is not meant to change anything in the application’s state, except by calling one (or many) of the “update_action_\*()” functions on this very action. ### list_stkvar_xrefs.adesc # index.html.md # ida_merge Merge functionality. NOTE: this functionality is available in IDA Teams (not IDA Pro) There are 3 databases involved in merging: base_idb, local_db, and remote_idb. \* base_idb: the common base ancestor of ‘local_db’ and ‘remote_db’. in the UI this database is located in the middle. \* local_idb: local database that will contain the result of the merging. in the UI this database is located on the left. \* remote_idb: remote database that will merge into local_idb. It may reside locally on the current computer, despite its name. in the UI this database is located on the right. base_idb and remote_idb are opened for reading only. base_idb may be absent, in this case a 2-way merging is performed. Conflicts can be resolved automatically or interactively. The automatic resolving scores the conflicting blocks and takes the better one. The interactive resolving displays the full rendered contents side by side, and expects the user to select the better side for each conflict. Since IDB files contain various kinds of information, there are many merging phases. The entire list can be found in merge.cpp. Below are just some selected examples: \* merge global database settings (inf and other global vars) \* merge segmentation and changes to the database bytes \* merge various lists: exports, imports, loaded tils, etc \* merge names, functions, function frames \* merge debugger settings, breakpoints \* merge struct/enum views \* merge local type libraries \* merge the disassembly items (i.e. the segment contents) this includes operand types, code/data separation, etc \* merge plugin specific info like decompiler types, dwarf mappings, etc To unify UI elements of each merge phase, we use merger views: \* A view that consists of 2 or 3 panes: left (local_idb) and right (remote_idb). The common base is in the middle, if present. \* Rendering of the panes depends on the phase, different phases show different contents. \* The conflicts are highlighted by a colored background. Also, the detail pane can be consulted for additional info. \* The user can select a conflict (or a bunch of conflicts) and say “use this block”. \* The user can browse the panes as he wishes. He will not be forced to handle conflicts in any particular order. However, once he finishes working with a merge handler and proceeds to the next one, he cannot go back. \* Scrolling the left pane will synchronously scroll the right pane and vice versa. \* There are the navigation commands like “go to the prev/next conflict” \* The number of remaining conflicts to resolve is printed in the “Progress” chooser. \* The user may manually modify local database inside the merger view. For that he may use the regular hotkeys. However, editing the database may lead to new conflicts, so we better restrict the available actions to some reasonable minimum. Currently, this is not implemented. IDA works in a new “merge” mode during merging. In this mode most events are not generated. We forbid them to reduce the risk that a rogue third-party plugin that is not aware of the “merge” mode would spoil something. For example, normally renaming a function causes a cascade of events and may lead to other database modifications. Some of them may be desired, some - not. Since there are some undesired events, it is better to stop generating them. However, some events are required to render the disassembly listing. For example, ev_ana_insn, av_out_insn. This is why some events are still generated in the “merge” mode. To let processor modules and plugins merge their data, we introduce a new event: ev_create_merge_handlers. It is generated immediately after opening all three idbs. The interested modules should react to this event by creating new merge handlers, if they need them. While the kernel can create arbitrary merge handlers, modules can create only the standard ones returned by: create_nodeval_merge_handler() create_nodeval_merge_handlers() create_std_modmerge_handlers() We do not document merge_handler_t because once a merge handler is created, it is used exclusively by the kernel. See mergemod.hpp for more information about the merge mode for modules. ## Attributes | [`MERGE_KIND_NETNODE`](#ida_merge.MERGE_KIND_NETNODE) | netnode (no merging, to be used in idbunits) | |-----------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [`MERGE_KIND_AUTOQ`](#ida_merge.MERGE_KIND_AUTOQ) | auto queues | | [`MERGE_KIND_INF`](#ida_merge.MERGE_KIND_INF) | merge the inf variable (global settings) | | [`MERGE_KIND_ENCODINGS`](#ida_merge.MERGE_KIND_ENCODINGS) | merge encodings | | [`MERGE_KIND_ENCODINGS2`](#ida_merge.MERGE_KIND_ENCODINGS2) | merge default encodings | | [`MERGE_KIND_SCRIPTS2`](#ida_merge.MERGE_KIND_SCRIPTS2) | merge scripts common info | | [`MERGE_KIND_SCRIPTS`](#ida_merge.MERGE_KIND_SCRIPTS) | merge scripts | | [`MERGE_KIND_CUSTDATA`](#ida_merge.MERGE_KIND_CUSTDATA) | merge custom data type and formats | | [`MERGE_KIND_CUSTCNV`](#ida_merge.MERGE_KIND_CUSTCNV) | merge custom calling conventions | | [`MERGE_KIND_ENUMS`](#ida_merge.MERGE_KIND_ENUMS) | merge enums | | [`MERGE_KIND_STRUCTS`](#ida_merge.MERGE_KIND_STRUCTS) | merge structs (globally: add/delete structs entirely) | | [`MERGE_KIND_TILS`](#ida_merge.MERGE_KIND_TILS) | merge type libraries | | [`MERGE_KIND_TINFO`](#ida_merge.MERGE_KIND_TINFO) | merge tinfo | | [`MERGE_KIND_STRMEM`](#ida_merge.MERGE_KIND_STRMEM) | merge struct members | | [`MERGE_KIND_UDTMEM`](#ida_merge.MERGE_KIND_UDTMEM) | merge UDT members (local types) | | [`MERGE_KIND_GHSTRCMT`](#ida_merge.MERGE_KIND_GHSTRCMT) | merge ghost structure comment | | [`MERGE_KIND_STRMEMCMT`](#ida_merge.MERGE_KIND_STRMEMCMT) | merge member comments for ghost struc | | [`MERGE_KIND_SELECTORS`](#ida_merge.MERGE_KIND_SELECTORS) | merge selectors | | [`MERGE_KIND_STT`](#ida_merge.MERGE_KIND_STT) | merge flag storage types | | [`MERGE_KIND_SEGMENTS`](#ida_merge.MERGE_KIND_SEGMENTS) | merge segments | | [`MERGE_KIND_SEGGRPS`](#ida_merge.MERGE_KIND_SEGGRPS) | merge segment groups | | [`MERGE_KIND_SEGREGS`](#ida_merge.MERGE_KIND_SEGREGS) | merge segment registers | | [`MERGE_KIND_ORPHANS`](#ida_merge.MERGE_KIND_ORPHANS) | merge orphan bytes | | [`MERGE_KIND_BYTEVAL`](#ida_merge.MERGE_KIND_BYTEVAL) | merge byte values | | [`MERGE_KIND_FIXUPS`](#ida_merge.MERGE_KIND_FIXUPS) | merge fixups | | [`MERGE_KIND_MAPPING`](#ida_merge.MERGE_KIND_MAPPING) | merge manual memory mapping | | [`MERGE_KIND_EXPORTS`](#ida_merge.MERGE_KIND_EXPORTS) | merge exports | | [`MERGE_KIND_IMPORTS`](#ida_merge.MERGE_KIND_IMPORTS) | merge imports | | [`MERGE_KIND_PATCHES`](#ida_merge.MERGE_KIND_PATCHES) | merge patched bytes | | [`MERGE_KIND_FLAGS`](#ida_merge.MERGE_KIND_FLAGS) | merge flags64_t | | [`MERGE_KIND_EXTRACMT`](#ida_merge.MERGE_KIND_EXTRACMT) | merge extra next or prev lines | | [`MERGE_KIND_AFLAGS_EA`](#ida_merge.MERGE_KIND_AFLAGS_EA) | merge aflags for mapped EA | | [`MERGE_KIND_IGNOREMICRO`](#ida_merge.MERGE_KIND_IGNOREMICRO) | IM ("$ ignore micro") flags. | | [`MERGE_KIND_FILEREGIONS`](#ida_merge.MERGE_KIND_FILEREGIONS) | merge fileregions | | [`MERGE_KIND_HIDDENRANGES`](#ida_merge.MERGE_KIND_HIDDENRANGES) | merge hidden ranges | | [`MERGE_KIND_SOURCEFILES`](#ida_merge.MERGE_KIND_SOURCEFILES) | merge source files ranges | | [`MERGE_KIND_FUNC`](#ida_merge.MERGE_KIND_FUNC) | merge func info | | [`MERGE_KIND_FRAMEMGR`](#ida_merge.MERGE_KIND_FRAMEMGR) | merge frames (globally: add/delete frames entirely) | | [`MERGE_KIND_FRAME`](#ida_merge.MERGE_KIND_FRAME) | merge function frame info (frame members) | | [`MERGE_KIND_STKPNTS`](#ida_merge.MERGE_KIND_STKPNTS) | merge SP change points | | [`MERGE_KIND_FLOWS`](#ida_merge.MERGE_KIND_FLOWS) | merge flows | | [`MERGE_KIND_CREFS`](#ida_merge.MERGE_KIND_CREFS) | merge crefs | | [`MERGE_KIND_DREFS`](#ida_merge.MERGE_KIND_DREFS) | merge drefs | | [`MERGE_KIND_BPTS`](#ida_merge.MERGE_KIND_BPTS) | merge breakpoints | | [`MERGE_KIND_WATCHPOINTS`](#ida_merge.MERGE_KIND_WATCHPOINTS) | merge watchpoints | | [`MERGE_KIND_BOOKMARKS`](#ida_merge.MERGE_KIND_BOOKMARKS) | merge bookmarks | | [`MERGE_KIND_TRYBLKS`](#ida_merge.MERGE_KIND_TRYBLKS) | merge try blocks | | [`MERGE_KIND_DIRTREE`](#ida_merge.MERGE_KIND_DIRTREE) | merge std dirtrees | | [`MERGE_KIND_VFTABLES`](#ida_merge.MERGE_KIND_VFTABLES) | merge vftables | | [`MERGE_KIND_SIGNATURES`](#ida_merge.MERGE_KIND_SIGNATURES) | signatures | | [`MERGE_KIND_PROBLEMS`](#ida_merge.MERGE_KIND_PROBLEMS) | problems | | [`MERGE_KIND_UI`](#ida_merge.MERGE_KIND_UI) | UI. | | [`MERGE_KIND_DEKSTOPS`](#ida_merge.MERGE_KIND_DEKSTOPS) | dekstops | | [`MERGE_KIND_NOTEPAD`](#ida_merge.MERGE_KIND_NOTEPAD) | notepad | | [`MERGE_KIND_LOADER`](#ida_merge.MERGE_KIND_LOADER) | loader data | | [`MERGE_KIND_DEBUGGER`](#ida_merge.MERGE_KIND_DEBUGGER) | debugger data | | [`MERGE_KIND_DBG_MEMREGS`](#ida_merge.MERGE_KIND_DBG_MEMREGS) | manual memory regions (debugger) | | [`MERGE_KIND_LUMINA`](#ida_merge.MERGE_KIND_LUMINA) | lumina function metadata | | [`MERGE_KIND_LAST`](#ida_merge.MERGE_KIND_LAST) | last predefined merge handler type. please note that there can be more merge handler types, registered by plugins and processor modules. | | [`MERGE_KIND_END`](#ida_merge.MERGE_KIND_END) | insert to the end of handler list, valid for merge_handler_params_t::insert_after | | [`MERGE_KIND_NONE`](#ida_merge.MERGE_KIND_NONE) | | | [`MH_LISTEN`](#ida_merge.MH_LISTEN) | merge handler will receive merge events | | [`MH_TERSE`](#ida_merge.MH_TERSE) | do not display equal lines in the merge results table | | [`MH_UI_NODETAILS`](#ida_merge.MH_UI_NODETAILS) | ida will not show the diffpos details | | [`MH_UI_COMPLEX`](#ida_merge.MH_UI_COMPLEX) | diffpos details won't be displayed in the diffpos chooser | | [`MH_UI_DP_NOLINEDIFF`](#ida_merge.MH_UI_DP_NOLINEDIFF) | Detail pane: do not show differences inside the line. | | [`MH_UI_DP_SHORTNAME`](#ida_merge.MH_UI_DP_SHORTNAME) | Detail pane: use the first part of a complex diffpos name as the tree node name. | | [`MH_UI_INDENT`](#ida_merge.MH_UI_INDENT) | preserve indent for diffpos name in diffpos chooser | | [`MH_UI_SPLITNAME`](#ida_merge.MH_UI_SPLITNAME) | ida will split the diffpos name by 7-bit ASCII char to create chooser columns | | [`MH_UI_CHAR_MASK`](#ida_merge.MH_UI_CHAR_MASK) | 7-bit ASCII split character | | [`MH_UI_COMMANAME`](#ida_merge.MH_UI_COMMANAME) | ida will split the diffpos name by ',' to create chooser columns | | [`MH_UI_COLONNAME`](#ida_merge.MH_UI_COLONNAME) | ida will split the diffpos name by ':' to create chooser columns | | [`NDS_IS_BOOL`](#ida_merge.NDS_IS_BOOL) | boolean value | | [`NDS_IS_EA`](#ida_merge.NDS_IS_EA) | EA value. | | [`NDS_IS_RELATIVE`](#ida_merge.NDS_IS_RELATIVE) | value is relative to index (stored as delta) | | [`NDS_IS_STR`](#ida_merge.NDS_IS_STR) | string value | | [`NDS_SUPVAL`](#ida_merge.NDS_SUPVAL) | stored as netnode supvals (not scalar) | | [`NDS_BLOB`](#ida_merge.NDS_BLOB) | stored as netnode blobs | | [`NDS_EV_RANGE`](#ida_merge.NDS_EV_RANGE) | enable default handling of mev_modified_ranges, mev_deleting_segm | | [`NDS_EV_FUNC`](#ida_merge.NDS_EV_FUNC) | enable default handling of mev_added_func/mev_deleting_func/mev_added_function/mev_deleting_function | | [`NDS_MAP_IDX`](#ida_merge.NDS_MAP_IDX) | apply ea2node() to index (==NETMAP_IDX) | | [`NDS_MAP_VAL`](#ida_merge.NDS_MAP_VAL) | apply ea2node() to value. Along with NDS_INC it gives effect of NETMAP_VAL, examples: altval_ea : NDS_MAP_IDX charval : NDS_VAL8 charval_ea: NDS_MAP_IDX|NDS_VAL8 eaget : NDS_MAP_IDX|NDS_MAP_VAL|NDS_INC | | [`NDS_VAL8`](#ida_merge.NDS_VAL8) | use 8-bit values (==NETMAP_V8) | | [`NDS_INC`](#ida_merge.NDS_INC) | stored value is incremented (scalars only) | | [`NDS_UI_ND`](#ida_merge.NDS_UI_ND) | UI: no need to show diffpos detail pane, MH_UI_NODETAILS, make sense if merge_node_helper_t is used | ## Classes | [`merge_data_t`](#ida_merge.merge_data_t) | | |---------------------------------------------------------------|----| | [`item_block_locator_t`](#ida_merge.item_block_locator_t) | | | [`merge_handler_params_t`](#ida_merge.merge_handler_params_t) | | | [`moddata_diff_helper_t`](#ida_merge.moddata_diff_helper_t) | | | [`merge_node_helper_t`](#ida_merge.merge_node_helper_t) | | | [`merge_node_info_t`](#ida_merge.merge_node_info_t) | | ## Functions | [`is_diff_merge_mode`](#ida_merge.is_diff_merge_mode)(→ bool) | Return TRUE if IDA is running in diff mode (MERGE_POLICY_MDIFF/MERGE_POLICY_VDIFF). | |-------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------| | [`create_nodeval_merge_handler`](#ida_merge.create_nodeval_merge_handler)(→ merge_handler_t \*) | Create a merge handler for netnode scalar/string values | | [`create_nodeval_merge_handlers`](#ida_merge.create_nodeval_merge_handlers)(→ None) | Create a serie of merge handlers for netnode scalar/string values (call create_nodeval_merge_handler() for each member of VALDESC) | | [`destroy_moddata_merge_handlers`](#ida_merge.destroy_moddata_merge_handlers)(→ None) | | | [`get_ea_diffpos_name`](#ida_merge.get_ea_diffpos_name)(→ Union[str, None]) | Get nice name for EA diffpos | ## Module Contents ### ida_merge.MERGE_KIND_NETNODE netnode (no merging, to be used in idbunits) ### ida_merge.MERGE_KIND_AUTOQ auto queues ### ida_merge.MERGE_KIND_INF merge the inf variable (global settings) ### ida_merge.MERGE_KIND_ENCODINGS merge encodings ### ida_merge.MERGE_KIND_ENCODINGS2 merge default encodings ### ida_merge.MERGE_KIND_SCRIPTS2 merge scripts common info ### ida_merge.MERGE_KIND_SCRIPTS merge scripts ### ida_merge.MERGE_KIND_CUSTDATA merge custom data type and formats ### ida_merge.MERGE_KIND_CUSTCNV merge custom calling conventions ### ida_merge.MERGE_KIND_ENUMS merge enums ### ida_merge.MERGE_KIND_STRUCTS merge structs (globally: add/delete structs entirely) ### ida_merge.MERGE_KIND_TILS merge type libraries ### ida_merge.MERGE_KIND_TINFO merge tinfo ### ida_merge.MERGE_KIND_STRMEM merge struct members ### ida_merge.MERGE_KIND_UDTMEM merge UDT members (local types) ### ida_merge.MERGE_KIND_GHSTRCMT merge ghost structure comment ### ida_merge.MERGE_KIND_STRMEMCMT merge member comments for ghost struc ### ida_merge.MERGE_KIND_SELECTORS merge selectors ### ida_merge.MERGE_KIND_STT merge flag storage types ### ida_merge.MERGE_KIND_SEGMENTS merge segments ### ida_merge.MERGE_KIND_SEGGRPS merge segment groups ### ida_merge.MERGE_KIND_SEGREGS merge segment registers ### ida_merge.MERGE_KIND_ORPHANS merge orphan bytes ### ida_merge.MERGE_KIND_BYTEVAL merge byte values ### ida_merge.MERGE_KIND_FIXUPS merge fixups ### ida_merge.MERGE_KIND_MAPPING merge manual memory mapping ### ida_merge.MERGE_KIND_EXPORTS merge exports ### ida_merge.MERGE_KIND_IMPORTS merge imports ### ida_merge.MERGE_KIND_PATCHES merge patched bytes ### ida_merge.MERGE_KIND_FLAGS merge flags64_t ### ida_merge.MERGE_KIND_EXTRACMT merge extra next or prev lines ### ida_merge.MERGE_KIND_AFLAGS_EA merge aflags for mapped EA ### ida_merge.MERGE_KIND_IGNOREMICRO IM (”$ ignore micro”) flags. ### ida_merge.MERGE_KIND_FILEREGIONS merge fileregions ### ida_merge.MERGE_KIND_HIDDENRANGES merge hidden ranges ### ida_merge.MERGE_KIND_SOURCEFILES merge source files ranges ### ida_merge.MERGE_KIND_FUNC merge func info ### ida_merge.MERGE_KIND_FRAMEMGR merge frames (globally: add/delete frames entirely) ### ida_merge.MERGE_KIND_FRAME merge function frame info (frame members) ### ida_merge.MERGE_KIND_STKPNTS merge SP change points ### ida_merge.MERGE_KIND_FLOWS merge flows ### ida_merge.MERGE_KIND_CREFS merge crefs ### ida_merge.MERGE_KIND_DREFS merge drefs ### ida_merge.MERGE_KIND_BPTS merge breakpoints ### ida_merge.MERGE_KIND_WATCHPOINTS merge watchpoints ### ida_merge.MERGE_KIND_BOOKMARKS merge bookmarks ### ida_merge.MERGE_KIND_TRYBLKS merge try blocks ### ida_merge.MERGE_KIND_DIRTREE merge std dirtrees ### ida_merge.MERGE_KIND_VFTABLES merge vftables ### ida_merge.MERGE_KIND_SIGNATURES signatures ### ida_merge.MERGE_KIND_PROBLEMS problems ### ida_merge.MERGE_KIND_UI UI. ### ida_merge.MERGE_KIND_DEKSTOPS dekstops ### ida_merge.MERGE_KIND_NOTEPAD notepad ### ida_merge.MERGE_KIND_LOADER loader data ### ida_merge.MERGE_KIND_DEBUGGER debugger data ### ida_merge.MERGE_KIND_DBG_MEMREGS manual memory regions (debugger) ### ida_merge.MERGE_KIND_LUMINA lumina function metadata ### ida_merge.MERGE_KIND_LAST last predefined merge handler type. please note that there can be more merge handler types, registered by plugins and processor modules. ### ida_merge.MERGE_KIND_END insert to the end of handler list, valid for merge_handler_params_t::insert_after ### ida_merge.MERGE_KIND_NONE ### ida_merge.is_diff_merge_mode() → [bool](https://docs.python.org/3/library/functions.html#bool) Return TRUE if IDA is running in diff mode (MERGE_POLICY_MDIFF/MERGE_POLICY_VDIFF). ### *class* ida_merge.merge_data_t(\*args, \*\*kwargs) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### dbctx_ids *: [int](https://docs.python.org/3/library/functions.html#int)[3]* local, remote, base ids #### nbases *: [int](https://docs.python.org/3/library/functions.html#int)* number of database participating in merge process, maybe 2 or 3 #### ev_handlers *: merge_handlers_t* event handlers #### item_block_locator *: merge_data_t::item_block_locator_t \** #### last_udt_related_merger *: merge_handler_t \** #### set_dbctx_ids(local: [int](https://docs.python.org/3/library/functions.html#int), remote: [int](https://docs.python.org/3/library/functions.html#int), base: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### local_id() → [int](https://docs.python.org/3/library/functions.html#int) #### remote_id() → [int](https://docs.python.org/3/library/functions.html#int) #### base_id() → [int](https://docs.python.org/3/library/functions.html#int) #### add_event_handler(handler: merge_handler_t \*) → [None](https://docs.python.org/3/library/constants.html#None) #### remove_event_handler(handler: merge_handler_t \*) → [None](https://docs.python.org/3/library/constants.html#None) #### get_block_head(idx: diff_source_idx_t, item_head: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) #### setup_blocks(dst_idx: diff_source_idx_t, src_idx: diff_source_idx_t, region: diff_range_t const &) → [bool](https://docs.python.org/3/library/functions.html#bool) #### has_existing_node(nodename: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [bool](https://docs.python.org/3/library/functions.html#bool) check that node exists in any of databases #### map_privrange_id(tid: tid_t \*, ea: ida_idaapi.ea_t, \_from: diff_source_idx_t, to: diff_source_idx_t, strict: bool = True) → [bool](https://docs.python.org/3/library/functions.html#bool) map IDs of structures, enumerations and their members * **Parameters:** * **tid** – item ID in TO database * **ea** – item ID to find counterpart * **to** – destination database index, diff_source_idx_t * **strict** – raise interr if could not map * **Returns:** success #### map_tinfo(tif: [tinfo_t](../ida_typeinf/index.md#ida_typeinf.tinfo_t), \_from: diff_source_idx_t, to: diff_source_idx_t, strict: [bool](https://docs.python.org/3/library/functions.html#bool) = True) → [bool](https://docs.python.org/3/library/functions.html#bool) migrate type, replaces type references into FROM database to references into TO database * **Parameters:** * **tif** – type to migrate, will be cleared in case of fail * **to** – destination database index, diff_source_idx_t * **strict** – raise interr if could not map * **Returns:** success #### compare_merging_tifs(tif1: [tinfo_t](../ida_typeinf/index.md#ida_typeinf.tinfo_t), diffidx1: diff_source_idx_t, tif2: [tinfo_t](../ida_typeinf/index.md#ida_typeinf.tinfo_t), diffidx2: diff_source_idx_t) → [int](https://docs.python.org/3/library/functions.html#int) compare types from two databases * **Parameters:** * **tif1** – type * **diffidx1** – database index, diff_source_idx_t * **tif2** – type * **diffidx2** – database index, diff_source_idx_t * **Returns:** -1, 0, 1 ### *class* ida_merge.item_block_locator_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### get_block_head(md: [merge_data_t](#ida_merge.merge_data_t), idx: diff_source_idx_t, item_head: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) #### setup_blocks(md: merge_data_t, \_from: diff_source_idx_t, to: diff_source_idx_t, region: diff_range_t const &) → [bool](https://docs.python.org/3/library/functions.html#bool) ### *class* ida_merge.merge_handler_params_t(\_md: [merge_data_t](#ida_merge.merge_data_t), \_label: [str](https://docs.python.org/3/library/stdtypes.html#str), \_kind: merge_kind_t, \_insert_after: merge_kind_t, \_mh_flags: [int](https://docs.python.org/3/library/functions.html#int)) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### md *: merge_data_t &* #### label *: [str](https://docs.python.org/3/library/stdtypes.html#str)* #### kind *: merge_kind_t* merge handler kind merge_kind_t #### insert_after *: merge_kind_t* desired position inside ‘handlers’ merge_kind_t #### mh_flags *: [int](https://docs.python.org/3/library/functions.html#int)* #### ui_has_details(\*args) → [bool](https://docs.python.org/3/library/functions.html#bool) This function has the following signatures: > 1. ui_has_details() -> bool > 2. ui_has_details(_mh_flags: int) -> bool # 0: ui_has_details() -> bool # 1: ui_has_details(_mh_flags: int) -> bool Should IDA display the diffpos detail pane? #### ui_complex_details(\*args) → [bool](https://docs.python.org/3/library/functions.html#bool) This function has the following signatures: > 1. ui_complex_details() -> bool > 2. ui_complex_details(_mh_flags: int) -> bool # 0: ui_complex_details() -> bool # 1: ui_complex_details(_mh_flags: int) -> bool Do not display the diffpos details in the chooser. For example, the MERGE_KIND_SCRIPTS handler puts the script body as the diffpos detail. It would not be great to show them as part of the chooser. #### ui_complex_name(\*args) → [bool](https://docs.python.org/3/library/functions.html#bool) This function has the following signatures: > 1. ui_complex_name() -> bool > 2. ui_complex_name(_mh_flags: int) -> bool # 0: ui_complex_name() -> bool # 1: ui_complex_name(_mh_flags: int) -> bool It customary to create long diffpos names having many components that are separated by any 7-bit ASCII character (besides of ‘0’). In this case it is possible to instruct IDA to use this separator to create a multi-column chooser. For example the MERGE_KIND_ENUMS handler has the following diffpos name: enum_1,enum_2 If MH_UI_COMMANAME is specified, IDA will create 2 columns for these names. #### ui_split_char(\*args) → char This function has the following signatures: > 1. ui_split_char() -> char > 2. ui_split_char(_mh_flags: int) -> char # 0: ui_split_char() -> char # 1: ui_split_char(_mh_flags: int) -> char #### ui_split_str(\*args) → [str](https://docs.python.org/3/library/stdtypes.html#str) This function has the following signatures: > 1. ui_split_str() -> str > 2. ui_split_str(_mh_flags: int) -> str # 0: ui_split_str() -> str # 1: ui_split_str(_mh_flags: int) -> str #### ui_dp_shortname(\*args) → [bool](https://docs.python.org/3/library/functions.html#bool) This function has the following signatures: > 1. ui_dp_shortname() -> bool > 2. ui_dp_shortname(_mh_flags: int) -> bool # 0: ui_dp_shortname() -> bool # 1: ui_dp_shortname(_mh_flags: int) -> bool The detail pane shows the diffpos details for the current diffpos range as a tree-like view. In this pane the diffpos names are used as tree node names and the diffpos details as their children. Sometimes, for complex diffpos names, the first part of the name looks better than the entire name. For example, the MERGE_KIND_SEGMENTS handler has the following diffpos name: ,,, if MH_UI_DP_SHORTNAME is specified, IDA will use as a tree node name #### ui_linediff(\*args) → [bool](https://docs.python.org/3/library/functions.html#bool) This function has the following signatures: > 1. ui_linediff() -> bool > 2. ui_linediff(_mh_flags: int) -> bool # 0: ui_linediff() -> bool # 1: ui_linediff(_mh_flags: int) -> bool In detail pane IDA shows difference between diffpos details. IDA marks added or deleted detail by color. In the modified detail the changes are marked. Use this UI hint if you do not want to show the differences inside detail. #### ui_indent(\*args) → [bool](https://docs.python.org/3/library/functions.html#bool) This function has the following signatures: > 1. ui_indent() -> bool > 2. ui_indent(_mh_flags: int) -> bool # 0: ui_indent() -> bool # 1: ui_indent(_mh_flags: int) -> bool In the ordinary situation the spaces from the both sides of diffpos name are trimmed. Use this UI hint to preserve the leading spaces. ### ida_merge.MH_LISTEN merge handler will receive merge events ### ida_merge.MH_TERSE do not display equal lines in the merge results table ### ida_merge.MH_UI_NODETAILS ida will not show the diffpos details ### ida_merge.MH_UI_COMPLEX diffpos details won’t be displayed in the diffpos chooser ### ida_merge.MH_UI_DP_NOLINEDIFF Detail pane: do not show differences inside the line. ### ida_merge.MH_UI_DP_SHORTNAME Detail pane: use the first part of a complex diffpos name as the tree node name. ### ida_merge.MH_UI_INDENT preserve indent for diffpos name in diffpos chooser ### ida_merge.MH_UI_SPLITNAME ida will split the diffpos name by 7-bit ASCII char to create chooser columns ### ida_merge.MH_UI_CHAR_MASK 7-bit ASCII split character ### ida_merge.MH_UI_COMMANAME ida will split the diffpos name by ‘,’ to create chooser columns ### ida_merge.MH_UI_COLONNAME ida will split the diffpos name by ‘:’ to create chooser columns ### *class* ida_merge.moddata_diff_helper_t(\_module_name: [str](https://docs.python.org/3/library/stdtypes.html#str), \_netnode_name: [str](https://docs.python.org/3/library/stdtypes.html#str), \_fields: [idbattr_info_t](../ida_ida/index.md#ida_ida.idbattr_info_t)) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### module_name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* will be used as a prefix for field desc #### netnode_name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* name of netnode with module data attributes #### fields *: idbattr_info_t const \** module data attribute descriptions #### nfields *: [int](https://docs.python.org/3/library/functions.html#int)* number of descriptions #### additional_mh_flags *: [int](https://docs.python.org/3/library/functions.html#int)* additional merge handler flags #### merge_starting(arg0: diff_source_idx_t, arg1: void \*) → [None](https://docs.python.org/3/library/constants.html#None) #### merge_ending(arg0: diff_source_idx_t, arg1: void \*) → [None](https://docs.python.org/3/library/constants.html#None) #### get_struc_ptr(arg0: [merge_data_t](#ida_merge.merge_data_t), arg1: diff_source_idx_t, arg2: [idbattr_info_t](../ida_ida/index.md#ida_ida.idbattr_info_t)) → void \* #### print_diffpos_details(arg0: qstrvec_t \*, arg1: idbattr_info_t) → [None](https://docs.python.org/3/library/constants.html#None) #### val2str(arg0: [str](https://docs.python.org/3/library/stdtypes.html#str), arg1: [idbattr_info_t](../ida_ida/index.md#ida_ida.idbattr_info_t), arg2: uint64) → [bool](https://docs.python.org/3/library/functions.html#bool) #### str2val(arg0: uint64 \*, arg1: idbattr_info_t, arg2: str) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_merge.NDS_IS_BOOL boolean value ### ida_merge.NDS_IS_EA EA value. ### ida_merge.NDS_IS_RELATIVE value is relative to index (stored as delta) ### ida_merge.NDS_IS_STR string value ### ida_merge.NDS_SUPVAL stored as netnode supvals (not scalar) ### ida_merge.NDS_BLOB stored as netnode blobs ### ida_merge.NDS_EV_RANGE enable default handling of mev_modified_ranges, mev_deleting_segm ### ida_merge.NDS_EV_FUNC enable default handling of mev_added_func/mev_deleting_func/mev_added_function/mev_deleting_function ### ida_merge.NDS_MAP_IDX apply ea2node() to index (==NETMAP_IDX) ### ida_merge.NDS_MAP_VAL apply ea2node() to value. Along with NDS_INC it gives effect of NETMAP_VAL, examples: altval_ea : NDS_MAP_IDX charval : NDS_VAL8 charval_ea: NDS_MAP_IDX|NDS_VAL8 eaget : NDS_MAP_IDX|NDS_MAP_VAL|NDS_INC ### ida_merge.NDS_VAL8 use 8-bit values (==NETMAP_V8) ### ida_merge.NDS_INC stored value is incremented (scalars only) ### ida_merge.NDS_UI_ND UI: no need to show diffpos detail pane, MH_UI_NODETAILS, make sense if merge_node_helper_t is used ### *class* ida_merge.merge_node_helper_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### print_entry_name(arg0: uchar, arg1: nodeidx_t, arg2: void \*) → [str](https://docs.python.org/3/library/stdtypes.html#str) print the name of the specified entry (to be used in print_diffpos_name) #### print_entry_details(arg0: qstrvec_t \*, arg1: uchar, arg2: nodeidx_t, arg3: void \*) → [None](https://docs.python.org/3/library/constants.html#None) print the details of the specified entry usually contains multiple lines, one for each attribute or detail. (to be used in print_diffpos_details) #### get_column_headers(arg0: qstrvec_t \*, arg1: uchar, arg2: void \*) → [None](https://docs.python.org/3/library/constants.html#None) get column headers for chooser (to be used in linear_diff_source_t::get_column_headers) #### is_mergeable(arg0: uchar, arg1: nodeidx_t) → [bool](https://docs.python.org/3/library/functions.html#bool) filter: check if we should perform merging for given record #### get_netnode() → [netnode](../ida_netnode/index.md#ida_netnode.netnode) return netnode to be used as source. If this function returns BADNODE netnode will be created using netnode name passed to create_nodeval_diff_source #### map_scalar(arg0: nodeidx_t \*, arg1: void \*, arg2: diff_source_idx_t, arg3: diff_source_idx_t) → [None](https://docs.python.org/3/library/constants.html#None) map scalar/string/buffered value #### map_string(arg0: str, arg1: void \*, arg2: diff_source_idx_t, arg3: diff_source_idx_t) → [None](https://docs.python.org/3/library/constants.html#None) #### refresh(arg0: uchar, arg1: void \*) → [None](https://docs.python.org/3/library/constants.html#None) notify helper that some data was changed in the database and internal structures (e.g. caches) should be refreshed #### *static* append_eavec(s: str, prefix: str, eas: eavec_t const &) → [None](https://docs.python.org/3/library/constants.html#None) can be used by derived classes ### *class* ida_merge.merge_node_info_t(name: [str](https://docs.python.org/3/library/stdtypes.html#str), tag: uchar, nds_flags: [int](https://docs.python.org/3/library/functions.html#int), node_helper: [merge_node_helper_t](#ida_merge.merge_node_helper_t) = None) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* name of the array (label) #### tag *: uchar* a tag used to access values in the netnode #### nds_flags *: [int](https://docs.python.org/3/library/functions.html#int)* node value attributes (a combination of nds_flags_t) #### node_helper *: merge_node_helper_t \** ### ida_merge.create_nodeval_merge_handler(mhp: [merge_handler_params_t](#ida_merge.merge_handler_params_t), label: [str](https://docs.python.org/3/library/stdtypes.html#str), nodename: [str](https://docs.python.org/3/library/stdtypes.html#str), tag: uchar, nds_flags: [int](https://docs.python.org/3/library/functions.html#int), node_helper: [merge_node_helper_t](#ida_merge.merge_node_helper_t) = None, skip_empty_nodes: [bool](https://docs.python.org/3/library/functions.html#bool) = True) → merge_handler_t \* Create a merge handler for netnode scalar/string values * **Parameters:** * **mhp** – merging parameters * **label** – handler short name (to be be appended to mhp.label) * **nodename** – netnode name * **tag** – a tag used to access values in the netnode * **nds_flags** – netnode value attributes (a combination of nds_flags_t) * **skip_empty_nodes** – do not create handler in case of empty netnode * **Returns:** diff source object (normally should be attahced to a merge handler) ### ida_merge.create_nodeval_merge_handlers(out: merge_handlers_t \*, mhp: merge_handler_params_t, nodename: str, valdesc: merge_node_info_t, skip_empty_nodes: bool = True) → [None](https://docs.python.org/3/library/constants.html#None) Create a serie of merge handlers for netnode scalar/string values (call create_nodeval_merge_handler() for each member of VALDESC) * **Parameters:** * **out** – [out] created handlers will be placed here * **mhp** – merging parameters * **nodename** – netnode name * **valdesc** – array of handler descriptions * **skip_empty_nodes** – do not create handlers for empty netnodes * **Returns:** diff source object (normally should be attahced to a merge handler) ### ida_merge.destroy_moddata_merge_handlers(data_id: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) ### ida_merge.get_ea_diffpos_name(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None) Get nice name for EA diffpos * **Parameters:** **ea** – diffpos # index.html.md # curpos_details summary: print information about the current position in decompilation description: : Shows how user input information can be retrieved during processing of a notification triggered by that input see_also: vds_hooks level: advanced ## Attributes | [`curpos_details`](#curpos_details.curpos_details) | | |------------------------------------------------------|----| ## Classes | [`curpos_details_t`](#curpos_details.curpos_details_t) | | |----------------------------------------------------------|----| ## Module Contents ### *class* curpos_details.curpos_details_t(\_flags: [int](https://docs.python.org/3/library/functions.html#int) = 0, \_hkcb_flags: [int](https://docs.python.org/3/library/functions.html#int) = 1) Bases: [`ida_hexrays.Hexrays_Hooks`](../ida_hexrays/index.md#ida_hexrays.Hexrays_Hooks) #### curpos(v) Current cursor position has been changed. (for example, by left-clicking or using keyboard) * **Parameters:** **vu** – (vdui_t ``` * ``` ) ### curpos_details.curpos_details # index.html.md # vds6 summary: superficially modify the decompilation output description: : modifies the decompilation output in a superficial manner, by removing some white spaces
Note: this is rather crude, not quite “pythonic” code. level: intermediate ## Attributes | [`do_dbg`](#vds6.do_dbg) | | |----------------------------|----| ## Classes | [`vds6_hooks_t`](#vds6.vds6_hooks_t) | | |----------------------------------------|--------------------------------------| | [`my_plugin_t`](#vds6.my_plugin_t) | Base class for all scripted plugins. | ## Functions | [`dbg`](#vds6.dbg)(msg) | | |----------------------------------------------------------|----| | [`is_cident_char`](#vds6.is_cident_char)(c) | | | [`my_tag_skipcodes`](#vds6.my_tag_skipcodes)(l, storage) | | | [`remove_spaces`](#vds6.remove_spaces)(sl) | | | [`PLUGIN_ENTRY`](#vds6.PLUGIN_ENTRY)() | | ## Module Contents ### vds6.do_dbg *= False* ### vds6.dbg(msg) ### vds6.is_cident_char(c) ### vds6.my_tag_skipcodes(l, storage) ### vds6.remove_spaces(sl) ### *class* vds6.vds6_hooks_t(\_flags: [int](https://docs.python.org/3/library/functions.html#int) = 0, \_hkcb_flags: [int](https://docs.python.org/3/library/functions.html#int) = 1) Bases: [`ida_hexrays.Hexrays_Hooks`](../ida_hexrays/index.md#ida_hexrays.Hexrays_Hooks) #### func_printed(cfunc) Function text has been generated. Plugins may modify the text in cfunc_t::sv. However, it is too late to modify the ctree or microcode. The text uses regular color codes (see lines.hpp) COLOR_ADDR is used to store pointers to ctree items. * **Parameters:** **cfunc** – (cfunc_t ``` * ``` ) ### *class* vds6.my_plugin_t Bases: [`ida_idaapi.plugin_t`](../ida_idaapi/index.md#ida_idaapi.plugin_t) Base class for all scripted plugins. #### flags *= 16* #### wanted_name *= 'Hex-Rays space remover (IDAPython)'* #### wanted_hotkey *= ''* #### comment *= 'Sample plugin6 for Hex-Rays decompiler'* #### help *= ''* #### init() #### term() #### run(arg) ### vds6.PLUGIN_ENTRY() # index.html.md # setpehdr summary: assign DOS/PE headers structures to a PE binary description: : The goal of this script is to demonstrate some usage of the type API.
In this script, we:
* load a PE64 file in binary mode * import some types from the mssdk64 til * apply these types at the correct ofsset in the DB * finally, rebase the program based on the information stored in the ImageBase field of the IMAGE_OPTIONAL_HEADER64. level: intermediate ## Functions | [`create_struct_at`](#setpehdr.create_struct_at)(id, ea[, var_name]) | Create the structure identified by id at | |------------------------------------------------------------------------------|----------------------------------------------------| | [`get_struct_size`](#setpehdr.get_struct_size)(id) | Return the size of the structure identified by id. | | [`get_pe_ea`](#setpehdr.get_pe_ea)(id) | Return the address of the pe header. | | [`get_field_off`](#setpehdr.get_field_off)(id, field) | Return the offset in bytes of the member | | [`get_struct_field_off`](#setpehdr.get_struct_field_off)(struct_name, field) | Return the offset in bytes of the member | | [`main`](#setpehdr.main)() | | ## Module Contents ### setpehdr.create_struct_at(id, ea, var_name=None) Create the structure identified by id at address ea. ### setpehdr.get_struct_size(id) Return the size of the structure identified by id. ### setpehdr.get_pe_ea(id) Return the address of the pe header. ### setpehdr.get_field_off(id, field) Return the offset in bytes of the member ‘field’ in the structure identified by ‘id’. ### setpehdr.get_struct_field_off(struct_name, field) Return the offset in bytes of the member ‘field’ in the structure identified by ‘struct_name’. ### setpehdr.main() # index.html.md # vds1 summary: decompile & print current function description: : Decompile the function under the cursor level: beginner ## Functions | [`main`](#vds1.main)() | | |--------------------------|----| ## Module Contents ### vds1.main() # index.html.md # vds8 summary: improve decompilation by turning specific patterns into custom function calls description: : Registers an action that uses a ida_hexrays.udc_filter_t to decompile svc 0x900001 and svc 0x9000F8 as function calls to svc_exit() and svc_exit_group() respectively.
You will need to have an ARM + Linux IDB for this script to be usable
In addition to having a shortcut, the action will be present in the context menu. level: intermediate ## Attributes | [`ACTION_NAME`](#vds8.ACTION_NAME) | | |--------------------------------------------|----| | [`ACTION_SHORTCUT`](#vds8.ACTION_SHORTCUT) | | | [`my_hooks`](#vds8.my_hooks) | | | [`SVC_EXIT`](#vds8.SVC_EXIT) | | | [`SVC_EXIT_GROUP`](#vds8.SVC_EXIT_GROUP) | | | [`udc_exit`](#vds8.udc_exit) | | ## Classes | [`udc_exit_t`](#vds8.udc_exit_t) | | |--------------------------------------------|----| | [`toggle_udc_ah_t`](#vds8.toggle_udc_ah_t) | | | [`my_hooks_t`](#vds8.my_hooks_t) | | ## Module Contents ### vds8.ACTION_NAME *= 'vds8.py:udcall'* ### vds8.ACTION_SHORTCUT *= 'Ctrl+Shift+U'* ### *class* vds8.udc_exit_t(code, name) Bases: [`ida_hexrays.udc_filter_t`](../ida_hexrays/index.md#ida_hexrays.udc_filter_t) #### code #### installed *= False* #### match(cdg) return true if the filter object should be applied to given instruction #### install() #### uninstall() #### toggle_install() ### *class* vds8.toggle_udc_ah_t Bases: [`ida_kernwin.action_handler_t`](../ida_kernwin/index.md#ida_kernwin.action_handler_t) #### activate(ctx) Activate an action. This function implements the core behavior of an action. It is called when the action is triggered, from a menu, from a popup menu, from the toolbar, or programmatically. * **Returns:** non-zero: all IDA windows will be refreshed #### update(ctx) Update an action. This is called when the context of the UI changed, and we need to let the action update some of its properties if needed (label, icon, …) In addition, this lets IDA know whether the action is enabled, and when it should be queried for availability again. Note: This callback is not meant to change anything in the application’s state, except by calling one (or many) of the “update_action_\*()” functions on this very action. ### *class* vds8.my_hooks_t(\_flags: [int](https://docs.python.org/3/library/functions.html#int) = 0, \_hkcb_flags: [int](https://docs.python.org/3/library/functions.html#int) = 1) Bases: [`ida_kernwin.UI_Hooks`](../ida_kernwin/index.md#ida_kernwin.UI_Hooks) #### populating_widget_popup(widget, popup) IDA is populating the context menu for a widget. This is your chance to attach_action_to_popup(). Have a look at ui_finish_populating_widget_popup, if you want to augment the context menu with your own actions after the menu has had a chance to be properly populated by the owning component or plugin (which typically does it on ui_populating_widget_popup.) * **Parameters:** * **widget** – (TWidget ``` * ``` ) * **popup_handle** – (TPopupMenu ``` * ``` ) * **ctx** – (const action_activation_ctx_t ``` * ``` ) * **Returns:** void ### vds8.my_hooks ### vds8.SVC_EXIT *= 9437185* ### vds8.SVC_EXIT_GROUP *= 9437432* ### vds8.udc_exit # index.html.md # vds_create_hint summary: provide custom decompiler hints description: : Handle ida_hexrays.hxe_create_hint notification using hooks, to return our own.
If the object under the cursor is:
* a function call, prefix the original decompiler hint with
``` ` ```
==> \` * a local variable declaration, replace the hint with our own in the form of !{varname} (where {varname} is replaced with the variable name) * an if statement, replace the hint with our own, saying “condition” level: beginner ## Attributes | [`vds_hooks`](#vds_create_hint.vds_hooks) | | |---------------------------------------------|----| ## Classes | [`hint_hooks_t`](#vds_create_hint.hint_hooks_t) | | |---------------------------------------------------|----| ## Module Contents ### *class* vds_create_hint.hint_hooks_t(\_flags: [int](https://docs.python.org/3/library/functions.html#int) = 0, \_hkcb_flags: [int](https://docs.python.org/3/library/functions.html#int) = 1) Bases: [`ida_hexrays.Hexrays_Hooks`](../ida_hexrays/index.md#ida_hexrays.Hexrays_Hooks) #### create_hint(vu) Create a hint for the current item. * **Parameters:** **vu** – (vdui_t ``` * ``` ) * **Returns:** hint: (qstring ``` * ``` ); important_lines: (int ``` * ``` ) ### vds_create_hint.vds_hooks # index.html.md # jump_next_comment summary: implement a “jump to next comment” action within IDA’s listing description: : We want our action not only to find the next line containing a comment, but to also place the cursor at the right horizontal position.
To find that position, we will have to inspect the text that IDA generates, looking for the start of a comment. However, we won’t be looking for a comment “prefix” (e.g., “; “), as that would be too fragile.
Instead, we will look for special “tags” that IDA injects into textual lines, and that bear semantic information.
Those tags are primarily used for rendering (i.e., switching colors), but can also be very handy for spotting tokens of interest (registers, addresses, comments, prefixes, instruction mnemonics, …) keywords: idaview, actions see_also: save_and_restore_listing_pos level: intermediate ## Attributes | [`ACTION_NAME`](#jump_next_comment.ACTION_NAME) | | |---------------------------------------------------------|----| | [`ACTION_LABEL`](#jump_next_comment.ACTION_LABEL) | | | [`ACTION_SHORTCUT`](#jump_next_comment.ACTION_SHORTCUT) | | | [`ACTION_HELP`](#jump_next_comment.ACTION_HELP) | | ## Classes | [`jump_next_comment_ah_t`](#jump_next_comment.jump_next_comment_ah_t) | | |-------------------------------------------------------------------------|----| ## Functions | [`find_comment_visual_position_in_tagged_line`](#jump_next_comment.find_comment_visual_position_in_tagged_line)(line) | We'll look for tags for all types of comments, and if | |-------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------| | [`jump_next_comment`](#jump_next_comment.jump_next_comment)(v) | Starting at the current line, keep generating lines until | ## Module Contents ### jump_next_comment.find_comment_visual_position_in_tagged_line(line) We’ll look for tags for all types of comments, and if found return the visual position of the tag in the line (using ‘ida_lines.tag_strlen’) ### jump_next_comment.jump_next_comment(v) Starting at the current line, keep generating lines until a comment is found. When this happens, position the viewer at the right coordinates. ### *class* jump_next_comment.jump_next_comment_ah_t Bases: [`ida_kernwin.action_handler_t`](../ida_kernwin/index.md#ida_kernwin.action_handler_t) #### activate(ctx) Activate an action. This function implements the core behavior of an action. It is called when the action is triggered, from a menu, from a popup menu, from the toolbar, or programmatically. * **Returns:** non-zero: all IDA windows will be refreshed #### update(ctx) Update an action. This is called when the context of the UI changed, and we need to let the action update some of its properties if needed (label, icon, …) In addition, this lets IDA know whether the action is enabled, and when it should be queried for availability again. Note: This callback is not meant to change anything in the application’s state, except by calling one (or many) of the “update_action_\*()” functions on this very action. ### jump_next_comment.ACTION_NAME *= 'jump_next_comment:jump'* ### jump_next_comment.ACTION_LABEL *= 'Jump to the next comment'* ### jump_next_comment.ACTION_SHORTCUT *= 'Ctrl+Alt+C'* ### jump_next_comment.ACTION_HELP *= 'Press Ctrl+Alt+C to jump to the next comment'* # index.html.md # choose summary: show tabular data description: : Shows how to subclass the ida_kernwin.Choose class to show data organized in a simple table. In addition, registers a couple actions that can be applied to it. keywords: chooser, actions see_also: choose_multi level: intermediate ## Attributes | [`actions_variants`](#choose.actions_variants) | | |--------------------------------------------------|----| | [`actname`](#choose.actname) | | ## Classes | [`chooser_handler_t`](#choose.chooser_handler_t) | | |----------------------------------------------------|------------------------| | [`MyChoose`](#choose.MyChoose) | Chooser wrapper class. | ## Functions | [`test_choose`](#choose.test_choose)([modal, nb]) | | |----------------------------------------------------------|----| | [`test_choose_embedded`](#choose.test_choose_embedded)() | | ## Module Contents ### *class* choose.chooser_handler_t(thing) Bases: [`ida_kernwin.action_handler_t`](../ida_kernwin/index.md#ida_kernwin.action_handler_t) #### thing #### activate(ctx) Activate an action. This function implements the core behavior of an action. It is called when the action is triggered, from a menu, from a popup menu, from the toolbar, or programmatically. * **Returns:** non-zero: all IDA windows will be refreshed #### update(ctx) Update an action. This is called when the context of the UI changed, and we need to let the action update some of its properties if needed (label, icon, …) In addition, this lets IDA know whether the action is enabled, and when it should be queried for availability again. Note: This callback is not meant to change anything in the application’s state, except by calling one (or many) of the “update_action_\*()” functions on this very action. #### *static* compose_action_name(v) ### choose.actions_variants *= ['A', 'B']* ### choose.actname *= 'choose:actA'* ### *class* choose.MyChoose(title, nb=5, flags=0, modal=False, embedded=False, width=None, height=None) Bases: [`ida_kernwin.Choose`](../ida_kernwin/index.md#ida_kernwin.Choose) Chooser wrapper class. Some constants are defined in this class. Please refer to kernwin.hpp for more information. #### n *= 0* #### items #### icon *= 5* #### selcount *= 0* #### modal *= False* #### popup_names *= ['Inzert', 'Del leet', 'Ehdeet', 'Ree frech']* #### OnInit() Initialize the chooser and populate it. This callback is optional #### OnGetSize() Get the number of elements in the chooser. This callback is mandatory * **Returns:** the number of elements #### OnGetLine(n) Get data for an element This callback is mandatory * **Parameters:** **n** – the index to fetch data for * **Returns:** a list of strings #### OnGetIcon(n) Get an icon to associate with the first cell of an element * **Parameters:** **n** – index of the element * **Returns:** an icon ID #### OnGetLineAttr(n) Get attributes for an element * **Parameters:** **n** – index of the element * **Returns:** a tuple (color, flags) #### OnInsertLine(n) User asked to insert an element * **Parameters:** **sel** – the current selection * **Returns:** a tuple (changed, selection) #### OnDeleteLine(n) User deleted an element * **Parameters:** **sel** – the current selection * **Returns:** a tuple (changed, selection) #### OnEditLine(n) User asked to edit an element. * **Parameters:** **sel** – the current selection * **Returns:** a tuple (changed, selection) #### OnRefresh(n) The chooser needs to be refreshed. It returns the new positions of the selected items. * **Parameters:** **sel** – the current selection * **Returns:** a tuple (changed, selection) #### OnSelectLine(n) User pressed the enter key, or double-clicked a selection * **Parameters:** **sel** – the current selection * **Returns:** a tuple (changed, selection) #### OnClose() The chooser window is closed. #### show() #### make_item() ### choose.test_choose(modal=False, nb=10) ### choose.test_choose_embedded() # index.html.md # ida_moves ## Attributes | [`LSEF_PLACE`](#ida_moves.LSEF_PLACE) | | |-------------------------------------------------------------------------------------|------------------------------| | [`LSEF_RINFO`](#ida_moves.LSEF_RINFO) | | | [`LSEF_PTYPE`](#ida_moves.LSEF_PTYPE) | | | [`LSEF_ALL`](#ida_moves.LSEF_ALL) | | | [`UNHID_SEGM`](#ida_moves.UNHID_SEGM) | unhid a segment at 'target' | | [`UNHID_FUNC`](#ida_moves.UNHID_FUNC) | unhid a function at 'target' | | [`UNHID_RANGE`](#ida_moves.UNHID_RANGE) | unhid an range at 'target' | | [`DEFAULT_CURSOR_Y`](#ida_moves.DEFAULT_CURSOR_Y) | | | [`DEFAULT_LNNUM`](#ida_moves.DEFAULT_LNNUM) | | | [`CURLOC_LIST`](#ida_moves.CURLOC_LIST) | | | [`MAX_MARK_SLOT`](#ida_moves.MAX_MARK_SLOT) | | | [`LHF_HISTORY_DISABLED`](#ida_moves.LHF_HISTORY_DISABLED) | | | [`BOOKMARKS_PROMPT_WITH_HINT_PREFIX`](#ida_moves.BOOKMARKS_PROMPT_WITH_HINT_PREFIX) | | | [`bookmarks_t_erase`](#ida_moves.bookmarks_t_erase) | | | [`bookmarks_t_find_index`](#ida_moves.bookmarks_t_find_index) | | | [`bookmarks_t_get`](#ida_moves.bookmarks_t_get) | | | [`bookmarks_t_get_desc`](#ida_moves.bookmarks_t_get_desc) | | | [`bookmarks_t_get_dirtree_id`](#ida_moves.bookmarks_t_get_dirtree_id) | | | [`bookmarks_t_mark`](#ida_moves.bookmarks_t_mark) | | | [`bookmarks_t_size`](#ida_moves.bookmarks_t_size) | | ## Classes | [`segm_move_info_vec_t`](#ida_moves.segm_move_info_vec_t) | | |-------------------------------------------------------------|----| | [`graph_location_info_t`](#ida_moves.graph_location_info_t) | | | [`segm_move_info_t`](#ida_moves.segm_move_info_t) | | | [`segm_move_infos_t`](#ida_moves.segm_move_infos_t) | | | [`renderer_info_pos_t`](#ida_moves.renderer_info_pos_t) | | | [`renderer_info_t`](#ida_moves.renderer_info_t) | | | [`lochist_entry_t`](#ida_moves.lochist_entry_t) | | | [`navstack_entry_t`](#ida_moves.navstack_entry_t) | | | [`navstack_t`](#ida_moves.navstack_t) | | | [`bookmarks_t`](#ida_moves.bookmarks_t) | | ## Module Contents ### *class* ida_moves.segm_move_info_vec_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### push_back(\*args) → segm_move_info_t & #### pop_back() → [None](https://docs.python.org/3/library/constants.html#None) #### size() → [int](https://docs.python.org/3/library/functions.html#int) #### empty() → [bool](https://docs.python.org/3/library/functions.html#bool) #### at(\_idx: [int](https://docs.python.org/3/library/functions.html#int)) → segm_move_info_t const & #### qclear() → [None](https://docs.python.org/3/library/constants.html#None) #### clear() → [None](https://docs.python.org/3/library/constants.html#None) #### resize(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### grow(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### capacity() → [int](https://docs.python.org/3/library/functions.html#int) #### reserve(cnt: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### truncate() → [None](https://docs.python.org/3/library/constants.html#None) #### swap(r: [segm_move_info_vec_t](#ida_moves.segm_move_info_vec_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extract() → segm_move_info_t \* #### inject(s: [segm_move_info_t](#ida_moves.segm_move_info_t), len: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### begin(\*args) → qvector< segm_move_info_t >::const_iterator #### end(\*args) → qvector< segm_move_info_t >::const_iterator #### insert(it: [segm_move_info_t](#ida_moves.segm_move_info_t), x: [segm_move_info_t](#ida_moves.segm_move_info_t)) → qvector< segm_move_info_t >::iterator #### erase(\*args) → qvector< segm_move_info_t >::iterator #### find(\*args) → qvector< segm_move_info_t >::const_iterator #### has(x: [segm_move_info_t](#ida_moves.segm_move_info_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### add_unique(x: [segm_move_info_t](#ida_moves.segm_move_info_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### append(x: [segm_move_info_t](#ida_moves.segm_move_info_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extend(x: [segm_move_info_vec_t](#ida_moves.segm_move_info_vec_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### front #### back ### *class* ida_moves.graph_location_info_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### zoom *: double* #### orgx *: double* #### orgy *: double* ### *class* ida_moves.segm_move_info_t(\_from: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) = 0, \_to: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) = 0, \_sz: [int](https://docs.python.org/3/library/functions.html#int) = 0) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### to *: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)* #### size *: [int](https://docs.python.org/3/library/functions.html#int)* ### *class* ida_moves.segm_move_infos_t Bases: [`segm_move_info_vec_t`](#ida_moves.segm_move_info_vec_t) #### thisown #### find(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → segm_move_info_t const \* ### *class* ida_moves.renderer_info_pos_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### node *: [int](https://docs.python.org/3/library/functions.html#int)* #### cx *: short* #### cy *: short* ### *class* ida_moves.renderer_info_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### gli *: [graph_location_info_t](#ida_moves.graph_location_info_t)* #### pos *: renderer_info_t::pos_t* #### rtype *: tcc_renderer_type_t* ### ida_moves.LSEF_PLACE ### ida_moves.LSEF_RINFO ### ida_moves.LSEF_PTYPE ### ida_moves.LSEF_ALL ### *class* ida_moves.lochist_entry_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### rinfo *: [renderer_info_t](#ida_moves.renderer_info_t)* #### plce *: place_t \** #### renderer_info() → renderer_info_t & #### place() → place_t \* #### set_place(p: [place_t](../ida_kernwin/index.md#ida_kernwin.place_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### is_valid() → [bool](https://docs.python.org/3/library/functions.html#bool) #### acquire_place(in_p: [place_t](../ida_kernwin/index.md#ida_kernwin.place_t)) → [None](https://docs.python.org/3/library/constants.html#None) ### *class* ida_moves.navstack_entry_t(\*args) Bases: [`lochist_entry_t`](#ida_moves.lochist_entry_t) #### thisown #### widget_id *: [str](https://docs.python.org/3/library/stdtypes.html#str)* #### ud_str *: [str](https://docs.python.org/3/library/stdtypes.html#str)* ### ida_moves.UNHID_SEGM unhid a segment at ‘target’ ### ida_moves.UNHID_FUNC unhid a function at ‘target’ ### ida_moves.UNHID_RANGE unhid an range at ‘target’ ### ida_moves.DEFAULT_CURSOR_Y ### ida_moves.DEFAULT_LNNUM ### ida_moves.CURLOC_LIST ### ida_moves.MAX_MARK_SLOT ### *class* ida_moves.navstack_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### flags *: [int](https://docs.python.org/3/library/functions.html#int)* #### is_history_enabled() → [bool](https://docs.python.org/3/library/functions.html#bool) #### init(defpos: [navstack_entry_t](#ida_moves.navstack_entry_t), stream_name: [str](https://docs.python.org/3/library/stdtypes.html#str), \_flags: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### *static* perform_move(stream_name: [str](https://docs.python.org/3/library/stdtypes.html#str), source_stream_name: [str](https://docs.python.org/3/library/stdtypes.html#str), widget_id: [str](https://docs.python.org/3/library/stdtypes.html#str), move_stack: [bool](https://docs.python.org/3/library/functions.html#bool)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### netcode() → nodeidx_t #### set_current(e: [navstack_entry_t](#ida_moves.navstack_entry_t), in_charge: [bool](https://docs.python.org/3/library/functions.html#bool)) → [None](https://docs.python.org/3/library/constants.html#None) #### get_current(out: [navstack_entry_t](#ida_moves.navstack_entry_t), widget_id: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### get_all_current(out: navstack_entry_vec_t \*) → [None](https://docs.python.org/3/library/constants.html#None) #### stack_jump(try_to_unhide: [bool](https://docs.python.org/3/library/functions.html#bool), e: [navstack_entry_t](#ida_moves.navstack_entry_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### stack_index() → [int](https://docs.python.org/3/library/functions.html#int) #### stack_seek(out: [navstack_entry_t](#ida_moves.navstack_entry_t), index: [int](https://docs.python.org/3/library/functions.html#int), try_to_unhide: [bool](https://docs.python.org/3/library/functions.html#bool)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### stack_forward(out: [navstack_entry_t](#ida_moves.navstack_entry_t), cnt: [int](https://docs.python.org/3/library/functions.html#int), try_to_unhide: [bool](https://docs.python.org/3/library/functions.html#bool)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### stack_back(out: [navstack_entry_t](#ida_moves.navstack_entry_t), cnt: [int](https://docs.python.org/3/library/functions.html#int), try_to_unhide: [bool](https://docs.python.org/3/library/functions.html#bool)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### stack_nav(out: [navstack_entry_t](#ida_moves.navstack_entry_t), forward: [bool](https://docs.python.org/3/library/functions.html#bool), cnt: [int](https://docs.python.org/3/library/functions.html#int), try_to_unhide: [bool](https://docs.python.org/3/library/functions.html#bool)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### stack_clear(new_tip: [navstack_entry_t](#ida_moves.navstack_entry_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### set_stack_entry(index: [int](https://docs.python.org/3/library/functions.html#int), e: [navstack_entry_t](#ida_moves.navstack_entry_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### get_stack_entry(out: [navstack_entry_t](#ida_moves.navstack_entry_t), index: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### get_current_stack_entry(out: [navstack_entry_t](#ida_moves.navstack_entry_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### stack_size() → [int](https://docs.python.org/3/library/functions.html#int) ### ida_moves.LHF_HISTORY_DISABLED ### *class* ida_moves.bookmarks_t(\*args, \*\*kwargs) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### *static* mark(e: lochist_entry_t, index: int, title: str, desc: str, ud: void \*) → [int](https://docs.python.org/3/library/functions.html#int) #### *static* get_by_inode(out_entry: lochist_entry_t, out_desc: str, inode: inode_t, ud: void \*) → [int](https://docs.python.org/3/library/functions.html#int) #### *static* get_desc(e: lochist_entry_t, index: int, ud: void \*) → [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None) #### *static* find_index(e: lochist_entry_t, ud: void \*) → [int](https://docs.python.org/3/library/functions.html#int) #### *static* size(e: lochist_entry_t, ud: void \*) → [int](https://docs.python.org/3/library/functions.html#int) #### *static* erase(e: lochist_entry_t, index: int, ud: void \*) → [bool](https://docs.python.org/3/library/functions.html#bool) #### *static* get_dirtree_id(e: lochist_entry_t, ud: void \*) → dirtree_id_t #### *static* get(out: lochist_entry_t, \_index: int, ud: void \*) → PyObject \* #### widget #### userdata #### template ### ida_moves.BOOKMARKS_PROMPT_WITH_HINT_PREFIX ### ida_moves.bookmarks_t_erase ### ida_moves.bookmarks_t_find_index ### ida_moves.bookmarks_t_get ### ida_moves.bookmarks_t_get_desc ### ida_moves.bookmarks_t_get_dirtree_id ### ida_moves.bookmarks_t_mark ### ida_moves.bookmarks_t_size # index.html.md # create_libssh2_til summary: create a type library file description: : The goal of this script is to demonstrate some usage of the type API. In this script:
> * We create a new libssh2-64.til file holding some libssh2 64-bit structures. > * Once the file has been created, it can copied in the IDA install > til directory or in the user IDA til directory. level: intermediate ## Attributes | [`libssh2_types`](#create_libssh2_til.libssh2_types) | | |--------------------------------------------------------|----| | [`til`](#create_libssh2_til.til) | | ## Functions | [`create_libssh2_til`](#create_libssh2_til.create_libssh2_til)() | | |--------------------------------------------------------------------|----| ## Module Contents ### create_libssh2_til.libssh2_types *= Multiline-String*
Show Value ```python """ typedef unsigned char uint8_t; typedef unsigned int uint32_t; typedef __int64 size_t; struct _LIBSSH2_USERAUTH_KBDINT_PROMPT { unsigned char *text; size_t length; unsigned char echo; }; typedef struct _LIBSSH2_USERAUTH_KBDINT_PROMPT LIBSSH2_USERAUTH_KBDINT_PROMPT; struct _LIBSSH2_USERAUTH_KBDINT_RESPONSE { char *text; unsigned int length; }; typedef struct _LIBSSH2_USERAUTH_KBDINT_RESPONSE LIBSSH2_USERAUTH_KBDINT_RESPONSE; struct _LIBSSH2_SK_SIG_INFO { uint8_t flags; uint32_t counter; unsigned char *sig_r; size_t sig_r_len; unsigned char *sig_s; size_t sig_s_len; }; typedef struct _LIBSSH2_SK_SIG_INFO LIBSSH2_SK_SIG_INFO; """ ```
### create_libssh2_til.create_libssh2_til() ### create_libssh2_til.til # index.html.md # func_chooser_coloring summary: override the default “Functions” chooser colors description: : color the function in the Function window according to its size. The larger the function, the darker the color.
The key, is overriding ida_kernwin.UI_Hooks.get_chooser_item_attrs level: beginner ## Attributes | [`fcch`](#func_chooser_coloring.fcch) | | |-----------------------------------------|----| ## Classes | [`func_chooser_coloring_hooks_t`](#func_chooser_coloring.func_chooser_coloring_hooks_t) | | |-------------------------------------------------------------------------------------------|----| ## Module Contents ### *class* func_chooser_coloring.func_chooser_coloring_hooks_t Bases: [`ida_kernwin.UI_Hooks`](../ida_kernwin/index.md#ida_kernwin.UI_Hooks) #### colors #### get_chooser_item_attrs(chobj, n, attrs) get item-specific attributes for a chooser. This callback is generated only after enable_chooser_item_attrs() * **Parameters:** * **chooser** – (const chooser_base_t ``` * ``` ) * **n** – (::size_t) * **attrs** – (chooser_item_attrs_t ``` * ``` ) * **Returns:** void ### func_chooser_coloring.fcch # index.html.md # ida_libfuncs ## Attributes | [`SIGN_HEADER_MAGIC`](#ida_libfuncs.SIGN_HEADER_MAGIC) | | |------------------------------------------------------------|----| | [`SIGN_HEADER_VERSION`](#ida_libfuncs.SIGN_HEADER_VERSION) | | | [`OSTYPE_MSDOS`](#ida_libfuncs.OSTYPE_MSDOS) | | | [`OSTYPE_WIN`](#ida_libfuncs.OSTYPE_WIN) | | | [`OSTYPE_OS2`](#ida_libfuncs.OSTYPE_OS2) | | | [`OSTYPE_NETW`](#ida_libfuncs.OSTYPE_NETW) | | | [`OSTYPE_UNIX`](#ida_libfuncs.OSTYPE_UNIX) | | | [`OSTYPE_OTHER`](#ida_libfuncs.OSTYPE_OTHER) | | | [`APPT_CONSOLE`](#ida_libfuncs.APPT_CONSOLE) | | | [`APPT_GRAPHIC`](#ida_libfuncs.APPT_GRAPHIC) | | | [`APPT_PROGRAM`](#ida_libfuncs.APPT_PROGRAM) | | | [`APPT_LIBRARY`](#ida_libfuncs.APPT_LIBRARY) | | | [`APPT_DRIVER`](#ida_libfuncs.APPT_DRIVER) | | | [`APPT_1THREAD`](#ida_libfuncs.APPT_1THREAD) | | | [`APPT_MTHREAD`](#ida_libfuncs.APPT_MTHREAD) | | | [`APPT_16BIT`](#ida_libfuncs.APPT_16BIT) | | | [`APPT_32BIT`](#ida_libfuncs.APPT_32BIT) | | | [`APPT_64BIT`](#ida_libfuncs.APPT_64BIT) | | | [`LS_STARTUP`](#ida_libfuncs.LS_STARTUP) | | | [`LS_CTYPE`](#ida_libfuncs.LS_CTYPE) | | | [`LS_CTYPE2`](#ida_libfuncs.LS_CTYPE2) | | | [`LS_CTYPE_ALT`](#ida_libfuncs.LS_CTYPE_ALT) | | | [`LS_ZIP`](#ida_libfuncs.LS_ZIP) | | | [`LS_CTYPE_3V`](#ida_libfuncs.LS_CTYPE_3V) | | ## Classes | [`idasgn_header_t`](#ida_libfuncs.idasgn_header_t) | | |------------------------------------------------------|----| ## Functions | [`get_idasgn_header_by_short_name`](#ida_libfuncs.get_idasgn_header_by_short_name)(→ Union[str, None]) | Get idasgn header by a short signature name. | |----------------------------------------------------------------------------------------------------------|-------------------------------------------------| | [`get_idasgn_path_by_short_name`](#ida_libfuncs.get_idasgn_path_by_short_name)(→ Union[str, None]) | Get idasgn full path by a short signature name. | ## Module Contents ### *class* ida_libfuncs.idasgn_header_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### magic *: char[6]* #### version *: uchar* #### processor_id *: uchar* #### file_formats *: [int](https://docs.python.org/3/library/functions.html#int)* #### ostype *: uint16* #### apptype *: uint16* #### flags *: uint16* #### number_of_modules_v5 *: uint16* #### ctype_crc *: uint16* #### ctype_name *: char[12]* #### libname_length *: uchar* #### ctype_crc_alt *: uint16* #### number_of_modules *: [int](https://docs.python.org/3/library/functions.html#int)* #### pattern_length *: uint16* #### ctype_crc_3v *: uint16* ### ida_libfuncs.SIGN_HEADER_MAGIC ### ida_libfuncs.SIGN_HEADER_VERSION ### ida_libfuncs.OSTYPE_MSDOS ### ida_libfuncs.OSTYPE_WIN ### ida_libfuncs.OSTYPE_OS2 ### ida_libfuncs.OSTYPE_NETW ### ida_libfuncs.OSTYPE_UNIX ### ida_libfuncs.OSTYPE_OTHER ### ida_libfuncs.APPT_CONSOLE ### ida_libfuncs.APPT_GRAPHIC ### ida_libfuncs.APPT_PROGRAM ### ida_libfuncs.APPT_LIBRARY ### ida_libfuncs.APPT_DRIVER ### ida_libfuncs.APPT_1THREAD ### ida_libfuncs.APPT_MTHREAD ### ida_libfuncs.APPT_16BIT ### ida_libfuncs.APPT_32BIT ### ida_libfuncs.APPT_64BIT ### ida_libfuncs.LS_STARTUP ### ida_libfuncs.LS_CTYPE ### ida_libfuncs.LS_CTYPE2 ### ida_libfuncs.LS_CTYPE_ALT ### ida_libfuncs.LS_ZIP ### ida_libfuncs.LS_CTYPE_3V ### ida_libfuncs.get_idasgn_header_by_short_name(out_header: [idasgn_header_t](#ida_libfuncs.idasgn_header_t), name: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None) Get idasgn header by a short signature name. * **Parameters:** * **out_header** – buffer for the signature file header * **name** – short name of a signature * **Returns:** true in case of success ### ida_libfuncs.get_idasgn_path_by_short_name(name: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None) Get idasgn full path by a short signature name. * **Parameters:** **name** – short name of a signature * **Returns:** true in case of success # index.html.md # py_cvt64_sample summary: add 64-bit (.idb->.i64) conversion capabilities to custom plugins description: : For more infortmation see SDK/plugins/cvt64_sample example level: advanced ## Attributes | [`SAMPLE_NETNODE_NAME`](#py_cvt64_sample.SAMPLE_NETNODE_NAME) | | |-----------------------------------------------------------------|----| | [`DEVICE_INDEX`](#py_cvt64_sample.DEVICE_INDEX) | | | [`IDPFLAGS_INDEX`](#py_cvt64_sample.IDPFLAGS_INDEX) | | | [`HASH_COMMENT`](#py_cvt64_sample.HASH_COMMENT) | | | [`HASH_ADDRESS`](#py_cvt64_sample.HASH_ADDRESS) | | ## Classes | [`idp_listener_t`](#py_cvt64_sample.idp_listener_t) | | |-------------------------------------------------------|--------------------------------------------| | [`cvt64_ctx_t`](#py_cvt64_sample.cvt64_ctx_t) | Base class for all scripted multi-plugins. | | [`cvt64_sample_t`](#py_cvt64_sample.cvt64_sample_t) | Base class for all scripted plugins. | ## Functions | [`PLUGIN_ENTRY`](#py_cvt64_sample.PLUGIN_ENTRY)() | | |-----------------------------------------------------|----| ## Module Contents ### py_cvt64_sample.SAMPLE_NETNODE_NAME *= '$ cvt64 py_sample netnode'* ### py_cvt64_sample.DEVICE_INDEX ### py_cvt64_sample.IDPFLAGS_INDEX ### py_cvt64_sample.HASH_COMMENT *= 'Comment'* ### py_cvt64_sample.HASH_ADDRESS *= 'Address'* ### *class* py_cvt64_sample.idp_listener_t Bases: `idaapi.IDP_Hooks` #### ev_cvt64_hashval(node, tag, name, data) perform 32-64 conversion for a hash value * **Parameters:** * **node** – (nodeidx_t) * **tag** – (uchar) * **name** – (const ::char ``` * ``` ) * **data** – (const uchar ``` * ``` ) * **Returns:** 0: nothing was done * **Returns:** 1: converted successfully * **Returns:** -1: error (and message in errbuf) #### ev_cvt64_supval(node, tag, idx, data) perform 32-64 conversion for a netnode array element * **Parameters:** * **node** – (nodeidx_t) * **tag** – (uchar) * **idx** – (nodeidx_t) * **data** – (const uchar ``` * ``` ) * **Returns:** 0: nothing was done * **Returns:** 1: converted successfully * **Returns:** -1: error (and message in errbuf) ### *class* py_cvt64_sample.cvt64_ctx_t Bases: `idaapi.plugmod_t` Base class for all scripted multi-plugins. #### prochook #### run(arg) ### *class* py_cvt64_sample.cvt64_sample_t Bases: `idaapi.plugin_t` Base class for all scripted plugins. #### flags *= 257* #### comment *= 'IDAPython: An example how to implement CVT64 functionality'* #### wanted_name *= 'IDAPython: CVT64 sample'* #### wanted_hotkey *= ''* #### help *= ''* #### init() ### py_cvt64_sample.PLUGIN_ENTRY() # index.html.md # show_and_hide_waitbox summary: show, update & hide the progress dialog description: : Using the progress dialog (aka ‘wait box’) primitives. keywords: actions level: beginner ## Attributes | [`perform_decompilation`](#id0) | | |---------------------------------------------------|----| | [`perform_decompilation`](#id0) | | | [`step_sleep`](#show_and_hide_waitbox.step_sleep) | | | [`all_eas`](#show_and_hide_waitbox.all_eas) | | ## Module Contents ### show_and_hide_waitbox.perform_decompilation *= False* ### show_and_hide_waitbox.perform_decompilation ### show_and_hide_waitbox.step_sleep *= 0.5* ### show_and_hide_waitbox.all_eas # index.html.md # ida_diskio File I/O functions for IDA. You should not use standard C file I/O functions in modules. Use functions from this header, pro.h and fpro.h instead. This file also declares a call_system() function. ## Attributes | [`VAULT_CACHE_SUBDIR`](#ida_diskio.VAULT_CACHE_SUBDIR) | subdir name for cached deltas and old files | |------------------------------------------------------------------------|-----------------------------------------------| | [`VAULT_CACHE_FNAME`](#ida_diskio.VAULT_CACHE_FNAME) | to store file caches | | [`CFG_SUBDIR`](#ida_diskio.CFG_SUBDIR) | | | [`IDC_SUBDIR`](#ida_diskio.IDC_SUBDIR) | | | [`IDS_SUBDIR`](#ida_diskio.IDS_SUBDIR) | | | [`IDP_SUBDIR`](#ida_diskio.IDP_SUBDIR) | | | [`LDR_SUBDIR`](#ida_diskio.LDR_SUBDIR) | | | [`SIG_SUBDIR`](#ida_diskio.SIG_SUBDIR) | | | [`TIL_SUBDIR`](#ida_diskio.TIL_SUBDIR) | | | [`PLG_SUBDIR`](#ida_diskio.PLG_SUBDIR) | | | [`THM_SUBDIR`](#ida_diskio.THM_SUBDIR) | | | [`IDA_SUBDIR_IDP`](#ida_diskio.IDA_SUBDIR_IDP) | append the processor name as a subdirectory | | [`IDA_SUBDIR_IDADIR_FIRST`](#ida_diskio.IDA_SUBDIR_IDADIR_FIRST) | $IDADIR/subdir will be first, not last | | [`IDA_SUBDIR_ONLY_EXISTING`](#ida_diskio.IDA_SUBDIR_ONLY_EXISTING) | only existing directories will be present | | [`CSIDL_PERSONAL`](#ida_diskio.CSIDL_PERSONAL) | | | [`CSIDL_APPDATA`](#ida_diskio.CSIDL_APPDATA) | | | [`CSIDL_LOCAL_APPDATA`](#ida_diskio.CSIDL_LOCAL_APPDATA) | | | [`CSIDL_PROFILE`](#ida_diskio.CSIDL_PROFILE) | | | [`CSIDL_PROGRAM_FILES`](#ida_diskio.CSIDL_PROGRAM_FILES) | | | [`CSIDL_PROGRAM_FILES_COMMON`](#ida_diskio.CSIDL_PROGRAM_FILES_COMMON) | | | [`CSIDL_PROGRAM_FILESX86`](#ida_diskio.CSIDL_PROGRAM_FILESX86) | | | [`LINPUT_NONE`](#ida_diskio.LINPUT_NONE) | | | [`LINPUT_LOCAL`](#ida_diskio.LINPUT_LOCAL) | | | [`LINPUT_RFILE`](#ida_diskio.LINPUT_RFILE) | | | [`LINPUT_PROCMEM`](#ida_diskio.LINPUT_PROCMEM) | | | [`LINPUT_GENERIC`](#ida_diskio.LINPUT_GENERIC) | | | [`LOC_CLOSE`](#ida_diskio.LOC_CLOSE) | close the inner linput | | [`LOC_UNMAKE`](#ida_diskio.LOC_UNMAKE) | unmake the inner linput | | [`LOC_KEEP`](#ida_diskio.LOC_KEEP) | do nothing | ## Classes | [`file_enumerator_t`](#ida_diskio.file_enumerator_t) | | |----------------------------------------------------------------|----| | [`ioports_fallback_t`](#ida_diskio.ioports_fallback_t) | | | [`choose_ioport_parser_t`](#ida_diskio.choose_ioport_parser_t) | | | [`generic_linput_t`](#ida_diskio.generic_linput_t) | | ## Functions | [`idadir`](#ida_diskio.idadir)(→ str) | Get IDA directory (if subdir==nullptr) or the specified subdirectory (see IDA subdirectories) | |---------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------| | [`getsysfile`](#ida_diskio.getsysfile)(→ Union[str, None]) | Search for IDA system file. This function searches for a file in: | | [`get_user_idadir`](#ida_diskio.get_user_idadir)(→ str) | Get user ida related directory. | | [`get_ida_subdirs`](#ida_diskio.get_ida_subdirs)(→ qstrvec_t \*) | Get list of directories in which to find a specific IDA resource (see IDA subdirectories). The order of the resulting list is as follows: | | [`get_special_folder`](#ida_diskio.get_special_folder)(→ Union[str, None]) | Get a folder location by CSIDL (see Common CSIDLs). Path should be of at least MAX_PATH size | | [`fopenWT`](#ida_diskio.fopenWT)(→ FILE \*) | | | [`fopenWB`](#ida_diskio.fopenWB)(→ FILE \*) | | | [`fopenRT`](#ida_diskio.fopenRT)(→ FILE \*) | | | [`fopenRB`](#ida_diskio.fopenRB)(→ FILE \*) | | | [`fopenM`](#ida_diskio.fopenM)(→ FILE \*) | | | [`fopenA`](#ida_diskio.fopenA)(→ FILE \*) | | | [`read_ioports`](#ida_diskio.read_ioports)(→ ssize_t) | | | [`choose_ioport_device2`](#ida_diskio.choose_ioport_device2)(→ bool) | | | [`qlgetz`](#ida_diskio.qlgetz)(→ Union[str, None]) | | | [`open_linput`](#ida_diskio.open_linput)(→ linput_t \*) | | | [`create_generic_linput`](#ida_diskio.create_generic_linput)(→ linput_t \*) | | | [`create_memory_linput`](#ida_diskio.create_memory_linput)(→ linput_t \*) | | | [`get_linput_type`](#ida_diskio.get_linput_type)(→ linput_type_t) | | | [`enumerate_files`](#ida_diskio.enumerate_files)(path, fname, callback) | Enumerate files in the specified directory while the callback returns 0. | | [`create_bytearray_linput`](#ida_diskio.create_bytearray_linput)(→ linput_t \*) | | | [`close_linput`](#ida_diskio.close_linput)(→ None) | | ## Module Contents ### ida_diskio.VAULT_CACHE_SUBDIR subdir name for cached deltas and old files ### ida_diskio.VAULT_CACHE_FNAME to store file caches ### ida_diskio.idadir(subdir: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [str](https://docs.python.org/3/library/stdtypes.html#str) Get IDA directory (if subdir==nullptr) or the specified subdirectory (see IDA subdirectories) ### ida_diskio.getsysfile(filename: [str](https://docs.python.org/3/library/stdtypes.html#str), subdir: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None) Search for IDA system file. This function searches for a file in: 0. each directory specified by IDAUSR% 1. ida directory [+ subdir] and returns the first match. * **Parameters:** * **filename** – name of file to search * **subdir** – if specified, the file is looked for in the specified subdirectory of the ida directory first (see IDA subdirectories) * **Returns:** nullptr if not found, otherwise a pointer to full file name. ### ida_diskio.CFG_SUBDIR ### ida_diskio.IDC_SUBDIR ### ida_diskio.IDS_SUBDIR ### ida_diskio.IDP_SUBDIR ### ida_diskio.LDR_SUBDIR ### ida_diskio.SIG_SUBDIR ### ida_diskio.TIL_SUBDIR ### ida_diskio.PLG_SUBDIR ### ida_diskio.THM_SUBDIR ### ida_diskio.get_user_idadir() → [str](https://docs.python.org/3/library/stdtypes.html#str) Get user ida related directory. if $IDAUSR is defined: > - the first element in $IDAUSR else : - default user directory ($HOME/.idapro or %APPDATA%Hex-Rays/IDA Pro) ### ida_diskio.get_ida_subdirs(subdir: [str](https://docs.python.org/3/library/stdtypes.html#str), flags: [int](https://docs.python.org/3/library/functions.html#int) = 0) → qstrvec_t \* Get list of directories in which to find a specific IDA resource (see IDA subdirectories). The order of the resulting list is as follows: : [$IDAUSR/subdir (0..N entries)] $IDADIR/subdir * **Parameters:** * **subdir** – name of the resource to list (can be nullptr) * **flags** – Subdirectory modification flags bits * **Returns:** number of directories appended to ‘dirs’ ### ida_diskio.IDA_SUBDIR_IDP append the processor name as a subdirectory ### ida_diskio.IDA_SUBDIR_IDADIR_FIRST $IDADIR/subdir will be first, not last ### ida_diskio.IDA_SUBDIR_ONLY_EXISTING only existing directories will be present ### ida_diskio.get_special_folder(csidl: [int](https://docs.python.org/3/library/functions.html#int)) → [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None) Get a folder location by CSIDL (see Common CSIDLs). Path should be of at least MAX_PATH size ### ida_diskio.CSIDL_PERSONAL ### ida_diskio.CSIDL_APPDATA ### ida_diskio.CSIDL_LOCAL_APPDATA ### ida_diskio.CSIDL_PROFILE ### ida_diskio.CSIDL_PROGRAM_FILES ### ida_diskio.CSIDL_PROGRAM_FILES_COMMON ### ida_diskio.CSIDL_PROGRAM_FILESX86 ### *class* ida_diskio.file_enumerator_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### visit_file(file: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [int](https://docs.python.org/3/library/functions.html#int) ### ida_diskio.fopenWT(file: [str](https://docs.python.org/3/library/stdtypes.html#str)) → FILE \* ### ida_diskio.fopenWB(file: [str](https://docs.python.org/3/library/stdtypes.html#str)) → FILE \* ### ida_diskio.fopenRT(file: [str](https://docs.python.org/3/library/stdtypes.html#str)) → FILE \* ### ida_diskio.fopenRB(file: [str](https://docs.python.org/3/library/stdtypes.html#str)) → FILE \* ### ida_diskio.fopenM(file: [str](https://docs.python.org/3/library/stdtypes.html#str)) → FILE \* ### ida_diskio.fopenA(file: [str](https://docs.python.org/3/library/stdtypes.html#str)) → FILE \* ### *class* ida_diskio.ioports_fallback_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### handle(ports: ioports_t const &, line: str) → [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None) * **Parameters:** * **ports** – i/o port definitions * **line** – input line to parse * **Returns:** success or fills ERRBUF with an error message ### ida_diskio.read_ioports(ports: ioports_t \*, device: str, file: str, callback: ioports_fallback_t = None) → ssize_t ### *class* ida_diskio.choose_ioport_parser_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### parse(param: [str](https://docs.python.org/3/library/stdtypes.html#str), line: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [bool](https://docs.python.org/3/library/functions.html#bool) * **Returns:** true: and fill PARAM with a displayed string * **Returns:** false: and empty PARAM to skip the current device * **Returns:** false: and fill PARAM with an error message ### ida_diskio.choose_ioport_device2(\_device: [str](https://docs.python.org/3/library/stdtypes.html#str), file: [str](https://docs.python.org/3/library/stdtypes.html#str), parse_params: [choose_ioport_parser_t](#ida_diskio.choose_ioport_parser_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_diskio.LINPUT_NONE ### ida_diskio.LINPUT_LOCAL ### ida_diskio.LINPUT_RFILE ### ida_diskio.LINPUT_PROCMEM ### ida_diskio.LINPUT_GENERIC ### ida_diskio.qlgetz(li: linput_t \*, fpos: int64) → [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None) ### ida_diskio.open_linput(file: [str](https://docs.python.org/3/library/stdtypes.html#str), remote: [bool](https://docs.python.org/3/library/functions.html#bool)) → linput_t \* ### *class* ida_diskio.generic_linput_t(\*args, \*\*kwargs) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### filesize *: uint64* #### blocksize *: [int](https://docs.python.org/3/library/functions.html#int)* #### read(off: qoff64_t, buffer: void \*, nbytes: int) → ssize_t ### ida_diskio.create_generic_linput(gl: [generic_linput_t](#ida_diskio.generic_linput_t)) → linput_t \* ### ida_diskio.create_memory_linput(start: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), size: asize_t) → linput_t \* ### ida_diskio.get_linput_type(li: linput_t \*) → linput_type_t ### ida_diskio.LOC_CLOSE close the inner linput ### ida_diskio.LOC_UNMAKE unmake the inner linput ### ida_diskio.LOC_KEEP do nothing ### ida_diskio.enumerate_files(path, fname, callback) Enumerate files in the specified directory while the callback returns 0. * **Parameters:** * **path** – directory to enumerate files in * **fname** – mask of file names to enumerate * **callback** – a callable object that takes the filename as its first argument and it returns 0 to continue enumeration or non-zero to stop enumeration. * **Returns:** tuple(code, fname) : If the callback returns non-zero, or None in case of script errors ### ida_diskio.create_bytearray_linput(s: [str](https://docs.python.org/3/library/stdtypes.html#str)) → linput_t \* ### ida_diskio.close_linput(li: linput_t \*) → [None](https://docs.python.org/3/library/constants.html#None) # index.html.md # list_bookmarks summary: list listing bookmarks description: : This sample shows how to programmatically access the list of bookmarks placed in a listing widget (e.g., “IDA View-A”, “Pseudocode-”, …) using the low-level ida_moves.bookmarks_t type. keywords: bookmarks level: intermediate ## Attributes | [`ACTION_NAME`](#list_bookmarks.ACTION_NAME) | | |------------------------------------------------------|----| | [`ACTION_LABEL`](#list_bookmarks.ACTION_LABEL) | | | [`ACTION_SHORTCUT`](#list_bookmarks.ACTION_SHORTCUT) | | | [`ACTION_HELP`](#list_bookmarks.ACTION_HELP) | | ## Classes | [`list_bookmarks_ah_t`](#list_bookmarks.list_bookmarks_ah_t) | | |----------------------------------------------------------------|----| ## Module Contents ### *class* list_bookmarks.list_bookmarks_ah_t Bases: [`ida_kernwin.action_handler_t`](../ida_kernwin/index.md#ida_kernwin.action_handler_t) #### activate(ctx) Activate an action. This function implements the core behavior of an action. It is called when the action is triggered, from a menu, from a popup menu, from the toolbar, or programmatically. * **Returns:** non-zero: all IDA windows will be refreshed #### update(ctx) Update an action. This is called when the context of the UI changed, and we need to let the action update some of its properties if needed (label, icon, …) In addition, this lets IDA know whether the action is enabled, and when it should be queried for availability again. Note: This callback is not meant to change anything in the application’s state, except by calling one (or many) of the “update_action_\*()” functions on this very action. ### list_bookmarks.ACTION_NAME *= 'example:list_bookmarks'* ### list_bookmarks.ACTION_LABEL *= 'List bookmarks'* ### list_bookmarks.ACTION_SHORTCUT *= 'Ctrl+!'* ### list_bookmarks.ACTION_HELP *= 'Press Ctrl+! to list bookmarks'* # index.html.md # ida_dbg Contains functions to control the debugging of a process. See Debugger functions for a complete explanation of these functions. These functions are inlined for the kernel. They are not inlined for the user-interfaces. ## Attributes | [`dbg_null`](#ida_dbg.dbg_null) | | |-------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------| | [`dbg_process_start`](#ida_dbg.dbg_process_start) | | | [`dbg_process_exit`](#ida_dbg.dbg_process_exit) | | | [`dbg_process_attach`](#ida_dbg.dbg_process_attach) | | | [`dbg_process_detach`](#ida_dbg.dbg_process_detach) | | | [`dbg_thread_start`](#ida_dbg.dbg_thread_start) | | | [`dbg_thread_exit`](#ida_dbg.dbg_thread_exit) | | | [`dbg_library_load`](#ida_dbg.dbg_library_load) | | | [`dbg_library_unload`](#ida_dbg.dbg_library_unload) | | | [`dbg_information`](#ida_dbg.dbg_information) | | | [`dbg_exception`](#ida_dbg.dbg_exception) | | | [`dbg_suspend_process`](#ida_dbg.dbg_suspend_process) | The process is now suspended. | | [`dbg_bpt`](#ida_dbg.dbg_bpt) | A user defined breakpoint was reached. | | [`dbg_trace`](#ida_dbg.dbg_trace) | A step occurred (one instruction was executed). This event notification is only generated if step tracing is enabled. | | [`dbg_request_error`](#ida_dbg.dbg_request_error) | An error occurred during the processing of a request. | | [`dbg_step_into`](#ida_dbg.dbg_step_into) | | | [`dbg_step_over`](#ida_dbg.dbg_step_over) | | | [`dbg_run_to`](#ida_dbg.dbg_run_to) | | | [`dbg_step_until_ret`](#ida_dbg.dbg_step_until_ret) | | | [`dbg_bpt_changed`](#ida_dbg.dbg_bpt_changed) | Breakpoint has been changed. | | [`dbg_started_loading_bpts`](#ida_dbg.dbg_started_loading_bpts) | Started loading breakpoint info from idb. | | [`dbg_finished_loading_bpts`](#ida_dbg.dbg_finished_loading_bpts) | Finished loading breakpoint info from idb. | | [`dbg_last`](#ida_dbg.dbg_last) | The last debugger notification code. | | [`BPTEV_ADDED`](#ida_dbg.BPTEV_ADDED) | Breakpoint has been added. | | [`BPTEV_REMOVED`](#ida_dbg.BPTEV_REMOVED) | Breakpoint has been removed. | | [`BPTEV_CHANGED`](#ida_dbg.BPTEV_CHANGED) | Breakpoint has been modified. | | [`DSTATE_SUSP`](#ida_dbg.DSTATE_SUSP) | process is suspended and will not continue | | [`DSTATE_NOTASK`](#ida_dbg.DSTATE_NOTASK) | no process is currently debugged | | [`DSTATE_RUN`](#ida_dbg.DSTATE_RUN) | process is running | | [`DBGINV_MEMORY`](#ida_dbg.DBGINV_MEMORY) | invalidate cached memory contents | | [`DBGINV_MEMCFG`](#ida_dbg.DBGINV_MEMCFG) | invalidate cached process segmentation | | [`DBGINV_REGS`](#ida_dbg.DBGINV_REGS) | invalidate cached register values | | [`DBGINV_ALL`](#ida_dbg.DBGINV_ALL) | invalidate everything | | [`DBGINV_REDRAW`](#ida_dbg.DBGINV_REDRAW) | refresh the screen | | [`DBGINV_NONE`](#ida_dbg.DBGINV_NONE) | invalidate nothing | | [`MOVBPT_OK`](#ida_dbg.MOVBPT_OK) | moved ok | | [`MOVBPT_NOT_FOUND`](#ida_dbg.MOVBPT_NOT_FOUND) | source bpt not found | | [`MOVBPT_DEST_BUSY`](#ida_dbg.MOVBPT_DEST_BUSY) | destination location is busy (we already have such a bpt) | | [`MOVBPT_BAD_TYPE`](#ida_dbg.MOVBPT_BAD_TYPE) | BPLT_ABS is not supported. | | [`BPLT_ABS`](#ida_dbg.BPLT_ABS) | absolute address: ea | | [`BPLT_REL`](#ida_dbg.BPLT_REL) | relative address: module_path, offset | | [`BPLT_SYM`](#ida_dbg.BPLT_SYM) | symbolic: symbol_name, offset | | [`BPLT_SRC`](#ida_dbg.BPLT_SRC) | source level: filename, lineno | | [`BPLT_LAST`](#ida_dbg.BPLT_LAST) | | | [`BPT_BRK`](#ida_dbg.BPT_BRK) | suspend execution upon hit | | [`BPT_TRACE`](#ida_dbg.BPT_TRACE) | add trace information upon hit | | [`BPT_UPDMEM`](#ida_dbg.BPT_UPDMEM) | refresh the memory layout and contents before evaluating bpt condition | | [`BPT_ENABLED`](#ida_dbg.BPT_ENABLED) | enabled? | | [`BPT_LOWCND`](#ida_dbg.BPT_LOWCND) | condition is calculated at low level (on the server side) | | [`BPT_TRACEON`](#ida_dbg.BPT_TRACEON) | enable tracing when the breakpoint is reached | | [`BPT_TRACE_INSN`](#ida_dbg.BPT_TRACE_INSN) | instruction tracing | | [`BPT_TRACE_FUNC`](#ida_dbg.BPT_TRACE_FUNC) | function tracing | | [`BPT_TRACE_BBLK`](#ida_dbg.BPT_TRACE_BBLK) | basic block tracing | | [`BPT_TRACE_TYPES`](#ida_dbg.BPT_TRACE_TYPES) | trace insns, functions, and basic blocks. if any of BPT_TRACE_TYPES bits are set but BPT_TRACEON is clear, then turn off tracing for the specified trace types | | [`BPT_ELANG_MASK`](#ida_dbg.BPT_ELANG_MASK) | | | [`BPT_ELANG_SHIFT`](#ida_dbg.BPT_ELANG_SHIFT) | index of the extlang (scripting language) of the condition | | [`BKPT_BADBPT`](#ida_dbg.BKPT_BADBPT) | failed to write the bpt to the process memory (at least one location) | | [`BKPT_LISTBPT`](#ida_dbg.BKPT_LISTBPT) | include in bpt list (user-defined bpt) | | [`BKPT_TRACE`](#ida_dbg.BKPT_TRACE) | trace bpt; should not be deleted when the process gets suspended | | [`BKPT_ACTIVE`](#ida_dbg.BKPT_ACTIVE) | active? | | [`BKPT_PARTIAL`](#ida_dbg.BKPT_PARTIAL) | partially active? (some locations were not written yet) | | [`BKPT_CNDREADY`](#ida_dbg.BKPT_CNDREADY) | condition has been compiled | | [`BKPT_FAKEPEND`](#ida_dbg.BKPT_FAKEPEND) | fake pending bpt: it is inactive but another bpt of the same type is active at the same address(es) | | [`BKPT_PAGE`](#ida_dbg.BKPT_PAGE) | written to the process as a page bpt. Available only after writing the bpt to the process. | | [`BPTCK_NONE`](#ida_dbg.BPTCK_NONE) | breakpoint does not exist | | [`BPTCK_NO`](#ida_dbg.BPTCK_NO) | breakpoint is disabled | | [`BPTCK_YES`](#ida_dbg.BPTCK_YES) | breakpoint is enabled | | [`BPTCK_ACT`](#ida_dbg.BPTCK_ACT) | breakpoint is active (written to the process) | | [`ST_OVER_DEBUG_SEG`](#ida_dbg.ST_OVER_DEBUG_SEG) | step tracing will be disabled when IP is in a debugger segment | | [`ST_OVER_LIB_FUNC`](#ida_dbg.ST_OVER_LIB_FUNC) | step tracing will be disabled when IP is in a library function | | [`ST_ALREADY_LOGGED`](#ida_dbg.ST_ALREADY_LOGGED) | step tracing will be disabled when IP is already logged | | [`ST_SKIP_LOOPS`](#ida_dbg.ST_SKIP_LOOPS) | step tracing will try to skip loops already recorded | | [`ST_DIFFERENTIAL`](#ida_dbg.ST_DIFFERENTIAL) | tracing: log only new instructions (not previously logged) | | [`ST_OPTIONS_MASK`](#ida_dbg.ST_OPTIONS_MASK) | mask of available options, to ensure compatibility with newer IDA versions | | [`ST_OPTIONS_DEFAULT`](#ida_dbg.ST_OPTIONS_DEFAULT) | | | [`IT_LOG_SAME_IP`](#ida_dbg.IT_LOG_SAME_IP) | specific options for instruction tracing (see set_insn_trace_options()) | | [`FT_LOG_RET`](#ida_dbg.FT_LOG_RET) | specific options for function tracing (see set_func_trace_options()) | | [`BT_LOG_INSTS`](#ida_dbg.BT_LOG_INSTS) | specific options for basic block tracing (see set_bblk_trace_options()) | | [`tev_none`](#ida_dbg.tev_none) | no event | | [`tev_insn`](#ida_dbg.tev_insn) | an instruction trace | | [`tev_call`](#ida_dbg.tev_call) | a function call trace | | [`tev_ret`](#ida_dbg.tev_ret) | a function return trace | | [`tev_bpt`](#ida_dbg.tev_bpt) | write, read/write, execution trace | | [`tev_mem`](#ida_dbg.tev_mem) | memory layout changed | | [`tev_event`](#ida_dbg.tev_event) | debug event occurred | | [`tev_max`](#ida_dbg.tev_max) | first unused event type | | [`SAVE_ALL_VALUES`](#ida_dbg.SAVE_ALL_VALUES) | | | [`SAVE_DIFF`](#ida_dbg.SAVE_DIFF) | | | [`SAVE_NONE`](#ida_dbg.SAVE_NONE) | | | [`DEC_NOTASK`](#ida_dbg.DEC_NOTASK) | process does not exist | | [`DEC_ERROR`](#ida_dbg.DEC_ERROR) | error | | [`DEC_TIMEOUT`](#ida_dbg.DEC_TIMEOUT) | timeout | | [`WFNE_ANY`](#ida_dbg.WFNE_ANY) | return the first event (even if it doesn't suspend the process) | | [`WFNE_SUSP`](#ida_dbg.WFNE_SUSP) | wait until the process gets suspended | | [`WFNE_SILENT`](#ida_dbg.WFNE_SILENT) | 1: be silent, 0:display modal boxes if necessary | | [`WFNE_CONT`](#ida_dbg.WFNE_CONT) | continue from the suspended state | | [`WFNE_NOWAIT`](#ida_dbg.WFNE_NOWAIT) | do not wait for any event, immediately return DEC_TIMEOUT (to be used with WFNE_CONT) | | [`WFNE_USEC`](#ida_dbg.WFNE_USEC) | timeout is specified in microseconds (minimum non-zero timeout is 40000us) | | [`DOPT_SEGM_MSGS`](#ida_dbg.DOPT_SEGM_MSGS) | log debugger segments modifications | | [`DOPT_START_BPT`](#ida_dbg.DOPT_START_BPT) | break on process start | | [`DOPT_THREAD_MSGS`](#ida_dbg.DOPT_THREAD_MSGS) | log thread starts/exits | | [`DOPT_THREAD_BPT`](#ida_dbg.DOPT_THREAD_BPT) | break on thread start/exit | | [`DOPT_BPT_MSGS`](#ida_dbg.DOPT_BPT_MSGS) | log breakpoints | | [`DOPT_LIB_MSGS`](#ida_dbg.DOPT_LIB_MSGS) | log library loads/unloads | | [`DOPT_LIB_BPT`](#ida_dbg.DOPT_LIB_BPT) | break on library load/unload | | [`DOPT_INFO_MSGS`](#ida_dbg.DOPT_INFO_MSGS) | log debugging info events | | [`DOPT_INFO_BPT`](#ida_dbg.DOPT_INFO_BPT) | break on debugging information | | [`DOPT_REAL_MEMORY`](#ida_dbg.DOPT_REAL_MEMORY) | do not hide breakpoint instructions | | [`DOPT_REDO_STACK`](#ida_dbg.DOPT_REDO_STACK) | reconstruct the stack | | [`DOPT_ENTRY_BPT`](#ida_dbg.DOPT_ENTRY_BPT) | break on program entry point | | [`DOPT_EXCDLG`](#ida_dbg.DOPT_EXCDLG) | exception dialogs: | | [`EXCDLG_NEVER`](#ida_dbg.EXCDLG_NEVER) | never display exception dialogs | | [`EXCDLG_UNKNOWN`](#ida_dbg.EXCDLG_UNKNOWN) | display for unknown exceptions | | [`EXCDLG_ALWAYS`](#ida_dbg.EXCDLG_ALWAYS) | always display | | [`DOPT_LOAD_DINFO`](#ida_dbg.DOPT_LOAD_DINFO) | automatically load debug files (pdb) | | [`DOPT_END_BPT`](#ida_dbg.DOPT_END_BPT) | evaluate event condition on process end | | [`DOPT_TEMP_HWBPT`](#ida_dbg.DOPT_TEMP_HWBPT) | when possible use hardware bpts for temp bpts | | [`DOPT_FAST_STEP`](#ida_dbg.DOPT_FAST_STEP) | prevent debugger memory refreshes when single-stepping | | [`DOPT_DISABLE_ASLR`](#ida_dbg.DOPT_DISABLE_ASLR) | disable ASLR | | [`SRCIT_NONE`](#ida_dbg.SRCIT_NONE) | unknown | | [`SRCIT_MODULE`](#ida_dbg.SRCIT_MODULE) | module | | [`SRCIT_FUNC`](#ida_dbg.SRCIT_FUNC) | function | | [`SRCIT_STMT`](#ida_dbg.SRCIT_STMT) | a statement (if/while/for...) | | [`SRCIT_EXPR`](#ida_dbg.SRCIT_EXPR) | an expression (a+b\*c) | | [`SRCIT_STTVAR`](#ida_dbg.SRCIT_STTVAR) | static variable/code | | [`SRCIT_LOCVAR`](#ida_dbg.SRCIT_LOCVAR) | a stack, register, or register-relative local variable or parameter | | [`SRCDBG_PROV_VERSION`](#ida_dbg.SRCDBG_PROV_VERSION) | | | [`move_bpt_to_grp`](#ida_dbg.move_bpt_to_grp) | | ## Classes | [`bpt_vec_t`](#ida_dbg.bpt_vec_t) | | |-------------------------------------------------------|----| | [`tev_reg_values_t`](#ida_dbg.tev_reg_values_t) | | | [`tevinforeg_vec_t`](#ida_dbg.tevinforeg_vec_t) | | | [`memreg_infos_t`](#ida_dbg.memreg_infos_t) | | | [`bptaddrs_t`](#ida_dbg.bptaddrs_t) | | | [`bpt_location_t`](#ida_dbg.bpt_location_t) | | | [`bpt_t`](#ida_dbg.bpt_t) | | | [`tev_info_t`](#ida_dbg.tev_info_t) | | | [`memreg_info_t`](#ida_dbg.memreg_info_t) | | | [`tev_reg_value_t`](#ida_dbg.tev_reg_value_t) | | | [`tev_info_reg_t`](#ida_dbg.tev_info_reg_t) | | | [`eval_ctx_t`](#ida_dbg.eval_ctx_t) | | | [`source_item_t`](#ida_dbg.source_item_t) | | | [`dbg_deref_options_t`](#ida_dbg.dbg_deref_options_t) | | | [`source_item_ptr`](#ida_dbg.source_item_ptr) | | | [`source_items_t`](#ida_dbg.source_items_t) | | | [`DBG_Hooks`](#ida_dbg.DBG_Hooks) | | ## Functions | [`run_to`](#ida_dbg.run_to)(→ bool) | Execute the process until the given address is reached. If no process is active, a new process is started. Technically, the debugger sets up a temporary breakpoint at the given address, and continues (or starts) the execution of the whole process. So, all threads continue their execution! sq{Type, Asynchronous function - available as Request, Notification, dbg_run_to} | |--------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [`request_run_to`](#ida_dbg.request_run_to)(→ bool) | Post a run_to() request. | | [`run_requests`](#ida_dbg.run_requests)(→ bool) | Execute requests until all requests are processed or an asynchronous function is called. sq{Type, Synchronous function, Notification, none (synchronous function)} | | [`get_running_request`](#ida_dbg.get_running_request)(→ ui_notification_t) | Get the current running request. sq{Type, Synchronous function, Notification, none (synchronous function)} | | [`is_request_running`](#ida_dbg.is_request_running)(→ bool) | Is a request currently running? | | [`get_running_notification`](#ida_dbg.get_running_notification)(→ dbg_notification_t) | Get the notification associated (if any) with the current running request. sq{Type, Synchronous function, Notification, none (synchronous function)} | | [`clear_requests_queue`](#ida_dbg.clear_requests_queue)(→ None) | Clear the queue of waiting requests. sq{Type, Synchronous function, Notification, none (synchronous function)} | | [`get_process_state`](#ida_dbg.get_process_state)(→ int) | Return the state of the currently debugged process. sq{Type, Synchronous function, Notification, none (synchronous function)} | | [`is_valid_dstate`](#ida_dbg.is_valid_dstate)(→ bool) | | | [`set_process_state`](#ida_dbg.set_process_state)(→ int) | Set new state for the debugged process. Notifies the IDA kernel about the change of the debugged process state. For example, a debugger module could call this function when it knows that the process is suspended for a short period of time. Some IDA API calls can be made only when the process is suspended. The process state is usually restored before returning control to the caller. You must know that it is ok to change the process state, doing it at arbitrary moments may crash the application or IDA. sq{Type, Synchronous function, Notification, none (synchronous function)} | | [`invalidate_dbg_state`](#ida_dbg.invalidate_dbg_state)(→ int) | Invalidate cached debugger information. sq{Type, Synchronous function, Notification, none (synchronous function)} | | [`start_process`](#ida_dbg.start_process)(→ int) | Start a process in the debugger. sq{Type, Asynchronous function - available as Request, Notification, dbg_process_start} | | [`request_start_process`](#ida_dbg.request_start_process)(→ int) | Post a start_process() request. | | [`suspend_process`](#ida_dbg.suspend_process)(→ bool) | Suspend the process in the debugger. sq{ Type, | | [`request_suspend_process`](#ida_dbg.request_suspend_process)(→ bool) | Post a suspend_process() request. | | [`continue_process`](#ida_dbg.continue_process)(→ bool) | Continue the execution of the process in the debugger. sq{Type, Synchronous function - available as Request, Notification, none (synchronous function)} | | [`request_continue_process`](#ida_dbg.request_continue_process)(→ bool) | Post a continue_process() request. | | [`continue_backwards`](#ida_dbg.continue_backwards)(→ bool) | Continue the execution of the process in the debugger backwards. Can only be used with debuggers that support time-travel debugging. sq{Type, Synchronous function - available as Request, Notification, none (synchronous function)} | | [`request_continue_backwards`](#ida_dbg.request_continue_backwards)(→ bool) | Post a continue_backwards() request. | | [`exit_process`](#ida_dbg.exit_process)(→ bool) | Terminate the debugging of the current process. sq{Type, Asynchronous function - available as Request, Notification, dbg_process_exit} | | [`request_exit_process`](#ida_dbg.request_exit_process)(→ bool) | Post an exit_process() request. | | [`get_processes`](#ida_dbg.get_processes)(→ ssize_t) | Take a snapshot of running processes and return their description. sq{Type, Synchronous function, Notification, none (synchronous function)} | | [`attach_process`](#ida_dbg.attach_process)(→ int) | Attach the debugger to a running process. sq{Type, Asynchronous function - available as Request, Notification, dbg_process_attach} | | [`request_attach_process`](#ida_dbg.request_attach_process)(→ int) | Post an attach_process() request. | | [`detach_process`](#ida_dbg.detach_process)(→ bool) | Detach the debugger from the debugged process. sq{Type, Asynchronous function - available as Request, Notification, dbg_process_detach} | | [`request_detach_process`](#ida_dbg.request_detach_process)(→ bool) | Post a detach_process() request. | | [`is_debugger_busy`](#ida_dbg.is_debugger_busy)(→ bool) | Is the debugger busy?. Some debuggers do not accept any commands while the debugged application is running. For such a debugger, it is unsafe to do anything with the database (even simple queries like get_byte may lead to undesired consequences). Returns: true if the debugged application is running under such a debugger | | [`get_thread_qty`](#ida_dbg.get_thread_qty)(→ int) | Get number of threads. sq{Type, Synchronous function, Notification, none (synchronous function)} | | [`getn_thread`](#ida_dbg.getn_thread)(→ thid_t) | Get the ID of a thread. sq{Type, Synchronous function, Notification, none (synchronous function)} | | [`get_current_thread`](#ida_dbg.get_current_thread)(→ thid_t) | Get current thread ID. sq{Type, Synchronous function, Notification, none (synchronous function)} | | [`getn_thread_name`](#ida_dbg.getn_thread_name)(→ str) | Get the NAME of a thread sq{Type, Synchronous function, Notification, none (synchronous function)} | | [`select_thread`](#ida_dbg.select_thread)(→ bool) | Select the given thread as the current debugged thread. All thread related execution functions will work on this thread. The process must be suspended to select a new thread. sq{Type, Synchronous function - available as request, Notification, none (synchronous function)} | | [`request_select_thread`](#ida_dbg.request_select_thread)(→ bool) | Post a select_thread() request. | | [`suspend_thread`](#ida_dbg.suspend_thread)(→ int) | Suspend thread. Suspending a thread may deadlock the whole application if the suspended was owning some synchronization objects. sq{Type, Synchronous function - available as request, Notification, none (synchronous function)} | | [`request_suspend_thread`](#ida_dbg.request_suspend_thread)(→ int) | Post a suspend_thread() request. | | [`resume_thread`](#ida_dbg.resume_thread)(→ int) | Resume thread. sq{Type, Synchronous function - available as request, Notification, none (synchronous function)} | | [`request_resume_thread`](#ida_dbg.request_resume_thread)(→ int) | Post a resume_thread() request. | | [`get_first_module`](#ida_dbg.get_first_module)(→ bool) | | | [`get_next_module`](#ida_dbg.get_next_module)(→ bool) | | | [`step_into`](#ida_dbg.step_into)(→ bool) | Execute one instruction in the current thread. Other threads are kept suspended. sq{Type, Asynchronous function - available as Request, Notification, dbg_step_into} | | [`request_step_into`](#ida_dbg.request_step_into)(→ bool) | Post a step_into() request. | | [`step_over`](#ida_dbg.step_over)(→ bool) | Execute one instruction in the current thread, but without entering into functions. Others threads are kept suspended. sq{Type, Asynchronous function - available as Request, Notification, dbg_step_over} | | [`request_step_over`](#ida_dbg.request_step_over)(→ bool) | Post a step_over() request. | | [`step_into_backwards`](#ida_dbg.step_into_backwards)(→ bool) | Execute one instruction backwards in the current thread. Other threads are kept suspended. sq{Type, Asynchronous function - available as Request, Notification, dbg_step_into} | | [`request_step_into_backwards`](#ida_dbg.request_step_into_backwards)(→ bool) | Post a step_into_backwards() request. | | [`step_over_backwards`](#ida_dbg.step_over_backwards)(→ bool) | Execute one instruction backwards in the current thread, but without entering into functions. Other threads are kept suspended. sq{Type, Asynchronous function - available as Request, Notification, dbg_step_over} | | [`request_step_over_backwards`](#ida_dbg.request_step_over_backwards)(→ bool) | Post a step_over_backwards() request. | | [`run_to_backwards`](#ida_dbg.run_to_backwards)(→ bool) | Execute the process backwards until the given address is reached. Technically, the debugger sets up a temporary breakpoint at the given address, and continues (or starts) the execution of the whole process. sq{Type, Asynchronous function - available as Request, Notification, dbg_run_to} | | [`request_run_to_backwards`](#ida_dbg.request_run_to_backwards)(→ bool) | Post a run_to_backwards() request. | | [`step_until_ret`](#ida_dbg.step_until_ret)(→ bool) | Execute instructions in the current thread until a function return instruction is executed (aka "step out"). Other threads are kept suspended. sq{Type, Asynchronous function - available as Request, Notification, dbg_step_until_ret} | | [`request_step_until_ret`](#ida_dbg.request_step_until_ret)(→ bool) | Post a step_until_ret() request. | | [`set_resume_mode`](#ida_dbg.set_resume_mode)(→ bool) | How to resume the application. Set resume mode but do not resume process. | | [`request_set_resume_mode`](#ida_dbg.request_set_resume_mode)(→ bool) | Post a set_resume_mode() request. | | [`get_dbg_reg_info`](#ida_dbg.get_dbg_reg_info)(→ bool) | Get register information sq{Type, Synchronous function, Notification, none (synchronous function)} | | [`get_sp_val`](#ida_dbg.get_sp_val)(→ uint64 \*) | Get value of the SP register for the current thread. Requires a suspended debugger. | | [`get_ip_val`](#ida_dbg.get_ip_val)(→ uint64 \*) | Get value of the IP (program counter) register for the current thread. Requires a suspended debugger. | | [`is_reg_integer`](#ida_dbg.is_reg_integer)(→ bool) | Does a register contain an integer value? sq{Type, Synchronous function, Notification, none (synchronous function)} | | [`is_reg_float`](#ida_dbg.is_reg_float)(→ bool) | Does a register contain a floating point value? sq{Type, Synchronous function, Notification, none (synchronous function)} | | [`is_reg_custom`](#ida_dbg.is_reg_custom)(→ bool) | Does a register contain a value of a custom data type? sq{Type, Synchronous function, Notification, none (synchronous function)} | | [`set_bptloc_string`](#ida_dbg.set_bptloc_string)(→ int) | | | [`get_bptloc_string`](#ida_dbg.get_bptloc_string)(→ str) | | | [`get_bpt_qty`](#ida_dbg.get_bpt_qty)(→ int) | Get number of breakpoints. sq{Type, Synchronous function, Notification, none (synchronous function)} | | [`getn_bpt`](#ida_dbg.getn_bpt)(→ bool) | Get the characteristics of a breakpoint. sq{Type, Synchronous function, Notification, none (synchronous function)} | | [`get_bpt`](#ida_dbg.get_bpt)(→ bool) | Get the characteristics of a breakpoint. sq{Type, Synchronous function, Notification, none (synchronous function)} | | [`exist_bpt`](#ida_dbg.exist_bpt)(→ bool) | Does a breakpoint exist at the given location? | | [`add_bpt`](#ida_dbg.add_bpt)(→ bool) | This function has the following signatures: | | [`request_add_bpt`](#ida_dbg.request_add_bpt)(→ bool) | This function has the following signatures: | | [`del_bpt`](#ida_dbg.del_bpt)(→ bool) | This function has the following signatures: | | [`request_del_bpt`](#ida_dbg.request_del_bpt)(→ bool) | This function has the following signatures: | | [`update_bpt`](#ida_dbg.update_bpt)(→ bool) | Update modifiable characteristics of an existing breakpoint. To update the breakpoint location, use change_bptlocs() sq{Type, Synchronous function, Notification, none (synchronous function)} | | [`find_bpt`](#ida_dbg.find_bpt)(→ bool) | Find a breakpoint by location. sq{Type, Synchronous function - available as request, Notification, none (synchronous function)} | | [`enable_bpt`](#ida_dbg.enable_bpt)(→ bool) | | | [`disable_bpt`](#ida_dbg.disable_bpt)(→ bool) | | | [`request_enable_bpt`](#ida_dbg.request_enable_bpt)(→ bool) | | | [`request_disable_bpt`](#ida_dbg.request_disable_bpt)(→ bool) | | | [`check_bpt`](#ida_dbg.check_bpt)(→ int) | Check the breakpoint at the specified address. | | [`set_trace_size`](#ida_dbg.set_trace_size)(→ bool) | Specify the new size of the circular buffer. sq{Type, Synchronous function, Notification, none (synchronous function)} | | [`clear_trace`](#ida_dbg.clear_trace)(→ None) | Clear all events in the trace buffer. sq{Type, Synchronous function - available as request, Notification, none (synchronous function)} | | [`request_clear_trace`](#ida_dbg.request_clear_trace)(→ None) | Post a clear_trace() request. | | [`is_step_trace_enabled`](#ida_dbg.is_step_trace_enabled)(→ bool) | Get current state of step tracing. sq{Type, Synchronous function, Notification, none (synchronous function)} | | [`enable_step_trace`](#ida_dbg.enable_step_trace)(→ bool) | | | [`disable_step_trace`](#ida_dbg.disable_step_trace)(→ bool) | | | [`request_enable_step_trace`](#ida_dbg.request_enable_step_trace)(→ bool) | | | [`request_disable_step_trace`](#ida_dbg.request_disable_step_trace)(→ bool) | | | [`get_step_trace_options`](#ida_dbg.get_step_trace_options)(→ int) | Get current step tracing options. sq{Type, Synchronous function, Notification, none (synchronous function)} | | [`set_step_trace_options`](#ida_dbg.set_step_trace_options)(→ None) | Modify step tracing options. sq{Type, Synchronous function - available as request, Notification, none (synchronous function)} | | [`request_set_step_trace_options`](#ida_dbg.request_set_step_trace_options)(→ None) | Post a set_step_trace_options() request. | | [`is_insn_trace_enabled`](#ida_dbg.is_insn_trace_enabled)(→ bool) | Get current state of instruction tracing. sq{Type, Synchronous function, Notification, none (synchronous function)} | | [`enable_insn_trace`](#ida_dbg.enable_insn_trace)(→ bool) | | | [`disable_insn_trace`](#ida_dbg.disable_insn_trace)(→ bool) | | | [`request_enable_insn_trace`](#ida_dbg.request_enable_insn_trace)(→ bool) | | | [`request_disable_insn_trace`](#ida_dbg.request_disable_insn_trace)(→ bool) | | | [`get_insn_trace_options`](#ida_dbg.get_insn_trace_options)(→ int) | Get current instruction tracing options. Also see IT_LOG_SAME_IP sq{Type, Synchronous function, Notification, none (synchronous function)} | | [`set_insn_trace_options`](#ida_dbg.set_insn_trace_options)(→ None) | Modify instruction tracing options. sq{Type, Synchronous function - available as request, Notification, none (synchronous function)} | | [`request_set_insn_trace_options`](#ida_dbg.request_set_insn_trace_options)(→ None) | Post a set_insn_trace_options() request. | | [`is_func_trace_enabled`](#ida_dbg.is_func_trace_enabled)(→ bool) | Get current state of functions tracing. sq{Type, Synchronous function, Notification, none (synchronous function)} | | [`enable_func_trace`](#ida_dbg.enable_func_trace)(→ bool) | | | [`disable_func_trace`](#ida_dbg.disable_func_trace)(→ bool) | | | [`request_enable_func_trace`](#ida_dbg.request_enable_func_trace)(→ bool) | | | [`request_disable_func_trace`](#ida_dbg.request_disable_func_trace)(→ bool) | | | [`get_func_trace_options`](#ida_dbg.get_func_trace_options)(→ int) | Get current function tracing options. Also see FT_LOG_RET sq{Type, Synchronous function, Notification, none (synchronous function)} | | [`set_func_trace_options`](#ida_dbg.set_func_trace_options)(→ None) | Modify function tracing options. sq{Type, Synchronous function - available as request, Notification, none (synchronous function)} | | [`request_set_func_trace_options`](#ida_dbg.request_set_func_trace_options)(→ None) | Post a set_func_trace_options() request. | | [`enable_bblk_trace`](#ida_dbg.enable_bblk_trace)(→ bool) | | | [`disable_bblk_trace`](#ida_dbg.disable_bblk_trace)(→ bool) | | | [`request_enable_bblk_trace`](#ida_dbg.request_enable_bblk_trace)(→ bool) | | | [`request_disable_bblk_trace`](#ida_dbg.request_disable_bblk_trace)(→ bool) | | | [`is_bblk_trace_enabled`](#ida_dbg.is_bblk_trace_enabled)(→ bool) | | | [`get_bblk_trace_options`](#ida_dbg.get_bblk_trace_options)(→ int) | Get current basic block tracing options. Also see BT_LOG_INSTS sq{Type, Synchronous function, Notification, none (synchronous function)} | | [`set_bblk_trace_options`](#ida_dbg.set_bblk_trace_options)(→ None) | Modify basic block tracing options (see BT_LOG_INSTS). | | [`request_set_bblk_trace_options`](#ida_dbg.request_set_bblk_trace_options)(→ None) | Post a set_bblk_trace_options() request. | | [`get_tev_qty`](#ida_dbg.get_tev_qty)(→ int) | Get number of trace events available in trace buffer. sq{Type, Synchronous function, Notification, none (synchronous function)} | | [`get_tev_info`](#ida_dbg.get_tev_info)(→ bool) | Get main information about a trace event. sq{Type, Synchronous function, Notification, none (synchronous function)} | | [`get_insn_tev_reg_val`](#ida_dbg.get_insn_tev_reg_val)(→ bool) | Read a register value from an instruction trace event. sq{Type, Synchronous function, Notification, none (synchronous function)} | | [`get_insn_tev_reg_mem`](#ida_dbg.get_insn_tev_reg_mem)(→ bool) | Read the memory pointed by register values from an instruction trace event. sq{Type, Synchronous function, Notification, none (synchronous function)} | | [`get_insn_tev_reg_result`](#ida_dbg.get_insn_tev_reg_result)(→ bool) | Read the resulting register value from an instruction trace event. sq{Type, Synchronous function, Notification, none (synchronous function)} | | [`get_call_tev_callee`](#ida_dbg.get_call_tev_callee)(→ ida_idaapi.ea_t) | Get the called function from a function call trace event. sq{Type, Synchronous function, Notification, none (synchronous function)} | | [`get_ret_tev_return`](#ida_dbg.get_ret_tev_return)(→ ida_idaapi.ea_t) | Get the return address from a function return trace event. sq{Type, Synchronous function, Notification, none (synchronous function)} | | [`get_bpt_tev_ea`](#ida_dbg.get_bpt_tev_ea)(→ ida_idaapi.ea_t) | Get the address associated to a read, read/write or execution trace event. sq{Type, Synchronous function, Notification, none (synchronous function)} | | [`get_tev_memory_info`](#ida_dbg.get_tev_memory_info)(→ bool) | Get the memory layout, if any, for the specified tev object. sq{Type, Synchronous function, Notification, none (synchronous function)} | | [`get_tev_event`](#ida_dbg.get_tev_event)(→ bool) | Get the corresponding debug event, if any, for the specified tev object. sq{Type, Synchronous function, Notification, none (synchronous function)} | | [`get_trace_base_address`](#ida_dbg.get_trace_base_address)(→ ida_idaapi.ea_t) | Get the base address of the current trace. sq{Type, Synchronous function, Notification, none (synchronous function)} | | [`set_trace_base_address`](#ida_dbg.set_trace_base_address)(→ None) | Set the base address of the current trace. sq{Type, Synchronous function, Notification, none (synchronous function)} | | [`dbg_add_thread`](#ida_dbg.dbg_add_thread)(→ None) | Add a thread to the current trace. sq{Type, Synchronous function, Notification, none (synchronous function)} | | [`dbg_del_thread`](#ida_dbg.dbg_del_thread)(→ None) | Delete a thread from the current trace. sq{Type, Synchronous function, Notification, none (synchronous function)} | | [`dbg_add_tev`](#ida_dbg.dbg_add_tev)(→ None) | Add a new trace element to the current trace. sq{Type, Synchronous function, Notification, none (synchronous function)} | | [`dbg_add_many_tevs`](#ida_dbg.dbg_add_many_tevs)(→ bool) | Add many new trace elements to the current trace. sq{Type, Synchronous function, Notification, none (synchronous function)} | | [`dbg_add_insn_tev`](#ida_dbg.dbg_add_insn_tev)(→ bool) | Add a new instruction trace element to the current trace. sq{Type, Synchronous function, Notification, none (synchronous function)} | | [`dbg_add_bpt_tev`](#ida_dbg.dbg_add_bpt_tev)(→ bool) | Add a new breakpoint trace element to the current trace. sq{Type, Synchronous function, Notification, none (synchronous function)} | | [`dbg_add_call_tev`](#ida_dbg.dbg_add_call_tev)(→ None) | Add a new call trace element to the current trace. sq{Type, Synchronous function, Notification, none (synchronous function)} | | [`dbg_add_ret_tev`](#ida_dbg.dbg_add_ret_tev)(→ None) | Add a new return trace element to the current trace. sq{Type, Synchronous function, Notification, none (synchronous function)} | | [`dbg_add_debug_event`](#ida_dbg.dbg_add_debug_event)(→ None) | Add a new debug event to the current trace. sq{Type, Synchronous function, Notification, none (synchronous function)} | | [`load_trace_file`](#ida_dbg.load_trace_file)(→ Union[str, None]) | Load a recorded trace file in the 'Tracing' window. If the call succeeds and 'buf' is not null, the description of the trace stored in the binary trace file will be returned in 'buf' | | [`save_trace_file`](#ida_dbg.save_trace_file)(→ bool) | Save the current trace in the specified file. | | [`is_valid_trace_file`](#ida_dbg.is_valid_trace_file)(→ bool) | Is the specified file a valid trace file for the current database? | | [`set_trace_file_desc`](#ida_dbg.set_trace_file_desc)(→ bool) | Change the description of the specified trace file. | | [`get_trace_file_desc`](#ida_dbg.get_trace_file_desc)(→ Union[str, None]) | Get the file header of the specified trace file. | | [`choose_trace_file`](#ida_dbg.choose_trace_file)(→ Union[str, None]) | Show the choose trace dialog. | | [`diff_trace_file`](#ida_dbg.diff_trace_file)(→ bool) | Show difference between the current trace and the one from 'filename'. | | [`graph_trace`](#ida_dbg.graph_trace)(→ bool) | Show the trace callgraph. | | [`set_highlight_trace_options`](#ida_dbg.set_highlight_trace_options)(→ None) | Set highlight trace parameters. | | [`set_trace_platform`](#ida_dbg.set_trace_platform)(→ None) | Set platform name of current trace. | | [`get_trace_platform`](#ida_dbg.get_trace_platform)(→ str) | Get platform name of current trace. | | [`set_trace_dynamic_register_set`](#ida_dbg.set_trace_dynamic_register_set)(→ None) | Set dynamic register set of current trace. | | [`get_trace_dynamic_register_set`](#ida_dbg.get_trace_dynamic_register_set)(→ None) | Get dynamic register set of current trace. | | [`wait_for_next_event`](#ida_dbg.wait_for_next_event)(→ dbg_event_code_t) | Wait for the next event. | | [`get_debug_event`](#ida_dbg.get_debug_event)(→ debug_event_t const \*) | Get the current debugger event. | | [`set_debugger_options`](#ida_dbg.set_debugger_options)(→ uint) | Set debugger options. Replaces debugger options with the specification combination Debugger options | | [`set_remote_debugger`](#ida_dbg.set_remote_debugger)(→ None) | Set remote debugging options. Should be used before starting the debugger. | | [`get_process_options2`](#ida_dbg.get_process_options2)(→ qstring \*, qstring \*, ...) | | | [`retrieve_exceptions`](#ida_dbg.retrieve_exceptions)(→ excvec_t \*) | Retrieve the exception information. You may freely modify the returned vector and add/edit/delete exceptions You must call store_exceptions() after any modifications Note: exceptions with code zero, multiple exception codes or names are prohibited | | [`store_exceptions`](#ida_dbg.store_exceptions)(→ bool) | Update the exception information stored in the debugger module by invoking its dbg->set_exception_info callback | | [`define_exception`](#ida_dbg.define_exception)(→ str) | Convenience function: define new exception code. | | [`create_source_viewer`](#ida_dbg.create_source_viewer)(→ source_view_t \*) | Create a source code view. | | [`get_dbg_byte`](#ida_dbg.get_dbg_byte)(→ uint32 \*) | Get one byte of the debugged process memory. | | [`put_dbg_byte`](#ida_dbg.put_dbg_byte)(→ bool) | Change one byte of the debugged process memory. | | [`invalidate_dbgmem_config`](#ida_dbg.invalidate_dbgmem_config)(→ None) | Invalidate the debugged process memory configuration. Call this function if the debugged process might have changed its memory layout (allocated more memory, for example) | | [`invalidate_dbgmem_contents`](#ida_dbg.invalidate_dbgmem_contents)(→ None) | Invalidate the debugged process memory contents. Call this function each time the process has been stopped or the process memory is modified. If ea == BADADDR, then the whole memory contents will be invalidated | | [`is_debugger_on`](#ida_dbg.is_debugger_on)(→ bool) | Is the debugger currently running? | | [`is_debugger_memory`](#ida_dbg.is_debugger_memory)(→ bool) | Is the address mapped to debugger memory? | | [`get_tev_ea`](#ida_dbg.get_tev_ea)(→ ida_idaapi.ea_t) | | | [`get_tev_type`](#ida_dbg.get_tev_type)(→ int) | | | [`get_tev_tid`](#ida_dbg.get_tev_tid)(→ int) | | | [`bring_debugger_to_front`](#ida_dbg.bring_debugger_to_front)(→ None) | | | [`set_manual_regions`](#ida_dbg.set_manual_regions)(→ None) | | | [`edit_manual_regions`](#ida_dbg.edit_manual_regions)(→ None) | | | [`enable_manual_regions`](#ida_dbg.enable_manual_regions)(→ None) | | | [`handle_debug_event`](#ida_dbg.handle_debug_event)(→ int) | | | [`add_virt_module`](#ida_dbg.add_virt_module)(→ bool) | | | [`del_virt_module`](#ida_dbg.del_virt_module)(→ bool) | | | [`internal_ioctl`](#ida_dbg.internal_ioctl)(→ int) | | | [`get_dbg_memory_info`](#ida_dbg.get_dbg_memory_info)(→ int) | | | [`set_bpt_group`](#ida_dbg.set_bpt_group)(→ bool) | Move a bpt into a folder in the breakpoint dirtree if the folder didn't exists, it will be created sq{Type, Synchronous function, Notification, none (synchronous function)} | | [`set_bptloc_group`](#ida_dbg.set_bptloc_group)(→ bool) | Move a bpt into a folder in the breakpoint dirtree based on the bpt_location find_bpt is called to retrieve the bpt and then set_bpt_group if the folder didn't exists, it will be created sq{Type, Synchronous function, Notification, none (synchronous function)} | | [`get_bpt_group`](#ida_dbg.get_bpt_group)(→ Union[str, None]) | Retrieve the absolute path to the folder of the bpt based on the bpt_location find_bpt is called to retrieve the bpt sq{Type, Synchronous function, Notification, none (synchronous function)} | | [`rename_bptgrp`](#ida_dbg.rename_bptgrp)(→ bool) | Rename a folder of bpt dirtree sq{Type, Synchronous function, Notification, none (synchronous function)} | | [`del_bptgrp`](#ida_dbg.del_bptgrp)(→ bool) | Delete a folder, bpt that were part of this folder are moved to the root folder sq{Type, Synchronous function, Notification, none (synchronous function)} | | [`get_grp_bpts`](#ida_dbg.get_grp_bpts)(→ ssize_t) | Retrieve a copy of the bpts stored in a folder sq{Type, Synchronous function, Notification, none (synchronous function)} | | [`enable_bptgrp`](#ida_dbg.enable_bptgrp)(→ int) | Enable (or disable) all bpts in a folder sq{Type, Synchronous function, Notification, none (synchronous function)} | | [`get_local_vars`](#ida_dbg.get_local_vars)(→ bool) | | | [`srcdbg_request_step_into`](#ida_dbg.srcdbg_request_step_into)(→ bool) | | | [`srcdbg_request_step_over`](#ida_dbg.srcdbg_request_step_over)(→ bool) | | | [`srcdbg_request_step_until_ret`](#ida_dbg.srcdbg_request_step_until_ret)(→ bool) | | | [`hide_all_bpts`](#ida_dbg.hide_all_bpts)(→ int) | | | [`read_dbg_memory`](#ida_dbg.read_dbg_memory)(→ ssize_t) | | | [`get_module_info`](#ida_dbg.get_module_info)(→ bool) | | | [`dbg_bin_search`](#ida_dbg.dbg_bin_search)(→ Union[str, None]) | | | [`load_debugger`](#ida_dbg.load_debugger)(→ bool) | | | [`collect_stack_trace`](#ida_dbg.collect_stack_trace)(→ bool) | | | [`get_global_var`](#ida_dbg.get_global_var)(→ bool) | | | [`get_local_var`](#ida_dbg.get_local_var)(→ bool) | | | [`get_srcinfo_provider`](#ida_dbg.get_srcinfo_provider)(→ srcinfo_provider_t \*) | | | [`get_current_source_file`](#ida_dbg.get_current_source_file)(→ Union[str, None]) | | | [`get_current_source_line`](#ida_dbg.get_current_source_line)(→ int) | | | [`add_path_mapping`](#ida_dbg.add_path_mapping)(→ None) | | | [`srcdbg_step_into`](#ida_dbg.srcdbg_step_into)(→ bool) | | | [`srcdbg_step_over`](#ida_dbg.srcdbg_step_over)(→ bool) | | | [`srcdbg_step_until_ret`](#ida_dbg.srcdbg_step_until_ret)(→ bool) | | | [`set_debugger_event_cond`](#ida_dbg.set_debugger_event_cond)(→ None) | | | [`get_debugger_event_cond`](#ida_dbg.get_debugger_event_cond)(→ str) | | | [`set_process_options`](#ida_dbg.set_process_options)(→ None) | Set process options. Any of the arguments may be nullptr, which means 'do not modify' | | [`get_process_options`](#ida_dbg.get_process_options)(→ qstring \*, qstring \*, qstring \*, ...) | Get process options. Any of the arguments may be nullptr | | [`get_manual_regions`](#ida_dbg.get_manual_regions)(\*args) | Returns the manual memory regions | | [`dbg_is_loaded`](#ida_dbg.dbg_is_loaded)() | Checks if a debugger is loaded | | [`refresh_debugger_memory`](#ida_dbg.refresh_debugger_memory)() | Refreshes the debugger memory | | [`list_bptgrps`](#ida_dbg.list_bptgrps)(→ Union[List[str], None]) | Retrieve the list of absolute path of all folders of bpt dirtree. | | [`internal_get_sreg_base`](#ida_dbg.internal_get_sreg_base)(tid, sreg_value) | Get the sreg base, for the given thread. | | [`write_dbg_memory`](#ida_dbg.write_dbg_memory)(→ ssize_t) | | | [`dbg_can_query`](#ida_dbg.dbg_can_query)() | This function can be used to check if the debugger can be queried: | | [`set_reg_val`](#ida_dbg.set_reg_val)(→ bool) | Set a register value by name | | [`request_set_reg_val`](#ida_dbg.request_set_reg_val)(→ PyObject \*) | Post a set_reg_val() request. | | [`get_reg_val`](#ida_dbg.get_reg_val)(\*args) | Get a register value. | | [`get_reg_vals`](#ida_dbg.get_reg_vals)(→ ida_idd.regvals_t) | Fetch live registers values for the thread | | [`get_tev_reg_val`](#ida_dbg.get_tev_reg_val)(tev, reg) | | | [`get_tev_reg_mem_qty`](#ida_dbg.get_tev_reg_mem_qty)(tev) | | | [`get_tev_reg_mem`](#ida_dbg.get_tev_reg_mem)(tev, idx) | | | [`get_tev_reg_mem_ea`](#ida_dbg.get_tev_reg_mem_ea)(tev, idx) | | | [`send_dbg_command`](#ida_dbg.send_dbg_command)(command) | Send a direct command to the debugger backend, and | ## Module Contents ### *class* ida_dbg.bpt_vec_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### push_back(\*args) → bpt_t & #### pop_back() → [None](https://docs.python.org/3/library/constants.html#None) #### size() → [int](https://docs.python.org/3/library/functions.html#int) #### empty() → [bool](https://docs.python.org/3/library/functions.html#bool) #### at(\_idx: [int](https://docs.python.org/3/library/functions.html#int)) → bpt_t const & #### qclear() → [None](https://docs.python.org/3/library/constants.html#None) #### clear() → [None](https://docs.python.org/3/library/constants.html#None) #### resize(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### grow(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### capacity() → [int](https://docs.python.org/3/library/functions.html#int) #### reserve(cnt: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### truncate() → [None](https://docs.python.org/3/library/constants.html#None) #### swap(r: [bpt_vec_t](#ida_dbg.bpt_vec_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extract() → bpt_t \* #### inject(s: [bpt_t](#ida_dbg.bpt_t), len: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### begin(\*args) → qvector< bpt_t >::const_iterator #### end(\*args) → qvector< bpt_t >::const_iterator #### insert(it: [bpt_t](#ida_dbg.bpt_t), x: [bpt_t](#ida_dbg.bpt_t)) → qvector< bpt_t >::iterator #### erase(\*args) → qvector< bpt_t >::iterator #### append(x: [bpt_t](#ida_dbg.bpt_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extend(x: [bpt_vec_t](#ida_dbg.bpt_vec_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### front #### back ### *class* ida_dbg.tev_reg_values_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### push_back(\*args) → tev_reg_value_t & #### pop_back() → [None](https://docs.python.org/3/library/constants.html#None) #### size() → [int](https://docs.python.org/3/library/functions.html#int) #### empty() → [bool](https://docs.python.org/3/library/functions.html#bool) #### at(\_idx: [int](https://docs.python.org/3/library/functions.html#int)) → tev_reg_value_t const & #### qclear() → [None](https://docs.python.org/3/library/constants.html#None) #### clear() → [None](https://docs.python.org/3/library/constants.html#None) #### resize(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### grow(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### capacity() → [int](https://docs.python.org/3/library/functions.html#int) #### reserve(cnt: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### truncate() → [None](https://docs.python.org/3/library/constants.html#None) #### swap(r: [tev_reg_values_t](#ida_dbg.tev_reg_values_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extract() → tev_reg_value_t \* #### inject(s: [tev_reg_value_t](#ida_dbg.tev_reg_value_t), len: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### begin(\*args) → qvector< tev_reg_value_t >::const_iterator #### end(\*args) → qvector< tev_reg_value_t >::const_iterator #### insert(it: [tev_reg_value_t](#ida_dbg.tev_reg_value_t), x: [tev_reg_value_t](#ida_dbg.tev_reg_value_t)) → qvector< tev_reg_value_t >::iterator #### erase(\*args) → qvector< tev_reg_value_t >::iterator #### append(x: [tev_reg_value_t](#ida_dbg.tev_reg_value_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extend(x: [tev_reg_values_t](#ida_dbg.tev_reg_values_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### front #### back ### *class* ida_dbg.tevinforeg_vec_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### push_back(\*args) → tev_info_reg_t & #### pop_back() → [None](https://docs.python.org/3/library/constants.html#None) #### size() → [int](https://docs.python.org/3/library/functions.html#int) #### empty() → [bool](https://docs.python.org/3/library/functions.html#bool) #### at(\_idx: [int](https://docs.python.org/3/library/functions.html#int)) → tev_info_reg_t const & #### qclear() → [None](https://docs.python.org/3/library/constants.html#None) #### clear() → [None](https://docs.python.org/3/library/constants.html#None) #### resize(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### grow(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### capacity() → [int](https://docs.python.org/3/library/functions.html#int) #### reserve(cnt: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### truncate() → [None](https://docs.python.org/3/library/constants.html#None) #### swap(r: [tevinforeg_vec_t](#ida_dbg.tevinforeg_vec_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extract() → tev_info_reg_t \* #### inject(s: [tev_info_reg_t](#ida_dbg.tev_info_reg_t), len: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### begin(\*args) → qvector< tev_info_reg_t >::const_iterator #### end(\*args) → qvector< tev_info_reg_t >::const_iterator #### insert(it: [tev_info_reg_t](#ida_dbg.tev_info_reg_t), x: [tev_info_reg_t](#ida_dbg.tev_info_reg_t)) → qvector< tev_info_reg_t >::iterator #### erase(\*args) → qvector< tev_info_reg_t >::iterator #### append(x: [tev_info_reg_t](#ida_dbg.tev_info_reg_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extend(x: [tevinforeg_vec_t](#ida_dbg.tevinforeg_vec_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### front #### back ### *class* ida_dbg.memreg_infos_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### push_back(\*args) → memreg_info_t & #### pop_back() → [None](https://docs.python.org/3/library/constants.html#None) #### size() → [int](https://docs.python.org/3/library/functions.html#int) #### empty() → [bool](https://docs.python.org/3/library/functions.html#bool) #### at(\_idx: [int](https://docs.python.org/3/library/functions.html#int)) → memreg_info_t const & #### qclear() → [None](https://docs.python.org/3/library/constants.html#None) #### clear() → [None](https://docs.python.org/3/library/constants.html#None) #### resize(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### grow(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### capacity() → [int](https://docs.python.org/3/library/functions.html#int) #### reserve(cnt: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### truncate() → [None](https://docs.python.org/3/library/constants.html#None) #### swap(r: [memreg_infos_t](#ida_dbg.memreg_infos_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extract() → memreg_info_t \* #### inject(s: [memreg_info_t](#ida_dbg.memreg_info_t), len: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### begin(\*args) → qvector< memreg_info_t >::const_iterator #### end(\*args) → qvector< memreg_info_t >::const_iterator #### insert(it: [memreg_info_t](#ida_dbg.memreg_info_t), x: [memreg_info_t](#ida_dbg.memreg_info_t)) → qvector< memreg_info_t >::iterator #### erase(\*args) → qvector< memreg_info_t >::iterator #### append(x: [memreg_info_t](#ida_dbg.memreg_info_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extend(x: [memreg_infos_t](#ida_dbg.memreg_infos_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### front #### back ### ida_dbg.run_to(\*args) → [bool](https://docs.python.org/3/library/functions.html#bool) Execute the process until the given address is reached. If no process is active, a new process is started. Technically, the debugger sets up a temporary breakpoint at the given address, and continues (or starts) the execution of the whole process. So, all threads continue their execution! sq{Type, Asynchronous function - available as Request, Notification, dbg_run_to} * **Parameters:** * **ea** – target address * **pid** – not used yet. please do not specify this parameter. * **tid** – not used yet. please do not specify this parameter. ### ida_dbg.request_run_to(\*args) → [bool](https://docs.python.org/3/library/functions.html#bool) Post a run_to() request. ### ida_dbg.dbg_null ### ida_dbg.dbg_process_start ### ida_dbg.dbg_process_exit ### ida_dbg.dbg_process_attach ### ida_dbg.dbg_process_detach ### ida_dbg.dbg_thread_start ### ida_dbg.dbg_thread_exit ### ida_dbg.dbg_library_load ### ida_dbg.dbg_library_unload ### ida_dbg.dbg_information ### ida_dbg.dbg_exception ### ida_dbg.dbg_suspend_process The process is now suspended. ### ida_dbg.dbg_bpt A user defined breakpoint was reached. ### ida_dbg.dbg_trace A step occurred (one instruction was executed). This event notification is only generated if step tracing is enabled. ### ida_dbg.dbg_request_error An error occurred during the processing of a request. ### ida_dbg.dbg_step_into ### ida_dbg.dbg_step_over ### ida_dbg.dbg_run_to ### ida_dbg.dbg_step_until_ret ### ida_dbg.dbg_bpt_changed Breakpoint has been changed. ### ida_dbg.dbg_started_loading_bpts Started loading breakpoint info from idb. ### ida_dbg.dbg_finished_loading_bpts Finished loading breakpoint info from idb. ### ida_dbg.dbg_last The last debugger notification code. ### ida_dbg.BPTEV_ADDED Breakpoint has been added. ### ida_dbg.BPTEV_REMOVED Breakpoint has been removed. ### ida_dbg.BPTEV_CHANGED Breakpoint has been modified. ### ida_dbg.run_requests() → [bool](https://docs.python.org/3/library/functions.html#bool) Execute requests until all requests are processed or an asynchronous function is called. sq{Type, Synchronous function, Notification, none (synchronous function)} * **Returns:** false if not all requests could be processed (indicates an asynchronous function was started) ### ida_dbg.get_running_request() → ui_notification_t Get the current running request. sq{Type, Synchronous function, Notification, none (synchronous function)} * **Returns:** ui_null if no running request ### ida_dbg.is_request_running() → [bool](https://docs.python.org/3/library/functions.html#bool) Is a request currently running? ### ida_dbg.get_running_notification() → dbg_notification_t Get the notification associated (if any) with the current running request. sq{Type, Synchronous function, Notification, none (synchronous function)} * **Returns:** dbg_null if no running request ### ida_dbg.clear_requests_queue() → [None](https://docs.python.org/3/library/constants.html#None) Clear the queue of waiting requests. sq{Type, Synchronous function, Notification, none (synchronous function)} ### ida_dbg.get_process_state() → [int](https://docs.python.org/3/library/functions.html#int) Return the state of the currently debugged process. sq{Type, Synchronous function, Notification, none (synchronous function)} * **Returns:** one of Debugged process states ### ida_dbg.DSTATE_SUSP process is suspended and will not continue ### ida_dbg.DSTATE_NOTASK no process is currently debugged ### ida_dbg.DSTATE_RUN process is running ### ida_dbg.is_valid_dstate(state: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_dbg.DBGINV_MEMORY invalidate cached memory contents ### ida_dbg.DBGINV_MEMCFG invalidate cached process segmentation ### ida_dbg.DBGINV_REGS invalidate cached register values ### ida_dbg.DBGINV_ALL invalidate everything ### ida_dbg.DBGINV_REDRAW refresh the screen ### ida_dbg.DBGINV_NONE invalidate nothing ### ida_dbg.set_process_state(newstate: int, p_thid: thid_t \*, dbginv: int) → [int](https://docs.python.org/3/library/functions.html#int) Set new state for the debugged process. Notifies the IDA kernel about the change of the debugged process state. For example, a debugger module could call this function when it knows that the process is suspended for a short period of time. Some IDA API calls can be made only when the process is suspended. The process state is usually restored before returning control to the caller. You must know that it is ok to change the process state, doing it at arbitrary moments may crash the application or IDA. sq{Type, Synchronous function, Notification, none (synchronous function)} * **Parameters:** * **newstate** – new process state (one of Debugged process states) if DSTATE_NOTASK is passed then the state is not changed * **p_thid** – ptr to new thread id. may be nullptr or pointer to NO_THREAD. the pointed variable will contain the old thread id upon return * **dbginv** – Debugged process invalidation options * **Returns:** old debugger state (one of Debugged process states) ### ida_dbg.invalidate_dbg_state(dbginv: [int](https://docs.python.org/3/library/functions.html#int)) → [int](https://docs.python.org/3/library/functions.html#int) Invalidate cached debugger information. sq{Type, Synchronous function, Notification, none (synchronous function)} * **Parameters:** **dbginv** – Debugged process invalidation options * **Returns:** current debugger state (one of Debugged process states) ### ida_dbg.start_process(path: [str](https://docs.python.org/3/library/stdtypes.html#str) = None, args: [str](https://docs.python.org/3/library/stdtypes.html#str) = None, sdir: [str](https://docs.python.org/3/library/stdtypes.html#str) = None) → [int](https://docs.python.org/3/library/functions.html#int) Start a process in the debugger. sq{Type, Asynchronous function - available as Request, Notification, dbg_process_start} * **Parameters:** * **path** – path to the executable to start * **args** – arguments to pass to process * **sdir** – starting directory for the process * **Returns:** -1: impossible to create the process * **Returns:** 0: the starting of the process was cancelled by the user * **Returns:** 1: the process was properly started ### ida_dbg.request_start_process(path: [str](https://docs.python.org/3/library/stdtypes.html#str) = None, args: [str](https://docs.python.org/3/library/stdtypes.html#str) = None, sdir: [str](https://docs.python.org/3/library/stdtypes.html#str) = None) → [int](https://docs.python.org/3/library/functions.html#int) Post a start_process() request. ### ida_dbg.suspend_process() → [bool](https://docs.python.org/3/library/functions.html#bool) Suspend the process in the debugger. sq{ Type, \* Synchronous function (if in a notification handler) \* Asynchronous function (everywhere else) \* available as Request, Notification, \* none (if in a notification handler) \* dbg_suspend_process (everywhere else) } ### ida_dbg.request_suspend_process() → [bool](https://docs.python.org/3/library/functions.html#bool) Post a suspend_process() request. ### ida_dbg.continue_process() → [bool](https://docs.python.org/3/library/functions.html#bool) Continue the execution of the process in the debugger. sq{Type, Synchronous function - available as Request, Notification, none (synchronous function)} ### ida_dbg.request_continue_process() → [bool](https://docs.python.org/3/library/functions.html#bool) Post a continue_process() request. ### ida_dbg.continue_backwards() → [bool](https://docs.python.org/3/library/functions.html#bool) Continue the execution of the process in the debugger backwards. Can only be used with debuggers that support time-travel debugging. sq{Type, Synchronous function - available as Request, Notification, none (synchronous function)} ### ida_dbg.request_continue_backwards() → [bool](https://docs.python.org/3/library/functions.html#bool) Post a continue_backwards() request. ### ida_dbg.exit_process() → [bool](https://docs.python.org/3/library/functions.html#bool) Terminate the debugging of the current process. sq{Type, Asynchronous function - available as Request, Notification, dbg_process_exit} ### ida_dbg.request_exit_process() → [bool](https://docs.python.org/3/library/functions.html#bool) Post an exit_process() request. ### ida_dbg.get_processes(proclist: [procinfo_vec_t](../ida_idd/index.md#ida_idd.procinfo_vec_t)) → ssize_t Take a snapshot of running processes and return their description. sq{Type, Synchronous function, Notification, none (synchronous function)} * **Parameters:** **proclist** – array with information about each running process * **Returns:** number of processes or -1 on error ### ida_dbg.attach_process(\*args) → [int](https://docs.python.org/3/library/functions.html#int) Attach the debugger to a running process. sq{Type, Asynchronous function - available as Request, Notification, dbg_process_attach} * **Parameters:** * **pid** – PID of the process to attach to. If NO_PROCESS, a dialog box will interactively ask the user for the process to attach to. * **event_id** – event to trigger upon attaching * **Returns:** -4: debugger was not inited * **Returns:** -3: the attaching is not supported * **Returns:** -2: impossible to find a compatible process * **Returns:** -1: impossible to attach to the given process (process died, privilege needed, not supported by the debugger plugin, …) * **Returns:** 0: the user cancelled the attaching to the process * **Returns:** 1: the debugger properly attached to the process ### ida_dbg.request_attach_process(pid: pid_t, event_id: [int](https://docs.python.org/3/library/functions.html#int)) → [int](https://docs.python.org/3/library/functions.html#int) Post an attach_process() request. ### ida_dbg.detach_process() → [bool](https://docs.python.org/3/library/functions.html#bool) Detach the debugger from the debugged process. sq{Type, Asynchronous function - available as Request, Notification, dbg_process_detach} ### ida_dbg.request_detach_process() → [bool](https://docs.python.org/3/library/functions.html#bool) Post a detach_process() request. ### ida_dbg.is_debugger_busy() → [bool](https://docs.python.org/3/library/functions.html#bool) Is the debugger busy?. Some debuggers do not accept any commands while the debugged application is running. For such a debugger, it is unsafe to do anything with the database (even simple queries like get_byte may lead to undesired consequences). Returns: true if the debugged application is running under such a debugger ### ida_dbg.get_thread_qty() → [int](https://docs.python.org/3/library/functions.html#int) Get number of threads. sq{Type, Synchronous function, Notification, none (synchronous function)} ### ida_dbg.getn_thread(n: [int](https://docs.python.org/3/library/functions.html#int)) → thid_t Get the ID of a thread. sq{Type, Synchronous function, Notification, none (synchronous function)} * **Parameters:** **n** – number of thread, is in range 0..get_thread_qty()-1 * **Returns:** NO_THREAD if the thread doesn’t exist. ### ida_dbg.get_current_thread() → thid_t Get current thread ID. sq{Type, Synchronous function, Notification, none (synchronous function)} ### ida_dbg.getn_thread_name(n: [int](https://docs.python.org/3/library/functions.html#int)) → [str](https://docs.python.org/3/library/stdtypes.html#str) Get the NAME of a thread sq{Type, Synchronous function, Notification, none (synchronous function)} * **Parameters:** **n** – number of thread, is in range 0..get_thread_qty()-1 or -1 for the current thread * **Returns:** thread name or nullptr if the thread doesn’t exist. ### ida_dbg.select_thread(tid: thid_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Select the given thread as the current debugged thread. All thread related execution functions will work on this thread. The process must be suspended to select a new thread. sq{Type, Synchronous function - available as request, Notification, none (synchronous function)} * **Parameters:** **tid** – ID of the thread to select * **Returns:** false if the thread doesn’t exist. ### ida_dbg.request_select_thread(tid: thid_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Post a select_thread() request. ### ida_dbg.suspend_thread(tid: thid_t) → [int](https://docs.python.org/3/library/functions.html#int) Suspend thread. Suspending a thread may deadlock the whole application if the suspended was owning some synchronization objects. sq{Type, Synchronous function - available as request, Notification, none (synchronous function)} * **Parameters:** **tid** – thread id * **Returns:** -1: network error * **Returns:** 0: failed * **Returns:** 1: ok ### ida_dbg.request_suspend_thread(tid: thid_t) → [int](https://docs.python.org/3/library/functions.html#int) Post a suspend_thread() request. ### ida_dbg.resume_thread(tid: thid_t) → [int](https://docs.python.org/3/library/functions.html#int) Resume thread. sq{Type, Synchronous function - available as request, Notification, none (synchronous function)} * **Parameters:** **tid** – thread id * **Returns:** -1: network error * **Returns:** 0: failed * **Returns:** 1: ok ### ida_dbg.request_resume_thread(tid: thid_t) → [int](https://docs.python.org/3/library/functions.html#int) Post a resume_thread() request. ### ida_dbg.get_first_module(modinfo: [modinfo_t](../ida_idd/index.md#ida_idd.modinfo_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_dbg.get_next_module(modinfo: [modinfo_t](../ida_idd/index.md#ida_idd.modinfo_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_dbg.step_into() → [bool](https://docs.python.org/3/library/functions.html#bool) Execute one instruction in the current thread. Other threads are kept suspended. sq{Type, Asynchronous function - available as Request, Notification, dbg_step_into} ### ida_dbg.request_step_into() → [bool](https://docs.python.org/3/library/functions.html#bool) Post a step_into() request. ### ida_dbg.step_over() → [bool](https://docs.python.org/3/library/functions.html#bool) Execute one instruction in the current thread, but without entering into functions. Others threads are kept suspended. sq{Type, Asynchronous function - available as Request, Notification, dbg_step_over} ### ida_dbg.request_step_over() → [bool](https://docs.python.org/3/library/functions.html#bool) Post a step_over() request. ### ida_dbg.step_into_backwards() → [bool](https://docs.python.org/3/library/functions.html#bool) Execute one instruction backwards in the current thread. Other threads are kept suspended. sq{Type, Asynchronous function - available as Request, Notification, dbg_step_into} ### ida_dbg.request_step_into_backwards() → [bool](https://docs.python.org/3/library/functions.html#bool) Post a step_into_backwards() request. ### ida_dbg.step_over_backwards() → [bool](https://docs.python.org/3/library/functions.html#bool) Execute one instruction backwards in the current thread, but without entering into functions. Other threads are kept suspended. sq{Type, Asynchronous function - available as Request, Notification, dbg_step_over} ### ida_dbg.request_step_over_backwards() → [bool](https://docs.python.org/3/library/functions.html#bool) Post a step_over_backwards() request. ### ida_dbg.run_to_backwards(\*args) → [bool](https://docs.python.org/3/library/functions.html#bool) Execute the process backwards until the given address is reached. Technically, the debugger sets up a temporary breakpoint at the given address, and continues (or starts) the execution of the whole process. sq{Type, Asynchronous function - available as Request, Notification, dbg_run_to} * **Parameters:** * **ea** – target address * **pid** – not used yet. please do not specify this parameter. * **tid** – not used yet. please do not specify this parameter. ### ida_dbg.request_run_to_backwards(\*args) → [bool](https://docs.python.org/3/library/functions.html#bool) Post a run_to_backwards() request. ### ida_dbg.step_until_ret() → [bool](https://docs.python.org/3/library/functions.html#bool) Execute instructions in the current thread until a function return instruction is executed (aka “step out”). Other threads are kept suspended. sq{Type, Asynchronous function - available as Request, Notification, dbg_step_until_ret} ### ida_dbg.request_step_until_ret() → [bool](https://docs.python.org/3/library/functions.html#bool) Post a step_until_ret() request. ### ida_dbg.set_resume_mode(tid: thid_t, mode: resume_mode_t) → [bool](https://docs.python.org/3/library/functions.html#bool) How to resume the application. Set resume mode but do not resume process. ### ida_dbg.request_set_resume_mode(tid: thid_t, mode: resume_mode_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Post a set_resume_mode() request. ### ida_dbg.get_dbg_reg_info(regname: [str](https://docs.python.org/3/library/stdtypes.html#str), ri: [register_info_t](../ida_idd/index.md#ida_idd.register_info_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Get register information sq{Type, Synchronous function, Notification, none (synchronous function)} ### ida_dbg.get_sp_val() → uint64 \* Get value of the SP register for the current thread. Requires a suspended debugger. ### ida_dbg.get_ip_val() → uint64 \* Get value of the IP (program counter) register for the current thread. Requires a suspended debugger. ### ida_dbg.is_reg_integer(regname: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [bool](https://docs.python.org/3/library/functions.html#bool) Does a register contain an integer value? sq{Type, Synchronous function, Notification, none (synchronous function)} ### ida_dbg.is_reg_float(regname: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [bool](https://docs.python.org/3/library/functions.html#bool) Does a register contain a floating point value? sq{Type, Synchronous function, Notification, none (synchronous function)} ### ida_dbg.is_reg_custom(regname: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [bool](https://docs.python.org/3/library/functions.html#bool) Does a register contain a value of a custom data type? sq{Type, Synchronous function, Notification, none (synchronous function)} ### ida_dbg.set_bptloc_string(s: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [int](https://docs.python.org/3/library/functions.html#int) ### ida_dbg.get_bptloc_string(i: [int](https://docs.python.org/3/library/functions.html#int)) → [str](https://docs.python.org/3/library/stdtypes.html#str) ### ida_dbg.MOVBPT_OK moved ok ### ida_dbg.MOVBPT_NOT_FOUND source bpt not found ### ida_dbg.MOVBPT_DEST_BUSY destination location is busy (we already have such a bpt) ### ida_dbg.MOVBPT_BAD_TYPE BPLT_ABS is not supported. ### *class* ida_dbg.bptaddrs_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### bpt *: bpt_t \** ### ida_dbg.BPLT_ABS absolute address: ea ### ida_dbg.BPLT_REL relative address: module_path, offset ### ida_dbg.BPLT_SYM symbolic: symbol_name, offset ### ida_dbg.BPLT_SRC source level: filename, lineno ### ida_dbg.BPLT_LAST ### *class* ida_dbg.bpt_location_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### info *: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)* #### index *: [int](https://docs.python.org/3/library/functions.html#int)* #### loctype *: bpt_loctype_t* #### type() → bpt_loctype_t Get bpt type. #### is_empty_path() → [bool](https://docs.python.org/3/library/functions.html#bool) No path/filename specified? (BPLT_REL, BPLT_SRC). #### path() → [str](https://docs.python.org/3/library/stdtypes.html#str) Get path/filename (BPLT_REL, BPLT_SRC). #### symbol() → [str](https://docs.python.org/3/library/stdtypes.html#str) Get symbol name (BPLT_SYM). #### lineno() → [int](https://docs.python.org/3/library/functions.html#int) Get line number (BPLT_SRC). #### offset() → [int](https://docs.python.org/3/library/functions.html#int) Get offset (BPLT_REL, BPLT_SYM). #### ea() → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) Get address (BPLT_ABS). #### valid() → [bool](https://docs.python.org/3/library/functions.html#bool) Locations that are absolute+BADADDR, are considered invalid. #### set_abs_bpt(a: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) Specify an absolute address location. #### set_src_bpt(fn: [str](https://docs.python.org/3/library/stdtypes.html#str), \_lineno: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) Specify a source level location. #### set_sym_bpt(\_symbol: [str](https://docs.python.org/3/library/stdtypes.html#str), \_offset: [int](https://docs.python.org/3/library/functions.html#int) = 0) → [None](https://docs.python.org/3/library/constants.html#None) Specify a symbolic location. #### set_rel_bpt(mod: [str](https://docs.python.org/3/library/stdtypes.html#str), \_offset: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) Specify a relative address location. #### compare(r: [bpt_location_t](#ida_dbg.bpt_location_t)) → [int](https://docs.python.org/3/library/functions.html#int) Lexically compare two breakpoint locations. Bpt locations are first compared based on type (i.e. BPLT_ABS < BPLT_REL). BPLT_ABS locations are compared based on their ea values. For all other location types, locations are first compared based on their string (path/filename/symbol), then their offset/lineno. ### *class* ida_dbg.bpt_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### cb *: [int](https://docs.python.org/3/library/functions.html#int)* size of this structure #### loc *: [bpt_location_t](#ida_dbg.bpt_location_t)* Location. #### pid *: pid_t* breakpoint process id #### tid *: thid_t* breakpoint thread id #### ea *: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)* Address, if known. For BPLT_SRC, index into an internal data struct. #### type *: bpttype_t* Breakpoint type. #### pass_count *: [int](https://docs.python.org/3/library/functions.html#int)* Number of times the breakpoint is hit before stopping (default is 0: stop always) #### flags *: [int](https://docs.python.org/3/library/functions.html#int)* Breakpoint property bits #### props *: [int](https://docs.python.org/3/library/functions.html#int)* Internal breakpoint properties #### size *: [int](https://docs.python.org/3/library/functions.html#int)* Size of the breakpoint (0 for software breakpoints). #### cndidx *: [int](https://docs.python.org/3/library/functions.html#int)* Internal number of the condition (<0-none). #### bptid *: inode_t* Internal breakpoint id. #### is_hwbpt() → [bool](https://docs.python.org/3/library/functions.html#bool) Is hardware breakpoint? #### enabled() → [bool](https://docs.python.org/3/library/functions.html#bool) Is breakpoint enabled? #### is_low_level() → [bool](https://docs.python.org/3/library/functions.html#bool) Is bpt condition calculated at low level? #### badbpt() → [bool](https://docs.python.org/3/library/functions.html#bool) Failed to write bpt to process memory? #### listbpt() → [bool](https://docs.python.org/3/library/functions.html#bool) Include in the bpt list? #### is_compiled() → [bool](https://docs.python.org/3/library/functions.html#bool) Condition has been compiled? #### is_active() → [bool](https://docs.python.org/3/library/functions.html#bool) Written completely to process? #### is_partially_active() → [bool](https://docs.python.org/3/library/functions.html#bool) Written partially to process? #### is_inactive() → [bool](https://docs.python.org/3/library/functions.html#bool) Not written to process at all? #### is_page_bpt() → [bool](https://docs.python.org/3/library/functions.html#bool) Page breakpoint? #### get_size() → [int](https://docs.python.org/3/library/functions.html#int) Get bpt size. #### set_abs_bpt(a: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) Set bpt location to an absolute address. #### set_src_bpt(fn: [str](https://docs.python.org/3/library/stdtypes.html#str), lineno: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) Set bpt location to a source line. #### set_sym_bpt(sym: [str](https://docs.python.org/3/library/stdtypes.html#str), o: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) Set bpt location to a symbol. #### set_rel_bpt(mod: [str](https://docs.python.org/3/library/stdtypes.html#str), o: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) Set bpt location to a relative address. #### is_absbpt() → [bool](https://docs.python.org/3/library/functions.html#bool) Is absolute address breakpoint? #### is_relbpt() → [bool](https://docs.python.org/3/library/functions.html#bool) Is relative address breakpoint? #### is_symbpt() → [bool](https://docs.python.org/3/library/functions.html#bool) Is symbolic breakpoint? #### is_srcbpt() → [bool](https://docs.python.org/3/library/functions.html#bool) Is source level breakpoint? #### is_tracemodebpt() → [bool](https://docs.python.org/3/library/functions.html#bool) Does breakpoint trace anything? #### is_traceonbpt() → [bool](https://docs.python.org/3/library/functions.html#bool) Is this a tracing breakpoint, and is tracing enabled? #### is_traceoffbpt() → [bool](https://docs.python.org/3/library/functions.html#bool) Is this a tracing breakpoint, and is tracing disabled? #### set_trace_action(enable: [bool](https://docs.python.org/3/library/functions.html#bool), trace_types: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) Configure tracing options. #### get_cnd_elang_idx() → [int](https://docs.python.org/3/library/functions.html#int) #### condition *: PyObject \** #### elang *: PyObject \** ### ida_dbg.BPT_BRK suspend execution upon hit ### ida_dbg.BPT_TRACE add trace information upon hit ### ida_dbg.BPT_UPDMEM refresh the memory layout and contents before evaluating bpt condition ### ida_dbg.BPT_ENABLED enabled? ### ida_dbg.BPT_LOWCND condition is calculated at low level (on the server side) ### ida_dbg.BPT_TRACEON enable tracing when the breakpoint is reached ### ida_dbg.BPT_TRACE_INSN instruction tracing ### ida_dbg.BPT_TRACE_FUNC function tracing ### ida_dbg.BPT_TRACE_BBLK basic block tracing ### ida_dbg.BPT_TRACE_TYPES trace insns, functions, and basic blocks. if any of BPT_TRACE_TYPES bits are set but BPT_TRACEON is clear, then turn off tracing for the specified trace types ### ida_dbg.BPT_ELANG_MASK ### ida_dbg.BPT_ELANG_SHIFT index of the extlang (scripting language) of the condition ### ida_dbg.BKPT_BADBPT failed to write the bpt to the process memory (at least one location) ### ida_dbg.BKPT_LISTBPT include in bpt list (user-defined bpt) ### ida_dbg.BKPT_TRACE trace bpt; should not be deleted when the process gets suspended ### ida_dbg.BKPT_ACTIVE active? ### ida_dbg.BKPT_PARTIAL partially active? (some locations were not written yet) ### ida_dbg.BKPT_CNDREADY condition has been compiled ### ida_dbg.BKPT_FAKEPEND fake pending bpt: it is inactive but another bpt of the same type is active at the same address(es) ### ida_dbg.BKPT_PAGE written to the process as a page bpt. Available only after writing the bpt to the process. ### ida_dbg.get_bpt_qty() → [int](https://docs.python.org/3/library/functions.html#int) Get number of breakpoints. sq{Type, Synchronous function, Notification, none (synchronous function)} ### ida_dbg.getn_bpt(n: [int](https://docs.python.org/3/library/functions.html#int), bpt: [bpt_t](#ida_dbg.bpt_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Get the characteristics of a breakpoint. sq{Type, Synchronous function, Notification, none (synchronous function)} * **Parameters:** * **n** – number of breakpoint, is in range 0..get_bpt_qty()-1 * **bpt** – filled with the characteristics. * **Returns:** false if no breakpoint exists ### ida_dbg.get_bpt(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), bpt: [bpt_t](#ida_dbg.bpt_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Get the characteristics of a breakpoint. sq{Type, Synchronous function, Notification, none (synchronous function)} * **Parameters:** * **ea** – any address in the breakpoint range * **bpt** – if not nullptr, is filled with the characteristics. * **Returns:** false if no breakpoint exists ### ida_dbg.exist_bpt(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Does a breakpoint exist at the given location? ### ida_dbg.add_bpt(\*args) → [bool](https://docs.python.org/3/library/functions.html#bool) This function has the following signatures: > 1. add_bpt(ea: ida_idaapi.ea_t, size: asize_t=0, type: bpttype_t=BPT_DEFAULT) -> bool > 2. add_bpt(bpt: const bpt_t &) -> bool # 0: add_bpt(ea: ida_idaapi.ea_t, size: asize_t=0, type: bpttype_t=BPT_DEFAULT) -> bool Add a new breakpoint in the debugged process. sq{Type, Synchronous function - available as request, Notification, none (synchronous function)} # 1: add_bpt(bpt: const bpt_t &) -> bool Add a new breakpoint in the debugged process. sq{Type, Synchronous function - available as request, Notification, none (synchronous function)} ### ida_dbg.request_add_bpt(\*args) → [bool](https://docs.python.org/3/library/functions.html#bool) This function has the following signatures: > 1. request_add_bpt(ea: ida_idaapi.ea_t, size: asize_t=0, type: bpttype_t=BPT_DEFAULT) -> bool > 2. request_add_bpt(bpt: const bpt_t &) -> bool # 0: request_add_bpt(ea: ida_idaapi.ea_t, size: asize_t=0, type: bpttype_t=BPT_DEFAULT) -> bool Post an add_bpt(ea_t, asize_t, bpttype_t) request. # 1: request_add_bpt(bpt: const bpt_t &) -> bool Post an add_bpt(const bpt_t &) request. ### ida_dbg.del_bpt(\*args) → [bool](https://docs.python.org/3/library/functions.html#bool) This function has the following signatures: > 1. del_bpt(ea: ida_idaapi.ea_t) -> bool > 2. del_bpt(bptloc: const bpt_location_t &) -> bool # 0: del_bpt(ea: ida_idaapi.ea_t) -> bool Delete an existing breakpoint in the debugged process. sq{Type, Synchronous function - available as request, Notification, none (synchronous function)} # 1: del_bpt(bptloc: const bpt_location_t &) -> bool Delete an existing breakpoint in the debugged process. sq{Type, Synchronous function - available as request, Notification, none (synchronous function)} ### ida_dbg.request_del_bpt(\*args) → [bool](https://docs.python.org/3/library/functions.html#bool) This function has the following signatures: > 1. request_del_bpt(ea: ida_idaapi.ea_t) -> bool > 2. request_del_bpt(bptloc: const bpt_location_t &) -> bool # 0: request_del_bpt(ea: ida_idaapi.ea_t) -> bool Post a del_bpt(ea_t) request. # 1: request_del_bpt(bptloc: const bpt_location_t &) -> bool Post a del_bpt(const bpt_location_t &) request. ### ida_dbg.update_bpt(bpt: [bpt_t](#ida_dbg.bpt_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Update modifiable characteristics of an existing breakpoint. To update the breakpoint location, use change_bptlocs() sq{Type, Synchronous function, Notification, none (synchronous function)} ### ida_dbg.find_bpt(bptloc: [bpt_location_t](#ida_dbg.bpt_location_t), bpt: [bpt_t](#ida_dbg.bpt_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Find a breakpoint by location. sq{Type, Synchronous function - available as request, Notification, none (synchronous function)} * **Parameters:** * **bptloc** – Breakpoint location * **bpt** – bpt is filled if the breakpoint was found ### ida_dbg.enable_bpt(\*args) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_dbg.disable_bpt(\*args) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_dbg.request_enable_bpt(\*args) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_dbg.request_disable_bpt(\*args) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_dbg.check_bpt(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [int](https://docs.python.org/3/library/functions.html#int) Check the breakpoint at the specified address. * **Returns:** one of Breakpoint status codes ### ida_dbg.BPTCK_NONE breakpoint does not exist ### ida_dbg.BPTCK_NO breakpoint is disabled ### ida_dbg.BPTCK_YES breakpoint is enabled ### ida_dbg.BPTCK_ACT breakpoint is active (written to the process) ### ida_dbg.set_trace_size(size: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) Specify the new size of the circular buffer. sq{Type, Synchronous function, Notification, none (synchronous function)} * **Parameters:** **size** – if 0, buffer isn’t circular and events are never removed. If the new size is smaller than the existing number of trace events, a corresponding number of trace events are removed. ### ida_dbg.clear_trace() → [None](https://docs.python.org/3/library/constants.html#None) Clear all events in the trace buffer. sq{Type, Synchronous function - available as request, Notification, none (synchronous function)} ### ida_dbg.request_clear_trace() → [None](https://docs.python.org/3/library/constants.html#None) Post a clear_trace() request. ### ida_dbg.is_step_trace_enabled() → [bool](https://docs.python.org/3/library/functions.html#bool) Get current state of step tracing. sq{Type, Synchronous function, Notification, none (synchronous function)} ### ida_dbg.enable_step_trace(enable: [int](https://docs.python.org/3/library/functions.html#int) = 1) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_dbg.disable_step_trace() → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_dbg.request_enable_step_trace(enable: [int](https://docs.python.org/3/library/functions.html#int) = 1) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_dbg.request_disable_step_trace() → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_dbg.ST_OVER_DEBUG_SEG step tracing will be disabled when IP is in a debugger segment ### ida_dbg.ST_OVER_LIB_FUNC step tracing will be disabled when IP is in a library function ### ida_dbg.ST_ALREADY_LOGGED step tracing will be disabled when IP is already logged ### ida_dbg.ST_SKIP_LOOPS step tracing will try to skip loops already recorded ### ida_dbg.ST_DIFFERENTIAL tracing: log only new instructions (not previously logged) ### ida_dbg.ST_OPTIONS_MASK mask of available options, to ensure compatibility with newer IDA versions ### ida_dbg.ST_OPTIONS_DEFAULT ### ida_dbg.IT_LOG_SAME_IP specific options for instruction tracing (see set_insn_trace_options()) instruction tracing will log new instructions even when IP doesn’t change ### ida_dbg.FT_LOG_RET specific options for function tracing (see set_func_trace_options()) function tracing will log returning instructions ### ida_dbg.BT_LOG_INSTS specific options for basic block tracing (see set_bblk_trace_options()) log all instructions in the current basic block ### ida_dbg.get_step_trace_options() → [int](https://docs.python.org/3/library/functions.html#int) Get current step tracing options. sq{Type, Synchronous function, Notification, none (synchronous function)} * **Returns:** Step trace options ### ida_dbg.set_step_trace_options(options: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) Modify step tracing options. sq{Type, Synchronous function - available as request, Notification, none (synchronous function)} ### ida_dbg.request_set_step_trace_options(options: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) Post a set_step_trace_options() request. ### ida_dbg.is_insn_trace_enabled() → [bool](https://docs.python.org/3/library/functions.html#bool) Get current state of instruction tracing. sq{Type, Synchronous function, Notification, none (synchronous function)} ### ida_dbg.enable_insn_trace(enable: [bool](https://docs.python.org/3/library/functions.html#bool) = True) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_dbg.disable_insn_trace() → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_dbg.request_enable_insn_trace(enable: [bool](https://docs.python.org/3/library/functions.html#bool) = True) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_dbg.request_disable_insn_trace() → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_dbg.get_insn_trace_options() → [int](https://docs.python.org/3/library/functions.html#int) Get current instruction tracing options. Also see IT_LOG_SAME_IP sq{Type, Synchronous function, Notification, none (synchronous function)} ### ida_dbg.set_insn_trace_options(options: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) Modify instruction tracing options. sq{Type, Synchronous function - available as request, Notification, none (synchronous function)} ### ida_dbg.request_set_insn_trace_options(options: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) Post a set_insn_trace_options() request. ### ida_dbg.is_func_trace_enabled() → [bool](https://docs.python.org/3/library/functions.html#bool) Get current state of functions tracing. sq{Type, Synchronous function, Notification, none (synchronous function)} ### ida_dbg.enable_func_trace(enable: [bool](https://docs.python.org/3/library/functions.html#bool) = True) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_dbg.disable_func_trace() → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_dbg.request_enable_func_trace(enable: [bool](https://docs.python.org/3/library/functions.html#bool) = True) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_dbg.request_disable_func_trace() → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_dbg.get_func_trace_options() → [int](https://docs.python.org/3/library/functions.html#int) Get current function tracing options. Also see FT_LOG_RET sq{Type, Synchronous function, Notification, none (synchronous function)} ### ida_dbg.set_func_trace_options(options: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) Modify function tracing options. sq{Type, Synchronous function - available as request, Notification, none (synchronous function)} ### ida_dbg.request_set_func_trace_options(options: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) Post a set_func_trace_options() request. ### ida_dbg.enable_bblk_trace(enable: [bool](https://docs.python.org/3/library/functions.html#bool) = True) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_dbg.disable_bblk_trace() → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_dbg.request_enable_bblk_trace(enable: [bool](https://docs.python.org/3/library/functions.html#bool) = True) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_dbg.request_disable_bblk_trace() → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_dbg.is_bblk_trace_enabled() → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_dbg.get_bblk_trace_options() → [int](https://docs.python.org/3/library/functions.html#int) Get current basic block tracing options. Also see BT_LOG_INSTS sq{Type, Synchronous function, Notification, none (synchronous function)} ### ida_dbg.set_bblk_trace_options(options: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) Modify basic block tracing options (see BT_LOG_INSTS). ### ida_dbg.request_set_bblk_trace_options(options: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) Post a set_bblk_trace_options() request. ### ida_dbg.tev_none no event ### ida_dbg.tev_insn an instruction trace ### ida_dbg.tev_call a function call trace ### ida_dbg.tev_ret a function return trace ### ida_dbg.tev_bpt write, read/write, execution trace ### ida_dbg.tev_mem memory layout changed ### ida_dbg.tev_event debug event occurred ### ida_dbg.tev_max first unused event type ### *class* ida_dbg.tev_info_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### type *: tev_type_t* trace event type #### tid *: thid_t* thread where the event was recorded #### ea *: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)* address where the event occurred ### *class* ida_dbg.memreg_info_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### ea *: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)* #### get_bytes() → PyObject \* #### bytes ### ida_dbg.get_tev_qty() → [int](https://docs.python.org/3/library/functions.html#int) Get number of trace events available in trace buffer. sq{Type, Synchronous function, Notification, none (synchronous function)} ### ida_dbg.get_tev_info(n: [int](https://docs.python.org/3/library/functions.html#int), tev_info: [tev_info_t](#ida_dbg.tev_info_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Get main information about a trace event. sq{Type, Synchronous function, Notification, none (synchronous function)} * **Parameters:** * **n** – number of trace event, is in range 0..get_tev_qty()-1. 0 represents the latest added trace event. * **tev_info** – result * **Returns:** success ### ida_dbg.get_insn_tev_reg_val(n: [int](https://docs.python.org/3/library/functions.html#int), regname: [str](https://docs.python.org/3/library/stdtypes.html#str), regval: [regval_t](../ida_idd/index.md#ida_idd.regval_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Read a register value from an instruction trace event. sq{Type, Synchronous function, Notification, none (synchronous function)} * **Parameters:** * **n** – number of trace event, is in range 0..get_tev_qty()-1. 0 represents the latest added trace event. * **regname** – name of desired register * **regval** – result * **Returns:** false if not an instruction event. ### ida_dbg.get_insn_tev_reg_mem(n: [int](https://docs.python.org/3/library/functions.html#int), memmap: [memreg_infos_t](#ida_dbg.memreg_infos_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Read the memory pointed by register values from an instruction trace event. sq{Type, Synchronous function, Notification, none (synchronous function)} * **Parameters:** * **n** – number of trace event, is in range 0..get_tev_qty()-1. 0 represents the latest added trace event. * **memmap** – result * **Returns:** false if not an instruction event or no memory is available ### ida_dbg.get_insn_tev_reg_result(n: [int](https://docs.python.org/3/library/functions.html#int), regname: [str](https://docs.python.org/3/library/stdtypes.html#str), regval: [regval_t](../ida_idd/index.md#ida_idd.regval_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Read the resulting register value from an instruction trace event. sq{Type, Synchronous function, Notification, none (synchronous function)} * **Parameters:** * **n** – number of trace event, is in range 0..get_tev_qty()-1. 0 represents the latest added trace event. * **regname** – name of desired register * **regval** – result * **Returns:** false if not an instruction trace event or register wasn’t modified. ### ida_dbg.get_call_tev_callee(n: [int](https://docs.python.org/3/library/functions.html#int)) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) Get the called function from a function call trace event. sq{Type, Synchronous function, Notification, none (synchronous function)} * **Parameters:** **n** – number of trace event, is in range 0..get_tev_qty()-1. 0 represents the latest added trace event. * **Returns:** BADADDR if not a function call event. ### ida_dbg.get_ret_tev_return(n: [int](https://docs.python.org/3/library/functions.html#int)) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) Get the return address from a function return trace event. sq{Type, Synchronous function, Notification, none (synchronous function)} * **Parameters:** **n** – number of trace event, is in range 0..get_tev_qty()-1. 0 represents the latest added trace event. * **Returns:** BADADDR if not a function return event. ### ida_dbg.get_bpt_tev_ea(n: [int](https://docs.python.org/3/library/functions.html#int)) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) Get the address associated to a read, read/write or execution trace event. sq{Type, Synchronous function, Notification, none (synchronous function)} * **Parameters:** **n** – number of trace event, is in range 0..get_tev_qty()-1. 0 represents the latest added trace event. * **Returns:** BADADDR if not a read, read/write or execution trace event. ### ida_dbg.get_tev_memory_info(n: [int](https://docs.python.org/3/library/functions.html#int), mi: [meminfo_vec_t](../ida_idd/index.md#ida_idd.meminfo_vec_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Get the memory layout, if any, for the specified tev object. sq{Type, Synchronous function, Notification, none (synchronous function)} * **Parameters:** * **n** – number of trace event, is in range 0..get_tev_qty()-1. 0 represents the latest added trace event. * **mi** – result * **Returns:** false if the tev_t object is not of type tev_mem, true otherwise, with the new memory layout in “mi”. ### ida_dbg.get_tev_event(n: [int](https://docs.python.org/3/library/functions.html#int), d: [debug_event_t](../ida_idd/index.md#ida_idd.debug_event_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Get the corresponding debug event, if any, for the specified tev object. sq{Type, Synchronous function, Notification, none (synchronous function)} * **Parameters:** * **n** – number of trace event, is in range 0..get_tev_qty()-1. 0 represents the latest added trace event. * **d** – result * **Returns:** false if the tev_t object doesn’t have any associated debug event, true otherwise, with the debug event in “d”. ### ida_dbg.get_trace_base_address() → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) Get the base address of the current trace. sq{Type, Synchronous function, Notification, none (synchronous function)} * **Returns:** the base address of the currently loaded trace ### ida_dbg.set_trace_base_address(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) Set the base address of the current trace. sq{Type, Synchronous function, Notification, none (synchronous function)} ### ida_dbg.dbg_add_thread(tid: thid_t) → [None](https://docs.python.org/3/library/constants.html#None) Add a thread to the current trace. sq{Type, Synchronous function, Notification, none (synchronous function)} ### ida_dbg.dbg_del_thread(tid: thid_t) → [None](https://docs.python.org/3/library/constants.html#None) Delete a thread from the current trace. sq{Type, Synchronous function, Notification, none (synchronous function)} ### ida_dbg.dbg_add_tev(type: tev_type_t, tid: thid_t, address: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) Add a new trace element to the current trace. sq{Type, Synchronous function, Notification, none (synchronous function)} ### *class* ida_dbg.tev_reg_value_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### value *: [regval_t](../ida_idd/index.md#ida_idd.regval_t)* #### reg_idx *: [int](https://docs.python.org/3/library/functions.html#int)* ### *class* ida_dbg.tev_info_reg_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### info *: [tev_info_t](#ida_dbg.tev_info_t)* #### registers *: [tev_reg_values_t](#ida_dbg.tev_reg_values_t)* ### ida_dbg.SAVE_ALL_VALUES ### ida_dbg.SAVE_DIFF ### ida_dbg.SAVE_NONE ### ida_dbg.dbg_add_many_tevs(new_tevs: [tevinforeg_vec_t](#ida_dbg.tevinforeg_vec_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Add many new trace elements to the current trace. sq{Type, Synchronous function, Notification, none (synchronous function)} * **Returns:** false if the operation failed for any tev_info_t object ### ida_dbg.dbg_add_insn_tev(tid: thid_t, ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), save: save_reg_values_t = SAVE_DIFF) → [bool](https://docs.python.org/3/library/functions.html#bool) Add a new instruction trace element to the current trace. sq{Type, Synchronous function, Notification, none (synchronous function)} * **Returns:** false if the operation failed, true otherwise ### ida_dbg.dbg_add_bpt_tev(tid: thid_t, ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), bp: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Add a new breakpoint trace element to the current trace. sq{Type, Synchronous function, Notification, none (synchronous function)} * **Returns:** false if the operation failed, true otherwise ### ida_dbg.dbg_add_call_tev(tid: thid_t, caller: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), callee: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) Add a new call trace element to the current trace. sq{Type, Synchronous function, Notification, none (synchronous function)} ### ida_dbg.dbg_add_ret_tev(tid: thid_t, ret_insn: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), return_to: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) Add a new return trace element to the current trace. sq{Type, Synchronous function, Notification, none (synchronous function)} ### ida_dbg.dbg_add_debug_event(event: [debug_event_t](../ida_idd/index.md#ida_idd.debug_event_t)) → [None](https://docs.python.org/3/library/constants.html#None) Add a new debug event to the current trace. sq{Type, Synchronous function, Notification, none (synchronous function)} ### ida_dbg.load_trace_file(filename: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None) Load a recorded trace file in the ‘Tracing’ window. If the call succeeds and ‘buf’ is not null, the description of the trace stored in the binary trace file will be returned in ‘buf’ ### ida_dbg.save_trace_file(filename: [str](https://docs.python.org/3/library/stdtypes.html#str), description: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [bool](https://docs.python.org/3/library/functions.html#bool) Save the current trace in the specified file. ### ida_dbg.is_valid_trace_file(filename: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [bool](https://docs.python.org/3/library/functions.html#bool) Is the specified file a valid trace file for the current database? ### ida_dbg.set_trace_file_desc(filename: [str](https://docs.python.org/3/library/stdtypes.html#str), description: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [bool](https://docs.python.org/3/library/functions.html#bool) Change the description of the specified trace file. ### ida_dbg.get_trace_file_desc(filename: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None) Get the file header of the specified trace file. ### ida_dbg.choose_trace_file() → [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None) Show the choose trace dialog. ### ida_dbg.diff_trace_file(filename: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [bool](https://docs.python.org/3/library/functions.html#bool) Show difference between the current trace and the one from ‘filename’. ### ida_dbg.graph_trace() → [bool](https://docs.python.org/3/library/functions.html#bool) Show the trace callgraph. ### ida_dbg.set_highlight_trace_options(hilight: [bool](https://docs.python.org/3/library/functions.html#bool), color: bgcolor_t, diff: bgcolor_t) → [None](https://docs.python.org/3/library/constants.html#None) Set highlight trace parameters. ### ida_dbg.set_trace_platform(platform: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [None](https://docs.python.org/3/library/constants.html#None) Set platform name of current trace. ### ida_dbg.get_trace_platform() → [str](https://docs.python.org/3/library/stdtypes.html#str) Get platform name of current trace. ### ida_dbg.set_trace_dynamic_register_set(idaregs: dynamic_register_set_t &) → [None](https://docs.python.org/3/library/constants.html#None) Set dynamic register set of current trace. ### ida_dbg.get_trace_dynamic_register_set(idaregs: dynamic_register_set_t \*) → [None](https://docs.python.org/3/library/constants.html#None) Get dynamic register set of current trace. ### ida_dbg.DEC_NOTASK process does not exist ### ida_dbg.DEC_ERROR error ### ida_dbg.DEC_TIMEOUT timeout ### ida_dbg.WFNE_ANY return the first event (even if it doesn’t suspend the process) ### ida_dbg.WFNE_SUSP wait until the process gets suspended ### ida_dbg.WFNE_SILENT 1: be silent, 0:display modal boxes if necessary ### ida_dbg.WFNE_CONT continue from the suspended state ### ida_dbg.WFNE_NOWAIT do not wait for any event, immediately return DEC_TIMEOUT (to be used with WFNE_CONT) ### ida_dbg.WFNE_USEC timeout is specified in microseconds (minimum non-zero timeout is 40000us) ### ida_dbg.DOPT_SEGM_MSGS log debugger segments modifications ### ida_dbg.DOPT_START_BPT break on process start ### ida_dbg.DOPT_THREAD_MSGS log thread starts/exits ### ida_dbg.DOPT_THREAD_BPT break on thread start/exit ### ida_dbg.DOPT_BPT_MSGS log breakpoints ### ida_dbg.DOPT_LIB_MSGS log library loads/unloads ### ida_dbg.DOPT_LIB_BPT break on library load/unload ### ida_dbg.DOPT_INFO_MSGS log debugging info events ### ida_dbg.DOPT_INFO_BPT break on debugging information ### ida_dbg.DOPT_REAL_MEMORY do not hide breakpoint instructions ### ida_dbg.DOPT_REDO_STACK reconstruct the stack ### ida_dbg.DOPT_ENTRY_BPT break on program entry point ### ida_dbg.DOPT_EXCDLG exception dialogs: ### ida_dbg.EXCDLG_NEVER never display exception dialogs ### ida_dbg.EXCDLG_UNKNOWN display for unknown exceptions ### ida_dbg.EXCDLG_ALWAYS always display ### ida_dbg.DOPT_LOAD_DINFO automatically load debug files (pdb) ### ida_dbg.DOPT_END_BPT evaluate event condition on process end ### ida_dbg.DOPT_TEMP_HWBPT when possible use hardware bpts for temp bpts ### ida_dbg.DOPT_FAST_STEP prevent debugger memory refreshes when single-stepping ### ida_dbg.DOPT_DISABLE_ASLR disable ASLR ### ida_dbg.wait_for_next_event(wfne: [int](https://docs.python.org/3/library/functions.html#int), timeout: [int](https://docs.python.org/3/library/functions.html#int)) → dbg_event_code_t Wait for the next event. This function (optionally) resumes the process execution, and waits for a debugger event until a possible timeout occurs. * **Parameters:** * **wfne** – combination of Wait for debugger event flags constants * **timeout** – number of seconds to wait, -1-infinity * **Returns:** either an event_id_t (if > 0), or a dbg_event_code_t (if <= 0) ### ida_dbg.get_debug_event() → debug_event_t const \* Get the current debugger event. ### ida_dbg.set_debugger_options(options: uint) → uint Set debugger options. Replaces debugger options with the specification combination Debugger options * **Returns:** the old debugger options ### ida_dbg.set_remote_debugger(host: [str](https://docs.python.org/3/library/stdtypes.html#str), \_pass: [str](https://docs.python.org/3/library/stdtypes.html#str), port: [int](https://docs.python.org/3/library/functions.html#int) = -1) → [None](https://docs.python.org/3/library/constants.html#None) Set remote debugging options. Should be used before starting the debugger. * **Parameters:** * **host** – If empty, IDA will use local debugger. If nullptr, the host will not be set. * **port** – If -1, the default port number will be used ### ida_dbg.get_process_options2() → qstring \*, qstring \*, launch_env_t \*, qstring \*, qstring \*, qstring \*, int \* ### ida_dbg.retrieve_exceptions() → excvec_t \* Retrieve the exception information. You may freely modify the returned vector and add/edit/delete exceptions You must call store_exceptions() after any modifications Note: exceptions with code zero, multiple exception codes or names are prohibited ### ida_dbg.store_exceptions() → [bool](https://docs.python.org/3/library/functions.html#bool) Update the exception information stored in the debugger module by invoking its dbg->set_exception_info callback ### ida_dbg.define_exception(code: uint, name: [str](https://docs.python.org/3/library/stdtypes.html#str), desc: [str](https://docs.python.org/3/library/stdtypes.html#str), flags: [int](https://docs.python.org/3/library/functions.html#int)) → [str](https://docs.python.org/3/library/stdtypes.html#str) Convenience function: define new exception code. * **Parameters:** * **code** – exception code (cannot be 0) * **name** – exception name (cannot be empty or nullptr) * **desc** – exception description (maybe nullptr) * **flags** – combination of Exception info flags * **Returns:** failure message or nullptr. You must call store_exceptions() if this function succeeds ### *class* ida_dbg.eval_ctx_t(\_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### ea *: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)* ### ida_dbg.SRCIT_NONE unknown ### ida_dbg.SRCIT_MODULE module ### ida_dbg.SRCIT_FUNC function ### ida_dbg.SRCIT_STMT a statement (if/while/for…) ### ida_dbg.SRCIT_EXPR an expression (a+b\*c) ### ida_dbg.SRCIT_STTVAR static variable/code ### ida_dbg.SRCIT_LOCVAR a stack, register, or register-relative local variable or parameter ### *class* ida_dbg.source_item_t(\*args, \*\*kwargs) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### get_name() → [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None) Get name of the item. #### get_lnnum() → [int](https://docs.python.org/3/library/functions.html#int) Get line number of the item (1-based). #### get_end_lnnum() → [int](https://docs.python.org/3/library/functions.html#int) Get ending line number (1-based.) The returned line number is the next line after the expression #### get_colnum() → [int](https://docs.python.org/3/library/functions.html#int) Get column number of the item. If unknown, return -1 #### get_end_colnum() → [int](https://docs.python.org/3/library/functions.html#int) Get ending column number. The returned column number is the next column after the expression. If unknown, return -1 #### get_ea() → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) Get starting address of the item. #### get_size() → asize_t Get size of the item in bytes. If the item is fragmented, return size of the main fragment. if unknown, return 0. On error, return (asize_t) -1. #### get_item_bounds(set: [rangeset_t](../ida_range/index.md#ida_range.rangeset_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Get item boundaries as a set of ranges. This function will be used to determine what breakpoints to set for stepping into/stepping over the item. #### get_parent(max_kind: src_item_kind_t) → [source_item_ptr](#ida_dbg.source_item_ptr) Get parent of the item. * **Parameters:** **max_kind** – maximal source item kind we are interested in. for example, if max_kinds==SRCIT_STMT, we are not interested in expressions, only in the enclosing statement or function #### get_hint(ctx: [eval_ctx_t](#ida_dbg.eval_ctx_t)) → Tuple[[str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None), [int](https://docs.python.org/3/library/functions.html#int)] Calculate a string to display as a hint. * **Parameters:** **ctx** – execution context, or None if no context is available * **Returns:** a tuple (hint, nlines) where: * hint is the hint text (may be multiline & with colors), or None if no hint is available * nlines is the number of important lines in the hint; only meaningful when hint is not None - otherwise the value is unspecified #### evaluate(ctx: eval_ctx_t, res: idc_value_t \*) → [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None) Evaluate item value (meaningful only for expression items). * **Parameters:** * **ctx** – execution context. nullptr means missing context. * **res** – buffer for the result (or exception if evaluation failed) #### equals(other: [source_item_t](#ida_dbg.source_item_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Do these two items have the same source?. source_item_t will return true if the two items are backed by DIEs that have the same file offset. * **Returns:** false: the source of the underlying data differs between the two items. * **Returns:** true: when either the source of the underlying data is the same for the two items, or when such information is not available. #### get_item_kind(arg2: [eval_ctx_t](#ida_dbg.eval_ctx_t)) → src_item_kind_t #### is_stmt(ctx: [eval_ctx_t](#ida_dbg.eval_ctx_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_module(ctx: [eval_ctx_t](#ida_dbg.eval_ctx_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_func(ctx: [eval_ctx_t](#ida_dbg.eval_ctx_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_expr(ctx: [eval_ctx_t](#ida_dbg.eval_ctx_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_locvar(ctx: [eval_ctx_t](#ida_dbg.eval_ctx_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_sttvar(ctx: [eval_ctx_t](#ida_dbg.eval_ctx_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### get_provider() → srcinfo_provider_t \* #### get_location(arg2: [argloc_t](../ida_typeinf/index.md#ida_typeinf.argloc_t), arg3: [eval_ctx_t](#ida_dbg.eval_ctx_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### get_expr_tinfo(tif: [tinfo_t](../ida_typeinf/index.md#ida_typeinf.tinfo_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_dbg.SRCDBG_PROV_VERSION ### ida_dbg.create_source_viewer(out_ccv: TWidget \*\*, parent: TWidget \*, custview: TWidget \*, sf: source_file_ptr, lines: strvec_t \*, lnnum: int, colnum: int, flags: int) → source_view_t \* Create a source code view. ### ida_dbg.get_dbg_byte(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → uint32 \* Get one byte of the debugged process memory. * **Parameters:** **ea** – linear address * **Returns:** success * **Returns:** true: success * **Returns:** false: address inaccessible or debugger not running ### ida_dbg.put_dbg_byte(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), x: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) Change one byte of the debugged process memory. * **Parameters:** * **ea** – linear address * **x** – byte value * **Returns:** true if the process memory has been modified ### ida_dbg.invalidate_dbgmem_config() → [None](https://docs.python.org/3/library/constants.html#None) Invalidate the debugged process memory configuration. Call this function if the debugged process might have changed its memory layout (allocated more memory, for example) ### ida_dbg.invalidate_dbgmem_contents(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), size: asize_t) → [None](https://docs.python.org/3/library/constants.html#None) Invalidate the debugged process memory contents. Call this function each time the process has been stopped or the process memory is modified. If ea == BADADDR, then the whole memory contents will be invalidated ### ida_dbg.is_debugger_on() → [bool](https://docs.python.org/3/library/functions.html#bool) Is the debugger currently running? ### ida_dbg.is_debugger_memory(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Is the address mapped to debugger memory? ### ida_dbg.get_tev_ea(n: [int](https://docs.python.org/3/library/functions.html#int)) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) ### ida_dbg.get_tev_type(n: [int](https://docs.python.org/3/library/functions.html#int)) → [int](https://docs.python.org/3/library/functions.html#int) ### ida_dbg.get_tev_tid(n: [int](https://docs.python.org/3/library/functions.html#int)) → [int](https://docs.python.org/3/library/functions.html#int) ### ida_dbg.bring_debugger_to_front() → [None](https://docs.python.org/3/library/constants.html#None) ### ida_dbg.set_manual_regions(ranges: [meminfo_vec_t](../ida_idd/index.md#ida_idd.meminfo_vec_t)) → [None](https://docs.python.org/3/library/constants.html#None) ### ida_dbg.edit_manual_regions() → [None](https://docs.python.org/3/library/constants.html#None) ### ida_dbg.enable_manual_regions(enable: [bool](https://docs.python.org/3/library/functions.html#bool)) → [None](https://docs.python.org/3/library/constants.html#None) ### ida_dbg.handle_debug_event(ev: [debug_event_t](../ida_idd/index.md#ida_idd.debug_event_t), rqflags: [int](https://docs.python.org/3/library/functions.html#int)) → [int](https://docs.python.org/3/library/functions.html#int) ### ida_dbg.add_virt_module(mod: [modinfo_t](../ida_idd/index.md#ida_idd.modinfo_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_dbg.del_virt_module(base: ea_t const) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_dbg.internal_ioctl(fn: int, buf: void const \*, poutbuf: void \*\*, poutsize: ssize_t \*) → [int](https://docs.python.org/3/library/functions.html#int) ### ida_dbg.get_dbg_memory_info(ranges: [meminfo_vec_t](../ida_idd/index.md#ida_idd.meminfo_vec_t)) → [int](https://docs.python.org/3/library/functions.html#int) ### ida_dbg.set_bpt_group(bpt: [bpt_t](#ida_dbg.bpt_t), grp_name: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [bool](https://docs.python.org/3/library/functions.html#bool) Move a bpt into a folder in the breakpoint dirtree if the folder didn’t exists, it will be created sq{Type, Synchronous function, Notification, none (synchronous function)} * **Parameters:** * **bpt** – bpt that will be moved * **grp_name** – absolute path to the breakpoint dirtree folder * **Returns:** success ### ida_dbg.set_bptloc_group(bptloc: [bpt_location_t](#ida_dbg.bpt_location_t), grp_name: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [bool](https://docs.python.org/3/library/functions.html#bool) Move a bpt into a folder in the breakpoint dirtree based on the bpt_location find_bpt is called to retrieve the bpt and then set_bpt_group if the folder didn’t exists, it will be created sq{Type, Synchronous function, Notification, none (synchronous function)} * **Parameters:** * **bptloc** – bptlocation of the bpt that will be moved * **grp_name** – absolute path to the breakpoint dirtree folder * **Returns:** success ### ida_dbg.get_bpt_group(bptloc: [bpt_location_t](#ida_dbg.bpt_location_t)) → [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None) Retrieve the absolute path to the folder of the bpt based on the bpt_location find_bpt is called to retrieve the bpt sq{Type, Synchronous function, Notification, none (synchronous function)} * **Parameters:** **bptloc** – bptlocation of the bpt * **Returns:** success * **Returns:** true: breakpoint correctly moved to the directory ### ida_dbg.rename_bptgrp(old_name: [str](https://docs.python.org/3/library/stdtypes.html#str), new_name: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [bool](https://docs.python.org/3/library/functions.html#bool) Rename a folder of bpt dirtree sq{Type, Synchronous function, Notification, none (synchronous function)} * **Parameters:** * **old_name** – absolute path to the folder to be renamed * **new_name** – absolute path of the new folder name * **Returns:** success ### ida_dbg.del_bptgrp(name: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [bool](https://docs.python.org/3/library/functions.html#bool) Delete a folder, bpt that were part of this folder are moved to the root folder sq{Type, Synchronous function, Notification, none (synchronous function)} * **Parameters:** **name** – full path to the folder to be deleted * **Returns:** success ### ida_dbg.get_grp_bpts(bpts: [bpt_vec_t](#ida_dbg.bpt_vec_t), grp_name: [str](https://docs.python.org/3/library/stdtypes.html#str)) → ssize_t Retrieve a copy of the bpts stored in a folder sq{Type, Synchronous function, Notification, none (synchronous function)} * **Parameters:** * **bpts** – : pointer to a vector where the copy of bpts are stored * **grp_name** – absolute path to the folder * **Returns:** number of bpts present in the vector ### ida_dbg.enable_bptgrp(bptgrp_name: [str](https://docs.python.org/3/library/stdtypes.html#str), enable: [bool](https://docs.python.org/3/library/functions.html#bool) = True) → [int](https://docs.python.org/3/library/functions.html#int) Enable (or disable) all bpts in a folder sq{Type, Synchronous function, Notification, none (synchronous function)} * **Parameters:** * **bptgrp_name** – absolute path to the folder * **enable** – by default true, enable bpts, false disable bpts * **Returns:** -1: an error occurred * **Returns:** 0: no changes * **Returns:** >0: numbers of bpts updated ### ida_dbg.get_local_vars(prov: srcinfo_provider_t \*, ea: ida_idaapi.ea_t, out: source_items_t) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_dbg.srcdbg_request_step_into() → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_dbg.srcdbg_request_step_over() → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_dbg.srcdbg_request_step_until_ret() → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_dbg.hide_all_bpts() → [int](https://docs.python.org/3/library/functions.html#int) ### ida_dbg.read_dbg_memory(ea: ida_idaapi.ea_t, buffer: void \*, size: int) → ssize_t ### ida_dbg.get_module_info(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), modinfo: [modinfo_t](../ida_idd/index.md#ida_idd.modinfo_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_dbg.dbg_bin_search(start_ea: ida_idaapi.ea_t, end_ea: ida_idaapi.ea_t, data: compiled_binpat_vec_t const &, srch_flags: int) → [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None) ### ida_dbg.load_debugger(dbgname: [str](https://docs.python.org/3/library/stdtypes.html#str), use_remote: [bool](https://docs.python.org/3/library/functions.html#bool)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_dbg.collect_stack_trace(tid: thid_t, trace: [call_stack_t](../ida_idd/index.md#ida_idd.call_stack_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_dbg.get_global_var(prov: srcinfo_provider_t \*, ea: ida_idaapi.ea_t, name: str, out: source_item_ptr) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_dbg.get_local_var(prov: srcinfo_provider_t \*, ea: ida_idaapi.ea_t, name: str, out: source_item_ptr) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_dbg.get_srcinfo_provider(name: [str](https://docs.python.org/3/library/stdtypes.html#str)) → srcinfo_provider_t \* ### ida_dbg.get_current_source_file() → [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None) ### ida_dbg.get_current_source_line() → [int](https://docs.python.org/3/library/functions.html#int) ### ida_dbg.add_path_mapping(src: [str](https://docs.python.org/3/library/stdtypes.html#str), dst: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [None](https://docs.python.org/3/library/constants.html#None) ### ida_dbg.srcdbg_step_into() → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_dbg.srcdbg_step_over() → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_dbg.srcdbg_step_until_ret() → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_dbg.set_debugger_event_cond(evcond: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [None](https://docs.python.org/3/library/constants.html#None) ### ida_dbg.get_debugger_event_cond() → [str](https://docs.python.org/3/library/stdtypes.html#str) ### *class* ida_dbg.dbg_deref_options_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### deref_limit *: [int](https://docs.python.org/3/library/functions.html#int)* #### hide_default_segments *: [bool](https://docs.python.org/3/library/functions.html#bool)* ### *class* ida_dbg.source_item_ptr(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### reset() → [None](https://docs.python.org/3/library/constants.html#None) #### get_name() → [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None) #### get_lnnum() → [int](https://docs.python.org/3/library/functions.html#int) #### get_end_lnnum() → [int](https://docs.python.org/3/library/functions.html#int) #### get_colnum() → [int](https://docs.python.org/3/library/functions.html#int) #### get_end_colnum() → [int](https://docs.python.org/3/library/functions.html#int) #### get_ea() → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) #### get_size() → asize_t #### get_item_bounds(set: [rangeset_t](../ida_range/index.md#ida_range.rangeset_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### get_parent(max_kind: src_item_kind_t) → [source_item_ptr](#ida_dbg.source_item_ptr) #### get_hint(ctx: [eval_ctx_t](#ida_dbg.eval_ctx_t)) → Tuple[[str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None), [int](https://docs.python.org/3/library/functions.html#int)] Calculate a string to display as a hint. * **Parameters:** **ctx** – execution context, or None if no context is available * **Returns:** a tuple (hint, nlines) where: * hint is the hint text (may be multiline & with colors), or None if no hint is available * nlines is the number of important lines in the hint; only meaningful when hint is not None - otherwise the value is unspecified #### evaluate(ctx: eval_ctx_t, res: idc_value_t \*) → [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None) #### equals(other: [source_item_t](#ida_dbg.source_item_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### get_item_kind(arg2: [eval_ctx_t](#ida_dbg.eval_ctx_t)) → src_item_kind_t #### is_stmt(ctx: [eval_ctx_t](#ida_dbg.eval_ctx_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_module(ctx: [eval_ctx_t](#ida_dbg.eval_ctx_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_func(ctx: [eval_ctx_t](#ida_dbg.eval_ctx_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_expr(ctx: [eval_ctx_t](#ida_dbg.eval_ctx_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_locvar(ctx: [eval_ctx_t](#ida_dbg.eval_ctx_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_sttvar(ctx: [eval_ctx_t](#ida_dbg.eval_ctx_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### get_provider() → srcinfo_provider_t \* #### get_location(arg2: [argloc_t](../ida_typeinf/index.md#ida_typeinf.argloc_t), arg3: [eval_ctx_t](#ida_dbg.eval_ctx_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### get_expr_tinfo(tif: [tinfo_t](../ida_typeinf/index.md#ida_typeinf.tinfo_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### refcnt *: [int](https://docs.python.org/3/library/functions.html#int)* #### release() → [None](https://docs.python.org/3/library/constants.html#None) ### *class* ida_dbg.source_items_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### push_back(x: [source_item_ptr](#ida_dbg.source_item_ptr)) → [None](https://docs.python.org/3/library/constants.html#None) #### pop_back() → [None](https://docs.python.org/3/library/constants.html#None) #### size() → [int](https://docs.python.org/3/library/functions.html#int) #### empty() → [bool](https://docs.python.org/3/library/functions.html#bool) #### at(\_idx: [int](https://docs.python.org/3/library/functions.html#int)) → qrefcnt_t< source_item_t > const & #### qclear() → [None](https://docs.python.org/3/library/constants.html#None) #### clear() → [None](https://docs.python.org/3/library/constants.html#None) #### resize(\_newsize: [int](https://docs.python.org/3/library/functions.html#int), x: [source_item_ptr](#ida_dbg.source_item_ptr)) → [None](https://docs.python.org/3/library/constants.html#None) #### capacity() → [int](https://docs.python.org/3/library/functions.html#int) #### reserve(cnt: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### truncate() → [None](https://docs.python.org/3/library/constants.html#None) #### swap(r: [source_items_t](#ida_dbg.source_items_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extract() → qrefcnt_t< source_item_t > \* #### inject(s: [source_item_ptr](#ida_dbg.source_item_ptr), len: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### begin(\*args) → qvector< qrefcnt_t< source_item_t > >::const_iterator #### end(\*args) → qvector< qrefcnt_t< source_item_t > >::const_iterator #### insert(it: [source_item_ptr](#ida_dbg.source_item_ptr), x: [source_item_ptr](#ida_dbg.source_item_ptr)) → qvector< qrefcnt_t< source_item_t > >::iterator #### erase(\*args) → qvector< qrefcnt_t< source_item_t > >::iterator #### append(x: [source_item_ptr](#ida_dbg.source_item_ptr)) → [None](https://docs.python.org/3/library/constants.html#None) #### extend(x: [source_items_t](#ida_dbg.source_items_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### front #### back ### ida_dbg.set_process_options(\*args) → [None](https://docs.python.org/3/library/constants.html#None) Set process options. Any of the arguments may be nullptr, which means ‘do not modify’ ### ida_dbg.get_process_options() → qstring \*, qstring \*, qstring \*, qstring \*, qstring \*, int \* Get process options. Any of the arguments may be nullptr ### ida_dbg.get_manual_regions(\*args) Returns the manual memory regions This function has the following signatures: > 1. get_manual_regions() -> List[Tuple(ida_idaapi.ea_t, ida_idaapi.ea_t, str, str, ida_idaapi.ea_t, int, int)] > Where each tuple holds (start_ea, end_ea, name, sclass, sbase, bitness, perm) > 2. get_manual_regions(storage: meminfo_vec_t) -> None ### ida_dbg.dbg_is_loaded() Checks if a debugger is loaded * **Returns:** Boolean ### ida_dbg.refresh_debugger_memory() Refreshes the debugger memory * **Returns:** Nothing ### *class* ida_dbg.DBG_Hooks(\_flags: [int](https://docs.python.org/3/library/functions.html#int) = 0, \_hkcb_flags: [int](https://docs.python.org/3/library/functions.html#int) = 1) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### hook() → [bool](https://docs.python.org/3/library/functions.html#bool) #### unhook() → [bool](https://docs.python.org/3/library/functions.html#bool) #### dbg_process_start(pid: pid_t, tid: thid_t, ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), modinfo_name: [str](https://docs.python.org/3/library/stdtypes.html#str), modinfo_base: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), modinfo_size: asize_t) → [None](https://docs.python.org/3/library/constants.html#None) #### dbg_process_exit(pid: pid_t, tid: thid_t, ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), exit_code: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### dbg_process_attach(pid: pid_t, tid: thid_t, ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), modinfo_name: [str](https://docs.python.org/3/library/stdtypes.html#str), modinfo_base: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), modinfo_size: asize_t) → [None](https://docs.python.org/3/library/constants.html#None) #### dbg_process_detach(pid: pid_t, tid: thid_t, ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### dbg_thread_start(pid: pid_t, tid: thid_t, ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### dbg_thread_exit(pid: pid_t, tid: thid_t, ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), exit_code: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### dbg_library_load(pid: pid_t, tid: thid_t, ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), modinfo_name: [str](https://docs.python.org/3/library/stdtypes.html#str), modinfo_base: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), modinfo_size: asize_t) → [None](https://docs.python.org/3/library/constants.html#None) #### dbg_library_unload(pid: pid_t, tid: thid_t, ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), info: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [None](https://docs.python.org/3/library/constants.html#None) #### dbg_information(pid: pid_t, tid: thid_t, ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), info: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [None](https://docs.python.org/3/library/constants.html#None) #### dbg_exception(pid: pid_t, tid: thid_t, ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), exc_code: [int](https://docs.python.org/3/library/functions.html#int), exc_can_cont: [bool](https://docs.python.org/3/library/functions.html#bool), exc_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), exc_info: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [int](https://docs.python.org/3/library/functions.html#int) #### dbg_suspend_process() → [None](https://docs.python.org/3/library/constants.html#None) The process is now suspended. #### dbg_bpt(tid: thid_t, bptea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [int](https://docs.python.org/3/library/functions.html#int) A user defined breakpoint was reached. * **Parameters:** * **tid** – (thid_t) * **bptea** – (ea_t) * **Returns:** warn: (int ``` * ``` ) filled with: * -1: display an exception warning dialog if the process is suspended. * 0: never display an exception warning dialog. * 1: always display an exception warning dialog. #### dbg_trace(tid: thid_t, ip: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [int](https://docs.python.org/3/library/functions.html#int) A step occurred (one instruction was executed). This event notification is only generated if step tracing is enabled. * **Parameters:** * **tid** – (thid_t) thread ID * **ip** – (ea_t) current instruction pointer. usually points after the executed instruction * **Returns:** 1: do not log this trace event * **Returns:** 0: log it #### dbg_request_error(failed_command: [int](https://docs.python.org/3/library/functions.html#int), failed_dbg_notification: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) An error occurred during the processing of a request. * **Parameters:** * **failed_command** – (ui_notification_t) * **failed_dbg_notification** – (dbg_notification_t) #### dbg_step_into() → [None](https://docs.python.org/3/library/constants.html#None) #### dbg_step_over() → [None](https://docs.python.org/3/library/constants.html#None) #### dbg_run_to(pid: pid_t, tid: thid_t, ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### dbg_step_until_ret() → [None](https://docs.python.org/3/library/constants.html#None) #### dbg_bpt_changed(bptev_code: [int](https://docs.python.org/3/library/functions.html#int), bpt: [bpt_t](#ida_dbg.bpt_t)) → [None](https://docs.python.org/3/library/constants.html#None) Breakpoint has been changed. * **Parameters:** * **bptev_code** – (int) Breakpoint modification events * **bpt** – (bpt_t ``` * ``` ) #### dbg_started_loading_bpts() → [None](https://docs.python.org/3/library/constants.html#None) Started loading breakpoint info from idb. #### dbg_finished_loading_bpts() → [None](https://docs.python.org/3/library/constants.html#None) Finished loading breakpoint info from idb. ### ida_dbg.list_bptgrps() → List[[str](https://docs.python.org/3/library/stdtypes.html#str)] | [None](https://docs.python.org/3/library/constants.html#None) Retrieve the list of absolute path of all folders of bpt dirtree. Synchronous function, Notification, none (synchronous function) ### ida_dbg.internal_get_sreg_base(tid: [int](https://docs.python.org/3/library/functions.html#int), sreg_value: [int](https://docs.python.org/3/library/functions.html#int)) Get the sreg base, for the given thread. * **Parameters:** * **tid** – the thread ID * **sreg_value** – the sreg value * **Returns:** The sreg base, or BADADDR on failure. ### ida_dbg.write_dbg_memory(\*args) → ssize_t ### ida_dbg.dbg_can_query() This function can be used to check if the debugger can be queried: : - debugger is loaded - process is suspended - process is not suspended but can take requests. In this case some requests like memory read/write, bpt management succeed and register querying will fail. Check if idaapi.get_process_state() < 0 to tell if the process is suspended * **Returns:** Boolean ### ida_dbg.set_reg_val(\*args) → [bool](https://docs.python.org/3/library/functions.html#bool) Set a register value by name This function has the following signatures: : 1. set_reg_val(name: str, value: Union[int, float, bytes]) -> bool 1. set_reg_val(tid: int, regidx: int, value: Union[int, float, bytes]) -> bool Depending on the register type, this will expect either an integer, a float or, in the case of large vector registers, a bytes sequence. * **Parameters:** * **name** – (1st form) the register name * **tid** – (2nd form) the thread ID * **regidx** – (2nd form) the register index * **value** – the register value * **Returns:** success ### ida_dbg.request_set_reg_val(regname: str, o: PyObject \*) → PyObject \* Post a set_reg_val() request. ### ida_dbg.get_reg_val(\*args) Get a register value. This function has the following signatures: > 1. get_reg_val(name: str) -> Union[int, float, bytes] > 2. get_reg_val(name: str, regval: regval_t) -> bool The first (and most user-friendly) form will return a value whose type is related to the register type. I.e., either an integer, a float or, in the case of large vector registers, a bytes sequence. * **Parameters:** **name** – the register name * **Returns:** the register value (1st form) ### ida_dbg.get_reg_vals(tid: [int](https://docs.python.org/3/library/functions.html#int), clsmask: [int](https://docs.python.org/3/library/functions.html#int) = -1) → [ida_idd.regvals_t](../ida_idd/index.md#ida_idd.regvals_t) Fetch live registers values for the thread * **Parameters:** * **tid** – The ID of the thread to read registers for * **clsmask** – An OR’ed mask of register classes to read values for (can be used to speed up the retrieval process) * **Returns:** a list of register values (empty if an error occurs) ### ida_dbg.get_tev_reg_val(tev, reg) ### ida_dbg.get_tev_reg_mem_qty(tev) ### ida_dbg.get_tev_reg_mem(tev, idx) ### ida_dbg.get_tev_reg_mem_ea(tev, idx) ### ida_dbg.send_dbg_command(command) Send a direct command to the debugger backend, and retrieve the result as a string. Note: any double-quotes in ‘command’ must be backslash-escaped. Note: this only works with some debugger backends: Bochs, WinDbg, GDB. Returns: (True, ) on success, or (False, ) on failure ### ida_dbg.move_bpt_to_grp # index.html.md # extract_addr_from_tagged_line summary: extract embedded addresses from a tagged line description: : Clickable addresses are encoded inline as a COLOR_ADDR mark (COLOR_ON + COLOR_ADDR + 16 hex digits). Tagged lines come from ida_lines.generate_disasm_line, custom-viewer text, hint providers, or any string built with ida_lines.tag_addr.
This example builds such a line and recovers the embedded ea_t via tagged_line_section_t.get_addr. level: intermediate ## Functions | [`main`](#extract_addr_from_tagged_line.main)() | | |---------------------------------------------------|----| ## Module Contents ### extract_addr_from_tagged_line.main() # index.html.md # list_segment_functions summary: list segment functions (and cross-references to them) description: : List all the functions in the current segment, as well as all the cross-references to them. keywords: xrefs see_also: list_segment_functions_using_idautils level: beginner ## Functions | [`main`](#list_segment_functions.main)() | | |--------------------------------------------|----| ## Module Contents ### list_segment_functions.main() # index.html.md # ida_ua Functions that deal with the disassembling of program instructions. There are 2 kinds of functions: * functions that are called from the kernel to disassemble an instruction. These functions call IDP module for it. * functions that are called from IDP module to disassemble an instruction. We will call them ‘helper functions’. Disassembly of an instruction is made in three steps: 1. analysis: ana.cpp 2. emulation: emu.cpp 3. conversion to text: out.cpp The kernel calls the IDP module to perform these steps. At first, the kernel always calls the analysis. The analyzer must decode the instruction and fill the insn_t instance that it receives through its callback. It must not change anything in the database. The second step, the emulation, is called for each instruction. This step must make necessary changes to the database, plan analysis of subsequent instructions, track register values, memory contents, etc. Please keep in mind that the kernel may call the emulation step for any address in the program - there is no ordering of addresses. Usually, the emulation is called for consecutive addresses but this is not guaranteed. The last step, conversion to text, is called each time an instruction is displayed on the screen. The kernel will always call the analysis step before calling the text conversion step. The emulation and the text conversion steps should use the information stored in the insn_t instance they receive. They should not access the bytes of the instruction and decode it again - this should only be done in the analysis step. ## Attributes | [`cvar`](#ida_ua.cvar) | | |--------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [`o_void`](#ida_ua.o_void) | No Operand. | | [`o_reg`](#ida_ua.o_reg) | General Register (al,ax,es,ds...). | | [`o_mem`](#ida_ua.o_mem) | A direct memory reference to a data item. Use this operand type when the address can be calculated statically. | | [`o_phrase`](#ida_ua.o_phrase) | An indirect memory reference that uses a register: [reg] There can be several registers but no displacement. | | [`o_displ`](#ida_ua.o_displ) | An indirect memory reference that uses a register and has an immediate constant added to it: [reg+N] There can be several registers. | | [`o_imm`](#ida_ua.o_imm) | An immediate Value (constant). | | [`o_far`](#ida_ua.o_far) | An immediate far code reference (inter-segment). | | [`o_near`](#ida_ua.o_near) | An immediate near code reference (intra-segment). | | [`o_idpspec0`](#ida_ua.o_idpspec0) | processor specific type. | | [`o_idpspec1`](#ida_ua.o_idpspec1) | processor specific type. | | [`o_idpspec2`](#ida_ua.o_idpspec2) | processor specific type. | | [`o_idpspec3`](#ida_ua.o_idpspec3) | processor specific type. | | [`o_idpspec4`](#ida_ua.o_idpspec4) | processor specific type. | | [`o_idpspec5`](#ida_ua.o_idpspec5) | processor specific type. (there can be more processor specific types) | | [`OF_NO_BASE_DISP`](#ida_ua.OF_NO_BASE_DISP) | base displacement doesn't exist. meaningful only for o_displ type. if set, base displacement (op_t::addr) doesn't exist. | | [`OF_OUTER_DISP`](#ida_ua.OF_OUTER_DISP) | outer displacement exists. meaningful only for o_displ type. if set, outer displacement (op_t::value) exists. | | [`PACK_FORM_DEF`](#ida_ua.PACK_FORM_DEF) | packed factor defined. (!o_reg + dt_packreal) | | [`OF_NUMBER`](#ida_ua.OF_NUMBER) | the operand can be converted to a number only | | [`OF_SHOW`](#ida_ua.OF_SHOW) | should the operand be displayed? | | [`dt_byte`](#ida_ua.dt_byte) | 8 bit integer | | [`dt_word`](#ida_ua.dt_word) | 16 bit integer | | [`dt_dword`](#ida_ua.dt_dword) | 32 bit integer | | [`dt_float`](#ida_ua.dt_float) | 4 byte floating point | | [`dt_double`](#ida_ua.dt_double) | 8 byte floating point | | [`dt_tbyte`](#ida_ua.dt_tbyte) | variable size ( processor_t::tbyte_size) floating point | | [`dt_packreal`](#ida_ua.dt_packreal) | packed real format for mc68040 | | [`dt_qword`](#ida_ua.dt_qword) | 64 bit integer | | [`dt_byte16`](#ida_ua.dt_byte16) | 128 bit integer | | [`dt_code`](#ida_ua.dt_code) | ptr to code | | [`dt_void`](#ida_ua.dt_void) | none | | [`dt_fword`](#ida_ua.dt_fword) | 48 bit | | [`dt_bitfild`](#ida_ua.dt_bitfild) | bit field (mc680x0) | | [`dt_string`](#ida_ua.dt_string) | pointer to asciiz string | | [`dt_unicode`](#ida_ua.dt_unicode) | pointer to unicode string | | [`dt_ldbl`](#ida_ua.dt_ldbl) | long double (which may be different from tbyte) | | [`dt_byte32`](#ida_ua.dt_byte32) | 256 bit integer | | [`dt_byte64`](#ida_ua.dt_byte64) | 512 bit integer | | [`dt_half`](#ida_ua.dt_half) | 2-byte floating point | | [`INSN_MACRO`](#ida_ua.INSN_MACRO) | macro instruction | | [`INSN_MODMAC`](#ida_ua.INSN_MODMAC) | may modify the database to make room for the macro insn | | [`INSN_64BIT`](#ida_ua.INSN_64BIT) | belongs to 64-bit segment? | | [`CTXF_MAIN`](#ida_ua.CTXF_MAIN) | produce only the essential line(s) | | [`CTXF_MULTI`](#ida_ua.CTXF_MULTI) | enable multi-line essential lines | | [`CTXF_CODE`](#ida_ua.CTXF_CODE) | display as code regardless of the database flags | | [`CTXF_STACK`](#ida_ua.CTXF_STACK) | stack view (display undefined items as 2/4/8 bytes) | | [`CTXF_GEN_XREFS`](#ida_ua.CTXF_GEN_XREFS) | generate the xrefs along with the next line | | [`CTXF_XREF_STATE`](#ida_ua.CTXF_XREF_STATE) | xref state: | | [`XREFSTATE_NONE`](#ida_ua.XREFSTATE_NONE) | not generated yet | | [`XREFSTATE_GO`](#ida_ua.XREFSTATE_GO) | being generated | | [`XREFSTATE_DONE`](#ida_ua.XREFSTATE_DONE) | have been generated | | [`CTXF_GEN_CMT`](#ida_ua.CTXF_GEN_CMT) | generate the comment along with the next line | | [`CTXF_CMT_STATE`](#ida_ua.CTXF_CMT_STATE) | comment state: | | [`COMMSTATE_NONE`](#ida_ua.COMMSTATE_NONE) | not generated yet | | [`COMMSTATE_GO`](#ida_ua.COMMSTATE_GO) | being generated | | [`COMMSTATE_DONE`](#ida_ua.COMMSTATE_DONE) | have been generated | | [`CTXF_VOIDS`](#ida_ua.CTXF_VOIDS) | display void marks | | [`CTXF_NORMAL_LABEL`](#ida_ua.CTXF_NORMAL_LABEL) | generate plain label (+demangled label as cmt) | | [`CTXF_DEMANGLED_LABEL`](#ida_ua.CTXF_DEMANGLED_LABEL) | generate only demangled label as comment | | [`CTXF_LABEL_OK`](#ida_ua.CTXF_LABEL_OK) | the label have been generated | | [`CTXF_DEMANGLED_OK`](#ida_ua.CTXF_DEMANGLED_OK) | the label has been demangled successfully | | [`CTXF_OVSTORE_PRNT`](#ida_ua.CTXF_OVSTORE_PRNT) | out_value should store modified values | | [`CTXF_OUTCTX_T`](#ida_ua.CTXF_OUTCTX_T) | instance is, in fact, a outctx_t | | [`CTXF_DBLIND_OPND`](#ida_ua.CTXF_DBLIND_OPND) | an operand was printed with double indirection (e.g. =var in arm) | | [`CTXF_BINOP_STATE`](#ida_ua.CTXF_BINOP_STATE) | opcode bytes state: | | [`BINOPSTATE_NONE`](#ida_ua.BINOPSTATE_NONE) | not generated yet | | [`BINOPSTATE_GO`](#ida_ua.BINOPSTATE_GO) | being generated | | [`BINOPSTATE_DONE`](#ida_ua.BINOPSTATE_DONE) | have been generated | | [`CTXF_HIDDEN_ADDR`](#ida_ua.CTXF_HIDDEN_ADDR) | generate an hidden addr tag at the beginning of the line | | [`CTXF_BIT_PREFIX`](#ida_ua.CTXF_BIT_PREFIX) | generate a line prefix with a bit offset, e.g.: 12345678.3 | | [`CTXF_UNHIDE`](#ida_ua.CTXF_UNHIDE) | display hidden objects (segment, function, range) | | [`OOF_SIGNMASK`](#ida_ua.OOF_SIGNMASK) | sign symbol (+/-) output | | [`OOFS_IFSIGN`](#ida_ua.OOFS_IFSIGN) | output sign if needed | | [`OOFS_NOSIGN`](#ida_ua.OOFS_NOSIGN) | don't output sign, forbid the user to change the sign | | [`OOFS_NEEDSIGN`](#ida_ua.OOFS_NEEDSIGN) | always out sign (+-) | | [`OOF_SIGNED`](#ida_ua.OOF_SIGNED) | output as signed if < 0 | | [`OOF_NUMBER`](#ida_ua.OOF_NUMBER) | always as a number | | [`OOF_WIDTHMASK`](#ida_ua.OOF_WIDTHMASK) | width of value in bits | | [`OOFW_IMM`](#ida_ua.OOFW_IMM) | take from x.dtype | | [`OOFW_8`](#ida_ua.OOFW_8) | 8 bit width | | [`OOFW_16`](#ida_ua.OOFW_16) | 16 bit width | | [`OOFW_24`](#ida_ua.OOFW_24) | 24 bit width | | [`OOFW_32`](#ida_ua.OOFW_32) | 32 bit width | | [`OOFW_64`](#ida_ua.OOFW_64) | 64 bit width | | [`OOF_ADDR`](#ida_ua.OOF_ADDR) | output x.addr, otherwise x.value OOF_WIDTHMASK must be explicitly specified with it | | [`OOF_OUTER`](#ida_ua.OOF_OUTER) | output outer operand | | [`OOF_ZSTROFF`](#ida_ua.OOF_ZSTROFF) | meaningful only if is_stroff(F); append a struct field name if the field offset is zero? if AFL_ZSTROFF is set, then this flag is ignored. | | [`OOF_NOBNOT`](#ida_ua.OOF_NOBNOT) | prohibit use of binary not | | [`OOF_SPACES`](#ida_ua.OOF_SPACES) | do not suppress leading spaces; currently works only for floating point numbers | | [`OOF_ANYSERIAL`](#ida_ua.OOF_ANYSERIAL) | if enum: select first available serial | | [`OOF_LZEROES`](#ida_ua.OOF_LZEROES) | print leading zeros | | [`OOF_NO_LZEROES`](#ida_ua.OOF_NO_LZEROES) | do not print leading zeros; if none of OOF_LZEROES and OOF_NO_LZEROES was specified, is_lzero() is used | | [`DEFAULT_INDENT`](#ida_ua.DEFAULT_INDENT) | | | [`MAKELINE_NONE`](#ida_ua.MAKELINE_NONE) | | | [`MAKELINE_BINPREF`](#ida_ua.MAKELINE_BINPREF) | allow display of binary prefix | | [`MAKELINE_VOID`](#ida_ua.MAKELINE_VOID) | allow display of '' marks | | [`MAKELINE_STACK`](#ida_ua.MAKELINE_STACK) | allow display of sp trace prefix | | [`GH_PRINT_PROC`](#ida_ua.GH_PRINT_PROC) | processor name | | [`GH_PRINT_ASM`](#ida_ua.GH_PRINT_ASM) | selected assembler | | [`GH_PRINT_BYTESEX`](#ida_ua.GH_PRINT_BYTESEX) | byte sex | | [`GH_PRINT_HEADER`](#ida_ua.GH_PRINT_HEADER) | lines from ash.header | | [`GH_BYTESEX_HAS_HIGHBYTE`](#ida_ua.GH_BYTESEX_HAS_HIGHBYTE) | describe inf.is_wide_high_byte_first() | | [`GH_PRINT_PROC_AND_ASM`](#ida_ua.GH_PRINT_PROC_AND_ASM) | | | [`GH_PRINT_PROC_ASM_AND_BYTESEX`](#ida_ua.GH_PRINT_PROC_ASM_AND_BYTESEX) | | | [`GH_PRINT_ALL`](#ida_ua.GH_PRINT_ALL) | | | [`GH_PRINT_ALL_BUT_BYTESEX`](#ida_ua.GH_PRINT_ALL_BUT_BYTESEX) | | | [`FCBF_CONT`](#ida_ua.FCBF_CONT) | don't stop on decoding, or any other kind of error | | [`FCBF_ERR_REPL`](#ida_ua.FCBF_ERR_REPL) | in case of an error, use a CP_REPLCHAR instead of a hex representation of the problematic byte | | [`FCBF_FF_LIT`](#ida_ua.FCBF_FF_LIT) | in case of codepoints == 0xFF, use it as-is (i.e., LATIN SMALL LETTER Y WITH DIAERESIS). If both this, and FCBF_REPL are specified, this will take precedence | | [`FCBF_DELIM`](#ida_ua.FCBF_DELIM) | add the 'ash'-specified delimiters around the generated data. Note: if those are not defined and the INFFL_ALLASM is not set, format_charlit() will return an error | | [`ua_mnem`](#ida_ua.ua_mnem) | | | [`STKVAR_VALID_SIZE`](#ida_ua.STKVAR_VALID_SIZE) | | | [`STKVAR_KEEP_EXISTING`](#ida_ua.STKVAR_KEEP_EXISTING) | | ## Classes | [`operands_array`](#ida_ua.operands_array) | | |------------------------------------------------------|----| | [`op_t`](#ida_ua.op_t) | | | [`insn_t`](#ida_ua.insn_t) | | | [`outctx_base_t`](#ida_ua.outctx_base_t) | | | [`outctx_t`](#ida_ua.outctx_t) | | | [`macro_constructor_t`](#ida_ua.macro_constructor_t) | | ## Functions | [`insn_add_cref`](#ida_ua.insn_add_cref)(→ None) | | |--------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [`insn_add_dref`](#ida_ua.insn_add_dref)(→ None) | | | [`insn_add_off_drefs`](#ida_ua.insn_add_off_drefs)(→ ida_idaapi.ea_t) | | | [`insn_create_stkvar`](#ida_ua.insn_create_stkvar)(→ bool) | | | [`get_lookback`](#ida_ua.get_lookback)(→ int) | Number of instructions to look back. This variable is not used by the kernel. Its value may be specified in ida.cfg: LOOKBACK = . IDP may use it as you like it. (TMS module uses it) | | [`calc_dataseg`](#ida_ua.calc_dataseg)(→ ida_idaapi.ea_t) | | | [`map_data_ea`](#ida_ua.map_data_ea)(→ ida_idaapi.ea_t) | | | [`map_code_ea`](#ida_ua.map_code_ea)(→ ida_idaapi.ea_t) | | | [`map_ea`](#ida_ua.map_ea)(→ ida_idaapi.ea_t) | | | [`create_outctx`](#ida_ua.create_outctx)(→ outctx_base_t \*) | Create a new output context. To delete it, just use "delete pctx" | | [`print_insn_mnem`](#ida_ua.print_insn_mnem)(→ Union[str, None]) | Print instruction mnemonics. | | [`get_dtype_flag`](#ida_ua.get_dtype_flag)(→ flags64_t) | Get flags for op_t::dtype field. | | [`get_dtype_size`](#ida_ua.get_dtype_size)(→ int) | Get size of

```
opt_
```

::dtype field. | | [`is_floating_dtype`](#ida_ua.is_floating_dtype)(→ bool) | Is a floating type operand? | | [`create_insn`](#ida_ua.create_insn)(→ int) | Create an instruction at the specified address. This function checks if an instruction is present at the specified address and will try to create one if there is none. It will fail if there is a data item or other items hindering the creation of the new instruction. This function will also fill the 'out' structure. | | [`decode_insn`](#ida_ua.decode_insn)(→ int) | Analyze the specified address and fill 'out'. This function does not modify the database. It just tries to interpret the specified address as an instruction and fills the 'out' structure. | | [`can_decode`](#ida_ua.can_decode)(→ bool) | Can the bytes at address 'ea' be decoded as instruction? | | [`print_operand`](#ida_ua.print_operand)(→ str) | Generate text representation for operand #n. This function will generate the text representation of the specified operand (includes color codes.) | | [`decode_prev_insn`](#ida_ua.decode_prev_insn)(→ ida_idaapi.ea_t) | Decode previous instruction if it exists, fill 'out'. | | [`decode_preceding_insn`](#ida_ua.decode_preceding_insn)(→ Tuple[ida_idaapi.ea_t, bool]) | Decodes the preceding instruction. | | [`construct_macro`](#ida_ua.construct_macro)(\*args) | See ua.hpp's construct_macro(). | | [`get_dtype_by_size`](#ida_ua.get_dtype_by_size)(→ int) | Get op_t::dtype from size. | | [`get_immvals`](#ida_ua.get_immvals)(→ PyObject \*) | Get immediate values at the specified address. This function decodes instruction at the specified address or inspects the data item. It finds immediate values and copies them to 'out'. This function will store the original value of the operands in 'out', unless the last bits of 'F' are "...0 11111111", in which case the transformed values (as needed for printing) will be stored instead. | | [`get_printable_immvals`](#ida_ua.get_printable_immvals)(→ PyObject \*) | Get immediate ready-to-print values at the specified address | | [`insn_t__from_ptrval__`](#ida_ua.insn_t__from_ptrval__)(→ insn_t \*) | | | [`op_t__from_ptrval__`](#ida_ua.op_t__from_ptrval__)(→ op_t \*) | | | [`outctx_base_t__from_ptrval__`](#ida_ua.outctx_base_t__from_ptrval__)(→ outctx_base_t \*) | | | [`outctx_t__from_ptrval__`](#ida_ua.outctx_t__from_ptrval__)(→ outctx_t \*) | | ## Module Contents ### *class* ida_ua.operands_array(data: op_t (&)[8]) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### data *: op_t (&)[8]* #### bytes ### *class* ida_ua.op_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### n *: uchar* Number of operand (0,1,2). Initialized once at the start of work. You have no right to change its value. #### type *: optype_t* Type of operand (see Operand types). #### offb *: [int](https://docs.python.org/3/library/functions.html#int)* Offset of operand value from the instruction start (0 means unknown). Of course this field is meaningful only for certain types of operands. Leave it equal to zero if the operand has no offset. This offset should point to the ‘interesting’ part of operand. For example, it may point to the address of a function in ``` ` ``` call func \` or it may point to bytes holding ‘5’ in ``` ` ``` mov ax, [bx+5] \` Usually bytes pointed to this offset are relocated (have fixup information). #### offo *: [int](https://docs.python.org/3/library/functions.html#int)* Same as offb (some operands have 2 numeric values used to form an operand). This field is used for the second part of operand if it exists. Currently this field is used only for outer offsets of Motorola processors. Leave it equal to zero if the operand has no offset. #### flags *: uchar* Operand flags #### set_shown() → [None](https://docs.python.org/3/library/constants.html#None) Set operand to be shown. #### clr_shown() → [None](https://docs.python.org/3/library/constants.html#None) Set operand to hidden. #### shown() → [bool](https://docs.python.org/3/library/functions.html#bool) Is operand set to be shown? #### dtype *: op_dtype_t* Type of operand value (see Operand value types). This is the type of the operand itself, not the size of the addressing mode. for example, byte ptr [epb+32_bit_offset] will have the dt_byte type. #### reg *: uint16* number of register (o_reg) #### phrase *: uint16* number of register phrase (o_phrase,o_displ). you yourself define numbers of phrases as you like #### is_reg(r: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) Is register operand? #### value *: [int](https://docs.python.org/3/library/functions.html#int)* operand value (o_imm) or outer displacement (o_displ+OF_OUTER_DISP). integer values should be in IDA’s (little-endian) order. when using ieee_realcvt(), floating point values should be in the processor’s native byte order. dt_double and dt_qword values take up 8 bytes (value and addr fields for 32-bit modules). NB: in case a dt_dword/dt_qword immediate is forced to float by user, the kernel converts it to processor’s native order before calling FP conversion routines. #### is_imm(v: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) Is immediate operand? #### addr *: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)* virtual address pointed or used by the operand. (o_mem,o_displ,o_far,o_near) #### specval *: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)* This field may be used as you want. #### specflag1 *: [int](https://docs.python.org/3/library/functions.html#int)* #### specflag2 *: [int](https://docs.python.org/3/library/functions.html#int)* #### specflag3 *: [int](https://docs.python.org/3/library/functions.html#int)* #### specflag4 *: [int](https://docs.python.org/3/library/functions.html#int)* #### assign(other: [op_t](#ida_ua.op_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### has_reg(r) Checks if the operand accesses the given processor register #### value64 ### ida_ua.cvar ### ida_ua.o_void No Operand. ### ida_ua.o_reg General Register (al,ax,es,ds…). The register number should be stored in op_t::reg. All processor registers, including special registers, can be represented by this operand type. ### ida_ua.o_mem A direct memory reference to a data item. Use this operand type when the address can be calculated statically. A direct memory data reference whose target address is known at compilation time. The target virtual address is stored in op_t::addr and the full address is calculated as to_ea( insn_t::cs, op_t::addr ). For the processors with complex memory organization the final address can be calculated using other segment registers. For flat memories, op_t::addr is the final address and insn_t::cs is usually equal to zero. In any case, the address within the segment should be stored in op_t::addr. ### ida_ua.o_phrase An indirect memory reference that uses a register: [reg] There can be several registers but no displacement. A memory reference using register contents. Indexed, register based, and other addressing modes can be represented with the operand type. This addressing mode cannot contain immediate values (use o_displ instead). The phrase number should be stored in op_t::phrase. To denote the pre-increment and similar features please use additional operand fields like op_t::specflag… Usually op_t::phrase contains the register number and additional information is stored in op_t::specflags… Please note that this operand type cannot contain immediate values (except the scaling coefficients). ### ida_ua.o_displ An indirect memory reference that uses a register and has an immediate constant added to it: [reg+N] There can be several registers. A memory reference using register contents with displacement. The displacement should be stored in the op_t::addr field. The rest of information is stored the same way as in o_phrase. ### ida_ua.o_imm An immediate Value (constant). Any operand consisting of only a number is represented by this operand type. The value should be stored in op_t::value. You may sign extend short (1-2 byte) values. In any case don’t forget to specify op_t::dtype (should be set for all operand types). ### ida_ua.o_far An immediate far code reference (inter-segment). If the current processor has a special addressing mode for inter-segment references, then this operand type should be used instead of o_near. If you want, you may use PR_CHK_XREF in processor_t::flag to disable inter-segment calls if o_near operand type is used. Currently only IBM PC uses this flag. ### ida_ua.o_near An immediate near code reference (intra-segment). A direct memory code reference whose target address is known at the compilation time. The target virtual address is stored in op_t::addr and the final address is always to_ea( insn_t::cs, op_t::addr). Usually this operand type is used for the branches and calls whose target address is known. If the current processor has 2 different types of references for inter-segment and intra-segment references, then this should be used only for intra-segment references. If the above operand types do not cover all possible addressing modes, then use o_idpspec… operand types. ### ida_ua.o_idpspec0 processor specific type. ### ida_ua.o_idpspec1 processor specific type. ### ida_ua.o_idpspec2 processor specific type. ### ida_ua.o_idpspec3 processor specific type. ### ida_ua.o_idpspec4 processor specific type. ### ida_ua.o_idpspec5 processor specific type. (there can be more processor specific types) ### ida_ua.OF_NO_BASE_DISP base displacement doesn’t exist. meaningful only for o_displ type. if set, base displacement (op_t::addr) doesn’t exist. ### ida_ua.OF_OUTER_DISP outer displacement exists. meaningful only for o_displ type. if set, outer displacement (op_t::value) exists. ### ida_ua.PACK_FORM_DEF packed factor defined. (!o_reg + dt_packreal) ### ida_ua.OF_NUMBER the operand can be converted to a number only ### ida_ua.OF_SHOW should the operand be displayed? ### ida_ua.dt_byte 8 bit integer ### ida_ua.dt_word 16 bit integer ### ida_ua.dt_dword 32 bit integer ### ida_ua.dt_float 4 byte floating point ### ida_ua.dt_double 8 byte floating point ### ida_ua.dt_tbyte variable size ( processor_t::tbyte_size) floating point ### ida_ua.dt_packreal packed real format for mc68040 ### ida_ua.dt_qword 64 bit integer ### ida_ua.dt_byte16 128 bit integer ### ida_ua.dt_code ptr to code ### ida_ua.dt_void none ### ida_ua.dt_fword 48 bit ### ida_ua.dt_bitfild bit field (mc680x0) ### ida_ua.dt_string pointer to asciiz string ### ida_ua.dt_unicode pointer to unicode string ### ida_ua.dt_ldbl long double (which may be different from tbyte) ### ida_ua.dt_byte32 256 bit integer ### ida_ua.dt_byte64 512 bit integer ### ida_ua.dt_half 2-byte floating point ### ida_ua.insn_add_cref(insn: [insn_t](#ida_ua.insn_t), to: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), opoff: [int](https://docs.python.org/3/library/functions.html#int), type: cref_t) → [None](https://docs.python.org/3/library/constants.html#None) ### ida_ua.insn_add_dref(insn: [insn_t](#ida_ua.insn_t), to: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), opoff: [int](https://docs.python.org/3/library/functions.html#int), type: dref_t) → [None](https://docs.python.org/3/library/constants.html#None) ### ida_ua.insn_add_off_drefs(insn: [insn_t](#ida_ua.insn_t), x: [op_t](#ida_ua.op_t), type: dref_t, outf: [int](https://docs.python.org/3/library/functions.html#int)) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) ### ida_ua.insn_create_stkvar(insn: [insn_t](#ida_ua.insn_t), x: [op_t](#ida_ua.op_t), v: adiff_t, flags: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### *class* ida_ua.insn_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### cs *: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)* Current segment base paragraph. Initialized by the kernel. #### ip *: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)* Virtual address of the instruction (address within the segment). Initialized by the kernel. #### ea *: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)* Linear address of the instruction. Initialized by the kernel. #### itype *: uint16* Internal code of instruction (only for canonical insns - not user defined!). IDP should define its own instruction codes. These codes are usually defined in ins.hpp. The array of instruction names and features (ins.cpp) is accessed using this code. #### size *: uint16* Size of instruction in bytes. The analyzer should put here the actual size of the instruction. #### auxpref *: [int](https://docs.python.org/3/library/functions.html#int)* processor dependent field #### auxpref_u16 *: uint16[2]* #### auxpref_u8 *: uint8[4]* #### segpref *: [int](https://docs.python.org/3/library/functions.html#int)* processor dependent field #### insnpref *: [int](https://docs.python.org/3/library/functions.html#int)* processor dependent field #### flags *: int16* Instruction flags #### ops *: [op_t](#ida_ua.op_t)[8]* array of operands #### is_macro() → [bool](https://docs.python.org/3/library/functions.html#bool) Is a macro instruction? #### is_64bit() → [bool](https://docs.python.org/3/library/functions.html#bool) Belongs to a 64-bit segment? #### get_next_byte() → uint8 #### get_next_word() → uint16 #### get_next_dword() → [int](https://docs.python.org/3/library/functions.html#int) #### get_next_qword() → uint64 #### create_op_data(\*args) → [bool](https://docs.python.org/3/library/functions.html#bool) #### create_stkvar(x: [op_t](#ida_ua.op_t), v: adiff_t, stkvar_flags: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### add_cref(to: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), opoff: [int](https://docs.python.org/3/library/functions.html#int), type: cref_t) → [None](https://docs.python.org/3/library/constants.html#None) #### add_dref(to: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), opoff: [int](https://docs.python.org/3/library/functions.html#int), type: dref_t) → [None](https://docs.python.org/3/library/constants.html#None) #### add_off_drefs(x: [op_t](#ida_ua.op_t), type: dref_t, outf: [int](https://docs.python.org/3/library/functions.html#int)) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) #### assign(other: [insn_t](#ida_ua.insn_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### is_canon_insn(\*args) → [bool](https://docs.python.org/3/library/functions.html#bool) see processor_t::is_canon_insn() #### get_canon_feature(\*args) → [int](https://docs.python.org/3/library/functions.html#int) see instruc_t::feature #### get_canon_mnem(\*args) → [str](https://docs.python.org/3/library/stdtypes.html#str) see instruc_t::name #### Op1 #### Op2 #### Op3 #### Op4 #### Op5 #### Op6 #### Op7 #### Op8 ### ida_ua.INSN_MACRO macro instruction ### ida_ua.INSN_MODMAC may modify the database to make room for the macro insn ### ida_ua.INSN_64BIT belongs to 64-bit segment? ### ida_ua.get_lookback() → [int](https://docs.python.org/3/library/functions.html#int) Number of instructions to look back. This variable is not used by the kernel. Its value may be specified in ida.cfg: LOOKBACK = . IDP may use it as you like it. (TMS module uses it) ### ida_ua.calc_dataseg(insn: [insn_t](#ida_ua.insn_t), n: [int](https://docs.python.org/3/library/functions.html#int) = -1, rgnum: [int](https://docs.python.org/3/library/functions.html#int) = -1) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) ### ida_ua.map_data_ea(\*args) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) ### ida_ua.map_code_ea(\*args) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) ### ida_ua.map_ea(\*args) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) ### *class* ida_ua.outctx_base_t(\*args, \*\*kwargs) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### insn_ea *: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)* #### outbuf *: [str](https://docs.python.org/3/library/stdtypes.html#str)* buffer for the current output line once ready, it is moved to lnar #### F32 *: flags_t* please use outctx_t::F instead #### default_lnnum *: [int](https://docs.python.org/3/library/functions.html#int)* index of the most important line in lnar #### only_main_line() → [bool](https://docs.python.org/3/library/functions.html#bool) #### multiline() → [bool](https://docs.python.org/3/library/functions.html#bool) #### force_code() → [bool](https://docs.python.org/3/library/functions.html#bool) #### stack_view() → [bool](https://docs.python.org/3/library/functions.html#bool) #### display_voids() → [bool](https://docs.python.org/3/library/functions.html#bool) #### display_hidden() → [bool](https://docs.python.org/3/library/functions.html#bool) #### set_gen_xrefs(on: [bool](https://docs.python.org/3/library/functions.html#bool) = True) → [None](https://docs.python.org/3/library/constants.html#None) #### set_gen_cmt(on: [bool](https://docs.python.org/3/library/functions.html#bool) = True) → [None](https://docs.python.org/3/library/constants.html#None) #### clr_gen_label() → [None](https://docs.python.org/3/library/constants.html#None) #### set_gen_label() → [None](https://docs.python.org/3/library/constants.html#None) #### set_gen_demangled_label() → [None](https://docs.python.org/3/library/constants.html#None) #### set_comment_addr(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### set_dlbind_opnd() → [None](https://docs.python.org/3/library/constants.html#None) #### print_label_now() → [bool](https://docs.python.org/3/library/functions.html#bool) #### forbid_annotations() → [int](https://docs.python.org/3/library/functions.html#int) #### restore_ctxflags(saved_flags: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### out_printf(format: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [int](https://docs.python.org/3/library/functions.html#int) ————————————————————————- Functions to append text to the current output buffer (outbuf) Append a formatted string to the output string. * **Returns:** the number of characters appended #### out_value(x: [op_t](#ida_ua.op_t), outf: [int](https://docs.python.org/3/library/functions.html#int) = 0) → flags64_t Output immediate value. Try to use this function to output all constants of instruction operands. This function outputs a number from x.addr or x.value in the form determined by F. It outputs colored text. * **Parameters:** * **x** – value to output * **outf** – Output value flags * **Returns:** flags of the output value, otherwise: * **Returns:** -1: if printed a number with COLOR_ERROR * **Returns:** 0: if printed a nice number or character or segment or enum #### out_symbol(c: char) → [None](https://docs.python.org/3/library/constants.html#None) Output a character with COLOR_SYMBOL color. #### out_chars(c: char, n: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) Append a character multiple times. #### out_spaces(len: ssize_t) → [None](https://docs.python.org/3/library/constants.html#None) Appends spaces to outbuf until its tag_strlen becomes ‘len’. #### out_line(str: outctx_base_t.out_line.str, color: color_t = 0) → [None](https://docs.python.org/3/library/constants.html#None) Output a string with the specified color. #### out_keyword(str: outctx_base_t.out_keyword.str) → [None](https://docs.python.org/3/library/constants.html#None) Output a string with COLOR_KEYWORD color. #### out_register(str: outctx_base_t.out_register.str) → [None](https://docs.python.org/3/library/constants.html#None) Output a character with COLOR_REG color. #### out_lvar(name: [str](https://docs.python.org/3/library/stdtypes.html#str), width: [int](https://docs.python.org/3/library/functions.html#int) = -1) → [None](https://docs.python.org/3/library/constants.html#None) Output local variable name with COLOR_LOCNAME color. #### out_tagon(tag: color_t) → [None](https://docs.python.org/3/library/constants.html#None) Output “turn color on” escape sequence. #### out_tagoff(tag: color_t) → [None](https://docs.python.org/3/library/constants.html#None) Output “turn color off” escape sequence. #### out_addr_tag(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) Output “address” escape sequence. #### out_colored_register_line(str: outctx_base_t.out_colored_register_line.str) → [None](https://docs.python.org/3/library/constants.html#None) Output a colored line with register names in it. The register names will be substituted by user-defined names (regvar_t) Please note that out_tagoff tries to make substitutions too (when called with COLOR_REG) #### out_char(c: char) → [None](https://docs.python.org/3/library/constants.html#None) Output one character. The character is output without color codes. see also out_symbol() #### out_btoa(Word: [int](https://docs.python.org/3/library/functions.html#int), radix: char = 0) → [None](https://docs.python.org/3/library/constants.html#None) Output a number with the specified base (binary, octal, decimal, hex) The number is output without color codes. see also out_long() #### out_long(v: [int](https://docs.python.org/3/library/functions.html#int), radix: char) → [None](https://docs.python.org/3/library/constants.html#None) Output a number with appropriate color. Low level function. Use out_value() if you can. if ‘suspop’ is set then this function uses COLOR_VOIDOP instead of COLOR_NUMBER. ‘suspop’ is initialized: \* in out_one_operand() \* in ..idagl.cpp (before calling processor_t::d_out()) * **Parameters:** * **v** – value to output * **radix** – base (2,8,10,16) #### out_name_expr(\*args) → [bool](https://docs.python.org/3/library/functions.html#bool) Output a name expression. * **Parameters:** * **x** – instruction operand referencing the name expression * **ea** – address to convert to name expression * **off** – the value of name expression. this parameter is used only to check that the name expression will have the wanted value. You may pass BADADDR for this parameter but I discourage it because it prohibits checks. * **Returns:** true if the name expression has been produced #### close_comment() → [None](https://docs.python.org/3/library/constants.html#None) #### flush_outbuf(indent: [int](https://docs.python.org/3/library/functions.html#int) = -1) → [bool](https://docs.python.org/3/library/functions.html#bool) ————————————————————————- Functions to populate the output line array (lnar) Move the contents of the output buffer to the line array (outbuf->lnar) The kernel augments the outbuf contents with additional text like the line prefix, user-defined comments, xrefs, etc at this call. #### flush_buf(buf: [str](https://docs.python.org/3/library/stdtypes.html#str), indent: [int](https://docs.python.org/3/library/functions.html#int) = -1) → [bool](https://docs.python.org/3/library/functions.html#bool) Append contents of ‘buf’ to the line array. Behaves like flush_outbuf but accepts an arbitrary buffer #### term_outctx(prefix: [str](https://docs.python.org/3/library/stdtypes.html#str) = None) → [int](https://docs.python.org/3/library/functions.html#int) Finalize the output context. * **Returns:** the number of generated lines. #### gen_printf(indent: [int](https://docs.python.org/3/library/functions.html#int), format: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [bool](https://docs.python.org/3/library/functions.html#bool) printf-like function to add lines to the line array. * **Parameters:** * **indent** – indention of the line. if indent == -1, the kernel will indent the line at idainfo::indent. if indent < 0, -indent will be used for indention. The first line printed with indent < 0 is considered as the most important line at the current address. Usually it is the line with the instruction itself. This line will be displayed in the cross-reference lists and other places. If you need to output an additional line before the main line then pass DEFAULT_INDENT instead of -1. The kernel will know that your line is not the most important one. * **format** – printf style colored line to generate * **Returns:** overflow, lnar_maxsize has been reached #### gen_empty_line() → [bool](https://docs.python.org/3/library/functions.html#bool) Generate empty line. This function does nothing if generation of empty lines is disabled. * **Returns:** overflow, lnar_maxsize has been reached #### gen_border_line(solid: [bool](https://docs.python.org/3/library/functions.html#bool) = False) → [bool](https://docs.python.org/3/library/functions.html#bool) Generate thin border line. This function does nothing if generation of border lines is disabled. * **Parameters:** **solid** – generate solid border line (with =), otherwise with - * **Returns:** overflow, lnar_maxsize has been reached #### gen_cmt_line(format: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [bool](https://docs.python.org/3/library/functions.html#bool) Generate one non-indented comment line, colored with COLOR_AUTOCMT. * **Parameters:** **format** – printf() style format line. The resulting comment line should not include comment character (;) * **Returns:** overflow, lnar_maxsize has been reached #### gen_collapsed_line(format: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [bool](https://docs.python.org/3/library/functions.html#bool) Generate one non-indented comment line, colored with COLOR_COLLAPSED. * **Parameters:** **format** – printf() style format line. The resulting comment line should not include comment character (;) * **Returns:** overflow, lnar_maxsize has been reached #### gen_block_cmt(cmt: [str](https://docs.python.org/3/library/stdtypes.html#str), color: color_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Generate big non-indented comment lines. * **Parameters:** * **cmt** – comment text. may contain n characters to denote new lines. should not contain comment character (;) * **color** – color of comment text (one of Color tags) * **Returns:** overflow, lnar_maxsize has been reached #### setup_outctx(prefix: [str](https://docs.python.org/3/library/stdtypes.html#str), makeline_flags: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) Initialization; normally used only by the kernel. #### retrieve_cmt() → ssize_t #### retrieve_name(arg2: str, arg3: color_t \*) → ssize_t #### gen_xref_lines() → [bool](https://docs.python.org/3/library/functions.html#bool) #### init_lines_array(answers: qstrvec_t \*, maxsize: int) → [None](https://docs.python.org/3/library/constants.html#None) #### get_stkvar(x: op_t, v: int, vv: sval_t \*, is_sp_based: int \*, \_frame: tinfo_t) → ssize_t #### gen_empty_line_without_annotations() → [None](https://docs.python.org/3/library/constants.html#None) #### getF() → flags64_t ### ida_ua.CTXF_MAIN produce only the essential line(s) ### ida_ua.CTXF_MULTI enable multi-line essential lines ### ida_ua.CTXF_CODE display as code regardless of the database flags ### ida_ua.CTXF_STACK stack view (display undefined items as 2/4/8 bytes) ### ida_ua.CTXF_GEN_XREFS generate the xrefs along with the next line ### ida_ua.CTXF_XREF_STATE xref state: ### ida_ua.XREFSTATE_NONE not generated yet ### ida_ua.XREFSTATE_GO being generated ### ida_ua.XREFSTATE_DONE have been generated ### ida_ua.CTXF_GEN_CMT generate the comment along with the next line ### ida_ua.CTXF_CMT_STATE comment state: ### ida_ua.COMMSTATE_NONE not generated yet ### ida_ua.COMMSTATE_GO being generated ### ida_ua.COMMSTATE_DONE have been generated ### ida_ua.CTXF_VOIDS display void marks ### ida_ua.CTXF_NORMAL_LABEL generate plain label (+demangled label as cmt) ### ida_ua.CTXF_DEMANGLED_LABEL generate only demangled label as comment ### ida_ua.CTXF_LABEL_OK the label have been generated ### ida_ua.CTXF_DEMANGLED_OK the label has been demangled successfully ### ida_ua.CTXF_OVSTORE_PRNT out_value should store modified values ### ida_ua.CTXF_OUTCTX_T instance is, in fact, a outctx_t ### ida_ua.CTXF_DBLIND_OPND an operand was printed with double indirection (e.g. =var in arm) ### ida_ua.CTXF_BINOP_STATE opcode bytes state: ### ida_ua.BINOPSTATE_NONE not generated yet ### ida_ua.BINOPSTATE_GO being generated ### ida_ua.BINOPSTATE_DONE have been generated ### ida_ua.CTXF_HIDDEN_ADDR generate an hidden addr tag at the beginning of the line ### ida_ua.CTXF_BIT_PREFIX generate a line prefix with a bit offset, e.g.: 12345678.3 ### ida_ua.CTXF_UNHIDE display hidden objects (segment, function, range) ### ida_ua.OOF_SIGNMASK sign symbol (+/-) output ### ida_ua.OOFS_IFSIGN output sign if needed ### ida_ua.OOFS_NOSIGN don’t output sign, forbid the user to change the sign ### ida_ua.OOFS_NEEDSIGN always out sign (+-) ### ida_ua.OOF_SIGNED output as signed if < 0 ### ida_ua.OOF_NUMBER always as a number ### ida_ua.OOF_WIDTHMASK width of value in bits ### ida_ua.OOFW_IMM take from x.dtype ### ida_ua.OOFW_8 8 bit width ### ida_ua.OOFW_16 16 bit width ### ida_ua.OOFW_24 24 bit width ### ida_ua.OOFW_32 32 bit width ### ida_ua.OOFW_64 64 bit width ### ida_ua.OOF_ADDR output x.addr, otherwise x.value OOF_WIDTHMASK must be explicitly specified with it ### ida_ua.OOF_OUTER output outer operand ### ida_ua.OOF_ZSTROFF meaningful only if is_stroff(F); append a struct field name if the field offset is zero? if AFL_ZSTROFF is set, then this flag is ignored. ### ida_ua.OOF_NOBNOT prohibit use of binary not ### ida_ua.OOF_SPACES do not suppress leading spaces; currently works only for floating point numbers ### ida_ua.OOF_ANYSERIAL if enum: select first available serial ### ida_ua.OOF_LZEROES print leading zeros ### ida_ua.OOF_NO_LZEROES do not print leading zeros; if none of OOF_LZEROES and OOF_NO_LZEROES was specified, is_lzero() is used ### ida_ua.DEFAULT_INDENT ### ida_ua.MAKELINE_NONE ### ida_ua.MAKELINE_BINPREF allow display of binary prefix ### ida_ua.MAKELINE_VOID allow display of ‘’ marks ### ida_ua.MAKELINE_STACK allow display of sp trace prefix ### *class* ida_ua.outctx_t(\*args, \*\*kwargs) Bases: [`outctx_base_t`](#ida_ua.outctx_base_t) #### thisown #### bin_ea *: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)* #### bin_state *: char* #### gl_bpsize *: [int](https://docs.python.org/3/library/functions.html#int)* #### bin_width *: [int](https://docs.python.org/3/library/functions.html#int)* #### insn *: [insn_t](#ida_ua.insn_t)* #### curlabel *: [str](https://docs.python.org/3/library/stdtypes.html#str)* #### wif *: printop_t const \** #### procmod *: procmod_t \** #### ph *: processor_t &* #### ash *: asm_t &* #### saved_immvals *: uval_t[8]* #### prefix_ea *: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)* #### next_line_ea *: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)* #### setup_outctx(prefix: [str](https://docs.python.org/3/library/stdtypes.html#str), flags: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) Initialization; normally used only by the kernel. #### term_outctx(prefix: [str](https://docs.python.org/3/library/stdtypes.html#str) = None) → [int](https://docs.python.org/3/library/functions.html#int) Finalize the output context. * **Returns:** the number of generated lines. #### retrieve_cmt() → ssize_t #### retrieve_name(arg2: str, arg3: color_t \*) → ssize_t #### gen_xref_lines() → [bool](https://docs.python.org/3/library/functions.html#bool) #### out_btoa(Word: [int](https://docs.python.org/3/library/functions.html#int), radix: char = 0) → [None](https://docs.python.org/3/library/constants.html#None) Output a number with the specified base (binary, octal, decimal, hex) The number is output without color codes. see also out_long() #### set_bin_state(value: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### out_mnem(width: [int](https://docs.python.org/3/library/functions.html#int) = 8, postfix: [str](https://docs.python.org/3/library/stdtypes.html#str) = None) → [None](https://docs.python.org/3/library/constants.html#None) Output instruction mnemonic for ‘insn’ using information in ‘ph.instruc’ array. This function outputs colored text. It should be called from processor_t::ev_out_insn() or processor_t::ev_out_mnem() handler. It will output at least one space after the instruction. mnemonic even if the specified ‘width’ is not enough. * **Parameters:** * **width** – width of field with mnemonic. if < 0, then ‘postfix’ will be output before the mnemonic, i.e. as a prefix * **postfix** – optional postfix added to the instruction mnemonic #### out_custom_mnem(mnem: [str](https://docs.python.org/3/library/stdtypes.html#str), width: [int](https://docs.python.org/3/library/functions.html#int) = 8, postfix: [str](https://docs.python.org/3/library/stdtypes.html#str) = None) → [None](https://docs.python.org/3/library/constants.html#None) Output custom mnemonic for ‘insn’. E.g. if it should differ from the one in ‘ph.instruc’. This function outputs colored text. See out_mnem * **Parameters:** * **mnem** – custom mnemonic * **width** – width of field with mnemonic. if < 0, then ‘postfix’ will be output before the mnemonic, i.e. as a prefix * **postfix** – optional postfix added to ‘mnem’ #### out_mnemonic() → [None](https://docs.python.org/3/library/constants.html#None) Output instruction mnemonic using information in ‘insn’. It should be called from processor_t::ev_out_insn() and it will call processor_t::ev_out_mnem() or out_mnem. This function outputs colored text. #### out_one_operand(n: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) Use this function to output an operand of an instruction. This function checks for the existence of a manually defined operand and will output it if it exists. It should be called from processor_t::ev_out_insn() and it will call processor_t::ev_out_operand(). This function outputs colored text. * **Parameters:** **n** – 0..#UA_MAXOP-1 operand number * **Returns:** 1: operand is displayed * **Returns:** 0: operand is hidden #### out_immchar_cmts() → [None](https://docs.python.org/3/library/constants.html#None) Print all operand values as commented character constants. This function is used to comment void operands with their representation in the form of character constants. This function outputs colored text. #### gen_func_header(pfn: func_t \*) → [None](https://docs.python.org/3/library/constants.html#None) #### gen_func_footer(pfn: func_t const \*) → [None](https://docs.python.org/3/library/constants.html#None) #### out_data(analyze_only: [bool](https://docs.python.org/3/library/functions.html#bool)) → [None](https://docs.python.org/3/library/constants.html#None) #### out_specea(segtype: uchar) → [bool](https://docs.python.org/3/library/functions.html#bool) #### gen_header_extra() → [None](https://docs.python.org/3/library/constants.html#None) #### gen_header(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### out_fcref_names() → [None](https://docs.python.org/3/library/constants.html#None) Print addresses referenced *from* the specified address as commented symbolic names. This function is used to show, for example, multiple callees of an indirect call. This function outputs colored text. #### gen_function_header(func_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) Generate function header lines. This function is called to generate the opening lines of a function, including border, comments, attributes, and the function name. #### gen_function_footer(func_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) Generate function footer lines. This function is called to generate the closing lines of a function, typically a comment with the function name. #### out_unmapped_addr(addr: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), radix: char = 16) → [None](https://docs.python.org/3/library/constants.html#None) Output a reference to an address that is not (yet) mapped in the database. The processor module is queried (processor_t::query_unmapped_address) for symbolic information about addr. If the not-yet-mapped address is mappable, a colored symbolic expression is emitted (e.g. “qualifier:symbol+offset”, prefixed with a “outgoing” arrow). Otherwise the raw numeric value is emitted, tagged with COLOR_ERROR. * **Parameters:** * **addr** – the unmapped address * **radix** – radix for the numeric fallback (default 16) ### ida_ua.GH_PRINT_PROC processor name ### ida_ua.GH_PRINT_ASM selected assembler ### ida_ua.GH_PRINT_BYTESEX byte sex ### ida_ua.GH_PRINT_HEADER lines from ash.header ### ida_ua.GH_BYTESEX_HAS_HIGHBYTE describe inf.is_wide_high_byte_first() ### ida_ua.GH_PRINT_PROC_AND_ASM ### ida_ua.GH_PRINT_PROC_ASM_AND_BYTESEX ### ida_ua.GH_PRINT_ALL ### ida_ua.GH_PRINT_ALL_BUT_BYTESEX ### ida_ua.create_outctx(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), F: flags64_t = 0, suspop: [int](https://docs.python.org/3/library/functions.html#int) = 0) → outctx_base_t \* Create a new output context. To delete it, just use “delete pctx” ### ida_ua.print_insn_mnem(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None) Print instruction mnemonics. * **Parameters:** **ea** – linear address of the instruction * **Returns:** success ### ida_ua.FCBF_CONT don’t stop on decoding, or any other kind of error ### ida_ua.FCBF_ERR_REPL in case of an error, use a CP_REPLCHAR instead of a hex representation of the problematic byte ### ida_ua.FCBF_FF_LIT in case of codepoints == 0xFF, use it as-is (i.e., LATIN SMALL LETTER Y WITH DIAERESIS). If both this, and FCBF_REPL are specified, this will take precedence ### ida_ua.FCBF_DELIM add the ‘ash’-specified delimiters around the generated data. Note: if those are not defined and the INFFL_ALLASM is not set, format_charlit() will return an error ### ida_ua.get_dtype_flag(dtype: op_dtype_t) → flags64_t Get flags for op_t::dtype field. ### ida_ua.get_dtype_size(dtype: op_dtype_t) → [int](https://docs.python.org/3/library/functions.html#int) Get size of ``` opt_ ``` ::dtype field. ### ida_ua.is_floating_dtype(dtype: op_dtype_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Is a floating type operand? ### ida_ua.create_insn(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), out: [insn_t](#ida_ua.insn_t) = None) → [int](https://docs.python.org/3/library/functions.html#int) Create an instruction at the specified address. This function checks if an instruction is present at the specified address and will try to create one if there is none. It will fail if there is a data item or other items hindering the creation of the new instruction. This function will also fill the ‘out’ structure. * **Parameters:** * **ea** – linear address * **out** – the resulting instruction * **Returns:** the length of the instruction or 0 ### ida_ua.decode_insn(out: [insn_t](#ida_ua.insn_t), ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [int](https://docs.python.org/3/library/functions.html#int) Analyze the specified address and fill ‘out’. This function does not modify the database. It just tries to interpret the specified address as an instruction and fills the ‘out’ structure. * **Parameters:** * **out** – the resulting instruction * **ea** – linear address * **Returns:** the length of the (possible) instruction or 0 ### ida_ua.can_decode(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Can the bytes at address ‘ea’ be decoded as instruction? * **Parameters:** **ea** – linear address * **Returns:** whether or not the contents at that address could be a valid instruction ### ida_ua.print_operand(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), n: [int](https://docs.python.org/3/library/functions.html#int), getn_flags: [int](https://docs.python.org/3/library/functions.html#int) = 0, newtype: [printop_t](../ida_nalt/index.md#ida_nalt.printop_t) = None) → [str](https://docs.python.org/3/library/stdtypes.html#str) Generate text representation for operand #n. This function will generate the text representation of the specified operand (includes color codes.) * **Parameters:** * **ea** – the item address (instruction or data) * **n** – 0..#UA_MAXOP-1 operand number, meaningful only for instructions * **getn_flags** – Name expression flags Currently only GETN_NODUMMY is accepted. * **newtype** – if specified, print the operand using the specified type * **Returns:** success ### ida_ua.decode_prev_insn(out: [insn_t](#ida_ua.insn_t), ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) Decode previous instruction if it exists, fill ‘out’. * **Parameters:** * **out** – the resulting instruction * **ea** – the address to decode the previous instruction from * **Returns:** the previous instruction address (#BADADDR-no such insn) ### *class* ida_ua.macro_constructor_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### reserved *: [int](https://docs.python.org/3/library/functions.html#int)* #### construct_macro(insn: [insn_t](#ida_ua.insn_t), enable: [bool](https://docs.python.org/3/library/functions.html#bool)) → [bool](https://docs.python.org/3/library/functions.html#bool) Construct a macro instruction. 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** – the instruction to modify into a macro * **enable** – enable macro generation * **Returns:** true: the macro instruction is generated in ‘insn’ * **Returns:** false: did not create a macro #### build_macro(insn: [insn_t](#ida_ua.insn_t), may_go_forward: [bool](https://docs.python.org/3/library/functions.html#bool)) → [bool](https://docs.python.org/3/library/functions.html#bool) Try to extend the 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. * **Parameters:** * **insn** – Instruction to modify, usually the first instruction of the macro * **may_go_forward** – 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. ### ida_ua.decode_preceding_insn(out: [insn_t](#ida_ua.insn_t), ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → Tuple[[ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), [bool](https://docs.python.org/3/library/functions.html#bool)] Decodes the preceding instruction. * **Parameters:** * **out** – instruction storage * **ea** – current ea * **Returns:** tuple(preceeding_ea or BADADDR, farref = Boolean) ### ida_ua.construct_macro(\*args) See ua.hpp’s construct_macro(). This function has the following signatures > 1. construct_macro(insn: insn_t, enable: bool, build_macro: callable) -> bool > 2. construct_macro(constuctor: macro_constructor_t, insn: insn_t, enable: bool) -> bool * **Parameters:** * **insn** – the instruction to build the macro for * **enable** – enable macro generation * **build_macro** – a callable with 2 arguments: an insn_t, and whether it is ok to consider the next instruction for the macro * **constructor** – a macro_constructor_t implementation * **Returns:** success ### ida_ua.get_dtype_by_size(size: asize_t) → [int](https://docs.python.org/3/library/functions.html#int) Get op_t::dtype from size. ### ida_ua.get_immvals(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), n: [int](https://docs.python.org/3/library/functions.html#int), F: flags64_t = 0) → PyObject \* Get immediate values at the specified address. This function decodes instruction at the specified address or inspects the data item. It finds immediate values and copies them to ‘out’. This function will store the original value of the operands in ‘out’, unless the last bits of ‘F’ are “…0 11111111”, in which case the transformed values (as needed for printing) will be stored instead. * **Parameters:** * **ea** – address to analyze * **n** – 0..#UA_MAXOP-1 operand number, OPND_ALL all the operands * **F** – flags for the specified address * **Returns:** number of immediate values (0..2\*UA_MAXOP) ### ida_ua.get_printable_immvals(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), n: [int](https://docs.python.org/3/library/functions.html#int), F: flags64_t = 0) → PyObject \* Get immediate ready-to-print values at the specified address * **Parameters:** * **ea** – address to analyze * **n** – 0..#UA_MAXOP-1 operand number, OPND_ALL all the operands * **F** – flags for the specified address * **Returns:** number of immediate values (0..2\*UA_MAXOP) ### ida_ua.insn_t_\_from_ptrval_\_(ptrval: [int](https://docs.python.org/3/library/functions.html#int)) → insn_t \* ### ida_ua.op_t_\_from_ptrval_\_(ptrval: [int](https://docs.python.org/3/library/functions.html#int)) → op_t \* ### ida_ua.outctx_base_t_\_from_ptrval_\_(ptrval: [int](https://docs.python.org/3/library/functions.html#int)) → outctx_base_t \* ### ida_ua.outctx_t_\_from_ptrval_\_(ptrval: [int](https://docs.python.org/3/library/functions.html#int)) → outctx_t \* ### ida_ua.ua_mnem ### ida_ua.STKVAR_VALID_SIZE *= 1* ### ida_ua.STKVAR_KEEP_EXISTING *= 2* # index.html.md # dump_selection summary: retrieve & dump current selection description: : Shows how to retrieve the selection from a listing widget (“IDA View-A”, “Hex View-1”, “Pseudocode-A”, …) as two “cursors”, and from there retrieve (in fact, generate) the corresponding text.
After running this script:
> * select some text in one of the listing widgets (i.e., > “IDA View-…”, “Local Types”, “Pseudocode-…”) > * press Ctrl+Shift+S to dump the selection level: advanced ## Attributes | [`ACTION_NAME`](#dump_selection.ACTION_NAME) | | |------------------------------------------------------|----| | [`ACTION_SHORTCUT`](#dump_selection.ACTION_SHORTCUT) | | | [`p0`](#dump_selection.p0) | | | [`p1`](#dump_selection.p1) | | | [`view`](#dump_selection.view) | | | [`lines`](#dump_selection.lines) | | ## Classes | [`dump_selection_handler_t`](#dump_selection.dump_selection_handler_t) | | |--------------------------------------------------------------------------|----| ## Functions | [`get_widget_lines`](#dump_selection.get_widget_lines)(widget, tp0, tp1) | get lines between places tp0 and tp1 in widget | |----------------------------------------------------------------------------|--------------------------------------------------| ## Module Contents ### dump_selection.get_widget_lines(widget, tp0, tp1) get lines between places tp0 and tp1 in widget ### *class* dump_selection.dump_selection_handler_t Bases: [`ida_kernwin.action_handler_t`](../ida_kernwin/index.md#ida_kernwin.action_handler_t) #### activate(ctx) Activate an action. This function implements the core behavior of an action. It is called when the action is triggered, from a menu, from a popup menu, from the toolbar, or programmatically. * **Returns:** non-zero: all IDA windows will be refreshed #### update(ctx) Update an action. This is called when the context of the UI changed, and we need to let the action update some of its properties if needed (label, icon, …) In addition, this lets IDA know whether the action is enabled, and when it should be queried for availability again. Note: This callback is not meant to change anything in the application’s state, except by calling one (or many) of the “update_action_\*()” functions on this very action. ### dump_selection.ACTION_NAME *= 'dump_selection'* ### dump_selection.ACTION_SHORTCUT *= 'Ctrl+Shift+S'* ### dump_selection.p0 ### dump_selection.p1 ### dump_selection.view ### dump_selection.lines *= []* # index.html.md # decompile_entry_points summary: decompile entrypoint automatically description: : Attempts to load a decompiler plugin corresponding to the current architecture right after auto-analysis is performed, and then tries to decompile the function at the first entrypoint.
It is particularly suited for use with the ‘-S’ flag, for example: idat -Ldecompile.log -Sdecompile_entry_points.py -c file level: intermediate ## Functions | [`init_hexrays`](#decompile_entry_points.init_hexrays)() | | |-------------------------------------------------------------------------|----| | [`decompile_func`](#decompile_entry_points.decompile_func)(ea, outfile) | | | [`main`](#decompile_entry_points.main)() | | ## Module Contents ### decompile_entry_points.init_hexrays() ### decompile_entry_points.decompile_func(ea, outfile) ### decompile_entry_points.main() # index.html.md # vds7 summary: dump statement blocks description: : Using a ida_hexrays.ctree_visitor_t, search for ida_hexrays.cit_block instances and dump them. author: ``` EiNSTeiN_ ``` ([einstein@g3nius.org](mailto:einstein@g3nius.org)) level: beginner ## Attributes | [`vds7_hooks`](#vds7.vds7_hooks) | | |------------------------------------|----| ## Classes | [`cblock_visitor_t`](#vds7.cblock_visitor_t) | | |------------------------------------------------|----| | [`vds7_hooks_t`](#vds7.vds7_hooks_t) | | ## Module Contents ### *class* vds7.cblock_visitor_t Bases: [`ida_hexrays.ctree_visitor_t`](../ida_hexrays/index.md#ida_hexrays.ctree_visitor_t) #### visit_insn(ins) Visit a statement. This is a visitor function which should be overridden by a derived class to do some useful work. This visitor performs pre-order traserval, i.e. an item is visited before its children. * **Returns:** 0 to continue the traversal, nonzero to stop. #### dump_block(ea, b) ### *class* vds7.vds7_hooks_t(\_flags: [int](https://docs.python.org/3/library/functions.html#int) = 0, \_hkcb_flags: [int](https://docs.python.org/3/library/functions.html#int) = 1) Bases: [`ida_hexrays.Hexrays_Hooks`](../ida_hexrays/index.md#ida_hexrays.Hexrays_Hooks) #### maturity(cfunc, maturity) Ctree maturity level is being changed. * **Parameters:** * **cfunc** – (cfunc_t ``` * ``` ) * **new_maturity** – (ctree_maturity_t) ### vds7.vds7_hooks # index.html.md # ida_mergemod Merge functionality for modules. NOTE: this functionality is available in IDA Teams (not IDA Pro) This file contains helper classes and convenience functions for module (plugin or processor module) merging. Each module is responsible for merging the data it owns (the module data). At the very beginning, the merging engine generates the ev_create_merge_handlers event. Modules should hook to this event to create merge handlers (mergers) that are responsible for the module data. We assume that each module may have: * its data structure, derived from plugmod_t or procmod_t. we call this structure moddata. * a dedicated netnode (module node), modnode for short. Moddata is registered with the IDA kernel using the set_module_data() function, which returns an integer, moddata_id. moddata_id is used to access the module data structure during merging, so it is mandatory for all modules that support merging. The following sources of mergeable data are supported: 1. Data fields inside moddata 2. Values (scalar or binary, including blobs) stored in the module node 3. Values (scalar or binary, including blobs) stored in arbitrary netnodes 4. Data fields inside an auxiliary structure (provided by a special helper) 5. Indexed arrays of data stored in netnodes Usually the sources #1-4 are handled by a single merger, which can be parameterized using the folowing information: * moddata_id * module name * module node name * array of field descriptors (idbattr_info_t idpopts_info[], see ida.hpp) See plugins/mex1 for an example of such a merger. These parameters are stored in a helper class (moddata_diff_helper_t or derived). The helper class can override the following virtual methods: merge_starting - prepare module data for merging (e.g. load data from idb) merge_ending - opposite to merge_starting (e.g. save merged data to idb) get_struc_ptr - get pointer to the auxiliary structure (to handle source #4); this method will be called only if the fields with the IDI_HLPSTRUC bit are present in the idpopts_info[] array For most plugins, the default implementation of moddata_diff_helper_t or the std_moddata_diff_helper_t helper (presented below) is sufficient. You can find examples of non-standard helpers in plugins/mex2. The source #5 is handled by a different set of mergers described by an array of merge_node_info_t entries: a merger per entry. A non-trivial example can be found in plugins/mex3 and plugins/ex_merge_ldrdata. A module can use the create_std_modmerge_handlers() function to create necessary merge handlers. Please pay attention to the following arguments: helper - a helper class responsible for access to the internal module data for the sources #1-4. It can be used to prepare a pointer to the internal module structure and load/save data before/after merging (example: plugins/mex2). Im most cases the default helper class moddata_diff_helper_t can be used. merge_node_info - array of descriptions for the source #5. Note that the same module node is used for all array elements. If you need this kind of mergers for other netnodes, you should add them manually using the create_nodeval_merge_handler() function (example: plugins/mex3) See also module/mergecmn.cpp for procmod-specific functions and macros. Glossary: modmerger = module merger moddata = module data moddata_id = module data id ## Functions | [`create_std_modmerge_handlers`](#ida_mergemod.create_std_modmerge_handlers)(→ None) | convinience function to create merge handlers for modules/plugins | |----------------------------------------------------------------------------------------|---------------------------------------------------------------------| ## Module Contents ### ida_mergemod.create_std_modmerge_handlers(mhp: merge_handler_params_t &, helper: moddata_diff_helper_t &, merge_node_info: merge_node_info2_t const \* = None) → [None](https://docs.python.org/3/library/constants.html#None) convinience function to create merge handlers for modules/plugins # index.html.md # ida_nalt Definitions of various information kept in netnodes. Each address in the program has a corresponding netnode: netnode(ea). If we have no information about an address, the corresponding netnode is not created. Otherwise we will create a netnode and save information in it. All variable length information (names, comments, offset information, etc) is stored in the netnode. Don’t forget that some information is already stored in the flags (bytes.hpp) netnode. ## Attributes | [`NALT_SWITCH`](#ida_nalt.NALT_SWITCH) | switch idiom address (used at jump targets) | |--------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [`NALT_STRUCT`](#ida_nalt.NALT_STRUCT) | struct id | | [`NALT_AFLAGS`](#ida_nalt.NALT_AFLAGS) | additional flags for an item | | [`NALT_LINNUM`](#ida_nalt.NALT_LINNUM) | source line number | | [`NALT_ABSBASE`](#ida_nalt.NALT_ABSBASE) | absolute segment location | | [`NALT_ENUM0`](#ida_nalt.NALT_ENUM0) | enum id for the first operand | | [`NALT_ENUM1`](#ida_nalt.NALT_ENUM1) | enum id for the second operand | | [`NALT_PURGE`](#ida_nalt.NALT_PURGE) | number of bytes purged from the stack when a function is called indirectly | | [`NALT_STRTYPE`](#ida_nalt.NALT_STRTYPE) | type of a string item | | [`NALT_ALIGN`](#ida_nalt.NALT_ALIGN) | alignment value if the item is FF_ALIGN (should be equal to a power of 2) | | [`NALT_COLOR`](#ida_nalt.NALT_COLOR) | instruction/data background color | | [`NSUP_CMT`](#ida_nalt.NSUP_CMT) | regular comment | | [`NSUP_REPCMT`](#ida_nalt.NSUP_REPCMT) | repeatable comment | | [`NSUP_FOP1`](#ida_nalt.NSUP_FOP1) | forced operand 1 | | [`NSUP_FOP2`](#ida_nalt.NSUP_FOP2) | forced operand 2 | | [`NSUP_JINFO`](#ida_nalt.NSUP_JINFO) | jump table info | | [`NSUP_ARRAY`](#ida_nalt.NSUP_ARRAY) | array parameters | | [`NSUP_OMFGRP`](#ida_nalt.NSUP_OMFGRP) | OMF: group of segments (not used anymore). | | [`NSUP_FOP3`](#ida_nalt.NSUP_FOP3) | forced operand 3 | | [`NSUP_SWITCH`](#ida_nalt.NSUP_SWITCH) | switch information | | [`NSUP_REF0`](#ida_nalt.NSUP_REF0) | complex reference information for operand 1 | | [`NSUP_REF1`](#ida_nalt.NSUP_REF1) | complex reference information for operand 2 | | [`NSUP_REF2`](#ida_nalt.NSUP_REF2) | complex reference information for operand 3 | | [`NSUP_OREF0`](#ida_nalt.NSUP_OREF0) | outer complex reference information for operand 1 | | [`NSUP_OREF1`](#ida_nalt.NSUP_OREF1) | outer complex reference information for operand 2 | | [`NSUP_OREF2`](#ida_nalt.NSUP_OREF2) | outer complex reference information for operand 3 | | [`NSUP_STROFF0`](#ida_nalt.NSUP_STROFF0) | stroff: struct path for the first operand | | [`NSUP_STROFF1`](#ida_nalt.NSUP_STROFF1) | stroff: struct path for the second operand | | [`NSUP_SEGTRANS`](#ida_nalt.NSUP_SEGTRANS) | segment translations | | [`NSUP_FOP4`](#ida_nalt.NSUP_FOP4) | forced operand 4 | | [`NSUP_FOP5`](#ida_nalt.NSUP_FOP5) | forced operand 5 | | [`NSUP_FOP6`](#ida_nalt.NSUP_FOP6) | forced operand 6 | | [`NSUP_REF3`](#ida_nalt.NSUP_REF3) | complex reference information for operand 4 | | [`NSUP_REF4`](#ida_nalt.NSUP_REF4) | complex reference information for operand 5 | | [`NSUP_REF5`](#ida_nalt.NSUP_REF5) | complex reference information for operand 6 | | [`NSUP_OREF3`](#ida_nalt.NSUP_OREF3) | outer complex reference information for operand 4 | | [`NSUP_OREF4`](#ida_nalt.NSUP_OREF4) | outer complex reference information for operand 5 | | [`NSUP_OREF5`](#ida_nalt.NSUP_OREF5) | outer complex reference information for operand 6 | | [`NSUP_XREFPOS`](#ida_nalt.NSUP_XREFPOS) | saved xref address and type in the xrefs window | | [`NSUP_CUSTDT`](#ida_nalt.NSUP_CUSTDT) | custom data type id | | [`NSUP_GROUPS`](#ida_nalt.NSUP_GROUPS) | SEG_GRP: pack_dd encoded list of selectors. | | [`NSUP_ARGEAS`](#ida_nalt.NSUP_ARGEAS) | instructions that initialize call arguments | | [`NSUP_FOP7`](#ida_nalt.NSUP_FOP7) | forced operand 7 | | [`NSUP_FOP8`](#ida_nalt.NSUP_FOP8) | forced operand 8 | | [`NSUP_REF6`](#ida_nalt.NSUP_REF6) | complex reference information for operand 7 | | [`NSUP_REF7`](#ida_nalt.NSUP_REF7) | complex reference information for operand 8 | | [`NSUP_OREF6`](#ida_nalt.NSUP_OREF6) | outer complex reference information for operand 7 | | [`NSUP_OREF7`](#ida_nalt.NSUP_OREF7) | outer complex reference information for operand 8 | | [`NSUP_EX_FLAGS`](#ida_nalt.NSUP_EX_FLAGS) | Extended flags. | | [`NSUP_POINTS`](#ida_nalt.NSUP_POINTS) | SP change points blob (see funcs.cpp). values NSUP_POINTS..NSUP_POINTS+0x1000 are reserved | | [`NSUP_MANUAL`](#ida_nalt.NSUP_MANUAL) | manual instruction. values NSUP_MANUAL..NSUP_MANUAL+0x1000 are reserved | | [`NSUP_TYPEINFO`](#ida_nalt.NSUP_TYPEINFO) | type information. values NSUP_TYPEINFO..NSUP_TYPEINFO+0x1000 are reserved | | [`NSUP_REGVAR`](#ida_nalt.NSUP_REGVAR) | register variables. values NSUP_REGVAR..NSUP_REGVAR+0x1000 are reserved | | [`NSUP_LLABEL`](#ida_nalt.NSUP_LLABEL) | local labels. values NSUP_LLABEL..NSUP_LLABEL+0x1000 are reserved | | [`NSUP_REGARG`](#ida_nalt.NSUP_REGARG) | register argument type/name descriptions values NSUP_REGARG..NSUP_REGARG+0x1000 are reserved | | [`NSUP_FTAILS`](#ida_nalt.NSUP_FTAILS) | function tails or tail referers values NSUP_FTAILS..NSUP_FTAILS+0x1000 are reserved | | [`NSUP_GROUP`](#ida_nalt.NSUP_GROUP) | graph group information values NSUP_GROUP..NSUP_GROUP+0x1000 are reserved | | [`NSUP_OPTYPES`](#ida_nalt.NSUP_OPTYPES) | operand type information. values NSUP_OPTYPES..NSUP_OPTYPES+0x100000 are reserved | | [`NSUP_ORIGFMD`](#ida_nalt.NSUP_ORIGFMD) | function metadata before lumina information was applied values NSUP_ORIGFMD..NSUP_ORIGFMD+0x1000 are reserved | | [`NSUP_FRAME`](#ida_nalt.NSUP_FRAME) | function frame type values NSUP_FRAME..NSUP_FRAME+0x10000 are reserved | | [`NALT_CREF_TO`](#ida_nalt.NALT_CREF_TO) | code xref to, idx: target address | | [`NALT_CREF_FROM`](#ida_nalt.NALT_CREF_FROM) | code xref from, idx: source address | | [`NALT_DREF_TO`](#ida_nalt.NALT_DREF_TO) | data xref to, idx: target address | | [`NALT_DREF_FROM`](#ida_nalt.NALT_DREF_FROM) | data xref from, idx: source address | | [`NSUP_GR_INFO`](#ida_nalt.NSUP_GR_INFO) | group node info: color, ea, text | | [`NALT_GR_LAYX`](#ida_nalt.NALT_GR_LAYX) | group layout ptrs, hash: md5 of 'belongs' | | [`NSUP_GR_LAYT`](#ida_nalt.NSUP_GR_LAYT) | group layouts, idx: layout pointer | | [`PATCH_TAG`](#ida_nalt.PATCH_TAG) | Patch netnode tag. | | [`IDB_DESKTOPS_NODE_NAME`](#ida_nalt.IDB_DESKTOPS_NODE_NAME) | hash indexed by desktop name with desktop netnode | | [`IDB_DESKTOPS_TAG`](#ida_nalt.IDB_DESKTOPS_TAG) | tag to store desktop blob & timestamp | | [`AFL_LINNUM`](#ida_nalt.AFL_LINNUM) | has line number info | | [`AFL_USERSP`](#ida_nalt.AFL_USERSP) | user-defined SP value | | [`AFL_PUBNAM`](#ida_nalt.AFL_PUBNAM) | name is public (inter-file linkage) | | [`AFL_WEAKNAM`](#ida_nalt.AFL_WEAKNAM) | name is weak | | [`AFL_HIDDEN`](#ida_nalt.AFL_HIDDEN) | the item is hidden completely | | [`AFL_MANUAL`](#ida_nalt.AFL_MANUAL) | the instruction/data is specified by the user | | [`AFL_NOBRD`](#ida_nalt.AFL_NOBRD) | the code/data border is hidden | | [`AFL_ZSTROFF`](#ida_nalt.AFL_ZSTROFF) | display struct field name at offset 0 when displaying an offset. example:

```
`
```

offset somestruct.field_0 \` if this flag is clear, then

```
`
```

offset somestruct \` | | [`AFL_BNOT0`](#ida_nalt.AFL_BNOT0) | the 1st operand is bitwise negated | | [`AFL_BNOT1`](#ida_nalt.AFL_BNOT1) | the 2nd operand is bitwise negated | | [`AFL_LIB`](#ida_nalt.AFL_LIB) | item from the standard library. low level flag, is used to set FUNC_LIB of func_t | | [`AFL_TI`](#ida_nalt.AFL_TI) | has typeinfo? (NSUP_TYPEINFO); used only for addresses, not for member_t | | [`AFL_TI0`](#ida_nalt.AFL_TI0) | has typeinfo for operand 0? (NSUP_OPTYPES) | | [`AFL_TI1`](#ida_nalt.AFL_TI1) | has typeinfo for operand 1? (NSUP_OPTYPES+1) | | [`AFL_LNAME`](#ida_nalt.AFL_LNAME) | has local name too (FF_NAME should be set) | | [`AFL_TILCMT`](#ida_nalt.AFL_TILCMT) | has type comment? (such a comment may be changed by IDA) | | [`AFL_LZERO0`](#ida_nalt.AFL_LZERO0) | toggle leading zeros for the 1st operand | | [`AFL_LZERO1`](#ida_nalt.AFL_LZERO1) | toggle leading zeros for the 2nd operand | | [`AFL_COLORED`](#ida_nalt.AFL_COLORED) | has user-defined instruction color? | | [`AFL_TERSESTR`](#ida_nalt.AFL_TERSESTR) | terse structure variable display? | | [`AFL_SIGN0`](#ida_nalt.AFL_SIGN0) | code: toggle sign of the 1st operand | | [`AFL_SIGN1`](#ida_nalt.AFL_SIGN1) | code: toggle sign of the 2nd operand | | [`AFL_NORET`](#ida_nalt.AFL_NORET) | for imported function pointers: doesn't return. this flag can also be used for any instruction which halts or finishes the program execution | | [`AFL_FIXEDSPD`](#ida_nalt.AFL_FIXEDSPD) | sp delta value is fixed by analysis. should not be modified by modules | | [`AFL_ALIGNFLOW`](#ida_nalt.AFL_ALIGNFLOW) | the previous insn was created for alignment purposes only | | [`AFL_USERTI`](#ida_nalt.AFL_USERTI) | the type information is definitive. (comes from the user or type library) if not set see AFL_TYPE_GUESSED | | [`AFL_RETFP`](#ida_nalt.AFL_RETFP) | function returns a floating point value | | [`AFL_USEMODSP`](#ida_nalt.AFL_USEMODSP) | insn modifies SP and uses the modified value; example: pop [rsp+N] | | [`AFL_NOTCODE`](#ida_nalt.AFL_NOTCODE) | autoanalysis should not create code here | | [`AFL_NOTPROC`](#ida_nalt.AFL_NOTPROC) | autoanalysis should not create proc here | | [`AFL_TYPE_GUESSED`](#ida_nalt.AFL_TYPE_GUESSED) | who guessed the type information? | | [`AFL_IDA_GUESSED`](#ida_nalt.AFL_IDA_GUESSED) | the type is guessed by IDA | | [`AFL_HR_GUESSED_FUNC`](#ida_nalt.AFL_HR_GUESSED_FUNC) | the function type is guessed by the decompiler | | [`AFL_HR_GUESSED_DATA`](#ida_nalt.AFL_HR_GUESSED_DATA) | the data type is guessed by the decompiler | | [`AFL_HR_DETERMINED`](#ida_nalt.AFL_HR_DETERMINED) | the type is definitely guessed by the decompiler | | [`STRWIDTH_1B`](#ida_nalt.STRWIDTH_1B) | | | [`STRWIDTH_2B`](#ida_nalt.STRWIDTH_2B) | | | [`STRWIDTH_4B`](#ida_nalt.STRWIDTH_4B) | | | [`STRWIDTH_MASK`](#ida_nalt.STRWIDTH_MASK) | | | [`STRLYT_TERMCHR`](#ida_nalt.STRLYT_TERMCHR) | | | [`STRLYT_PASCAL1`](#ida_nalt.STRLYT_PASCAL1) | | | [`STRLYT_PASCAL2`](#ida_nalt.STRLYT_PASCAL2) | | | [`STRLYT_PASCAL4`](#ida_nalt.STRLYT_PASCAL4) | | | [`STRLYT_DECOMP`](#ida_nalt.STRLYT_DECOMP) | | | [`STRLYT_MASK`](#ida_nalt.STRLYT_MASK) | | | [`STRLYT_SHIFT`](#ida_nalt.STRLYT_SHIFT) | | | [`STRTYPE_TERMCHR`](#ida_nalt.STRTYPE_TERMCHR) | Character-terminated string. The termination characters are kept in the next bytes of string type. | | [`STRTYPE_C`](#ida_nalt.STRTYPE_C) | C-style string. | | [`STRTYPE_C_16`](#ida_nalt.STRTYPE_C_16) | Zero-terminated 16-bit chars. | | [`STRTYPE_C_32`](#ida_nalt.STRTYPE_C_32) | Zero-terminated 32-bit chars. | | [`STRTYPE_PASCAL`](#ida_nalt.STRTYPE_PASCAL) | Pascal-style, one-byte length prefix. | | [`STRTYPE_PASCAL_16`](#ida_nalt.STRTYPE_PASCAL_16) | Pascal-style, 16-bit chars, one-byte length prefix. | | [`STRTYPE_PASCAL_32`](#ida_nalt.STRTYPE_PASCAL_32) | Pascal-style, 32-bit chars, one-byte length prefix. | | [`STRTYPE_LEN2`](#ida_nalt.STRTYPE_LEN2) | Pascal-style, two-byte length prefix. | | [`STRTYPE_LEN2_16`](#ida_nalt.STRTYPE_LEN2_16) | Pascal-style, 16-bit chars, two-byte length prefix. | | [`STRTYPE_LEN2_32`](#ida_nalt.STRTYPE_LEN2_32) | Pascal-style, 32-bit chars, two-byte length prefix. | | [`STRTYPE_LEN4`](#ida_nalt.STRTYPE_LEN4) | Pascal-style, four-byte length prefix. | | [`STRTYPE_LEN4_16`](#ida_nalt.STRTYPE_LEN4_16) | Pascal-style, 16-bit chars, four-byte length prefix. | | [`STRTYPE_LEN4_32`](#ida_nalt.STRTYPE_LEN4_32) | Pascal-style, 32-bit chars, four-byte length prefix. | | [`STRTYPE_DECOMP`](#ida_nalt.STRTYPE_DECOMP) | Synthetic, decompiler generated string (0x10). | | [`STRENC_DEFAULT`](#ida_nalt.STRENC_DEFAULT) | use default encoding for this type (see get_default_encoding_idx()) | | [`STRENC_NONE`](#ida_nalt.STRENC_NONE) | force no-conversion encoding | | [`AP_ALLOWDUPS`](#ida_nalt.AP_ALLOWDUPS) | use 'dup' construct | | [`AP_SIGNED`](#ida_nalt.AP_SIGNED) | treat numbers as signed | | [`AP_INDEX`](#ida_nalt.AP_INDEX) | display array element indexes as comments | | [`AP_ARRAY`](#ida_nalt.AP_ARRAY) | create as array (this flag is not stored in database) | | [`AP_IDXBASEMASK`](#ida_nalt.AP_IDXBASEMASK) | mask for number base of the indexes | | [`AP_IDXDEC`](#ida_nalt.AP_IDXDEC) | display indexes in decimal | | [`AP_IDXHEX`](#ida_nalt.AP_IDXHEX) | display indexes in hex | | [`AP_IDXOCT`](#ida_nalt.AP_IDXOCT) | display indexes in octal | | [`AP_IDXBIN`](#ida_nalt.AP_IDXBIN) | display indexes in binary | | [`SWI_SPARSE`](#ida_nalt.SWI_SPARSE) | sparse switch (value table present), otherwise lowcase present | | [`SWI_V32`](#ida_nalt.SWI_V32) | 32-bit values in table | | [`SWI_J32`](#ida_nalt.SWI_J32) | 32-bit jump offsets | | [`SWI_VSPLIT`](#ida_nalt.SWI_VSPLIT) | value table is split (only for 32-bit values) | | [`SWI_USER`](#ida_nalt.SWI_USER) | user specified switch (starting from version 2) | | [`SWI_DEF_IN_TBL`](#ida_nalt.SWI_DEF_IN_TBL) | default case is an entry in the jump table. This flag is applicable in 2 cases: | | [`SWI_JMP_INV`](#ida_nalt.SWI_JMP_INV) | jumptable is inversed. (last entry is for first entry in values table) | | [`SWI_SHIFT_MASK`](#ida_nalt.SWI_SHIFT_MASK) | use formula (element<
```
REF_
```

... constant from size Supported sizes: 1,2,4,8,16 For other sizes returns reftype_t(-1) | | [`find_custom_refinfo`](#ida_nalt.find_custom_refinfo)(→ int) | Get id of a custom refinfo type. | | [`get_custom_refinfo`](#ida_nalt.get_custom_refinfo)(→ custom_refinfo_handler_t const \*) | Get definition of a registered custom refinfo type. | | [`set_refinfo_ex`](#ida_nalt.set_refinfo_ex)(→ bool) | | | [`set_refinfo`](#ida_nalt.set_refinfo)(→ bool) | | | [`get_refinfo`](#ida_nalt.get_refinfo)(→ bool) | | | [`del_refinfo`](#ida_nalt.del_refinfo)(→ bool) | | | [`get_tinfo`](#ida_nalt.get_tinfo)(→ bool) | | | [`set_tinfo`](#ida_nalt.set_tinfo)(→ bool) | | | [`del_tinfo`](#ida_nalt.del_tinfo)(→ None) | | | [`get_op_tinfo`](#ida_nalt.get_op_tinfo)(→ bool) | | | [`set_op_tinfo`](#ida_nalt.set_op_tinfo)(→ bool) | | | [`del_op_tinfo`](#ida_nalt.del_op_tinfo)(→ None) | | | [`get_root_filename`](#ida_nalt.get_root_filename)(→ Union[str, None]) | Get file name only of the input file. | | [`dbg_get_input_path`](#ida_nalt.dbg_get_input_path)(→ Union[str, None]) | Get debugger input file name/path (see LFLG_DBG_NOPATH). | | [`get_input_file_path`](#ida_nalt.get_input_file_path)(→ Union[str, None]) | Get full path of the input file. | | [`set_root_filename`](#ida_nalt.set_root_filename)(→ None) | Set full path of the input file. | | [`retrieve_input_file_size`](#ida_nalt.retrieve_input_file_size)(→ int) | Get size of input file in bytes. | | [`retrieve_input_file_crc32`](#ida_nalt.retrieve_input_file_crc32)(→ int) | Get input file crc32 stored in the database. it can be used to check that the input file has not been changed. | | [`retrieve_input_file_md5`](#ida_nalt.retrieve_input_file_md5)(→ Union[bytes, None]) | Get input file md5. | | [`retrieve_input_file_sha256`](#ida_nalt.retrieve_input_file_sha256)(→ Union[bytes, None]) | Get input file sha256. | | [`get_asm_inc_file`](#ida_nalt.get_asm_inc_file)(→ Union[str, None]) | Get name of the include file. | | [`set_asm_inc_file`](#ida_nalt.set_asm_inc_file)(→ bool) | Set name of the include file. | | [`get_imagebase`](#ida_nalt.get_imagebase)(→ ida_idaapi.ea_t) | Get image base address. | | [`set_imagebase`](#ida_nalt.set_imagebase)(→ None) | Set image base address. | | [`get_ids_modnode`](#ida_nalt.get_ids_modnode)(→ netnode) | Get ids modnode. | | [`set_ids_modnode`](#ida_nalt.set_ids_modnode)(→ None) | Set ids modnode. | | [`get_archive_path`](#ida_nalt.get_archive_path)(→ Union[str, None]) | Get archive file path from which input file was extracted. | | [`set_archive_path`](#ida_nalt.set_archive_path)(→ bool) | Set archive file path from which input file was extracted. | | [`get_loader_format_name`](#ida_nalt.get_loader_format_name)(→ Union[str, None]) | Get file format name for loader modules. | | [`set_loader_format_name`](#ida_nalt.set_loader_format_name)(→ None) | Set file format name for loader modules. | | [`get_initial_ida_version`](#ida_nalt.get_initial_ida_version)(→ Union[str, None]) | Get version of ida which created the database (string format like "7.5"). | | [`get_ida_notepad_text`](#ida_nalt.get_ida_notepad_text)(→ Union[str, None]) | Get notepad text. | | [`set_ida_notepad_text`](#ida_nalt.set_ida_notepad_text)(→ None) | Set notepad text. | | [`get_srcdbg_paths`](#ida_nalt.get_srcdbg_paths)(→ Union[str, None]) | Get source debug paths. | | [`set_srcdbg_paths`](#ida_nalt.set_srcdbg_paths)(→ None) | Set source debug paths. | | [`get_srcdbg_undesired_paths`](#ida_nalt.get_srcdbg_undesired_paths)(→ Union[str, None]) | Get user-closed source files. | | [`set_srcdbg_undesired_paths`](#ida_nalt.set_srcdbg_undesired_paths)(→ None) | Set user-closed source files. | | [`get_initial_idb_version`](#ida_nalt.get_initial_idb_version)(→ ushort) | Get initial version of the database (numeric format like 700). | | [`get_idb_ctime`](#ida_nalt.get_idb_ctime)(→ time_t) | Get database creation timestamp. | | [`get_elapsed_secs`](#ida_nalt.get_elapsed_secs)(→ int) | Get seconds database stayed open. | | [`get_idb_nopens`](#ida_nalt.get_idb_nopens)(→ int) | Get number of times the database is opened. | | [`get_encoding_qty`](#ida_nalt.get_encoding_qty)(→ int) | | | [`get_encoding_name`](#ida_nalt.get_encoding_name)(→ str) | | | [`add_encoding`](#ida_nalt.add_encoding)(→ int) | | | [`del_encoding`](#ida_nalt.del_encoding)(→ bool) | | | [`rename_encoding`](#ida_nalt.rename_encoding)(→ bool) | | | [`get_encoding_bpu`](#ida_nalt.get_encoding_bpu)(→ int) | | | [`get_encoding_bpu_by_name`](#ida_nalt.get_encoding_bpu_by_name)(→ int) | | | [`get_strtype_bpu`](#ida_nalt.get_strtype_bpu)(→ int) | | | [`get_default_encoding_idx`](#ida_nalt.get_default_encoding_idx)(→ int) | | | [`set_default_encoding_idx`](#ida_nalt.set_default_encoding_idx)(→ bool) | | | [`encoding_from_strtype`](#ida_nalt.encoding_from_strtype)(→ str) | | | [`get_outfile_encoding_idx`](#ida_nalt.get_outfile_encoding_idx)(→ int) | | | [`set_outfile_encoding_idx`](#ida_nalt.set_outfile_encoding_idx)(→ bool) | | | [`get_import_module_qty`](#ida_nalt.get_import_module_qty)(→ uint) | | | [`delete_imports`](#ida_nalt.delete_imports)(→ None) | | | [`get_import_entry`](#ida_nalt.get_import_entry)(→ bool) | | | [`set_gotea`](#ida_nalt.set_gotea)(→ None) | | | [`get_gotea`](#ida_nalt.get_gotea)(→ ida_idaapi.ea_t) | | | [`get_import_module_name`](#ida_nalt.get_import_module_name)(mod_index) | Returns the name of an imported module given its index | | [`enum_import_names`](#ida_nalt.enum_import_names)(mod_index, callback) | Enumerate imports from a specific module. | | [`switch_info_t__from_ptrval__`](#ida_nalt.switch_info_t__from_ptrval__)(→ switch_info_t \*) | | | [`get_switch_info`](#id0)(\*args) | | | [`get_abi_name`](#ida_nalt.get_abi_name)() | | ## Module Contents ### *class* ida_nalt.custom_data_type_ids_fids_array(data: short (&)[8]) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### data *: short (&)[8]* #### bytes ### *class* ida_nalt.strpath_ids_array(data: unsigned long long (&)[32]) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### data *: unsigned long long (&)[32]* #### bytes ### ida_nalt.NALT_SWITCH switch idiom address (used at jump targets) ### ida_nalt.NALT_STRUCT struct id ### ida_nalt.NALT_AFLAGS additional flags for an item ### ida_nalt.NALT_LINNUM source line number ### ida_nalt.NALT_ABSBASE absolute segment location ### ida_nalt.NALT_ENUM0 enum id for the first operand ### ida_nalt.NALT_ENUM1 enum id for the second operand ### ida_nalt.NALT_PURGE number of bytes purged from the stack when a function is called indirectly ### ida_nalt.NALT_STRTYPE type of a string item ### ida_nalt.NALT_ALIGN alignment value if the item is FF_ALIGN (should be equal to a power of 2) ### ida_nalt.NALT_COLOR instruction/data background color ### ida_nalt.NSUP_CMT regular comment ### ida_nalt.NSUP_REPCMT repeatable comment ### ida_nalt.NSUP_FOP1 forced operand 1 ### ida_nalt.NSUP_FOP2 forced operand 2 ### ida_nalt.NSUP_JINFO jump table info ### ida_nalt.NSUP_ARRAY array parameters ### ida_nalt.NSUP_OMFGRP OMF: group of segments (not used anymore). ### ida_nalt.NSUP_FOP3 forced operand 3 ### ida_nalt.NSUP_SWITCH switch information ### ida_nalt.NSUP_REF0 complex reference information for operand 1 ### ida_nalt.NSUP_REF1 complex reference information for operand 2 ### ida_nalt.NSUP_REF2 complex reference information for operand 3 ### ida_nalt.NSUP_OREF0 outer complex reference information for operand 1 ### ida_nalt.NSUP_OREF1 outer complex reference information for operand 2 ### ida_nalt.NSUP_OREF2 outer complex reference information for operand 3 ### ida_nalt.NSUP_STROFF0 stroff: struct path for the first operand ### ida_nalt.NSUP_STROFF1 stroff: struct path for the second operand ### ida_nalt.NSUP_SEGTRANS segment translations ### ida_nalt.NSUP_FOP4 forced operand 4 ### ida_nalt.NSUP_FOP5 forced operand 5 ### ida_nalt.NSUP_FOP6 forced operand 6 ### ida_nalt.NSUP_REF3 complex reference information for operand 4 ### ida_nalt.NSUP_REF4 complex reference information for operand 5 ### ida_nalt.NSUP_REF5 complex reference information for operand 6 ### ida_nalt.NSUP_OREF3 outer complex reference information for operand 4 ### ida_nalt.NSUP_OREF4 outer complex reference information for operand 5 ### ida_nalt.NSUP_OREF5 outer complex reference information for operand 6 ### ida_nalt.NSUP_XREFPOS saved xref address and type in the xrefs window ### ida_nalt.NSUP_CUSTDT custom data type id ### ida_nalt.NSUP_GROUPS SEG_GRP: pack_dd encoded list of selectors. ### ida_nalt.NSUP_ARGEAS instructions that initialize call arguments ### ida_nalt.NSUP_FOP7 forced operand 7 ### ida_nalt.NSUP_FOP8 forced operand 8 ### ida_nalt.NSUP_REF6 complex reference information for operand 7 ### ida_nalt.NSUP_REF7 complex reference information for operand 8 ### ida_nalt.NSUP_OREF6 outer complex reference information for operand 7 ### ida_nalt.NSUP_OREF7 outer complex reference information for operand 8 ### ida_nalt.NSUP_EX_FLAGS Extended flags. ### ida_nalt.NSUP_POINTS SP change points blob (see funcs.cpp). values NSUP_POINTS..NSUP_POINTS+0x1000 are reserved ### ida_nalt.NSUP_MANUAL manual instruction. values NSUP_MANUAL..NSUP_MANUAL+0x1000 are reserved ### ida_nalt.NSUP_TYPEINFO type information. values NSUP_TYPEINFO..NSUP_TYPEINFO+0x1000 are reserved ### ida_nalt.NSUP_REGVAR register variables. values NSUP_REGVAR..NSUP_REGVAR+0x1000 are reserved ### ida_nalt.NSUP_LLABEL local labels. values NSUP_LLABEL..NSUP_LLABEL+0x1000 are reserved ### ida_nalt.NSUP_REGARG register argument type/name descriptions values NSUP_REGARG..NSUP_REGARG+0x1000 are reserved ### ida_nalt.NSUP_FTAILS function tails or tail referers values NSUP_FTAILS..NSUP_FTAILS+0x1000 are reserved ### ida_nalt.NSUP_GROUP graph group information values NSUP_GROUP..NSUP_GROUP+0x1000 are reserved ### ida_nalt.NSUP_OPTYPES operand type information. values NSUP_OPTYPES..NSUP_OPTYPES+0x100000 are reserved ### ida_nalt.NSUP_ORIGFMD function metadata before lumina information was applied values NSUP_ORIGFMD..NSUP_ORIGFMD+0x1000 are reserved ### ida_nalt.NSUP_FRAME function frame type values NSUP_FRAME..NSUP_FRAME+0x10000 are reserved ### ida_nalt.NALT_CREF_TO code xref to, idx: target address ### ida_nalt.NALT_CREF_FROM code xref from, idx: source address ### ida_nalt.NALT_DREF_TO data xref to, idx: target address ### ida_nalt.NALT_DREF_FROM data xref from, idx: source address ### ida_nalt.NSUP_GR_INFO group node info: color, ea, text ### ida_nalt.NALT_GR_LAYX group layout ptrs, hash: md5 of ‘belongs’ ### ida_nalt.NSUP_GR_LAYT group layouts, idx: layout pointer ### ida_nalt.PATCH_TAG Patch netnode tag. ### ida_nalt.IDB_DESKTOPS_NODE_NAME hash indexed by desktop name with desktop netnode ### ida_nalt.IDB_DESKTOPS_TAG tag to store desktop blob & timestamp ### ida_nalt.ea2node(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → nodeidx_t Get netnode for the specified address. ### ida_nalt.node2ea(ndx: nodeidx_t) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) ### ida_nalt.end_ea2node(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → nodeidx_t ### ida_nalt.getnode(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [netnode](../ida_netnode/index.md#ida_netnode.netnode) ### ida_nalt.get_strid(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → tid_t ### ida_nalt.AFL_LINNUM has line number info ### ida_nalt.AFL_USERSP user-defined SP value ### ida_nalt.AFL_PUBNAM name is public (inter-file linkage) ### ida_nalt.AFL_WEAKNAM name is weak ### ida_nalt.AFL_HIDDEN the item is hidden completely ### ida_nalt.AFL_MANUAL the instruction/data is specified by the user ### ida_nalt.AFL_NOBRD the code/data border is hidden ### ida_nalt.AFL_ZSTROFF display struct field name at offset 0 when displaying an offset. example: ``` ` ``` offset somestruct.field_0 \` if this flag is clear, then ``` ` ``` offset somestruct \` ### ida_nalt.AFL_BNOT0 the 1st operand is bitwise negated ### ida_nalt.AFL_BNOT1 the 2nd operand is bitwise negated ### ida_nalt.AFL_LIB item from the standard library. low level flag, is used to set FUNC_LIB of func_t ### ida_nalt.AFL_TI has typeinfo? (NSUP_TYPEINFO); used only for addresses, not for member_t ### ida_nalt.AFL_TI0 has typeinfo for operand 0? (NSUP_OPTYPES) ### ida_nalt.AFL_TI1 has typeinfo for operand 1? (NSUP_OPTYPES+1) ### ida_nalt.AFL_LNAME has local name too (FF_NAME should be set) ### ida_nalt.AFL_TILCMT has type comment? (such a comment may be changed by IDA) ### ida_nalt.AFL_LZERO0 toggle leading zeros for the 1st operand ### ida_nalt.AFL_LZERO1 toggle leading zeros for the 2nd operand ### ida_nalt.AFL_COLORED has user-defined instruction color? ### ida_nalt.AFL_TERSESTR terse structure variable display? ### ida_nalt.AFL_SIGN0 code: toggle sign of the 1st operand ### ida_nalt.AFL_SIGN1 code: toggle sign of the 2nd operand ### ida_nalt.AFL_NORET for imported function pointers: doesn’t return. this flag can also be used for any instruction which halts or finishes the program execution ### ida_nalt.AFL_FIXEDSPD sp delta value is fixed by analysis. should not be modified by modules ### ida_nalt.AFL_ALIGNFLOW the previous insn was created for alignment purposes only ### ida_nalt.AFL_USERTI the type information is definitive. (comes from the user or type library) if not set see AFL_TYPE_GUESSED ### ida_nalt.AFL_RETFP function returns a floating point value ### ida_nalt.AFL_USEMODSP insn modifies SP and uses the modified value; example: pop [rsp+N] ### ida_nalt.AFL_NOTCODE autoanalysis should not create code here ### ida_nalt.AFL_NOTPROC autoanalysis should not create proc here ### ida_nalt.AFL_TYPE_GUESSED who guessed the type information? ### ida_nalt.AFL_IDA_GUESSED the type is guessed by IDA ### ida_nalt.AFL_HR_GUESSED_FUNC the function type is guessed by the decompiler ### ida_nalt.AFL_HR_GUESSED_DATA the data type is guessed by the decompiler ### ida_nalt.AFL_HR_DETERMINED the type is definitely guessed by the decompiler ### ida_nalt.set_aflags(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), flags: aflags_t) → [None](https://docs.python.org/3/library/constants.html#None) ### ida_nalt.upd_abits(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), clr_bits: aflags_t, set_bits: aflags_t) → [None](https://docs.python.org/3/library/constants.html#None) ### ida_nalt.set_abits(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), bits: aflags_t) → [None](https://docs.python.org/3/library/constants.html#None) ### ida_nalt.clr_abits(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), bits: aflags_t) → [None](https://docs.python.org/3/library/constants.html#None) ### ida_nalt.get_aflags(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → aflags_t ### ida_nalt.del_aflags(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) ### ida_nalt.has_aflag_linnum(flags: aflags_t) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_nalt.is_aflag_usersp(flags: aflags_t) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_nalt.is_aflag_public_name(flags: aflags_t) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_nalt.is_aflag_weak_name(flags: aflags_t) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_nalt.is_aflag_hidden_item(flags: aflags_t) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_nalt.is_aflag_manual_insn(flags: aflags_t) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_nalt.is_aflag_hidden_border(flags: aflags_t) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_nalt.is_aflag_zstroff(flags: aflags_t) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_nalt.is_aflag_\_bnot0(flags: aflags_t) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_nalt.is_aflag_\_bnot1(flags: aflags_t) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_nalt.is_aflag_libitem(flags: aflags_t) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_nalt.has_aflag_ti(flags: aflags_t) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_nalt.has_aflag_ti0(flags: aflags_t) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_nalt.has_aflag_ti1(flags: aflags_t) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_nalt.has_aflag_lname(flags: aflags_t) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_nalt.is_aflag_tilcmt(flags: aflags_t) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_nalt.is_aflag_lzero0(flags: aflags_t) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_nalt.is_aflag_lzero1(flags: aflags_t) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_nalt.is_aflag_colored_item(flags: aflags_t) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_nalt.is_aflag_terse_struc(flags: aflags_t) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_nalt.is_aflag_\_invsign0(flags: aflags_t) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_nalt.is_aflag_\_invsign1(flags: aflags_t) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_nalt.is_aflag_noret(flags: aflags_t) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_nalt.is_aflag_fixed_spd(flags: aflags_t) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_nalt.is_aflag_align_flow(flags: aflags_t) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_nalt.is_aflag_userti(flags: aflags_t) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_nalt.is_aflag_retfp(flags: aflags_t) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_nalt.uses_aflag_modsp(flags: aflags_t) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_nalt.is_aflag_notcode(flags: aflags_t) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_nalt.is_aflag_notproc(flags: aflags_t) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_nalt.is_aflag_type_guessed_by_ida(flags: aflags_t) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_nalt.is_aflag_func_guessed_by_hexrays(flags: aflags_t) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_nalt.is_aflag_data_guessed_by_hexrays(flags: aflags_t) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_nalt.is_aflag_type_determined_by_hexrays(flags: aflags_t) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_nalt.is_aflag_type_guessed_by_hexrays(flags: aflags_t) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_nalt.is_hidden_item(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_nalt.hide_item(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) ### ida_nalt.unhide_item(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) ### ida_nalt.is_hidden_border(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_nalt.hide_border(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) ### ida_nalt.unhide_border(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) ### ida_nalt.uses_modsp(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_nalt.set_usemodsp(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) ### ida_nalt.clr_usemodsp(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) ### ida_nalt.is_zstroff(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_nalt.set_zstroff(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) ### ida_nalt.clr_zstroff(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) ### ida_nalt.is_\_bnot0(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_nalt.set_\_bnot0(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) ### ida_nalt.clr_\_bnot0(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) ### ida_nalt.is_\_bnot1(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_nalt.set_\_bnot1(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) ### ida_nalt.clr_\_bnot1(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) ### ida_nalt.is_libitem(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_nalt.set_libitem(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) ### ida_nalt.clr_libitem(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) ### ida_nalt.has_ti(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_nalt.set_has_ti(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) ### ida_nalt.clr_has_ti(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) ### ida_nalt.has_ti0(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_nalt.set_has_ti0(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) ### ida_nalt.clr_has_ti0(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) ### ida_nalt.has_ti1(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_nalt.set_has_ti1(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) ### ida_nalt.clr_has_ti1(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) ### ida_nalt.has_lname(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_nalt.set_has_lname(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) ### ida_nalt.clr_has_lname(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) ### ida_nalt.is_tilcmt(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_nalt.set_tilcmt(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) ### ida_nalt.clr_tilcmt(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) ### ida_nalt.is_usersp(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_nalt.set_usersp(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) ### ida_nalt.clr_usersp(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) ### ida_nalt.is_lzero0(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_nalt.set_lzero0(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) ### ida_nalt.clr_lzero0(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) ### ida_nalt.is_lzero1(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_nalt.set_lzero1(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) ### ida_nalt.clr_lzero1(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) ### ida_nalt.is_colored_item(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_nalt.set_colored_item(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) ### ida_nalt.clr_colored_item(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) ### ida_nalt.is_terse_struc(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_nalt.set_terse_struc(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) ### ida_nalt.clr_terse_struc(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) ### ida_nalt.is_\_invsign0(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_nalt.set_\_invsign0(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) ### ida_nalt.clr_\_invsign0(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) ### ida_nalt.is_\_invsign1(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_nalt.set_\_invsign1(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) ### ida_nalt.clr_\_invsign1(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) ### ida_nalt.is_noret(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_nalt.set_noret(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) ### ida_nalt.clr_noret(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) ### ida_nalt.is_fixed_spd(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_nalt.set_fixed_spd(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) ### ida_nalt.clr_fixed_spd(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) ### ida_nalt.is_align_flow(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_nalt.set_align_flow(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) ### ida_nalt.clr_align_flow(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) ### ida_nalt.is_userti(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_nalt.set_userti(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) ### ida_nalt.clr_userti(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) ### ida_nalt.is_retfp(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_nalt.set_retfp(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) ### ida_nalt.clr_retfp(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) ### ida_nalt.is_notproc(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_nalt.set_notproc(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) ### ida_nalt.clr_notproc(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) ### ida_nalt.is_type_guessed_by_ida(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_nalt.is_func_guessed_by_hexrays(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_nalt.is_data_guessed_by_hexrays(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_nalt.is_type_determined_by_hexrays(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_nalt.is_type_guessed_by_hexrays(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_nalt.set_type_guessed_by_ida(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) ### ida_nalt.set_func_guessed_by_hexrays(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) ### ida_nalt.set_data_guessed_by_hexrays(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) ### ida_nalt.set_type_determined_by_hexrays(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) ### ida_nalt.set_notcode(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) Mark address so that it cannot be converted to instruction. ### ida_nalt.clr_notcode(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) Clear not-code mark. ### ida_nalt.is_notcode(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Is the address marked as not-code? ### ida_nalt.set_visible_item(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), visible: [bool](https://docs.python.org/3/library/functions.html#bool)) → [None](https://docs.python.org/3/library/constants.html#None) Change visibility of item at given ea. ### ida_nalt.is_visible_item(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Test visibility of item at given ea. ### ida_nalt.is_finally_visible_item(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Is instruction visible? ### ida_nalt.set_source_linnum(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), lnnum: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) ### ida_nalt.get_source_linnum(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [int](https://docs.python.org/3/library/functions.html#int) ### ida_nalt.del_source_linnum(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) ### ida_nalt.get_absbase(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) ### ida_nalt.set_absbase(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), x: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) ### ida_nalt.del_absbase(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) ### ida_nalt.get_ind_purged(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) ### ida_nalt.del_ind_purged(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) ### ida_nalt.get_str_type(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [int](https://docs.python.org/3/library/functions.html#int) ### ida_nalt.set_str_type(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), x: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) ### ida_nalt.del_str_type(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) ### ida_nalt.STRWIDTH_1B ### ida_nalt.STRWIDTH_2B ### ida_nalt.STRWIDTH_4B ### ida_nalt.STRWIDTH_MASK ### ida_nalt.STRLYT_TERMCHR ### ida_nalt.STRLYT_PASCAL1 ### ida_nalt.STRLYT_PASCAL2 ### ida_nalt.STRLYT_PASCAL4 ### ida_nalt.STRLYT_DECOMP ### ida_nalt.STRLYT_MASK ### ida_nalt.STRLYT_SHIFT ### ida_nalt.STRTYPE_TERMCHR Character-terminated string. The termination characters are kept in the next bytes of string type. ### ida_nalt.STRTYPE_C C-style string. ### ida_nalt.STRTYPE_C_16 Zero-terminated 16-bit chars. ### ida_nalt.STRTYPE_C_32 Zero-terminated 32-bit chars. ### ida_nalt.STRTYPE_PASCAL Pascal-style, one-byte length prefix. ### ida_nalt.STRTYPE_PASCAL_16 Pascal-style, 16-bit chars, one-byte length prefix. ### ida_nalt.STRTYPE_PASCAL_32 Pascal-style, 32-bit chars, one-byte length prefix. ### ida_nalt.STRTYPE_LEN2 Pascal-style, two-byte length prefix. ### ida_nalt.STRTYPE_LEN2_16 Pascal-style, 16-bit chars, two-byte length prefix. ### ida_nalt.STRTYPE_LEN2_32 Pascal-style, 32-bit chars, two-byte length prefix. ### ida_nalt.STRTYPE_LEN4 Pascal-style, four-byte length prefix. ### ida_nalt.STRTYPE_LEN4_16 Pascal-style, 16-bit chars, four-byte length prefix. ### ida_nalt.STRTYPE_LEN4_32 Pascal-style, 32-bit chars, four-byte length prefix. ### ida_nalt.STRTYPE_DECOMP Synthetic, decompiler generated string (0x10). ### ida_nalt.get_str_type_code(strtype: [int](https://docs.python.org/3/library/functions.html#int)) → uchar ### ida_nalt.get_str_term1(strtype: [int](https://docs.python.org/3/library/functions.html#int)) → char ### ida_nalt.get_str_term2(strtype: [int](https://docs.python.org/3/library/functions.html#int)) → char ### ida_nalt.get_str_encoding_idx(strtype: [int](https://docs.python.org/3/library/functions.html#int)) → uchar ### ida_nalt.set_str_encoding_idx(strtype: [int](https://docs.python.org/3/library/functions.html#int), encoding_idx: [int](https://docs.python.org/3/library/functions.html#int)) → [int](https://docs.python.org/3/library/functions.html#int) ### ida_nalt.make_str_type(type_code: uchar, encoding_idx: [int](https://docs.python.org/3/library/functions.html#int), term1: uchar = 0, term2: uchar = 0) → [int](https://docs.python.org/3/library/functions.html#int) ### ida_nalt.is_pascal(strtype: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_nalt.get_str_type_prefix_length(strtype: [int](https://docs.python.org/3/library/functions.html#int)) → [int](https://docs.python.org/3/library/functions.html#int) ### ida_nalt.STRENC_DEFAULT use default encoding for this type (see get_default_encoding_idx()) ### ida_nalt.STRENC_NONE force no-conversion encoding ### ida_nalt.get_alignment(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [int](https://docs.python.org/3/library/functions.html#int) ### ida_nalt.set_alignment(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), x: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) ### ida_nalt.del_alignment(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) ### ida_nalt.set_item_color(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), color: bgcolor_t) → [None](https://docs.python.org/3/library/constants.html#None) ### ida_nalt.get_item_color(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → bgcolor_t ### ida_nalt.del_item_color(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### *class* ida_nalt.array_parameters_t(\_f: [int](https://docs.python.org/3/library/functions.html#int) = 1, \_l: [int](https://docs.python.org/3/library/functions.html#int) = 0, \_a: [int](https://docs.python.org/3/library/functions.html#int) = -1) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### flags *: [int](https://docs.python.org/3/library/functions.html#int)* #### lineitems *: [int](https://docs.python.org/3/library/functions.html#int)* number of items on a line #### alignment *: [int](https://docs.python.org/3/library/functions.html#int)* -1 - don’t align. 0 - align automatically. else item width #### is_default() → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_nalt.AP_ALLOWDUPS use ‘dup’ construct ### ida_nalt.AP_SIGNED treat numbers as signed ### ida_nalt.AP_INDEX display array element indexes as comments ### ida_nalt.AP_ARRAY create as array (this flag is not stored in database) ### ida_nalt.AP_IDXBASEMASK mask for number base of the indexes ### ida_nalt.AP_IDXDEC display indexes in decimal ### ida_nalt.AP_IDXHEX display indexes in hex ### ida_nalt.AP_IDXOCT display indexes in octal ### ida_nalt.AP_IDXBIN display indexes in binary ### ida_nalt.get_array_parameters(out: [array_parameters_t](#ida_nalt.array_parameters_t), ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → ssize_t ### ida_nalt.set_array_parameters(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), \_in: [array_parameters_t](#ida_nalt.array_parameters_t)) → [None](https://docs.python.org/3/library/constants.html#None) ### ida_nalt.del_array_parameters(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) ### *class* ida_nalt.switch_info_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### flags *: [int](https://docs.python.org/3/library/functions.html#int)* Switch info flags #### get_shift() → [int](https://docs.python.org/3/library/functions.html#int) See SWI_SHIFT_MASK. possible answers: 0..3. #### set_shift(shift: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) See SWI_SHIFT_MASK. #### get_jtable_element_size() → [int](https://docs.python.org/3/library/functions.html#int) #### set_jtable_element_size(size: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### get_vtable_element_size() → [int](https://docs.python.org/3/library/functions.html#int) #### set_vtable_element_size(size: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### has_default() → [bool](https://docs.python.org/3/library/functions.html#bool) #### has_elbase() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_sparse() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_custom() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_indirect() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_subtract() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_nolowcase() → [bool](https://docs.python.org/3/library/functions.html#bool) #### use_std_table() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_user_defined() → [bool](https://docs.python.org/3/library/functions.html#bool) #### ncases *: ushort* number of cases (excluding default) #### jumps *: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)* jump table start address #### values *: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)* values table address (if SWI_SPARSE is set) #### lowcase *: [int](https://docs.python.org/3/library/functions.html#int)* the lowest value in cases #### defjump *: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)* default jump address (BADADDR if no default case) #### startea *: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)* start of the switch idiom #### jcases *: [int](https://docs.python.org/3/library/functions.html#int)* number of entries in the jump table (SWI_INDIRECT) #### ind_lowcase *: [int](https://docs.python.org/3/library/functions.html#int)* #### get_lowcase() → [int](https://docs.python.org/3/library/functions.html#int) #### elbase *: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)* element base #### regnum *: [int](https://docs.python.org/3/library/functions.html#int)* the switch expression as a value of the REGNUM register before the instruction at EXPR_EA. -1 means ‘unknown’ #### regdtype *: op_dtype_t* size of the switch expression register as dtype #### get_jtable_size() → [int](https://docs.python.org/3/library/functions.html#int) #### set_jtable_size(size: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### set_elbase(base: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### set_expr(r: [int](https://docs.python.org/3/library/functions.html#int), dt: op_dtype_t) → [None](https://docs.python.org/3/library/constants.html#None) #### get_jrange_vrange(jrange: [range_t](../ida_range/index.md#ida_range.range_t) = None, vrange: [range_t](../ida_range/index.md#ida_range.range_t) = None) → [bool](https://docs.python.org/3/library/functions.html#bool) get separate parts of the switch #### custom *: [int](https://docs.python.org/3/library/functions.html#int)* information for custom tables (filled and used by modules) #### SWITCH_INFO_VERSION #### get_version() → [int](https://docs.python.org/3/library/functions.html#int) #### expr_ea *: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)* the address before that the switch expression is in REGNUM. If BADADDR, then the first insn marked as IM_SWITCH after STARTEA is used. #### marks *: eavec_t* the insns marked as IM_SWITCH. They are used to delete the switch. #### clear() → [None](https://docs.python.org/3/library/constants.html#None) #### assign(other: [switch_info_t](#ida_nalt.switch_info_t)) → [None](https://docs.python.org/3/library/constants.html#None) ### ida_nalt.SWI_SPARSE sparse switch (value table present), otherwise lowcase present ### ida_nalt.SWI_V32 32-bit values in table ### ida_nalt.SWI_J32 32-bit jump offsets ### ida_nalt.SWI_VSPLIT value table is split (only for 32-bit values) ### ida_nalt.SWI_USER user specified switch (starting from version 2) ### ida_nalt.SWI_DEF_IN_TBL default case is an entry in the jump table. This flag is applicable in 2 cases: \* The sparse indirect switch (i.e. a switch with a values table) {jump table size} == {value table size} + 1. The default case entry is the last one in the table (or the first one in the case of an inversed jump table). \* The switch with insns in the jump table. The default case entry is before the first entry of the table. > See also the find_defjump_from_table() helper function. ### ida_nalt.SWI_JMP_INV jumptable is inversed. (last entry is for first entry in values table) ### ida_nalt.SWI_SHIFT_MASK use formula (element<* import ordinals (may be empty) #### mod_index *: [int](https://docs.python.org/3/library/functions.html#int)* module ### ida_nalt.get_import_entry(entry: [import_entry_t](#ida_nalt.import_entry_t), ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_nalt.GOTEA_NODE_NAME node containing address of .got section ### ida_nalt.GOTEA_NODE_IDX ### ida_nalt.set_gotea(gotea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) ### ida_nalt.get_gotea() → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) ### ida_nalt.get_import_module_name(mod_index) Returns the name of an imported module given its index * **Parameters:** **mod_index** – the module index * **Returns:** None or the module name ### ida_nalt.enum_import_names(mod_index, callback) Enumerate imports from a specific module. Please refer to list_imports.py example. * **Parameters:** * **mod_index** – The module index * **callback** – A callable object that will be invoked with an ea, name (could be None) and ordinal. * **Returns:** 1-finished ok, -1 on error, otherwise callback return value (<=0) ### ida_nalt.switch_info_t_\_from_ptrval_\_(ptrval: [int](https://docs.python.org/3/library/functions.html#int)) → switch_info_t \* ### ida_nalt.get_switch_info(\*args) ### ida_nalt.get_abi_name() ### ida_nalt.get_initial_version ### ida_nalt.REFINFO_NO_ZEROS deprecated alias for REFINFO_IGNZERO # index.html.md # vds_xrefs summary: show decompiler cross-references description: : Show decompiler-style Xref when the Ctrl+X key is pressed in the Decompiler window.
* supports any global name: functions, strings, integers, … * supports structure member. author: ``` EiNSTeiN_ ``` ([einstein@g3nius.org](mailto:einstein@g3nius.org)) level: advanced ## Attributes | [`XREF_EA`](#vds_xrefs.XREF_EA) | | |-----------------------------------------------------|----| | [`XREF_STRUC_MEMBER`](#vds_xrefs.XREF_STRUC_MEMBER) | | | [`adesc`](#vds_xrefs.adesc) | | ## Classes | [`XrefsForm`](#vds_xrefs.XrefsForm) | PluginForm class. | |-----------------------------------------------------|---------------------| | [`show_xrefs_ah_t`](#vds_xrefs.show_xrefs_ah_t) | | | [`vds_xrefs_hooks_t`](#vds_xrefs.vds_xrefs_hooks_t) | | ## Module Contents ### vds_xrefs.XREF_EA *= 0* ### vds_xrefs.XREF_STRUC_MEMBER *= 1* ### *class* vds_xrefs.XrefsForm(target) Bases: [`ida_kernwin.PluginForm`](../ida_kernwin/index.md#ida_kernwin.PluginForm) PluginForm class. This form can be used to host additional controls. Please check the PyQt example. #### target #### get_struc_name() #### OnCreate(widget) This event is called when the plugin form is created. The programmer should populate the form when this event is triggered. * **Returns:** None #### Show() Creates the form if not was not created or brings to front if it was already created * **Parameters:** * **caption** – The form caption * **options** – One of ``` PluginForm.WOPN_ ``` constants #### populate_form() #### double_clicked(row, column) #### get_decompiled_line(cfunc, ea) #### get_items_for_ea(ea) #### get_items_for_type() #### populate_table() #### OnClose(widget) Called when the plugin form is closed * **Returns:** None ### *class* vds_xrefs.show_xrefs_ah_t Bases: [`ida_kernwin.action_handler_t`](../ida_kernwin/index.md#ida_kernwin.action_handler_t) #### sel *= None* #### activate(ctx) Activate an action. This function implements the core behavior of an action. It is called when the action is triggered, from a menu, from a popup menu, from the toolbar, or programmatically. * **Returns:** non-zero: all IDA windows will be refreshed #### update(ctx) Update an action. This is called when the context of the UI changed, and we need to let the action update some of its properties if needed (label, icon, …) In addition, this lets IDA know whether the action is enabled, and when it should be queried for availability again. Note: This callback is not meant to change anything in the application’s state, except by calling one (or many) of the “update_action_\*()” functions on this very action. ### *class* vds_xrefs.vds_xrefs_hooks_t(\_flags: [int](https://docs.python.org/3/library/functions.html#int) = 0, \_hkcb_flags: [int](https://docs.python.org/3/library/functions.html#int) = 1) Bases: [`ida_hexrays.Hexrays_Hooks`](../ida_hexrays/index.md#ida_hexrays.Hexrays_Hooks) #### populating_popup(widget, phandle, vu) Populating popup menu. We can add menu items now. * **Parameters:** * **widget** – (TWidget ``` * ``` ) * **popup_handle** – (TPopupMenu ``` * ``` ) * **vu** – (vdui_t ``` * ``` ) ### vds_xrefs.adesc # index.html.md # trigger_actions_programmatically summary: trigger actions programmatically description: : It’s possible to invoke any action programmatically, by using either of those two:
> * ida_kernwin.execute_ui_requests() > * ida_kernwin.process_ui_action()
Ideally, this script should be run through the “File > Script file…” menu, so as to keep focus on “IDA View-A” and have the ‘ProcessUiActions’ part work as intended. keywords: actions level: intermediate ## Classes | [`print_req_t`](#trigger_actions_programmatically.print_req_t) | | |------------------------------------------------------------------|----| ## Functions | [`ProcessUiActions`](#trigger_actions_programmatically.ProcessUiActions)(actions[, flags]) | | |----------------------------------------------------------------------------------------------|----| ## Module Contents ### trigger_actions_programmatically.ProcessUiActions(actions, flags=0) * **Parameters:** * **actions** – A string containing a list of actions separated by semicolon, a list or a tuple * **flags** – flags to be passed to process_ui_action() * **Returns:** Boolean. Returns False if the action list was empty or execute_ui_requests() failed. ### *class* trigger_actions_programmatically.print_req_t(s) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### s # index.html.md # assemble summary: implement assembly of instructions description: : We add support for assembling the following pseudo instructions:
* “zero eax” -> xor eax, eax * “nothing” -> nop level: intermediate ## Attributes | [`idp_hook_stat`](#assemble.idp_hook_stat) | | |----------------------------------------------|----| ## Classes | [`assemble_idp_hook_t`](#assemble.assemble_idp_hook_t) | | |----------------------------------------------------------|----| ## Module Contents ### *class* assemble.assemble_idp_hook_t(\_flags: [int](https://docs.python.org/3/library/functions.html#int) = 0, \_hkcb_flags: [int](https://docs.python.org/3/library/functions.html#int) = 1) Bases: [`ida_idp.IDP_Hooks`](../ida_idp/index.md#ida_idp.IDP_Hooks) #### ev_assemble(ea, cs, ip, use32, line) Assemble an instruction. (display a warning if an error occurs). * **Parameters:** * **ea** – (ea_t) linear address of instruction * **cs** – (ea_t) cs of instruction * **ip** – (ea_t) ip of instruction * **use32** – (bool) is 32-bit segment? * **line** – (const char ``` * ``` ) line to assemble * **Returns:** bin: (uchar ``` * ``` ) pointer to output opcode buffer ### assemble.idp_hook_stat *= 'un'* # index.html.md # log_misc_events summary: react to UI events/notifications description: : hooks to be notified about certain UI events, and dump their information to the “Output” window level: intermediate ## Attributes | [`ui_hook_stat`](#log_misc_events.ui_hook_stat) | | |---------------------------------------------------|----| ## Classes | [`MyUiHook`](#log_misc_events.MyUiHook) | | |-------------------------------------------|----| ## Module Contents ### *class* log_misc_events.MyUiHook Bases: [`ida_kernwin.UI_Hooks`](../ida_kernwin/index.md#ida_kernwin.UI_Hooks) #### cmdname *= ''* #### inhibit_log *= 0* #### preprocess_action(name) ida ui is about to handle a user action. * **Parameters:** **name** – (const char ``` * ``` ) ui action name. these names can be looked up in ida[tg]ui.cfg * **Returns:** 0: ok * **Returns:** nonzero: a plugin has handled the command #### postprocess_action() an ida ui action has been handled #### saving() The kernel is saving the database. * **Returns:** Ignored #### saved() The kernel has saved the database. * **Returns:** Ignored #### term() IDA is terminated and the database is already closed. The UI may close its windows in this callback. This callback is best used within the context of a plugin_t with PLUGIN_FIX flags #### get_ea_hint(ea) The UI wants to display a simple hint for an address in the navigation band * **Parameters:** **ea** – The address * **Returns:** String with the hint or None #### populating_widget_popup(widget, popup, ctx) The UI is currently populating the widget popup. Now is a good time to attach actions. #### finish_populating_widget_popup(widget, popup, ctx) The UI is done populating the widget popup. Now is the last chance to attach actions. #### range() The disassembly range has been changed ( idainfo::min_ea … idainfo::max_ea). UI should redraw the scrollbars. See also: ui_lock_range_refresh * **Returns:** void #### idcstart() Start of IDC engine work. * **Returns:** void #### idcstop() Stop of IDC engine work. * **Returns:** void #### suspend() Suspend graphical interface. Only the text version. Interface should respond to it. * **Returns:** void #### resume() Resume the suspended graphical interface. Only the text version. Interface should respond to it * **Returns:** void #### debugger_menu_change(enable) debugger menu modification detected * **Parameters:** **enable** – (bool) true: debugger menu has been added, or a different debugger has been selected false: debugger menu will be removed (user switched to “No debugger”) * **Returns:** void #### widget_visible(widget) TWidget is displayed on the screen. Use this event to populate the window with controls * **Parameters:** **widget** – (TWidget ``` * ``` ) * **Returns:** void #### widget_closing(widget) TWidget is about to close. This event precedes ui_widget_invisible. Use this to perform some possible actions relevant to the lifecycle of this widget * **Parameters:** **widget** – (TWidget ``` * ``` ) * **Returns:** void #### widget_invisible(widget) TWidget is being closed. Use this event to destroy the window controls * **Parameters:** **widget** – (TWidget ``` * ``` ) * **Returns:** void #### get_item_hint(ea, max_lines) ui wants to display multiline hint for an item. See also more generic ui_get_custom_viewer_hint * **Parameters:** * **ea** – (ea_t) or item id like a structure or enum member * **max_lines** – (int) maximal number of lines * **Returns:** hint: (qstring ``` * ``` ) the output string; important_lines: (int ``` * ``` ) number of important lines. if zero, output is ignored #### get_custom_viewer_hint(viewer, place) ui wants to display a hint for a viewer (idaview or custom). Every subscriber is supposed to append the hint lines to HINT and increment IMPORTANT_LINES accordingly. Completely overwriting the existing lines in HINT is possible but not recommended. If the REG_HINTS_MARKER sequence is found in the returned hints string, it will be replaced with the contents of the “regular” hints. If the SRCDBG_HINTS_MARKER sequence is found in the returned hints string, it will be replaced with the contents of the source-level debugger-generated hints. The following keywords might appear at the beginning of the returned hints: HIGHLIGHT text : where text will be highlighted CAPTION caption caption for the hint widget * **Parameters:** * **viewer** – (TWidget\*) viewer * **place** – (place_t ``` * ``` ) current position in the viewer * **Returns:** hint: (qstring ``` * ``` ) the output string, on input contains hints from the previous subscribers; important_lines: (int ``` * ``` ) number of important lines, should be incremented, if zero, the result is ignored #### about_to_exit() IDA is exiting. QApplication is still alive but is about to be destroyed. Last chance to perform cleanup that needs both the UI runtime and the scripting runtime (e.g., IDAPython) to still be usable. Unlike ui_database_closed, this fires only at exit, not on every database close. Unlike qatexit() handlers, which fire after PLUGIN_FIX plugins have been unloaded, this fires while those plugins are still fully operational. * **Returns:** void #### database_inited(is_new_database, idc_script) database initialization has completed. the kernel is about to run idc scripts * **Parameters:** * **is_new_database** – (int) * **idc_script** – (const char ``` * ``` ) - may be nullptr * **Returns:** void See also ui_initing_database. This event is called for both new and old databases. #### ready_to_run() all UI elements have been initialized. Automatic plugins may hook to this event to perform their tasks. * **Returns:** void #### get_chooser_item_attrs(chooser, n, attrs) get item-specific attributes for a chooser. This callback is generated only after enable_chooser_item_attrs() * **Parameters:** * **chooser** – (const chooser_base_t ``` * ``` ) * **n** – (::size_t) * **attrs** – (chooser_item_attrs_t ``` * ``` ) * **Returns:** void #### updating_actions(ctx) IDA is about to update all actions. If your plugin needs to perform expensive operations more than once (e.g., once per action it registers), you should do them only once, right away. * **Parameters:** **ctx** – (action_update_ctx_t ``` * ``` ) * **Returns:** void #### updated_actions() IDA is done updating actions. * **Returns:** void #### plugin_loaded(plugin_info) The plugin was loaded in memory. * **Parameters:** **plugin_info** – (const plugin_info_t ``` * ``` ) #### plugin_unloading(plugin_info) The plugin is about to be unloaded * **Parameters:** **plugin_info** – (const plugin_info_t ``` * ``` ) #### current_widget_changed(widget, prev_widget) The currently-active TWidget changed. * **Parameters:** * **widget** – (TWidget ``` * ``` ) * **prev_widget** – (TWidget ``` * ``` ) * **Returns:** void #### screen_ea_changed(ea, prev_ea) The “current address” changed * **Parameters:** * **ea** – (ea_t) * **prev_ea** – (ea_t) * **Returns:** void #### create_desktop_widget(title, cfg) create a widget, to be placed in the widget tree (at desktop-creation time.) * **Parameters:** * **title** – (const char ``` * ``` ) * **cfg** – (const jobj_t ``` * ``` ) * **Returns:** TWidget \* the created widget, or null #### get_lines_rendering_info(out, widget, info) get lines rendering information * **Parameters:** * **out** – (lines_rendering_output_t ``` * ``` ) * **widget** – (const TWidget ``` * ``` ) * **info** – (const lines_rendering_input_t ``` * ``` ) * **Returns:** void #### get_widget_config(widget, cfg) retrieve the widget configuration (it will be passed back at ui_create_desktop_widget-, and ui_set_widget_config-time) * **Parameters:** * **widget** – (const TWidget ``` * ``` ) * **cfg** – (jobj_t ``` * ``` ) * **Returns:** void #### set_widget_config(widget, cfg) set the widget configuration * **Parameters:** * **widget** – (const TWidget ``` * ``` ) * **cfg** – (const jobj_t ``` * ``` ) * **Returns:** void #### initing_database() database initialization has started. * **Returns:** void See also ui_database_inited. This event is called for both new and old databases. #### destroying_procmod(procmod) The processor module is about to be destroyed * **Parameters:** **procmod** – (const procmod_t ``` * ``` ) #### destroying_plugmod(plugmod, entry) The plugin object is about to be destroyed * **Parameters:** * **plugmod** – (const plugmod_t ``` * ``` ) * **entry** – (const plugin_t ``` * ``` ) #### desktop_applied(name, from_idb, type) a desktop has been applied * **Parameters:** * **name** – (const char ``` * ``` ) the desktop name * **from_idb** – (bool) the desktop was stored in the IDB (false if it comes from the registry) * **type** – (int) the desktop type (1-disassembly, 2-debugger, 3-merge) ### log_misc_events.ui_hook_stat *= 'un'* # index.html.md # ida_name Functions that deal with names. A non-tail address of the program may have a name. Tail addresses (i.e. the addresses in the middle of an instruction or data item) cannot have names. ## Attributes | [`MAXNAMELEN`](#ida_name.MAXNAMELEN) | Maximum length of a name in IDA (with the trailing zero). | |----------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [`FUNC_IMPORT_PREFIX`](#ida_name.FUNC_IMPORT_PREFIX) | Name prefix used by IDA for the imported functions. | | [`SN_CHECK`](#ida_name.SN_CHECK) | Fail if the name contains invalid characters. | | [`SN_NOCHECK`](#ida_name.SN_NOCHECK) | Replace invalid characters silently. If this bit is set, all invalid chars (not in NameChars or MangleChars) will be replaced by '_' List of valid characters is defined in ida.cfg | | [`SN_PUBLIC`](#ida_name.SN_PUBLIC) | if set, make name public | | [`SN_NON_PUBLIC`](#ida_name.SN_NON_PUBLIC) | if set, make name non-public | | [`SN_WEAK`](#ida_name.SN_WEAK) | if set, make name weak | | [`SN_NON_WEAK`](#ida_name.SN_NON_WEAK) | if set, make name non-weak | | [`SN_AUTO`](#ida_name.SN_AUTO) | if set, make name autogenerated | | [`SN_NON_AUTO`](#ida_name.SN_NON_AUTO) | if set, make name non-autogenerated | | [`SN_NOLIST`](#ida_name.SN_NOLIST) | if set, exclude name from the list. if not set, then include the name into the list (however, if other bits are set, the name might be immediately excluded from the list). | | [`SN_NOWARN`](#ida_name.SN_NOWARN) | don't display a warning if failed | | [`SN_LOCAL`](#ida_name.SN_LOCAL) | create local name. a function should exist. local names can't be public or weak. also they are not included into the list of names they can't have dummy prefixes. | | [`SN_IDBENC`](#ida_name.SN_IDBENC) | the name is given in the IDB encoding; non-ASCII bytes will be decoded accordingly. Specifying SN_IDBENC also implies SN_NODUMMY | | [`SN_FORCE`](#ida_name.SN_FORCE) | if the specified name is already present in the database, try variations with a numerical suffix like "_123" | | [`SN_NODUMMY`](#ida_name.SN_NODUMMY) | automatically prepend the name with '_' if it begins with a dummy suffix such as '

```
sub_
```

'. See also SN_IDBENC | | [`SN_DELTAIL`](#ida_name.SN_DELTAIL) | if name cannot be set because of a tail byte, delete the hindering item | | [`SN_MULTI`](#ida_name.SN_MULTI) | if the specified address already has a name, then add the new name as a regular comment "Alternative name is ...". Except when the new name is public and the old one is not or when the old name is weak and the new one is not. In these cases we act as if bit SN_MULTI_FORCE is specified. If the new name only slightly differs from the old one, for example, only by the initial underscore or the artificial suffix '_##', then we ignore it. | | [`SN_MULTI_FORCE`](#ida_name.SN_MULTI_FORCE) | if the specified address already has a name, put this old name into a regular comment and set the specified name. This bit may be used only with SN_MULTI. | | [`UCDR_STRLIT`](#ida_name.UCDR_STRLIT) | string literals | | [`UCDR_NAME`](#ida_name.UCDR_NAME) | regular (unmangled) names | | [`UCDR_MANGLED`](#ida_name.UCDR_MANGLED) | mangled names | | [`UCDR_TYPE`](#ida_name.UCDR_TYPE) | type names | | [`VNT_IDENT`](#ida_name.VNT_IDENT) | identifier (e.g., function name) | | [`VNT_TYPE`](#ida_name.VNT_TYPE) | type name (can contain '<', '>', ...) | | [`VNT_UDTMEM`](#ida_name.VNT_UDTMEM) | UDT (structure, union, enum) member. | | [`VNT_STRLIT`](#ida_name.VNT_STRLIT) | string literal | | [`VNT_VISIBLE`](#ida_name.VNT_VISIBLE) | visible cp (obsolete; will be deleted) | | [`NT_NONE`](#ida_name.NT_NONE) | name doesn't exist or has no value | | [`NT_BYTE`](#ida_name.NT_BYTE) | name is byte name (regular name) | | [`NT_LOCAL`](#ida_name.NT_LOCAL) | name is local label | | [`NT_STKVAR`](#ida_name.NT_STKVAR) | name is stack variable name | | [`NT_ENUM`](#ida_name.NT_ENUM) | name is symbolic constant | | [`NT_ABS`](#ida_name.NT_ABS) | name is absolute symbol (SEG_ABSSYM) | | [`NT_SEG`](#ida_name.NT_SEG) | name is segment or segment register name | | [`NT_STROFF`](#ida_name.NT_STROFF) | name is structure member | | [`NT_BMASK`](#ida_name.NT_BMASK) | name is a bit group mask name | | [`NT_REGVAR`](#ida_name.NT_REGVAR) | name is a renamed register (

```
*
```

value is idx into pfn->regvars) | | [`GN_VISIBLE`](#ida_name.GN_VISIBLE) | replace forbidden characters by SUBSTCHAR | | [`GN_COLORED`](#ida_name.GN_COLORED) | return colored name | | [`GN_DEMANGLED`](#ida_name.GN_DEMANGLED) | return demangled name | | [`GN_STRICT`](#ida_name.GN_STRICT) | fail if cannot demangle | | [`GN_SHORT`](#ida_name.GN_SHORT) | use short form of demangled name | | [`GN_LONG`](#ida_name.GN_LONG) | use long form of demangled name | | [`GN_LOCAL`](#ida_name.GN_LOCAL) | try to get local name first; if failed, get global | | [`GN_ISRET`](#ida_name.GN_ISRET) | for dummy names: use retloc | | [`GN_NOT_ISRET`](#ida_name.GN_NOT_ISRET) | for dummy names: do not use retloc | | [`GN_NOT_DUMMY`](#ida_name.GN_NOT_DUMMY) | do not return a dummy name | | [`GETN_APPZERO`](#ida_name.GETN_APPZERO) | meaningful only if the name refers to a structure. append a struct field name if the field offset is zero? | | [`GETN_NOFIXUP`](#ida_name.GETN_NOFIXUP) | ignore the fixup information when producing the name | | [`GETN_NODUMMY`](#ida_name.GETN_NODUMMY) | do not create a new dummy name but pretend it exists | | [`GNCN_NOSEG`](#ida_name.GNCN_NOSEG) | ignore the segment prefix when producing the name | | [`GNCN_NOCOLOR`](#ida_name.GNCN_NOCOLOR) | generate an uncolored name | | [`GNCN_NOLABEL`](#ida_name.GNCN_NOLABEL) | don't generate labels | | [`GNCN_NOFUNC`](#ida_name.GNCN_NOFUNC) | don't generate funcname+... expressions | | [`GNCN_SEG_FUNC`](#ida_name.GNCN_SEG_FUNC) | generate both segment and function names (default is to omit segment name if a function name is present) | | [`GNCN_SEGNUM`](#ida_name.GNCN_SEGNUM) | segment part is displayed as a hex number | | [`GNCN_REQFUNC`](#ida_name.GNCN_REQFUNC) | return 0 if the address does not belong to a function | | [`GNCN_REQNAME`](#ida_name.GNCN_REQNAME) | return 0 if the address can only be represented as a hex number | | [`GNCN_NODBGNM`](#ida_name.GNCN_NODBGNM) | don't use debug names | | [`GNCN_PREFDBG`](#ida_name.GNCN_PREFDBG) | if using debug names, prefer debug names over function names | | [`DEBNAME_EXACT`](#ida_name.DEBNAME_EXACT) | find a name at exactly the specified address | | [`DEBNAME_LOWER`](#ida_name.DEBNAME_LOWER) | find a name with the address >= the specified address | | [`DEBNAME_UPPER`](#ida_name.DEBNAME_UPPER) | find a name with the address > the specified address | | [`DEBNAME_NICE`](#ida_name.DEBNAME_NICE) | find a name with the address <= the specified address | | [`DQT_NPURGED_8`](#ida_name.DQT_NPURGED_8) | only calculate number of purged bytes (sizeof(arg)==8) | | [`DQT_NPURGED_4`](#ida_name.DQT_NPURGED_4) | only calculate number of purged bytes (sizeof(arg)==4) | | [`DQT_NPURGED_2`](#ida_name.DQT_NPURGED_2) | only calculate number of purged bytes (sizeof(arg)==2) | | [`DQT_COMPILER`](#ida_name.DQT_COMPILER) | only detect compiler that generated the name | | [`DQT_NAME_TYPE`](#ida_name.DQT_NAME_TYPE) | only detect the name type (data/code) | | [`DQT_FULL`](#ida_name.DQT_FULL) | really demangle | | [`CN_KEEP_TRAILING_DIGITS`](#ida_name.CN_KEEP_TRAILING_DIGITS) | do not remove "_d+" at the end of name | | [`CN_KEEP_UNDERSCORES`](#ida_name.CN_KEEP_UNDERSCORES) | do not remove leading underscores. but it is ok to remove \_\_imp_. | | [`CN_REMOVE_ALL_TRAILING_DIGITS`](#ida_name.CN_REMOVE_ALL_TRAILING_DIGITS) | remove trailing \_N digits many times | | [`ME_INTERR`](#ida_name.ME_INTERR) | | | [`ME_PARAMERR`](#ida_name.ME_PARAMERR) | | | [`ME_ILLSTR`](#ida_name.ME_ILLSTR) | | | [`ME_SMALLANS`](#ida_name.ME_SMALLANS) | | | [`ME_FRAME`](#ida_name.ME_FRAME) | | | [`ME_NOCOMP`](#ida_name.ME_NOCOMP) | | | [`ME_ERRAUTO`](#ida_name.ME_ERRAUTO) | | | [`ME_NOHASHMEM`](#ida_name.ME_NOHASHMEM) | | | [`ME_NOSTRMEM`](#ida_name.ME_NOSTRMEM) | | | [`ME_NOERROR_LIMIT`](#ida_name.ME_NOERROR_LIMIT) | | | [`M_PRCMSK`](#ida_name.M_PRCMSK) | | | [`MT_DEFAULT`](#ida_name.MT_DEFAULT) | | | [`MT_CDECL`](#ida_name.MT_CDECL) | | | [`MT_PASCAL`](#ida_name.MT_PASCAL) | | | [`MT_STDCALL`](#ida_name.MT_STDCALL) | | | [`MT_FASTCALL`](#ida_name.MT_FASTCALL) | | | [`MT_THISCALL`](#ida_name.MT_THISCALL) | | | [`MT_FORTRAN`](#ida_name.MT_FORTRAN) | | | [`MT_SYSCALL`](#ida_name.MT_SYSCALL) | | | [`MT_INTERRUPT`](#ida_name.MT_INTERRUPT) | | | [`MT_MSFASTCALL`](#ida_name.MT_MSFASTCALL) | | | [`MT_CLRCALL`](#ida_name.MT_CLRCALL) | | | [`MT_DMDCALL`](#ida_name.MT_DMDCALL) | | | [`MT_VECTORCALL`](#ida_name.MT_VECTORCALL) | | | [`MT_REGCALL`](#ida_name.MT_REGCALL) | | | [`MT_LOCALNAME`](#ida_name.MT_LOCALNAME) | | | [`M_SAVEREGS`](#ida_name.M_SAVEREGS) | | | [`M_CLASS`](#ida_name.M_CLASS) | | | [`MT_PUBLIC`](#ida_name.MT_PUBLIC) | | | [`MT_PRIVATE`](#ida_name.MT_PRIVATE) | | | [`MT_PROTECT`](#ida_name.MT_PROTECT) | | | [`MT_MEMBER`](#ida_name.MT_MEMBER) | | | [`MT_VTABLE`](#ida_name.MT_VTABLE) | | | [`MT_RTTI`](#ida_name.MT_RTTI) | | | [`M_PARMSK`](#ida_name.M_PARMSK) | | | [`MT_PARSHF`](#ida_name.MT_PARSHF) | | | [`MT_PARMAX`](#ida_name.MT_PARMAX) | | | [`M_ELLIPSIS`](#ida_name.M_ELLIPSIS) | | | [`MT_VOIDARG`](#ida_name.MT_VOIDARG) | | | [`M_STATIC`](#ida_name.M_STATIC) | | | [`M_VIRTUAL`](#ida_name.M_VIRTUAL) | | | [`M_AUTOCRT`](#ida_name.M_AUTOCRT) | | | [`M_TYPMASK`](#ida_name.M_TYPMASK) | | | [`MT_OPERAT`](#ida_name.MT_OPERAT) | | | [`MT_CONSTR`](#ida_name.MT_CONSTR) | | | [`MT_DESTR`](#ida_name.MT_DESTR) | | | [`MT_CASTING`](#ida_name.MT_CASTING) | | | [`MT_CLRCDTOR`](#ida_name.MT_CLRCDTOR) | | | [`M_TRUNCATE`](#ida_name.M_TRUNCATE) | | | [`M_THUNK`](#ida_name.M_THUNK) | | | [`M_ANONNSP`](#ida_name.M_ANONNSP) | | | [`M_TMPLNAM`](#ida_name.M_TMPLNAM) | | | [`M_DBGNAME`](#ida_name.M_DBGNAME) | | | [`M_COMPILER`](#ida_name.M_COMPILER) | | | [`MT_MSCOMP`](#ida_name.MT_MSCOMP) | | | [`MT_BORLAN`](#ida_name.MT_BORLAN) | | | [`MT_WATCOM`](#ida_name.MT_WATCOM) | | | [`MT_OTHER`](#ida_name.MT_OTHER) | | | [`MT_GNU`](#ida_name.MT_GNU) | | | [`MT_GCC3`](#ida_name.MT_GCC3) | | | [`MT_VISAGE`](#ida_name.MT_VISAGE) | | | [`MNG_PTRMSK`](#ida_name.MNG_PTRMSK) | | | [`MNG_DEFNEAR`](#ida_name.MNG_DEFNEAR) | | | [`MNG_DEFNEARANY`](#ida_name.MNG_DEFNEARANY) | | | [`MNG_DEFFAR`](#ida_name.MNG_DEFFAR) | | | [`MNG_NOPTRTYP16`](#ida_name.MNG_NOPTRTYP16) | | | [`MNG_DEFHUGE`](#ida_name.MNG_DEFHUGE) | | | [`MNG_DEFPTR64`](#ida_name.MNG_DEFPTR64) | | | [`MNG_DEFNONE`](#ida_name.MNG_DEFNONE) | | | [`MNG_NOPTRTYP`](#ida_name.MNG_NOPTRTYP) | | | [`MNG_NODEFINIT`](#ida_name.MNG_NODEFINIT) | | | [`MNG_NOUNDERSCORE`](#ida_name.MNG_NOUNDERSCORE) | | | [`MNG_NOTYPE`](#ida_name.MNG_NOTYPE) | | | [`MNG_NORETTYPE`](#ida_name.MNG_NORETTYPE) | | | [`MNG_NOBASEDT`](#ida_name.MNG_NOBASEDT) | | | [`MNG_NOCALLC`](#ida_name.MNG_NOCALLC) | | | [`MNG_NOPOSTFC`](#ida_name.MNG_NOPOSTFC) | | | [`MNG_NOSCTYP`](#ida_name.MNG_NOSCTYP) | | | [`MNG_NOTHROW`](#ida_name.MNG_NOTHROW) | | | [`MNG_NOSTVIR`](#ida_name.MNG_NOSTVIR) | | | [`MNG_NOECSU`](#ida_name.MNG_NOECSU) | | | [`MNG_NOCSVOL`](#ida_name.MNG_NOCSVOL) | | | [`MNG_NOCLOSUR`](#ida_name.MNG_NOCLOSUR) | | | [`MNG_NOUNALG`](#ida_name.MNG_NOUNALG) | | | [`MNG_NOMANAGE`](#ida_name.MNG_NOMANAGE) | | | [`MNG_NOMODULE`](#ida_name.MNG_NOMODULE) | | | [`MNG_SHORT_S`](#ida_name.MNG_SHORT_S) | | | [`MNG_SHORT_U`](#ida_name.MNG_SHORT_U) | | | [`MNG_ZPT_SPACE`](#ida_name.MNG_ZPT_SPACE) | | | [`MNG_DROP_IMP`](#ida_name.MNG_DROP_IMP) | | | [`MNG_IGN_ANYWAY`](#ida_name.MNG_IGN_ANYWAY) | | | [`MNG_IGN_JMP`](#ida_name.MNG_IGN_JMP) | | | [`MNG_MOVE_JMP`](#ida_name.MNG_MOVE_JMP) | | | [`MNG_COMPILER_MSK`](#ida_name.MNG_COMPILER_MSK) | | | [`MNG_SHORT_FORM`](#ida_name.MNG_SHORT_FORM) | | | [`MNG_LONG_FORM`](#ida_name.MNG_LONG_FORM) | | | [`MNG_CALC_VALID`](#ida_name.MNG_CALC_VALID) | | | [`is_name_defined_locally`](#id0) | | | [`cvar`](#ida_name.cvar) | | | [`ignore_none`](#ida_name.ignore_none) | | | [`ignore_regvar`](#ida_name.ignore_regvar) | | | [`ignore_llabel`](#ida_name.ignore_llabel) | | | [`ignore_stkvar`](#ida_name.ignore_stkvar) | | | [`ignore_glabel`](#ida_name.ignore_glabel) | | | [`MANGLED_CODE`](#ida_name.MANGLED_CODE) | | | [`MANGLED_DATA`](#ida_name.MANGLED_DATA) | | | [`MANGLED_UNKNOWN`](#ida_name.MANGLED_UNKNOWN) | | ## Classes | [`ea_name_vec_t`](#ida_name.ea_name_vec_t) | | |----------------------------------------------|---------------------------------------------------------------------------| | [`ea_name_t`](#ida_name.ea_name_t) | | | [`NearestName`](#ida_name.NearestName) | Utility class to help find the nearest name in a given ea/name dictionary | ## Functions | [`get_name`](#ida_name.get_name)(→ str) | | |-----------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [`get_colored_name`](#ida_name.get_colored_name)(→ str) | | | [`set_name`](#ida_name.set_name)(→ bool) | Set or delete name of an item at the specified address. An item can be anything: instruction, function, data byte, word, string, structure, etc... Include name into the list of names. | | [`force_name`](#ida_name.force_name)(→ bool) | | | [`del_global_name`](#ida_name.del_global_name)(→ bool) | | | [`del_local_name`](#ida_name.del_local_name)(→ bool) | | | [`set_dummy_name`](#ida_name.set_dummy_name)(→ bool) | Give an autogenerated (dummy) name. Autogenerated names have special prefixes (

```
loc_
```

...). | | [`make_name_auto`](#ida_name.make_name_auto)(→ bool) | | | [`make_name_user`](#ida_name.make_name_user)(→ bool) | | | [`is_valid_cp`](#ida_name.is_valid_cp)(→ bool) | Is the given codepoint acceptable in the given context? | | [`set_cp_validity`](#ida_name.set_cp_validity)(→ None) | Mark the given codepoint (or range) as acceptable or unacceptable in the given context If 'endcp' is not BADCP, it is considered to be the end of the range: [cp, endcp), and is not included in the range | | [`get_cp_validity`](#ida_name.get_cp_validity)(→ bool) | Is the given codepoint (or range) acceptable in the given context? If 'endcp' is not BADCP, it is considered to be the end of the range: [cp, endcp), and is not included in the range | | [`is_ident_cp`](#ida_name.is_ident_cp)(→ bool) | Can a character appear in a name? (present in ::NameChars or ::MangleChars). | | [`is_strlit_cp`](#ida_name.is_strlit_cp)(→ bool) | Can a character appear in a string literal (present in ::StrlitChars) If 'specific_ranges' are specified, those will be used instead of the ones corresponding to the current culture (only if ::StrlitChars is configured to use the current culture) | | [`is_visible_cp`](#ida_name.is_visible_cp)(→ bool) | Can a character be displayed in a name? (present in ::NameChars). | | [`is_ident`](#ida_name.is_ident)(→ bool) | Is a valid name? (including ::MangleChars). | | [`is_uname`](#ida_name.is_uname)(→ bool) | Is valid user-specified name? (valid name & !dummy prefix). | | [`is_valid_typename`](#ida_name.is_valid_typename)(→ bool) | Is valid type name? | | [`extract_name`](#ida_name.extract_name)(→ Union[str, None]) | Extract a name or address from the specified string. | | [`hide_name`](#ida_name.hide_name)(→ None) | Remove name from the list of names | | [`show_name`](#ida_name.show_name)(→ None) | Insert name to the list of names. | | [`get_name_ea`](#ida_name.get_name_ea)(→ ida_idaapi.ea_t) | Get the address of a name. This function resolves a name into an address. It can handle regular global and local names, as well as debugger names. | | [`get_name_base_ea`](#ida_name.get_name_base_ea)(→ ida_idaapi.ea_t) | Get address of the name used in the expression for the address | | [`get_name_value`](#ida_name.get_name_value)(→ uval_t \*) | Get value of the name. This function knows about: regular names, enums, special segments, etc. | | [`get_visible_name`](#ida_name.get_visible_name)(→ str) | | | [`get_short_name`](#ida_name.get_short_name)(→ str) | | | [`get_long_name`](#ida_name.get_long_name)(→ str) | | | [`get_colored_short_name`](#ida_name.get_colored_short_name)(→ str) | | | [`get_colored_long_name`](#ida_name.get_colored_long_name)(→ str) | | | [`get_demangled_name`](#ida_name.get_demangled_name)(→ str) | | | [`get_colored_demangled_name`](#ida_name.get_colored_demangled_name)(→ str) | | | [`get_name_color`](#ida_name.get_name_color)(→ color_t) | Calculate flags for get_ea_name() function. | | [`get_name_expr`](#ida_name.get_name_expr)(→ str) | Convert address to name expression (name with a displacement). This function takes into account fixup information and returns a colored name expression (in the form +/- ). It also knows about structure members and arrays. If the specified address doesn't have a name, a dummy name is generated. | | [`get_nice_colored_name`](#ida_name.get_nice_colored_name)(→ str) | Get a nice colored name at the specified address. Ex: | | [`append_struct_fields`](#ida_name.append_struct_fields)(→ Union[str, None]) | Append names of struct fields to a name if the name is a struct name. | | [`is_public_name`](#ida_name.is_public_name)(→ bool) | | | [`make_name_public`](#ida_name.make_name_public)(→ None) | | | [`make_name_non_public`](#ida_name.make_name_non_public)(→ None) | | | [`is_weak_name`](#ida_name.is_weak_name)(→ bool) | | | [`make_name_weak`](#ida_name.make_name_weak)(→ None) | | | [`make_name_non_weak`](#ida_name.make_name_non_weak)(→ None) | | | [`get_nlist_size`](#ida_name.get_nlist_size)(→ int) | | | [`get_nlist_idx`](#ida_name.get_nlist_idx)(→ int) | | | [`is_in_nlist`](#ida_name.is_in_nlist)(→ bool) | | | [`get_nlist_ea`](#ida_name.get_nlist_ea)(→ ida_idaapi.ea_t) | | | [`get_nlist_name`](#ida_name.get_nlist_name)(→ str) | | | [`rebuild_nlist`](#ida_name.rebuild_nlist)(→ None) | | | [`reorder_dummy_names`](#ida_name.reorder_dummy_names)(→ None) | Renumber dummy names. | | [`set_debug_name`](#ida_name.set_debug_name)(→ bool) | | | [`get_debug_name`](#ida_name.get_debug_name)(→ Union[str, None]) | | | [`del_debug_names`](#ida_name.del_debug_names)(→ None) | | | [`get_debug_name_ea`](#ida_name.get_debug_name_ea)(→ ida_idaapi.ea_t) | | | [`demangle_name`](#ida_name.demangle_name)(→ str) | Demangle a name. | | [`is_name_defined_locally_ea`](#ida_name.is_name_defined_locally_ea)(→ bool) | Is the name defined locally in the specified function? | | [`is_name_defined_locally`](#id0) | | | [`cleanup_name`](#ida_name.cleanup_name)(→ str) | | | [`get_mangled_name_type`](#ida_name.get_mangled_name_type)(→ mangled_name_type_t) | | | [`get_debug_names`](#ida_name.get_debug_names)(→ PyObject \*) | | | [`get_ea_name`](#ida_name.get_ea_name)(→ str) | Get name at the specified address. | | [`validate_name`](#ida_name.validate_name)(→ PyObject \*) | Validate a name. If SN_NOCHECK is specified, this function replaces all invalid characters in the name with SUBSTCHAR. However, it will return false if name is valid but not allowed to be an identifier (is a register name). | | [`calc_gtn_flags`](#ida_name.calc_gtn_flags)(fromaddr, ea) | Calculate flags for get_ea_name() function | ## Module Contents ### *class* ida_name.ea_name_vec_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### push_back(\*args) → ea_name_t & #### pop_back() → [None](https://docs.python.org/3/library/constants.html#None) #### size() → [int](https://docs.python.org/3/library/functions.html#int) #### empty() → [bool](https://docs.python.org/3/library/functions.html#bool) #### at(\_idx: [int](https://docs.python.org/3/library/functions.html#int)) → ea_name_t const & #### qclear() → [None](https://docs.python.org/3/library/constants.html#None) #### clear() → [None](https://docs.python.org/3/library/constants.html#None) #### resize(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### grow(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### capacity() → [int](https://docs.python.org/3/library/functions.html#int) #### reserve(cnt: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### truncate() → [None](https://docs.python.org/3/library/constants.html#None) #### swap(r: [ea_name_vec_t](#ida_name.ea_name_vec_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extract() → ea_name_t \* #### inject(s: [ea_name_t](#ida_name.ea_name_t), len: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### begin(\*args) → qvector< ea_name_t >::const_iterator #### end(\*args) → qvector< ea_name_t >::const_iterator #### insert(it: [ea_name_t](#ida_name.ea_name_t), x: [ea_name_t](#ida_name.ea_name_t)) → qvector< ea_name_t >::iterator #### erase(\*args) → qvector< ea_name_t >::iterator #### append(x: [ea_name_t](#ida_name.ea_name_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extend(x: [ea_name_vec_t](#ida_name.ea_name_vec_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### front #### back ### ida_name.get_name(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [str](https://docs.python.org/3/library/stdtypes.html#str) ### ida_name.get_colored_name(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [str](https://docs.python.org/3/library/stdtypes.html#str) ### ida_name.MAXNAMELEN Maximum length of a name in IDA (with the trailing zero). ### ida_name.FUNC_IMPORT_PREFIX Name prefix used by IDA for the imported functions. ### ida_name.set_name(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), name: [str](https://docs.python.org/3/library/stdtypes.html#str), flags: [int](https://docs.python.org/3/library/functions.html#int) = 0) → [bool](https://docs.python.org/3/library/functions.html#bool) Set or delete name of an item at the specified address. An item can be anything: instruction, function, data byte, word, string, structure, etc… Include name into the list of names. * **Parameters:** * **ea** – linear address. do nothing if ea is not valid (return 0). tail bytes can’t have names. * **name** – new name. * nullptr: do nothing (return 0). * “” : delete name. * otherwise this is a new name. * **Parameters:** **flags** – Set name flags. If a bit is not specified, then the corresponding action is not performed and the name will retain the same bits as before calling this function. For new names, default is: non-public, non-weak, non-auto. * **Returns:** 1: ok, name is changed * **Returns:** 0: failure, a warning is displayed ### ida_name.SN_CHECK Fail if the name contains invalid characters. ### ida_name.SN_NOCHECK Replace invalid characters silently. If this bit is set, all invalid chars (not in NameChars or MangleChars) will be replaced by ‘_’ List of valid characters is defined in ida.cfg ### ida_name.SN_PUBLIC if set, make name public ### ida_name.SN_NON_PUBLIC if set, make name non-public ### ida_name.SN_WEAK if set, make name weak ### ida_name.SN_NON_WEAK if set, make name non-weak ### ida_name.SN_AUTO if set, make name autogenerated ### ida_name.SN_NON_AUTO if set, make name non-autogenerated ### ida_name.SN_NOLIST if set, exclude name from the list. if not set, then include the name into the list (however, if other bits are set, the name might be immediately excluded from the list). ### ida_name.SN_NOWARN don’t display a warning if failed ### ida_name.SN_LOCAL create local name. a function should exist. local names can’t be public or weak. also they are not included into the list of names they can’t have dummy prefixes. ### ida_name.SN_IDBENC the name is given in the IDB encoding; non-ASCII bytes will be decoded accordingly. Specifying SN_IDBENC also implies SN_NODUMMY ### ida_name.SN_FORCE if the specified name is already present in the database, try variations with a numerical suffix like “_123” ### ida_name.SN_NODUMMY automatically prepend the name with ‘_’ if it begins with a dummy suffix such as ‘ ``` sub_ ``` ’. See also SN_IDBENC ### ida_name.SN_DELTAIL if name cannot be set because of a tail byte, delete the hindering item ### ida_name.SN_MULTI if the specified address already has a name, then add the new name as a regular comment “Alternative name is …”. Except when the new name is public and the old one is not or when the old name is weak and the new one is not. In these cases we act as if bit SN_MULTI_FORCE is specified. If the new name only slightly differs from the old one, for example, only by the initial underscore or the artificial suffix ‘_##’, then we ignore it. ### ida_name.SN_MULTI_FORCE if the specified address already has a name, put this old name into a regular comment and set the specified name. This bit may be used only with SN_MULTI. ### ida_name.force_name(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), name: [str](https://docs.python.org/3/library/stdtypes.html#str), flags: [int](https://docs.python.org/3/library/functions.html#int) = 0) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_name.del_global_name(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_name.del_local_name(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_name.set_dummy_name(\_from: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Give an autogenerated (dummy) name. Autogenerated names have special prefixes ( ``` loc_ ``` …). * **Parameters:** **ea** – linear address * **Returns:** 1: ok, dummy name is generated or the byte already had a name * **Returns:** 0: failure, invalid address or tail byte ### ida_name.make_name_auto(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_name.make_name_user(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_name.UCDR_STRLIT string literals ### ida_name.UCDR_NAME regular (unmangled) names ### ida_name.UCDR_MANGLED mangled names ### ida_name.UCDR_TYPE type names ### ida_name.VNT_IDENT identifier (e.g., function name) ### ida_name.VNT_TYPE type name (can contain ‘<’, ‘>’, …) ### ida_name.VNT_UDTMEM UDT (structure, union, enum) member. ### ida_name.VNT_STRLIT string literal ### ida_name.VNT_VISIBLE visible cp (obsolete; will be deleted) ### ida_name.is_valid_cp(cp: wchar32_t, kind: nametype_t, data: void \* = None) → [bool](https://docs.python.org/3/library/functions.html#bool) Is the given codepoint acceptable in the given context? ### ida_name.set_cp_validity(\*args) → [None](https://docs.python.org/3/library/constants.html#None) Mark the given codepoint (or range) as acceptable or unacceptable in the given context If ‘endcp’ is not BADCP, it is considered to be the end of the range: [cp, endcp), and is not included in the range ### ida_name.get_cp_validity(\*args) → [bool](https://docs.python.org/3/library/functions.html#bool) Is the given codepoint (or range) acceptable in the given context? If ‘endcp’ is not BADCP, it is considered to be the end of the range: [cp, endcp), and is not included in the range ### ida_name.is_ident_cp(cp: wchar32_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Can a character appear in a name? (present in ::NameChars or ::MangleChars). ### ida_name.is_strlit_cp(cp: wchar32_t, specific_ranges: rangeset_crefvec_t const \* = None) → [bool](https://docs.python.org/3/library/functions.html#bool) Can a character appear in a string literal (present in ::StrlitChars) If ‘specific_ranges’ are specified, those will be used instead of the ones corresponding to the current culture (only if ::StrlitChars is configured to use the current culture) ### ida_name.is_visible_cp(cp: wchar32_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Can a character be displayed in a name? (present in ::NameChars). ### ida_name.is_ident(name: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [bool](https://docs.python.org/3/library/functions.html#bool) Is a valid name? (including ::MangleChars). ### ida_name.is_uname(name: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [bool](https://docs.python.org/3/library/functions.html#bool) Is valid user-specified name? (valid name & !dummy prefix). * **Parameters:** **name** – name to test. may be nullptr. * **Returns:** 1: yes * **Returns:** 0: no ### ida_name.is_valid_typename(name: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [bool](https://docs.python.org/3/library/functions.html#bool) Is valid type name? * **Parameters:** **name** – name to test. may be nullptr. * **Returns:** 1: yes * **Returns:** 0: no ### ida_name.extract_name(line: [str](https://docs.python.org/3/library/stdtypes.html#str), x: [int](https://docs.python.org/3/library/functions.html#int)) → [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None) Extract a name or address from the specified string. * **Parameters:** * **line** – input string * **x** – x coordinate of cursor * **Returns:** -1 if cannot extract. otherwise length of the name ### ida_name.hide_name(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) Remove name from the list of names * **Parameters:** **ea** – address of the name ### ida_name.show_name(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) Insert name to the list of names. ### ida_name.get_name_ea(\_from: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), name: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) Get the address of a name. This function resolves a name into an address. It can handle regular global and local names, as well as debugger names. * **Parameters:** **name** – any name in the program or nullptr * **Returns:** address of the name or BADADDR ### ida_name.get_name_base_ea(\_from: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), to: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) Get address of the name used in the expression for the address * **Parameters:** **to** – the referenced address * **Returns:** address of the name used to represent the operand ### ida_name.get_name_value(\_from: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), name: [str](https://docs.python.org/3/library/stdtypes.html#str)) → uval_t \* Get value of the name. This function knows about: regular names, enums, special segments, etc. * **Parameters:** **name** – any name in the program or nullptr * **Returns:** Name value result codes ### ida_name.NT_NONE name doesn’t exist or has no value ### ida_name.NT_BYTE name is byte name (regular name) ### ida_name.NT_LOCAL name is local label ### ida_name.NT_STKVAR name is stack variable name ### ida_name.NT_ENUM name is symbolic constant ### ida_name.NT_ABS name is absolute symbol (SEG_ABSSYM) ### ida_name.NT_SEG name is segment or segment register name ### ida_name.NT_STROFF name is structure member ### ida_name.NT_BMASK name is a bit group mask name ### ida_name.NT_REGVAR name is a renamed register ( ``` * ``` value is idx into pfn->regvars) ### ida_name.GN_VISIBLE replace forbidden characters by SUBSTCHAR ### ida_name.GN_COLORED return colored name ### ida_name.GN_DEMANGLED return demangled name ### ida_name.GN_STRICT fail if cannot demangle ### ida_name.GN_SHORT use short form of demangled name ### ida_name.GN_LONG use long form of demangled name ### ida_name.GN_LOCAL try to get local name first; if failed, get global ### ida_name.GN_ISRET for dummy names: use retloc ### ida_name.GN_NOT_ISRET for dummy names: do not use retloc ### ida_name.GN_NOT_DUMMY do not return a dummy name ### ida_name.get_visible_name(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), gtn_flags: [int](https://docs.python.org/3/library/functions.html#int) = 0) → [str](https://docs.python.org/3/library/stdtypes.html#str) ### ida_name.get_short_name(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), gtn_flags: [int](https://docs.python.org/3/library/functions.html#int) = 0) → [str](https://docs.python.org/3/library/stdtypes.html#str) ### ida_name.get_long_name(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), gtn_flags: [int](https://docs.python.org/3/library/functions.html#int) = 0) → [str](https://docs.python.org/3/library/stdtypes.html#str) ### ida_name.get_colored_short_name(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), gtn_flags: [int](https://docs.python.org/3/library/functions.html#int) = 0) → [str](https://docs.python.org/3/library/stdtypes.html#str) ### ida_name.get_colored_long_name(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), gtn_flags: [int](https://docs.python.org/3/library/functions.html#int) = 0) → [str](https://docs.python.org/3/library/stdtypes.html#str) ### ida_name.get_demangled_name(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), inhibitor: [int](https://docs.python.org/3/library/functions.html#int), demform: [int](https://docs.python.org/3/library/functions.html#int), gtn_flags: [int](https://docs.python.org/3/library/functions.html#int) = 0) → [str](https://docs.python.org/3/library/stdtypes.html#str) ### ida_name.get_colored_demangled_name(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), inhibitor: [int](https://docs.python.org/3/library/functions.html#int), demform: [int](https://docs.python.org/3/library/functions.html#int), gtn_flags: [int](https://docs.python.org/3/library/functions.html#int) = 0) → [str](https://docs.python.org/3/library/stdtypes.html#str) ### ida_name.get_name_color(\_from: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → color_t Calculate flags for get_ea_name() function. Get name color. * **Parameters:** **ea** – linear address ### ida_name.GETN_APPZERO meaningful only if the name refers to a structure. append a struct field name if the field offset is zero? ### ida_name.GETN_NOFIXUP ignore the fixup information when producing the name ### ida_name.GETN_NODUMMY do not create a new dummy name but pretend it exists ### ida_name.get_name_expr(\_from: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), n: [int](https://docs.python.org/3/library/functions.html#int), ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), off: [int](https://docs.python.org/3/library/functions.html#int), flags: [int](https://docs.python.org/3/library/functions.html#int) = 1) → [str](https://docs.python.org/3/library/stdtypes.html#str) Convert address to name expression (name with a displacement). This function takes into account fixup information and returns a colored name expression (in the form +/- ). It also knows about structure members and arrays. If the specified address doesn’t have a name, a dummy name is generated. * **Parameters:** * **n** – number of referencing operand. for data items specify 0 * **ea** – address to convert to name expression * **off** – the value of name expression. this parameter is used only to check that the name expression will have the wanted value. ‘off’ may be equal to BADADDR but this is discouraged because it prohibits checks. * **flags** – Name expression flags * **Returns:** < 0 if address is not valid, no segment or other failure. otherwise the length of the name expression in characters. ### ida_name.get_nice_colored_name(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), flags: [int](https://docs.python.org/3/library/functions.html#int) = 0) → [str](https://docs.python.org/3/library/stdtypes.html#str) Get a nice colored name at the specified address. Ex: \* segment:sub+offset \* segment:sub:local_label \* segment:label \* segment:address \* segment:address+offset * **Parameters:** * **ea** – linear address * **flags** – Nice colored name flags * **Returns:** the length of the generated name in bytes. ### ida_name.GNCN_NOSEG ignore the segment prefix when producing the name ### ida_name.GNCN_NOCOLOR generate an uncolored name ### ida_name.GNCN_NOLABEL don’t generate labels ### ida_name.GNCN_NOFUNC don’t generate funcname+… expressions ### ida_name.GNCN_SEG_FUNC generate both segment and function names (default is to omit segment name if a function name is present) ### ida_name.GNCN_SEGNUM segment part is displayed as a hex number ### ida_name.GNCN_REQFUNC return 0 if the address does not belong to a function ### ida_name.GNCN_REQNAME return 0 if the address can only be represented as a hex number ### ida_name.GNCN_NODBGNM don’t use debug names ### ida_name.GNCN_PREFDBG if using debug names, prefer debug names over function names ### ida_name.append_struct_fields(disp: adiff_t \*, n: int, path: tid_t const \*, flags: flags64_t, delta: adiff_t, appzero: bool) → [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None) Append names of struct fields to a name if the name is a struct name. * **Parameters:** * **disp** – displacement from the name * **n** – operand number in which the name appears * **path** – path in the struct. path is an array of id’s. maximal length of array is MAXSTRUCPATH. the first element of the array is the structure id. consecutive elements are id’s of used union members (if any). * **flags** – the input flags. they will be returned if the struct cannot be found. * **delta** – delta to add to displacement * **appzero** – should append a struct field name if the displacement is zero? * **Returns:** flags of the innermost struct member or the input flags ### ida_name.is_public_name(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_name.make_name_public(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) ### ida_name.make_name_non_public(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) ### ida_name.is_weak_name(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_name.make_name_weak(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) ### ida_name.make_name_non_weak(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) ### ida_name.get_nlist_size() → [int](https://docs.python.org/3/library/functions.html#int) ### ida_name.get_nlist_idx(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [int](https://docs.python.org/3/library/functions.html#int) ### ida_name.is_in_nlist(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_name.get_nlist_ea(idx: [int](https://docs.python.org/3/library/functions.html#int)) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) ### ida_name.get_nlist_name(idx: [int](https://docs.python.org/3/library/functions.html#int)) → [str](https://docs.python.org/3/library/stdtypes.html#str) ### ida_name.rebuild_nlist() → [None](https://docs.python.org/3/library/constants.html#None) ### ida_name.reorder_dummy_names() → [None](https://docs.python.org/3/library/constants.html#None) Renumber dummy names. ### ida_name.DEBNAME_EXACT find a name at exactly the specified address ### ida_name.DEBNAME_LOWER find a name with the address >= the specified address ### ida_name.DEBNAME_UPPER find a name with the address > the specified address ### ida_name.DEBNAME_NICE find a name with the address <= the specified address ### *class* ida_name.ea_name_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### ea *: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)* #### name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* ### ida_name.set_debug_name(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), name: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_name.get_debug_name(ea_ptr: ea_t \*, how: debug_name_how_t) → [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None) ### ida_name.del_debug_names(ea1: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), ea2: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) ### ida_name.get_debug_name_ea(name: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) ### ida_name.DQT_NPURGED_8 only calculate number of purged bytes (sizeof(arg)==8) ### ida_name.DQT_NPURGED_4 only calculate number of purged bytes (sizeof(arg)==4) ### ida_name.DQT_NPURGED_2 only calculate number of purged bytes (sizeof(arg)==2) ### ida_name.DQT_COMPILER only detect compiler that generated the name ### ida_name.DQT_NAME_TYPE only detect the name type (data/code) ### ida_name.DQT_FULL really demangle ### ida_name.demangle_name(name: [str](https://docs.python.org/3/library/stdtypes.html#str), disable_mask: [int](https://docs.python.org/3/library/functions.html#int), demreq: demreq_type_t = DQT_FULL) → [str](https://docs.python.org/3/library/stdtypes.html#str) Demangle a name. * **Parameters:** * **name** – name to demangle * **disable_mask** – bits to inhibit parts of demangled name (see ``` MNG_ ``` ). by the M_COMPILER bits a specific compiler can be selected (see ``` MT_ ``` ). * **demreq** – the request type demreq_type_t * **Returns:** ``` ME_ ``` … or ``` MT__ ``` bitmasks from demangle.hpp ### ida_name.is_name_defined_locally_ea(\*args) → [bool](https://docs.python.org/3/library/functions.html#bool) Is the name defined locally in the specified function? * **Parameters:** * **func_ea** – function start address * **name** – name to check * **ignore_name_def** – which names to ignore when checking * **ea1** – the starting address of the range inside the function (optional) * **ea2** – the ending address of the range inside the function (optional) * **Returns:** true if the name has been defined ### ida_name.is_name_defined_locally(\*args) → [bool](https://docs.python.org/3/library/functions.html#bool) Is the name defined locally in the specified function? * **Parameters:** * **pfn** – pointer to function * **name** – name to check * **ignore_name_def** – which names to ignore when checking * **ea1** – the starting address of the range inside the function (optional) * **ea2** – the ending address of the range inside the function (optional) * **Returns:** true if the name has been defined ### ida_name.cleanup_name(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), name: [str](https://docs.python.org/3/library/stdtypes.html#str), flags: [int](https://docs.python.org/3/library/functions.html#int) = 0) → [str](https://docs.python.org/3/library/stdtypes.html#str) ### ida_name.CN_KEEP_TRAILING_DIGITS do not remove “_d+” at the end of name ### ida_name.CN_KEEP_UNDERSCORES do not remove leading underscores. but it is ok to remove \_\_imp_. ### ida_name.CN_REMOVE_ALL_TRAILING_DIGITS remove trailing \_N digits many times ### ida_name.ME_INTERR ### ida_name.ME_PARAMERR ### ida_name.ME_ILLSTR ### ida_name.ME_SMALLANS ### ida_name.ME_FRAME ### ida_name.ME_NOCOMP ### ida_name.ME_ERRAUTO ### ida_name.ME_NOHASHMEM ### ida_name.ME_NOSTRMEM ### ida_name.ME_NOERROR_LIMIT ### ida_name.M_PRCMSK ### ida_name.MT_DEFAULT ### ida_name.MT_CDECL ### ida_name.MT_PASCAL ### ida_name.MT_STDCALL ### ida_name.MT_FASTCALL ### ida_name.MT_THISCALL ### ida_name.MT_FORTRAN ### ida_name.MT_SYSCALL ### ida_name.MT_INTERRUPT ### ida_name.MT_MSFASTCALL ### ida_name.MT_CLRCALL ### ida_name.MT_DMDCALL ### ida_name.MT_VECTORCALL ### ida_name.MT_REGCALL ### ida_name.MT_LOCALNAME ### ida_name.M_SAVEREGS ### ida_name.M_CLASS ### ida_name.MT_PUBLIC ### ida_name.MT_PRIVATE ### ida_name.MT_PROTECT ### ida_name.MT_MEMBER ### ida_name.MT_VTABLE ### ida_name.MT_RTTI ### ida_name.M_PARMSK ### ida_name.MT_PARSHF ### ida_name.MT_PARMAX ### ida_name.M_ELLIPSIS ### ida_name.MT_VOIDARG ### ida_name.M_STATIC ### ida_name.M_VIRTUAL ### ida_name.M_AUTOCRT ### ida_name.M_TYPMASK ### ida_name.MT_OPERAT ### ida_name.MT_CONSTR ### ida_name.MT_DESTR ### ida_name.MT_CASTING ### ida_name.MT_CLRCDTOR ### ida_name.M_TRUNCATE ### ida_name.M_THUNK ### ida_name.M_ANONNSP ### ida_name.M_TMPLNAM ### ida_name.M_DBGNAME ### ida_name.M_COMPILER ### ida_name.MT_MSCOMP ### ida_name.MT_BORLAN ### ida_name.MT_WATCOM ### ida_name.MT_OTHER ### ida_name.MT_GNU ### ida_name.MT_GCC3 ### ida_name.MT_VISAGE ### ida_name.MNG_PTRMSK ### ida_name.MNG_DEFNEAR ### ida_name.MNG_DEFNEARANY ### ida_name.MNG_DEFFAR ### ida_name.MNG_NOPTRTYP16 ### ida_name.MNG_DEFHUGE ### ida_name.MNG_DEFPTR64 ### ida_name.MNG_DEFNONE ### ida_name.MNG_NOPTRTYP ### ida_name.MNG_NODEFINIT ### ida_name.MNG_NOUNDERSCORE ### ida_name.MNG_NOTYPE ### ida_name.MNG_NORETTYPE ### ida_name.MNG_NOBASEDT ### ida_name.MNG_NOCALLC ### ida_name.MNG_NOPOSTFC ### ida_name.MNG_NOSCTYP ### ida_name.MNG_NOTHROW ### ida_name.MNG_NOSTVIR ### ida_name.MNG_NOECSU ### ida_name.MNG_NOCSVOL ### ida_name.MNG_NOCLOSUR ### ida_name.MNG_NOUNALG ### ida_name.MNG_NOMANAGE ### ida_name.MNG_NOMODULE ### ida_name.MNG_SHORT_S ### ida_name.MNG_SHORT_U ### ida_name.MNG_ZPT_SPACE ### ida_name.MNG_DROP_IMP ### ida_name.MNG_IGN_ANYWAY ### ida_name.MNG_IGN_JMP ### ida_name.MNG_MOVE_JMP ### ida_name.MNG_COMPILER_MSK ### ida_name.MNG_SHORT_FORM ### ida_name.MNG_LONG_FORM ### ida_name.MNG_CALC_VALID ### ida_name.get_mangled_name_type(name: [str](https://docs.python.org/3/library/stdtypes.html#str)) → mangled_name_type_t ### ida_name.get_debug_names(\*args) → PyObject \* ### ida_name.get_ea_name(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), gtn_flags: [int](https://docs.python.org/3/library/functions.html#int) = 0) → [str](https://docs.python.org/3/library/stdtypes.html#str) Get name at the specified address. * **Parameters:** * **ea** – linear address * **gtn_flags** – how exactly the name should be retrieved. combination of bits for get_ea_name() function. There is a convenience bits * **Returns:** success ### ida_name.validate_name(name: [str](https://docs.python.org/3/library/stdtypes.html#str), type: nametype_t, flags: [int](https://docs.python.org/3/library/functions.html#int) = 1) → PyObject \* Validate a name. If SN_NOCHECK is specified, this function replaces all invalid characters in the name with SUBSTCHAR. However, it will return false if name is valid but not allowed to be an identifier (is a register name). * **Parameters:** * **name** – ptr to name. the name will be modified * **type** – the type of name we want to validate * **flags** – see SN_\* * **Returns:** success ### *class* ida_name.NearestName(ea_names) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) Utility class to help find the nearest name in a given ea/name dictionary #### update(ea_names) Updates the ea/names map #### find(ea) Returns a tupple (ea, name, pos) that is the nearest to the passed ea If no name is matched then None is returned ### ida_name.calc_gtn_flags(fromaddr, ea) Calculate flags for get_ea_name() function * **Parameters:** * **fromaddr** – the referring address. May be BADADDR. * **ea** – linear address * **Returns:** flags ### ida_name.is_name_defined_locally ### ida_name.cvar ### ida_name.ignore_none ### ida_name.ignore_regvar ### ida_name.ignore_llabel ### ida_name.ignore_stkvar ### ida_name.ignore_glabel ### ida_name.MANGLED_CODE ### ida_name.MANGLED_DATA ### ida_name.MANGLED_UNKNOWN # index.html.md # ida_dirtree Types involved in grouping of item into folders. The dirtree_t class is used to organize a directory tree on top of any collection that allows for accessing its elements by an id (inode). No requirements are imposed on the inodes apart from the forbidden value -1 (used to denote a bad inode). The dirspec_t class is used to specialize the dirtree. It can be used to introduce a directory structure for: \* local types \* structs \* enums \* functions \* names \* etc ## Attributes | [`DTN_FULL_NAME`](#ida_dirtree.DTN_FULL_NAME) | use long form of the entry name. That name is unique. | |-------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [`DTN_DISPLAY_NAME`](#ida_dirtree.DTN_DISPLAY_NAME) | use short, displayable form of the entry name. for example, 'std::string' instead of 'std::basic_string'. Note that more than one "full name" can have the same displayable name. | | [`cvar`](#ida_dirtree.cvar) | | | [`DIRTREE_FOLDED_SEP`](#ida_dirtree.DIRTREE_FOLDED_SEP) | Separator used by fold_common_prefix() to join the folders of a collapsed single item folder chain. The UI must render it as '/' before displaying (see dirtree_restore_prefix_sep). | | [`DTE_OK`](#ida_dirtree.DTE_OK) | ok | | [`DTE_ALREADY_EXISTS`](#ida_dirtree.DTE_ALREADY_EXISTS) | item already exists | | [`DTE_NOT_FOUND`](#ida_dirtree.DTE_NOT_FOUND) | item not found | | [`DTE_NOT_DIRECTORY`](#ida_dirtree.DTE_NOT_DIRECTORY) | item is not a directory | | [`DTE_NOT_EMPTY`](#ida_dirtree.DTE_NOT_EMPTY) | directory is not empty | | [`DTE_BAD_PATH`](#ida_dirtree.DTE_BAD_PATH) | invalid path | | [`DTE_CANT_RENAME`](#ida_dirtree.DTE_CANT_RENAME) | failed to rename an item | | [`DTE_OWN_CHILD`](#ida_dirtree.DTE_OWN_CHILD) | moving inside subdirectory of itself | | [`DTE_MAX_DIR`](#ida_dirtree.DTE_MAX_DIR) | maximum directory count achieved | | [`DTE_NOT_ORDERABLE`](#ida_dirtree.DTE_NOT_ORDERABLE) | directory is not orderable | | [`DTE_LAST`](#ida_dirtree.DTE_LAST) | | | [`DIRTREE_LOCAL_TYPES`](#ida_dirtree.DIRTREE_LOCAL_TYPES) | | | [`DIRTREE_FUNCS`](#ida_dirtree.DIRTREE_FUNCS) | | | [`DIRTREE_NAMES`](#ida_dirtree.DIRTREE_NAMES) | | | [`DIRTREE_IMPORTS`](#ida_dirtree.DIRTREE_IMPORTS) | | | [`DIRTREE_IDAPLACE_BOOKMARKS`](#ida_dirtree.DIRTREE_IDAPLACE_BOOKMARKS) | | | [`DIRTREE_BPTS`](#ida_dirtree.DIRTREE_BPTS) | | | [`DIRTREE_LTYPES_BOOKMARKS`](#ida_dirtree.DIRTREE_LTYPES_BOOKMARKS) | | | [`DIRTREE_SNIPPETS`](#ida_dirtree.DIRTREE_SNIPPETS) | IDB-backed script snippets. | | [`DIRTREE_END`](#ida_dirtree.DIRTREE_END) | | ## Classes | [`direntry_vec_t`](#ida_dirtree.direntry_vec_t) | | |-----------------------------------------------------------------|----| | [`dirtree_cursor_vec_t`](#ida_dirtree.dirtree_cursor_vec_t) | | | [`dirtree_bulk_results_t`](#ida_dirtree.dirtree_bulk_results_t) | | | [`direntry_t`](#ida_dirtree.direntry_t) | | | [`dirspec_t`](#ida_dirtree.dirspec_t) | | | [`dirtree_cursor_t`](#ida_dirtree.dirtree_cursor_t) | | | [`dirtree_selection_t`](#ida_dirtree.dirtree_selection_t) | | | [`dirtree_iterator_t`](#ida_dirtree.dirtree_iterator_t) | | | [`dirtree_bulk_result_t`](#ida_dirtree.dirtree_bulk_result_t) | | | [`dirtree_visitor_t`](#ida_dirtree.dirtree_visitor_t) | | | [`dirtree_t`](#ida_dirtree.dirtree_t) | | ## Functions | [`dirtree_restore_prefix_sep`](#ida_dirtree.dirtree_restore_prefix_sep)(→ None) | Replace DIRTREE_FOLDED_SEP bytes by '/' in-place, for display only. The result is NOT safe for using with dirtree path APIs (rmdir, cd, ...); the embedded '/' would be interpreted as a path separator. | |-----------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [`get_std_dirtree`](#ida_dirtree.get_std_dirtree)(→ dirtree_t \*) | | ## Module Contents ### *class* ida_dirtree.direntry_vec_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### push_back(\*args) → direntry_t & #### pop_back() → [None](https://docs.python.org/3/library/constants.html#None) #### size() → [int](https://docs.python.org/3/library/functions.html#int) #### empty() → [bool](https://docs.python.org/3/library/functions.html#bool) #### at(\_idx: [int](https://docs.python.org/3/library/functions.html#int)) → direntry_t const & #### qclear() → [None](https://docs.python.org/3/library/constants.html#None) #### clear() → [None](https://docs.python.org/3/library/constants.html#None) #### resize(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### grow(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### capacity() → [int](https://docs.python.org/3/library/functions.html#int) #### reserve(cnt: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### truncate() → [None](https://docs.python.org/3/library/constants.html#None) #### swap(r: [direntry_vec_t](#ida_dirtree.direntry_vec_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extract() → direntry_t \* #### inject(s: [direntry_t](#ida_dirtree.direntry_t), len: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### begin(\*args) → qvector< direntry_t >::const_iterator #### end(\*args) → qvector< direntry_t >::const_iterator #### insert(it: [direntry_t](#ida_dirtree.direntry_t), x: [direntry_t](#ida_dirtree.direntry_t)) → qvector< direntry_t >::iterator #### erase(\*args) → qvector< direntry_t >::iterator #### find(\*args) → qvector< direntry_t >::const_iterator #### has(x: [direntry_t](#ida_dirtree.direntry_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### add_unique(x: [direntry_t](#ida_dirtree.direntry_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### append(x: [direntry_t](#ida_dirtree.direntry_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extend(x: [direntry_vec_t](#ida_dirtree.direntry_vec_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### front #### back ### *class* ida_dirtree.dirtree_cursor_vec_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### push_back(\*args) → dirtree_cursor_t & #### pop_back() → [None](https://docs.python.org/3/library/constants.html#None) #### size() → [int](https://docs.python.org/3/library/functions.html#int) #### empty() → [bool](https://docs.python.org/3/library/functions.html#bool) #### at(\_idx: [int](https://docs.python.org/3/library/functions.html#int)) → dirtree_cursor_t const & #### qclear() → [None](https://docs.python.org/3/library/constants.html#None) #### clear() → [None](https://docs.python.org/3/library/constants.html#None) #### resize(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### grow(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### capacity() → [int](https://docs.python.org/3/library/functions.html#int) #### reserve(cnt: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### truncate() → [None](https://docs.python.org/3/library/constants.html#None) #### swap(r: [dirtree_cursor_vec_t](#ida_dirtree.dirtree_cursor_vec_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extract() → dirtree_cursor_t \* #### inject(s: [dirtree_cursor_t](#ida_dirtree.dirtree_cursor_t), len: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### begin(\*args) → qvector< dirtree_cursor_t >::const_iterator #### end(\*args) → qvector< dirtree_cursor_t >::const_iterator #### insert(it: [dirtree_cursor_t](#ida_dirtree.dirtree_cursor_t), x: [dirtree_cursor_t](#ida_dirtree.dirtree_cursor_t)) → qvector< dirtree_cursor_t >::iterator #### erase(\*args) → qvector< dirtree_cursor_t >::iterator #### find(\*args) → qvector< dirtree_cursor_t >::const_iterator #### has(x: [dirtree_cursor_t](#ida_dirtree.dirtree_cursor_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### add_unique(x: [dirtree_cursor_t](#ida_dirtree.dirtree_cursor_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### append(x: [dirtree_cursor_t](#ida_dirtree.dirtree_cursor_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extend(x: [dirtree_cursor_vec_t](#ida_dirtree.dirtree_cursor_vec_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### front #### back ### *class* ida_dirtree.dirtree_bulk_results_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### push_back(\*args) → dirtree_bulk_result_t & #### pop_back() → [None](https://docs.python.org/3/library/constants.html#None) #### size() → [int](https://docs.python.org/3/library/functions.html#int) #### empty() → [bool](https://docs.python.org/3/library/functions.html#bool) #### at(\_idx: [int](https://docs.python.org/3/library/functions.html#int)) → dirtree_bulk_result_t const & #### qclear() → [None](https://docs.python.org/3/library/constants.html#None) #### clear() → [None](https://docs.python.org/3/library/constants.html#None) #### resize(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### grow(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### capacity() → [int](https://docs.python.org/3/library/functions.html#int) #### reserve(cnt: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### truncate() → [None](https://docs.python.org/3/library/constants.html#None) #### swap(r: [dirtree_bulk_results_t](#ida_dirtree.dirtree_bulk_results_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extract() → dirtree_bulk_result_t \* #### inject(s: [dirtree_bulk_result_t](#ida_dirtree.dirtree_bulk_result_t), len: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### begin(\*args) → qvector< dirtree_bulk_result_t >::const_iterator #### end(\*args) → qvector< dirtree_bulk_result_t >::const_iterator #### insert(it: [dirtree_bulk_result_t](#ida_dirtree.dirtree_bulk_result_t), x: [dirtree_bulk_result_t](#ida_dirtree.dirtree_bulk_result_t)) → qvector< dirtree_bulk_result_t >::iterator #### erase(\*args) → qvector< dirtree_bulk_result_t >::iterator #### append(x: [dirtree_bulk_result_t](#ida_dirtree.dirtree_bulk_result_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extend(x: [dirtree_bulk_results_t](#ida_dirtree.dirtree_bulk_results_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### front #### back ### *class* ida_dirtree.direntry_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### idx *: [int](https://docs.python.org/3/library/functions.html#int)* diridx_t or inode_t #### isdir *: [bool](https://docs.python.org/3/library/functions.html#bool)* is ‘idx’ a diridx_t, or an inode_t #### BADIDX #### ROOTIDX #### valid() → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_dirtree.DTN_FULL_NAME use long form of the entry name. That name is unique. ### ida_dirtree.DTN_DISPLAY_NAME use short, displayable form of the entry name. for example, ‘std::string’ instead of ‘std::basic_string’. Note that more than one “full name” can have the same displayable name. ### ida_dirtree.dirtree_restore_prefix_sep(s: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [None](https://docs.python.org/3/library/constants.html#None) Replace DIRTREE_FOLDED_SEP bytes by ‘/’ in-place, for display only. The result is NOT safe for using with dirtree path APIs (rmdir, cd, …); the embedded ‘/’ would be interpreted as a path separator. ### *class* ida_dirtree.dirspec_t(nm: [str](https://docs.python.org/3/library/stdtypes.html#str) = None, f: [int](https://docs.python.org/3/library/functions.html#int) = 0) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### dsf_flags *: [int](https://docs.python.org/3/library/functions.html#int)* #### DSF_INODE_EA #### DSF_PRIVRANGE #### DSF_ORDERABLE #### DSF_UNQ_NAMES #### id *: [str](https://docs.python.org/3/library/stdtypes.html#str)* #### get_name(inode: inode_t, name_flags: [int](https://docs.python.org/3/library/functions.html#int) = DTN_FULL_NAME) → [bool](https://docs.python.org/3/library/functions.html#bool) get the entry name. for example, the structure name * **Parameters:** * **inode** – inode number of the entry * **name_flags** – how exactly the name should be retrieved. combination of bits for ``` get_ ``` …name() methods bits * **Returns:** false if the entry does not exist. #### get_inode(dirpath: [str](https://docs.python.org/3/library/stdtypes.html#str), name: [str](https://docs.python.org/3/library/stdtypes.html#str)) → inode_t get the entry inode in the specified directory * **Parameters:** * **dirpath** – the absolute directory path with trailing slash * **name** – the entry name in the directory * **Returns:** the entry inode #### get_attrs(inode: inode_t) → [str](https://docs.python.org/3/library/stdtypes.html#str) #### rename_inode(inode: inode_t, newname: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [bool](https://docs.python.org/3/library/functions.html#bool) rename the entry * **Returns:** success #### unlink_inode(inode: inode_t) → [None](https://docs.python.org/3/library/constants.html#None) event: unlinked an inode #### is_orderable() → [bool](https://docs.python.org/3/library/functions.html#bool) #### unique_names() → [bool](https://docs.python.org/3/library/functions.html#bool) #### has_inode_ea() → [bool](https://docs.python.org/3/library/functions.html#bool) #### nodename ### ida_dirtree.cvar ### ida_dirtree.DIRTREE_FOLDED_SEP Separator used by fold_common_prefix() to join the folders of a collapsed single item folder chain. The UI must render it as ‘/’ before displaying (see dirtree_restore_prefix_sep). ### *class* ida_dirtree.dirtree_cursor_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### parent *: diridx_t* the parent directory #### rank *: [int](https://docs.python.org/3/library/functions.html#int)* the index into the parent directory #### valid() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_root_cursor() → [bool](https://docs.python.org/3/library/functions.html#bool) #### set_root_cursor() → [None](https://docs.python.org/3/library/constants.html#None) #### swap(r: [dirtree_cursor_t](#ida_dirtree.dirtree_cursor_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### *static* root_cursor() → [dirtree_cursor_t](#ida_dirtree.dirtree_cursor_t) #### compare(r: [dirtree_cursor_t](#ida_dirtree.dirtree_cursor_t)) → [int](https://docs.python.org/3/library/functions.html#int) ### *class* ida_dirtree.dirtree_selection_t Bases: [`dirtree_cursor_vec_t`](#ida_dirtree.dirtree_cursor_vec_t) #### thisown ### *class* ida_dirtree.dirtree_iterator_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### pattern *: [str](https://docs.python.org/3/library/stdtypes.html#str)* #### cursor *: [dirtree_cursor_t](#ida_dirtree.dirtree_cursor_t)* ### ida_dirtree.DTE_OK ok ### ida_dirtree.DTE_ALREADY_EXISTS item already exists ### ida_dirtree.DTE_NOT_FOUND item not found ### ida_dirtree.DTE_NOT_DIRECTORY item is not a directory ### ida_dirtree.DTE_NOT_EMPTY directory is not empty ### ida_dirtree.DTE_BAD_PATH invalid path ### ida_dirtree.DTE_CANT_RENAME failed to rename an item ### ida_dirtree.DTE_OWN_CHILD moving inside subdirectory of itself ### ida_dirtree.DTE_MAX_DIR maximum directory count achieved ### ida_dirtree.DTE_NOT_ORDERABLE directory is not orderable ### ida_dirtree.DTE_LAST ### *class* ida_dirtree.dirtree_bulk_result_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### parent *: diridx_t* #### entry *: [direntry_t](#ida_dirtree.direntry_t)* #### err *: dterr_t* #### idx *: [int](https://docs.python.org/3/library/functions.html#int)* ### *class* ida_dirtree.dirtree_visitor_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### visit(c: [dirtree_cursor_t](#ida_dirtree.dirtree_cursor_t), de: [direntry_t](#ida_dirtree.direntry_t)) → ssize_t Will be called for each entry in the dirtree_t If something other than 0 is returned, iteration will stop. * **Parameters:** * **c** – the current cursor * **de** – the current entry * **Returns:** 0 to keep iterating, or anything else to stop ### *class* ida_dirtree.dirtree_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### *static* errstr(err: dterr_t) → [str](https://docs.python.org/3/library/stdtypes.html#str) Get textual representation of the error code. #### is_orderable() → [bool](https://docs.python.org/3/library/functions.html#bool) Is dirtree orderable? * **Returns:** true if the dirtree is orderable #### chdir(path: [str](https://docs.python.org/3/library/stdtypes.html#str)) → dterr_t Change current directory * **Parameters:** **path** – new current directory * **Returns:** dterr_t error code #### getcwd() → [str](https://docs.python.org/3/library/stdtypes.html#str) Get current directory * **Returns:** the current working directory #### get_abspath(\*args) → [str](https://docs.python.org/3/library/stdtypes.html#str) This function has the following signatures: > 1. get_abspath(cursor: const dirtree_cursor_t &, name_flags: int=DTN_FULL_NAME) -> str > 2. get_abspath(relpath: str) -> str # 0: get_abspath(cursor: const dirtree_cursor_t &, name_flags: int=DTN_FULL_NAME) -> str Get absolute path pointed by the cursor * **Returns:** path; empty string if error # 1: get_abspath(relpath: str) -> str Construct an absolute path from the specified relative path. This function verifies the directory part of the specified path. The last component of the specified path is not verified. * **Returns:** path. empty path means wrong directory part of RELPATH #### resolve_cursor(cursor: [dirtree_cursor_t](#ida_dirtree.dirtree_cursor_t)) → [direntry_t](#ida_dirtree.direntry_t) Resolve cursor * **Parameters:** **cursor** – to analyze * **Returns:** directory entry; if the cursor is bad, the resolved entry will be invalid. #### make_cursor(path: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [dirtree_cursor_t](#ida_dirtree.dirtree_cursor_t) Make cursor from path * **Parameters:** **path** – to analyze * **Returns:** directory cursor; if the path is bad, the resolved cursor will be invalid. #### resolve_path(path: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [direntry_t](#ida_dirtree.direntry_t) Resolve path * **Parameters:** **path** – to analyze * **Returns:** directory entry #### isdir(\*args) → [bool](https://docs.python.org/3/library/functions.html#bool) This function has the following signatures: > 1. isdir(path: str) -> bool > 2. isdir(de: const direntry_t &) -> bool # 0: isdir(path: str) -> bool Is a directory? * **Returns:** true if the specified path is a directory # 1: isdir(de: const direntry_t &) -> bool #### isfile(\*args) → [bool](https://docs.python.org/3/library/functions.html#bool) This function has the following signatures: > 1. isfile(path: str) -> bool > 2. isfile(de: const direntry_t &) -> bool # 0: isfile(path: str) -> bool Is a file? * **Returns:** true if the specified path is a file # 1: isfile(de: const direntry_t &) -> bool #### get_entry_name(de: [direntry_t](#ida_dirtree.direntry_t), name_flags: [int](https://docs.python.org/3/library/functions.html#int) = DTN_FULL_NAME) → [str](https://docs.python.org/3/library/stdtypes.html#str) Get entry name * **Parameters:** * **de** – directory entry * **name_flags** – how exactly the name should be retrieved. combination of bits for ``` get_ ``` …name() methods bits * **Returns:** name #### is_dir_ordered(diridx: diridx_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Is dir ordered? * **Returns:** true if the dirtree has natural ordering #### set_natural_order(diridx: diridx_t, enable: [bool](https://docs.python.org/3/library/functions.html#bool)) → dterr_t Enable/disable natural inode order in a directory. * **Parameters:** * **diridx** – directory index * **enable** – action to do TRUE - enable ordering: re-order existing entries so that all subdirs are at the beginning of the list, file entries are sorted and placed after the subdirs FALSE - disable ordering, no changes to existing entries * **Returns:** dterr_t error code #### get_dir_size(diridx: diridx_t) → ssize_t Get dir size * **Parameters:** **diridx** – directory index * **Returns:** number of entries under this directory; if error, return -1 #### get_entry_attrs(de: [direntry_t](#ida_dirtree.direntry_t)) → [str](https://docs.python.org/3/library/stdtypes.html#str) Get entry attributes * **Parameters:** **de** – directory entry * **Returns:** name #### findfirst(ff: [dirtree_iterator_t](#ida_dirtree.dirtree_iterator_t), pattern: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [bool](https://docs.python.org/3/library/functions.html#bool) Start iterating over files in a directory * **Parameters:** * **ff** – directory iterator. it will be initialized by the function * **pattern** – pattern to search for * **Returns:** success #### findnext(ff: [dirtree_iterator_t](#ida_dirtree.dirtree_iterator_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Continue iterating over files in a directory * **Parameters:** **ff** – directory iterator * **Returns:** success #### mkdir(path: [str](https://docs.python.org/3/library/stdtypes.html#str)) → dterr_t Create a directory. * **Parameters:** **path** – directory to create * **Returns:** dterr_t error code #### rmdir(path: [str](https://docs.python.org/3/library/stdtypes.html#str)) → dterr_t Remove a directory. * **Parameters:** **path** – directory to delete * **Returns:** dterr_t error code #### link(\*args) → dterr_t This function has the following signatures: > 1. link(path: str) -> dterr_t > 2. link(inode: inode_t) -> dterr_t # 0: link(path: str) -> dterr_t Add a file item into a directory. * **Returns:** dterr_t error code # 1: link(inode: inode_t) -> dterr_t Add an inode into the current directory * **Returns:** dterr_t error code #### unlink(\*args) → dterr_t This function has the following signatures: > 1. unlink(path: str) -> dterr_t > 2. unlink(inode: inode_t) -> dterr_t # 0: unlink(path: str) -> dterr_t Remove a file item from a directory. * **Returns:** dterr_t error code # 1: unlink(inode: inode_t) -> dterr_t Remove an inode from the current directory * **Returns:** dterr_t error code #### rename(\_from: [str](https://docs.python.org/3/library/stdtypes.html#str), to: [str](https://docs.python.org/3/library/stdtypes.html#str)) → dterr_t Rename a directory entry * **Parameters:** **to** – destination path * **Returns:** dterr_t error code #### fold_common_prefix(\*args) → dterr_t Collapse single child folders into a single folder item The default separator (DIRTREE_FOLDED_SEP, ASCII 0x1D) is rendered as ‘/’ by the UI but is not split by the path parser, so folded folders behave like a single item for rmdir/cd/rename/etc. * **Parameters:** * **path** – starting directory; nullptr or “/” means root * **sep** – character used to join names * **Returns:** dterr_t error code #### bulk_move(items: [dirtree_cursor_vec_t](#ida_dirtree.dirtree_cursor_vec_t), dstdir: [str](https://docs.python.org/3/library/stdtypes.html#str), dst_rank: ssize_t = -1, moved_items: [dirtree_cursor_vec_t](#ida_dirtree.dirtree_cursor_vec_t) = None, errs: [dirtree_bulk_results_t](#ida_dirtree.dirtree_bulk_results_t) = None) → dterr_t Move many items to a directory * **Parameters:** * **items** – items to move * **dstdir** – destination directory. will be created if does not exist. * **dst_rank** – rank inside the destination directory, where the items should be moved to. example: 0 means to insert to the very beginning of the directory. -1 means to append files to the end of the directory and insert directories after the first existing directory. if the rank is different from -1 and the destination directory has natural ordering and some moved items are files, then the natural ordering will be disabled. * **moved_items** – buffer for cursors of the successfully moved items * **errs** – buffer for errors. only errors are reported here, in any order * **Returns:** dterr_t error code #### bulk_remove(items: [dirtree_cursor_vec_t](#ida_dirtree.dirtree_cursor_vec_t), errs: [dirtree_bulk_results_t](#ida_dirtree.dirtree_bulk_results_t) = None) → dterr_t Delete many items * **Parameters:** * **items** – items to delete * **errs** – buffer for errors. only errors are reported here, in any order Directories are deleted recursively, even if they are not empty. #### get_rank(diridx: diridx_t, de: [direntry_t](#ida_dirtree.direntry_t)) → ssize_t Get ordering rank of an item. * **Parameters:** * **diridx** – index of the parent directory * **de** – directory entry * **Returns:** number in a range of [0..n) where n is the number of entries in the parent directory. -1 if error #### change_rank(path: [str](https://docs.python.org/3/library/stdtypes.html#str), rank_delta: ssize_t) → dterr_t Change ordering rank of an item. * **Parameters:** * **path** – path to the item * **rank_delta** – the amount of the change. positive numbers mean to move down in the list; negative numbers mean to move up. * **Returns:** dterr_t error code #### get_parent_cursor(cursor: [dirtree_cursor_t](#ida_dirtree.dirtree_cursor_t)) → [dirtree_cursor_t](#ida_dirtree.dirtree_cursor_t) Get parent cursor. * **Parameters:** **cursor** – a valid ditree cursor * **Returns:** cursor’s parent #### load() → [bool](https://docs.python.org/3/library/functions.html#bool) Load the tree structure from the netnode. If dirspec_t::id is empty, the operation will be considered a success. In addition, calling load() more than once will not do anything, and will be considered a success. * **Returns:** success #### save() → [bool](https://docs.python.org/3/library/functions.html#bool) Save the tree structure to the netnode. * **Returns:** success #### get_id() → [str](https://docs.python.org/3/library/stdtypes.html#str) netnode name #### set_id(nm: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [None](https://docs.python.org/3/library/constants.html#None) #### notify_dirtree(added: [bool](https://docs.python.org/3/library/functions.html#bool), inode: inode_t) → [None](https://docs.python.org/3/library/constants.html#None) Notify dirtree about a change of an inode. * **Parameters:** * **added** – are we adding or deleting an inode? * **inode** – inode in question #### traverse(v: [dirtree_visitor_t](#ida_dirtree.dirtree_visitor_t)) → ssize_t Traverse dirtree, and be notified at each entry If the the visitor returns anything other than 0, iteration will stop, and that value returned. The tree is traversed using a depth-first algorithm. It is forbidden to modify the dirtree_t during traversal; doing so will result in undefined behavior. * **Parameters:** **v** – the callback * **Returns:** 0, or whatever the visitor returned #### find_entry(de: [direntry_t](#ida_dirtree.direntry_t)) → [dirtree_cursor_t](#ida_dirtree.dirtree_cursor_t) Find the cursor corresponding to an entry of a directory * **Parameters:** **de** – directory entry * **Returns:** cursor corresponding to the directory entry #### get_nodename #### set_nodename ### ida_dirtree.DIRTREE_LOCAL_TYPES ### ida_dirtree.DIRTREE_FUNCS ### ida_dirtree.DIRTREE_NAMES ### ida_dirtree.DIRTREE_IMPORTS ### ida_dirtree.DIRTREE_IDAPLACE_BOOKMARKS ### ida_dirtree.DIRTREE_BPTS ### ida_dirtree.DIRTREE_LTYPES_BOOKMARKS ### ida_dirtree.DIRTREE_SNIPPETS IDB-backed script snippets. ### ida_dirtree.DIRTREE_END ### ida_dirtree.get_std_dirtree(id: dirtree_id_t) → dirtree_t \* # index.html.md # create_bfstruct summary: create a structure with bitfield members description: : The goal of this script is to demonstrate some usage of the type API. In this script, we:
> * Create a bitfield structure. In the present case the bitfield is an int32
made of three ‘members’ spanning it entirely: : > bit0->bit19: bf1 > bit20->bit25: bf2 > bit26->bit31: bf3 * For each member create a repeatable comment. level: intermediate ## Attributes | [`udt`](#create_bfstruct.udt) | | |-----------------------------------|----| | [`bftif`](#create_bfstruct.bftif) | | | [`tif`](#create_bfstruct.tif) | | ## Module Contents ### create_bfstruct.udt ### create_bfstruct.bftif ### create_bfstruct.tif # index.html.md # dump_line_sections summary: parse listing line, and dump some information description: : Using ida_kernwin.parse_tagged_line_sections, we will parse so-called “tagged” listing lines, and extract semantic information such as instruction mnemonic, operand text, …
This script registers an actions, that can be used to dump the line sections. level: intermediate ## Attributes | [`ACTION_NAME`](#dump_line_sections.ACTION_NAME) | | |----------------------------------------------------------|----| | [`ACTION_SHORTCUT`](#dump_line_sections.ACTION_SHORTCUT) | | | [`adesc`](#dump_line_sections.adesc) | | ## Classes | [`dump_line_sections_ah_t`](#dump_line_sections.dump_line_sections_ah_t) | | |----------------------------------------------------------------------------|----| ## Module Contents ### dump_line_sections.ACTION_NAME *= 'dump_line_sections:dump'* ### dump_line_sections.ACTION_SHORTCUT *= 'Ctrl+Shift+D'* ### *class* dump_line_sections.dump_line_sections_ah_t Bases: [`ida_kernwin.action_handler_t`](../ida_kernwin/index.md#ida_kernwin.action_handler_t) #### activate(ctx) Activate an action. This function implements the core behavior of an action. It is called when the action is triggered, from a menu, from a popup menu, from the toolbar, or programmatically. * **Returns:** non-zero: all IDA windows will be refreshed #### update(ctx) Update an action. This is called when the context of the UI changed, and we need to let the action update some of its properties if needed (label, icon, …) In addition, this lets IDA know whether the action is enabled, and when it should be queried for availability again. Note: This callback is not meant to change anything in the application’s state, except by calling one (or many) of the “update_action_\*()” functions on this very action. ### dump_line_sections.adesc # index.html.md # ida_ieee IEEE floating point functions. ## Attributes | [`FPVAL_NWORDS`](#ida_ieee.FPVAL_NWORDS) | number of words in fpvalue_t | |------------------------------------------------------|--------------------------------------------------------------| | [`FPV_BADARG`](#ida_ieee.FPV_BADARG) | wrong value of max_exp | | [`FPV_NORM`](#ida_ieee.FPV_NORM) | regular value | | [`FPV_NAN`](#ida_ieee.FPV_NAN) | NaN. | | [`FPV_PINF`](#ida_ieee.FPV_PINF) | positive infinity | | [`FPV_NINF`](#ida_ieee.FPV_NINF) | negative infinity | | [`REAL_ERROR_OK`](#ida_ieee.REAL_ERROR_OK) | no error | | [`REAL_ERROR_FORMAT`](#ida_ieee.REAL_ERROR_FORMAT) | realcvt: not supported format for current .idp | | [`REAL_ERROR_RANGE`](#ida_ieee.REAL_ERROR_RANGE) | realcvt: number too big (small) for store (mem NOT modified) | | [`REAL_ERROR_BADDATA`](#ida_ieee.REAL_ERROR_BADDATA) | realcvt: illegal real data for load (IEEE data not filled) | | [`REAL_ERROR_FPOVER`](#ida_ieee.REAL_ERROR_FPOVER) | floating overflow or underflow | | [`REAL_ERROR_BADSTR`](#ida_ieee.REAL_ERROR_BADSTR) | asctoreal: illegal input string | | [`REAL_ERROR_ZERODIV`](#ida_ieee.REAL_ERROR_ZERODIV) | ediv: divide by 0 | | [`REAL_ERROR_INTOVER`](#ida_ieee.REAL_ERROR_INTOVER) | eetol\*: integer overflow | | [`cvar`](#ida_ieee.cvar) | | | [`MAXEXP_FLOAT`](#ida_ieee.MAXEXP_FLOAT) | | | [`MAXEXP_DOUBLE`](#ida_ieee.MAXEXP_DOUBLE) | | | [`MAXEXP_LNGDBL`](#ida_ieee.MAXEXP_LNGDBL) | | | [`IEEE_EXONE`](#ida_ieee.IEEE_EXONE) | The exponent of 1.0. | | [`E_SPECIAL_EXP`](#ida_ieee.E_SPECIAL_EXP) | Exponent in fpvalue_t for NaN and Inf. | | [`IEEE_NI`](#ida_ieee.IEEE_NI) | Number of 16 bit words in eNI. | | [`IEEE_E`](#ida_ieee.IEEE_E) | Array offset to exponent. | | [`IEEE_M`](#ida_ieee.IEEE_M) | Array offset to high guard word | | [`EZERO`](#ida_ieee.EZERO) | | | [`EONE`](#ida_ieee.EONE) | | | [`ETWO`](#ida_ieee.ETWO) | | ## Classes | [`fpvalue_shorts_array_t`](#ida_ieee.fpvalue_shorts_array_t) | | |----------------------------------------------------------------|----| | [`fpvalue_t`](#ida_ieee.fpvalue_t) | | ## Functions | [`ecleaz`](#ida_ieee.ecleaz)(→ None) | | |----------------------------------------|----| ## Module Contents ### *class* ida_ieee.fpvalue_shorts_array_t(data: unsigned short (&)[FPVAL_NWORDS]) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### data *: unsigned short (&)[FPVAL_NWORDS]* #### bytes ### ida_ieee.FPVAL_NWORDS number of words in fpvalue_t ### ida_ieee.FPV_BADARG wrong value of max_exp ### ida_ieee.FPV_NORM regular value ### ida_ieee.FPV_NAN NaN. ### ida_ieee.FPV_PINF positive infinity ### ida_ieee.FPV_NINF negative infinity ### ida_ieee.REAL_ERROR_OK no error ### ida_ieee.REAL_ERROR_FORMAT realcvt: not supported format for current .idp ### ida_ieee.REAL_ERROR_RANGE realcvt: number too big (small) for store (mem NOT modified) ### ida_ieee.REAL_ERROR_BADDATA realcvt: illegal real data for load (IEEE data not filled) ### ida_ieee.REAL_ERROR_FPOVER floating overflow or underflow ### ida_ieee.REAL_ERROR_BADSTR asctoreal: illegal input string ### ida_ieee.REAL_ERROR_ZERODIV ediv: divide by 0 ### ida_ieee.REAL_ERROR_INTOVER eetol\*: integer overflow ### *class* ida_ieee.fpvalue_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### w *: uint16[8]* #### clear() → [None](https://docs.python.org/3/library/constants.html#None) #### compare(r: [fpvalue_t](#ida_ieee.fpvalue_t)) → [int](https://docs.python.org/3/library/functions.html#int) #### from_10bytes(fpval: void const \*) → fpvalue_error_t Conversions for 10-byte floating point values. #### to_10bytes(fpval: void \*) → fpvalue_error_t #### from_12bytes(fpval: void const \*) → fpvalue_error_t Conversions for 12-byte floating point values. #### to_12bytes(fpval: void \*) → fpvalue_error_t #### to_str(\*args) → [None](https://docs.python.org/3/library/constants.html#None) Convert IEEE to string. * **Parameters:** * **buf** – the output buffer * **bufsize** – the size of the output buffer * **mode** – broken down into: * low byte: number of digits after ‘.’ * second byte: FPNUM_LENGTH * third byte: FPNUM_DIGITS #### from_sval(x: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) Convert integer to IEEE. #### from_int64(x: int64) → [None](https://docs.python.org/3/library/constants.html#None) #### from_uint64(x: uint64) → [None](https://docs.python.org/3/library/constants.html#None) #### to_sval(round: [bool](https://docs.python.org/3/library/functions.html#bool) = False) → fpvalue_error_t Convert IEEE to integer (+-0.5 if round). #### to_int64(round: [bool](https://docs.python.org/3/library/functions.html#bool) = False) → fpvalue_error_t #### to_uint64(round: [bool](https://docs.python.org/3/library/functions.html#bool) = False) → fpvalue_error_t #### fadd(y: [fpvalue_t](#ida_ieee.fpvalue_t)) → fpvalue_error_t Arithmetic operations. #### fsub(y: [fpvalue_t](#ida_ieee.fpvalue_t)) → fpvalue_error_t #### fmul(y: [fpvalue_t](#ida_ieee.fpvalue_t)) → fpvalue_error_t #### fdiv(y: [fpvalue_t](#ida_ieee.fpvalue_t)) → fpvalue_error_t #### mul_pow2(power_of_2: [int](https://docs.python.org/3/library/functions.html#int)) → fpvalue_error_t Multiply by a power of 2. #### eabs() → [None](https://docs.python.org/3/library/constants.html#None) Calculate absolute value. #### is_negative() → [bool](https://docs.python.org/3/library/functions.html#bool) Is negative value? #### negate() → [None](https://docs.python.org/3/library/constants.html#None) Negate. #### get_kind() → fpvalue_kind_t Get value kind. #### copy() → [fpvalue_t](#ida_ieee.fpvalue_t) #### *static* new_from_str(p: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [fpvalue_t](#ida_ieee.fpvalue_t) #### from_str(p: [str](https://docs.python.org/3/library/stdtypes.html#str)) → fpvalue_error_t Convert string to IEEE. #### assign(r: [fpvalue_t](#ida_ieee.fpvalue_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### bytes #### shorts #### float #### *property* sval #### *property* int64 #### *property* uint64 ### ida_ieee.cvar ### ida_ieee.MAXEXP_FLOAT ### ida_ieee.MAXEXP_DOUBLE ### ida_ieee.MAXEXP_LNGDBL ### ida_ieee.IEEE_EXONE The exponent of 1.0. ### ida_ieee.E_SPECIAL_EXP Exponent in fpvalue_t for NaN and Inf. ### ida_ieee.IEEE_NI Number of 16 bit words in eNI. ### ida_ieee.IEEE_E Array offset to exponent. ### ida_ieee.IEEE_M Array offset to high guard word ### ida_ieee.ecleaz(x: eNI) → [None](https://docs.python.org/3/library/constants.html#None) ### ida_ieee.EZERO *= b'\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00'* ### ida_ieee.EONE *= b'\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x80\\xff?'* ### ida_ieee.ETWO *= b'\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x80\\x00@'* # index.html.md # custom_viewer summary: create custom listings in IDA description: : How to create simple listings, that will share many of the features as the built-in IDA widgets (highlighting, copy & paste, notifications, …)
In addition, creates actions that will be bound to the freshly-created widget (using ida_kernwin.attach_action_to_popup.) keywords: listing, actions level: intermediate ## Attributes | [`actions_variants`](#custom_viewer.actions_variants) | | |---------------------------------------------------------|----| | [`actname`](#custom_viewer.actname) | | | [`mycv`](#custom_viewer.mycv) | | ## Classes | [`say_something_handler_t`](#custom_viewer.say_something_handler_t) | | |-----------------------------------------------------------------------|-------------------------------------------------------| | [`mycv_t`](#custom_viewer.mycv_t) | The base class for implementing simple custom viewers | ## Functions | [`show_win`](#custom_viewer.show_win)() | | |--------------------------------------------|----| | [`make_many`](#custom_viewer.make_many)(n) | | ## Module Contents ### *class* custom_viewer.say_something_handler_t(thing) Bases: [`ida_kernwin.action_handler_t`](../ida_kernwin/index.md#ida_kernwin.action_handler_t) #### thing #### activate(ctx) Activate an action. This function implements the core behavior of an action. It is called when the action is triggered, from a menu, from a popup menu, from the toolbar, or programmatically. * **Returns:** non-zero: all IDA windows will be refreshed #### update(ctx) Update an action. This is called when the context of the UI changed, and we need to let the action update some of its properties if needed (label, icon, …) In addition, this lets IDA know whether the action is enabled, and when it should be queried for availability again. Note: This callback is not meant to change anything in the application’s state, except by calling one (or many) of the “update_action_\*()” functions on this very action. #### *static* compose_action_name(v) ### custom_viewer.actions_variants *= ['Hello', 'World']* ### custom_viewer.actname *= 'custview:say_Hello'* ### *class* custom_viewer.mycv_t Bases: [`ida_kernwin.simplecustviewer_t`](../ida_kernwin/index.md#ida_kernwin.simplecustviewer_t) The base class for implementing simple custom viewers #### Create(sn=None, use_colors=True) Creates the custom view. This should be the first method called after instantiation * **Parameters:** **title** – The title of the view * **Returns:** Boolean whether it succeeds or fails. It may fail if a window with the same title is already open. In this case better close existing windows #### OnClick(shift) User clicked in the view :param shift: Shift flag :returns: Boolean. True if you handled the event #### OnDblClick(shift) User dbl-clicked in the view :param shift: Shift flag :returns: Boolean. True if you handled the event #### OnCursorPosChanged() Cursor position changed. :returns: Nothing #### OnClose() The view is closing. Use this event to cleanup. :returns: Nothing #### OnKeydown(vkey, shift) User pressed a key :param vkey: Virtual key code :param shift: Shift flag :returns: Boolean. True if you handled the event #### OnHint(lineno) Hint requested for the given line number. * **Parameters:** **lineno** – The line number (zero based) * **Returns:** tuple(number of important lines, hint string), or None: if no hint available #### Show(\*args) Shows an already created view. It the view was closed, then it will call Create() for you :returns: Boolean ### custom_viewer.show_win() ### custom_viewer.mycv *= None* ### custom_viewer.make_many(n) # index.html.md # ida_frame Routines to manipulate function stack frames, stack variables, register variables and local labels. The frame is represented as a structure: ```default +------------------------------------------------+ | function arguments | +------------------------------------------------+ | return address (isn't stored in func_t) | +------------------------------------------------+ | saved registers (SI, DI, etc - func_t::frregs) | +------------------------------------------------+ <- typical BP | | | | | | func_t::fpd | | | | | <- real BP | local variables (func_t::frsize) | | | | | +------------------------------------------------+ <- SP ``` To access the structure of a function frame and stack variables, use: * tinfo_t::get_func_frame(const func_t ``` * ``` pfn) (the preferred way) * get_func_frame(tinfo_t ``` * ``` out, const func_t ``` * ``` pfn) * tinfo_t::get_udt_details() gives info about stack variables: their type, names, offset, etc ## Attributes | [`FRAME_UDM_NAME_R`](#ida_frame.FRAME_UDM_NAME_R) | | |-----------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------| | [`FRAME_UDM_NAME_S`](#ida_frame.FRAME_UDM_NAME_S) | | | [`FPC_ARGS`](#ida_frame.FPC_ARGS) | | | [`FPC_RETADDR`](#ida_frame.FPC_RETADDR) | | | [`FPC_SAVREGS`](#ida_frame.FPC_SAVREGS) | | | [`FPC_LVARS`](#ida_frame.FPC_LVARS) | | | [`STKVAR_VALID_SIZE`](#ida_frame.STKVAR_VALID_SIZE) | x.dtype contains correct variable type (for insns like 'lea' this bit must be off). In general, dr_O references do not allow to determine the variable size | | [`STKVAR_KEEP_EXISTING`](#ida_frame.STKVAR_KEEP_EXISTING) | if a stack variable for this operand already exists then we do not create a new variable | | [`REGVAR_ERROR_OK`](#ida_frame.REGVAR_ERROR_OK) | all ok | | [`REGVAR_ERROR_ARG`](#ida_frame.REGVAR_ERROR_ARG) | function arguments are bad | | [`REGVAR_ERROR_RANGE`](#ida_frame.REGVAR_ERROR_RANGE) | the definition range is bad | | [`REGVAR_ERROR_NAME`](#ida_frame.REGVAR_ERROR_NAME) | the provided name(s) can't be accepted | | [`add_frame`](#id0) | | | [`del_frame`](#id23) | | | [`set_frame_size`](#id24) | | | [`get_frame_size`](#id25) | | | [`get_frame_retsize`](#id26) | | | [`get_frame_part`](#id27) | | | [`get_func_frame`](#id28) | | | [`soff_to_fpoff`](#id29) | | | [`update_fpd`](#id30) | | | [`define_stkvar`](#id31) | | | [`add_frame_member`](#id32) | | | [`set_frame_member_type`](#id33) | | | [`delete_frame_members`](#id34) | | | [`build_stkvar_name`](#id35) | | | [`calc_stkvar_struc_offset`](#id36) | | | [`calc_frame_offset`](#id37) | | | [`add_regvar`](#id38) | | | [`find_regvar`](#id39) | | | [`rename_regvar`](#id40) | | | [`set_regvar_cmt`](#id41) | | | [`del_regvar`](#id42) | | | [`has_regvar`](#id43) | | | [`add_auto_stkpnt`](#id44) | | | [`del_stkpnt`](#id45) | | | [`get_spd`](#id46) | | | [`get_effective_spd`](#id47) | | | [`get_sp_delta`](#id48) | | | [`set_auto_spd`](#id49) | | | [`recalc_spd_for_basic_block`](#id50) | | | [`build_stkvar_xrefs`](#id51) | | | [`frame_off_args`](#id52) | | | [`frame_off_retaddr`](#id53) | | | [`frame_off_savregs`](#id54) | | | [`frame_off_lvars`](#id55) | | | [`is_funcarg_off`](#id56) | | | [`lvar_off`](#id57) | | ## Classes | [`stkpnts_template_t`](#ida_frame.stkpnts_template_t) | | |---------------------------------------------------------|----| | [`xreflist_t`](#ida_frame.xreflist_t) | | | [`regvars_t`](#ida_frame.regvars_t) | | | [`llabels_t`](#ida_frame.llabels_t) | | | [`stkpnt_t`](#ida_frame.stkpnt_t) | | | [`stkpnts_t`](#ida_frame.stkpnts_t) | | | [`llabel_t`](#ida_frame.llabel_t) | | | [`regvar_t`](#ida_frame.regvar_t) | | | [`xreflist_entry_t`](#ida_frame.xreflist_entry_t) | | ## Functions | [`is_funcarg_off`](#id56) | | |--------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [`lvar_off`](#id57) | | | [`is_funcarg_off_ea`](#ida_frame.is_funcarg_off_ea)(→ bool) | | | [`lvar_off_ea`](#ida_frame.lvar_off_ea)(→ int) | | | [`add_frame`](#id0) | | | [`del_frame`](#id23) | | | [`set_frame_size`](#id24) | | | [`get_frame_size`](#id25) | | | [`get_frame_retsize`](#id26) | | | [`get_frame_part`](#id27) | | | [`get_func_frame`](#id28) | | | [`soff_to_fpoff`](#id29) | | | [`update_fpd`](#id30) | | | [`set_purged`](#ida_frame.set_purged)(→ bool) | Set the number of purged bytes for a function or data item (funcptr). This function will update the database and plan to reanalyze items referencing the specified address. It works only for processors with PR_PURGING bit in 16 and 32 bit modes. | | [`define_stkvar`](#id31) | | | [`add_frame_member`](#id32) | | | [`is_anonymous_member_name`](#ida_frame.is_anonymous_member_name)(→ bool) | Is member name prefixed with "anonymous"? | | [`is_dummy_member_name`](#ida_frame.is_dummy_member_name)(→ bool) | Is member name an auto-generated name? | | [`is_special_frame_member`](#ida_frame.is_special_frame_member)(→ bool) | Is stkvar with TID the return address slot or the saved registers slot ? | | [`set_frame_member_type`](#id33) | | | [`delete_frame_members`](#id34) | | | [`build_stkvar_name`](#id35) | | | [`calc_stkvar_struc_offset`](#id36) | | | [`calc_frame_offset`](#id37) | | | [`regvar_t__compare`](#ida_frame.regvar_t__compare)(→ int) | | | [`free_regvar`](#ida_frame.free_regvar)(→ None) | | | [`add_regvar`](#id38) | | | [`find_regvar`](#id39) | | | [`rename_regvar`](#id40) | | | [`set_regvar_cmt`](#id41) | | | [`del_regvar`](#id42) | | | [`add_auto_stkpnt`](#id44) | | | [`add_user_stkpnt`](#ida_frame.add_user_stkpnt)(→ bool) | Add user-defined SP register change point. | | [`del_stkpnt`](#id45) | | | [`get_spd`](#id46) | | | [`get_effective_spd`](#id47) | | | [`get_sp_delta`](#id48) | | | [`set_auto_spd`](#id49) | | | [`recalc_spd`](#ida_frame.recalc_spd)(→ bool) | Recalculate SP delta for an instruction that stops execution. The next instruction is not reached from the current instruction. We need to recalculate SP for the next instruction. | | [`recalc_spd_for_basic_block`](#id50) | | | [`build_stkvar_xrefs`](#id51) | | | [`add_frame_ea`](#ida_frame.add_frame_ea)(→ bool) | Add function frame. | | [`del_frame_ea`](#ida_frame.del_frame_ea)(→ bool) | Delete a function frame. | | [`set_frame_size_ea`](#ida_frame.set_frame_size_ea)(→ bool) | Set size of function frame. | | [`get_frame_size_ea`](#ida_frame.get_frame_size_ea)(→ asize_t) | Get full size of a function frame. This function takes into account size of local variables + size of saved registers + size of return address + number of purged bytes. | | [`get_frame_retsize_ea`](#ida_frame.get_frame_retsize_ea)(→ int) | Get size of function return address. | | [`get_frame_part_ea`](#ida_frame.get_frame_part_ea)(→ bool) | Get offsets of the frame part in the frame. | | [`frame_off_args_ea`](#ida_frame.frame_off_args_ea)(→ ida_idaapi.ea_t) | Get starting address of arguments section | | [`frame_off_retaddr_ea`](#ida_frame.frame_off_retaddr_ea)(→ ida_idaapi.ea_t) | Get starting address of return address section | | [`frame_off_savregs_ea`](#ida_frame.frame_off_savregs_ea)(→ ida_idaapi.ea_t) | Get starting address of saved registers section | | [`frame_off_lvars_ea`](#ida_frame.frame_off_lvars_ea)(→ ida_idaapi.ea_t) | Get start address of local variables section | | [`frame_off_args`](#id52) | | | [`frame_off_retaddr`](#id53) | | | [`frame_off_savregs`](#id54) | | | [`frame_off_lvars`](#id55) | | | [`get_func_frame_ea`](#ida_frame.get_func_frame_ea)(→ bool) | Get type of function frame | | [`soff_to_fpoff_ea`](#ida_frame.soff_to_fpoff_ea)(→ int) | Convert struct offsets into fp-relative offsets. | | [`update_fpd_ea`](#ida_frame.update_fpd_ea)(→ bool) | Update frame pointer delta. | | [`define_stkvar_ea`](#ida_frame.define_stkvar_ea)(→ bool) | Define/redefine a stack variable. | | [`add_frame_member_ea`](#ida_frame.add_frame_member_ea)(→ bool) | Add member to the frame type | | [`set_frame_member_type_ea`](#ida_frame.set_frame_member_type_ea)(→ bool) | Change type of the frame member | | [`delete_frame_members_ea`](#ida_frame.delete_frame_members_ea)(→ bool) | Delete frame members | | [`build_stkvar_name_ea`](#ida_frame.build_stkvar_name_ea)(→ Union[str, None]) | Build automatic stack variable name. | | [`calc_stkvar_struc_offset_ea`](#ida_frame.calc_stkvar_struc_offset_ea)(→ ida_idaapi.ea_t) | Calculate offset of stack variable in the frame structure. | | [`calc_frame_offset_ea`](#ida_frame.calc_frame_offset_ea)(→ int) | Calculate the offset of stack variable in the frame. | | [`delete_wrong_frame_info_ea`](#ida_frame.delete_wrong_frame_info_ea)() → int) | Find and delete wrong frame info. Namely, we delete: | | [`build_stkvar_xrefs_ea`](#ida_frame.build_stkvar_xrefs_ea)(→ None) | Fill 'out' with a list of all the xrefs from a function to the specified range of the function's stack frame. | | [`add_func_regvar`](#ida_frame.add_func_regvar)(→ int) | Define a register variable. | | [`find_func_regvar`](#ida_frame.find_func_regvar)(→ ssize_t) | This function has the following signatures: | | [`has_func_regvar`](#ida_frame.has_func_regvar)(→ bool) | Is there a register variable definition? | | [`has_regvar`](#id43) | | | [`rename_func_regvar`](#ida_frame.rename_func_regvar)(→ int) | Rename a register variable. | | [`set_func_regvar_cmt`](#ida_frame.set_func_regvar_cmt)(→ int) | Set comment for a register variable. | | [`set_func_regvar_range`](#ida_frame.set_func_regvar_range)(→ int) | Update the address range of a register variable by index. Only the range is changed; to rename a regvar or change its comment use rename_func_regvar()/set_func_regvar_cmt(). The new range must be well-formed (start_ea < end_ea) and must keep the function's register variables sorted by start_ea. | | [`del_func_regvar`](#ida_frame.del_func_regvar)(→ int) | Delete a register variable definition. | | [`get_func_regvar_qty`](#ida_frame.get_func_regvar_qty)(→ int) | Get the number of register variables for a function. | | [`get_func_regvars`](#ida_frame.get_func_regvars)(→ bool) | Get all register variables for a function. | | [`get_func_regvar`](#ida_frame.get_func_regvar)(→ bool) | Get a copy of a register variable by index. | | [`add_func_auto_stkpnt`](#ida_frame.add_func_auto_stkpnt)(→ bool) | Add automatic SP register change point. | | [`del_func_stkpnt`](#ida_frame.del_func_stkpnt)(→ bool) | Delete SP register change point. | | [`get_func_spd`](#ida_frame.get_func_spd)(→ int) | Get difference between the initial and current values of ESP. | | [`get_func_effective_spd`](#ida_frame.get_func_effective_spd)(→ int) | Get effective difference between the initial and current values of ESP. This function returns the sp-diff used by the instruction. The difference between get_func_spd() and get_func_effective_spd() is present only for instructions like "pop [esp+N]": they modify sp and use the modified value. | | [`get_func_sp_delta`](#ida_frame.get_func_sp_delta)(→ int) | Get modification of SP made at the specified location | | [`set_func_auto_spd`](#ida_frame.set_func_auto_spd)(→ bool) | Set the cumulative SP delta at the given address. | | [`recalc_func_spd_for_basic_block`](#ida_frame.recalc_func_spd_for_basic_block)(→ bool) | Recalculate SP delta for the current instruction. The typical code snippet to calculate SP delta in a proc module is: | | [`get_func_stkpnt_qty`](#ida_frame.get_func_stkpnt_qty)(→ int) | Get the number of SP change points for a function. | | [`get_func_stkpnts`](#ida_frame.get_func_stkpnts)(→ bool) | Get all SP change points for a function. | | [`get_func_llabel_qty`](#ida_frame.get_func_llabel_qty)(→ int) | Get the number of local labels for a function. | | [`get_func_llabels`](#ida_frame.get_func_llabels)(→ bool) | Get all local labels for a function. | ## Module Contents ### *class* ida_frame.stkpnts_template_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### push_back(\*args) → stkpnt_t & #### pop_back() → [None](https://docs.python.org/3/library/constants.html#None) #### size() → [int](https://docs.python.org/3/library/functions.html#int) #### empty() → [bool](https://docs.python.org/3/library/functions.html#bool) #### at(\_idx: [int](https://docs.python.org/3/library/functions.html#int)) → stkpnt_t const & #### qclear() → [None](https://docs.python.org/3/library/constants.html#None) #### clear() → [None](https://docs.python.org/3/library/constants.html#None) #### resize(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### grow(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### capacity() → [int](https://docs.python.org/3/library/functions.html#int) #### reserve(cnt: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### truncate() → [None](https://docs.python.org/3/library/constants.html#None) #### swap(r: [stkpnts_template_t](#ida_frame.stkpnts_template_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extract() → stkpnt_t \* #### inject(s: [stkpnt_t](#ida_frame.stkpnt_t), len: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### begin(\*args) → qvector< stkpnt_t >::const_iterator #### end(\*args) → qvector< stkpnt_t >::const_iterator #### insert(it: [stkpnt_t](#ida_frame.stkpnt_t), x: [stkpnt_t](#ida_frame.stkpnt_t)) → qvector< stkpnt_t >::iterator #### erase(\*args) → qvector< stkpnt_t >::iterator #### find(\*args) → qvector< stkpnt_t >::const_iterator #### has(x: [stkpnt_t](#ida_frame.stkpnt_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### add_unique(x: [stkpnt_t](#ida_frame.stkpnt_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### append(x: [stkpnt_t](#ida_frame.stkpnt_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extend(x: [stkpnts_template_t](#ida_frame.stkpnts_template_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### front #### back ### *class* ida_frame.xreflist_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### push_back(\*args) → xreflist_entry_t & #### pop_back() → [None](https://docs.python.org/3/library/constants.html#None) #### size() → [int](https://docs.python.org/3/library/functions.html#int) #### empty() → [bool](https://docs.python.org/3/library/functions.html#bool) #### at(\_idx: [int](https://docs.python.org/3/library/functions.html#int)) → xreflist_entry_t const & #### qclear() → [None](https://docs.python.org/3/library/constants.html#None) #### clear() → [None](https://docs.python.org/3/library/constants.html#None) #### resize(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### grow(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### capacity() → [int](https://docs.python.org/3/library/functions.html#int) #### reserve(cnt: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### truncate() → [None](https://docs.python.org/3/library/constants.html#None) #### swap(r: [xreflist_t](#ida_frame.xreflist_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extract() → xreflist_entry_t \* #### inject(s: [xreflist_entry_t](#ida_frame.xreflist_entry_t), len: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### begin(\*args) → qvector< xreflist_entry_t >::const_iterator #### end(\*args) → qvector< xreflist_entry_t >::const_iterator #### insert(it: [xreflist_entry_t](#ida_frame.xreflist_entry_t), x: [xreflist_entry_t](#ida_frame.xreflist_entry_t)) → qvector< xreflist_entry_t >::iterator #### erase(\*args) → qvector< xreflist_entry_t >::iterator #### find(\*args) → qvector< xreflist_entry_t >::const_iterator #### has(x: [xreflist_entry_t](#ida_frame.xreflist_entry_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### add_unique(x: [xreflist_entry_t](#ida_frame.xreflist_entry_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### append(x: [xreflist_entry_t](#ida_frame.xreflist_entry_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extend(x: [xreflist_t](#ida_frame.xreflist_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### front #### back ### *class* ida_frame.regvars_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### push_back(\*args) → regvar_t & #### pop_back() → [None](https://docs.python.org/3/library/constants.html#None) #### size() → [int](https://docs.python.org/3/library/functions.html#int) #### empty() → [bool](https://docs.python.org/3/library/functions.html#bool) #### at(\_idx: [int](https://docs.python.org/3/library/functions.html#int)) → regvar_t const & #### qclear() → [None](https://docs.python.org/3/library/constants.html#None) #### clear() → [None](https://docs.python.org/3/library/constants.html#None) #### resize(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### grow(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### capacity() → [int](https://docs.python.org/3/library/functions.html#int) #### reserve(cnt: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### truncate() → [None](https://docs.python.org/3/library/constants.html#None) #### swap(r: [regvars_t](#ida_frame.regvars_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extract() → regvar_t \* #### inject(s: [regvar_t](#ida_frame.regvar_t), len: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### begin(\*args) → qvector< regvar_t >::const_iterator #### end(\*args) → qvector< regvar_t >::const_iterator #### insert(it: [regvar_t](#ida_frame.regvar_t), x: [regvar_t](#ida_frame.regvar_t)) → qvector< regvar_t >::iterator #### erase(\*args) → qvector< regvar_t >::iterator #### find(\*args) → qvector< regvar_t >::const_iterator #### has(x: [regvar_t](#ida_frame.regvar_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### add_unique(x: [regvar_t](#ida_frame.regvar_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### append(x: [regvar_t](#ida_frame.regvar_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extend(x: [regvars_t](#ida_frame.regvars_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### front #### back ### *class* ida_frame.llabels_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### push_back(\*args) → llabel_t & #### pop_back() → [None](https://docs.python.org/3/library/constants.html#None) #### size() → [int](https://docs.python.org/3/library/functions.html#int) #### empty() → [bool](https://docs.python.org/3/library/functions.html#bool) #### at(\_idx: [int](https://docs.python.org/3/library/functions.html#int)) → llabel_t const & #### qclear() → [None](https://docs.python.org/3/library/constants.html#None) #### clear() → [None](https://docs.python.org/3/library/constants.html#None) #### resize(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### grow(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### capacity() → [int](https://docs.python.org/3/library/functions.html#int) #### reserve(cnt: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### truncate() → [None](https://docs.python.org/3/library/constants.html#None) #### swap(r: [llabels_t](#ida_frame.llabels_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extract() → llabel_t \* #### inject(s: [llabel_t](#ida_frame.llabel_t), len: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### begin(\*args) → qvector< llabel_t >::const_iterator #### end(\*args) → qvector< llabel_t >::const_iterator #### insert(it: [llabel_t](#ida_frame.llabel_t), x: [llabel_t](#ida_frame.llabel_t)) → qvector< llabel_t >::iterator #### erase(\*args) → qvector< llabel_t >::iterator #### find(\*args) → qvector< llabel_t >::const_iterator #### has(x: [llabel_t](#ida_frame.llabel_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### add_unique(x: [llabel_t](#ida_frame.llabel_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### append(x: [llabel_t](#ida_frame.llabel_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extend(x: [llabels_t](#ida_frame.llabels_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### front #### back ### ida_frame.is_funcarg_off(pfn: func_t const \*, frameoff: int) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_frame.lvar_off(pfn: func_t const \*, frameoff: int) → [int](https://docs.python.org/3/library/functions.html#int) ### ida_frame.is_funcarg_off_ea(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), frameoff: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_frame.lvar_off_ea(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), frameoff: [int](https://docs.python.org/3/library/functions.html#int)) → [int](https://docs.python.org/3/library/functions.html#int) ### ida_frame.FRAME_UDM_NAME_R ### ida_frame.FRAME_UDM_NAME_S ### *class* ida_frame.stkpnt_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### ea *: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)* #### spd *: [int](https://docs.python.org/3/library/functions.html#int)* #### compare(r: [stkpnt_t](#ida_frame.stkpnt_t)) → [int](https://docs.python.org/3/library/functions.html#int) ### *class* ida_frame.stkpnts_t Bases: [`stkpnts_template_t`](#ida_frame.stkpnts_template_t) #### thisown #### compare(r: [stkpnts_t](#ida_frame.stkpnts_t)) → [int](https://docs.python.org/3/library/functions.html#int) ### *class* ida_frame.llabel_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### ea *: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)* linear address #### name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* label name #### compare(r: [llabel_t](#ida_frame.llabel_t)) → [int](https://docs.python.org/3/library/functions.html#int) ### ida_frame.add_frame(pfn: func_t \*, frsize: int, frregs: ushort, argsize: asize_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Add function frame. * **Parameters:** * **pfn** – pointer to function structure * **frsize** – size of function local variables * **frregs** – size of saved registers * **argsize** – size of function arguments range which will be purged upon return. this parameter is used for \_\_stdcall and \_\_pascal calling conventions. for other calling conventions please pass 0. * **Returns:** 1: ok * **Returns:** 0: failed (no function, frame already exists) ### ida_frame.del_frame(pfn: func_t \*) → [bool](https://docs.python.org/3/library/functions.html#bool) Delete a function frame. * **Parameters:** **pfn** – pointer to function structure * **Returns:** success ### ida_frame.set_frame_size(pfn: func_t \*, frsize: asize_t, frregs: ushort, argsize: asize_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Set size of function frame. * **Parameters:** * **pfn** – pointer to function structure * **frsize** – size of function local variables * **frregs** – size of saved registers * **argsize** – size of function arguments that will be purged from the stack upon return * **Returns:** success ### ida_frame.get_frame_size(pfn: func_t const \*) → asize_t Get full size of a function frame. * **Parameters:** **pfn** – pointer to function structure, may be nullptr * **Returns:** size of frame in bytes or zero ### ida_frame.get_frame_retsize(pfn: func_t const \*) → [int](https://docs.python.org/3/library/functions.html#int) Get size of function return address. * **Parameters:** **pfn** – pointer to function structure, can’t be nullptr ### ida_frame.FPC_ARGS ### ida_frame.FPC_RETADDR ### ida_frame.FPC_SAVREGS ### ida_frame.FPC_LVARS ### ida_frame.get_frame_part(range: range_t, pfn: func_t const \*, part: frame_part_t) → [None](https://docs.python.org/3/library/constants.html#None) Get offsets of the frame part in the frame. * **Parameters:** * **range** – pointer to the output buffer with the frame part start/end(exclusive) offsets, can’t be nullptr * **pfn** – pointer to function structure, can’t be nullptr * **part** – frame part ### ida_frame.get_func_frame(out: tinfo_t, pfn: func_t const \*) → [bool](https://docs.python.org/3/library/functions.html#bool) Get type of function frame * **Parameters:** * **out** – type info * **pfn** – pointer to function structure * **Returns:** success ### ida_frame.soff_to_fpoff(pfn: func_t \*, soff: int) → [int](https://docs.python.org/3/library/functions.html#int) Convert struct offsets into fp-relative offsets. ### ida_frame.update_fpd(pfn: func_t \*, fpd: asize_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Update frame pointer delta. * **Parameters:** * **pfn** – pointer to function structure * **fpd** – new fpd value. cannot be bigger than the local variable range size. * **Returns:** success ### ida_frame.set_purged(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), nbytes: [int](https://docs.python.org/3/library/functions.html#int), override_old_value: [bool](https://docs.python.org/3/library/functions.html#bool)) → [bool](https://docs.python.org/3/library/functions.html#bool) Set the number of purged bytes for a function or data item (funcptr). This function will update the database and plan to reanalyze items referencing the specified address. It works only for processors with PR_PURGING bit in 16 and 32 bit modes. * **Parameters:** * **ea** – address of the function of item * **nbytes** – number of purged bytes * **override_old_value** – may overwrite old information about purged bytes * **Returns:** success ### ida_frame.STKVAR_VALID_SIZE x.dtype contains correct variable type (for insns like ‘lea’ this bit must be off). In general, dr_O references do not allow to determine the variable size ### ida_frame.STKVAR_KEEP_EXISTING if a stack variable for this operand already exists then we do not create a new variable ### ida_frame.define_stkvar(pfn: func_t \*, name: str, off: int, tif: tinfo_t, repr: value_repr_t = None) → [bool](https://docs.python.org/3/library/functions.html#bool) Define/redefine a stack variable. * **Parameters:** * **pfn** – pointer to function * **name** – variable name, nullptr means autogenerate a name * **off** – offset of the stack variable in the frame. negative values denote local variables, positive - function arguments. * **tif** – variable type * **repr** – variable representation * **Returns:** success ### ida_frame.add_frame_member(pfn: func_t const \*, name: str, offset: int, tif: tinfo_t, repr: value_repr_t = None, etf_flags: uint = 0) → [bool](https://docs.python.org/3/library/functions.html#bool) Add member to the frame type * **Parameters:** * **pfn** – pointer to function * **name** – variable name, nullptr means autogenerate a name * **offset** – member offset in the frame structure, in bytes * **tif** – variable type * **repr** – variable representation * **Returns:** success ### ida_frame.is_anonymous_member_name(name: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [bool](https://docs.python.org/3/library/functions.html#bool) Is member name prefixed with “anonymous”? ### ida_frame.is_dummy_member_name(name: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [bool](https://docs.python.org/3/library/functions.html#bool) Is member name an auto-generated name? ### ida_frame.is_special_frame_member(tid: tid_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Is stkvar with TID the return address slot or the saved registers slot ? * **Parameters:** **tid** – frame member type id return address or saved registers member? ### ida_frame.set_frame_member_type(pfn: func_t const \*, offset: int, tif: tinfo_t, repr: value_repr_t = None, etf_flags: uint = 0) → [bool](https://docs.python.org/3/library/functions.html#bool) Change type of the frame member * **Parameters:** * **pfn** – pointer to function * **offset** – member offset in the frame structure, in bytes * **tif** – variable type * **repr** – variable representation * **Returns:** success ### ida_frame.delete_frame_members(pfn: func_t const \*, start_offset: int, end_offset: int) → [bool](https://docs.python.org/3/library/functions.html#bool) Delete frame members * **Parameters:** * **pfn** – pointer to function * **start_offset** – member offset to start deletion from, in bytes * **end_offset** – member offset which not included in the deletion, in bytes * **Returns:** success ### ida_frame.build_stkvar_name(pfn: func_t const \*, v: int) → [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None) Build automatic stack variable name. * **Parameters:** * **pfn** – pointer to function (can’t be nullptr!) * **v** – value of variable offset * **Returns:** length of stack variable name or -1 ### ida_frame.calc_stkvar_struc_offset(pfn: func_t \*, insn: insn_t const &, n: int) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) Calculate offset of stack variable in the frame structure. * **Parameters:** * **pfn** – pointer to function (cannot be nullptr) * **insn** – the instruction * **n** – 0..#UA_MAXOP-1 operand number -1 if error, return BADADDR * **Returns:** BADADDR if some error (issue a warning if stack frame is bad) ### ida_frame.calc_frame_offset(pfn: func_t \*, off: int, insn: insn_t const \* = None, op: op_t const \* = None) → [int](https://docs.python.org/3/library/functions.html#int) Calculate the offset of stack variable in the frame. * **Parameters:** * **pfn** – pointer to function (cannot be nullptr) * **off** – the offset relative to stack pointer or frame pointer * **insn** – the instruction * **op** – the operand * **Returns:** the offset in the frame ### ida_frame.regvar_t_\_compare(l: [regvar_t](#ida_frame.regvar_t), r: [regvar_t](#ida_frame.regvar_t)) → [int](https://docs.python.org/3/library/functions.html#int) ### ida_frame.free_regvar(v: [regvar_t](#ida_frame.regvar_t)) → [None](https://docs.python.org/3/library/constants.html#None) ### *class* ida_frame.regvar_t(\*args) Bases: [`ida_range.range_t`](../ida_range/index.md#ida_range.range_t) #### thisown #### canon *: char \** canonical register name (case-insensitive) #### user *: char \** user-defined register name #### cmt *: char \** comment to appear near definition #### swap(r: [regvar_t](#ida_frame.regvar_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### compare(r: [regvar_t](#ida_frame.regvar_t)) → [int](https://docs.python.org/3/library/functions.html#int) ### ida_frame.add_regvar(pfn: func_t \*, ea1: ida_idaapi.ea_t, ea2: ida_idaapi.ea_t, canon: str, user: str, cmt: str) → [int](https://docs.python.org/3/library/functions.html#int) Define a register variable. * **Parameters:** * **pfn** – function in which the definition will be created * **ea1** – range of addresses within the function where the definition will be used * **ea2** – range of addresses within the function where the definition will be used * **canon** – name of a general register * **user** – user-defined name for the register * **cmt** – comment for the definition * **Returns:** Register variable error codes ### ida_frame.find_regvar(\*args) → regvar_t \* This function has the following signatures: > 1. find_regvar(pfn: func_t > ``` > * > ``` > , ea1: ida_idaapi.ea_t, ea2: ida_idaapi.ea_t, canon: str, user: str) -> DEPRECATED regvar_t \* > 2. find_regvar(pfn: func_t > ``` > * > ``` > , ea: ida_idaapi.ea_t, canon: str) -> DEPRECATED regvar_t \* # 0: find_regvar(pfn: func_t ``` * ``` , ea1: ida_idaapi.ea_t, ea2: ida_idaapi.ea_t, canon: str, user: str) -> DEPRECATED regvar_t \* Find a register variable definition (powerful version). * **Returns:** nullptr-not found, otherwise ptr to regvar_t # 1: find_regvar(pfn: func_t ``` * ``` , ea: ida_idaapi.ea_t, canon: str) -> DEPRECATED regvar_t \* Find a register variable definition. * **Returns:** nullptr-not found, otherwise ptr to regvar_t ### ida_frame.rename_regvar(pfn: func_t \*, v: regvar_t, user: str) → [int](https://docs.python.org/3/library/functions.html#int) Rename a register variable. * **Parameters:** * **pfn** – function in question * **v** – variable to rename * **user** – new user-defined name for the register * **Returns:** Register variable error codes ### ida_frame.set_regvar_cmt(pfn: func_t \*, v: regvar_t, cmt: str) → [int](https://docs.python.org/3/library/functions.html#int) Set comment for a register variable. * **Parameters:** * **pfn** – function in question * **v** – variable to rename * **cmt** – new comment * **Returns:** Register variable error codes ### ida_frame.del_regvar(pfn: func_t \*, ea1: ida_idaapi.ea_t, ea2: ida_idaapi.ea_t, canon: str) → [int](https://docs.python.org/3/library/functions.html#int) Delete a register variable definition. * **Parameters:** * **pfn** – function in question * **ea1** – range of addresses within the function where the definition holds * **ea2** – range of addresses within the function where the definition holds * **canon** – name of a general register * **Returns:** Register variable error codes ### ida_frame.add_auto_stkpnt(pfn: func_t \*, ea: ida_idaapi.ea_t, delta: int) → [bool](https://docs.python.org/3/library/functions.html#bool) Add automatic SP register change point. * **Parameters:** * **pfn** – pointer to the function. may be nullptr. * **ea** – linear address where SP changes. usually this is the end of the instruction which modifies the stack pointer ( insn_t::ea+ insn_t::size) * **delta** – difference between old and new values of SP * **Returns:** success ### ida_frame.add_user_stkpnt(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), delta: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) Add user-defined SP register change point. * **Parameters:** * **ea** – linear address where SP changes * **delta** – difference between old and new values of SP * **Returns:** success ### ida_frame.del_stkpnt(pfn: func_t \*, ea: ida_idaapi.ea_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Delete SP register change point. * **Parameters:** * **pfn** – pointer to the function. may be nullptr. * **ea** – linear address * **Returns:** success ### ida_frame.get_spd(pfn: func_t \*, ea: ida_idaapi.ea_t) → [int](https://docs.python.org/3/library/functions.html#int) Get difference between the initial and current values of ESP. * **Parameters:** * **pfn** – pointer to the function. may be nullptr. * **ea** – linear address of the instruction * **Returns:** 0 or the difference, usually a negative number. returns the sp-diff before executing the instruction. ### ida_frame.get_effective_spd(pfn: func_t \*, ea: ida_idaapi.ea_t) → [int](https://docs.python.org/3/library/functions.html#int) Get effective difference between the initial and current values of ESP. * **Parameters:** * **pfn** – pointer to the function. may be nullptr. * **ea** – linear address * **Returns:** 0 or the difference, usually a negative number ### ida_frame.get_sp_delta(pfn: func_t \*, ea: ida_idaapi.ea_t) → [int](https://docs.python.org/3/library/functions.html#int) Get modification of SP made at the specified location * **Parameters:** * **pfn** – pointer to the function. may be nullptr. * **ea** – linear address * **Returns:** 0 if the specified location doesn’t contain a SP change point. otherwise return delta of SP modification. ### ida_frame.set_auto_spd(pfn: func_t \*, ea: ida_idaapi.ea_t, new_spd: int) → [bool](https://docs.python.org/3/library/functions.html#bool) Add such an automatic SP register change point so that at EA the new cumulative SP delta (that is, the difference between the initial and current values of SP) would be equal to NEW_SPD. * **Parameters:** * **pfn** – pointer to the function. may be nullptr. * **ea** – linear address of the instruction * **new_spd** – new value of the cumulative SP delta * **Returns:** success ### ida_frame.recalc_spd(cur_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Recalculate SP delta for an instruction that stops execution. The next instruction is not reached from the current instruction. We need to recalculate SP for the next instruction. This function will create a new automatic SP register change point if necessary. It should be called from the emulator (emu.cpp) when auto_state == AU_USED if the current instruction doesn’t pass the execution flow to the next instruction. * **Parameters:** **cur_ea** – linear address of the current instruction * **Returns:** 1: new stkpnt is added * **Returns:** 0: nothing is changed ### ida_frame.recalc_spd_for_basic_block(pfn: func_t \*, cur_ea: ida_idaapi.ea_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Recalculate SP delta for the current instruction. if ( may_trace_sp() && pfn != nullptr ) : if ( !recalc_spd_for_basic_block(pfn, insn.ea) ) : trace_sp(pfn, insn); where trace_sp() is a typical name for a function that emulates the SP change of an instruction. * **Parameters:** * **pfn** – pointer to the function * **cur_ea** – linear address of the current instruction * **Returns:** true: the cumulative SP delta is set * **Returns:** false: the instruction at CUR_EA passes flow to the next instruction. SP delta must be set as a result of emulating the current instruction. ### *class* ida_frame.xreflist_entry_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### ea *: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)* Location of the insn referencing the stack frame member. #### opnum *: uchar* Number of the operand of that instruction. #### type *: uchar* The type of xref (cref_t & dref_t). #### compare(r: [xreflist_entry_t](#ida_frame.xreflist_entry_t)) → [int](https://docs.python.org/3/library/functions.html#int) ### ida_frame.build_stkvar_xrefs(out: xreflist_t, pfn: func_t \*, start_offset: int, end_offset: int) → [None](https://docs.python.org/3/library/constants.html#None) Fill ‘out’ with a list of all the xrefs made from function ‘pfn’ to specified range of the pfn’s stack frame. * **Parameters:** * **out** – the list of xrefs to fill. * **pfn** – the function to scan. * **start_offset** – start frame structure offset, in bytes * **end_offset** – end frame structure offset, in bytes ### ida_frame.add_frame_ea(func_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), frsize: [int](https://docs.python.org/3/library/functions.html#int), frregs: ushort, argsize: asize_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Add function frame. * **Parameters:** * **func_ea** – any address of the function * **frsize** – size of function local variables * **frregs** – size of saved registers * **argsize** – size of function arguments range which will be purged upon return. this parameter is used for \_\_stdcall and \_\_pascal calling conventions. for other calling conventions please pass 0. * **Returns:** 1: ok * **Returns:** 0: failed (no function at func_ea, frame already exists) ### ida_frame.del_frame_ea(func_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Delete a function frame. * **Parameters:** **func_ea** – any address of the function * **Returns:** success ### ida_frame.set_frame_size_ea(func_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), frsize: asize_t, frregs: ushort, argsize: asize_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Set size of function frame. * **Parameters:** * **func_ea** – any address of the function * **frsize** – size of function local variables * **frregs** – size of saved registers * **argsize** – size of function arguments that will be purged from the stack upon return * **Returns:** success ### ida_frame.get_frame_size_ea(func_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → asize_t Get full size of a function frame. This function takes into account size of local variables + size of saved registers + size of return address + number of purged bytes. * **Parameters:** **func_ea** – any address of the function * **Returns:** size of frame in bytes or zero ### ida_frame.get_frame_retsize_ea(func_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [int](https://docs.python.org/3/library/functions.html#int) Get size of function return address. * **Parameters:** **func_ea** – any address of the function * **Returns:** return address size or 0 ### ida_frame.get_frame_part_ea(range: [range_t](../ida_range/index.md#ida_range.range_t), func_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), part: frame_part_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Get offsets of the frame part in the frame. * **Parameters:** * **range** – pointer to the output buffer with the frame part start/end(exclusive) offsets, can’t be nullptr * **func_ea** – any address of the function * **part** – frame part * **Returns:** false if no function at func_ea ### ida_frame.frame_off_args_ea(func_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) Get starting address of arguments section * **Parameters:** **func_ea** – any address of the function * **Returns:** offset in frame or BADADDR on failure ### ida_frame.frame_off_retaddr_ea(func_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) Get starting address of return address section * **Parameters:** **func_ea** – any address of the function * **Returns:** offset in frame or BADADDR on failure ### ida_frame.frame_off_savregs_ea(func_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) Get starting address of saved registers section * **Parameters:** **func_ea** – any address of the function * **Returns:** offset in frame or BADADDR on failure ### ida_frame.frame_off_lvars_ea(func_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) Get start address of local variables section * **Parameters:** **func_ea** – any address of the function * **Returns:** offset in frame or BADADDR on failure ### ida_frame.frame_off_args(pfn: func_t const \*) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) Get starting address of arguments section ### ida_frame.frame_off_retaddr(pfn: func_t const \*) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) Get starting address of return address section ### ida_frame.frame_off_savregs(pfn: func_t const \*) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) Get starting address of saved registers section ### ida_frame.frame_off_lvars(pfn: func_t const \*) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) Get start address of local variables section ### ida_frame.get_func_frame_ea(out: [tinfo_t](../ida_typeinf/index.md#ida_typeinf.tinfo_t), func_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Get type of function frame * **Parameters:** * **out** – type info * **func_ea** – any address of the function * **Returns:** success ### ida_frame.soff_to_fpoff_ea(func_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), soff: [int](https://docs.python.org/3/library/functions.html#int)) → [int](https://docs.python.org/3/library/functions.html#int) Convert struct offsets into fp-relative offsets. * **Parameters:** * **func_ea** – any address of the function * **soff** – struct offset * **Returns:** fp-relative offset, or soff if no function at func_ea ### ida_frame.update_fpd_ea(func_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), fpd: asize_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Update frame pointer delta. * **Parameters:** * **func_ea** – any address of the function * **fpd** – new fpd value. cannot be bigger than the local variable range size. * **Returns:** success ### ida_frame.define_stkvar_ea(func_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), name: [str](https://docs.python.org/3/library/stdtypes.html#str), off: [int](https://docs.python.org/3/library/functions.html#int), tif: [tinfo_t](../ida_typeinf/index.md#ida_typeinf.tinfo_t), repr: [value_repr_t](../ida_typeinf/index.md#ida_typeinf.value_repr_t) = None) → [bool](https://docs.python.org/3/library/functions.html#bool) Define/redefine a stack variable. * **Parameters:** * **func_ea** – any address of the function * **name** – variable name, nullptr means autogenerate a name * **off** – offset of the stack variable in the frame. negative values denote local variables, positive - function arguments. * **tif** – variable type * **repr** – variable representation * **Returns:** success ### ida_frame.add_frame_member_ea(func_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), name: [str](https://docs.python.org/3/library/stdtypes.html#str), offset: [int](https://docs.python.org/3/library/functions.html#int), tif: [tinfo_t](../ida_typeinf/index.md#ida_typeinf.tinfo_t), repr: [value_repr_t](../ida_typeinf/index.md#ida_typeinf.value_repr_t) = None, etf_flags: uint = 0) → [bool](https://docs.python.org/3/library/functions.html#bool) Add member to the frame type * **Parameters:** * **func_ea** – any address of the function * **name** – variable name, nullptr means autogenerate a name * **offset** – member offset in the frame structure, in bytes * **tif** – variable type * **repr** – variable representation * **Returns:** success ### ida_frame.set_frame_member_type_ea(func_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), offset: [int](https://docs.python.org/3/library/functions.html#int), tif: [tinfo_t](../ida_typeinf/index.md#ida_typeinf.tinfo_t), repr: [value_repr_t](../ida_typeinf/index.md#ida_typeinf.value_repr_t) = None, etf_flags: uint = 0) → [bool](https://docs.python.org/3/library/functions.html#bool) Change type of the frame member * **Parameters:** * **func_ea** – any address of the function * **offset** – member offset in the frame structure, in bytes * **tif** – variable type * **repr** – variable representation * **Returns:** success ### ida_frame.delete_frame_members_ea(func_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), start_offset: [int](https://docs.python.org/3/library/functions.html#int), end_offset: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) Delete frame members * **Parameters:** * **func_ea** – any address of the function * **start_offset** – member offset to start deletion from, in bytes * **end_offset** – member offset which not included in the deletion, in bytes * **Returns:** success ### ida_frame.build_stkvar_name_ea(func_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), v: [int](https://docs.python.org/3/library/functions.html#int)) → [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None) Build automatic stack variable name. * **Parameters:** * **func_ea** – any address of the function * **v** – value of variable offset * **Returns:** length of stack variable name or -1 ### ida_frame.calc_stkvar_struc_offset_ea(func_ea: ida_idaapi.ea_t, insn: insn_t const &, n: int) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) Calculate offset of stack variable in the frame structure. * **Parameters:** * **func_ea** – any address of the function * **insn** – the instruction * **n** – 0..#UA_MAXOP-1 operand number -1 if error, return BADADDR * **Returns:** BADADDR if some error (issue a warning if stack frame is bad) ### ida_frame.calc_frame_offset_ea(func_ea: ida_idaapi.ea_t, off: int, insn: insn_t const \* = None, op: op_t const \* = None) → [int](https://docs.python.org/3/library/functions.html#int) Calculate the offset of stack variable in the frame. * **Parameters:** * **func_ea** – any address of the function * **off** – the offset relative to stack pointer or frame pointer * **insn** – the instruction * **op** – the operand * **Returns:** the offset in the frame ### ida_frame.delete_wrong_frame_info_ea(func_ea: ida_idaapi.ea_t, should_reanalyze: bool (\*)(insn_t const &)) → [int](https://docs.python.org/3/library/functions.html#int) Find and delete wrong frame info. Namely, we delete: \* unreferenced stack variable definitions \* references to dead stack variables (i.e. operands displayed in red) these operands will be untyped and most likely displayed in hex. We also plan to reanalyze instruction with the stack frame references * **Parameters:** * **func_ea** – any address of the function * **should_reanalyze** – callback to determine which instructions to reanalyze * **Returns:** number of deleted definitions or -1 if no function ### ida_frame.build_stkvar_xrefs_ea(out: [xreflist_t](#ida_frame.xreflist_t), func_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), start_offset: [int](https://docs.python.org/3/library/functions.html#int), end_offset: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) Fill ‘out’ with a list of all the xrefs from a function to the specified range of the function’s stack frame. * **Parameters:** * **out** – the list of xrefs to fill * **func_ea** – any address of the function * **start_offset** – start frame structure offset, in bytes * **end_offset** – end frame structure offset, in bytes ### ida_frame.add_func_regvar(func_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), ea1: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), ea2: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), canon: [str](https://docs.python.org/3/library/stdtypes.html#str), user: [str](https://docs.python.org/3/library/stdtypes.html#str), cmt: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [int](https://docs.python.org/3/library/functions.html#int) Define a register variable. * **Parameters:** * **func_ea** – any address of the function * **ea1** – range of addresses within the function where the definition will be used * **ea2** – range of addresses within the function where the definition will be used * **canon** – name of a general register * **user** – user-defined name for the register * **cmt** – comment for the definition * **Returns:** Register variable error codes ### ida_frame.REGVAR_ERROR_OK all ok ### ida_frame.REGVAR_ERROR_ARG function arguments are bad ### ida_frame.REGVAR_ERROR_RANGE the definition range is bad ### ida_frame.REGVAR_ERROR_NAME the provided name(s) can’t be accepted ### ida_frame.find_func_regvar(\*args) → ssize_t This function has the following signatures: > 1. find_func_regvar(rv: regvar_t > ``` > * > ``` > , func_ea: ida_idaapi.ea_t, ea1: ida_idaapi.ea_t, ea2: ida_idaapi.ea_t, canon: str, user: str) -> ssize_t > 2. find_func_regvar(rv: regvar_t > ``` > * > ``` > , func_ea: ida_idaapi.ea_t, ea: ida_idaapi.ea_t, canon: str) -> ssize_t # 0: find_func_regvar(rv: regvar_t ``` * ``` , func_ea: ida_idaapi.ea_t, ea1: ida_idaapi.ea_t, ea2: ida_idaapi.ea_t, canon: str, user: str) -> ssize_t Find a register variable definition (powerful version). One of ‘canon’ and ‘user’ should be nullptr. If both ‘canon’ and ‘user’ are nullptr it returns the first regvar definition in the range. * **Returns:** index of the register variable, or -1 if not found # 1: find_func_regvar(rv: regvar_t ``` * ``` , func_ea: ida_idaapi.ea_t, ea: ida_idaapi.ea_t, canon: str) -> ssize_t Find a register variable definition. * **Returns:** index of the register variable, or -1 if not found ### ida_frame.has_func_regvar(func_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Is there a register variable definition? * **Parameters:** * **func_ea** – any address of the function * **ea** – current address ### ida_frame.has_regvar(pfn: func_t \*, ea: ida_idaapi.ea_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Is there a register variable definition? * **Parameters:** * **pfn** – function in question * **ea** – current address ### ida_frame.rename_func_regvar(func_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), index: ssize_t, user: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [int](https://docs.python.org/3/library/functions.html#int) Rename a register variable. * **Parameters:** * **func_ea** – any address of the function * **index** – index of the register variable (see find_func_regvar()) * **user** – new user-defined name for the register * **Returns:** Register variable error codes ### ida_frame.set_func_regvar_cmt(func_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), index: ssize_t, cmt: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [int](https://docs.python.org/3/library/functions.html#int) Set comment for a register variable. * **Parameters:** * **func_ea** – any address of the function * **index** – index of the register variable (see find_func_regvar()) * **cmt** – new comment * **Returns:** Register variable error codes ### ida_frame.set_func_regvar_range(func_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), index: ssize_t, range: [range_t](../ida_range/index.md#ida_range.range_t)) → [int](https://docs.python.org/3/library/functions.html#int) Update the address range of a register variable by index. Only the range is changed; to rename a regvar or change its comment use rename_func_regvar()/set_func_regvar_cmt(). The new range must be well-formed (start_ea < end_ea) and must keep the function’s register variables sorted by start_ea. * **Parameters:** * **func_ea** – any address of the function * **index** – index of the register variable (see find_func_regvar()) * **range** – new address range for the register variable * **Returns:** Register variable error codes ### ida_frame.del_func_regvar(func_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), ea1: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), ea2: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), canon: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [int](https://docs.python.org/3/library/functions.html#int) Delete a register variable definition. * **Parameters:** * **func_ea** – any address of the function * **ea1** – range of addresses within the function where the definition holds * **ea2** – range of addresses within the function where the definition holds * **canon** – name of a general register * **Returns:** Register variable error codes ### ida_frame.get_func_regvar_qty(func_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [int](https://docs.python.org/3/library/functions.html#int) Get the number of register variables for a function. * **Parameters:** **func_ea** – function start address * **Returns:** number of register variables, or 0 ### ida_frame.get_func_regvars(out: [regvars_t](#ida_frame.regvars_t), func_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Get all register variables for a function. * **Parameters:** * **out** – output vector of regvar_t * **func_ea** – function start address * **Returns:** success ### ida_frame.get_func_regvar(out: [regvar_t](#ida_frame.regvar_t), func_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), index: ssize_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Get a copy of a register variable by index. * **Parameters:** * **out** – output regvar_t (deep copy) * **func_ea** – any address of the function * **index** – index of the register variable (see find_func_regvar()) * **Returns:** false if the index is out of range ### ida_frame.add_func_auto_stkpnt(func_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), delta: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) Add automatic SP register change point. * **Parameters:** * **func_ea** – any address of the function, may be BADADDR to auto-resolve * **ea** – linear address where SP changes. usually this is the end of the instruction which modifies the stack pointer ( insn_t::ea+ insn_t::size) * **delta** – difference between old and new values of SP * **Returns:** success ### ida_frame.del_func_stkpnt(func_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Delete SP register change point. * **Parameters:** * **func_ea** – any address of the function, may be BADADDR to auto-resolve * **ea** – linear address * **Returns:** success ### ida_frame.get_func_spd(func_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [int](https://docs.python.org/3/library/functions.html#int) Get difference between the initial and current values of ESP. * **Parameters:** * **func_ea** – any address of the function, may be BADADDR to auto-resolve * **ea** – linear address of the instruction * **Returns:** 0 or the difference, usually a negative number. returns the sp-diff before executing the instruction. ### ida_frame.get_func_effective_spd(func_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [int](https://docs.python.org/3/library/functions.html#int) Get effective difference between the initial and current values of ESP. This function returns the sp-diff used by the instruction. The difference between get_func_spd() and get_func_effective_spd() is present only for instructions like “pop [esp+N]”: they modify sp and use the modified value. * **Parameters:** * **func_ea** – any address of the function, may be BADADDR to auto-resolve * **ea** – linear address * **Returns:** 0 or the difference, usually a negative number ### ida_frame.get_func_sp_delta(func_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [int](https://docs.python.org/3/library/functions.html#int) Get modification of SP made at the specified location * **Parameters:** * **func_ea** – any address of the function, may be BADADDR to auto-resolve * **ea** – linear address * **Returns:** 0 if the specified location doesn’t contain a SP change point. otherwise return delta of SP modification. ### ida_frame.set_func_auto_spd(func_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), new_spd: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) Set the cumulative SP delta at the given address. * **Parameters:** * **func_ea** – any address of the function, may be BADADDR to auto-resolve * **ea** – linear address of the instruction * **new_spd** – new value of the cumulative SP delta * **Returns:** success ### ida_frame.recalc_func_spd_for_basic_block(func_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), cur_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Recalculate SP delta for the current instruction. The typical code snippet to calculate SP delta in a proc module is: ea_t func_ea = get_func_start(insn.ea); if ( may_trace_sp() && func_ea != BADADDR ) > if ( !recalc_func_spd_for_basic_block(func_ea, insn.ea) ) > : trace_sp(func_ea, insn); * **Parameters:** * **func_ea** – any address of the function * **cur_ea** – linear address of the current instruction * **Returns:** true: the cumulative SP delta is set * **Returns:** false: the instruction at CUR_EA passes flow to the next instruction. SP delta must be set as a result of emulating the current instruction. ### ida_frame.get_func_stkpnt_qty(func_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [int](https://docs.python.org/3/library/functions.html#int) Get the number of SP change points for a function. * **Parameters:** **func_ea** – function start address * **Returns:** number of SP change points, or 0 if no function / no points ### ida_frame.get_func_stkpnts(out: [stkpnts_t](#ida_frame.stkpnts_t), func_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Get all SP change points for a function. * **Parameters:** * **out** – output vector of stkpnt_t * **func_ea** – function start address * **Returns:** success ### ida_frame.get_func_llabel_qty(func_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [int](https://docs.python.org/3/library/functions.html#int) Get the number of local labels for a function. * **Parameters:** **func_ea** – function start address * **Returns:** number of local labels, or 0 ### ida_frame.get_func_llabels(out: [llabels_t](#ida_frame.llabels_t), func_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Get all local labels for a function. * **Parameters:** * **out** – output vector of llabel_t * **func_ea** – function start address * **Returns:** success ### ida_frame.add_frame ### ida_frame.del_frame ### ida_frame.set_frame_size ### ida_frame.get_frame_size ### ida_frame.get_frame_retsize ### ida_frame.get_frame_part ### ida_frame.get_func_frame ### ida_frame.soff_to_fpoff ### ida_frame.update_fpd ### ida_frame.define_stkvar ### ida_frame.add_frame_member ### ida_frame.set_frame_member_type ### ida_frame.delete_frame_members ### ida_frame.build_stkvar_name ### ida_frame.calc_stkvar_struc_offset ### ida_frame.calc_frame_offset ### ida_frame.add_regvar ### ida_frame.find_regvar ### ida_frame.rename_regvar ### ida_frame.set_regvar_cmt ### ida_frame.del_regvar ### ida_frame.has_regvar ### ida_frame.add_auto_stkpnt ### ida_frame.del_stkpnt ### ida_frame.get_spd ### ida_frame.get_effective_spd ### ida_frame.get_sp_delta ### ida_frame.set_auto_spd ### ida_frame.recalc_spd_for_basic_block ### ida_frame.build_stkvar_xrefs ### ida_frame.frame_off_args ### ida_frame.frame_off_retaddr ### ida_frame.frame_off_savregs ### ida_frame.frame_off_lvars ### ida_frame.is_funcarg_off ### ida_frame.lvar_off # index.html.md # colorize_disassembly_on_the_fly summary: colorize lines interactively description: : This builds upon the ida_kernwin.UI_Hooks.get_lines_rendering_info feature, to provide a quick & easy way to colorize disassembly lines.
Contrary to @colorize_disassembly, the coloring is not persisted in the database, and will therefore be lost after the session.
By triggering the action multiple times, the user can “carousel” across 4 predefined colors (and return to the “no color” state.) keywords: coloring see_also: colorize_disassembly level: advanced ## Attributes | [`ACTION_NAME`](#colorize_disassembly_on_the_fly.ACTION_NAME) | | |-----------------------------------------------------------------------|----| | [`ACTION_LABEL`](#colorize_disassembly_on_the_fly.ACTION_LABEL) | | | [`ACTION_SHORTCUT`](#colorize_disassembly_on_the_fly.ACTION_SHORTCUT) | | | [`ACTION_HELP`](#colorize_disassembly_on_the_fly.ACTION_HELP) | | | [`otf_coloring`](#colorize_disassembly_on_the_fly.otf_coloring) | | ## Classes | [`on_the_fly_coloring_hooks_t`](#colorize_disassembly_on_the_fly.on_the_fly_coloring_hooks_t) | | |-------------------------------------------------------------------------------------------------|------------------------------------------------------| | [`carousel_color_ah_t`](#colorize_disassembly_on_the_fly.carousel_color_ah_t) | The action that will be invoked by IDA when the user | ## Module Contents ### *class* colorize_disassembly_on_the_fly.on_the_fly_coloring_hooks_t Bases: [`ida_kernwin.UI_Hooks`](../ida_kernwin/index.md#ida_kernwin.UI_Hooks) #### AVAILABLE_COLORS #### by_widget #### get_lines_rendering_info(out, widget, rin) Called by IDA, at rendering-time. We’ll look in our set of marked lines, and for those that are found, will produce additional rendering information for IDA to use. #### carousel_color(viewer, title) This performs the work of iterating across the available colors (and the ‘no-color’ state.) ### *class* colorize_disassembly_on_the_fly.carousel_color_ah_t(hooks) Bases: [`ida_kernwin.action_handler_t`](../ida_kernwin/index.md#ida_kernwin.action_handler_t) The action that will be invoked by IDA when the user activates its shortcut. #### hooks #### activate(ctx) Activate an action. This function implements the core behavior of an action. It is called when the action is triggered, from a menu, from a popup menu, from the toolbar, or programmatically. * **Returns:** non-zero: all IDA windows will be refreshed #### update(ctx) Update an action. This is called when the context of the UI changed, and we need to let the action update some of its properties if needed (label, icon, …) In addition, this lets IDA know whether the action is enabled, and when it should be queried for availability again. Note: This callback is not meant to change anything in the application’s state, except by calling one (or many) of the “update_action_\*()” functions on this very action. ### colorize_disassembly_on_the_fly.ACTION_NAME *= 'example:colorize_disassembly_on_the_fly'* ### colorize_disassembly_on_the_fly.ACTION_LABEL *= 'Pick line color'* ### colorize_disassembly_on_the_fly.ACTION_SHORTCUT *= '!'* ### colorize_disassembly_on_the_fly.ACTION_HELP *= 'Press ! to carousel around available colors (or remove a previously-set color)'* ### colorize_disassembly_on_the_fly.otf_coloring # index.html.md # list_patched_bytes summary: enumerate patched bytes description: : Using the API to iterate over all the places in the file, that were patched using IDA. level: beginner ## Classes | [`patched_bytes_visitor`](#list_patched_bytes.patched_bytes_visitor) | | |------------------------------------------------------------------------|----| ## Functions | [`main`](#list_patched_bytes.main)() | | |----------------------------------------|----| ## Module Contents ### *class* list_patched_bytes.patched_bytes_visitor Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### skip *= 0* #### patch *= 0* ### list_patched_bytes.main() # index.html.md # vds_hooks summary: react to decompiler events/notifications description: : Shows how to hook to many notifications sent by the decompiler.
This plugin doesn’t really accomplish anything: it just prints the parameters.
The list of notifications handled below should be exhaustive, and is there to hint at what is possible to accomplish by subclassing ida_hexrays.Hexrays_Hooks see_also: curpos_details level: intermediate ## Attributes | [`vds_hooks`](#vds_hooks.vds_hooks) | | |---------------------------------------|----| ## Classes | [`vds_hooks_t`](#vds_hooks.vds_hooks_t) | | |-------------------------------------------|----| ## Module Contents ### *class* vds_hooks.vds_hooks_t Bases: [`ida_hexrays.Hexrays_Hooks`](../ida_hexrays/index.md#ida_hexrays.Hexrays_Hooks) #### display_shortened_cfuncs *= False* #### display_vdui_curpos *= False* #### inhibit_log *= 0* #### flowchart(fc, mba, reachable_blocks, decomp_flags) Flowchart has been generated. * **Parameters:** * **fc** – (const qflow_chart_t ``` * ``` ) * **mba** – (mba_t ``` * ``` ) * **reachable_blocks** – (bitset_t ``` * ``` ) * **decomp_flags** – (int) * **Returns:** Microcode error code #### flowchart_ea(fc, mba, reachable_blocks, decomp_flags) Flowchart has been generated (ea-based variant). Replaces the deprecated hxe_flowchart which passes a qflow_chart_t\* with a raw func_t\* inside. * **Parameters:** * **fc** – (const qflow_chart_ea_t ``` * ``` ) * **mba** – (mba_t ``` * ``` ) * **reachable_blocks** – (bitset_t ``` * ``` ) * **decomp_flags** – (int) * **Returns:** Microcode error code #### stkpnts(mba, stkpnts) SP change points have been calculated. * **Parameters:** **mba** – (mba_t ``` * ``` ) * **Returns:** Microcode error code This event is generated for each inlined range as well. #### prolog(mba, fc, reachable_blocks, decomp_flags) Prolog analysis has been finished. * **Parameters:** * **mba** – (mba_t ``` * ``` ) * **fc** – (const qflow_chart_t ``` * ``` ) * **reachable_blocks** – (const bitset_t ``` * ``` ) * **decomp_flags** – (int) * **Returns:** Microcode error code This event is generated for each inlined range as well. #### prolog_ea(mba, fc, reachable_blocks, decomp_flags) Prolog analysis has been finished (ea-based variant). Replaces the deprecated hxe_prolog which passes a qflow_chart_t\* with a raw func_t\* inside. * **Parameters:** * **mba** – (mba_t ``` * ``` ) * **fc** – (const qflow_chart_ea_t ``` * ``` ) * **reachable_blocks** – (const bitset_t ``` * ``` ) * **decomp_flags** – (int) * **Returns:** Microcode error code This event is generated for each inlined range as well. #### mba_maturity(mba, reqmat) Maturity level of an MBA was changed. * **Parameters:** * **mba** – (mba_t ``` * ``` ) * **reqmat** – (mba_maturity_t) requested maturity level * **Returns:** Microcode error code #### microcode(mba) Microcode has been generated. * **Parameters:** **mba** – (mba_t ``` * ``` ) * **Returns:** Microcode error code #### preoptimized(mba) Microcode has been preoptimized. * **Parameters:** **mba** – (mba_t ``` * ``` ) * **Returns:** Microcode error code #### locopt(mba) Basic block level optimization has been finished. * **Parameters:** **mba** – (mba_t ``` * ``` ) * **Returns:** Microcode error code #### prealloc(mba) Local variables: preallocation step begins. * **Parameters:** **mba** – (mba_t ``` * ``` ) This event may occur several times. Should return: 1 if modified microcode Negative values are Microcode error code #### glbopt(mba) Global optimization has been finished. If microcode is modified, MERR_LOOP must be returned. It will cause a complete restart of the optimization. * **Parameters:** **mba** – (mba_t ``` * ``` ) * **Returns:** Microcode error code #### begin_structural(out, cfunc, ctrl_graph) #### structural(ctrl_graph) Structural analysis has been finished. * **Parameters:** **ct** – (control_graph_t ``` * ``` ) #### maturity(cfunc, maturity) Ctree maturity level is being changed. * **Parameters:** * **cfunc** – (cfunc_t ``` * ``` ) * **new_maturity** – (ctree_maturity_t) #### interr(code) Internal error has occurred. * **Parameters:** **errcode** – (int ) #### combine(blk, insn) Trying to combine instructions of basic block. * **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 #### print_func(cfunc, printer) Printing ctree and generating text. * **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. #### func_printed(cfunc) Function text has been generated. Plugins may modify the text in cfunc_t::sv. However, it is too late to modify the ctree or microcode. The text uses regular color codes (see lines.hpp) COLOR_ADDR is used to store pointers to ctree items. * **Parameters:** **cfunc** – (cfunc_t ``` * ``` ) #### resolve_stkaddrs(mba) The optimizer is about to resolve stack addresses. * **Parameters:** **mba** – (mba_t ``` * ``` ) #### open_pseudocode(vu) New pseudocode view has been opened. * **Parameters:** **vu** – (vdui_t ``` * ``` ) #### switch_pseudocode(vu) Existing pseudocode view has been reloaded with a new function. Its text has not been refreshed yet, only cfunc and mba pointers are ready. * **Parameters:** **vu** – (vdui_t ``` * ``` ) #### refresh_pseudocode(vu) Existing pseudocode text has been refreshed. Adding/removing pseudocode lines is forbidden in this event. * **Parameters:** **vu** – (vdui_t ``` * ``` ) See also hxe_text_ready, which happens earlier #### close_pseudocode(vu) Pseudocode view is being closed. * **Parameters:** **vu** – (vdui_t ``` * ``` ) #### keyboard(vu, key_code, shift_state) Keyboard has been hit. * **Parameters:** * **vu** – (vdui_t ``` * ``` ) * **key_code** – (int) ``` VK_ ``` … * **shift_state** – (int) Should return: 1 if the event has been handled #### right_click(vu) Mouse right click. Use hxe_populating_popup instead, in case you want to add items in the popup menu. * **Parameters:** **vu** – (vdui_t ``` * ``` ) #### double_click(vu, shift_state) Mouse double click. * **Parameters:** * **vu** – (vdui_t ``` * ``` ) * **shift_state** – (int) Should return: 1 if the event has been handled #### curpos(vu) Current cursor position has been changed. (for example, by left-clicking or using keyboard) * **Parameters:** **vu** – (vdui_t ``` * ``` ) #### create_hint(vu) Create a hint for the current item. * **Parameters:** **vu** – (vdui_t ``` * ``` ) * **Returns:** hint: (qstring ``` * ``` ); important_lines: (int ``` * ``` ) #### text_ready(vu) Decompiled text is ready. * **Parameters:** **vu** – (vdui_t ``` * ``` ) This event can be used to modify the output text (sv). Obsolete. Please use hxe_func_printed instead. #### populating_popup(widget, popup, vu) Populating popup menu. We can add menu items now. * **Parameters:** * **widget** – (TWidget ``` * ``` ) * **popup_handle** – (TPopupMenu ``` * ``` ) * **vu** – (vdui_t ``` * ``` ) #### lvar_name_changed(vu, v, name, is_user_name) Local variable got renamed. * **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(vu, v, tif) Local variable type got changed. * **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. #### lvar_cmt_changed(vu, v, cmt) Local variable comment got changed. * **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(vu, \_from, to) Local variable mapping got changed. * **Parameters:** * **vu** – (vdui_t ``` * ``` ) * **to** – (lvar_t ``` * ``` ) Please note that it is possible to read/write user settings for lvars directly from the idb. #### cmt_changed(cfunc, loc, cmt) Comment got changed. * **Parameters:** * **cfunc** – (cfunc_t ``` * ``` ) * **loc** – (const treeloc_t ``` * ``` ) * **cmt** – (const char ``` * ``` ) #### build_callinfo(blk, type) Analyzing a call instruction. * **Parameters:** * **blk** – (mblock_t ``` * ``` ) blk->tail is the call. * **type** – (tinfo_t ``` * ``` ) buffer for the output type. * **Returns:** callinfo: (mcallinfo_t ``` ** ``` ) prepared callinfo. The plugin should either specify the function type, either allocate and return a new mcallinfo_t object. #### callinfo_built(blk) A call instruction has been anallyzed. * **Parameters:** **blk** – (mblock_t ``` * ``` ) blk->tail is the call. #### calls_done(mba) All calls have been analyzed. * **Parameters:** **mba** – (mba_t ``` * ``` ) This event is generated immediately after analyzing all calls, before any optimizitions, call unmerging and block merging. #### begin_inlining(cdg, flags) Starting to inline outlined functions. * **Parameters:** * **cdg** – (codegen_t ``` * ``` ) * **decomp_flags** – (int) * **Returns:** Microcode error code This is an opportunity to inline other ranges. #### inlining_func(cdg, blk, mbr) A set of ranges is going to be inlined. * **Parameters:** * **cdg** – (codegen_t ``` * ``` ) * **blk** – (int) the block containing call/jump to inline * **mbr** – (mba_ranges_t ``` * ``` ) the range to inline #### inlining_function(cdg, blk, mbr) A set of ranges is going to be inlined (ea-based variant). Replaces the deprecated hxe_inlining_func which passes an mba_ranges_t\* with a raw func_t\* inside. * **Parameters:** * **cdg** – (codegen_t ``` * ``` ) * **blk** – (int) the block containing call/jump to inline * **dcr** – (const decomp_ranges_t ``` * ``` ) the range to inline #### inlined_func(cdg, blk, mbr, i1, i2) A set of ranges got inlined. * **Parameters:** * **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) #### inlined_function(cdg, blk, mbr, i1, i2) A set of ranges got inlined (ea-based variant). Replaces the deprecated hxe_inlined_func which passes an mba_ranges_t\* with a raw func_t\* inside. * **Parameters:** * **cdg** – (codegen_t ``` * ``` ) * **blk** – (int) the block containing call/jump to inline * **dcr** – (const decomp_ranges_t ``` * ``` ) the range to inline * **i1** – (int) blknum of the first inlined block * **i2** – (int) blknum of the last inlined block (excluded) #### pre_structural(ctrl_graph, cfunc, cfg) Structure analysis is starting. * **Parameters:** * **ct** – (control_graph_t ``` * ``` ) in/out: control graph * **cfunc** – (cfunc_t ``` * ``` ) in: the current function * **g** – (const simple_graph_t ``` * ``` ) in: control flow graph * **Returns:** Microcode error code ; MERR_BLOCK means that the analysis has been performed by a plugin #### collect_warnings(cfunc) Collect warning messages from plugins. These warnings will be displayed at the function header, after the user-defined comments. * **Parameters:** **cfunc** – (cfunc_t ``` * ``` ) * **Returns:** warnings: (qstrvec_t ``` * ``` ) ### vds_hooks.vds_hooks # index.html.md # get_best_fit_member summary: get member by offset, taking into account variable sized structures description: : The goal of this script is to provide a way to figure out what structure member, is most likely referenced by an offset.
This also works for variable sized types. level: intermediate ## Attributes | [`struct_str`](#get_best_fit_member.struct_str) | | |---------------------------------------------------|----| | [`tif`](#get_best_fit_member.tif) | | | [`byte_offset`](#get_best_fit_member.byte_offset) | | | [`udm`](#get_best_fit_member.udm) | | ## Functions | [`get_best_fit_member`](#get_best_fit_member.get_best_fit_member)(tif, offset) | | |----------------------------------------------------------------------------------|----| ## Module Contents ### get_best_fit_member.get_best_fit_member(tif, offset) ### get_best_fit_member.struct_str *= Multiline-String*
Show Value ```python """struct modified_pcap_hdr_s { uint32_t magic_number; /* magic number */ uint16_t version_info[6]; int32_t thiszone; /* GMT to local correction */ uint32_t sigfigs; /* accuracy of timestamps */ uint32_t snaplen; /* max length of captured packets, in octets */ unsigned char mybytes[8]; };""" ```
### get_best_fit_member.tif ### get_best_fit_member.byte_offset *= 5* ### get_best_fit_member.udm *= None* # index.html.md # idadex ## Attributes | [`uint8`](#idadex.uint8) | | |----------------------------|----| | [`char`](#idadex.char) | | | [`uint32`](#idadex.uint32) | | | [`uint64`](#idadex.uint64) | | | [`uint16`](#idadex.uint16) | | | [`ushort`](#idadex.ushort) | | | [`ea_t`](#idadex.ea_t) | | | [`dex`](#idadex.dex) | | ## Classes | [`dex_method`](#idadex.dex_method) | Structure base class | |------------------------------------------------------|------------------------| | [`dex_field`](#idadex.dex_field) | Structure base class | | [`longname_director_t`](#idadex.longname_director_t) | Structure base class | | [`Dex`](#idadex.Dex) | | ## Functions | [`to_uint32`](#idadex.to_uint32)(v) | | |-------------------------------------------------------|----| | [`get_struct`](#idadex.get_struct)(str_, off, struct) | | | [`unpack_db`](#idadex.unpack_db)(buf, off) | | | [`get_dw`](#idadex.get_dw)(buf, off) | | | [`unpack_dw`](#idadex.unpack_dw)(buf, off) | | | [`unpack_dd`](#idadex.unpack_dd)(buf, off) | | | [`unpack_dq`](#idadex.unpack_dq)(buf, off) | | | [`unpack_ea`](#idadex.unpack_ea)(buf, off) | | | [`unpack_eavec`](#idadex.unpack_eavec)(buf, base_ea) | | ## Module Contents ### idadex.uint8 ### idadex.char ### idadex.uint32 ### idadex.uint64 ### idadex.uint16 ### idadex.ushort ### idadex.ea_t ### idadex.to_uint32(v) ### idadex.get_struct(str_, off, struct) ### idadex.unpack_db(buf, off) ### idadex.get_dw(buf, off) ### idadex.unpack_dw(buf, off) ### idadex.unpack_dd(buf, off) ### idadex.unpack_dq(buf, off) ### idadex.unpack_ea(buf, off) ### idadex.unpack_eavec(buf, base_ea) ### *class* idadex.dex_method Bases: [`ctypes.LittleEndianStructure`](https://docs.python.org/3/library/ctypes.html#ctypes.LittleEndianStructure) Structure base class #### IS_LOCAL *= 1* #### HAS_CODE *= 2* #### is_local() ### *class* idadex.dex_field Bases: [`ctypes.LittleEndianStructure`](https://docs.python.org/3/library/ctypes.html#ctypes.LittleEndianStructure) Structure base class ### *class* idadex.longname_director_t Bases: [`ctypes.LittleEndianStructure`](https://docs.python.org/3/library/ctypes.html#ctypes.LittleEndianStructure) Structure base class ### *class* idadex.Dex Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### HASHVAL_MAGIC *= 'version'* #### HASHVAL_OPTIMIZED *= 'optimized'* #### HASHVAL_DEXVERSION *= 'dex_version'* #### META_BASEADDRS *= 1* #### DEXCMN_STRING_ID #### DEXCMN_METHOD_ID #### DEXCMN_TRY_TYPES #### DEXCMN_TRY_IDS #### DEXCMN_DEBINFO #### DEXCMN_DEBSTR #### DEXVAR_OLD_STRIDS #### DEXVAR_STRING_EAS #### DEXVAR_OLD_TYPIDS #### DEXVAR_OLD_TYPSTR #### DEXVAR_OLD_TYPSTRO #### DEXVAR_TYPE_RENS #### DEXVAR_METHOD #### DEXVAR_METH_STR #### DEXVAR_METH_STRO #### DEXVAR_FIELD #### DEXVAR_TRYLIST #### DEBINFO_LINEINFO *= 1* #### nn_meta #### nn_cmn #### baseaddrs *= []* #### nn_vars *= []* #### string_eas *= []* #### type_renames *= []* #### get_dexnum(from_ea) #### get_nn_var(from_ea) #### ACCESS_FLAGS #### *static* access_string(flags) #### *static* as_string(s) #### get_string_ea(from_ea, string_idx) #### get_string(from_ea, string_idx) #### get_method_idx(ea) #### get_method(from_ea, method_idx) #### *static* get_string_by_index(node, idx, tag) #### PRIMITVE_TYPES #### *static* is_wide_type(typechar) #### *static* decorate_java_typename(desc) #### get_type_string(from_ea, type_idx) #### get_method_name(from_ea, method_idx) #### get_parameter_name(from_ea, idx) #### *static* get_short_type_name(longname) #### *static* get_full_type_name(longname) #### get_short_method_name(method) #### get_full_method_name(method) #### get_call_method_name(method) #### get_field(from_ea, field_idx) #### get_field_name(from_ea, field_idx) #### get_full_field_name(field_idx, field, field_name) #### get_short_field_name(field_idx, field, field_name) ### idadex.dex # index.html.md # idaapi ## Attributes | [`cvar`](#idaapi.cvar) | | |--------------------------|----| ## Classes | [`idaapi_Cvar`](#idaapi.idaapi_Cvar) | | |----------------------------------------|----| ## Module Contents ### *class* idaapi.idaapi_Cvar Bases: [`object`](https://docs.python.org/3/library/functions.html#object) ### idaapi.cvar # index.html.md # show_debug_names summary: dump symbols from a process being debugged description: : Queries the debugger (possibly remotely) for the list of symbols that the process being debugged, provides. level: beginner ## Functions | [`main`](#show_debug_names.main)() | | |--------------------------------------|----| ## Module Contents ### show_debug_names.main() # index.html.md # automatic_steps summary: programmatically drive a debugging session description: : Start a debugging session, step through the first five instructions. Each instruction is disassembled after execution. level: advanced ## Attributes | [`debughook`](#automatic_steps.debughook) | | |---------------------------------------------|----| | [`ep`](#automatic_steps.ep) | | ## Classes | [`MyDbgHook`](#automatic_steps.MyDbgHook) | Own debug hook class that implementd the callback functions | |---------------------------------------------|---------------------------------------------------------------| ## Module Contents ### *class* automatic_steps.MyDbgHook Bases: [`ida_dbg.DBG_Hooks`](../ida_dbg/index.md#ida_dbg.DBG_Hooks) Own debug hook class that implementd the callback functions #### steps *= 0* #### log(msg) #### dbg_process_start(pid, tid, ea, name, base, size) #### dbg_process_exit(pid, tid, ea, code) #### dbg_library_unload(pid, tid, ea, info) #### dbg_process_attach(pid, tid, ea, name, base, size) #### dbg_process_detach(pid, tid, ea) #### dbg_library_load(pid, tid, ea, name, base, size) #### dbg_bpt(tid, ea) A user defined breakpoint was reached. * **Parameters:** * **tid** – (thid_t) * **bptea** – (ea_t) * **Returns:** warn: (int ``` * ``` ) filled with: * -1: display an exception warning dialog if the process is suspended. * 0: never display an exception warning dialog. * 1: always display an exception warning dialog. #### dbg_suspend_process() The process is now suspended. #### dbg_exception(pid, tid, ea, exc_code, exc_can_cont, exc_ea, exc_info) #### dbg_trace(tid, ea) A step occurred (one instruction was executed). This event notification is only generated if step tracing is enabled. * **Parameters:** * **tid** – (thid_t) thread ID * **ip** – (ea_t) current instruction pointer. usually points after the executed instruction * **Returns:** 1: do not log this trace event * **Returns:** 0: log it #### dbg_step_into() #### dbg_run_to(pid, tid=0, ea=0) #### dbg_step_over() ### automatic_steps.debughook ### automatic_steps.ep # index.html.md # py_mex1 summary: add merge functionality to a simple plugin description: : This is a primitive plugin which asks user for some info and saves it for some addresses.
We will add a merge functionality to plugin.
An IDA plugin may have two kinds of data with permanent storage: : 1. Data common for entire database (e.g. the options). To describe them we will use the idbattr_info_t type. 2. Data specific to a particular address. To describe them we will use the merge_node_info_t type.
Also, see SDK/plugins/mex1 example level: advanced ## Attributes | [`MEX_NODE_NAME`](#py_mex1.MEX_NODE_NAME) | | |---------------------------------------------------------|----| | [`MEX_OPTION_FLAGS_IDX`](#py_mex1.MEX_OPTION_FLAGS_IDX) | | | [`MEX_OPTION_IDENT_IDX`](#py_mex1.MEX_OPTION_IDENT_IDX) | | | [`MEX_EA_TAG`](#py_mex1.MEX_EA_TAG) | | | [`MEX_FLAGS_0`](#py_mex1.MEX_FLAGS_0) | | | [`MEX_FLAGS_1`](#py_mex1.MEX_FLAGS_1) | | ## Classes | [`idp_listener_t`](#py_mex1.idp_listener_t) | we need an event listener to catch processor_t::ev_create_merge_handlers | |-----------------------------------------------|----------------------------------------------------------------------------| | [`mex_ctx_t`](#py_mex1.mex_ctx_t) | Regular plugin implementation below. | | [`mex1_plugin_t`](#py_mex1.mex1_plugin_t) | Base class for all scripted plugins. | ## Functions | [`PLUGIN_ENTRY`](#py_mex1.PLUGIN_ENTRY)() | | |---------------------------------------------|----| ## Module Contents ### py_mex1.MEX_NODE_NAME *= '$ idapython mex1'* ### py_mex1.MEX_OPTION_FLAGS_IDX ### py_mex1.MEX_OPTION_IDENT_IDX ### py_mex1.MEX_EA_TAG *= 'm'* ### py_mex1.MEX_FLAGS_0 *= 1* ### py_mex1.MEX_FLAGS_1 *= 2* ### *class* py_mex1.idp_listener_t(ctx) Bases: [`ida_idp.IDP_Hooks`](../ida_idp/index.md#ida_idp.IDP_Hooks) we need an event listener to catch processor_t::ev_create_merge_handlers #### ctx #### ev_ending_undo() A well behaving plugin should restore its state from the database upon ev_ending_undo. Otherwise its state may be conflicting with the database. #### ev_create_merge_handlers(md) This event occurs when IDA is performing a 3-way merge (for IDA Teams) Our plugins should create and register merge handler(s) for its data. #### ev_cvt64_supval(node, tag, idx, data) Converter to i64 database ### *class* py_mex1.mex_ctx_t Bases: [`ida_idaapi.plugmod_t`](../ida_idaapi/index.md#ida_idaapi.plugmod_t) Regular plugin implementation below. For example, in our case the plugin asks for 2 bit values and a string value. Then the plugin stores this data in the database. And mark the start address of the current function. These data will be merged later. #### flags *= 0* #### ident *= ''* #### idp_listener #### modmerger_helper *= None* #### idpopts_info *= None* #### merge_node_info *= None* #### save_to_idb() Save the plugin state to the idb. #### restore_from_idb() Restore plugin variables from the idb. #### run(\_) Ask user for the data and save them to database. Add mark for current EA. #### create_merge_handlers(md) Create merge handlers for plugin ### *class* py_mex1.mex1_plugin_t Bases: [`ida_idaapi.plugin_t`](../ida_idaapi/index.md#ida_idaapi.plugin_t) Base class for all scripted plugins. #### flags *= 257* #### wanted_name *= 'IDAPython: Merge example 1'* #### comment *= 'IDAPython: An example 1 how to implement IDA merge functionality'* #### wanted_hotkey *= ''* #### help *= ''* #### init() #### term() #### run(arg) ### py_mex1.PLUGIN_ENTRY() # index.html.md # ida_pro This is the first header included in the IDA project. It defines the most common types, functions and data. Also, it tries to make system dependent definitions. The following preprocessor macros are used in the project (the list may be incomplete) Platform must be specified as one of: \_\_NT_\_ - MS Windows (all platforms) > \_\_LINUX_\_ - Linux > \_\_MAC_\_ - MAC OS X \_\_EA64_\_ - 64-bit address size (sizeof(ea_t)==8) : \_\_X86_\_ - 32-bit debug servers (sizeof(void\*)==4) \_\_X64_\_ - x64 processor (sizeof(void\*)==8) default \_\_PPC_\_ - PowerPC \_\_ARM_\_ - ARM ## Attributes | [`BADDIFF`](#ida_pro.BADDIFF) | | |-------------------------------------------------|------------------------------------------------------------------| | [`IDA_SDK_VERSION`](#ida_pro.IDA_SDK_VERSION) | IDA SDK v9.4. | | [`BADMEMSIZE`](#ida_pro.BADMEMSIZE) | | | [`MAXSTR`](#ida_pro.MAXSTR) | maximum string size | | [`FMT_64`](#ida_pro.FMT_64) | | | [`FMT_Z`](#ida_pro.FMT_Z) | | | [`FMT_ZX`](#ida_pro.FMT_ZX) | | | [`FMT_ZS`](#ida_pro.FMT_ZS) | | | [`FMT_EA`](#ida_pro.FMT_EA) | | | [`IDBDEC_ESCAPE`](#ida_pro.IDBDEC_ESCAPE) | convert non-printable characters to C escapes ( | | [`CP_BOM`](#ida_pro.CP_BOM) | | | [`UTF8_BOM`](#ida_pro.UTF8_BOM) | | | [`UTF16LE_BOM`](#ida_pro.UTF16LE_BOM) | | | [`UTF16BE_BOM`](#ida_pro.UTF16BE_BOM) | | | [`UTF32LE_BOM`](#ida_pro.UTF32LE_BOM) | | | [`UTF32BE_BOM`](#ida_pro.UTF32BE_BOM) | | | [`CP_ELLIPSIS`](#ida_pro.CP_ELLIPSIS) | | | [`UTF8_ELLIPSIS`](#ida_pro.UTF8_ELLIPSIS) | | | [`CP_REPLCHAR`](#ida_pro.CP_REPLCHAR) | | | [`UTF8_REPLCHAR`](#ida_pro.UTF8_REPLCHAR) | | | [`MAX_UTF8_SEQ_LEN`](#ida_pro.MAX_UTF8_SEQ_LEN) | | | [`CEF_RETERR`](#ida_pro.CEF_RETERR) | | | [`ENC_WIN1252`](#ida_pro.ENC_WIN1252) | | | [`ENC_UTF8`](#ida_pro.ENC_UTF8) | | | [`ENC_MUTF8`](#ida_pro.ENC_MUTF8) | | | [`ENC_UTF16`](#ida_pro.ENC_UTF16) | | | [`ENC_UTF16LE`](#ida_pro.ENC_UTF16LE) | | | [`ENC_UTF16BE`](#ida_pro.ENC_UTF16BE) | | | [`ENC_UTF32`](#ida_pro.ENC_UTF32) | | | [`ENC_UTF32LE`](#ida_pro.ENC_UTF32LE) | | | [`ENC_UTF32BE`](#ida_pro.ENC_UTF32BE) | | | [`CP_UTF8`](#ida_pro.CP_UTF8) | | | [`CP_UTF16`](#ida_pro.CP_UTF16) | UTF-16 codepage. | | [`SUBSTCHAR`](#ida_pro.SUBSTCHAR) | default char, used if a char cannot be represented in a codepage | | [`IOREDIR_INPUT`](#ida_pro.IOREDIR_INPUT) | input redirection | | [`IOREDIR_OUTPUT`](#ida_pro.IOREDIR_OUTPUT) | output redirection | | [`IOREDIR_APPEND`](#ida_pro.IOREDIR_APPEND) | append, do not overwrite the output file | | [`IOREDIR_QUOTED`](#ida_pro.IOREDIR_QUOTED) | the file name was quoted | | [`QWCONTINUED`](#ida_pro.QWCONTINUED) | | | [`QWNOHANG`](#ida_pro.QWNOHANG) | | | [`TCT_UNKNOWN`](#ida_pro.TCT_UNKNOWN) | | | [`TCT_OWNER`](#ida_pro.TCT_OWNER) | | | [`TCT_NOT_OWNER`](#ida_pro.TCT_NOT_OWNER) | | | [`cvar`](#ida_pro.cvar) | | | [`NULL_PIPE_HANDLE`](#ida_pro.NULL_PIPE_HANDLE) | | | [`longlongvec_t`](#ida_pro.longlongvec_t) | | | [`ulonglongvec_t`](#ida_pro.ulonglongvec_t) | | | [`svalvec_t`](#ida_pro.svalvec_t) | | | [`eavec_t`](#ida_pro.eavec_t) | | ## Classes | [`qrefcnt_obj_t`](#ida_pro.qrefcnt_obj_t) | | |---------------------------------------------------|----| | [`channel_redir_t`](#ida_pro.channel_redir_t) | | | [`plugin_options_t`](#ida_pro.plugin_options_t) | | | [`instant_dbgopts_t`](#ida_pro.instant_dbgopts_t) | | | [`qmutex_locker_t`](#ida_pro.qmutex_locker_t) | | | [`intvec_t`](#ida_pro.intvec_t) | | | [`uintvec_t`](#ida_pro.uintvec_t) | | | [`int64vec_t`](#ida_pro.int64vec_t) | | | [`uint64vec_t`](#ida_pro.uint64vec_t) | | | [`boolvec_t`](#ida_pro.boolvec_t) | | | [`strvec_t`](#ida_pro.strvec_t) | | | [`sizevec_t`](#ida_pro.sizevec_t) | | | [`uchar_array`](#ida_pro.uchar_array) | | | [`tid_array`](#ida_pro.tid_array) | | | [`ea_array`](#ida_pro.ea_array) | | | [`sel_array`](#ida_pro.sel_array) | | | [`uval_array`](#ida_pro.uval_array) | | | [`uchar_pointer`](#ida_pro.uchar_pointer) | | | [`ushort_pointer`](#ida_pro.ushort_pointer) | | | [`uint_pointer`](#ida_pro.uint_pointer) | | | [`sint8_pointer`](#ida_pro.sint8_pointer) | | | [`int8_pointer`](#ida_pro.int8_pointer) | | | [`uint8_pointer`](#ida_pro.uint8_pointer) | | | [`int16_pointer`](#ida_pro.int16_pointer) | | | [`uint16_pointer`](#ida_pro.uint16_pointer) | | | [`int32_pointer`](#ida_pro.int32_pointer) | | | [`uint32_pointer`](#ida_pro.uint32_pointer) | | | [`int64_pointer`](#ida_pro.int64_pointer) | | | [`uint64_pointer`](#ida_pro.uint64_pointer) | | | [`ssize_pointer`](#ida_pro.ssize_pointer) | | | [`bool_pointer`](#ida_pro.bool_pointer) | | | [`char_pointer`](#ida_pro.char_pointer) | | | [`short_pointer`](#ida_pro.short_pointer) | | | [`int_pointer`](#ida_pro.int_pointer) | | | [`ea_pointer`](#ida_pro.ea_pointer) | | | [`sel_pointer`](#ida_pro.sel_pointer) | | | [`asize_pointer`](#ida_pro.asize_pointer) | | | [`adiff_pointer`](#ida_pro.adiff_pointer) | | | [`uval_pointer`](#ida_pro.uval_pointer) | | | [`sval_pointer`](#ida_pro.sval_pointer) | | | [`ea32_pointer`](#ida_pro.ea32_pointer) | | | [`ea64_pointer`](#ida_pro.ea64_pointer) | | | [`flags_pointer`](#ida_pro.flags_pointer) | | | [`flags64_pointer`](#ida_pro.flags64_pointer) | | | [`tid_pointer`](#ida_pro.tid_pointer) | | ## Functions | [`qatoll`](#ida_pro.qatoll)(→ int64) | | |------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [`qexit`](#ida_pro.qexit)(→ None) | Call qatexit functions, shut down UI and kernel, and exit. | | [`log2ceil`](#ida_pro.log2ceil)(→ int) | calculate ceil(log2(d64)) or floor(log2(d64)), it returns 0 if d64 == 0 | | [`log2floor`](#ida_pro.log2floor)(→ int) | | | [`bitcountr_zero`](#ida_pro.bitcountr_zero)(→ int) | count the number of consecutive trailing zero bits (like C++20 std::countr_zero()) | | [`extend_sign`](#ida_pro.extend_sign)(→ uint64) | Sign or zero-extend the value 'v' to occupy 64 bits. The value 'v' is considered to be of size 'nbytes'. | | [`readbytes`](#ida_pro.readbytes)(→ int) | Read up to 4 bytes (1, 2, or 4) from file. | | [`writebytes`](#ida_pro.writebytes)(→ int) | Write at most 4 bytes to file. | | [`reloc_value`](#ida_pro.reloc_value)(→ None) | | | [`qvector_reserve`](#ida_pro.qvector_reserve)(→ void \*) | Change capacity of given qvector. | | [`relocate_relobj`](#ida_pro.relocate_relobj)(→ bool) | | | [`is_cvt64`](#ida_pro.is_cvt64)(→ bool) | is IDA converting IDB into I64? | | [`quote_cmdline_arg`](#ida_pro.quote_cmdline_arg)(→ bool) | Quote a command line argument if it contains escape characters. For example, *.c will be converted into "*.c" because \* may be inadvertently expanded by the shell | | [`parse_dbgopts`](#ida_pro.parse_dbgopts)(→ bool) | Parse the -r command line switch (for instant debugging). r_switch points to the value of the -r switch. Example: [win32@localhost+](mailto:win32@localhost+) | | [`check_process_exit`](#ida_pro.check_process_exit)(→ int) | Check whether process has terminated or not. | | [`is_control_tty`](#ida_pro.is_control_tty)(→ enum tty_control_t) | Check if the current process is the owner of the TTY specified by 'fd' (typically an opened descriptor to /dev/tty). | | [`qdetach_tty`](#ida_pro.qdetach_tty)(→ None) | If the current terminal is the controlling terminal of the calling process, give up this controlling terminal. | | [`qcontrol_tty`](#ida_pro.qcontrol_tty)(→ None) | Make the current terminal the controlling terminal of the calling process. | | [`qthread_equal`](#ida_pro.qthread_equal)(→ bool) | Are two threads equal? | | [`is_main_thread`](#ida_pro.is_main_thread)(→ bool) | Are we running in the main thread? | | [`get_login_name`](#ida_pro.get_login_name)(→ Union[str, None]) | Get the user name for the current desktop session | | [`get_physical_core_count`](#ida_pro.get_physical_core_count)(→ int) | Get the total CPU physical core count | | [`get_logical_core_count`](#ida_pro.get_logical_core_count)(→ int) | Get the total CPU logical core count | | [`get_available_core_count`](#ida_pro.get_available_core_count)(→ int) | Get the number of logical CPU cores available to the current process if supported by the OS. | | [`qstrvec_t_create`](#ida_pro.qstrvec_t_create)(→ PyObject \*) | | | [`qstrvec_t_destroy`](#ida_pro.qstrvec_t_destroy)(→ bool) | | | [`qstrvec_t_get_clink`](#ida_pro.qstrvec_t_get_clink)(→ qstrvec_t \*) | | | [`qstrvec_t_get_clink_ptr`](#ida_pro.qstrvec_t_get_clink_ptr)(→ PyObject \*) | | | [`qstrvec_t_assign`](#ida_pro.qstrvec_t_assign)(→ bool) | | | [`qstrvec_t_addressof`](#ida_pro.qstrvec_t_addressof)(→ PyObject \*) | | | [`qstrvec_t_set`](#ida_pro.qstrvec_t_set)(→ bool) | | | [`qstrvec_t_from_list`](#ida_pro.qstrvec_t_from_list)(→ bool) | | | [`qstrvec_t_size`](#ida_pro.qstrvec_t_size)(→ int) | | | [`qstrvec_t_get`](#ida_pro.qstrvec_t_get)(→ PyObject \*) | | | [`qstrvec_t_add`](#ida_pro.qstrvec_t_add)(→ bool) | | | [`qstrvec_t_clear`](#ida_pro.qstrvec_t_clear)(→ bool) | | | [`qstrvec_t_insert`](#ida_pro.qstrvec_t_insert)(→ bool) | | | [`qstrvec_t_remove`](#ida_pro.qstrvec_t_remove)(→ bool) | | | [`str2user`](#ida_pro.str2user)(str) | Insert C-style escape characters to string | ## Module Contents ### ida_pro.BADDIFF ### ida_pro.IDA_SDK_VERSION IDA SDK v9.4. ### ida_pro.BADMEMSIZE ### ida_pro.MAXSTR maximum string size ### ida_pro.qatoll(nptr: [str](https://docs.python.org/3/library/stdtypes.html#str)) → int64 ### ida_pro.FMT_64 ### ida_pro.FMT_Z ### ida_pro.FMT_ZX ### ida_pro.FMT_ZS ### ida_pro.FMT_EA ### ida_pro.qexit(code: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) Call qatexit functions, shut down UI and kernel, and exit. * **Parameters:** **code** – exit code ### ida_pro.log2ceil(d64: uint64) → [int](https://docs.python.org/3/library/functions.html#int) calculate ceil(log2(d64)) or floor(log2(d64)), it returns 0 if d64 == 0 ### ida_pro.log2floor(d64: uint64) → [int](https://docs.python.org/3/library/functions.html#int) ### ida_pro.bitcountr_zero(x: uint64) → [int](https://docs.python.org/3/library/functions.html#int) count the number of consecutive trailing zero bits (like C++20 std::countr_zero()) ### ida_pro.extend_sign(v: uint64, nbytes: [int](https://docs.python.org/3/library/functions.html#int), sign_extend: [bool](https://docs.python.org/3/library/functions.html#bool)) → uint64 Sign or zero-extend the value ‘v’ to occupy 64 bits. The value ‘v’ is considered to be of size ‘nbytes’. ### ida_pro.readbytes(h: int, res: uint32 \*, size: int, mf: bool) → [int](https://docs.python.org/3/library/functions.html#int) Read up to 4 bytes (1, 2, or 4) from file. * **Parameters:** * **h** – file handle * **res** – value read from file * **size** – size of value in bytes (1, 2, 4) * **mf** – is MSB first? * **Returns:** 0 on success, nonzero otherwise ### ida_pro.writebytes(h: [int](https://docs.python.org/3/library/functions.html#int), l: [int](https://docs.python.org/3/library/functions.html#int), size: [int](https://docs.python.org/3/library/functions.html#int), mf: [bool](https://docs.python.org/3/library/functions.html#bool)) → [int](https://docs.python.org/3/library/functions.html#int) Write at most 4 bytes to file. * **Parameters:** * **h** – file handle * **l** – value to write * **size** – size of value in bytes (1,2,4) * **mf** – is MSB first? * **Returns:** 0 on success, nonzero otherwise ### ida_pro.reloc_value(value: void \*, size: int, delta: adiff_t, mf: bool) → [None](https://docs.python.org/3/library/constants.html#None) ### ida_pro.qvector_reserve(vec: void \*, old: void \*, cnt: int, elsize: int) → void \* Change capacity of given qvector. * **Parameters:** * **vec** – a pointer to a qvector * **old** – a pointer to the qvector’s array * **cnt** – number of elements to reserve * **elsize** – size of each element * **Returns:** a pointer to the newly allocated array ### *class* ida_pro.qrefcnt_obj_t(\*args, \*\*kwargs) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### refcnt *: [int](https://docs.python.org/3/library/functions.html#int)* counter #### release() → [None](https://docs.python.org/3/library/constants.html#None) Call destructor. We use release() instead of operator delete() to maintain binary compatibility with all compilers (vc and gcc use different vtable layouts for operator delete) ### ida_pro.relocate_relobj(\_relobj: relobj_t \*, ea: ida_idaapi.ea_t, mf: bool) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_pro.IDBDEC_ESCAPE convert non-printable characters to C escapes ( , xNN, uNNNN) ### ida_pro.CP_BOM ### ida_pro.UTF8_BOM ### ida_pro.UTF16LE_BOM ### ida_pro.UTF16BE_BOM ### ida_pro.UTF32LE_BOM ### ida_pro.UTF32BE_BOM ### ida_pro.CP_ELLIPSIS ### ida_pro.UTF8_ELLIPSIS ### ida_pro.CP_REPLCHAR ### ida_pro.UTF8_REPLCHAR ### ida_pro.MAX_UTF8_SEQ_LEN ### ida_pro.is_cvt64() → [bool](https://docs.python.org/3/library/functions.html#bool) is IDA converting IDB into I64? ### ida_pro.CEF_RETERR ### ida_pro.ENC_WIN1252 ### ida_pro.ENC_UTF8 ### ida_pro.ENC_MUTF8 ### ida_pro.ENC_UTF16 ### ida_pro.ENC_UTF16LE ### ida_pro.ENC_UTF16BE ### ida_pro.ENC_UTF32 ### ida_pro.ENC_UTF32LE ### ida_pro.ENC_UTF32BE ### ida_pro.CP_UTF8 ### ida_pro.CP_UTF16 UTF-16 codepage. ### ida_pro.SUBSTCHAR default char, used if a char cannot be represented in a codepage ### *class* ida_pro.channel_redir_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### fd *: [int](https://docs.python.org/3/library/functions.html#int)* channel number #### file *: [str](https://docs.python.org/3/library/stdtypes.html#str)* file name to redirect to/from. if empty, the channel must be closed. #### flags *: [int](https://docs.python.org/3/library/functions.html#int)* i/o redirection flags #### is_input() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_output() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_append() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_quoted() → [bool](https://docs.python.org/3/library/functions.html#bool) #### start *: [int](https://docs.python.org/3/library/functions.html#int)* begin of the redirection string in the command line #### length *: [int](https://docs.python.org/3/library/functions.html#int)* length of the redirection string in the command line ### ida_pro.IOREDIR_INPUT input redirection ### ida_pro.IOREDIR_OUTPUT output redirection ### ida_pro.IOREDIR_APPEND append, do not overwrite the output file ### ida_pro.IOREDIR_QUOTED the file name was quoted ### ida_pro.quote_cmdline_arg(arg: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [bool](https://docs.python.org/3/library/functions.html#bool) Quote a command line argument if it contains escape characters. For example, *.c will be converted into “*.c” because \* may be inadvertently expanded by the shell * **Returns:** true: modified ‘arg’ ### *class* ida_pro.plugin_options_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### find(name: [str](https://docs.python.org/3/library/stdtypes.html#str)) → plugin_option_t const \* #### erase(name: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### *class* ida_pro.instant_dbgopts_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### debmod *: [str](https://docs.python.org/3/library/stdtypes.html#str)* name of debugger module #### env *: [str](https://docs.python.org/3/library/stdtypes.html#str)* config variables for debmod. example: DEFAULT_CPU=13;MAXPACKETSIZE=-1 #### host *: [str](https://docs.python.org/3/library/stdtypes.html#str)* remote hostname (if remote debugging) #### port *: [int](https://docs.python.org/3/library/functions.html#int)* port number for the remote debugger server #### pid *: [int](https://docs.python.org/3/library/functions.html#int)* process to attach to (-1: ask the user) #### event_id *: [int](https://docs.python.org/3/library/functions.html#int)* event to trigger upon attaching #### attach *: [bool](https://docs.python.org/3/library/functions.html#bool)* should attach to a process? ### ida_pro.parse_dbgopts(ido: [instant_dbgopts_t](#ida_pro.instant_dbgopts_t), r_switch: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [bool](https://docs.python.org/3/library/functions.html#bool) Parse the -r command line switch (for instant debugging). r_switch points to the value of the -r switch. Example: [win32@localhost+](mailto:win32@localhost+) * **Returns:** true-ok, false-parse error ### ida_pro.QWCONTINUED ### ida_pro.QWNOHANG ### ida_pro.check_process_exit(handle: void \*, exit_code: int \*, msecs: int = -1) → [int](https://docs.python.org/3/library/functions.html#int) Check whether process has terminated or not. * **Parameters:** * **handle** – process handle to wait for * **exit_code** – pointer to the buffer for the exit code * **Returns:** 0: process has exited, and the exit code is available. if ``` * ``` exit_code < 0: the process was killed with a signal - ``` * ``` exit_code * **Returns:** 1: process has not exited yet * **Returns:** -1: error happened, see error code for winerr() in ``` * ``` exit_code ### ida_pro.TCT_UNKNOWN ### ida_pro.TCT_OWNER ### ida_pro.TCT_NOT_OWNER ### ida_pro.is_control_tty(fd: [int](https://docs.python.org/3/library/functions.html#int)) → enum tty_control_t Check if the current process is the owner of the TTY specified by ‘fd’ (typically an opened descriptor to /dev/tty). ### ida_pro.qdetach_tty() → [None](https://docs.python.org/3/library/constants.html#None) If the current terminal is the controlling terminal of the calling process, give up this controlling terminal. ### ida_pro.qcontrol_tty() → [None](https://docs.python.org/3/library/constants.html#None) Make the current terminal the controlling terminal of the calling process. ### ida_pro.qthread_equal(q1: \_\_qthread_t, q2: \_\_qthread_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Are two threads equal? ### ida_pro.is_main_thread() → [bool](https://docs.python.org/3/library/functions.html#bool) Are we running in the main thread? ### *class* ida_pro.qmutex_locker_t(\_lock: \_\_qmutex_t) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown ### ida_pro.get_login_name() → [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None) Get the user name for the current desktop session * **Returns:** success ### ida_pro.get_physical_core_count() → [int](https://docs.python.org/3/library/functions.html#int) Get the total CPU physical core count * **Returns:** the physical core count, or -1 on error ### ida_pro.get_logical_core_count() → [int](https://docs.python.org/3/library/functions.html#int) Get the total CPU logical core count * **Returns:** the logical core count, or -1 on error ### ida_pro.get_available_core_count() → [int](https://docs.python.org/3/library/functions.html#int) Get the number of logical CPU cores available to the current process if supported by the OS. * **Returns:** the logical core count available for the process, or -1 on error ### *class* ida_pro.intvec_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### push_back(\*args) → int & #### pop_back() → [None](https://docs.python.org/3/library/constants.html#None) #### size() → [int](https://docs.python.org/3/library/functions.html#int) #### empty() → [bool](https://docs.python.org/3/library/functions.html#bool) #### at(\_idx: [int](https://docs.python.org/3/library/functions.html#int)) → int const & #### qclear() → [None](https://docs.python.org/3/library/constants.html#None) #### clear() → [None](https://docs.python.org/3/library/constants.html#None) #### resize(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### capacity() → [int](https://docs.python.org/3/library/functions.html#int) #### reserve(cnt: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### truncate() → [None](https://docs.python.org/3/library/constants.html#None) #### swap(r: [intvec_t](#ida_pro.intvec_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extract() → int \* #### inject(s: int \*, len: int) → [None](https://docs.python.org/3/library/constants.html#None) #### begin(\*args) → qvector< int >::const_iterator #### end(\*args) → qvector< int >::const_iterator #### insert(it: qvector< int >::iterator, x: int const &) → qvector< int >::iterator #### erase(\*args) → qvector< int >::iterator #### find(\*args) → qvector< int >::const_iterator #### has(x: int const &) → [bool](https://docs.python.org/3/library/functions.html#bool) #### add_unique(x: int const &) → [bool](https://docs.python.org/3/library/functions.html#bool) #### append(x: int const &) → [None](https://docs.python.org/3/library/constants.html#None) #### extend(x: [intvec_t](#ida_pro.intvec_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### front #### back ### ida_pro.cvar ### ida_pro.NULL_PIPE_HANDLE ### *class* ida_pro.uintvec_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### push_back(\*args) → unsigned int & #### pop_back() → [None](https://docs.python.org/3/library/constants.html#None) #### size() → [int](https://docs.python.org/3/library/functions.html#int) #### empty() → [bool](https://docs.python.org/3/library/functions.html#bool) #### at(\_idx: [int](https://docs.python.org/3/library/functions.html#int)) → unsigned int const & #### qclear() → [None](https://docs.python.org/3/library/constants.html#None) #### clear() → [None](https://docs.python.org/3/library/constants.html#None) #### resize(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### capacity() → [int](https://docs.python.org/3/library/functions.html#int) #### reserve(cnt: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### truncate() → [None](https://docs.python.org/3/library/constants.html#None) #### swap(r: [uintvec_t](#ida_pro.uintvec_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extract() → unsigned int \* #### inject(s: unsigned int \*, len: int) → [None](https://docs.python.org/3/library/constants.html#None) #### begin(\*args) → qvector< unsigned int >::const_iterator #### end(\*args) → qvector< unsigned int >::const_iterator #### insert(it: qvector< unsigned int >::iterator, x: unsigned int const &) → qvector< unsigned int >::iterator #### erase(\*args) → qvector< unsigned int >::iterator #### find(\*args) → qvector< unsigned int >::const_iterator #### has(x: unsigned int const &) → [bool](https://docs.python.org/3/library/functions.html#bool) #### add_unique(x: unsigned int const &) → [bool](https://docs.python.org/3/library/functions.html#bool) #### append(x: unsigned int const &) → [None](https://docs.python.org/3/library/constants.html#None) #### extend(x: [uintvec_t](#ida_pro.uintvec_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### front #### back ### *class* ida_pro.int64vec_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### push_back(\*args) → long long & #### pop_back() → [None](https://docs.python.org/3/library/constants.html#None) #### size() → [int](https://docs.python.org/3/library/functions.html#int) #### empty() → [bool](https://docs.python.org/3/library/functions.html#bool) #### at(\_idx: [int](https://docs.python.org/3/library/functions.html#int)) → long long const & #### qclear() → [None](https://docs.python.org/3/library/constants.html#None) #### clear() → [None](https://docs.python.org/3/library/constants.html#None) #### resize(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### capacity() → [int](https://docs.python.org/3/library/functions.html#int) #### reserve(cnt: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### truncate() → [None](https://docs.python.org/3/library/constants.html#None) #### swap(r: [int64vec_t](#ida_pro.int64vec_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extract() → long long \* #### inject(s: long long \*, len: int) → [None](https://docs.python.org/3/library/constants.html#None) #### begin(\*args) → qvector< long long >::const_iterator #### end(\*args) → qvector< long long >::const_iterator #### insert(it: qvector< long long >::iterator, x: long long const &) → qvector< long long >::iterator #### erase(\*args) → qvector< long long >::iterator #### find(\*args) → qvector< long long >::const_iterator #### has(x: long long const &) → [bool](https://docs.python.org/3/library/functions.html#bool) #### add_unique(x: long long const &) → [bool](https://docs.python.org/3/library/functions.html#bool) #### append(x: long long const &) → [None](https://docs.python.org/3/library/constants.html#None) #### extend(x: [int64vec_t](#ida_pro.int64vec_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### front #### back ### *class* ida_pro.uint64vec_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### push_back(\*args) → unsigned long long & #### pop_back() → [None](https://docs.python.org/3/library/constants.html#None) #### size() → [int](https://docs.python.org/3/library/functions.html#int) #### empty() → [bool](https://docs.python.org/3/library/functions.html#bool) #### at(\_idx: [int](https://docs.python.org/3/library/functions.html#int)) → unsigned long long const & #### qclear() → [None](https://docs.python.org/3/library/constants.html#None) #### clear() → [None](https://docs.python.org/3/library/constants.html#None) #### resize(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### capacity() → [int](https://docs.python.org/3/library/functions.html#int) #### reserve(cnt: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### truncate() → [None](https://docs.python.org/3/library/constants.html#None) #### swap(r: [uint64vec_t](#ida_pro.uint64vec_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extract() → unsigned long long \* #### inject(s: unsigned long long \*, len: int) → [None](https://docs.python.org/3/library/constants.html#None) #### begin(\*args) → qvector< unsigned long long >::const_iterator #### end(\*args) → qvector< unsigned long long >::const_iterator #### insert(it: qvector< unsigned long long >::iterator, x: unsigned long long const &) → qvector< unsigned long long >::iterator #### erase(\*args) → qvector< unsigned long long >::iterator #### find(\*args) → qvector< unsigned long long >::const_iterator #### has(x: unsigned long long const &) → [bool](https://docs.python.org/3/library/functions.html#bool) #### add_unique(x: unsigned long long const &) → [bool](https://docs.python.org/3/library/functions.html#bool) #### append(x: unsigned long long const &) → [None](https://docs.python.org/3/library/constants.html#None) #### extend(x: [uint64vec_t](#ida_pro.uint64vec_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### front #### back ### *class* ida_pro.boolvec_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### push_back(\*args) → bool & #### pop_back() → [None](https://docs.python.org/3/library/constants.html#None) #### size() → [int](https://docs.python.org/3/library/functions.html#int) #### empty() → [bool](https://docs.python.org/3/library/functions.html#bool) #### at(\_idx: [int](https://docs.python.org/3/library/functions.html#int)) → bool const & #### qclear() → [None](https://docs.python.org/3/library/constants.html#None) #### clear() → [None](https://docs.python.org/3/library/constants.html#None) #### resize(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### grow(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### capacity() → [int](https://docs.python.org/3/library/functions.html#int) #### reserve(cnt: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### truncate() → [None](https://docs.python.org/3/library/constants.html#None) #### swap(r: [boolvec_t](#ida_pro.boolvec_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extract() → bool \* #### inject(s: bool \*, len: int) → [None](https://docs.python.org/3/library/constants.html#None) #### begin(\*args) → qvector< bool >::const_iterator #### end(\*args) → qvector< bool >::const_iterator #### insert(it: qvector< bool >::iterator, x: bool const &) → qvector< bool >::iterator #### erase(\*args) → qvector< bool >::iterator #### find(\*args) → qvector< bool >::const_iterator #### has(x: bool const &) → [bool](https://docs.python.org/3/library/functions.html#bool) #### add_unique(x: bool const &) → [bool](https://docs.python.org/3/library/functions.html#bool) #### append(x: bool const &) → [None](https://docs.python.org/3/library/constants.html#None) #### extend(x: [boolvec_t](#ida_pro.boolvec_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### front #### back ### *class* ida_pro.strvec_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### push_back(\*args) → simpleline_t & #### pop_back() → [None](https://docs.python.org/3/library/constants.html#None) #### size() → [int](https://docs.python.org/3/library/functions.html#int) #### empty() → [bool](https://docs.python.org/3/library/functions.html#bool) #### at(\_idx: [int](https://docs.python.org/3/library/functions.html#int)) → simpleline_t const & #### qclear() → [None](https://docs.python.org/3/library/constants.html#None) #### clear() → [None](https://docs.python.org/3/library/constants.html#None) #### resize(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### grow(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### capacity() → [int](https://docs.python.org/3/library/functions.html#int) #### reserve(cnt: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### truncate() → [None](https://docs.python.org/3/library/constants.html#None) #### swap(r: [strvec_t](#ida_pro.strvec_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extract() → simpleline_t \* #### inject(s: simpleline_t \*, len: int) → [None](https://docs.python.org/3/library/constants.html#None) #### begin(\*args) → qvector< simpleline_t >::const_iterator #### end(\*args) → qvector< simpleline_t >::const_iterator #### insert(it: qvector< simpleline_t >::iterator, x: simpleline_t const &) → qvector< simpleline_t >::iterator #### erase(\*args) → qvector< simpleline_t >::iterator #### append(x: simpleline_t const &) → [None](https://docs.python.org/3/library/constants.html#None) #### extend(x: [strvec_t](#ida_pro.strvec_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### front #### back ### *class* ida_pro.sizevec_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### push_back(\*args) → size_t & #### pop_back() → [None](https://docs.python.org/3/library/constants.html#None) #### size() → [int](https://docs.python.org/3/library/functions.html#int) #### empty() → [bool](https://docs.python.org/3/library/functions.html#bool) #### at(\_idx: [int](https://docs.python.org/3/library/functions.html#int)) → size_t const & #### qclear() → [None](https://docs.python.org/3/library/constants.html#None) #### clear() → [None](https://docs.python.org/3/library/constants.html#None) #### resize(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### grow(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### capacity() → [int](https://docs.python.org/3/library/functions.html#int) #### reserve(cnt: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### truncate() → [None](https://docs.python.org/3/library/constants.html#None) #### swap(r: [sizevec_t](#ida_pro.sizevec_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extract() → size_t \* #### inject(s: size_t \*, len: int) → [None](https://docs.python.org/3/library/constants.html#None) #### begin(\*args) → qvector< size_t >::const_iterator #### end(\*args) → qvector< size_t >::const_iterator #### insert(it: qvector< size_t >::iterator, x: size_t const &) → qvector< size_t >::iterator #### erase(\*args) → qvector< size_t >::iterator #### find(\*args) → qvector< size_t >::const_iterator #### has(x: size_t const &) → [bool](https://docs.python.org/3/library/functions.html#bool) #### add_unique(x: size_t const &) → [bool](https://docs.python.org/3/library/functions.html#bool) #### append(x: size_t const &) → [None](https://docs.python.org/3/library/constants.html#None) #### extend(x: [sizevec_t](#ida_pro.sizevec_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### front #### back ### ida_pro.qstrvec_t_create() → PyObject \* ### ida_pro.qstrvec_t_destroy(py_obj: PyObject \*) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_pro.qstrvec_t_get_clink(\_self: PyObject \*) → qstrvec_t \* ### ida_pro.qstrvec_t_get_clink_ptr(\_self: PyObject \*) → PyObject \* ### ida_pro.qstrvec_t_assign(\_self: PyObject \*, other: PyObject \*) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_pro.qstrvec_t_addressof(\_self: PyObject \*, idx: int) → PyObject \* ### ida_pro.qstrvec_t_set(\_self: PyObject \*, idx: int, s: str) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_pro.qstrvec_t_from_list(\_self: PyObject \*, py_list: PyObject \*) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_pro.qstrvec_t_size(\_self: PyObject \*) → [int](https://docs.python.org/3/library/functions.html#int) ### ida_pro.qstrvec_t_get(\_self: PyObject \*, idx: int) → PyObject \* ### ida_pro.qstrvec_t_add(\_self: PyObject \*, s: str) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_pro.qstrvec_t_clear(\_self: PyObject \*, qclear: bool) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_pro.qstrvec_t_insert(\_self: PyObject \*, idx: int, s: str) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_pro.qstrvec_t_remove(\_self: PyObject \*, idx: int) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_pro.str2user(str) Insert C-style escape characters to string * **Parameters:** **str** – the input string * **Returns:** new string with escape characters inserted, or None ### *class* ida_pro.uchar_array(nelements: [int](https://docs.python.org/3/library/functions.html#int)) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### cast() → uchar \* #### *static* frompointer(t: uchar \*) → uchar_array \* ### *class* ida_pro.tid_array(nelements: [int](https://docs.python.org/3/library/functions.html#int)) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### cast() → tid_t \* #### *static* frompointer(t: tid_t \*) → tid_array \* ### *class* ida_pro.ea_array(nelements: [int](https://docs.python.org/3/library/functions.html#int)) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### cast() → ea_t \* #### *static* frompointer(t: ea_t \*) → ea_array \* ### *class* ida_pro.sel_array(nelements: [int](https://docs.python.org/3/library/functions.html#int)) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### cast() → sel_t \* #### *static* frompointer(t: sel_t \*) → sel_array \* ### *class* ida_pro.uval_array(nelements: [int](https://docs.python.org/3/library/functions.html#int)) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### cast() → uval_t \* #### *static* frompointer(t: uval_t \*) → uval_array \* ### *class* ida_pro.uchar_pointer Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### assign(value: uchar) → [None](https://docs.python.org/3/library/constants.html#None) #### value() → uchar #### cast() → uchar \* #### *static* frompointer(t: uchar \*) → uchar_pointer \* ### *class* ida_pro.ushort_pointer Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### assign(value: ushort) → [None](https://docs.python.org/3/library/constants.html#None) #### value() → ushort #### cast() → ushort \* #### *static* frompointer(t: ushort \*) → ushort_pointer \* ### *class* ida_pro.uint_pointer Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### assign(value: uint) → [None](https://docs.python.org/3/library/constants.html#None) #### value() → uint #### cast() → uint \* #### *static* frompointer(t: uint \*) → uint_pointer \* ### *class* ida_pro.sint8_pointer Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### assign(value: sint8) → [None](https://docs.python.org/3/library/constants.html#None) #### value() → sint8 #### cast() → sint8 \* #### *static* frompointer(t: sint8 \*) → sint8_pointer \* ### *class* ida_pro.int8_pointer Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### assign(value: int8) → [None](https://docs.python.org/3/library/constants.html#None) #### value() → int8 #### cast() → int8 \* #### *static* frompointer(t: int8 \*) → int8_pointer \* ### *class* ida_pro.uint8_pointer Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### assign(value: uint8) → [None](https://docs.python.org/3/library/constants.html#None) #### value() → uint8 #### cast() → uint8 \* #### *static* frompointer(t: uint8 \*) → uint8_pointer \* ### *class* ida_pro.int16_pointer Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### assign(value: int16) → [None](https://docs.python.org/3/library/constants.html#None) #### value() → int16 #### cast() → int16 \* #### *static* frompointer(t: int16 \*) → int16_pointer \* ### *class* ida_pro.uint16_pointer Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### assign(value: uint16) → [None](https://docs.python.org/3/library/constants.html#None) #### value() → uint16 #### cast() → uint16 \* #### *static* frompointer(t: uint16 \*) → uint16_pointer \* ### *class* ida_pro.int32_pointer Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### assign(value: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### value() → [int](https://docs.python.org/3/library/functions.html#int) #### cast() → int32 \* #### *static* frompointer(t: int32 \*) → int32_pointer \* ### *class* ida_pro.uint32_pointer Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### assign(value: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### value() → [int](https://docs.python.org/3/library/functions.html#int) #### cast() → uint32 \* #### *static* frompointer(t: uint32 \*) → uint32_pointer \* ### *class* ida_pro.int64_pointer Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### assign(value: int64) → [None](https://docs.python.org/3/library/constants.html#None) #### value() → int64 #### cast() → int64 \* #### *static* frompointer(t: int64 \*) → int64_pointer \* ### *class* ida_pro.uint64_pointer Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### assign(value: uint64) → [None](https://docs.python.org/3/library/constants.html#None) #### value() → uint64 #### cast() → uint64 \* #### *static* frompointer(t: uint64 \*) → uint64_pointer \* ### *class* ida_pro.ssize_pointer Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### assign(value: ssize_t) → [None](https://docs.python.org/3/library/constants.html#None) #### value() → ssize_t #### cast() → ssize_t \* #### *static* frompointer(t: ssize_t \*) → ssize_pointer \* ### *class* ida_pro.bool_pointer Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### assign(value: [bool](https://docs.python.org/3/library/functions.html#bool)) → [None](https://docs.python.org/3/library/constants.html#None) #### value() → [bool](https://docs.python.org/3/library/functions.html#bool) #### cast() → bool \* #### *static* frompointer(t: bool \*) → bool_pointer \* ### *class* ida_pro.char_pointer Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### assign(value: char) → [None](https://docs.python.org/3/library/constants.html#None) #### value() → char #### cast() → char \* #### *static* frompointer(t: char \*) → char_pointer \* ### *class* ida_pro.short_pointer Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### assign(value: short) → [None](https://docs.python.org/3/library/constants.html#None) #### value() → short #### cast() → short \* #### *static* frompointer(t: short \*) → short_pointer \* ### *class* ida_pro.int_pointer Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### assign(value: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### value() → [int](https://docs.python.org/3/library/functions.html#int) #### cast() → int \* #### *static* frompointer(t: int \*) → int_pointer \* ### *class* ida_pro.ea_pointer Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### assign(value: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### value() → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) #### cast() → ea_t \* #### *static* frompointer(t: ea_t \*) → ea_pointer \* ### *class* ida_pro.sel_pointer Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### assign(value: sel_t) → [None](https://docs.python.org/3/library/constants.html#None) #### value() → sel_t #### cast() → sel_t \* #### *static* frompointer(t: sel_t \*) → sel_pointer \* ### *class* ida_pro.asize_pointer Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### assign(value: asize_t) → [None](https://docs.python.org/3/library/constants.html#None) #### value() → asize_t #### cast() → asize_t \* #### *static* frompointer(t: asize_t \*) → asize_pointer \* ### *class* ida_pro.adiff_pointer Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### assign(value: adiff_t) → [None](https://docs.python.org/3/library/constants.html#None) #### value() → adiff_t #### cast() → adiff_t \* #### *static* frompointer(t: adiff_t \*) → adiff_pointer \* ### *class* ida_pro.uval_pointer Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### assign(value: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### value() → [int](https://docs.python.org/3/library/functions.html#int) #### cast() → uval_t \* #### *static* frompointer(t: uval_t \*) → uval_pointer \* ### *class* ida_pro.sval_pointer Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### assign(value: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### value() → [int](https://docs.python.org/3/library/functions.html#int) #### cast() → sval_t \* #### *static* frompointer(t: sval_t \*) → sval_pointer \* ### *class* ida_pro.ea32_pointer Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### assign(value: ea32_t) → [None](https://docs.python.org/3/library/constants.html#None) #### value() → ea32_t #### cast() → ea32_t \* #### *static* frompointer(t: ea32_t \*) → ea32_pointer \* ### *class* ida_pro.ea64_pointer Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### assign(value: ea64_t) → [None](https://docs.python.org/3/library/constants.html#None) #### value() → ea64_t #### cast() → ea64_t \* #### *static* frompointer(t: ea64_t \*) → ea64_pointer \* ### *class* ida_pro.flags_pointer Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### assign(value: flags_t) → [None](https://docs.python.org/3/library/constants.html#None) #### value() → flags_t #### cast() → flags_t \* #### *static* frompointer(t: flags_t \*) → flags_pointer \* ### *class* ida_pro.flags64_pointer Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### assign(value: flags64_t) → [None](https://docs.python.org/3/library/constants.html#None) #### value() → flags64_t #### cast() → flags64_t \* #### *static* frompointer(t: flags64_t \*) → flags64_pointer \* ### *class* ida_pro.tid_pointer Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### assign(value: tid_t) → [None](https://docs.python.org/3/library/constants.html#None) #### value() → tid_t #### cast() → tid_t \* #### *static* frompointer(t: tid_t \*) → tid_pointer \* ### ida_pro.longlongvec_t ### ida_pro.ulonglongvec_t ### ida_pro.svalvec_t ### ida_pro.eavec_t # index.html.md # simple_appcall_common ## Classes | [`appcall_hooks_t`](#simple_appcall_common.appcall_hooks_t) | | |---------------------------------------------------------------|----| ## Functions | [`log`](#simple_appcall_common.log)(msg) | | |--------------------------------------------|----| ## Module Contents ### simple_appcall_common.log(msg) ### *class* simple_appcall_common.appcall_hooks_t(name_funcs=[]) Bases: [`ida_dbg.DBG_Hooks`](../ida_dbg/index.md#ida_dbg.DBG_Hooks) #### dbg_run_to(pid, tid, ea) #### run() # index.html.md # modify_struct_member summary: modify structure members attributes programmatically description: : This example shows how to access & modify certain less-obvious attributes of structure members (pointer size, representation, …)
We will first create the structure without those, and then show how to programmatically modify them. level: intermediate ## Attributes | [`struct_def`](#modify_struct_member.struct_def) | | |----------------------------------------------------|----| | [`tif`](#modify_struct_member.tif) | | | [`new_type`](#modify_struct_member.new_type) | | | [`new_repr`](#modify_struct_member.new_repr) | | ## Module Contents ### modify_struct_member.struct_def *= Multiline-String*
Show Value ```python """ struct RTTICompleteObjectLocator { int signature; int offset; int cdOffset; int pTypeDescriptor; // we will eventually want: int *__ptr32 pTypeDescriptor __offset(OFF64|RVAOFF); int pClassDescriptor; // we will eventually want: int *__ptr32 pClassDescriptor __offset(OFF64|RVAOFF); int pSelf; // we will eventually want: int *__ptr32 pSelf __offset(OFF64|RVAOFF); }; """ ```
### modify_struct_member.tif ### modify_struct_member.new_type ### modify_struct_member.new_repr # index.html.md # ida_lumina ## Attributes | [`PAT_TYPE_UNKNOWN`](#ida_lumina.PAT_TYPE_UNKNOWN) | | |----------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------| | [`PAT_TYPE_MD5`](#ida_lumina.PAT_TYPE_MD5) | | | [`PDRES_BADPTN`](#ida_lumina.PDRES_BADPTN) | | | [`PDRES_NOT_FOUND`](#ida_lumina.PDRES_NOT_FOUND) | | | [`PDRES_ERROR`](#ida_lumina.PDRES_ERROR) | | | [`PDRES_OK`](#ida_lumina.PDRES_OK) | | | [`PDRES_ADDED`](#ida_lumina.PDRES_ADDED) | | | [`PMF_PUSH_MODE_MASK`](#ida_lumina.PMF_PUSH_MODE_MASK) | Conflict resolution mode | | [`PMF_PUSH_OVERRIDE_IF_BETTER_OR_DIFFERENT`](#ida_lumina.PMF_PUSH_OVERRIDE_IF_BETTER_OR_DIFFERENT) | | | [`PMF_PUSH_OVERRIDE`](#ida_lumina.PMF_PUSH_OVERRIDE) | | | [`PMF_PUSH_DO_NOT_OVERRIDE`](#ida_lumina.PMF_PUSH_DO_NOT_OVERRIDE) | | | [`PMF_PUSH_MERGE`](#ida_lumina.PMF_PUSH_MERGE) | | | [`UOT_ADD`](#ida_lumina.UOT_ADD) | | | [`UOT_EDIT`](#ida_lumina.UOT_EDIT) | | | [`UOT_DEL`](#ida_lumina.UOT_DEL) | | | [`GST_NONE`](#ida_lumina.GST_NONE) | | | [`GST_NAME`](#ida_lumina.GST_NAME) | | | [`DMD_SORT_NONE`](#ida_lumina.DMD_SORT_NONE) | | | [`DMD_SORT_HASH`](#ida_lumina.DMD_SORT_HASH) | | | [`UF_IS_ADMIN`](#ida_lumina.UF_IS_ADMIN) | | | [`UF_CAN_DEL_HISTORY`](#ida_lumina.UF_CAN_DEL_HISTORY) | | | [`URF_IGNORE_LICID`](#ida_lumina.URF_IGNORE_LICID) | | | [`BOPF_DETAILS`](#ida_lumina.BOPF_DETAILS) | | | [`BOPF_CHRONOLOGICAL_ORDER`](#ida_lumina.BOPF_CHRONOLOGICAL_ORDER) | | | [`BOPF_LAST_FUNC_RECORD`](#ida_lumina.BOPF_LAST_FUNC_RECORD) | | | [`BOPF_FIELD_LICENSE_NAME`](#ida_lumina.BOPF_FIELD_LICENSE_NAME) | | | [`BOPF_FIELD_LICENSE_EMAIL`](#ida_lumina.BOPF_FIELD_LICENSE_EMAIL) | | | [`BOPF_FIELD_LICENSE_ID`](#ida_lumina.BOPF_FIELD_LICENSE_ID) | | | [`BOPF_SHOW_FIELD_INPUT_HASH`](#ida_lumina.BOPF_SHOW_FIELD_INPUT_HASH) | | | [`BOPF_SHOW_FIELD_INPUT_PATH`](#ida_lumina.BOPF_SHOW_FIELD_INPUT_PATH) | | | [`BOPF_SHOW_FIELD_IDB_PATH`](#ida_lumina.BOPF_SHOW_FIELD_IDB_PATH) | | | [`BOPF_SHOW_FIELD_CALCREL_HASH`](#ida_lumina.BOPF_SHOW_FIELD_CALCREL_HASH) | | | [`BOPF_SHOW_FIELD_FUNC_EA`](#ida_lumina.BOPF_SHOW_FIELD_FUNC_EA) | | | [`BOPF_SHOW_FIELD_FUNC_ID`](#ida_lumina.BOPF_SHOW_FIELD_FUNC_ID) | | | [`BOPF_SHOW_FIELD_USERNAME`](#ida_lumina.BOPF_SHOW_FIELD_USERNAME) | | | [`BOPF_SHOW_FIELD_ALL`](#ida_lumina.BOPF_SHOW_FIELD_ALL) | | | [`BOPF_PUSHES_FIELD_ALL`](#ida_lumina.BOPF_PUSHES_FIELD_ALL) | | | [`STF_DETAILS`](#ida_lumina.STF_DETAILS) | | | [`DEFAULT_TLM_FLUSH_TIMEOUT`](#ida_lumina.DEFAULT_TLM_FLUSH_TIMEOUT) | | | [`DEFAULT_TLM_FLUSH_EVCNT`](#ida_lumina.DEFAULT_TLM_FLUSH_EVCNT) | | | [`LUMINA_GET_POP_DEFAULT_NRESULTS`](#ida_lumina.LUMINA_GET_POP_DEFAULT_NRESULTS) | | | [`WKFC_INTERRUPTED`](#ida_lumina.WKFC_INTERRUPTED) | | | [`MDK_NONE`](#ida_lumina.MDK_NONE) | | | [`MDK_TYPE`](#ida_lumina.MDK_TYPE) | | | [`MDK_VD_ELAPSED`](#ida_lumina.MDK_VD_ELAPSED) | | | [`MDK_FCMT`](#ida_lumina.MDK_FCMT) | | | [`MDK_FRPTCMT`](#ida_lumina.MDK_FRPTCMT) | | | [`MDK_CMTS`](#ida_lumina.MDK_CMTS) | | | [`MDK_RPTCMTS`](#ida_lumina.MDK_RPTCMTS) | | | [`MDK_EXTRACMTS`](#ida_lumina.MDK_EXTRACMTS) | | | [`MDK_USER_STKPNTS`](#ida_lumina.MDK_USER_STKPNTS) | | | [`MDK_FRAME_DESC`](#ida_lumina.MDK_FRAME_DESC) | | | [`MDK_OPS`](#ida_lumina.MDK_OPS) | | | [`MDK_OPS_EX`](#ida_lumina.MDK_OPS_EX) | | | [`MDK_LAST`](#ida_lumina.MDK_LAST) | | | [`MDKF_NONE`](#ida_lumina.MDKF_NONE) | | | [`MDKF_STR`](#ida_lumina.MDKF_STR) | | | [`MDKF_TYPE`](#ida_lumina.MDKF_TYPE) | | | [`MDKF_INT64`](#ida_lumina.MDKF_INT64) | | | [`MDKF_UINT64`](#ida_lumina.MDKF_UINT64) | | | [`MDKF_DCSTRLIST`](#ida_lumina.MDKF_DCSTRLIST) | | | [`MDKF_DSVALLIST`](#ida_lumina.MDKF_DSVALLIST) | | | [`MDKF_FRAME_DESC`](#ida_lumina.MDKF_FRAME_DESC) | | | [`MDKF_NLSTRLIST`](#ida_lumina.MDKF_NLSTRLIST) | | | [`MDKF_DOPSLIST`](#ida_lumina.MDKF_DOPSLIST) | | | [`LFEAT_PRIMARY_MD`](#ida_lumina.LFEAT_PRIMARY_MD) | | | [`LFEAT_DEC`](#ida_lumina.LFEAT_DEC) | | | [`LFEAT_TLM`](#ida_lumina.LFEAT_TLM) | | | [`LFEAT_SECONDARY_MD`](#ida_lumina.LFEAT_SECONDARY_MD) | | | [`GCSF_NO_CONNECT`](#ida_lumina.GCSF_NO_CONNECT) | | | [`GSCF_FEAT_MASK`](#ida_lumina.GSCF_FEAT_MASK) | | | [`AMDF_UPGRADE`](#ida_lumina.AMDF_UPGRADE) | apply kvps that seem to be of higher "quality" than what's currently in the IDB | | [`AMDF_FORCE`](#ida_lumina.AMDF_FORCE) | apply kvps regardless of what's currently in the IDB, possibly removing some attributes currently present (e.g., name, or prototype could be lost) | | [`DMOF_COMPUTE_AND_DIFF_SCORE`](#ida_lumina.DMOF_COMPUTE_AND_DIFF_SCORE) | | | [`PROTOCOL_VERSION`](#ida_lumina.PROTOCOL_VERSION) | | | [`PKT_RPC_OK`](#ida_lumina.PKT_RPC_OK) | | | [`PKT_RPC_FAIL`](#ida_lumina.PKT_RPC_FAIL) | | | [`PKT_RPC_NOTIFY`](#ida_lumina.PKT_RPC_NOTIFY) | | | [`PKT_HELO`](#ida_lumina.PKT_HELO) | | | [`PKT_PULL_MD`](#ida_lumina.PKT_PULL_MD) | | | [`PKT_PULL_MD_RESULT`](#ida_lumina.PKT_PULL_MD_RESULT) | | | [`PKT_PUSH_MD`](#ida_lumina.PKT_PUSH_MD) | | | [`PKT_PUSH_MD_RESULT`](#ida_lumina.PKT_PUSH_MD_RESULT) | | | [`PKT_GET_POP`](#ida_lumina.PKT_GET_POP) | | | [`PKT_GET_POP_RESULT`](#ida_lumina.PKT_GET_POP_RESULT) | | | [`PKT_GET_LUMINA_INFO`](#ida_lumina.PKT_GET_LUMINA_INFO) | | | [`PKT_GET_LUMINA_INFO_RESULT`](#ida_lumina.PKT_GET_LUMINA_INFO_RESULT) | | | [`PKT_HELO_RESULT`](#ida_lumina.PKT_HELO_RESULT) | | | [`PULL_MD_AUTO_APPLY`](#ida_lumina.PULL_MD_AUTO_APPLY) | | | [`PULL_MD_SEEN_FILE`](#ida_lumina.PULL_MD_SEEN_FILE) | | | [`calc_func_metadata`](#id0) | | ## Classes | [`lumina_op_res_vec_t`](#ida_lumina.lumina_op_res_vec_t) | | |----------------------------------------------------------------------------------------------|----------------------------------| | [`func_info_vec_t`](#ida_lumina.func_info_vec_t) | | | [`func_info_and_frequency_vec_t`](#ida_lumina.func_info_and_frequency_vec_t) | | | [`func_info_and_pattern_vec_t`](#ida_lumina.func_info_and_pattern_vec_t) | | | [`func_info_pattern_and_frequency_vec_t`](#ida_lumina.func_info_pattern_and_frequency_vec_t) | | | [`insn_cmts_t`](#ida_lumina.insn_cmts_t) | | | [`user_stkpnts_t`](#ida_lumina.user_stkpnts_t) | | | [`frame_mems_t`](#ida_lumina.frame_mems_t) | | | [`extra_cmts_t`](#ida_lumina.extra_cmts_t) | | | [`skipped_funcs_t`](#ida_lumina.skipped_funcs_t) | | | [`insn_ops_reprs_t`](#ida_lumina.insn_ops_reprs_t) | | | [`pattern_ids_t`](#ida_lumina.pattern_ids_t) | | | [`pop_fun_vec_t`](#ida_lumina.pop_fun_vec_t) | | | [`mdkey_vec_t`](#ida_lumina.mdkey_vec_t) | | | [`insn_site_t`](#ida_lumina.insn_site_t) | | | [`insn_cmt_t`](#ida_lumina.insn_cmt_t) | | | [`user_stkpnt_t`](#ida_lumina.user_stkpnt_t) | | | [`extra_cmt_t`](#ida_lumina.extra_cmt_t) | | | [`oprepr_t`](#ida_lumina.oprepr_t) | | | [`insn_ops_repr_t`](#ida_lumina.insn_ops_repr_t) | | | [`metadata_iterator_t`](#ida_lumina.metadata_iterator_t) | | | [`md_type_parts_t`](#ida_lumina.md_type_parts_t) | | | [`func_md_diff_handler_t`](#ida_lumina.func_md_diff_handler_t) | | | [`pattern_id_t`](#ida_lumina.pattern_id_t) | | | [`func_info_base_t`](#ida_lumina.func_info_base_t) | | | [`func_info_t`](#ida_lumina.func_info_t) | | | [`input_file_t`](#ida_lumina.input_file_t) | | | [`func_info_and_frequency_t`](#ida_lumina.func_info_and_frequency_t) | | | [`func_info_and_pattern_t`](#ida_lumina.func_info_and_pattern_t) | | | [`func_info_pattern_and_frequency_t`](#ida_lumina.func_info_pattern_and_frequency_t) | | | [`pop_fun_t`](#ida_lumina.pop_fun_t) | | | [`serialized_tinfo`](#ida_lumina.serialized_tinfo) | | | [`frame_mem_t`](#ida_lumina.frame_mem_t) | | | [`frame_desc_t`](#ida_lumina.frame_desc_t) | | | [`skipped_func_t`](#ida_lumina.skipped_func_t) | | | [`user_license_info_t`](#ida_lumina.user_license_info_t) | | | [`lumina_user_t`](#ida_lumina.lumina_user_t) | | | [`peer_conn_t`](#ida_lumina.peer_conn_t) | | | [`lumina_server_info_t`](#ida_lumina.lumina_server_info_t) | | | [`lumina_info_t`](#ida_lumina.lumina_info_t) | | | [`pkt_rpc_ok_t`](#ida_lumina.pkt_rpc_ok_t) | | | [`pkt_rpc_fail_t`](#ida_lumina.pkt_rpc_fail_t) | | | [`pkt_rpc_notify_t`](#ida_lumina.pkt_rpc_notify_t) | | | [`pkt_helo_t`](#ida_lumina.pkt_helo_t) | | | [`pkt_pull_md_t`](#ida_lumina.pkt_pull_md_t) | | | [`pkt_pull_md_result_t`](#ida_lumina.pkt_pull_md_result_t) | | | [`pkt_push_md_t`](#ida_lumina.pkt_push_md_t) | | | [`pkt_push_md_result_t`](#ida_lumina.pkt_push_md_result_t) | | | [`pkt_get_pop_t`](#ida_lumina.pkt_get_pop_t) | | | [`pkt_get_pop_result_t`](#ida_lumina.pkt_get_pop_result_t) | | | [`pkt_get_lumina_info_t`](#ida_lumina.pkt_get_lumina_info_t) | | | [`pkt_get_lumina_info_result_t`](#ida_lumina.pkt_get_lumina_info_result_t) | | | [`pkt_helo_result_t`](#ida_lumina.pkt_helo_result_t) | | | [`push_md_opts_t`](#ida_lumina.push_md_opts_t) | | | [`push_md_result_t`](#ida_lumina.push_md_result_t) | | | [`lumina_client_t`](#ida_lumina.lumina_client_t) | Lumina server connection client. | | [`simple_idb_diff_handler_t`](#ida_lumina.simple_idb_diff_handler_t) | | ## Functions | [`new_packet`](#ida_lumina.new_packet)(→ rpc_packet_data_t \*) | | |-----------------------------------------------------------------------------------------------------------|---------------------------------------------| | [`calc_func_metadata`](#id0) | | | [`calc_function_metadata`](#ida_lumina.calc_function_metadata)(→ md5_t \*) | | | [`extract_insn_cmts_from_metadata`](#ida_lumina.extract_insn_cmts_from_metadata)(→ None) | | | [`extract_extra_cmts_from_metadata`](#ida_lumina.extract_extra_cmts_from_metadata)(→ None) | | | [`extract_user_stkpnts_from_metadata`](#ida_lumina.extract_user_stkpnts_from_metadata)(→ None) | | | [`extract_frame_desc_from_metadata`](#ida_lumina.extract_frame_desc_from_metadata)(→ None) | | | [`extract_insn_opreprs_from_metadata`](#ida_lumina.extract_insn_opreprs_from_metadata)(→ None) | | | [`extract_insn_opreprs_from_metadata_ex`](#ida_lumina.extract_insn_opreprs_from_metadata_ex)(→ None) | | | [`get_server_connection`](#ida_lumina.get_server_connection)(→ lumina_client_t \*) | | | [`get_server_connection2`](#ida_lumina.get_server_connection2)(→ lumina_client_t \*) | | | [`apply_metadata`](#ida_lumina.apply_metadata)(→ None) | | | [`score_metadata`](#ida_lumina.score_metadata)(→ int) | | | [`backup_metadata`](#ida_lumina.backup_metadata)(→ bool) | | | [`revert_metadata`](#ida_lumina.revert_metadata)(→ bool) | | | [`has_backup_metadata`](#ida_lumina.has_backup_metadata)(→ bool) | | | [`diff_metadata`](#ida_lumina.diff_metadata)(→ bool) | | | [`get_lumina_rpc_packet_t_index_from_base`](#ida_lumina.get_lumina_rpc_packet_t_index_from_base)(→ uchar) | | | [`extract_type_from_metadata`](#ida_lumina.extract_type_from_metadata)(→ bool) | | | [`split_metadata`](#ida_lumina.split_metadata)(→ dict) | Split the metadata blob into a set of KVP's | ## Module Contents ### *class* ida_lumina.lumina_op_res_vec_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### push_back(\*args) → lumina_op_res_t & #### pop_back() → [None](https://docs.python.org/3/library/constants.html#None) #### size() → [int](https://docs.python.org/3/library/functions.html#int) #### empty() → [bool](https://docs.python.org/3/library/functions.html#bool) #### at(\_idx: [int](https://docs.python.org/3/library/functions.html#int)) → lumina_op_res_t const & #### qclear() → [None](https://docs.python.org/3/library/constants.html#None) #### clear() → [None](https://docs.python.org/3/library/constants.html#None) #### resize(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### grow(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### capacity() → [int](https://docs.python.org/3/library/functions.html#int) #### reserve(cnt: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### truncate() → [None](https://docs.python.org/3/library/constants.html#None) #### swap(r: [lumina_op_res_vec_t](#ida_lumina.lumina_op_res_vec_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extract() → lumina_op_res_t \* #### inject(s: lumina_op_res_t \*, len: int) → [None](https://docs.python.org/3/library/constants.html#None) #### begin(\*args) → qvector< lumina_op_res_t >::const_iterator #### end(\*args) → qvector< lumina_op_res_t >::const_iterator #### insert(it: qvector< lumina_op_res_t >::iterator, x: lumina_op_res_t const &) → qvector< lumina_op_res_t >::iterator #### erase(\*args) → qvector< lumina_op_res_t >::iterator #### find(\*args) → qvector< lumina_op_res_t >::const_iterator #### has(x: lumina_op_res_t const &) → [bool](https://docs.python.org/3/library/functions.html#bool) #### add_unique(x: lumina_op_res_t const &) → [bool](https://docs.python.org/3/library/functions.html#bool) #### append(x: lumina_op_res_t const &) → [None](https://docs.python.org/3/library/constants.html#None) #### extend(x: [lumina_op_res_vec_t](#ida_lumina.lumina_op_res_vec_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### front #### back ### *class* ida_lumina.func_info_vec_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### push_back(\*args) → func_info_t & #### pop_back() → [None](https://docs.python.org/3/library/constants.html#None) #### size() → [int](https://docs.python.org/3/library/functions.html#int) #### empty() → [bool](https://docs.python.org/3/library/functions.html#bool) #### at(\_idx: [int](https://docs.python.org/3/library/functions.html#int)) → func_info_t const & #### qclear() → [None](https://docs.python.org/3/library/constants.html#None) #### clear() → [None](https://docs.python.org/3/library/constants.html#None) #### resize(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### grow(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### capacity() → [int](https://docs.python.org/3/library/functions.html#int) #### reserve(cnt: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### truncate() → [None](https://docs.python.org/3/library/constants.html#None) #### swap(r: [func_info_vec_t](#ida_lumina.func_info_vec_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extract() → func_info_t \* #### inject(s: [func_info_t](#ida_lumina.func_info_t), len: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### begin(\*args) → qvector< func_info_t >::const_iterator #### end(\*args) → qvector< func_info_t >::const_iterator #### insert(it: [func_info_t](#ida_lumina.func_info_t), x: [func_info_t](#ida_lumina.func_info_t)) → qvector< func_info_t >::iterator #### erase(\*args) → qvector< func_info_t >::iterator #### append(x: [func_info_t](#ida_lumina.func_info_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extend(x: [func_info_vec_t](#ida_lumina.func_info_vec_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### front #### back ### *class* ida_lumina.func_info_and_frequency_vec_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### push_back(\*args) → func_info_and_frequency_t & #### pop_back() → [None](https://docs.python.org/3/library/constants.html#None) #### size() → [int](https://docs.python.org/3/library/functions.html#int) #### empty() → [bool](https://docs.python.org/3/library/functions.html#bool) #### at(\_idx: [int](https://docs.python.org/3/library/functions.html#int)) → func_info_and_frequency_t const & #### qclear() → [None](https://docs.python.org/3/library/constants.html#None) #### clear() → [None](https://docs.python.org/3/library/constants.html#None) #### resize(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### grow(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### capacity() → [int](https://docs.python.org/3/library/functions.html#int) #### reserve(cnt: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### truncate() → [None](https://docs.python.org/3/library/constants.html#None) #### swap(r: [func_info_and_frequency_vec_t](#ida_lumina.func_info_and_frequency_vec_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extract() → func_info_and_frequency_t \* #### inject(s: [func_info_and_frequency_t](#ida_lumina.func_info_and_frequency_t), len: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### begin(\*args) → qvector< func_info_and_frequency_t >::const_iterator #### end(\*args) → qvector< func_info_and_frequency_t >::const_iterator #### insert(it: [func_info_and_frequency_t](#ida_lumina.func_info_and_frequency_t), x: [func_info_and_frequency_t](#ida_lumina.func_info_and_frequency_t)) → qvector< func_info_and_frequency_t >::iterator #### erase(\*args) → qvector< func_info_and_frequency_t >::iterator #### append(x: [func_info_and_frequency_t](#ida_lumina.func_info_and_frequency_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extend(x: [func_info_and_frequency_vec_t](#ida_lumina.func_info_and_frequency_vec_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### front #### back ### *class* ida_lumina.func_info_and_pattern_vec_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### push_back(\*args) → func_info_and_pattern_t & #### pop_back() → [None](https://docs.python.org/3/library/constants.html#None) #### size() → [int](https://docs.python.org/3/library/functions.html#int) #### empty() → [bool](https://docs.python.org/3/library/functions.html#bool) #### at(\_idx: [int](https://docs.python.org/3/library/functions.html#int)) → func_info_and_pattern_t const & #### qclear() → [None](https://docs.python.org/3/library/constants.html#None) #### clear() → [None](https://docs.python.org/3/library/constants.html#None) #### resize(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### grow(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### capacity() → [int](https://docs.python.org/3/library/functions.html#int) #### reserve(cnt: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### truncate() → [None](https://docs.python.org/3/library/constants.html#None) #### swap(r: [func_info_and_pattern_vec_t](#ida_lumina.func_info_and_pattern_vec_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extract() → func_info_and_pattern_t \* #### inject(s: [func_info_and_pattern_t](#ida_lumina.func_info_and_pattern_t), len: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### begin(\*args) → qvector< func_info_and_pattern_t >::const_iterator #### end(\*args) → qvector< func_info_and_pattern_t >::const_iterator #### insert(it: [func_info_and_pattern_t](#ida_lumina.func_info_and_pattern_t), x: [func_info_and_pattern_t](#ida_lumina.func_info_and_pattern_t)) → qvector< func_info_and_pattern_t >::iterator #### erase(\*args) → qvector< func_info_and_pattern_t >::iterator #### append(x: [func_info_and_pattern_t](#ida_lumina.func_info_and_pattern_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extend(x: [func_info_and_pattern_vec_t](#ida_lumina.func_info_and_pattern_vec_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### front #### back ### *class* ida_lumina.func_info_pattern_and_frequency_vec_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### push_back(\*args) → func_info_pattern_and_frequency_t & #### pop_back() → [None](https://docs.python.org/3/library/constants.html#None) #### size() → [int](https://docs.python.org/3/library/functions.html#int) #### empty() → [bool](https://docs.python.org/3/library/functions.html#bool) #### at(\_idx: [int](https://docs.python.org/3/library/functions.html#int)) → func_info_pattern_and_frequency_t const & #### qclear() → [None](https://docs.python.org/3/library/constants.html#None) #### clear() → [None](https://docs.python.org/3/library/constants.html#None) #### resize(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### grow(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### capacity() → [int](https://docs.python.org/3/library/functions.html#int) #### reserve(cnt: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### truncate() → [None](https://docs.python.org/3/library/constants.html#None) #### swap(r: [func_info_pattern_and_frequency_vec_t](#ida_lumina.func_info_pattern_and_frequency_vec_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extract() → func_info_pattern_and_frequency_t \* #### inject(s: [func_info_pattern_and_frequency_t](#ida_lumina.func_info_pattern_and_frequency_t), len: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### begin(\*args) → qvector< func_info_pattern_and_frequency_t >::const_iterator #### end(\*args) → qvector< func_info_pattern_and_frequency_t >::const_iterator #### insert(it: [func_info_pattern_and_frequency_t](#ida_lumina.func_info_pattern_and_frequency_t), x: [func_info_pattern_and_frequency_t](#ida_lumina.func_info_pattern_and_frequency_t)) → qvector< func_info_pattern_and_frequency_t >::iterator #### erase(\*args) → qvector< func_info_pattern_and_frequency_t >::iterator #### append(x: [func_info_pattern_and_frequency_t](#ida_lumina.func_info_pattern_and_frequency_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extend(x: [func_info_pattern_and_frequency_vec_t](#ida_lumina.func_info_pattern_and_frequency_vec_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### front #### back ### *class* ida_lumina.insn_cmts_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### push_back(\*args) → insn_cmt_t & #### pop_back() → [None](https://docs.python.org/3/library/constants.html#None) #### size() → [int](https://docs.python.org/3/library/functions.html#int) #### empty() → [bool](https://docs.python.org/3/library/functions.html#bool) #### at(\_idx: [int](https://docs.python.org/3/library/functions.html#int)) → insn_cmt_t const & #### qclear() → [None](https://docs.python.org/3/library/constants.html#None) #### clear() → [None](https://docs.python.org/3/library/constants.html#None) #### resize(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### grow(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### capacity() → [int](https://docs.python.org/3/library/functions.html#int) #### reserve(cnt: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### truncate() → [None](https://docs.python.org/3/library/constants.html#None) #### swap(r: [insn_cmts_t](#ida_lumina.insn_cmts_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extract() → insn_cmt_t \* #### inject(s: [insn_cmt_t](#ida_lumina.insn_cmt_t), len: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### begin(\*args) → qvector< insn_cmt_t >::const_iterator #### end(\*args) → qvector< insn_cmt_t >::const_iterator #### insert(it: [insn_cmt_t](#ida_lumina.insn_cmt_t), x: [insn_cmt_t](#ida_lumina.insn_cmt_t)) → qvector< insn_cmt_t >::iterator #### erase(\*args) → qvector< insn_cmt_t >::iterator #### append(x: [insn_cmt_t](#ida_lumina.insn_cmt_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extend(x: [insn_cmts_t](#ida_lumina.insn_cmts_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### front #### back ### *class* ida_lumina.user_stkpnts_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### push_back(\*args) → user_stkpnt_t & #### pop_back() → [None](https://docs.python.org/3/library/constants.html#None) #### size() → [int](https://docs.python.org/3/library/functions.html#int) #### empty() → [bool](https://docs.python.org/3/library/functions.html#bool) #### at(\_idx: [int](https://docs.python.org/3/library/functions.html#int)) → user_stkpnt_t const & #### qclear() → [None](https://docs.python.org/3/library/constants.html#None) #### clear() → [None](https://docs.python.org/3/library/constants.html#None) #### resize(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### grow(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### capacity() → [int](https://docs.python.org/3/library/functions.html#int) #### reserve(cnt: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### truncate() → [None](https://docs.python.org/3/library/constants.html#None) #### swap(r: [user_stkpnts_t](#ida_lumina.user_stkpnts_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extract() → user_stkpnt_t \* #### inject(s: [user_stkpnt_t](#ida_lumina.user_stkpnt_t), len: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### begin(\*args) → qvector< user_stkpnt_t >::const_iterator #### end(\*args) → qvector< user_stkpnt_t >::const_iterator #### insert(it: [user_stkpnt_t](#ida_lumina.user_stkpnt_t), x: [user_stkpnt_t](#ida_lumina.user_stkpnt_t)) → qvector< user_stkpnt_t >::iterator #### erase(\*args) → qvector< user_stkpnt_t >::iterator #### append(x: [user_stkpnt_t](#ida_lumina.user_stkpnt_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extend(x: [user_stkpnts_t](#ida_lumina.user_stkpnts_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### front #### back ### *class* ida_lumina.frame_mems_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### push_back(\*args) → frame_mem_t & #### pop_back() → [None](https://docs.python.org/3/library/constants.html#None) #### size() → [int](https://docs.python.org/3/library/functions.html#int) #### empty() → [bool](https://docs.python.org/3/library/functions.html#bool) #### at(\_idx: [int](https://docs.python.org/3/library/functions.html#int)) → frame_mem_t const & #### qclear() → [None](https://docs.python.org/3/library/constants.html#None) #### clear() → [None](https://docs.python.org/3/library/constants.html#None) #### resize(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### grow(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### capacity() → [int](https://docs.python.org/3/library/functions.html#int) #### reserve(cnt: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### truncate() → [None](https://docs.python.org/3/library/constants.html#None) #### swap(r: [frame_mems_t](#ida_lumina.frame_mems_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extract() → frame_mem_t \* #### inject(s: [frame_mem_t](#ida_lumina.frame_mem_t), len: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### begin(\*args) → qvector< frame_mem_t >::const_iterator #### end(\*args) → qvector< frame_mem_t >::const_iterator #### insert(it: [frame_mem_t](#ida_lumina.frame_mem_t), x: [frame_mem_t](#ida_lumina.frame_mem_t)) → qvector< frame_mem_t >::iterator #### erase(\*args) → qvector< frame_mem_t >::iterator #### append(x: [frame_mem_t](#ida_lumina.frame_mem_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extend(x: [frame_mems_t](#ida_lumina.frame_mems_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### front #### back ### *class* ida_lumina.extra_cmts_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### push_back(\*args) → extra_cmt_t & #### pop_back() → [None](https://docs.python.org/3/library/constants.html#None) #### size() → [int](https://docs.python.org/3/library/functions.html#int) #### empty() → [bool](https://docs.python.org/3/library/functions.html#bool) #### at(\_idx: [int](https://docs.python.org/3/library/functions.html#int)) → extra_cmt_t const & #### qclear() → [None](https://docs.python.org/3/library/constants.html#None) #### clear() → [None](https://docs.python.org/3/library/constants.html#None) #### resize(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### grow(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### capacity() → [int](https://docs.python.org/3/library/functions.html#int) #### reserve(cnt: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### truncate() → [None](https://docs.python.org/3/library/constants.html#None) #### swap(r: [extra_cmts_t](#ida_lumina.extra_cmts_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extract() → extra_cmt_t \* #### inject(s: [extra_cmt_t](#ida_lumina.extra_cmt_t), len: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### begin(\*args) → qvector< extra_cmt_t >::const_iterator #### end(\*args) → qvector< extra_cmt_t >::const_iterator #### insert(it: [extra_cmt_t](#ida_lumina.extra_cmt_t), x: [extra_cmt_t](#ida_lumina.extra_cmt_t)) → qvector< extra_cmt_t >::iterator #### erase(\*args) → qvector< extra_cmt_t >::iterator #### append(x: [extra_cmt_t](#ida_lumina.extra_cmt_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extend(x: [extra_cmts_t](#ida_lumina.extra_cmts_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### front #### back ### *class* ida_lumina.skipped_funcs_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### push_back(\*args) → skipped_func_t & #### pop_back() → [None](https://docs.python.org/3/library/constants.html#None) #### size() → [int](https://docs.python.org/3/library/functions.html#int) #### empty() → [bool](https://docs.python.org/3/library/functions.html#bool) #### at(\_idx: [int](https://docs.python.org/3/library/functions.html#int)) → skipped_func_t const & #### qclear() → [None](https://docs.python.org/3/library/constants.html#None) #### clear() → [None](https://docs.python.org/3/library/constants.html#None) #### resize(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### grow(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### capacity() → [int](https://docs.python.org/3/library/functions.html#int) #### reserve(cnt: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### truncate() → [None](https://docs.python.org/3/library/constants.html#None) #### swap(r: [skipped_funcs_t](#ida_lumina.skipped_funcs_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extract() → skipped_func_t \* #### inject(s: [skipped_func_t](#ida_lumina.skipped_func_t), len: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### begin(\*args) → qvector< skipped_func_t >::const_iterator #### end(\*args) → qvector< skipped_func_t >::const_iterator #### insert(it: [skipped_func_t](#ida_lumina.skipped_func_t), x: [skipped_func_t](#ida_lumina.skipped_func_t)) → qvector< skipped_func_t >::iterator #### erase(\*args) → qvector< skipped_func_t >::iterator #### append(x: [skipped_func_t](#ida_lumina.skipped_func_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extend(x: [skipped_funcs_t](#ida_lumina.skipped_funcs_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### front #### back ### *class* ida_lumina.insn_ops_reprs_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### push_back(\*args) → insn_ops_repr_t & #### pop_back() → [None](https://docs.python.org/3/library/constants.html#None) #### size() → [int](https://docs.python.org/3/library/functions.html#int) #### empty() → [bool](https://docs.python.org/3/library/functions.html#bool) #### at(\_idx: [int](https://docs.python.org/3/library/functions.html#int)) → insn_ops_repr_t const & #### qclear() → [None](https://docs.python.org/3/library/constants.html#None) #### clear() → [None](https://docs.python.org/3/library/constants.html#None) #### resize(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### grow(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### capacity() → [int](https://docs.python.org/3/library/functions.html#int) #### reserve(cnt: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### truncate() → [None](https://docs.python.org/3/library/constants.html#None) #### swap(r: [insn_ops_reprs_t](#ida_lumina.insn_ops_reprs_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extract() → insn_ops_repr_t \* #### inject(s: [insn_ops_repr_t](#ida_lumina.insn_ops_repr_t), len: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### begin(\*args) → qvector< insn_ops_repr_t >::const_iterator #### end(\*args) → qvector< insn_ops_repr_t >::const_iterator #### insert(it: [insn_ops_repr_t](#ida_lumina.insn_ops_repr_t), x: [insn_ops_repr_t](#ida_lumina.insn_ops_repr_t)) → qvector< insn_ops_repr_t >::iterator #### erase(\*args) → qvector< insn_ops_repr_t >::iterator #### append(x: [insn_ops_repr_t](#ida_lumina.insn_ops_repr_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extend(x: [insn_ops_reprs_t](#ida_lumina.insn_ops_reprs_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### front #### back ### *class* ida_lumina.pattern_ids_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### push_back(\*args) → pattern_id_t & #### pop_back() → [None](https://docs.python.org/3/library/constants.html#None) #### size() → [int](https://docs.python.org/3/library/functions.html#int) #### empty() → [bool](https://docs.python.org/3/library/functions.html#bool) #### at(\_idx: [int](https://docs.python.org/3/library/functions.html#int)) → pattern_id_t const & #### qclear() → [None](https://docs.python.org/3/library/constants.html#None) #### clear() → [None](https://docs.python.org/3/library/constants.html#None) #### resize(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### grow(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### capacity() → [int](https://docs.python.org/3/library/functions.html#int) #### reserve(cnt: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### truncate() → [None](https://docs.python.org/3/library/constants.html#None) #### swap(r: [pattern_ids_t](#ida_lumina.pattern_ids_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extract() → pattern_id_t \* #### inject(s: [pattern_id_t](#ida_lumina.pattern_id_t), len: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### begin(\*args) → qvector< pattern_id_t >::const_iterator #### end(\*args) → qvector< pattern_id_t >::const_iterator #### insert(it: [pattern_id_t](#ida_lumina.pattern_id_t), x: [pattern_id_t](#ida_lumina.pattern_id_t)) → qvector< pattern_id_t >::iterator #### erase(\*args) → qvector< pattern_id_t >::iterator #### append(x: [pattern_id_t](#ida_lumina.pattern_id_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extend(x: [pattern_ids_t](#ida_lumina.pattern_ids_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### front #### back ### *class* ida_lumina.pop_fun_vec_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### push_back(\*args) → pop_fun_t & #### pop_back() → [None](https://docs.python.org/3/library/constants.html#None) #### size() → [int](https://docs.python.org/3/library/functions.html#int) #### empty() → [bool](https://docs.python.org/3/library/functions.html#bool) #### at(\_idx: [int](https://docs.python.org/3/library/functions.html#int)) → pop_fun_t const & #### qclear() → [None](https://docs.python.org/3/library/constants.html#None) #### clear() → [None](https://docs.python.org/3/library/constants.html#None) #### resize(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### grow(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### capacity() → [int](https://docs.python.org/3/library/functions.html#int) #### reserve(cnt: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### truncate() → [None](https://docs.python.org/3/library/constants.html#None) #### swap(r: [pop_fun_vec_t](#ida_lumina.pop_fun_vec_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extract() → pop_fun_t \* #### inject(s: [pop_fun_t](#ida_lumina.pop_fun_t), len: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### begin(\*args) → qvector< pop_fun_t >::const_iterator #### end(\*args) → qvector< pop_fun_t >::const_iterator #### insert(it: [pop_fun_t](#ida_lumina.pop_fun_t), x: [pop_fun_t](#ida_lumina.pop_fun_t)) → qvector< pop_fun_t >::iterator #### erase(\*args) → qvector< pop_fun_t >::iterator #### append(x: [pop_fun_t](#ida_lumina.pop_fun_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extend(x: [pop_fun_vec_t](#ida_lumina.pop_fun_vec_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### front #### back ### *class* ida_lumina.mdkey_vec_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### push_back(\*args) → mdkey_t & #### pop_back() → [None](https://docs.python.org/3/library/constants.html#None) #### size() → [int](https://docs.python.org/3/library/functions.html#int) #### empty() → [bool](https://docs.python.org/3/library/functions.html#bool) #### at(\_idx: [int](https://docs.python.org/3/library/functions.html#int)) → mdkey_t const & #### qclear() → [None](https://docs.python.org/3/library/constants.html#None) #### clear() → [None](https://docs.python.org/3/library/constants.html#None) #### resize(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### grow(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### capacity() → [int](https://docs.python.org/3/library/functions.html#int) #### reserve(cnt: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### truncate() → [None](https://docs.python.org/3/library/constants.html#None) #### swap(r: [mdkey_vec_t](#ida_lumina.mdkey_vec_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extract() → mdkey_t \* #### inject(s: mdkey_t \*, len: int) → [None](https://docs.python.org/3/library/constants.html#None) #### begin(\*args) → qvector< mdkey_t >::const_iterator #### end(\*args) → qvector< mdkey_t >::const_iterator #### insert(it: qvector< mdkey_t >::iterator, x: mdkey_t const &) → qvector< mdkey_t >::iterator #### erase(\*args) → qvector< mdkey_t >::iterator #### find(\*args) → qvector< mdkey_t >::const_iterator #### has(x: mdkey_t const &) → [bool](https://docs.python.org/3/library/functions.html#bool) #### add_unique(x: mdkey_t const &) → [bool](https://docs.python.org/3/library/functions.html#bool) #### append(x: mdkey_t const &) → [None](https://docs.python.org/3/library/constants.html#None) #### extend(x: [mdkey_vec_t](#ida_lumina.mdkey_vec_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### front #### back ### ida_lumina.PAT_TYPE_UNKNOWN ### ida_lumina.PAT_TYPE_MD5 ### ida_lumina.PDRES_BADPTN ### ida_lumina.PDRES_NOT_FOUND ### ida_lumina.PDRES_ERROR ### ida_lumina.PDRES_OK ### ida_lumina.PDRES_ADDED ### ida_lumina.PMF_PUSH_MODE_MASK Conflict resolution mode ### ida_lumina.PMF_PUSH_OVERRIDE_IF_BETTER_OR_DIFFERENT ### ida_lumina.PMF_PUSH_OVERRIDE ### ida_lumina.PMF_PUSH_DO_NOT_OVERRIDE ### ida_lumina.PMF_PUSH_MERGE ### ida_lumina.UOT_ADD ### ida_lumina.UOT_EDIT ### ida_lumina.UOT_DEL ### ida_lumina.GST_NONE ### ida_lumina.GST_NAME ### ida_lumina.DMD_SORT_NONE ### ida_lumina.DMD_SORT_HASH ### ida_lumina.UF_IS_ADMIN ### ida_lumina.UF_CAN_DEL_HISTORY ### ida_lumina.URF_IGNORE_LICID ### ida_lumina.BOPF_DETAILS ### ida_lumina.BOPF_CHRONOLOGICAL_ORDER ### ida_lumina.BOPF_LAST_FUNC_RECORD ### ida_lumina.BOPF_FIELD_LICENSE_NAME ### ida_lumina.BOPF_FIELD_LICENSE_EMAIL ### ida_lumina.BOPF_FIELD_LICENSE_ID ### ida_lumina.BOPF_SHOW_FIELD_INPUT_HASH ### ida_lumina.BOPF_SHOW_FIELD_INPUT_PATH ### ida_lumina.BOPF_SHOW_FIELD_IDB_PATH ### ida_lumina.BOPF_SHOW_FIELD_CALCREL_HASH ### ida_lumina.BOPF_SHOW_FIELD_FUNC_EA ### ida_lumina.BOPF_SHOW_FIELD_FUNC_ID ### ida_lumina.BOPF_SHOW_FIELD_USERNAME ### ida_lumina.BOPF_SHOW_FIELD_ALL ### ida_lumina.BOPF_PUSHES_FIELD_ALL ### ida_lumina.STF_DETAILS ### ida_lumina.DEFAULT_TLM_FLUSH_TIMEOUT ### ida_lumina.DEFAULT_TLM_FLUSH_EVCNT ### ida_lumina.LUMINA_GET_POP_DEFAULT_NRESULTS ### ida_lumina.WKFC_INTERRUPTED ### ida_lumina.MDK_NONE ### ida_lumina.MDK_TYPE ### ida_lumina.MDK_VD_ELAPSED ### ida_lumina.MDK_FCMT ### ida_lumina.MDK_FRPTCMT ### ida_lumina.MDK_CMTS ### ida_lumina.MDK_RPTCMTS ### ida_lumina.MDK_EXTRACMTS ### ida_lumina.MDK_USER_STKPNTS ### ida_lumina.MDK_FRAME_DESC ### ida_lumina.MDK_OPS ### ida_lumina.MDK_OPS_EX ### ida_lumina.MDK_LAST ### ida_lumina.MDKF_NONE ### ida_lumina.MDKF_STR ### ida_lumina.MDKF_TYPE ### ida_lumina.MDKF_INT64 ### ida_lumina.MDKF_UINT64 ### ida_lumina.MDKF_DCSTRLIST ### ida_lumina.MDKF_DSVALLIST ### ida_lumina.MDKF_FRAME_DESC ### ida_lumina.MDKF_NLSTRLIST ### ida_lumina.MDKF_DOPSLIST ### *class* ida_lumina.insn_site_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### fchunk_nr *: [int](https://docs.python.org/3/library/functions.html#int)* #### fchunk_off *: [int](https://docs.python.org/3/library/functions.html#int)* #### toea(pfn: func_t const \*) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) #### to_ea(func_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) ### *class* ida_lumina.insn_cmt_t Bases: [`insn_site_t`](#ida_lumina.insn_site_t) #### thisown #### cmt *: [str](https://docs.python.org/3/library/stdtypes.html#str)* ### *class* ida_lumina.user_stkpnt_t Bases: [`insn_site_t`](#ida_lumina.insn_site_t) #### thisown #### delta *: int64* ### *class* ida_lumina.extra_cmt_t Bases: [`insn_site_t`](#ida_lumina.insn_site_t) #### thisown #### prev *: [str](https://docs.python.org/3/library/stdtypes.html#str)* #### next *: [str](https://docs.python.org/3/library/stdtypes.html#str)* ### *class* ida_lumina.oprepr_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### flags *: flags64_t* #### opinfo *: [opinfo_t](../ida_nalt/index.md#ida_nalt.opinfo_t)* ### *class* ida_lumina.insn_ops_repr_t Bases: [`insn_site_t`](#ida_lumina.insn_site_t) #### thisown #### flags *: flags64_t* #### ops *: [opinfo_t](../ida_nalt/index.md#ida_nalt.opinfo_t)[8]* ### *class* ida_lumina.metadata_iterator_t(\_md: metadata_t const &) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### data *: uchar const \** #### size *: [int](https://docs.python.org/3/library/functions.html#int)* #### key *: mdkey_t* #### next() → [bool](https://docs.python.org/3/library/functions.html#bool) #### data_end() → uchar const \* ### ida_lumina.new_packet(code: uchar, ptr: uchar const \* = None, len: int = 0, version: int = -1) → rpc_packet_data_t \* ### ida_lumina.LFEAT_PRIMARY_MD ### ida_lumina.LFEAT_DEC ### ida_lumina.LFEAT_TLM ### ida_lumina.LFEAT_SECONDARY_MD ### ida_lumina.calc_func_metadata(out_fi: func_info_t, pfn: func_t const \*, append_metadata: metadata_appender_t \* = None) → md5_t \* ### ida_lumina.calc_function_metadata(out_fi: func_info_t, func_ea: ida_idaapi.ea_t, append_metadata: metadata_appender_ea_t \* = None) → md5_t \* ### *class* ida_lumina.md_type_parts_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### userti *: [bool](https://docs.python.org/3/library/functions.html#bool)* #### type *: qtype* #### fields *: qtype* ### ida_lumina.extract_insn_cmts_from_metadata(out: insn_cmts_t, ptr: uchar const \*) → [None](https://docs.python.org/3/library/constants.html#None) ### ida_lumina.extract_extra_cmts_from_metadata(out: extra_cmts_t, ptr: uchar const \*) → [None](https://docs.python.org/3/library/constants.html#None) ### ida_lumina.extract_user_stkpnts_from_metadata(out: user_stkpnts_t, ptr: uchar const \*) → [None](https://docs.python.org/3/library/constants.html#None) ### ida_lumina.extract_frame_desc_from_metadata(out: frame_desc_t, ptr: uchar const \*) → [None](https://docs.python.org/3/library/constants.html#None) ### ida_lumina.extract_insn_opreprs_from_metadata(out: insn_ops_reprs_t, ptr: uchar const \*) → [None](https://docs.python.org/3/library/constants.html#None) ### ida_lumina.extract_insn_opreprs_from_metadata_ex(out: insn_ops_reprs_t, ptr: uchar const \*) → [None](https://docs.python.org/3/library/constants.html#None) ### ida_lumina.get_server_connection() → lumina_client_t \* ### ida_lumina.get_server_connection2(flags: [int](https://docs.python.org/3/library/functions.html#int)) → lumina_client_t \* ### ida_lumina.GCSF_NO_CONNECT ### ida_lumina.GSCF_FEAT_MASK ### ida_lumina.AMDF_UPGRADE apply kvps that seem to be of higher “quality” than what’s currently in the IDB ### ida_lumina.AMDF_FORCE apply kvps regardless of what’s currently in the IDB, possibly removing some attributes currently present (e.g., name, or prototype could be lost) ### ida_lumina.apply_metadata(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), fi: [func_info_t](#ida_lumina.func_info_t), flags: [int](https://docs.python.org/3/library/functions.html#int) = 0) → [None](https://docs.python.org/3/library/constants.html#None) ### ida_lumina.score_metadata(fi: [func_info_t](#ida_lumina.func_info_t)) → [int](https://docs.python.org/3/library/functions.html#int) ### ida_lumina.backup_metadata(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_lumina.revert_metadata(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_lumina.has_backup_metadata(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### *class* ida_lumina.func_md_diff_handler_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### on_score_changed(l: [int](https://docs.python.org/3/library/functions.html#int), r: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### on_name_changed(l: [str](https://docs.python.org/3/library/stdtypes.html#str), r: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [None](https://docs.python.org/3/library/constants.html#None) #### on_proto_changed(l: [md_type_parts_t](#ida_lumina.md_type_parts_t), r: [md_type_parts_t](#ida_lumina.md_type_parts_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### on_function_comment_changed(l: [str](https://docs.python.org/3/library/stdtypes.html#str), r: [str](https://docs.python.org/3/library/stdtypes.html#str), rep: [bool](https://docs.python.org/3/library/functions.html#bool)) → [None](https://docs.python.org/3/library/constants.html#None) #### on_comment_changed(fchunk_nr: [int](https://docs.python.org/3/library/functions.html#int), fchunk_off: [int](https://docs.python.org/3/library/functions.html#int), l: [str](https://docs.python.org/3/library/stdtypes.html#str), r: [str](https://docs.python.org/3/library/stdtypes.html#str), rep: [bool](https://docs.python.org/3/library/functions.html#bool)) → [None](https://docs.python.org/3/library/constants.html#None) #### on_extra_comment_changed(fchunk_nr: [int](https://docs.python.org/3/library/functions.html#int), fchunk_off: [int](https://docs.python.org/3/library/functions.html#int), l: [str](https://docs.python.org/3/library/stdtypes.html#str), r: [str](https://docs.python.org/3/library/stdtypes.html#str), is_prev: [bool](https://docs.python.org/3/library/functions.html#bool)) → [None](https://docs.python.org/3/library/constants.html#None) #### on_user_stkpnt_changed(fchunk_nr: int, fchunk_off: int, l: int64 const \*, r: int64 const \*) → [None](https://docs.python.org/3/library/constants.html#None) #### on_frame_member_changed(offset: [int](https://docs.python.org/3/library/functions.html#int), l: [frame_mem_t](#ida_lumina.frame_mem_t), r: [frame_mem_t](#ida_lumina.frame_mem_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### on_insn_ops_repr_changed(fchunk_nr: [int](https://docs.python.org/3/library/functions.html#int), fchunk_off: [int](https://docs.python.org/3/library/functions.html#int), l: [insn_ops_repr_t](#ida_lumina.insn_ops_repr_t), r: [insn_ops_repr_t](#ida_lumina.insn_ops_repr_t)) → [None](https://docs.python.org/3/library/constants.html#None) ### ida_lumina.DMOF_COMPUTE_AND_DIFF_SCORE ### ida_lumina.diff_metadata(handler: [func_md_diff_handler_t](#ida_lumina.func_md_diff_handler_t), left: [func_info_t](#ida_lumina.func_info_t), right: [func_info_t](#ida_lumina.func_info_t), flags: [int](https://docs.python.org/3/library/functions.html#int) = 0) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_lumina.PROTOCOL_VERSION ### *class* ida_lumina.pattern_id_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### type *: pattern_type_t* #### data *: bytevec_t* ### *class* ida_lumina.func_info_base_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* #### metadata *: metadata_t* ### *class* ida_lumina.func_info_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* #### size *: [int](https://docs.python.org/3/library/functions.html#int)* #### metadata *: metadata_t* ### *class* ida_lumina.input_file_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### path *: [str](https://docs.python.org/3/library/stdtypes.html#str)* #### md5 *: md5_t* ### *class* ida_lumina.func_info_and_frequency_t(\_\_frequency: [int](https://docs.python.org/3/library/functions.html#int) = 0) Bases: [`func_info_t`](#ida_lumina.func_info_t) #### thisown #### frequency *: [int](https://docs.python.org/3/library/functions.html#int)* ### *class* ida_lumina.func_info_and_pattern_t(\*args) Bases: [`func_info_t`](#ida_lumina.func_info_t) #### thisown #### pattern_id *: [pattern_id_t](#ida_lumina.pattern_id_t)* ### *class* ida_lumina.func_info_pattern_and_frequency_t(\_\_frequency: [int](https://docs.python.org/3/library/functions.html#int) = 0) Bases: [`func_info_and_pattern_t`](#ida_lumina.func_info_and_pattern_t) #### thisown #### frequency *: [int](https://docs.python.org/3/library/functions.html#int)* ### *class* ida_lumina.pop_fun_t(\*args) Bases: [`func_info_pattern_and_frequency_t`](#ida_lumina.func_info_pattern_and_frequency_t) #### thisown #### hostname *: [str](https://docs.python.org/3/library/stdtypes.html#str)* #### input *: [input_file_t](#ida_lumina.input_file_t)* #### ea64 *: ea64_t* ### *class* ida_lumina.serialized_tinfo(\_\_type: type_t const \* = None, \_\_fields: type_t const \* = None) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### type *: qtype* #### fields *: qtype* ### *class* ida_lumina.frame_mem_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* #### type *: [serialized_tinfo](#ida_lumina.serialized_tinfo)* #### cmt *: [str](https://docs.python.org/3/library/stdtypes.html#str)* #### rptcmt *: [str](https://docs.python.org/3/library/stdtypes.html#str)* #### offset *: ea64_t* #### info *: [oprepr_t](#ida_lumina.oprepr_t)* #### nbytes *: asize_t* ### *class* ida_lumina.frame_desc_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### frsize *: [int](https://docs.python.org/3/library/functions.html#int)* #### argsize *: asize_t* #### frregs *: ushort* #### members *: [frame_mems_t](#ida_lumina.frame_mems_t)* ### *class* ida_lumina.skipped_func_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### pattern_id *: [pattern_id_t](#ida_lumina.pattern_id_t)* #### count *: [int](https://docs.python.org/3/library/functions.html#int)* ### *class* ida_lumina.user_license_info_t(\_\_id: [str](https://docs.python.org/3/library/stdtypes.html#str) = None, \_\_name: [str](https://docs.python.org/3/library/stdtypes.html#str) = None, \_\_email: [str](https://docs.python.org/3/library/stdtypes.html#str) = None) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### id *: [str](https://docs.python.org/3/library/stdtypes.html#str)* #### name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* #### email *: [str](https://docs.python.org/3/library/stdtypes.html#str)* ### *class* ida_lumina.lumina_user_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### license_info *: [user_license_info_t](#ida_lumina.user_license_info_t)* #### name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* #### karma *: [int](https://docs.python.org/3/library/functions.html#int)* #### last_active *: utc_timestamp_t* #### features *: [int](https://docs.python.org/3/library/functions.html#int)* #### is_admin() → [bool](https://docs.python.org/3/library/functions.html#bool) #### set_is_admin(v: [bool](https://docs.python.org/3/library/functions.html#bool) = True) → [None](https://docs.python.org/3/library/constants.html#None) #### can_del_history() → [bool](https://docs.python.org/3/library/functions.html#bool) #### set_can_del_history(v: [bool](https://docs.python.org/3/library/functions.html#bool) = True) → [None](https://docs.python.org/3/library/constants.html#None) ### *class* ida_lumina.peer_conn_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### session_id *: [int](https://docs.python.org/3/library/functions.html#int)* #### peer_name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* #### user *: [lumina_user_t](#ida_lumina.lumina_user_t)* #### established *: utc_timestamp_t* ### *class* ida_lumina.lumina_server_info_t(\_\_macaddr: [str](https://docs.python.org/3/library/stdtypes.html#str) = None, \_\_verstr: [str](https://docs.python.org/3/library/stdtypes.html#str) = None, \_\_start_time: utc_timestamp_t = 0, \_\_current_time: utc_timestamp_t = 0) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### macaddr *: [str](https://docs.python.org/3/library/stdtypes.html#str)* #### verstr *: [str](https://docs.python.org/3/library/stdtypes.html#str)* #### start_time *: utc_timestamp_t* #### current_time *: utc_timestamp_t* ### *class* ida_lumina.lumina_info_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### client *: [peer_conn_t](#ida_lumina.peer_conn_t)* #### server *: [lumina_server_info_t](#ida_lumina.lumina_server_info_t)* ### ida_lumina.PKT_RPC_OK ### ida_lumina.PKT_RPC_FAIL ### ida_lumina.PKT_RPC_NOTIFY ### ida_lumina.PKT_HELO ### ida_lumina.PKT_PULL_MD ### ida_lumina.PKT_PULL_MD_RESULT ### ida_lumina.PKT_PUSH_MD ### ida_lumina.PKT_PUSH_MD_RESULT ### ida_lumina.PKT_GET_POP ### ida_lumina.PKT_GET_POP_RESULT ### ida_lumina.PKT_GET_LUMINA_INFO ### ida_lumina.PKT_GET_LUMINA_INFO_RESULT ### ida_lumina.PKT_HELO_RESULT ### ida_lumina.get_lumina_rpc_packet_t_index_from_base(code: lumina_rpc_packet_t) → uchar ### *class* ida_lumina.pkt_rpc_ok_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown ### *class* ida_lumina.pkt_rpc_fail_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### result *: [int](https://docs.python.org/3/library/functions.html#int)* #### error *: [str](https://docs.python.org/3/library/stdtypes.html#str)* ### *class* ida_lumina.pkt_rpc_notify_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### type *: rpc_notification_type_t* #### text *: [str](https://docs.python.org/3/library/stdtypes.html#str)* ### *class* ida_lumina.pkt_helo_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### client_version *: [int](https://docs.python.org/3/library/functions.html#int)* #### key *: bytevec_t* #### license_id *: uchar[6]* #### record_conv *: [bool](https://docs.python.org/3/library/functions.html#bool)* #### username *: [str](https://docs.python.org/3/library/stdtypes.html#str)* #### password *: [str](https://docs.python.org/3/library/stdtypes.html#str)* ### *class* ida_lumina.pkt_pull_md_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### flags *: [int](https://docs.python.org/3/library/functions.html#int)* #### keys *: [mdkey_vec_t](#ida_lumina.mdkey_vec_t)* #### pattern_ids *: [pattern_ids_t](#ida_lumina.pattern_ids_t)* ### *class* ida_lumina.pkt_pull_md_result_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### codes *: [lumina_op_res_vec_t](#ida_lumina.lumina_op_res_vec_t)* #### results *: [func_info_and_frequency_vec_t](#ida_lumina.func_info_and_frequency_vec_t)* ### *class* ida_lumina.pkt_push_md_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### flags *: [int](https://docs.python.org/3/library/functions.html#int)* #### idb *: [str](https://docs.python.org/3/library/stdtypes.html#str)* #### input *: [input_file_t](#ida_lumina.input_file_t)* #### hostname *: [str](https://docs.python.org/3/library/stdtypes.html#str)* #### contents *: [func_info_and_pattern_vec_t](#ida_lumina.func_info_and_pattern_vec_t)* #### ea64s *: ea64vec_t* ### *class* ida_lumina.pkt_push_md_result_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### codes *: [lumina_op_res_vec_t](#ida_lumina.lumina_op_res_vec_t)* ### *class* ida_lumina.pkt_get_pop_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### nresults *: [int](https://docs.python.org/3/library/functions.html#int)* ### *class* ida_lumina.pkt_get_pop_result_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### results *: [pop_fun_vec_t](#ida_lumina.pop_fun_vec_t)* ### *class* ida_lumina.pkt_get_lumina_info_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown ### *class* ida_lumina.pkt_get_lumina_info_result_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### info *: [lumina_info_t](#ida_lumina.lumina_info_t)* ### *class* ida_lumina.pkt_helo_result_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### user *: [lumina_user_t](#ida_lumina.lumina_user_t)* ### *class* ida_lumina.push_md_opts_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### eas *: eavec_t* #### min_func_size *: [int](https://docs.python.org/3/library/functions.html#int)* ### *class* ida_lumina.push_md_result_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### eas *: eavec_t* #### codes *: [lumina_op_res_vec_t](#ida_lumina.lumina_op_res_vec_t)* #### contents *: [func_info_and_pattern_vec_t](#ida_lumina.func_info_and_pattern_vec_t)* ### *class* ida_lumina.lumina_client_t(\*args, \*\*kwargs) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) Lumina server connection client. Use get_server_connection() to obtain an instance. #### thisown #### set_pattern_id_md5(out: pattern_id_t, md5: md5_t const &) → [None](https://docs.python.org/3/library/constants.html#None) #### is_pattern_id(pid: pattern_id_t, md5: md5_t const &) → [bool](https://docs.python.org/3/library/functions.html#bool) #### pull_md(\*args) → [pkt_pull_md_result_t](#ida_lumina.pkt_pull_md_result_t) Pull metadata from the Lumina server. See lumina.hpp’s lumina_client_t::pull_md() for authoritative documentation. This method has the following signatures: > 1. pull_md(funcs: ida_pro.eavec_t, pull_md_flags: int = 0) -> pkt_pull_md_result_t > 2. pull_md(pattern_ids: pattern_ids_t, pull_md_flags: int = 0) -> pkt_pull_md_result_t Note: The C++ errbuf parameter is not exposed in Python. * **Parameters:** * **funcs** – vector of function addresses (if empty, will be filled with “interesting” functions) * **pattern_ids** – vector of pattern IDs (will be consumed/destroyed) * **pull_md_flags** – combination of PULL_MD_\* flags: - PULL_MD_AUTO_APPLY (0x01): automatically apply metadata - PULL_MD_SEEN_FILE (0x02): do not increase frequency count * **Returns:** pkt_pull_md_result_t with results (func_info_and_frequency_vec_t) and codes (lumina_op_res_vec_t) for per-input status #### obsolete_push_md(result: push_md_result_t, opts: push_md_opts_t, append_metadata: metadata_appender_t \* = None, flags: int = 0) → [bool](https://docs.python.org/3/library/functions.html#bool) #### get_pop(nresults: [int](https://docs.python.org/3/library/functions.html#int) = 10) → pkt_get_pop_result_t \* #### del_history(funcs: eavec_t const &) → [bool](https://docs.python.org/3/library/functions.html#bool) #### push_md(result: push_md_result_t, opts: push_md_opts_t, append_metadata: metadata_appender_ea_t \* = None, flags: int = 0) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_lumina.PULL_MD_AUTO_APPLY ### ida_lumina.PULL_MD_SEEN_FILE ### ida_lumina.extract_type_from_metadata(out: tinfo_t, \_in: bytevec_t const &) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_lumina.split_metadata(metadata: [bytes](https://docs.python.org/3/library/stdtypes.html#bytes)) → [dict](https://docs.python.org/3/library/stdtypes.html#dict) Split the metadata blob into a set of KVP’s * **Parameters:** **metadata** – a metadata blob * **Returns:** a set of KVP’s ### *class* ida_lumina.simple_idb_diff_handler_t(pfn) Bases: [`func_md_diff_handler_t`](#ida_lumina.func_md_diff_handler_t) #### NO_DATA_MARKER *= None* #### *class* indenter_t(handler) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### handler #### pfn #### header_generated *= False* #### lines *= []* #### indent *= 0* #### on_score_changed(l, r) #### on_name_changed(l, r) #### on_proto_changed(l, r) #### on_function_comment_changed(l, r, rep) #### on_comment_changed(fchunk_nr, fchunk_off, l, r, rep) #### on_extra_comment_changed(fchunk_nr, fchunk_off, l, r, is_prev) #### on_user_stkpnt_changed(fchunk_nr, fchunk_off, l, r) #### on_frame_member_changed(offset, l, r) #### on_insn_ops_repr_changed(fchunk_nr, fchunk_off, l, r) #### ensure_header_generated() #### where(fchunk_nr, fchunk_off) #### format_type(type_parts) #### format_extra_cmt(cmt) #### format_stkpnt(stkpnt) #### format_frame_member(m) #### format_insn_ops(ro) #### put(msg) #### put2(l, r, topic) ### ida_lumina.calc_func_metadata # index.html.md # print_registers summary: print all registers, for all threads in the debugged process description: : Iterate over the list of threads in the program being debugged, and dump all registers contents
To use this example:
> * run ida64 on test program simple_appcall_linux64, or > ida on test program simple_appcall_linux32, and wait for > auto-analysis to finish > * put a breakpoint somewhere in the code > * select the ‘linux debugger’ (either local, or remote) > * start debugging > * Press Alt+Shift+C at the breakpoint level: beginner ## Attributes | [`ACTION_NAME`](#print_registers.ACTION_NAME) | | |-------------------------------------------------------|----| | [`ACTION_LABEL`](#print_registers.ACTION_LABEL) | | | [`ACTION_SHORTCUT`](#print_registers.ACTION_SHORTCUT) | | | [`ACTION_HELP`](#print_registers.ACTION_HELP) | | ## Classes | [`print_registers_ah_t`](#print_registers.print_registers_ah_t) | | |-------------------------------------------------------------------|----| ## Functions | [`log`](#print_registers.log)(msg) | | |--------------------------------------|----| ## Module Contents ### print_registers.log(msg) ### *class* print_registers.print_registers_ah_t #### activate(ctx) #### update(ctx) ### print_registers.ACTION_NAME *= 'example:print_registers'* ### print_registers.ACTION_LABEL *= 'Print registers'* ### print_registers.ACTION_SHORTCUT *= 'Alt+Shift+C'* ### print_registers.ACTION_HELP *= 'Press Alt+Shift+C to print the registers'* # index.html.md # ida_regfinder ## Attributes | [`cvar`](#ida_regfinder.cvar) | | |---------------------------------|----| ## Classes | [`reg_value_def_t`](#ida_regfinder.reg_value_def_t) | | |-------------------------------------------------------|----| | [`reg_value_base_t`](#ida_regfinder.reg_value_base_t) | | | [`reg_value_info_t`](#ida_regfinder.reg_value_info_t) | | ## Functions | [`find_reg_value`](#ida_regfinder.find_reg_value)(→ uint64 \*) | Find register value using the register tracker. | |-----------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [`find_sp_value`](#ida_regfinder.find_sp_value)(→ sval_t \*) | Find a value of the SP based register using the register tracker. | | [`find_reg_value_info`](#ida_regfinder.find_reg_value_info)(→ bool) | Find register value using the register tracker. | | [`find_regname_value_info`](#ida_regfinder.find_regname_value_info)(→ bool) | Find register value using the register tracker. | | [`find_nearest_rvi`](#ida_regfinder.find_nearest_rvi)(→ int) | Find the value of any of the two registers using the register tracker. First, this function tries to find the registers in the basic block of EA, and if it could not do this, then it tries to find in the entire function. | | [`invalidate_regfinder_cache`](#ida_regfinder.invalidate_regfinder_cache)(→ None) | The control flow from FROM to TO has removed (CREF==fl_U) or added (CREF!=fl_U). Try to update the register tracker cache after this change. If TO == BADADDR then clear the entire cache. | | [`invalidate_regfinder_xrefs_cache`](#ida_regfinder.invalidate_regfinder_xrefs_cache)(→ None) | The data reference to TO has added (DREF!=dr_O) or removed (DREF==dr_O). Update the regtracker xrefs cache after this change. If TO == BADADDR then clear the entire xrefs cache. | ## Module Contents ### *class* ida_regfinder.reg_value_def_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### val *: uint64* the value #### def_ea *: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)* the instruction address #### def_itype *: uint16* the instruction code (processor specific) #### flags *: uint16* additional info about the value #### SHORT_INSN like ‘addi reg, imm’ #### PC_BASED the value depends on DEF_EA only for numbers #### LIKE_GOT the value is like GOT only for numbers #### is_short_insn(\*args) → [bool](https://docs.python.org/3/library/functions.html#bool) This function has the following signatures: > 1. is_short_insn() -> bool > 2. is_short_insn(insn: const insn_t &) -> bool # 0: is_short_insn() -> bool # 1: is_short_insn(insn: const insn_t &) -> bool #### is_pc_based() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_like_got() → [bool](https://docs.python.org/3/library/functions.html#bool) #### NOVAL without a value #### UVAL as a number #### SPVAL as a SP delta #### ABORTED as an ABORTED value #### dstr(how: reg_value_def_t::dstr_val_t, pm: procmod_t = None) → [str](https://docs.python.org/3/library/stdtypes.html#str) Return the string representation. ### ida_regfinder.cvar ### *class* ida_regfinder.reg_value_base_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### clear() → [None](https://docs.python.org/3/library/constants.html#None) Undefine the value. #### empty() → [bool](https://docs.python.org/3/library/functions.html#bool) Return ‘true’ if we know nothing about a value. #### swap(r: [reg_value_base_t](#ida_regfinder.reg_value_base_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### *static* make_dead_end(dead_end_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [reg_value_base_t](#ida_regfinder.reg_value_base_t) Return the undefined value because of a dead end. #### *static* make_aborted(bblk_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), aborting_depth: [int](https://docs.python.org/3/library/functions.html#int) = -1) → [reg_value_base_t](#ida_regfinder.reg_value_base_t) Return the value after aborting. #### *static* make_badinsn(insn_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [reg_value_base_t](#ida_regfinder.reg_value_base_t) Return the unknown value after a bad insn. #### *static* make_unkinsn(insn: insn_t const &) → [reg_value_base_t](#ida_regfinder.reg_value_base_t) Return the unknown value after executing the insn. #### *static* make_unkfunc(func_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [reg_value_base_t](#ida_regfinder.reg_value_base_t) Return the unknown value from the function start. #### *static* make_unkloop(bblk_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [reg_value_base_t](#ida_regfinder.reg_value_base_t) Return the unknown value if it changes in a loop. #### *static* make_unkmult(bblk_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [reg_value_base_t](#ida_regfinder.reg_value_base_t) Return the unknown value if the register has incompatible values. #### *static* make_unkxref(bblk_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [reg_value_base_t](#ida_regfinder.reg_value_base_t) Return the unknown value if there are too many xrefs. #### *static* make_unkvals(bblk_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [reg_value_base_t](#ida_regfinder.reg_value_base_t) Return the unknown value if the register has too many values. #### *static* make_num(\*args) → [reg_value_base_t](#ida_regfinder.reg_value_base_t) This function has the following signatures: > 1. make_num(rval: uint64, insn: const insn_t &, val_flags: uint16=0) -> reg_value_base_t > 2. make_num(rval: uint64, val_ea: ida_idaapi.ea_t, val_flags: uint16=0) -> reg_value_base_t # 0: make_num(rval: uint64, insn: const insn_t &, val_flags: uint16=0) -> reg_value_base_t Return the value that is the RVAL number. # 1: make_num(rval: uint64, val_ea: ida_idaapi.ea_t, val_flags: uint16=0) -> reg_value_base_t Return the value that is the RVAL number. #### *static* make_initial_sp(func_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [reg_value_base_t](#ida_regfinder.reg_value_base_t) Return the value that is the initial stack pointer. #### is_dead_end() → [bool](https://docs.python.org/3/library/functions.html#bool) Return ‘true’ if the value is undefined because of a dead end. #### aborted() → [bool](https://docs.python.org/3/library/functions.html#bool) Return ‘true’ if the tracking process was aborted. #### is_special() → [bool](https://docs.python.org/3/library/functions.html#bool) Return ‘true’ if the value requires special handling. #### is_badinsn() → [bool](https://docs.python.org/3/library/functions.html#bool) Return ‘true’ if the value is unknown because of a bad insn. #### is_unkinsn() → [bool](https://docs.python.org/3/library/functions.html#bool) Return ‘true’ if the value is unknown after executing the insn. #### is_unkfunc() → [bool](https://docs.python.org/3/library/functions.html#bool) Return ‘true’ if the value is unknown from the function start. #### is_unkloop() → [bool](https://docs.python.org/3/library/functions.html#bool) Return ‘true’ if the value is unknown because it changes in a loop. #### is_unkmult() → [bool](https://docs.python.org/3/library/functions.html#bool) Return ‘true’ if the value is unknown because the register has incompatible values (a number and SP delta). #### is_unkxref() → [bool](https://docs.python.org/3/library/functions.html#bool) Return ‘true’ if the value is unknown because there are too many xrefs. #### is_unkvals() → [bool](https://docs.python.org/3/library/functions.html#bool) Return ‘true’ if the value is unknown because the register has too many values. #### is_unknown() → [bool](https://docs.python.org/3/library/functions.html#bool) Return ‘true’ if the value is unknown. #### is_num() → [bool](https://docs.python.org/3/library/functions.html#bool) Return ‘true’ if the value is a constant. #### is_spd() → [bool](https://docs.python.org/3/library/functions.html#bool) Return ‘true’ if the value depends on the stack pointer. #### is_known() → [bool](https://docs.python.org/3/library/functions.html#bool) Return ‘true’ if the value is known (i.e. it is a number or SP delta). #### get_def_ea() → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) Return the defining address. #### get_def_itype() → uint16 Return the defining instruction code (processor specific). #### get_aborting_depth() → [int](https://docs.python.org/3/library/functions.html#int) Return the aborting depth if the value is ABORTED. #### set_def_itype_for_mov(insn: insn_t const &) → [bool](https://docs.python.org/3/library/functions.html#bool) Set the defining instruction The value of the destination register after the mov instruction is equal to the value of the source register before it. Therefore, we can consider this instruction as defining that value. #### is_value_unique() → [bool](https://docs.python.org/3/library/functions.html#bool) Check that the value is unique. #### have_all_vals_flag(val_flags: uint16) → [bool](https://docs.python.org/3/library/functions.html#bool) Check the given flag for each value. #### has_any_vals_flag(val_flags: uint16) → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_all_vals_pc_based() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_any_vals_pc_based() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_all_vals_like_got() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_any_vals_like_got() → [bool](https://docs.python.org/3/library/functions.html#bool) #### set_all_vals_flag(val_flags: uint16) → [None](https://docs.python.org/3/library/constants.html#None) Set the given flag for each value. #### set_all_vals_pc_based() → [None](https://docs.python.org/3/library/constants.html#None) #### set_all_vals_got_based() → [None](https://docs.python.org/3/library/constants.html#None) #### set_dead_end(dead_end_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) Set the value to be undefined because of a dead end. #### set_badinsn(insn_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) Set the value to be unknown after a bad insn. #### set_unkinsn(insn: insn_t const &) → [None](https://docs.python.org/3/library/constants.html#None) Set the value to be unknown after executing the insn. #### set_unkfunc(func_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) Set the value to be unknown from the function start. #### set_unkloop(bblk_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) Set the value to be unknown because it changes in a loop. #### set_unkmult(bblk_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) Set the value to be unknown because the register has incompatible values. #### set_unkxref(bblk_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) Set the value to be unknown because there are too many xrefs. #### set_unkvals(bblk_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) Set the value to be unknown because the register has too many values. #### set_aborted(bblk_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), aborting_depth: [int](https://docs.python.org/3/library/functions.html#int) = -1) → [None](https://docs.python.org/3/library/constants.html#None) Set the value after aborting. #### set_num(\*args) → [None](https://docs.python.org/3/library/constants.html#None) This function has the following signatures: > 1. set_num(rval: uint64, insn: const insn_t &, val_flags: uint16=0) -> None > 2. set_num(rvals: uvalvec_t > ``` > * > ``` > , insn: const insn_t &) -> None > 3. set_num(rval: uint64, val_ea: ida_idaapi.ea_t, val_flags: uint16=0) -> None # 0: set_num(rval: uint64, insn: const insn_t &, val_flags: uint16=0) -> None Set the value to be a number after executing an insn. # 1: set_num(rvals: uvalvec_t ``` * ``` , insn: const insn_t &) -> None Set the value to be numbers after executing an insn. # 2: set_num(rval: uint64, val_ea: ida_idaapi.ea_t, val_flags: uint16=0) -> None Set the value to be a number before an address. #### EQUAL L==R. #### CONTAINS L contains R (i.e. RL is empty). #### CONTAINED L is contained in R (i.e. LR is empty). #### NOT_COMPARABLE LR is not empty and RL is not empty. #### vals_union(r: [reg_value_base_t](#ida_regfinder.reg_value_base_t)) → reg_value_base_t::set_compare_res_t Add values from R into THIS ignoring duplicates. * **Returns:** EQUAL: THIS is not changed * **Returns:** CONTAINS: THIS is not changed * **Returns:** CONTAINED: THIS is a copy of R * **Returns:** NOT_COMPARABLE: values from R are added to THIS #### ADD #### SUB #### OR #### AND #### XOR #### AND_NOT #### SLL #### SLR #### SAR #### MOVT #### NEG #### NOT #### add(r: reg_value_base_t, insn: insn_t const &) → [None](https://docs.python.org/3/library/constants.html#None) The methods below save INSN as a defining instruction. Add R to the value. #### sub(r: reg_value_base_t, insn: insn_t const &) → [None](https://docs.python.org/3/library/constants.html#None) Subtract R from the value. #### bor(r: reg_value_base_t, insn: insn_t const &) → [None](https://docs.python.org/3/library/constants.html#None) Make bitwise OR of R to the value. #### band(r: reg_value_base_t, insn: insn_t const &) → [None](https://docs.python.org/3/library/constants.html#None) Make bitwise AND of R to the value. #### bxor(r: reg_value_base_t, insn: insn_t const &) → [None](https://docs.python.org/3/library/constants.html#None) Make bitwise eXclusive OR of R to the value. #### bandnot(r: reg_value_base_t, insn: insn_t const &) → [None](https://docs.python.org/3/library/constants.html#None) Make bitwise AND of the inverse of R to the value. #### sll(r: reg_value_base_t, insn: insn_t const &) → [None](https://docs.python.org/3/library/constants.html#None) Shift the value left by R. #### slr(r: reg_value_base_t, insn: insn_t const &) → [None](https://docs.python.org/3/library/constants.html#None) Shift logically the value right by R. #### sar(r: reg_value_base_t, insn: insn_t const &) → [None](https://docs.python.org/3/library/constants.html#None) Shift arithmetically the value right by R. #### movt(r: reg_value_base_t, insn: insn_t const &) → [None](https://docs.python.org/3/library/constants.html#None) Replace the top 16 bits with bottom 16 bits of R, leaving the bottom 16 bits untouched. #### neg(insn: insn_t const &) → [None](https://docs.python.org/3/library/constants.html#None) Negate the value. #### bnot(insn: insn_t const &) → [None](https://docs.python.org/3/library/constants.html#None) Make bitwise inverse of the value. #### add_num(\*args) → [None](https://docs.python.org/3/library/constants.html#None) This function has the following signatures: > 1. add_num(r: uint64, insn: const insn_t &) -> None > 2. add_num(r: uint64) -> None # 0: add_num(r: uint64, insn: const insn_t &) -> None Add R to the value. # 1: add_num(r: uint64) -> None The methods below do not change the defining instructions. Add R to the value. #### shift_left(r: uint64) → [None](https://docs.python.org/3/library/constants.html#None) Shift the value left by R. #### shift_right(r: uint64, nbytes: [int](https://docs.python.org/3/library/functions.html#int) = 0) → [None](https://docs.python.org/3/library/constants.html#None) Shift the value right by R. If NBYTES is non-zero, perform an arithmetic (signed) shift assuming the value is NBYTES bytes wide. #### extend(width: [int](https://docs.python.org/3/library/functions.html#int), is_signed: [bool](https://docs.python.org/3/library/functions.html#bool)) → [None](https://docs.python.org/3/library/constants.html#None) Zero-, or sign-extend the value from WIDTH bytes to uint64. ### *class* ida_regfinder.reg_value_info_t(\*args) Bases: [`reg_value_base_t`](#ida_regfinder.reg_value_base_t) #### thisown #### set_context(\_slotsize: [int](https://docs.python.org/3/library/functions.html#int), \_addrsize: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) Set the context. #### get_num() → [bool](https://docs.python.org/3/library/functions.html#bool) Return the number if the value is a constant (truncated to SLOTSIZE). #### get_addr() → [bool](https://docs.python.org/3/library/functions.html#bool) Return the address if the value is a constant (truncated to ADDRSIZE). #### get_spd() → [bool](https://docs.python.org/3/library/functions.html#bool) Return the SP delta if the value depends on the stack pointer (sign-extended to ADDRSIZE). #### truncate(width: [int](https://docs.python.org/3/library/functions.html#int) = 0) → [None](https://docs.python.org/3/library/constants.html#None) Truncate the value to WIDTH (in bytes). For numbers: zero-truncate to WIDTH. For SP deltas: sign-extend to WIDTH. If WIDTH = 0, defaults to SLOTSIZE for numbers and ADDRSIZE for SP deltas. #### trunc_uval(pm: procmod_t) → [None](https://docs.python.org/3/library/constants.html#None) ### ida_regfinder.find_reg_value(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), reg: [int](https://docs.python.org/3/library/functions.html#int)) → uint64 \* Find register value using the register tracker. * **Parameters:** * **ea** – the address to find a value at * **reg** – the register to find * **Returns:** 0: no value (the value is varying or the find depth is not enough to find a value) * **Returns:** 1: the found value is in VAL * **Returns:** -1: the processor module does not support a register tracker ### ida_regfinder.find_sp_value(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), reg: [int](https://docs.python.org/3/library/functions.html#int) = -1) → sval_t \* Find a value of the SP based register using the register tracker. * **Parameters:** * **ea** – the address to find a value at * **reg** – the register to find. by default the SP register is used. * **Returns:** 0: no value (the value is varying or the find depth is not enough to find a value) * **Returns:** 1: the found value is in VAL * **Returns:** -1: the processor module does not support a register tracker ### ida_regfinder.find_reg_value_info(rvi: [reg_value_info_t](#ida_regfinder.reg_value_info_t), ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), reg: [int](https://docs.python.org/3/library/functions.html#int), max_depth: [int](https://docs.python.org/3/library/functions.html#int) = 0) → [bool](https://docs.python.org/3/library/functions.html#bool) Find register value using the register tracker. * **Parameters:** * **rvi** – the found value with additional attributes * **ea** – the address to find a value at * **reg** – the register to find * **max_depth** – the number of basic blocks to look before aborting the search and returning the unknown value. 0 means the value of REGTRACK_MAX_DEPTH from ida.cfg for ordinal registers or REGTRACK_FUNC_MAX_DEPTH for the function-wide registers, -1 means the value of REGTRACK_FUNC_MAX_DEPTH from ida.cfg. * **Returns:** ‘false’: the processor module does not support a register tracker * **Returns:** ‘true’: the found value is in RVI ### ida_regfinder.find_regname_value_info(rvi: [reg_value_info_t](#ida_regfinder.reg_value_info_t), ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), regname: [str](https://docs.python.org/3/library/stdtypes.html#str), max_depth: [int](https://docs.python.org/3/library/functions.html#int) = 0) → [bool](https://docs.python.org/3/library/functions.html#bool) Find register value using the register tracker. * **Parameters:** * **rvi** – the found value with additional attributes * **ea** – the address to find a value at * **regname** – the name of the register to find * **max_depth** – the number of basic blocks to look before aborting the search and returning the unknown value. 0 means the value of REGTRACK_MAX_DEPTH from ida.cfg for ordinal registers or REGTRACK_FUNC_MAX_DEPTH for the function-wide registers, -1 means the value of REGTRACK_FUNC_MAX_DEPTH from ida.cfg. * **Returns:** ‘false’: the processor module does not support a register tracker * **Returns:** ‘true’: the found value is in RVI ### ida_regfinder.find_nearest_rvi(rvi: reg_value_info_t, ea: ida_idaapi.ea_t, reg: int const [2]) → [int](https://docs.python.org/3/library/functions.html#int) Find the value of any of the two registers using the register tracker. First, this function tries to find the registers in the basic block of EA, and if it could not do this, then it tries to find in the entire function. * **Parameters:** * **rvi** – the found value with additional attributes * **ea** – the address to find a value at * **reg** – the registers to find * **Returns:** the index of the found register or -1 ### ida_regfinder.invalidate_regfinder_cache(\*args) → [None](https://docs.python.org/3/library/constants.html#None) The control flow from FROM to TO has removed (CREF==fl_U) or added (CREF!=fl_U). Try to update the register tracker cache after this change. If TO == BADADDR then clear the entire cache. ### ida_regfinder.invalidate_regfinder_xrefs_cache(\*args) → [None](https://docs.python.org/3/library/constants.html#None) The data reference to TO has added (DREF!=dr_O) or removed (DREF==dr_O). Update the regtracker xrefs cache after this change. If TO == BADADDR then clear the entire xrefs cache. # index.html.md # ida_fpro System independent counterparts of FILE\* related functions from Clib. You should not use C standard I/O functions in your modules. The reason: Each module compiled with Borland (and statically linked to Borland’s library) will host a copy of the FILE \* information. So, if you open a file in the plugin and pass the handle to the kernel, the kernel will not be able to use it. If you really need to use the standard functions, define USE_STANDARD_FILE_FUNCTIONS. In this case do not mix them with q… functions. ## Attributes | [`QMOVE_CROSS_FS`](#ida_fpro.QMOVE_CROSS_FS) | | |----------------------------------------------------------|----| | [`QMOVE_OVERWRITE`](#ida_fpro.QMOVE_OVERWRITE) | | | [`QMOVE_OVR_RO`](#ida_fpro.QMOVE_OVR_RO) | | | [`qfile_t_from_fp`](#ida_fpro.qfile_t_from_fp) | | | [`qfile_t_from_capsule`](#ida_fpro.qfile_t_from_capsule) | | | [`qfile_t_tmpfile`](#ida_fpro.qfile_t_tmpfile) | | ## Classes | [`qfile_t`](#ida_fpro.qfile_t) | A helper class to work with FILE related functions. | |----------------------------------|-------------------------------------------------------| ## Functions | [`qfclose`](#ida_fpro.qfclose)(→ int) | | |-----------------------------------------|----| ## Module Contents ### *class* ida_fpro.qfile_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) A helper class to work with FILE related functions. #### thisown #### opened() Checks if the file is opened or not #### close() Closes the file #### open(filename, mode) Opens a file * **Parameters:** * **filename** – the file name * **mode** – The mode string, ala fopen() style * **Returns:** Boolean #### *static* from_fp(fp: FILE \*) → qfile_t \* #### *static* from_capsule(pycapsule: PyObject \*) → qfile_t \* #### *static* tmpfile() A static method to construct an instance using a temporary file #### get_fp() → FILE \* #### seek(offset, whence=ida_idaapi.SEEK_SET) Set input source position * **Parameters:** * **offset** – the seek offset * **whence** – the position to seek from * **Returns:** the new position (not 0 as fseek!) #### tell() Returns the current position #### readbytes(size, big_endian) Similar to read() but it respect the endianness * **Parameters:** * **size** – the maximum number of bytes to read * **big_endian** – endianness * **Returns:** a str, or None #### read(size) Reads from the file. Returns the buffer or None * **Parameters:** **size** – the maximum number of bytes to read * **Returns:** a str, or None #### gets(len) Reads a line from the input file. Returns the read line or None * **Parameters:** **len** – the maximum line length #### writebytes(buf, big_endian) Similar to write() but it respect the endianness * **Parameters:** * **buf** – the str to write * **big_endian** – endianness * **Returns:** result code #### write(buf) Writes to the file. Returns 0 or the number of bytes written * **Parameters:** **buf** – the str to write * **Returns:** result code #### puts(str: qfile_t.puts.str) → [int](https://docs.python.org/3/library/functions.html#int) #### size() → int64 #### flush() #### filename() → PyObject \* #### get_byte() Reads a single byte from the file. Returns None if EOF or the read byte #### put_byte() Writes a single byte to the file * **Parameters:** **chr** – the byte value ### ida_fpro.qfclose(fp: FILE \*) → [int](https://docs.python.org/3/library/functions.html#int) ### ida_fpro.QMOVE_CROSS_FS ### ida_fpro.QMOVE_OVERWRITE ### ida_fpro.QMOVE_OVR_RO ### ida_fpro.qfile_t_from_fp ### ida_fpro.qfile_t_from_capsule ### ida_fpro.qfile_t_tmpfile # index.html.md # ida_idd Contains definition of the interface to IDD modules. The interface consists of structures describing the target debugged processor and a debugging API. ## Attributes | [`IDD_INTERFACE_VERSION`](#ida_idd.IDD_INTERFACE_VERSION) | The IDD interface version number. | |---------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [`NO_THREAD`](#id0) | No thread. in PROCESS_STARTED this value can be used to specify that the main thread has not been created. It will be initialized later by a THREAD_STARTED event. | | [`DEF_ADDRSIZE`](#ida_idd.DEF_ADDRSIZE) | | | [`REGISTER_READONLY`](#ida_idd.REGISTER_READONLY) | the user cannot modify the current value of this register | | [`REGISTER_IP`](#ida_idd.REGISTER_IP) | instruction pointer | | [`REGISTER_SP`](#ida_idd.REGISTER_SP) | stack pointer | | [`REGISTER_FP`](#ida_idd.REGISTER_FP) | frame pointer | | [`REGISTER_ADDRESS`](#ida_idd.REGISTER_ADDRESS) | may contain an address | | [`REGISTER_CS`](#ida_idd.REGISTER_CS) | code segment | | [`REGISTER_SS`](#ida_idd.REGISTER_SS) | stack segment | | [`REGISTER_NOLF`](#ida_idd.REGISTER_NOLF) | displays this register without returning to the next line, allowing the next register to be displayed to its right (on the same line) | | [`REGISTER_CUSTFMT`](#ida_idd.REGISTER_CUSTFMT) | register should be displayed using a custom data format. the format name is in bit_strings[0]; the corresponding regval_t will use bytevec_t | | [`NO_EVENT`](#ida_idd.NO_EVENT) | Not an interesting event. This event can be used if the debugger module needs to return an event but there are no valid events. | | [`PROCESS_STARTED`](#ida_idd.PROCESS_STARTED) | New process has been started. | | [`PROCESS_EXITED`](#ida_idd.PROCESS_EXITED) | Process has been stopped. | | [`THREAD_STARTED`](#ida_idd.THREAD_STARTED) | New thread has been started. | | [`THREAD_EXITED`](#ida_idd.THREAD_EXITED) | Thread has been stopped. | | [`BREAKPOINT`](#ida_idd.BREAKPOINT) | Breakpoint has been reached. IDA will complain about unknown breakpoints, they should be reported as exceptions. | | [`STEP`](#ida_idd.STEP) | One instruction has been executed. Spurious events of this kind are silently ignored by IDA. | | [`EXCEPTION`](#ida_idd.EXCEPTION) | Exception. | | [`LIB_LOADED`](#ida_idd.LIB_LOADED) | New library has been loaded. | | [`LIB_UNLOADED`](#ida_idd.LIB_UNLOADED) | Library has been unloaded. | | [`INFORMATION`](#ida_idd.INFORMATION) | User-defined information. This event can be used to return empty information This will cause IDA to call get_debug_event() immediately once more. | | [`PROCESS_ATTACHED`](#ida_idd.PROCESS_ATTACHED) | Successfully attached to running process. | | [`PROCESS_DETACHED`](#ida_idd.PROCESS_DETACHED) | Successfully detached from process. | | [`PROCESS_SUSPENDED`](#ida_idd.PROCESS_SUSPENDED) | Process has been suspended. This event can be used by the debugger module to signal if the process spontaneously gets suspended (not because of an exception, breakpoint, or single step). IDA will silently switch to the 'suspended process' mode without displaying any messages. | | [`TRACE_FULL`](#ida_idd.TRACE_FULL) | The trace buffer of the tracer module is full and IDA needs to read it before continuing | | [`STATUS_MASK`](#ida_idd.STATUS_MASK) | additional info about process state | | [`BITNESS_CHANGED`](#ida_idd.BITNESS_CHANGED) | Debugger detected the process bitness changing. | | [`cvar`](#ida_idd.cvar) | | | [`BPT_WRITE`](#ida_idd.BPT_WRITE) | Write access. | | [`BPT_READ`](#ida_idd.BPT_READ) | Read access. | | [`BPT_RDWR`](#ida_idd.BPT_RDWR) | Read/write access. | | [`BPT_SOFT`](#ida_idd.BPT_SOFT) | Software breakpoint. | | [`BPT_EXEC`](#ida_idd.BPT_EXEC) | Execute instruction. | | [`BPT_DEFAULT`](#ida_idd.BPT_DEFAULT) | Choose bpt type automatically. | | [`EXC_BREAK`](#ida_idd.EXC_BREAK) | break on the exception | | [`EXC_HANDLE`](#ida_idd.EXC_HANDLE) | should be handled by the debugger? | | [`EXC_MSG`](#ida_idd.EXC_MSG) | instead of a warning, log the exception to the output window | | [`EXC_SILENT`](#ida_idd.EXC_SILENT) | do not warn or log to the output window | | [`RVT_FLOAT`](#ida_idd.RVT_FLOAT) | floating point | | [`RVT_INT`](#ida_idd.RVT_INT) | integer | | [`RVT_UNAVAILABLE`](#ida_idd.RVT_UNAVAILABLE) | unavailable; other values mean custom data type | | [`RESMOD_NONE`](#ida_idd.RESMOD_NONE) | no stepping, run freely | | [`RESMOD_INTO`](#ida_idd.RESMOD_INTO) | step into call (the most typical single stepping) | | [`RESMOD_OVER`](#ida_idd.RESMOD_OVER) | step over call | | [`RESMOD_OUT`](#ida_idd.RESMOD_OUT) | step out of the current function (run until return) | | [`RESMOD_SRCINTO`](#ida_idd.RESMOD_SRCINTO) | until control reaches a different source line | | [`RESMOD_SRCOVER`](#ida_idd.RESMOD_SRCOVER) | next source line in the current stack frame | | [`RESMOD_SRCOUT`](#ida_idd.RESMOD_SRCOUT) | next source line in the previous stack frame | | [`RESMOD_USER`](#ida_idd.RESMOD_USER) | step out to the user code | | [`RESMOD_HANDLE`](#ida_idd.RESMOD_HANDLE) | step into the exception handler | | [`RESMOD_BACKINTO`](#ida_idd.RESMOD_BACKINTO) | step backwards into call (in time-travel debugging) | | [`RESMOD_MAX`](#ida_idd.RESMOD_MAX) | | | [`STEP_TRACE`](#ida_idd.STEP_TRACE) | lowest level trace. trace buffers are not maintained | | [`INSN_TRACE`](#ida_idd.INSN_TRACE) | instruction tracing | | [`FUNC_TRACE`](#ida_idd.FUNC_TRACE) | function tracing | | [`BBLK_TRACE`](#ida_idd.BBLK_TRACE) | basic block tracing | | [`DRC_EVENTS`](#ida_idd.DRC_EVENTS) | success, there are pending events | | [`DRC_CRC`](#ida_idd.DRC_CRC) | success, but the input file crc does not match | | [`DRC_OK`](#ida_idd.DRC_OK) | success | | [`DRC_NONE`](#ida_idd.DRC_NONE) | reaction to the event not implemented | | [`DRC_FAILED`](#ida_idd.DRC_FAILED) | failed or false | | [`DRC_NETERR`](#ida_idd.DRC_NETERR) | network error | | [`DRC_NOFILE`](#ida_idd.DRC_NOFILE) | file not found | | [`DRC_IDBSEG`](#ida_idd.DRC_IDBSEG) | use idb segmentation | | [`DRC_NOPROC`](#ida_idd.DRC_NOPROC) | the process does not exist anymore | | [`DRC_NOCHG`](#ida_idd.DRC_NOCHG) | no changes | | [`DRC_ERROR`](#ida_idd.DRC_ERROR) | unclassified error, may be complemented by errbuf | | [`DEBUGGER_ID_X86_IA32_WIN32_USER`](#ida_idd.DEBUGGER_ID_X86_IA32_WIN32_USER) | Userland win32 processes (win32 debugging APIs). | | [`DEBUGGER_ID_X86_IA32_LINUX_USER`](#ida_idd.DEBUGGER_ID_X86_IA32_LINUX_USER) | Userland linux processes (ptrace()). | | [`DEBUGGER_ID_X86_IA32_MACOSX_USER`](#ida_idd.DEBUGGER_ID_X86_IA32_MACOSX_USER) | Userland MAC OS X processes. | | [`DEBUGGER_ID_ARM_IPHONE_USER`](#ida_idd.DEBUGGER_ID_ARM_IPHONE_USER) | iPhone 1.x | | [`DEBUGGER_ID_X86_IA32_BOCHS`](#ida_idd.DEBUGGER_ID_X86_IA32_BOCHS) | BochsDbg.exe 32. | | [`DEBUGGER_ID_6811_EMULATOR`](#ida_idd.DEBUGGER_ID_6811_EMULATOR) | MC6812 emulator (beta). | | [`DEBUGGER_ID_GDB_USER`](#ida_idd.DEBUGGER_ID_GDB_USER) | GDB remote. | | [`DEBUGGER_ID_WINDBG`](#ida_idd.DEBUGGER_ID_WINDBG) | WinDBG using Microsoft Debug engine. | | [`DEBUGGER_ID_X86_DOSBOX_EMULATOR`](#ida_idd.DEBUGGER_ID_X86_DOSBOX_EMULATOR) | Dosbox MS-DOS emulator. | | [`DEBUGGER_ID_ARM_LINUX_USER`](#ida_idd.DEBUGGER_ID_ARM_LINUX_USER) | Userland arm linux. | | [`DEBUGGER_ID_TRACE_REPLAYER`](#ida_idd.DEBUGGER_ID_TRACE_REPLAYER) | Fake debugger to replay recorded traces. | | [`DEBUGGER_ID_X86_PIN_TRACER`](#ida_idd.DEBUGGER_ID_X86_PIN_TRACER) | PIN Tracer module. | | [`DEBUGGER_ID_DALVIK_USER`](#ida_idd.DEBUGGER_ID_DALVIK_USER) | Dalvik. | | [`DEBUGGER_ID_XNU_USER`](#ida_idd.DEBUGGER_ID_XNU_USER) | XNU Kernel. | | [`DEBUGGER_ID_ARM_MACOS_USER`](#ida_idd.DEBUGGER_ID_ARM_MACOS_USER) | Userland arm MAC OS. | | [`DBG_FLAG_REMOTE`](#ida_idd.DBG_FLAG_REMOTE) | Remote debugger (requires remote host name unless DBG_FLAG_NOHOST). | | [`DBG_FLAG_NOHOST`](#ida_idd.DBG_FLAG_NOHOST) | Remote debugger with does not require network params (host/port/pass). (a unique device connected to the machine) | | [`DBG_FLAG_FAKE_ATTACH`](#ida_idd.DBG_FLAG_FAKE_ATTACH) | PROCESS_ATTACHED is a fake event and does not suspend the execution | | [`DBG_FLAG_HWDATBPT_ONE`](#ida_idd.DBG_FLAG_HWDATBPT_ONE) | Hardware data breakpoints are one byte size by default | | [`DBG_FLAG_CAN_CONT_BPT`](#ida_idd.DBG_FLAG_CAN_CONT_BPT) | Debugger knows to continue from a bpt. This flag also means that the debugger module hides breakpoints from ida upon read_memory | | [`DBG_FLAG_NEEDPORT`](#ida_idd.DBG_FLAG_NEEDPORT) | Remote debugger requires port number (to be used with DBG_FLAG_NOHOST). | | [`DBG_FLAG_DONT_DISTURB`](#ida_idd.DBG_FLAG_DONT_DISTURB) | Debugger can handle only get_debug_event(), request_pause(), exit_process() when the debugged process is running. The kernel may also call service functions (file I/O, map_address, etc) | | [`DBG_FLAG_SAFE`](#ida_idd.DBG_FLAG_SAFE) | The debugger is safe (probably because it just emulates the application without really running it) | | [`DBG_FLAG_CLEAN_EXIT`](#ida_idd.DBG_FLAG_CLEAN_EXIT) | IDA must suspend the application and remove all breakpoints before terminating the application. Usually this is not required because the application memory disappears upon termination. | | [`DBG_FLAG_USE_SREGS`](#ida_idd.DBG_FLAG_USE_SREGS) | Take segment register values into account (non flat memory). | | [`DBG_FLAG_NOSTARTDIR`](#ida_idd.DBG_FLAG_NOSTARTDIR) | Debugger module doesn't use startup directory. | | [`DBG_FLAG_NOPARAMETERS`](#ida_idd.DBG_FLAG_NOPARAMETERS) | Debugger module doesn't use commandline parameters. | | [`DBG_FLAG_NOPASSWORD`](#ida_idd.DBG_FLAG_NOPASSWORD) | Remote debugger doesn't use password. | | [`DBG_FLAG_CONNSTRING`](#ida_idd.DBG_FLAG_CONNSTRING) | Display "Connection string" instead of "Hostname" and hide the "Port" field. | | [`DBG_FLAG_SMALLBLKS`](#ida_idd.DBG_FLAG_SMALLBLKS) | If set, IDA uses 256-byte blocks for caching memory contents. Otherwise, 1024-byte blocks are used | | [`DBG_FLAG_MANMEMINFO`](#ida_idd.DBG_FLAG_MANMEMINFO) | If set, manual memory region manipulation commands will be available. Use this bit for debugger modules that cannot return memory layout information | | [`DBG_FLAG_EXITSHOTOK`](#ida_idd.DBG_FLAG_EXITSHOTOK) | IDA may take a memory snapshot at PROCESS_EXITED event. | | [`DBG_FLAG_VIRTHREADS`](#ida_idd.DBG_FLAG_VIRTHREADS) | Thread IDs may be shuffled after each debug event. (to be used for virtual threads that represent cpus for windbg kmode) | | [`DBG_FLAG_LOWCNDS`](#ida_idd.DBG_FLAG_LOWCNDS) | Low level breakpoint conditions are supported. | | [`DBG_FLAG_DEBTHREAD`](#ida_idd.DBG_FLAG_DEBTHREAD) | Supports creation of a separate thread in ida for the debugger (the debthread). Most debugger functions will be called from debthread (exceptions are marked below) The debugger module may directly call only THREAD_SAFE functions. To call other functions please use execute_sync(). The debthread significantly increases debugging speed, especially if debug events occur frequently. | | [`DBG_FLAG_DEBUG_DLL`](#ida_idd.DBG_FLAG_DEBUG_DLL) | Can debug standalone DLLs. For example, Bochs debugger can debug any snippet of code | | [`DBG_FLAG_FAKE_MEMORY`](#ida_idd.DBG_FLAG_FAKE_MEMORY) | get_memory_info()/read_memory()/write_memory() work with the idb. (there is no real process to read from, as for the replayer module) the kernel will not call these functions if this flag is set. however, third party plugins may call them, they must be implemented. | | [`DBG_FLAG_ANYSIZE_HWBPT`](#ida_idd.DBG_FLAG_ANYSIZE_HWBPT) | The debugger supports arbitrary size hardware breakpoints. | | [`DBG_FLAG_TRACER_MODULE`](#ida_idd.DBG_FLAG_TRACER_MODULE) | The module is a tracer, not a full featured debugger module. | | [`DBG_FLAG_PREFER_SWBPTS`](#ida_idd.DBG_FLAG_PREFER_SWBPTS) | Prefer to use software breakpoints. | | [`DBG_FLAG_LAZY_WATCHPTS`](#ida_idd.DBG_FLAG_LAZY_WATCHPTS) | Watchpoints are triggered before the offending instruction is executed. The debugger must temporarily disable the watchpoint and single-step before resuming. | | [`DBG_FLAG_FAST_STEP`](#ida_idd.DBG_FLAG_FAST_STEP) | Do not refresh memory layout info after single stepping. | | [`DBG_FLAG_ADD_ENVS`](#ida_idd.DBG_FLAG_ADD_ENVS) | The debugger supports launching processes with environment variables. | | [`DBG_FLAG_MERGE_ENVS`](#ida_idd.DBG_FLAG_MERGE_ENVS) | The debugger supports merge or replace setting for environment variables (only makes sense if DBG_FLAG_ADD_ENVS is set) | | [`DBG_FLAG_DISABLE_ASLR`](#ida_idd.DBG_FLAG_DISABLE_ASLR) | The debugger supports ASLR disabling (address space layout randomization) | | [`DBG_FLAG_TTD`](#ida_idd.DBG_FLAG_TTD) | The debugger is a time travel debugger and supports continuing backwards. | | [`DBG_FLAG_FULL_INSTR_BPT`](#ida_idd.DBG_FLAG_FULL_INSTR_BPT) | Setting a breakpoint in the middle of an instruction will also break. | | [`DBG_HAS_GET_PROCESSES`](#ida_idd.DBG_HAS_GET_PROCESSES) | supports ev_get_processes | | [`DBG_HAS_ATTACH_PROCESS`](#ida_idd.DBG_HAS_ATTACH_PROCESS) | supports ev_attach_process | | [`DBG_HAS_DETACH_PROCESS`](#ida_idd.DBG_HAS_DETACH_PROCESS) | supports ev_detach_process | | [`DBG_HAS_REQUEST_PAUSE`](#ida_idd.DBG_HAS_REQUEST_PAUSE) | supports ev_request_pause | | [`DBG_HAS_SET_EXCEPTION_INFO`](#ida_idd.DBG_HAS_SET_EXCEPTION_INFO) | supports ev_set_exception_info | | [`DBG_HAS_THREAD_SUSPEND`](#ida_idd.DBG_HAS_THREAD_SUSPEND) | supports ev_thread_suspend | | [`DBG_HAS_THREAD_CONTINUE`](#ida_idd.DBG_HAS_THREAD_CONTINUE) | supports ev_thread_continue | | [`DBG_HAS_SET_RESUME_MODE`](#ida_idd.DBG_HAS_SET_RESUME_MODE) | supports ev_set_resume_mode. Cannot be set inside the debugger_t::init_debugger() | | [`DBG_HAS_THREAD_GET_SREG_BASE`](#ida_idd.DBG_HAS_THREAD_GET_SREG_BASE) | supports ev_thread_get_sreg_base | | [`DBG_HAS_CHECK_BPT`](#ida_idd.DBG_HAS_CHECK_BPT) | supports ev_check_bpt | | [`DBG_HAS_OPEN_FILE`](#ida_idd.DBG_HAS_OPEN_FILE) | supports ev_open_file, ev_close_file, ev_read_file, ev_write_file | | [`DBG_HAS_UPDATE_CALL_STACK`](#ida_idd.DBG_HAS_UPDATE_CALL_STACK) | supports ev_update_call_stack | | [`DBG_HAS_APPCALL`](#ida_idd.DBG_HAS_APPCALL) | supports ev_appcall, ev_cleanup_appcall | | [`DBG_HAS_REXEC`](#ida_idd.DBG_HAS_REXEC) | supports ev_rexec | | [`DBG_HAS_MAP_ADDRESS`](#ida_idd.DBG_HAS_MAP_ADDRESS) | supports ev_map_address. Avoid using this bit, especially together with DBG_FLAG_DEBTHREAD because it may cause big slow downs | | [`DBG_RESMOD_STEP_INTO`](#ida_idd.DBG_RESMOD_STEP_INTO) | RESMOD_INTO is available | | [`DBG_RESMOD_STEP_OVER`](#ida_idd.DBG_RESMOD_STEP_OVER) | RESMOD_OVER is available | | [`DBG_RESMOD_STEP_OUT`](#ida_idd.DBG_RESMOD_STEP_OUT) | RESMOD_OUT is available | | [`DBG_RESMOD_STEP_SRCINTO`](#ida_idd.DBG_RESMOD_STEP_SRCINTO) | RESMOD_SRCINTO is available | | [`DBG_RESMOD_STEP_SRCOVER`](#ida_idd.DBG_RESMOD_STEP_SRCOVER) | RESMOD_SRCOVER is available | | [`DBG_RESMOD_STEP_SRCOUT`](#ida_idd.DBG_RESMOD_STEP_SRCOUT) | RESMOD_SRCOUT is available | | [`DBG_RESMOD_STEP_USER`](#ida_idd.DBG_RESMOD_STEP_USER) | RESMOD_USER is available | | [`DBG_RESMOD_STEP_HANDLE`](#ida_idd.DBG_RESMOD_STEP_HANDLE) | RESMOD_HANDLE is available | | [`DBG_RESMOD_STEP_BACKINTO`](#ida_idd.DBG_RESMOD_STEP_BACKINTO) | RESMOD_BACKINTO is available | | [`DBG_PROC_IS_DLL`](#ida_idd.DBG_PROC_IS_DLL) | database contains a DLL (not EXE) | | [`DBG_PROC_IS_GUI`](#ida_idd.DBG_PROC_IS_GUI) | using gui version of ida | | [`DBG_PROC_32BIT`](#ida_idd.DBG_PROC_32BIT) | application is 32-bit | | [`DBG_PROC_64BIT`](#ida_idd.DBG_PROC_64BIT) | application is 64-bit | | [`DBG_NO_TRACE`](#ida_idd.DBG_NO_TRACE) | do not trace the application (mac/linux) | | [`DBG_HIDE_WINDOW`](#ida_idd.DBG_HIDE_WINDOW) | application should be hidden on startup (windows) | | [`DBG_SUSPENDED`](#ida_idd.DBG_SUSPENDED) | application should be suspended on startup (mac) | | [`DBG_NO_ASLR`](#ida_idd.DBG_NO_ASLR) | disable ASLR (linux) | | [`BPT_OK`](#ida_idd.BPT_OK) | breakpoint can be set | | [`BPT_INTERNAL_ERR`](#ida_idd.BPT_INTERNAL_ERR) | interr occurred when verifying breakpoint | | [`BPT_BAD_TYPE`](#ida_idd.BPT_BAD_TYPE) | bpt type is not supported | | [`BPT_BAD_ALIGN`](#ida_idd.BPT_BAD_ALIGN) | alignment is invalid | | [`BPT_BAD_ADDR`](#ida_idd.BPT_BAD_ADDR) | ea is invalid | | [`BPT_BAD_LEN`](#ida_idd.BPT_BAD_LEN) | bpt len is invalid | | [`BPT_TOO_MANY`](#ida_idd.BPT_TOO_MANY) | reached max number of supported breakpoints | | [`BPT_READ_ERROR`](#ida_idd.BPT_READ_ERROR) | failed to read memory at bpt ea | | [`BPT_WRITE_ERROR`](#ida_idd.BPT_WRITE_ERROR) | failed to write memory at bpt ea | | [`BPT_SKIP`](#ida_idd.BPT_SKIP) | update_bpts(): do not process bpt | | [`BPT_PAGE_OK`](#ida_idd.BPT_PAGE_OK) | update_bpts(): ok, added a page bpt | | [`APPCALL_MANUAL`](#ida_idd.APPCALL_MANUAL) | Only set up the appcall, do not run. debugger_t::cleanup_appcall will not be generated by ida! | | [`APPCALL_DEBEV`](#ida_idd.APPCALL_DEBEV) | Return debug event information. | | [`APPCALL_TIMEOUT`](#ida_idd.APPCALL_TIMEOUT) | Appcall with timeout. If timed out, errbuf will contain "timeout". See SET_APPCALL_TIMEOUT and GET_APPCALL_TIMEOUT | | [`RQ_MASKING`](#ida_idd.RQ_MASKING) | masking step handler: unless errors, tmpbpt handlers won't be generated should be used only with request_internal_step() | | [`RQ_SUSPEND`](#ida_idd.RQ_SUSPEND) | suspending step handler: suspends the app handle_debug_event: suspends the app | | [`RQ_NOSUSP`](#ida_idd.RQ_NOSUSP) | running step handler: continues the app | | [`RQ_IGNWERR`](#ida_idd.RQ_IGNWERR) | ignore breakpoint write failures | | [`RQ_SILENT`](#ida_idd.RQ_SILENT) | all: no dialog boxes | | [`RQ_VERBOSE`](#ida_idd.RQ_VERBOSE) | all: display dialog boxes | | [`RQ_SWSCREEN`](#ida_idd.RQ_SWSCREEN) | handle_debug_event: switch screens | | [`RQ__NOTHRRF`](#ida_idd.RQ__NOTHRRF) | handle_debug_event: do not refresh threads | | [`RQ_PROCEXIT`](#ida_idd.RQ_PROCEXIT) | snapshots: the process is exiting | | [`RQ_IDAIDLE`](#ida_idd.RQ_IDAIDLE) | handle_debug_event: ida is idle | | [`RQ_SUSPRUN`](#ida_idd.RQ_SUSPRUN) | handle_debug_event: suspend at PROCESS_STARTED | | [`RQ_RESUME`](#ida_idd.RQ_RESUME) | handle_debug_event: resume application | | [`RQ_RESMOD`](#ida_idd.RQ_RESMOD) | resume_mode_t | | [`RQ_RESMOD_SHIFT`](#ida_idd.RQ_RESMOD_SHIFT) | | | [`NO_PROCESS`](#ida_idd.NO_PROCESS) | No process. | | [`NO_THREAD`](#id0) | No thread. in PROCESS_STARTED this value can be used to specify that the main thread has not been created. It will be initialized later by a THREAD_STARTED event. | | [`dbg_can_query`](#ida_idd.dbg_can_query) | | | [`Appcall`](#ida_idd.Appcall) | | ## Classes | [`excvec_t`](#ida_idd.excvec_t) | | |---------------------------------------------------------------|--------------------------------------------------------| | [`procinfo_vec_t`](#ida_idd.procinfo_vec_t) | | | [`call_stack_info_vec_t`](#ida_idd.call_stack_info_vec_t) | | | [`meminfo_vec_template_t`](#ida_idd.meminfo_vec_template_t) | | | [`regvals_t`](#ida_idd.regvals_t) | | | [`process_info_t`](#ida_idd.process_info_t) | | | [`debapp_attrs_t`](#ida_idd.debapp_attrs_t) | | | [`register_info_t`](#ida_idd.register_info_t) | | | [`memory_info_t`](#ida_idd.memory_info_t) | | | [`meminfo_vec_t`](#ida_idd.meminfo_vec_t) | | | [`scattered_segm_t`](#ida_idd.scattered_segm_t) | | | [`launch_env_t`](#ida_idd.launch_env_t) | | | [`modinfo_t`](#ida_idd.modinfo_t) | | | [`bptaddr_t`](#ida_idd.bptaddr_t) | | | [`excinfo_t`](#ida_idd.excinfo_t) | | | [`debug_event_t`](#ida_idd.debug_event_t) | | | [`exception_info_t`](#ida_idd.exception_info_t) | | | [`regval_t`](#ida_idd.regval_t) | | | [`call_stack_info_t`](#ida_idd.call_stack_info_t) | | | [`call_stack_t`](#ida_idd.call_stack_t) | | | [`thread_name_t`](#ida_idd.thread_name_t) | | | [`debugger_t`](#ida_idd.debugger_t) | | | [`dyn_register_info_array`](#ida_idd.dyn_register_info_array) | | | [`Appcall_array__`](#ida_idd.Appcall_array__) | This class is used with Appcall.array() method | | [`Appcall_callable__`](#ida_idd.Appcall_callable__) | Helper class to issue appcalls using a natural syntax: | | [`Appcall_consts__`](#ida_idd.Appcall_consts__) | Helper class used by Appcall.Consts attribute | | [`Appcall__`](#ida_idd.Appcall__) | | ## Functions | [`set_debug_event_code`](#ida_idd.set_debug_event_code)(→ None) | | |----------------------------------------------------------------------------------|-----------------------------------------------------------------------------------| | [`get_debug_event_name`](#ida_idd.get_debug_event_name)(→ str) | get debug event name | | [`dbg_appcall`](#ida_idd.dbg_appcall)(→ error_t) | Call a function from the debugged application. | | [`cleanup_appcall`](#ida_idd.cleanup_appcall)(→ error_t) | Cleanup after manual appcall. | | [`cpu2ieee`](#ida_idd.cpu2ieee)(→ int) | Convert a floating point number in CPU native format to IDA's internal format. | | [`ieee2cpu`](#ida_idd.ieee2cpu)(→ int) | Convert a floating point number in IDA's internal format to CPU native format. | | [`get_dbg`](#ida_idd.get_dbg)(→ debugger_t \*) | | | [`dbg_get_registers`](#ida_idd.dbg_get_registers)() | This function returns the register definition from the currently loaded debugger. | | [`dbg_get_thread_sreg_base`](#ida_idd.dbg_get_thread_sreg_base)(tid, sreg_value) | Returns the segment register base value | | [`dbg_read_memory`](#ida_idd.dbg_read_memory)(ea, sz) | Reads from the debugee's memory at the specified ea | | [`dbg_write_memory`](#ida_idd.dbg_write_memory)(ea, buffer) | Writes a buffer to the debugee's memory | | [`dbg_get_name`](#ida_idd.dbg_get_name)() | This function returns the current debugger's name. | | [`dbg_get_memory_info`](#ida_idd.dbg_get_memory_info)() | This function returns the memory configuration of a debugged process. | | [`appcall`](#ida_idd.appcall)(→ PyObject \*) | | | [`get_event_module_name`](#ida_idd.get_event_module_name)(→ Union[str, None]) | | | [`get_event_module_base`](#ida_idd.get_event_module_base)(→ ida_idaapi.ea_t) | | | [`get_event_module_size`](#ida_idd.get_event_module_size)(→ asize_t) | | | [`get_event_exc_info`](#ida_idd.get_event_exc_info)(→ Union[str, None]) | | | [`get_event_info`](#ida_idd.get_event_info)(→ Union[str, None]) | | | [`get_event_bpt_hea`](#ida_idd.get_event_bpt_hea)(→ ida_idaapi.ea_t) | | | [`get_event_exc_code`](#ida_idd.get_event_exc_code)(→ uint) | | | [`get_event_exc_ea`](#ida_idd.get_event_exc_ea)(→ ida_idaapi.ea_t) | | | [`can_exc_continue`](#ida_idd.can_exc_continue)(→ bool) | | ## Module Contents ### *class* ida_idd.excvec_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### push_back(\*args) → exception_info_t & #### pop_back() → [None](https://docs.python.org/3/library/constants.html#None) #### size() → [int](https://docs.python.org/3/library/functions.html#int) #### empty() → [bool](https://docs.python.org/3/library/functions.html#bool) #### at(\_idx: [int](https://docs.python.org/3/library/functions.html#int)) → exception_info_t const & #### qclear() → [None](https://docs.python.org/3/library/constants.html#None) #### clear() → [None](https://docs.python.org/3/library/constants.html#None) #### resize(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### grow(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### capacity() → [int](https://docs.python.org/3/library/functions.html#int) #### reserve(cnt: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### truncate() → [None](https://docs.python.org/3/library/constants.html#None) #### swap(r: [excvec_t](#ida_idd.excvec_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extract() → exception_info_t \* #### inject(s: [exception_info_t](#ida_idd.exception_info_t), len: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### begin(\*args) → qvector< exception_info_t >::const_iterator #### end(\*args) → qvector< exception_info_t >::const_iterator #### insert(it: [exception_info_t](#ida_idd.exception_info_t), x: [exception_info_t](#ida_idd.exception_info_t)) → qvector< exception_info_t >::iterator #### erase(\*args) → qvector< exception_info_t >::iterator #### append(x: [exception_info_t](#ida_idd.exception_info_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extend(x: [excvec_t](#ida_idd.excvec_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### front #### back ### *class* ida_idd.procinfo_vec_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### push_back(\*args) → process_info_t & #### pop_back() → [None](https://docs.python.org/3/library/constants.html#None) #### size() → [int](https://docs.python.org/3/library/functions.html#int) #### empty() → [bool](https://docs.python.org/3/library/functions.html#bool) #### at(\_idx: [int](https://docs.python.org/3/library/functions.html#int)) → process_info_t const & #### qclear() → [None](https://docs.python.org/3/library/constants.html#None) #### clear() → [None](https://docs.python.org/3/library/constants.html#None) #### resize(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### grow(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### capacity() → [int](https://docs.python.org/3/library/functions.html#int) #### reserve(cnt: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### truncate() → [None](https://docs.python.org/3/library/constants.html#None) #### swap(r: [procinfo_vec_t](#ida_idd.procinfo_vec_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extract() → process_info_t \* #### inject(s: [process_info_t](#ida_idd.process_info_t), len: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### begin(\*args) → qvector< process_info_t >::const_iterator #### end(\*args) → qvector< process_info_t >::const_iterator #### insert(it: [process_info_t](#ida_idd.process_info_t), x: [process_info_t](#ida_idd.process_info_t)) → qvector< process_info_t >::iterator #### erase(\*args) → qvector< process_info_t >::iterator #### append(x: [process_info_t](#ida_idd.process_info_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extend(x: [procinfo_vec_t](#ida_idd.procinfo_vec_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### front #### back ### *class* ida_idd.call_stack_info_vec_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### push_back(\*args) → call_stack_info_t & #### pop_back() → [None](https://docs.python.org/3/library/constants.html#None) #### size() → [int](https://docs.python.org/3/library/functions.html#int) #### empty() → [bool](https://docs.python.org/3/library/functions.html#bool) #### at(\_idx: [int](https://docs.python.org/3/library/functions.html#int)) → call_stack_info_t const & #### qclear() → [None](https://docs.python.org/3/library/constants.html#None) #### clear() → [None](https://docs.python.org/3/library/constants.html#None) #### resize(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### grow(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### capacity() → [int](https://docs.python.org/3/library/functions.html#int) #### reserve(cnt: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### truncate() → [None](https://docs.python.org/3/library/constants.html#None) #### swap(r: [call_stack_info_vec_t](#ida_idd.call_stack_info_vec_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extract() → call_stack_info_t \* #### inject(s: [call_stack_info_t](#ida_idd.call_stack_info_t), len: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### begin(\*args) → qvector< call_stack_info_t >::const_iterator #### end(\*args) → qvector< call_stack_info_t >::const_iterator #### insert(it: [call_stack_info_t](#ida_idd.call_stack_info_t), x: [call_stack_info_t](#ida_idd.call_stack_info_t)) → qvector< call_stack_info_t >::iterator #### erase(\*args) → qvector< call_stack_info_t >::iterator #### find(\*args) → qvector< call_stack_info_t >::const_iterator #### has(x: [call_stack_info_t](#ida_idd.call_stack_info_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### add_unique(x: [call_stack_info_t](#ida_idd.call_stack_info_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### append(x: [call_stack_info_t](#ida_idd.call_stack_info_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extend(x: [call_stack_info_vec_t](#ida_idd.call_stack_info_vec_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### front #### back ### *class* ida_idd.meminfo_vec_template_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### push_back(\*args) → memory_info_t & #### pop_back() → [None](https://docs.python.org/3/library/constants.html#None) #### size() → [int](https://docs.python.org/3/library/functions.html#int) #### empty() → [bool](https://docs.python.org/3/library/functions.html#bool) #### at(\_idx: [int](https://docs.python.org/3/library/functions.html#int)) → memory_info_t const & #### qclear() → [None](https://docs.python.org/3/library/constants.html#None) #### clear() → [None](https://docs.python.org/3/library/constants.html#None) #### resize(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### grow(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### capacity() → [int](https://docs.python.org/3/library/functions.html#int) #### reserve(cnt: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### truncate() → [None](https://docs.python.org/3/library/constants.html#None) #### swap(r: [meminfo_vec_template_t](#ida_idd.meminfo_vec_template_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extract() → memory_info_t \* #### inject(s: [memory_info_t](#ida_idd.memory_info_t), len: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### begin(\*args) → qvector< memory_info_t >::const_iterator #### end(\*args) → qvector< memory_info_t >::const_iterator #### insert(it: [memory_info_t](#ida_idd.memory_info_t), x: [memory_info_t](#ida_idd.memory_info_t)) → qvector< memory_info_t >::iterator #### erase(\*args) → qvector< memory_info_t >::iterator #### find(\*args) → qvector< memory_info_t >::const_iterator #### has(x: [memory_info_t](#ida_idd.memory_info_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### add_unique(x: [memory_info_t](#ida_idd.memory_info_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### append(x: [memory_info_t](#ida_idd.memory_info_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extend(x: [meminfo_vec_template_t](#ida_idd.meminfo_vec_template_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### front #### back ### *class* ida_idd.regvals_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### push_back(\*args) → regval_t & #### pop_back() → [None](https://docs.python.org/3/library/constants.html#None) #### size() → [int](https://docs.python.org/3/library/functions.html#int) #### empty() → [bool](https://docs.python.org/3/library/functions.html#bool) #### at(\_idx: [int](https://docs.python.org/3/library/functions.html#int)) → regval_t const & #### qclear() → [None](https://docs.python.org/3/library/constants.html#None) #### clear() → [None](https://docs.python.org/3/library/constants.html#None) #### resize(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### grow(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### capacity() → [int](https://docs.python.org/3/library/functions.html#int) #### reserve(cnt: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### truncate() → [None](https://docs.python.org/3/library/constants.html#None) #### swap(r: [regvals_t](#ida_idd.regvals_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extract() → regval_t \* #### inject(s: [regval_t](#ida_idd.regval_t), len: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### begin(\*args) → qvector< regval_t >::const_iterator #### end(\*args) → qvector< regval_t >::const_iterator #### insert(it: [regval_t](#ida_idd.regval_t), x: [regval_t](#ida_idd.regval_t)) → qvector< regval_t >::iterator #### erase(\*args) → qvector< regval_t >::iterator #### find(\*args) → qvector< regval_t >::const_iterator #### has(x: [regval_t](#ida_idd.regval_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### add_unique(x: [regval_t](#ida_idd.regval_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### append(x: [regval_t](#ida_idd.regval_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extend(x: [regvals_t](#ida_idd.regvals_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### front #### back ### ida_idd.IDD_INTERFACE_VERSION The IDD interface version number. ### ida_idd.NO_THREAD No thread. in PROCESS_STARTED this value can be used to specify that the main thread has not been created. It will be initialized later by a THREAD_STARTED event. ### *class* ida_idd.process_info_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### pid *: pid_t* process id #### name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* process name ### *class* ida_idd.debapp_attrs_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### cbsize *: [int](https://docs.python.org/3/library/functions.html#int)* control field: size of this structure #### addrsize *: [int](https://docs.python.org/3/library/functions.html#int)* address size of the process. Since 64-bit debuggers usually can debug 32-bit applications, we cannot rely on sizeof(ea_t) to detect the current address size. The following variable should be used instead. It is initialized with 8 for 64-bit debuggers but they should adjust it as soon as they learn that a 32-bit application is being debugged. For 32-bit debuggers it is initialized with 4. #### platform *: [str](https://docs.python.org/3/library/stdtypes.html#str)* platform name process is running/debugging under. (is used as a key value in exceptions.cfg) #### is_be *: [int](https://docs.python.org/3/library/functions.html#int)* ### ida_idd.DEF_ADDRSIZE ### *class* ida_idd.register_info_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* Register name. #### flags *: [int](https://docs.python.org/3/library/functions.html#int)* Register info attribute flags #### register_class_mask *: uchar* mask of register classes #### dtype *: op_dtype_t* Register size (see Operand value types). #### default_bit_strings_mask *: [int](https://docs.python.org/3/library/functions.html#int)* mask of default bits #### bit_strings strings corresponding to each bit of the register. (nullptr = no bit, same name = multi-bits mask) #### register_class ### ida_idd.REGISTER_READONLY the user cannot modify the current value of this register ### ida_idd.REGISTER_IP instruction pointer ### ida_idd.REGISTER_SP stack pointer ### ida_idd.REGISTER_FP frame pointer ### ida_idd.REGISTER_ADDRESS may contain an address ### ida_idd.REGISTER_CS code segment ### ida_idd.REGISTER_SS stack segment ### ida_idd.REGISTER_NOLF displays this register without returning to the next line, allowing the next register to be displayed to its right (on the same line) ### ida_idd.REGISTER_CUSTFMT register should be displayed using a custom data format. the format name is in bit_strings[0]; the corresponding regval_t will use bytevec_t ### *class* ida_idd.memory_info_t Bases: [`ida_range.range_t`](../ida_range/index.md#ida_range.range_t) #### thisown #### name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* Memory range name. #### sclass *: [str](https://docs.python.org/3/library/stdtypes.html#str)* Memory range class name. #### sbase *: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)* Segment base (meaningful only for segmented architectures, e.g. 16-bit x86) The base is specified in paragraphs (i.e. shifted to the right by 4) #### bitness *: uchar* Number of bits in segment addresses (0-16-bit, 1-32-bit, 2-64-bit). #### perm *: uchar* Memory range permissions (0-no information): see segment.hpp. ### *class* ida_idd.meminfo_vec_t Bases: [`meminfo_vec_template_t`](#ida_idd.meminfo_vec_template_t) #### thisown ### *class* ida_idd.scattered_segm_t Bases: [`ida_range.range_t`](../ida_range/index.md#ida_range.range_t) #### thisown #### name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* name of the segment ### *class* ida_idd.launch_env_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### merge *: [bool](https://docs.python.org/3/library/functions.html#bool)* #### set(envvar: [str](https://docs.python.org/3/library/stdtypes.html#str), value: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [None](https://docs.python.org/3/library/constants.html#None) #### envs() → PyObject \* ### ida_idd.NO_EVENT Not an interesting event. This event can be used if the debugger module needs to return an event but there are no valid events. ### ida_idd.PROCESS_STARTED New process has been started. ### ida_idd.PROCESS_EXITED Process has been stopped. ### ida_idd.THREAD_STARTED New thread has been started. ### ida_idd.THREAD_EXITED Thread has been stopped. ### ida_idd.BREAKPOINT Breakpoint has been reached. IDA will complain about unknown breakpoints, they should be reported as exceptions. ### ida_idd.STEP One instruction has been executed. Spurious events of this kind are silently ignored by IDA. ### ida_idd.EXCEPTION Exception. ### ida_idd.LIB_LOADED New library has been loaded. ### ida_idd.LIB_UNLOADED Library has been unloaded. ### ida_idd.INFORMATION User-defined information. This event can be used to return empty information This will cause IDA to call get_debug_event() immediately once more. ### ida_idd.PROCESS_ATTACHED Successfully attached to running process. ### ida_idd.PROCESS_DETACHED Successfully detached from process. ### ida_idd.PROCESS_SUSPENDED Process has been suspended. This event can be used by the debugger module to signal if the process spontaneously gets suspended (not because of an exception, breakpoint, or single step). IDA will silently switch to the ‘suspended process’ mode without displaying any messages. ### ida_idd.TRACE_FULL The trace buffer of the tracer module is full and IDA needs to read it before continuing ### ida_idd.STATUS_MASK additional info about process state ### ida_idd.BITNESS_CHANGED Debugger detected the process bitness changing. ### ida_idd.set_debug_event_code(ev: [debug_event_t](#ida_idd.debug_event_t), id: event_id_t) → [None](https://docs.python.org/3/library/constants.html#None) ### *class* ida_idd.modinfo_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* full name of the module #### base *: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)* module base address. if unknown pass BADADDR #### size *: asize_t* module size. if unknown pass 0 #### rebase_to *: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)* if not BADADDR, rebase the program to that address ### *class* ida_idd.bptaddr_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### hea *: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)* Possible address referenced by hardware breakpoints. #### kea *: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)* Address of the triggered bpt from the kernel’s point of view. (for some systems with special memory mappings, the triggered ea might be different from event ea). Use to BADADDR for flat memory model. ### *class* ida_idd.excinfo_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### code *: [int](https://docs.python.org/3/library/functions.html#int)* Exception code. #### can_cont *: [bool](https://docs.python.org/3/library/functions.html#bool)* Can execution of the process continue after this exception? #### ea *: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)* Possible address referenced by the exception. #### info *: [str](https://docs.python.org/3/library/stdtypes.html#str)* Exception message. ### *class* ida_idd.debug_event_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### pid *: pid_t* Process where the event occurred. #### tid *: thid_t* Thread where the event occurred. #### ea *: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)* Address where the event occurred. #### handled *: [bool](https://docs.python.org/3/library/functions.html#bool)* Is event handled by the debugger? (from the system’s point of view) Meaningful for EXCEPTION events #### copy(r: [debug_event_t](#ida_idd.debug_event_t)) → debug_event_t & #### clear() → [None](https://docs.python.org/3/library/constants.html#None) clear the dependent information (see below), set event code to NO_EVENT #### clear_all() → [None](https://docs.python.org/3/library/constants.html#None) #### eid() → event_id_t Event code. #### set_eid(id: event_id_t) → [None](https://docs.python.org/3/library/constants.html#None) Set event code. If the new event code is compatible with the old one then the dependent information (see below) will be preserved. Otherwise the event will be cleared and the new event code will be set. #### is_bitness_changed() → [bool](https://docs.python.org/3/library/functions.html#bool) process bitness #### set_bitness_changed(on: [bool](https://docs.python.org/3/library/functions.html#bool) = True) → [None](https://docs.python.org/3/library/constants.html#None) #### modinfo() → modinfo_t & Information that depends on the event code: < PROCESS_STARTED, PROCESS_ATTACHED, LIB_LOADED PROCESS_EXITED, THREAD_EXITED #### info() → [str](https://docs.python.org/3/library/stdtypes.html#str) BREAKPOINT #### bpt() → bptaddr_t & EXCEPTION #### exc() → excinfo_t & #### exit_code() → int const & THREAD_STARTED (thread name) LIB_UNLOADED (unloaded library name) INFORMATION (will be displayed in the output window if not empty) #### set_modinfo(id: event_id_t) → modinfo_t & #### set_exit_code(id: event_id_t, code: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### set_info(id: event_id_t) → [str](https://docs.python.org/3/library/stdtypes.html#str) #### set_bpt() → bptaddr_t & #### set_exception() → excinfo_t & #### bpt_ea() → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) On some systems with special memory mappings the triggered ea might be different from the actual ea. Calculate the address to use. ### ida_idd.get_debug_event_name(dev: [debug_event_t](#ida_idd.debug_event_t)) → [str](https://docs.python.org/3/library/stdtypes.html#str) get debug event name ### *class* ida_idd.exception_info_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### code *: uint* exception code #### flags *: [int](https://docs.python.org/3/library/functions.html#int)* Exception info flags #### break_on() → [bool](https://docs.python.org/3/library/functions.html#bool) Should we break on the exception? #### handle() → [bool](https://docs.python.org/3/library/functions.html#bool) Should we handle the exception? #### name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* Exception standard name. #### desc *: [str](https://docs.python.org/3/library/stdtypes.html#str)* Long message used to display info about the exception. ### ida_idd.cvar ### ida_idd.BPT_WRITE Write access. ### ida_idd.BPT_READ Read access. ### ida_idd.BPT_RDWR Read/write access. ### ida_idd.BPT_SOFT Software breakpoint. ### ida_idd.BPT_EXEC Execute instruction. ### ida_idd.BPT_DEFAULT Choose bpt type automatically. ### ida_idd.EXC_BREAK break on the exception ### ida_idd.EXC_HANDLE should be handled by the debugger? ### ida_idd.EXC_MSG instead of a warning, log the exception to the output window ### ida_idd.EXC_SILENT do not warn or log to the output window ### *class* ida_idd.regval_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### rvtype *: [int](https://docs.python.org/3/library/functions.html#int)* one of Register value types #### ival *: uint64* RVT_INT. #### use_bytevec() → [bool](https://docs.python.org/3/library/functions.html#bool) #### clear() → [None](https://docs.python.org/3/library/constants.html#None) Clear register value. #### swap(r: [regval_t](#ida_idd.regval_t)) → [None](https://docs.python.org/3/library/constants.html#None) Set this = r and r = this. #### set_int(x: uint64) → [None](https://docs.python.org/3/library/constants.html#None) #### set_float(v: bytevec_t const &) → [None](https://docs.python.org/3/library/constants.html#None) #### set_bytes(\*args) → bytevec_t & #### set_unavailable() → [None](https://docs.python.org/3/library/constants.html#None) #### bytes(\*args) → bytevec_t const & #### get_data(\*args) → void const \* #### get_data_size() → [int](https://docs.python.org/3/library/functions.html#int) #### set_pyval(o: PyObject \*, dtype: op_dtype_t) → [bool](https://docs.python.org/3/library/functions.html#bool) #### pyval(dtype: op_dtype_t) → PyObject \* ### ida_idd.RVT_FLOAT floating point ### ida_idd.RVT_INT integer ### ida_idd.RVT_UNAVAILABLE unavailable; other values mean custom data type ### *class* ida_idd.call_stack_info_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### callea *: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)* the address of the call instruction. for the 0th frame this is usually just the current value of EIP. #### funcea *: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)* the address of the called function #### fp *: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)* the value of the frame pointer of the called function #### funcok *: [bool](https://docs.python.org/3/library/functions.html#bool)* is the function present? ### *class* ida_idd.call_stack_t Bases: [`call_stack_info_vec_t`](#ida_idd.call_stack_info_vec_t) #### thisown ### ida_idd.dbg_appcall(retval: idc_value_t \*, func_ea: ida_idaapi.ea_t, tid: thid_t, ptif: tinfo_t, argv: idc_value_t \*, argnum: int) → error_t Call a function from the debugged application. * **Parameters:** **retval** – function return value * for APPCALL_MANUAL, r will hold the new stack point value * for APPCALL_DEBEV, r will hold the exception information upon failure and the return code will be eExecThrow * **Parameters:** * **func_ea** – address to call * **tid** – thread to use. NO_THREAD means to use the current thread * **ptif** – pointer to type of the function to call * **argv** – array of arguments * **argnum** – number of actual arguments * **Returns:** eOk if successful, otherwise an error code ### ida_idd.cleanup_appcall(tid: thid_t) → error_t Cleanup after manual appcall. * **Parameters:** **tid** – thread to use. NO_THREAD means to use the current thread The application state is restored as it was before calling the last appcall(). Nested appcalls are supported. * **Returns:** eOk if successful, otherwise an error code ### *class* ida_idd.thread_name_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### tid *: thid_t* thread #### name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* new thread name ### ida_idd.RESMOD_NONE no stepping, run freely ### ida_idd.RESMOD_INTO step into call (the most typical single stepping) ### ida_idd.RESMOD_OVER step over call ### ida_idd.RESMOD_OUT step out of the current function (run until return) ### ida_idd.RESMOD_SRCINTO until control reaches a different source line ### ida_idd.RESMOD_SRCOVER next source line in the current stack frame ### ida_idd.RESMOD_SRCOUT next source line in the previous stack frame ### ida_idd.RESMOD_USER step out to the user code ### ida_idd.RESMOD_HANDLE step into the exception handler ### ida_idd.RESMOD_BACKINTO step backwards into call (in time-travel debugging) ### ida_idd.RESMOD_MAX ### ida_idd.STEP_TRACE lowest level trace. trace buffers are not maintained ### ida_idd.INSN_TRACE instruction tracing ### ida_idd.FUNC_TRACE function tracing ### ida_idd.BBLK_TRACE basic block tracing ### ida_idd.DRC_EVENTS success, there are pending events ### ida_idd.DRC_CRC success, but the input file crc does not match ### ida_idd.DRC_OK success ### ida_idd.DRC_NONE reaction to the event not implemented ### ida_idd.DRC_FAILED failed or false ### ida_idd.DRC_NETERR network error ### ida_idd.DRC_NOFILE file not found ### ida_idd.DRC_IDBSEG use idb segmentation ### ida_idd.DRC_NOPROC the process does not exist anymore ### ida_idd.DRC_NOCHG no changes ### ida_idd.DRC_ERROR unclassified error, may be complemented by errbuf ### *class* ida_idd.debugger_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### version *: [int](https://docs.python.org/3/library/functions.html#int)* Expected kernel version, should be IDD_INTERFACE_VERSION #### name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* Short debugger name like win32 or linux. #### id *: [int](https://docs.python.org/3/library/functions.html#int)* one of Debugger API module id #### processor *: [str](https://docs.python.org/3/library/stdtypes.html#str)* Required processor name. Used for instant debugging to load the correct processor module #### flags *: uint64* #### is_remote() → [bool](https://docs.python.org/3/library/functions.html#bool) #### must_have_hostname() → [bool](https://docs.python.org/3/library/functions.html#bool) #### can_continue_from_bpt() → [bool](https://docs.python.org/3/library/functions.html#bool) #### may_disturb() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_safe() → [bool](https://docs.python.org/3/library/functions.html#bool) #### use_sregs() → [bool](https://docs.python.org/3/library/functions.html#bool) #### cache_block_size() → [int](https://docs.python.org/3/library/functions.html#int) #### use_memregs() → [bool](https://docs.python.org/3/library/functions.html#bool) #### may_take_exit_snapshot() → [bool](https://docs.python.org/3/library/functions.html#bool) #### virtual_threads() → [bool](https://docs.python.org/3/library/functions.html#bool) #### supports_lowcnds() → [bool](https://docs.python.org/3/library/functions.html#bool) #### supports_debthread() → [bool](https://docs.python.org/3/library/functions.html#bool) #### can_debug_standalone_dlls() → [bool](https://docs.python.org/3/library/functions.html#bool) #### fake_memory() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_ttd() → [bool](https://docs.python.org/3/library/functions.html#bool) #### has_get_processes() → [bool](https://docs.python.org/3/library/functions.html#bool) #### has_attach_process() → [bool](https://docs.python.org/3/library/functions.html#bool) #### has_detach_process() → [bool](https://docs.python.org/3/library/functions.html#bool) #### has_request_pause() → [bool](https://docs.python.org/3/library/functions.html#bool) #### has_set_exception_info() → [bool](https://docs.python.org/3/library/functions.html#bool) #### has_thread_suspend() → [bool](https://docs.python.org/3/library/functions.html#bool) #### has_thread_continue() → [bool](https://docs.python.org/3/library/functions.html#bool) #### has_set_resume_mode() → [bool](https://docs.python.org/3/library/functions.html#bool) #### has_thread_get_sreg_base() → [bool](https://docs.python.org/3/library/functions.html#bool) #### has_check_bpt() → [bool](https://docs.python.org/3/library/functions.html#bool) #### has_open_file() → [bool](https://docs.python.org/3/library/functions.html#bool) #### has_update_call_stack() → [bool](https://docs.python.org/3/library/functions.html#bool) #### has_appcall() → [bool](https://docs.python.org/3/library/functions.html#bool) #### has_rexec() → [bool](https://docs.python.org/3/library/functions.html#bool) #### has_map_address() → [bool](https://docs.python.org/3/library/functions.html#bool) #### has_soft_bpt() → [bool](https://docs.python.org/3/library/functions.html#bool) #### default_regclasses *: [int](https://docs.python.org/3/library/functions.html#int)* Mask of default printed register classes. #### regs(idx: [int](https://docs.python.org/3/library/functions.html#int)) → register_info_t & #### memory_page_size *: [int](https://docs.python.org/3/library/functions.html#int)* Size of a memory page. Usually 4K. #### bpt_size *: uchar* Size of the software breakpoint instruction in bytes. #### filetype *: uchar* Input file type for the instant debugger. This value will be used after attaching to a new process. #### resume_modes *: ushort* Resume modes #### is_resmod_avail(resmod: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### ev_init_debugger Initialize debugger. This event is generated in the main thread. #### ev_term_debugger Terminate debugger. This event is generated in the main thread. #### ev_get_processes Return information about the running processes. This event is generated in the main thread. Available if DBG_HAS_GET_PROCESSES is set #### ev_start_process Start an executable to debug. This event is generated in debthread. Must be implemented. #### ev_attach_process Attach to an existing running process. event_id should be equal to -1 if not attaching to a crashed process. This event is generated in debthread. Available if DBG_HAS_ATTACH_PROCESS is set #### ev_detach_process Detach from the debugged process. May be generated while the process is running or is suspended. Must detach from the process in all cases. The kernel will repeatedly call get_debug_event() until PROCESS_DETACHED is received. In this mode, all other events will be automatically handled and process will be resumed. This event is generated from debthread. Available if DBG_HAS_DETACH_PROCESS is set #### ev_get_debapp_attrs Retrieve process- and debugger-specific runtime attributes. This event is generated in the main thread. #### ev_rebase_if_required_to Rebase database if the debugged program has been rebased by the system. This event is generated in the main thread. #### ev_request_pause Prepare to pause the process. Normally the next get_debug_event() will pause the process If the process is sleeping, then the pause will not occur until the process wakes up. If the debugger module does not react to this event, then it will be impossible to pause the program. This event is generated in debthread. Available if DBG_HAS_REQUEST_PAUSE is set #### ev_exit_process Stop the process. May be generated while the process is running or suspended. Must terminate the process in any case. The kernel will repeatedly call get_debug_event() until PROCESS_EXITED is received. In this mode, all other events will be automatically handled and process will be resumed. This event is generated in debthread. Must be implemented. #### ev_get_debug_event Get a pending debug event and suspend the process. This event will be generated regularly by IDA. This event is generated in debthread. IMPORTANT: the BREAKPOINT/EXCEPTION/STEP events must be reported only after reporting other pending events for a thread. Must be implemented. #### ev_resume Continue after handling the event. This event is generated in debthread. Must be implemented. #### ev_set_backwards Set whether the debugger should continue backwards or forwards. This event is generated in debthread. Available if DBG_FLAG_TTD is set #### ev_set_exception_info Set exception handling. This event is generated in debthread or the main thread. Available if DBG_HAS_SET_EXCEPTION_INFO is set #### ev_suspended This event will be generated by the kernel each time it has suspended the debuggee process and refreshed the database. The debugger module may add information to the database if necessary. The reason for introducing this event is that when an event like LOAD_DLL happens, the database does not reflect the memory state yet and therefore we cannot add information about the DLL into the database in the get_debug_event() function. Only when the kernel has adjusted the database we can do it. Example: for loaded PE DLLs we can add the exported function names to the list of debug names (see set_debug_names()). This event is generated in the main thread. #### ev_thread_suspend Suspend a running thread Available if DBG_HAS_THREAD_SUSPEND is set #### ev_thread_continue Resume a suspended thread Available if DBG_HAS_THREAD_CONTINUE is set #### ev_set_resume_mode Specify resume action Available if DBG_HAS_SET_RESUME_MODE is set #### ev_read_registers Read thread registers. This event is generated in debthread. Must be implemented. #### ev_write_register Write one thread register. This event is generated in debthread. Must be implemented. #### ev_thread_get_sreg_base Get information about the base of a segment register. Currently used by the IBM PC module to resolve references like fs:0. This event is generated in debthread. Available if DBG_HAS_THREAD_GET_SREG_BASE is set #### ev_get_memory_info Get information on the memory ranges. The debugger module fills ‘ranges’. The returned vector must be sorted. This event is generated in debthread. Must be implemented. #### ev_read_memory Read process memory. This event is generated in debthread. #### ev_write_memory Write process memory. This event is generated in debthread. #### ev_check_bpt Is it possible to set breakpoint? This event is generated in debthread or in the main thread if debthread is not running yet. It is generated to verify hardware breakpoints. Available if DBG_HAS_CHECK_BPT is set #### ev_update_bpts Add/del breakpoints. bpts array contains nadd bpts to add, followed by ndel bpts to del. This event is generated in debthread. #### ev_update_lowcnds Update low-level (server side) breakpoint conditions. This event is generated in debthread. #### ev_open_file #### ev_close_file #### ev_read_file #### ev_write_file #### ev_map_address Map process address. The debugger module may ignore this event. This event is generated in debthread. IDA will generate this event only if DBG_HAS_MAP_ADDRESS is set. #### ev_get_debmod_extensions Get pointer to debugger specific events. This event returns a pointer to a structure that holds pointers to debugger module specific events. For information on the structure layout, please check the corresponding debugger module. Most debugger modules return nullptr because they do not have any extensions. Available extensions may be generated from plugins. This event is generated in the main thread. #### ev_update_call_stack Calculate the call stack trace for the given thread. This event is generated when the process is suspended and should fill the ‘trace’ object with the information about the current call stack. If this event returns DRC_NONE, IDA will try to invoke a processor-specific mechanism (see processor_t::ev_update_call_stack). If the current processor module does not implement stack tracing, then IDA will fall back to a generic algorithm (based on the frame pointer chain) to calculate the trace. This event is ideal if the debugging targets manage stack frames in a peculiar way, requiring special analysis. This event is generated in the main thread. Available if DBG_HAS_UPDATE_CALL_STACK is set #### ev_appcall Call application function. This event calls a function from the debugged application. This event is generated in debthread Available if HAS_APPCALL is set #### ev_cleanup_appcall Cleanup after appcall(). The debugger module must keep the stack blob in the memory until this event is generated. It will be generated by the kernel for each successful appcall(). There is an exception: if APPCALL_MANUAL, IDA may not call cleanup_appcall. If the user selects to terminate a manual appcall, then cleanup_appcall will be generated. Otherwise, the debugger module should terminate the appcall when the generated event returns. This event is generated in debthread. Available if HAS_APPCALL is set #### ev_eval_lowcnd Evaluate a low level breakpoint condition at ‘ea’. Other evaluation errors are displayed in a dialog box. This call is used by IDA when the process has already been temporarily suspended for some reason and IDA has to decide whether the process should be resumed or definitely suspended because of a breakpoint with a low level condition. This event is generated in debthread. #### ev_send_ioctl Perform a debugger-specific event. This event is generated in debthread #### ev_dbg_enable_trace Enable/Disable tracing. The kernel will generated this event if the debugger plugin set DBG_FLAG_TRACER_MODULE. TRACE_FLAGS can be a set of STEP_TRACE, INSN_TRACE, BBLK_TRACE or FUNC_TRACE. This event is generated in the main thread. #### ev_is_tracing_enabled Is tracing enabled? The kernel will generated this event if the debugger plugin set DBG_FLAG_TRACER_MODULE. TRACE_BIT can be one of the following: STEP_TRACE, INSN_TRACE, BBLK_TRACE or FUNC_TRACE #### ev_rexec Execute a command on the remote computer. Available if DBG_HAS_REXEC is set #### ev_get_srcinfo_path Get the path to a file containing source debug info for the given module. This allows srcinfo providers to call into the debugger when looking for debug info. It is useful in certain cases like the iOS debugger, which is a remote debugger but the remote debugserver does not provide dwarf info. So, we allow the debugger client to decide where to look for debug info locally. #### ev_bin_search Search for a binary pattern in the program. #### ev_get_dynamic_register_set Ask debuger to send dynamic register set #### ev_set_dbg_options Set debugger options (parameters that are specific to the debugger module). #### init_debugger(hostname: [str](https://docs.python.org/3/library/stdtypes.html#str), portnum: [int](https://docs.python.org/3/library/functions.html#int), password: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None) #### term_debugger() → [bool](https://docs.python.org/3/library/functions.html#bool) #### get_processes(procs: [procinfo_vec_t](#ida_idd.procinfo_vec_t)) → [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None) #### start_process(path: [str](https://docs.python.org/3/library/stdtypes.html#str), args: [str](https://docs.python.org/3/library/stdtypes.html#str), envs: [launch_env_t](#ida_idd.launch_env_t), startdir: [str](https://docs.python.org/3/library/stdtypes.html#str), dbg_proc_flags: [int](https://docs.python.org/3/library/functions.html#int), input_path: [str](https://docs.python.org/3/library/stdtypes.html#str), input_file_crc32: [int](https://docs.python.org/3/library/functions.html#int)) → [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None) #### attach_process(pid: pid_t, event_id: [int](https://docs.python.org/3/library/functions.html#int), dbg_proc_flags: [int](https://docs.python.org/3/library/functions.html#int)) → [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None) #### detach_process() → [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None) #### get_debapp_attrs(out_pattrs: [debapp_attrs_t](#ida_idd.debapp_attrs_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### rebase_if_required_to(new_base: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### request_pause() → [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None) #### exit_process() → [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None) #### get_debug_event(event: [debug_event_t](#ida_idd.debug_event_t), timeout_ms: [int](https://docs.python.org/3/library/functions.html#int)) → gdecode_t #### resume(event: [debug_event_t](#ida_idd.debug_event_t)) → [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None) #### set_backwards(backwards: [bool](https://docs.python.org/3/library/functions.html#bool)) → drc_t #### set_exception_info(info: [exception_info_t](#ida_idd.exception_info_t), qty: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### suspended(dlls_added: bool, thr_names: thread_name_vec_t \* = None) → [None](https://docs.python.org/3/library/constants.html#None) #### thread_suspend(tid: thid_t) → [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None) #### thread_continue(tid: thid_t) → [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None) #### set_resume_mode(tid: thid_t, resmod: resume_mode_t) → [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None) #### read_registers(tid: thid_t, clsmask: [int](https://docs.python.org/3/library/functions.html#int), values: [regval_t](#ida_idd.regval_t)) → [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None) #### write_register(tid: thid_t, regidx: [int](https://docs.python.org/3/library/functions.html#int), value: [regval_t](#ida_idd.regval_t)) → [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None) #### thread_get_sreg_base(answer: ea_t \*, tid: thid_t, sreg_value: int) → [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None) #### get_memory_info(ranges: [meminfo_vec_t](#ida_idd.meminfo_vec_t)) → [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None) #### read_memory(nbytes: size_t \*, ea: ida_idaapi.ea_t, buffer: void \*, size: int) → [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None) #### write_memory(nbytes: size_t \*, ea: ida_idaapi.ea_t, buffer: void const \*, size: int) → [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None) #### check_bpt(bptvc: int \*, type: bpttype_t, ea: ida_idaapi.ea_t, len: int) → drc_t #### update_bpts(nbpts: int \*, bpts: update_bpt_info_t \*, nadd: int, ndel: int) → [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None) #### update_lowcnds(nupdated: int \*, lowcnds: lowcnd_t const \*, nlowcnds: int) → [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None) #### open_file(file: str, fsize: uint64 \*, readonly: bool) → [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None) #### close_file(fn: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### read_file(fn: int, off: qoff64_t, buf: void \*, size: int) → [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None) #### write_file(fn: int, off: qoff64_t, buf: void const \*) → [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None) #### map_address(off: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), regs: [regval_t](#ida_idd.regval_t), regnum: [int](https://docs.python.org/3/library/functions.html#int)) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) #### get_debmod_extensions() → void const \* #### update_call_stack(tid: thid_t, trace: [call_stack_t](#ida_idd.call_stack_t)) → drc_t #### cleanup_appcall(tid: thid_t) → drc_t #### eval_lowcnd(tid: thid_t, ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None) #### send_ioctl(fn: int, buf: void const \*, poutbuf: void \*\*, poutsize: ssize_t \*) → [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None) #### dbg_enable_trace(tid: thid_t, enable: [bool](https://docs.python.org/3/library/functions.html#bool), trace_flags: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_tracing_enabled(tid: thid_t, tracebit: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### rexec(cmdline: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [int](https://docs.python.org/3/library/functions.html#int) #### get_srcinfo_path(path: [str](https://docs.python.org/3/library/stdtypes.html#str), base: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### bin_search(start_ea: ida_idaapi.ea_t, end_ea: ida_idaapi.ea_t, data: compiled_binpat_vec_t const &, srch_flags: int) → [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None) #### get_dynamic_register_set(regset: dynamic_register_set_t \*) → [bool](https://docs.python.org/3/library/functions.html#bool) #### have_set_options() → [bool](https://docs.python.org/3/library/functions.html#bool) #### registers Array of registers. Use regs() to access it. #### nregisters Number of registers. #### regclasses Array of register class names. #### bpt_bytes A software breakpoint instruction. ### ida_idd.DEBUGGER_ID_X86_IA32_WIN32_USER Userland win32 processes (win32 debugging APIs). ### ida_idd.DEBUGGER_ID_X86_IA32_LINUX_USER Userland linux processes (ptrace()). ### ida_idd.DEBUGGER_ID_X86_IA32_MACOSX_USER Userland MAC OS X processes. ### ida_idd.DEBUGGER_ID_ARM_IPHONE_USER iPhone 1.x ### ida_idd.DEBUGGER_ID_X86_IA32_BOCHS BochsDbg.exe 32. ### ida_idd.DEBUGGER_ID_6811_EMULATOR MC6812 emulator (beta). ### ida_idd.DEBUGGER_ID_GDB_USER GDB remote. ### ida_idd.DEBUGGER_ID_WINDBG WinDBG using Microsoft Debug engine. ### ida_idd.DEBUGGER_ID_X86_DOSBOX_EMULATOR Dosbox MS-DOS emulator. ### ida_idd.DEBUGGER_ID_ARM_LINUX_USER Userland arm linux. ### ida_idd.DEBUGGER_ID_TRACE_REPLAYER Fake debugger to replay recorded traces. ### ida_idd.DEBUGGER_ID_X86_PIN_TRACER PIN Tracer module. ### ida_idd.DEBUGGER_ID_DALVIK_USER Dalvik. ### ida_idd.DEBUGGER_ID_XNU_USER XNU Kernel. ### ida_idd.DEBUGGER_ID_ARM_MACOS_USER Userland arm MAC OS. ### ida_idd.DBG_FLAG_REMOTE Remote debugger (requires remote host name unless DBG_FLAG_NOHOST). ### ida_idd.DBG_FLAG_NOHOST Remote debugger with does not require network params (host/port/pass). (a unique device connected to the machine) ### ida_idd.DBG_FLAG_FAKE_ATTACH PROCESS_ATTACHED is a fake event and does not suspend the execution ### ida_idd.DBG_FLAG_HWDATBPT_ONE Hardware data breakpoints are one byte size by default ### ida_idd.DBG_FLAG_CAN_CONT_BPT Debugger knows to continue from a bpt. This flag also means that the debugger module hides breakpoints from ida upon read_memory ### ida_idd.DBG_FLAG_NEEDPORT Remote debugger requires port number (to be used with DBG_FLAG_NOHOST). ### ida_idd.DBG_FLAG_DONT_DISTURB Debugger can handle only get_debug_event(), request_pause(), exit_process() when the debugged process is running. The kernel may also call service functions (file I/O, map_address, etc) ### ida_idd.DBG_FLAG_SAFE The debugger is safe (probably because it just emulates the application without really running it) ### ida_idd.DBG_FLAG_CLEAN_EXIT IDA must suspend the application and remove all breakpoints before terminating the application. Usually this is not required because the application memory disappears upon termination. ### ida_idd.DBG_FLAG_USE_SREGS Take segment register values into account (non flat memory). ### ida_idd.DBG_FLAG_NOSTARTDIR Debugger module doesn’t use startup directory. ### ida_idd.DBG_FLAG_NOPARAMETERS Debugger module doesn’t use commandline parameters. ### ida_idd.DBG_FLAG_NOPASSWORD Remote debugger doesn’t use password. ### ida_idd.DBG_FLAG_CONNSTRING Display “Connection string” instead of “Hostname” and hide the “Port” field. ### ida_idd.DBG_FLAG_SMALLBLKS If set, IDA uses 256-byte blocks for caching memory contents. Otherwise, 1024-byte blocks are used ### ida_idd.DBG_FLAG_MANMEMINFO If set, manual memory region manipulation commands will be available. Use this bit for debugger modules that cannot return memory layout information ### ida_idd.DBG_FLAG_EXITSHOTOK IDA may take a memory snapshot at PROCESS_EXITED event. ### ida_idd.DBG_FLAG_VIRTHREADS Thread IDs may be shuffled after each debug event. (to be used for virtual threads that represent cpus for windbg kmode) ### ida_idd.DBG_FLAG_LOWCNDS Low level breakpoint conditions are supported. ### ida_idd.DBG_FLAG_DEBTHREAD Supports creation of a separate thread in ida for the debugger (the debthread). Most debugger functions will be called from debthread (exceptions are marked below) The debugger module may directly call only THREAD_SAFE functions. To call other functions please use execute_sync(). The debthread significantly increases debugging speed, especially if debug events occur frequently. ### ida_idd.DBG_FLAG_DEBUG_DLL Can debug standalone DLLs. For example, Bochs debugger can debug any snippet of code ### ida_idd.DBG_FLAG_FAKE_MEMORY get_memory_info()/read_memory()/write_memory() work with the idb. (there is no real process to read from, as for the replayer module) the kernel will not call these functions if this flag is set. however, third party plugins may call them, they must be implemented. ### ida_idd.DBG_FLAG_ANYSIZE_HWBPT The debugger supports arbitrary size hardware breakpoints. ### ida_idd.DBG_FLAG_TRACER_MODULE The module is a tracer, not a full featured debugger module. ### ida_idd.DBG_FLAG_PREFER_SWBPTS Prefer to use software breakpoints. ### ida_idd.DBG_FLAG_LAZY_WATCHPTS Watchpoints are triggered before the offending instruction is executed. The debugger must temporarily disable the watchpoint and single-step before resuming. ### ida_idd.DBG_FLAG_FAST_STEP Do not refresh memory layout info after single stepping. ### ida_idd.DBG_FLAG_ADD_ENVS The debugger supports launching processes with environment variables. ### ida_idd.DBG_FLAG_MERGE_ENVS The debugger supports merge or replace setting for environment variables (only makes sense if DBG_FLAG_ADD_ENVS is set) ### ida_idd.DBG_FLAG_DISABLE_ASLR The debugger supports ASLR disabling (address space layout randomization) ### ida_idd.DBG_FLAG_TTD The debugger is a time travel debugger and supports continuing backwards. ### ida_idd.DBG_FLAG_FULL_INSTR_BPT Setting a breakpoint in the middle of an instruction will also break. ### ida_idd.DBG_HAS_GET_PROCESSES supports ev_get_processes ### ida_idd.DBG_HAS_ATTACH_PROCESS supports ev_attach_process ### ida_idd.DBG_HAS_DETACH_PROCESS supports ev_detach_process ### ida_idd.DBG_HAS_REQUEST_PAUSE supports ev_request_pause ### ida_idd.DBG_HAS_SET_EXCEPTION_INFO supports ev_set_exception_info ### ida_idd.DBG_HAS_THREAD_SUSPEND supports ev_thread_suspend ### ida_idd.DBG_HAS_THREAD_CONTINUE supports ev_thread_continue ### ida_idd.DBG_HAS_SET_RESUME_MODE supports ev_set_resume_mode. Cannot be set inside the debugger_t::init_debugger() ### ida_idd.DBG_HAS_THREAD_GET_SREG_BASE supports ev_thread_get_sreg_base ### ida_idd.DBG_HAS_CHECK_BPT supports ev_check_bpt ### ida_idd.DBG_HAS_OPEN_FILE supports ev_open_file, ev_close_file, ev_read_file, ev_write_file ### ida_idd.DBG_HAS_UPDATE_CALL_STACK supports ev_update_call_stack ### ida_idd.DBG_HAS_APPCALL supports ev_appcall, ev_cleanup_appcall ### ida_idd.DBG_HAS_REXEC supports ev_rexec ### ida_idd.DBG_HAS_MAP_ADDRESS supports ev_map_address. Avoid using this bit, especially together with DBG_FLAG_DEBTHREAD because it may cause big slow downs ### ida_idd.DBG_RESMOD_STEP_INTO RESMOD_INTO is available ### ida_idd.DBG_RESMOD_STEP_OVER RESMOD_OVER is available ### ida_idd.DBG_RESMOD_STEP_OUT RESMOD_OUT is available ### ida_idd.DBG_RESMOD_STEP_SRCINTO RESMOD_SRCINTO is available ### ida_idd.DBG_RESMOD_STEP_SRCOVER RESMOD_SRCOVER is available ### ida_idd.DBG_RESMOD_STEP_SRCOUT RESMOD_SRCOUT is available ### ida_idd.DBG_RESMOD_STEP_USER RESMOD_USER is available ### ida_idd.DBG_RESMOD_STEP_HANDLE RESMOD_HANDLE is available ### ida_idd.DBG_RESMOD_STEP_BACKINTO RESMOD_BACKINTO is available ### ida_idd.DBG_PROC_IS_DLL database contains a DLL (not EXE) ### ida_idd.DBG_PROC_IS_GUI using gui version of ida ### ida_idd.DBG_PROC_32BIT application is 32-bit ### ida_idd.DBG_PROC_64BIT application is 64-bit ### ida_idd.DBG_NO_TRACE do not trace the application (mac/linux) ### ida_idd.DBG_HIDE_WINDOW application should be hidden on startup (windows) ### ida_idd.DBG_SUSPENDED application should be suspended on startup (mac) ### ida_idd.DBG_NO_ASLR disable ASLR (linux) ### ida_idd.BPT_OK breakpoint can be set ### ida_idd.BPT_INTERNAL_ERR interr occurred when verifying breakpoint ### ida_idd.BPT_BAD_TYPE bpt type is not supported ### ida_idd.BPT_BAD_ALIGN alignment is invalid ### ida_idd.BPT_BAD_ADDR ea is invalid ### ida_idd.BPT_BAD_LEN bpt len is invalid ### ida_idd.BPT_TOO_MANY reached max number of supported breakpoints ### ida_idd.BPT_READ_ERROR failed to read memory at bpt ea ### ida_idd.BPT_WRITE_ERROR failed to write memory at bpt ea ### ida_idd.BPT_SKIP update_bpts(): do not process bpt ### ida_idd.BPT_PAGE_OK update_bpts(): ok, added a page bpt ### ida_idd.APPCALL_MANUAL Only set up the appcall, do not run. debugger_t::cleanup_appcall will not be generated by ida! ### ida_idd.APPCALL_DEBEV Return debug event information. ### ida_idd.APPCALL_TIMEOUT Appcall with timeout. If timed out, errbuf will contain “timeout”. See SET_APPCALL_TIMEOUT and GET_APPCALL_TIMEOUT ### ida_idd.RQ_MASKING masking step handler: unless errors, tmpbpt handlers won’t be generated should be used only with request_internal_step() ### ida_idd.RQ_SUSPEND suspending step handler: suspends the app handle_debug_event: suspends the app ### ida_idd.RQ_NOSUSP running step handler: continues the app ### ida_idd.RQ_IGNWERR ignore breakpoint write failures ### ida_idd.RQ_SILENT all: no dialog boxes ### ida_idd.RQ_VERBOSE all: display dialog boxes ### ida_idd.RQ_SWSCREEN handle_debug_event: switch screens ### ida_idd.RQ_\_NOTHRRF handle_debug_event: do not refresh threads ### ida_idd.RQ_PROCEXIT snapshots: the process is exiting ### ida_idd.RQ_IDAIDLE handle_debug_event: ida is idle ### ida_idd.RQ_SUSPRUN handle_debug_event: suspend at PROCESS_STARTED ### ida_idd.RQ_RESUME handle_debug_event: resume application ### ida_idd.RQ_RESMOD resume_mode_t ### ida_idd.RQ_RESMOD_SHIFT ### ida_idd.cpu2ieee(ieee_out: fpvalue_t \*, cpu_fpval: void const \*, size: int) → [int](https://docs.python.org/3/library/functions.html#int) Convert a floating point number in CPU native format to IDA’s internal format. * **Parameters:** * **ieee_out** – output buffer * **cpu_fpval** – floating point number in CPU native format * **size** – size of cpu_fpval in bytes (size of the input buffer) * **Returns:** Floating point/IEEE Conversion codes ### ida_idd.ieee2cpu(cpu_fpval_out: void \*, ieee: fpvalue_t const &, size: int) → [int](https://docs.python.org/3/library/functions.html#int) Convert a floating point number in IDA’s internal format to CPU native format. * **Parameters:** * **cpu_fpval_out** – output buffer * **ieee** – floating point number of IDA’s internal format * **size** – size of cpu_fpval in bytes (size of the output buffer) * **Returns:** Floating point/IEEE Conversion codes ### *class* ida_idd.dyn_register_info_array(\_data: [register_info_t](#ida_idd.register_info_t), \_count: [int](https://docs.python.org/3/library/functions.html#int)) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### data *: register_info_t \** #### count *: [int](https://docs.python.org/3/library/functions.html#int)* ### ida_idd.get_dbg() → debugger_t \* ### ida_idd.dbg_get_registers() This function returns the register definition from the currently loaded debugger. Basically, it returns an array of structure similar to to idd.hpp / register_info_t * **Returns:** None if no debugger is loaded * **Returns:** tuple(name, flags, class, dtype, bit_strings, default_bit_strings_mask) The bit_strings can be a tuple of strings or None (if the register does not have bit_strings) ### ida_idd.dbg_get_thread_sreg_base(tid, sreg_value) Returns the segment register base value * **Parameters:** * **tid** – thread id * **sreg_value** – segment register (selector) value * **Returns:** The base as an ‘ea’, or None on failure ### ida_idd.dbg_read_memory(ea, sz) Reads from the debugee’s memory at the specified ea * **Parameters:** * **ea** – the debuggee’s memory address * **sz** – the amount of data to read * **Returns:** The read buffer (as bytes), or None on failure ### ida_idd.dbg_write_memory(ea, buffer) Writes a buffer to the debugee’s memory * **Parameters:** * **ea** – the debuggee’s memory address * **buf** – a bytes object to write * **Returns:** Boolean ### ida_idd.dbg_get_name() This function returns the current debugger’s name. * **Returns:** Debugger name or None if no debugger is active ### ida_idd.dbg_get_memory_info() This function returns the memory configuration of a debugged process. * **Returns:** tuple(start_ea, end_ea, name, sclass, sbase, bitness, perm), or None if no debugger is active ### ida_idd.appcall(func_ea: ida_idaapi.ea_t, tid: thid_t, \_type_or_none: bytevec_t const &, \_fields: bytevec_t const &, arg_list: PyObject \*) → PyObject \* ### ida_idd.get_event_module_name(ev: [debug_event_t](#ida_idd.debug_event_t)) → [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None) ### ida_idd.get_event_module_base(ev: [debug_event_t](#ida_idd.debug_event_t)) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) ### ida_idd.get_event_module_size(ev: [debug_event_t](#ida_idd.debug_event_t)) → asize_t ### ida_idd.get_event_exc_info(ev: [debug_event_t](#ida_idd.debug_event_t)) → [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None) ### ida_idd.get_event_info(ev: [debug_event_t](#ida_idd.debug_event_t)) → [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None) ### ida_idd.get_event_bpt_hea(ev: [debug_event_t](#ida_idd.debug_event_t)) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) ### ida_idd.get_event_exc_code(ev: [debug_event_t](#ida_idd.debug_event_t)) → uint ### ida_idd.get_event_exc_ea(ev: [debug_event_t](#ida_idd.debug_event_t)) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) ### ida_idd.can_exc_continue(ev: [debug_event_t](#ida_idd.debug_event_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_idd.NO_PROCESS *= 4294967295* No process. ### ida_idd.NO_THREAD *= 0* No thread. in PROCESS_STARTED this value can be used to specify that the main thread has not been created. It will be initialized later by a THREAD_STARTED event. ### ida_idd.dbg_can_query ### *class* ida_idd.Appcall_array_\_(tp) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) This class is used with Appcall.array() method #### pack(L) Packs a list or tuple into a byref buffer #### try_to_convert_to_list(obj) Is this object a list? We check for the existance of attribute zero and attribute self.size-1 #### unpack(buf, as_list=True) Unpacks an array back into a list or an object ### *class* ida_idd.Appcall_callable_\_(ea, tinfo_or_typestr=None, fields=None) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) Helper class to issue appcalls using a natural syntax: : appcall.FunctionNameInTheDatabase(arguments, ….) or : appcall[“Function@8”](arguments, …) or : f8 = appcall[“Function@8”] f8(arg1, arg2, …) or : o = appcall.obj() i = byref(5) appcall.funcname(arg1, i, “hello”, o) #### timeout An Appcall instance can change its timeout value with this attribute #### options Sets the Appcall options locally to this Appcall instance #### ea Returns or sets the EA associated with this object #### tif Returns the tinfo_t object #### size Returns the size of the type #### type Returns the typestring #### fields Returns the field names #### retrieve(src=None, flags=0) Unpacks a typed object from the database if an ea is given or from a string if a string was passed :param src: the address of the object or a string :returns: Returns a tuple of boolean and object or error number (Bool, Error | Object). #### store(obj, dest_ea=None, base_ea=0, flags=0) Packs an object into a given ea if provided or into a string if no address was passed. :param obj: The object to pack :param dest_ea: If packing to idb this will be the store location :param base_ea: If packing to a buffer, this will be the base that will be used to relocate the pointers * **Returns:** Tuple(Boolean, packed_string or error code) if packing to a string * **Returns:** a return code is returned (0 indicating success) if packing to the database ### *class* ida_idd.Appcall_consts_\_(default=None) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) Helper class used by Appcall.Consts attribute It is used to retrieve constants via attribute access ### *class* ida_idd.Appcall_\_ Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### APPCALL_MANUAL *= 1* Only set up the appcall, do not run. debugger_t::cleanup_appcall will not be generated by ida! #### APPCALL_DEBEV *= 2* Return debug event information. #### APPCALL_TIMEOUT *= 4* Appcall with timeout. If timed out, errbuf will contain “timeout”. See SET_APPCALL_TIMEOUT and GET_APPCALL_TIMEOUT #### Consts Use Appcall.Consts.CONST_NAME to access constants #### *static* proto(name_or_ea, proto_or_tinfo, flags=None) Allows you to instantiate an appcall (callable object) with the desired prototype :param name_or_ea: The name of the function (will be resolved with LocByName()) :param proto_or_tinfo: function prototype as a string or type of the function as tinfo_t object :returns: a callbable Appcall instance with the given prototypes and flags, or > an exception if the prototype could not be parsed or the address is not resolvable. #### *static* valueof(name, default=0) If the name could not be resolved then the default value will be returned * **Returns:** the numeric value of a given name string. #### *static* int64(v) Whenever a 64bit number is needed use this method to construct an object #### *static* byref(val) Method to create references to immutable objects Currently we support references to int/strings Objects need not be passed by reference (this will be done automatically) #### *static* buffer(str=None, size=0, fill='\\x00') Creates a string buffer. The returned value (r) will be a byref object. Use r.value to get the contents and r.size to get the buffer’s size #### *static* obj(\*\*kwds) Returns an empty object or objects with attributes as passed via its keywords arguments #### *static* cstr(val) #### *static* UTF16(s) #### unicode #### *static* array(type_name) Defines an array type. Later you need to pack() / unpack() #### *static* typedobj(typedecl_or_tinfo, ea=None) Returns an appcall object for a type (can be given as tinfo_t object or as a string declaration) One can then use retrieve() member method :param ea: Optional parameter that later can be used to retrieve the type :returns: Appcall object or raises ValueError exception #### *static* set_appcall_options(opt) Method to change the Appcall options globally (not per Appcall) #### *static* get_appcall_options() Return the global Appcall options #### *static* cleanup_appcall(tid=0) Cleanup after manual appcall. * **Parameters:** **tid** – thread to use. NO_THREAD means to use the current thread The application state is restored as it was before calling the last appcall(). Nested appcalls are supported. * **Returns:** eOk if successful, otherwise an error code ### ida_idd.Appcall # index.html.md # ida_idaapi ## Attributes | [`BADADDR`](#ida_idaapi.BADADDR) | | |------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------| | [`BADADDR32`](#ida_idaapi.BADADDR32) | | | [`BADADDR64`](#ida_idaapi.BADADDR64) | | | [`BADSEL`](#ida_idaapi.BADSEL) | | | [`SIZE_MAX`](#ida_idaapi.SIZE_MAX) | | | [`ea_t`](#ida_idaapi.ea_t) | | | [`integer_types`](#ida_idaapi.integer_types) | | | [`SEEK_SET`](#ida_idaapi.SEEK_SET) | | | [`SEEK_CUR`](#ida_idaapi.SEEK_CUR) | | | [`SEEK_END`](#ida_idaapi.SEEK_END) | | | [`PLUGIN_MOD`](#ida_idaapi.PLUGIN_MOD) | | | [`PLUGIN_DRAW`](#ida_idaapi.PLUGIN_DRAW) | | | [`PLUGIN_SEG`](#ida_idaapi.PLUGIN_SEG) | | | [`PLUGIN_UNL`](#ida_idaapi.PLUGIN_UNL) | | | [`PLUGIN_HIDE`](#ida_idaapi.PLUGIN_HIDE) | | | [`PLUGIN_DBG`](#ida_idaapi.PLUGIN_DBG) | | | [`PLUGIN_PROC`](#ida_idaapi.PLUGIN_PROC) | | | [`PLUGIN_FIX`](#ida_idaapi.PLUGIN_FIX) | | | [`PLUGIN_MULTI`](#ida_idaapi.PLUGIN_MULTI) | | | [`PLUGIN_SKIP`](#ida_idaapi.PLUGIN_SKIP) | | | [`PLUGIN_OK`](#ida_idaapi.PLUGIN_OK) | | | [`PLUGIN_KEEP`](#ida_idaapi.PLUGIN_KEEP) | | | [`PY_ICID_INT64`](#ida_idaapi.PY_ICID_INT64) | int64 object | | [`PY_ICID_BYREF`](#ida_idaapi.PY_ICID_BYREF) | byref object | | [`PY_ICID_OPAQUE`](#ida_idaapi.PY_ICID_OPAQUE) | opaque object | | [`ST_OVER_DEBUG_SEG`](#ida_idaapi.ST_OVER_DEBUG_SEG) | step tracing will be disabled when IP is in a debugger segment | | [`ST_OVER_LIB_FUNC`](#ida_idaapi.ST_OVER_LIB_FUNC) | step tracing will be disabled when IP is in a library function | | [`as_unicode`](#ida_idaapi.as_unicode) | | | [`IDAPython_Completion`](#ida_idaapi.IDAPython_Completion) | | | [`NW_OPENIDB`](#ida_idaapi.NW_OPENIDB) | Notify when the database is opened. Its callback is of the form: def notify_when_callback(nw_code, is_old_database) | | [`NW_CLOSEIDB`](#ida_idaapi.NW_CLOSEIDB) | Notify when the database is closed. Its callback is of the form: def notify_when_callback(nw_code) | | [`NW_INITIDA`](#ida_idaapi.NW_INITIDA) | Notify when the IDA starts. Its callback is of the form: def notify_when_callback(nw_code) | | [`NW_TERMIDA`](#ida_idaapi.NW_TERMIDA) | Notify when the IDA terminates. Its callback is of the form: def notify_when_callback(nw_code) | | [`NW_REMOVE`](#ida_idaapi.NW_REMOVE) | Use this flag with other flags to uninstall a notifywhen callback | | [`HBF_CALL_WITH_NEW_EXEC`](#ida_idaapi.HBF_CALL_WITH_NEW_EXEC) | | | [`HBF_VOLATILE_METHOD_SET`](#ida_idaapi.HBF_VOLATILE_METHOD_SET) | | ## Classes | [`pyidc_opaque_object_t`](#ida_idaapi.pyidc_opaque_object_t) | This is the base class for all Python<->IDC opaque objects | |----------------------------------------------------------------|---------------------------------------------------------------| | [`py_clinked_object_t`](#ida_idaapi.py_clinked_object_t) | This is a utility and base class for C linked objects | | [`object_t`](#ida_idaapi.object_t) | Helper class used to initialize empty objects | | [`plugin_t`](#ida_idaapi.plugin_t) | Base class for all scripted plugins. | | [`plugmod_t`](#ida_idaapi.plugmod_t) | Base class for all scripted multi-plugins. | | [`pyidc_cvt_helper__`](#ida_idaapi.pyidc_cvt_helper__) | This is a special helper object that helps detect which kind | | [`PyIdc_cvt_int64__`](#ida_idaapi.PyIdc_cvt_int64__) | Helper class for explicitly representing VT_INT64 values | | [`PyIdc_cvt_refclass__`](#ida_idaapi.PyIdc_cvt_refclass__) | Helper class for representing references to immutable objects | | [`IDAPython_displayhook`](#ida_idaapi.IDAPython_displayhook) | | | [`loader_input_t`](#ida_idaapi.loader_input_t) | A helper class to work with linput_t related functions. | ## Functions | [`require`](#ida_idaapi.require)(modulename[, package]) | Load, or reload a module. | |-------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------| | [`replfun`](#ida_idaapi.replfun)(func) | | | [`as_cstr`](#ida_idaapi.as_cstr)(val) | Returns a C str from the passed value. The passed value can be of type refclass (returned by a call to buffer() or byref()) | | [`as_UTF16`](#ida_idaapi.as_UTF16)(s) | Convenience function to convert a string into appropriate unicode format | | [`as_uint32`](#ida_idaapi.as_uint32)(v) | Returns a number as an unsigned int32 number | | [`as_int32`](#ida_idaapi.as_int32)(v) | Returns a number as a signed int32 number | | [`as_signed`](#ida_idaapi.as_signed)(v[, nbits]) | Returns a number as signed. The number of bits are specified by the user. | | [`TRUNC`](#ida_idaapi.TRUNC)(ea) | Truncate EA for the current application bitness | | [`copy_bits`](#ida_idaapi.copy_bits)(v, s[, e]) | Copy bits from a value | | [`struct_unpack`](#ida_idaapi.struct_unpack)(buffer[, signed, offs]) | Unpack a buffer given its length and offset using struct.unpack_from(). | | [`IDAPython_ExecSystem`](#ida_idaapi.IDAPython_ExecSystem)(cmd) | Executes a command with popen(). | | [`IDAPython_FormatExc`](#ida_idaapi.IDAPython_FormatExc)(etype[, value, tb, limit]) | This function is used to format an exception given the | | [`IDAPython_ExecScript`](#ida_idaapi.IDAPython_ExecScript)(path, g[, print_error, script_args]) | Run the specified script. | | [`IDAPython_LoadProcMod`](#ida_idaapi.IDAPython_LoadProcMod)(path, g[, print_error]) | Load processor module. | | [`IDAPython_UnLoadProcMod`](#ida_idaapi.IDAPython_UnLoadProcMod)(script, g[, print_error]) | Unload processor module. | | [`IDAPython_GetDocstrings`](#ida_idaapi.IDAPython_GetDocstrings)(obj) | | | [`notify_when`](#ida_idaapi.notify_when)(when, callback) | Register a callback that will be called when an event happens. | | [`parse_command_line3`](#ida_idaapi.parse_command_line3)(→ PyObject \*) | | | [`set_script_timeout`](#ida_idaapi.set_script_timeout)(timeout) | Changes the script timeout value. The script wait box dialog will be hidden and shown again when the timeout elapses. | | [`disable_script_timeout`](#ida_idaapi.disable_script_timeout)() | Disables the script timeout and hides the script wait box. | | [`enable_extlang_python`](#ida_idaapi.enable_extlang_python)(enable) | Enables or disables Python extlang. | | [`enable_python_cli`](#ida_idaapi.enable_python_cli)(→ None) | | | [`format_basestring`](#ida_idaapi.format_basestring)(→ str) | | | [`pygc_refresh`](#ida_idaapi.pygc_refresh)(→ None) | | | [`pygc_create_groups`](#ida_idaapi.pygc_create_groups)(→ PyObject \*) | | | [`pygc_delete_groups`](#ida_idaapi.pygc_delete_groups)(→ PyObject \*) | | | [`pygc_set_groups_visibility`](#ida_idaapi.pygc_set_groups_visibility)(→ PyObject \*) | | | [`pycim_get_widget`](#ida_idaapi.pycim_get_widget)(→ TWidget \*) | | | [`pycim_view_close`](#ida_idaapi.pycim_view_close)(→ None) | | ## Module Contents ### ida_idaapi.BADADDR ### ida_idaapi.BADADDR32 ### ida_idaapi.BADADDR64 ### ida_idaapi.BADSEL ### ida_idaapi.SIZE_MAX ### ida_idaapi.ea_t ### ida_idaapi.integer_types ### ida_idaapi.require(modulename, package=None) Load, or reload a module. When under heavy development, a user’s tool might consist of multiple modules. If those are imported using the standard ‘import’ mechanism, there is no guarantee that the Python implementation will re-read and re-evaluate the module’s Python code. In fact, it usually doesn’t. What should be done instead is ‘reload()’-ing that module. This is a simple helper function that will do just that: In case the module doesn’t exist, it ‘import’s it, and if it does exist, ‘reload()’s it. The importing module (i.e., the module calling require()) will have the loaded module bound to its globals(), under the name ‘modulename’. (If require() is called from the command line, the importing module will be ‘_\_main_\_’.) For more information, see: <[http://www.hexblog.com/?p=749](http://www.hexblog.com/?p=749)>. ### ida_idaapi.replfun(func) ### ida_idaapi.SEEK_SET *= 0* ### ida_idaapi.SEEK_CUR *= 1* ### ida_idaapi.SEEK_END *= 2* ### ida_idaapi.PLUGIN_MOD *= 1* ### ida_idaapi.PLUGIN_DRAW *= 2* ### ida_idaapi.PLUGIN_SEG *= 4* ### ida_idaapi.PLUGIN_UNL *= 8* ### ida_idaapi.PLUGIN_HIDE *= 16* ### ida_idaapi.PLUGIN_DBG *= 32* ### ida_idaapi.PLUGIN_PROC *= 64* ### ida_idaapi.PLUGIN_FIX *= 128* ### ida_idaapi.PLUGIN_MULTI *= 256* ### ida_idaapi.PLUGIN_SKIP *= 0* ### ida_idaapi.PLUGIN_OK *= 1* ### ida_idaapi.PLUGIN_KEEP *= 2* ### ida_idaapi.PY_ICID_INT64 *= 0* int64 object ### ida_idaapi.PY_ICID_BYREF *= 1* byref object ### ida_idaapi.PY_ICID_OPAQUE *= 2* opaque object ### ida_idaapi.ST_OVER_DEBUG_SEG *= 1* step tracing will be disabled when IP is in a debugger segment ### ida_idaapi.ST_OVER_LIB_FUNC *= 2* step tracing will be disabled when IP is in a library function ### *class* ida_idaapi.pyidc_opaque_object_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) This is the base class for all Python<->IDC opaque objects ### *class* ida_idaapi.py_clinked_object_t(lnk=None) Bases: [`pyidc_opaque_object_t`](#ida_idaapi.pyidc_opaque_object_t) This is a utility and base class for C linked objects #### copy() Returns a new copy of this class #### assign(other) Overwrite me. This method allows you to assign an instance contents to anothers :returns: Boolean #### clink Returns the C link as a PyObject #### clink_ptr Returns the C link pointer as a number ### *class* ida_idaapi.object_t(\*\*kwds) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) Helper class used to initialize empty objects ### *class* ida_idaapi.plugin_t Bases: [`pyidc_opaque_object_t`](#ida_idaapi.pyidc_opaque_object_t) Base class for all scripted plugins. #### run(arg) #### term() ### *class* ida_idaapi.plugmod_t Bases: [`pyidc_opaque_object_t`](#ida_idaapi.pyidc_opaque_object_t) Base class for all scripted multi-plugins. ### *class* ida_idaapi.pyidc_cvt_helper_\_(cvt_id, value) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) This is a special helper object that helps detect which kind of object is this python object wrapping and how to convert it back and from IDC. This object is characterized by its special attribute and its value #### value ### *class* ida_idaapi.PyIdc_cvt_int64_\_(v) Bases: [`pyidc_cvt_helper__`](#ida_idaapi.pyidc_cvt_helper__) Helper class for explicitly representing VT_INT64 values ### *class* ida_idaapi.PyIdc_cvt_refclass_\_(v) Bases: [`pyidc_cvt_helper__`](#ida_idaapi.pyidc_cvt_helper__) Helper class for representing references to immutable objects #### cstr() Returns the string as a C string (up to the zero termination) ### ida_idaapi.as_cstr(val) Returns a C str from the passed value. The passed value can be of type refclass (returned by a call to buffer() or byref()) It scans for the first x00 and returns the string value up to that point. ### ida_idaapi.as_UTF16(s) Convenience function to convert a string into appropriate unicode format ### ida_idaapi.as_unicode ### ida_idaapi.as_uint32(v) Returns a number as an unsigned int32 number ### ida_idaapi.as_int32(v) Returns a number as a signed int32 number ### ida_idaapi.as_signed(v, nbits=32) Returns a number as signed. The number of bits are specified by the user. The MSB holds the sign. ### ida_idaapi.TRUNC(ea) Truncate EA for the current application bitness ### ida_idaapi.copy_bits(v, s, e=-1) Copy bits from a value :param v: the value :param s: starting bit (0-based) :param e: ending bit ### ida_idaapi.struct_unpack(buffer, signed=False, offs=0) Unpack a buffer given its length and offset using struct.unpack_from(). This function will know how to unpack the given buffer by using the lookup table ‘_\_struct_unpack_table’ If the buffer is of unknown length then None is returned. Otherwise the unpacked value is returned. ### ida_idaapi.IDAPython_ExecSystem(cmd) Executes a command with popen(). ### ida_idaapi.IDAPython_FormatExc(etype, value=None, tb=None, limit=None) This function is used to format an exception given the values returned by a PyErr_Fetch() ### ida_idaapi.IDAPython_ExecScript(path, g, print_error=True, script_args=None) Run the specified script. This function is used by the low-level plugin code. ### ida_idaapi.IDAPython_LoadProcMod(path, g, print_error=True) Load processor module. ### ida_idaapi.IDAPython_UnLoadProcMod(script, g, print_error=True) Unload processor module. ### ida_idaapi.IDAPython_GetDocstrings(obj) ### ida_idaapi.IDAPython_Completion ### ida_idaapi.NW_OPENIDB *= 1* Notify when the database is opened. Its callback is of the form: def notify_when_callback(nw_code, is_old_database) ### ida_idaapi.NW_CLOSEIDB *= 2* Notify when the database is closed. Its callback is of the form: def notify_when_callback(nw_code) ### ida_idaapi.NW_INITIDA *= 4* Notify when the IDA starts. Its callback is of the form: def notify_when_callback(nw_code) ### ida_idaapi.NW_TERMIDA *= 8* Notify when the IDA terminates. Its callback is of the form: def notify_when_callback(nw_code) ### ida_idaapi.NW_REMOVE *= 16* Use this flag with other flags to uninstall a notifywhen callback ### ida_idaapi.notify_when(when, callback) Register a callback that will be called when an event happens. :param when: one of NW_XXXX constants :param callback: This callback prototype varies depending on the ‘when’ parameter: > The general callback format: > : def notify_when_callback(nw_code) > In the case of NW_OPENIDB: > : def notify_when_callback(nw_code, is_old_database) * **Returns:** Boolean ### *class* ida_idaapi.IDAPython_displayhook #### orig_displayhook #### format_seq(num_printer, storage, item, opn, cls) #### format_item(num_printer, storage, item) #### displayhook_format(item) #### displayhook(item) ### ida_idaapi.HBF_CALL_WITH_NEW_EXEC ### ida_idaapi.HBF_VOLATILE_METHOD_SET ### ida_idaapi.parse_command_line3(cmdline: [str](https://docs.python.org/3/library/stdtypes.html#str)) → PyObject \* ### ida_idaapi.set_script_timeout(timeout) Changes the script timeout value. The script wait box dialog will be hidden and shown again when the timeout elapses. See also L{disable_script_timeout}. * **Parameters:** **timeout** – This value is in seconds. If this value is set to zero then the script will never timeout. * **Returns:** Returns the old timeout value ### ida_idaapi.disable_script_timeout() Disables the script timeout and hides the script wait box. Calling L{set_script_timeout} will not have any effects until the script is compiled and executed again * **Returns:** None ### ida_idaapi.enable_extlang_python(enable) Enables or disables Python extlang. When enabled, all expressions will be evaluated by Python. * **Parameters:** **enable** – Set to True to enable, False otherwise ### ida_idaapi.enable_python_cli(enable: [bool](https://docs.python.org/3/library/functions.html#bool)) → [None](https://docs.python.org/3/library/constants.html#None) ### ida_idaapi.format_basestring(\_in: PyObject \*) → [str](https://docs.python.org/3/library/stdtypes.html#str) ### ida_idaapi.pygc_refresh(\_self: PyObject \*) → [None](https://docs.python.org/3/library/constants.html#None) ### ida_idaapi.pygc_create_groups(\_self: PyObject \*, groups_infos: PyObject \*) → PyObject \* ### ida_idaapi.pygc_delete_groups(\_self: PyObject \*, groups: PyObject \*, new_current: PyObject \*) → PyObject \* ### ida_idaapi.pygc_set_groups_visibility(\_self: PyObject \*, groups: PyObject \*, expand: PyObject \*, new_current: PyObject \*) → PyObject \* ### ida_idaapi.pycim_get_widget(\_self: PyObject \*) → TWidget \* ### ida_idaapi.pycim_view_close(\_self: PyObject \*) → [None](https://docs.python.org/3/library/constants.html#None) ### *class* ida_idaapi.loader_input_t(pycapsule=None) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) A helper class to work with linput_t related functions. This class is also used by file loaders scripts. #### thisown #### close() Closes the file #### open(filename, remote=False) Opens a file (or a remote file) * **Parameters:** * **filename** – the file name * **remote** – whether the file is local, or remote * **Returns:** Boolean #### set_linput(linput) Links the current loader_input_t instance to a linput_t instance * **Parameters:** **linput** – the linput_t to link to #### *static* from_linput(linput: linput_t \*) → loader_input_t \* #### *static* from_capsule(pycapsule: PyObject \*) → loader_input_t \* #### *static* from_fp(fp) A static method to construct an instance from a FILE\* * **Parameters:** **fp** – a FILE pointer * **Returns:** a new instance, or None #### get_linput() → linput_t \* #### open_memory(start: ea_t, size: [int](https://docs.python.org/3/library/functions.html#int)) Create a linput for process memory (By internally calling idaapi.create_memory_linput()) This linput will use dbg->read_memory() to read data * **Parameters:** * **start** – starting address of the input * **size** – size of the memory range to represent as linput if unknown, may be passed as 0 #### seek(offset: [int](https://docs.python.org/3/library/functions.html#int), whence=SEEK_SET) Set input source position * **Parameters:** * **offset** – the seek offset * **whence** – the position to seek from * **Returns:** the new position (not 0 as fseek!) #### tell() Returns the current position #### getz(size: [int](https://docs.python.org/3/library/functions.html#int), fpos: [int](https://docs.python.org/3/library/functions.html#int) = -1) Returns a zero terminated string at the given position * **Parameters:** * **size** – maximum size of the string * **fpos** – if != -1 then seek will be performed before reading * **Returns:** The string or None on failure. #### gets(len: [int](https://docs.python.org/3/library/functions.html#int)) Reads a line from the input file. Returns the read line or None * **Parameters:** **len** – the maximum line length * **Returns:** a str, or None #### read(size: [int](https://docs.python.org/3/library/functions.html#int) = -1) Read up to size bytes (all data if size is negative). Return an empty bytes object on EOF. * **Parameters:** **size** – the maximum number of bytes to read * **Returns:** a bytes object #### opened() Checks if the file is opened or not #### readbytes(size: [int](https://docs.python.org/3/library/functions.html#int), big_endian: [bool](https://docs.python.org/3/library/functions.html#bool)) Similar to read() but it respect the endianness * **Parameters:** * **size** – the maximum number of bytes to read * **big_endian** – endianness * **Returns:** a str, or None #### file2base(pos: [int](https://docs.python.org/3/library/functions.html#int), ea1: ea_t, ea2: ea_t, patchable: [bool](https://docs.python.org/3/library/functions.html#bool)) Load portion of file into the database This function will include (ea1..ea2) into the addressing space of the program (make it enabled) * **Parameters:** * **li** – pointer ot input source * **pos** – position in the file * **ea1** – start of range of destination linear addresses * **ea2** – end of range of destination linear addresses * **patchable** – should the kernel remember correspondance of file offsets to linear addresses. * **Returns:** 1-ok,0-read error, a warning is displayed #### size() → int64 #### filename() → PyObject \* #### get_byte() Reads a single byte from the file. Returns None if EOF or the read byte # index.html.md # ida_idc ## Functions | [`mark_position`](#ida_idc.mark_position)(→ None) | | |----------------------------------------------------------------|----| | [`get_marked_pos`](#ida_idc.get_marked_pos)(→ ida_idaapi.ea_t) | | | [`get_mark_comment`](#ida_idc.get_mark_comment)(→ PyObject \*) | | ## Module Contents ### ida_idc.mark_position(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), lnnum: [int](https://docs.python.org/3/library/functions.html#int), x: short, y: short, slot: [int](https://docs.python.org/3/library/functions.html#int), comment: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [None](https://docs.python.org/3/library/constants.html#None) ### ida_idc.get_marked_pos(slot: [int](https://docs.python.org/3/library/functions.html#int)) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) ### ida_idc.get_mark_comment(slot: [int](https://docs.python.org/3/library/functions.html#int)) → PyObject \* # index.html.md # ida_entry Functions that deal with entry points. Exported functions are considered as entry points as well. IDA maintains list of entry points to the program. Each entry point: > * has an address > * has a name > * may have an ordinal number ## Attributes | [`AEF_UTF8`](#ida_entry.AEF_UTF8) | the name is given in UTF-8 (default) | |-----------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [`AEF_IDBENC`](#ida_entry.AEF_IDBENC) | the name is given in the IDB encoding; non-ASCII bytes will be decoded accordingly. Specifying AEF_IDBENC also implies AEF_NODUMMY | | [`AEF_NODUMMY`](#ida_entry.AEF_NODUMMY) | automatically prepend the name with '_' if it begins with a dummy suffix. See also AEF_IDBENC | | [`AEF_WEAK`](#ida_entry.AEF_WEAK) | make name weak | | [`AEF_NOFORCE`](#ida_entry.AEF_NOFORCE) | if the specified address already has a name, the new name will be appended to the regular comment, except for the case when the old name is weak and the new one is not. | ## Functions | [`get_entry_qty`](#ida_entry.get_entry_qty)(→ int) | Get number of entry points. | |-----------------------------------------------------------------------------|--------------------------------------------------------| | [`add_entry`](#ida_entry.add_entry)(→ bool) | Add an entry point to the list of entry points. | | [`get_entry_ordinal`](#ida_entry.get_entry_ordinal)(→ int) | Get ordinal number of an entry point. | | [`get_entry`](#ida_entry.get_entry)(→ ida_idaapi.ea_t) | Get entry point address by its ordinal | | [`get_entry_name`](#ida_entry.get_entry_name)(→ Union[str, None]) | Get name of the entry point by its ordinal. | | [`rename_entry`](#ida_entry.rename_entry)(→ bool) | Rename entry point. | | [`set_entry_forwarder`](#ida_entry.set_entry_forwarder)(→ bool) | Set forwarder name for ordinal. | | [`get_entry_forwarder`](#ida_entry.get_entry_forwarder)(→ Union[str, None]) | Get forwarder name for the entry point by its ordinal. | ## Module Contents ### ida_entry.get_entry_qty() → [int](https://docs.python.org/3/library/functions.html#int) Get number of entry points. ### ida_entry.AEF_UTF8 the name is given in UTF-8 (default) ### ida_entry.AEF_IDBENC the name is given in the IDB encoding; non-ASCII bytes will be decoded accordingly. Specifying AEF_IDBENC also implies AEF_NODUMMY ### ida_entry.AEF_NODUMMY automatically prepend the name with ‘_’ if it begins with a dummy suffix. See also AEF_IDBENC ### ida_entry.AEF_WEAK make name weak ### ida_entry.AEF_NOFORCE if the specified address already has a name, the new name will be appended to the regular comment, except for the case when the old name is weak and the new one is not. ### ida_entry.add_entry(ord: [int](https://docs.python.org/3/library/functions.html#int), ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), name: [str](https://docs.python.org/3/library/stdtypes.html#str), makecode: [bool](https://docs.python.org/3/library/functions.html#bool), flags: [int](https://docs.python.org/3/library/functions.html#int) = 0) → [bool](https://docs.python.org/3/library/functions.html#bool) Add an entry point to the list of entry points. * **Parameters:** * **ord** – ordinal number if ordinal number is equal to ‘ea’ then ordinal is not used * **ea** – linear address * **name** – name of entry point. If the specified location already has a name, the old name will be appended to the regular comment. * **makecode** – should the kernel convert bytes at the entry point to instruction(s) * **flags** – See AEF_\* * **Returns:** success (currently always true) ### ida_entry.get_entry_ordinal(idx: [int](https://docs.python.org/3/library/functions.html#int)) → [int](https://docs.python.org/3/library/functions.html#int) Get ordinal number of an entry point. * **Parameters:** **idx** – internal number of entry point. Should be in the range 0..get_entry_qty()-1 * **Returns:** ordinal number or 0. ### ida_entry.get_entry(ord: [int](https://docs.python.org/3/library/functions.html#int)) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) Get entry point address by its ordinal * **Parameters:** **ord** – ordinal number of entry point * **Returns:** address or BADADDR ### ida_entry.get_entry_name(ord: [int](https://docs.python.org/3/library/functions.html#int)) → [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None) Get name of the entry point by its ordinal. * **Parameters:** **ord** – ordinal number of entry point * **Returns:** size of entry name or -1 ### ida_entry.rename_entry(ord: [int](https://docs.python.org/3/library/functions.html#int), name: [str](https://docs.python.org/3/library/stdtypes.html#str), flags: [int](https://docs.python.org/3/library/functions.html#int) = 0) → [bool](https://docs.python.org/3/library/functions.html#bool) Rename entry point. * **Parameters:** * **ord** – ordinal number of the entry point * **name** – name of entry point. If the specified location already has a name, the old name will be appended to a non-repeatable comment. * **flags** – See AEF_\* * **Returns:** success ### ida_entry.set_entry_forwarder(ord: [int](https://docs.python.org/3/library/functions.html#int), name: [str](https://docs.python.org/3/library/stdtypes.html#str), flags: [int](https://docs.python.org/3/library/functions.html#int) = 0) → [bool](https://docs.python.org/3/library/functions.html#bool) Set forwarder name for ordinal. * **Parameters:** * **ord** – ordinal number of the entry point * **name** – forwarder name for entry point. * **flags** – See AEF_\* * **Returns:** success ### ida_entry.get_entry_forwarder(ord: [int](https://docs.python.org/3/library/functions.html#int)) → [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None) Get forwarder name for the entry point by its ordinal. * **Parameters:** **ord** – ordinal number of entry point * **Returns:** size of entry forwarder name or -1 # index.html.md # operand_changed summary: notify the user when an instruction operand changes description: : Show notifications whenever the user changes an instruction’s operand, or a data item. level: advanced ## Classes | [`operand_changed_t`](#operand_changed.operand_changed_t) | | |-------------------------------------------------------------|----| ## Module Contents ### *class* operand_changed.operand_changed_t(\_flags: [int](https://docs.python.org/3/library/functions.html#int) = 0, \_hkcb_flags: [int](https://docs.python.org/3/library/functions.html#int) = 1) Bases: [`ida_idp.IDB_Hooks`](../ida_idp/index.md#ida_idp.IDB_Hooks) #### log(msg) #### op_type_changed(ea, n) An operand type (offset, hex, etc…) has been set or deleted. * **Parameters:** * **ea** – (ea_t) * **n** – (int) eventually or’ed with OPND_OUTER or OPND_ALL # index.html.md # indexer_substring_search summary: search the IDA indexer for a name (substring match) description: : Demonstrates how to use the IDA indexer API to search for functions, named locations, local types, segments, and function comments that contain a given query string.
The indexer performs fast substring matching across all indexed data simultaneously. Each result exposes the matched name, the sub-index that produced it (e.g. SUBIDX_FUNCTIONS or SUBIDX_SEGMENTS), its score, and the effective address when applicable.
The example also shows how to narrow a search to a single sub-index when only one category of results is needed.
Note: the indexer must be enabled for the current database. Open the database with -dENABLE_INDEXER=YES to enable it, or check indexer_is_enabled() at runtime. keywords: indexer, search, functions, names, segments, types, comments level: beginner ## Attributes | [`SUBIDX_NAMES`](#indexer_substring_search.SUBIDX_NAMES) | | |------------------------------------------------------------|----| ## Functions | [`print_results`](#indexer_substring_search.print_results)(header, results) | | |-------------------------------------------------------------------------------|----| | [`main`](#indexer_substring_search.main)() | | ## Module Contents ### indexer_substring_search.SUBIDX_NAMES ### indexer_substring_search.print_results(header, results) ### indexer_substring_search.main() # index.html.md # ida_gdl Low level graph drawing operations. ## Attributes | [`fcb_normal`](#ida_gdl.fcb_normal) | normal block | |-------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [`fcb_indjump`](#ida_gdl.fcb_indjump) | block ends with indirect jump | | [`fcb_ret`](#ida_gdl.fcb_ret) | return block | | [`fcb_cndret`](#ida_gdl.fcb_cndret) | conditional return block | | [`fcb_noret`](#ida_gdl.fcb_noret) | noreturn block | | [`fcb_enoret`](#ida_gdl.fcb_enoret) | external noreturn block (does not belong to the function) | | [`fcb_extern`](#ida_gdl.fcb_extern) | external normal block | | [`fcb_error`](#ida_gdl.fcb_error) | block passes execution past the function end | | [`EDGE_NONE`](#ida_gdl.EDGE_NONE) | | | [`EDGE_TREE`](#ida_gdl.EDGE_TREE) | | | [`EDGE_FORWARD`](#ida_gdl.EDGE_FORWARD) | | | [`EDGE_BACK`](#ida_gdl.EDGE_BACK) | | | [`EDGE_CROSS`](#ida_gdl.EDGE_CROSS) | | | [`EDGE_SUBGRAPH`](#ida_gdl.EDGE_SUBGRAPH) | | | [`CHART_PRINT_NAMES`](#ida_gdl.CHART_PRINT_NAMES) | print labels for each block? | | [`CHART_GEN_DOT`](#ida_gdl.CHART_GEN_DOT) | generate .dot file (file extension is forced to .dot) | | [`CHART_GEN_GDL`](#ida_gdl.CHART_GEN_GDL) | generate .gdl file (file extension is forced to .gdl) | | [`CHART_WINGRAPH`](#ida_gdl.CHART_WINGRAPH) | call grapher to display the graph | | [`CHART_NOLIBFUNCS`](#ida_gdl.CHART_NOLIBFUNCS) | don't include library functions in the graph | | [`CHART_REFERENCING`](#ida_gdl.CHART_REFERENCING) | references to the addresses in the list | | [`CHART_REFERENCED`](#ida_gdl.CHART_REFERENCED) | references from the addresses in the list | | [`CHART_RECURSIVE`](#ida_gdl.CHART_RECURSIVE) | analyze added blocks | | [`CHART_FOLLOW_DIRECTION`](#ida_gdl.CHART_FOLLOW_DIRECTION) | analyze references to added blocks only in the direction of the reference who discovered the current block | | [`CHART_IGNORE_XTRN`](#ida_gdl.CHART_IGNORE_XTRN) | | | [`CHART_IGNORE_DATA_BSS`](#ida_gdl.CHART_IGNORE_DATA_BSS) | | | [`CHART_IGNORE_LIB_TO`](#ida_gdl.CHART_IGNORE_LIB_TO) | ignore references to library functions | | [`CHART_IGNORE_LIB_FROM`](#ida_gdl.CHART_IGNORE_LIB_FROM) | ignore references from library functions | | [`CHART_PRINT_COMMENTS`](#ida_gdl.CHART_PRINT_COMMENTS) | | | [`CHART_PRINT_DOTS`](#ida_gdl.CHART_PRINT_DOTS) | print dots if xrefs exist outside of the range recursion depth | | [`FC_PRINT`](#ida_gdl.FC_PRINT) | print names (used only by display_flow_chart()) | | [`FC_NOEXT`](#ida_gdl.FC_NOEXT) | do not compute external blocks. Use this to prevent jumps leaving the function from appearing in the flow chart. Unless specified, the targets of those outgoing jumps will be present in the flow chart under the form of one-instruction blocks | | [`FC_RESERVED`](#ida_gdl.FC_RESERVED) | former FC_PREDS | | [`FC_APPND`](#ida_gdl.FC_APPND) | multirange flowchart (set by append_to_flowchart) | | [`FC_CHKBREAK`](#ida_gdl.FC_CHKBREAK) | build_qflow_chart() may be aborted by user | | [`FC_CALL_ENDS`](#ida_gdl.FC_CALL_ENDS) | call instructions terminate basic blocks | | [`FC_NOPREDS`](#ida_gdl.FC_NOPREDS) | do not compute predecessor lists | | [`FC_OUTLINES`](#ida_gdl.FC_OUTLINES) | include outlined code (with FUNC_OUTLINE) | | [`FC_PREDS`](#ida_gdl.FC_PREDS) | | | [`gen_flow_graph`](#id0) | | ## Classes | [`edge_t`](#ida_gdl.edge_t) | | |-------------------------------------------------------|----------------------------------------------------------| | [`edgevec_t`](#ida_gdl.edgevec_t) | | | [`node_ordering_t`](#ida_gdl.node_ordering_t) | | | [`node_iterator`](#ida_gdl.node_iterator) | | | [`gdl_graph_t`](#ida_gdl.gdl_graph_t) | | | [`cancellable_graph_t`](#ida_gdl.cancellable_graph_t) | | | [`qbasic_block_t`](#ida_gdl.qbasic_block_t) | | | [`qflow_chart_t`](#ida_gdl.qflow_chart_t) | | | [`qflow_chart_ea_t`](#ida_gdl.qflow_chart_ea_t) | | | [`BasicBlock`](#ida_gdl.BasicBlock) | Basic block class. It is returned by the Flowchart class | | [`FlowChart`](#ida_gdl.FlowChart) | Flowchart class used to determine basic blocks. | ## Functions | [`gen_gdl`](#ida_gdl.gen_gdl)(→ None) | Create GDL file for graph. | |---------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [`display_gdl`](#ida_gdl.display_gdl)(→ int) | Display GDL file by calling wingraph32. The exact name of the grapher is taken from the configuration file and set up by setup_graph_subsystem(). The path should point to a temporary file: when wingraph32 succeeds showing the graph, the input file will be deleted. | | [`gen_flow_graph`](#id0) | | | [`gen_flow_graph_ea`](#ida_gdl.gen_flow_graph_ea)(→ bool) | Build and display a flow graph (ea-based). | | [`gen_simple_call_chart`](#ida_gdl.gen_simple_call_chart)(→ bool) | Build and display a simple function call graph. | | [`gen_complex_call_chart`](#ida_gdl.gen_complex_call_chart)(→ bool) | Build and display a complex xref graph. | | [`is_noret_block`](#ida_gdl.is_noret_block)(→ bool) | Does this block never return? | | [`is_ret_block`](#ida_gdl.is_ret_block)(→ bool) | Does this block return? | ## Module Contents ### ida_gdl.fcb_normal normal block ### ida_gdl.fcb_indjump block ends with indirect jump ### ida_gdl.fcb_ret return block ### ida_gdl.fcb_cndret conditional return block ### ida_gdl.fcb_noret noreturn block ### ida_gdl.fcb_enoret external noreturn block (does not belong to the function) ### ida_gdl.fcb_extern external normal block ### ida_gdl.fcb_error block passes execution past the function end ### *class* ida_gdl.edge_t(x: [int](https://docs.python.org/3/library/functions.html#int) = 0, y: [int](https://docs.python.org/3/library/functions.html#int) = 0) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### src *: [int](https://docs.python.org/3/library/functions.html#int)* source node number #### dst *: [int](https://docs.python.org/3/library/functions.html#int)* destination node number ### *class* ida_gdl.edgevec_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown ### ida_gdl.EDGE_NONE ### ida_gdl.EDGE_TREE ### ida_gdl.EDGE_FORWARD ### ida_gdl.EDGE_BACK ### ida_gdl.EDGE_CROSS ### ida_gdl.EDGE_SUBGRAPH ### *class* ida_gdl.node_ordering_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### clear() → [None](https://docs.python.org/3/library/constants.html#None) #### resize(n: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### size() → [int](https://docs.python.org/3/library/functions.html#int) #### set(\_node: [int](https://docs.python.org/3/library/functions.html#int), num: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### clr(\_node: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### node(\_order: [int](https://docs.python.org/3/library/functions.html#int)) → [int](https://docs.python.org/3/library/functions.html#int) #### order(\_node: [int](https://docs.python.org/3/library/functions.html#int)) → [int](https://docs.python.org/3/library/functions.html#int) ### *class* ida_gdl.node_iterator(\_g: [gdl_graph_t](#ida_gdl.gdl_graph_t), n: [int](https://docs.python.org/3/library/functions.html#int)) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown ### *class* ida_gdl.gdl_graph_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### get_node_label(n: [int](https://docs.python.org/3/library/functions.html#int)) → char \* #### print_graph_attributes(fp: FILE \*) → [None](https://docs.python.org/3/library/constants.html#None) #### print_node(fp: FILE \*, n: int) → [bool](https://docs.python.org/3/library/functions.html#bool) #### print_edge(fp: FILE \*, i: int, j: int) → [bool](https://docs.python.org/3/library/functions.html#bool) #### print_node_attributes(fp: FILE \*, n: int) → [None](https://docs.python.org/3/library/constants.html#None) #### size() → [int](https://docs.python.org/3/library/functions.html#int) #### node_qty() → [int](https://docs.python.org/3/library/functions.html#int) #### exists(node: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### entry() → [int](https://docs.python.org/3/library/functions.html#int) #### exit() → [int](https://docs.python.org/3/library/functions.html#int) #### nsucc(node: [int](https://docs.python.org/3/library/functions.html#int)) → [int](https://docs.python.org/3/library/functions.html#int) #### npred(node: [int](https://docs.python.org/3/library/functions.html#int)) → [int](https://docs.python.org/3/library/functions.html#int) #### succ(node: [int](https://docs.python.org/3/library/functions.html#int), i: [int](https://docs.python.org/3/library/functions.html#int)) → [int](https://docs.python.org/3/library/functions.html#int) #### pred(node: [int](https://docs.python.org/3/library/functions.html#int), i: [int](https://docs.python.org/3/library/functions.html#int)) → [int](https://docs.python.org/3/library/functions.html#int) #### empty() → [bool](https://docs.python.org/3/library/functions.html#bool) #### get_node_color(n: [int](https://docs.python.org/3/library/functions.html#int)) → bgcolor_t #### get_edge_color(i: [int](https://docs.python.org/3/library/functions.html#int), j: [int](https://docs.python.org/3/library/functions.html#int)) → bgcolor_t #### nedge(node: [int](https://docs.python.org/3/library/functions.html#int), ispred: [bool](https://docs.python.org/3/library/functions.html#bool)) → [int](https://docs.python.org/3/library/functions.html#int) #### edge(node: [int](https://docs.python.org/3/library/functions.html#int), i: [int](https://docs.python.org/3/library/functions.html#int), ispred: [bool](https://docs.python.org/3/library/functions.html#bool)) → [int](https://docs.python.org/3/library/functions.html#int) #### front() → [int](https://docs.python.org/3/library/functions.html#int) #### begin() → [node_iterator](#ida_gdl.node_iterator) #### end() → [node_iterator](#ida_gdl.node_iterator) ### ida_gdl.gen_gdl(g: [gdl_graph_t](#ida_gdl.gdl_graph_t), fname: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [None](https://docs.python.org/3/library/constants.html#None) Create GDL file for graph. ### ida_gdl.display_gdl(fname: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [int](https://docs.python.org/3/library/functions.html#int) Display GDL file by calling wingraph32. The exact name of the grapher is taken from the configuration file and set up by setup_graph_subsystem(). The path should point to a temporary file: when wingraph32 succeeds showing the graph, the input file will be deleted. * **Returns:** error code from os, 0 if ok ### ida_gdl.gen_flow_graph(filename: str, title: str, pfn: func_t \*, ea1: ida_idaapi.ea_t, ea2: ida_idaapi.ea_t, gflags: int) → [bool](https://docs.python.org/3/library/functions.html#bool) Build and display a flow graph. * **Parameters:** * **filename** – output file name. the file extension is not used. maybe nullptr. * **title** – graph title * **pfn** – function to graph * **ea1** – if pfn == nullptr, then the address range * **ea2** – if pfn == nullptr, then the address range * **gflags** – combination of Flow graph building flags. if none of CHART_GEN_DOT, CHART_GEN_GDL, CHART_WINGRAPH is specified, the function will return false * **Returns:** success. if fails, a warning message is displayed on the screen ### ida_gdl.gen_flow_graph_ea(filename: [str](https://docs.python.org/3/library/stdtypes.html#str), title: [str](https://docs.python.org/3/library/stdtypes.html#str), func_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), ea1: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), ea2: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), gflags: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) Build and display a flow graph (ea-based). * **Parameters:** * **filename** – output file name. the file extension is not used. maybe nullptr. * **title** – graph title * **func_ea** – function start address, or BADADDR * **ea1** – if func_ea == BADADDR, then the address range * **ea2** – if func_ea == BADADDR, then the address range * **gflags** – combination of Flow graph building flags. if none of CHART_GEN_DOT, CHART_GEN_GDL, CHART_WINGRAPH is specified, the function will return false * **Returns:** success. if fails, a warning message is displayed on the screen ### ida_gdl.CHART_PRINT_NAMES print labels for each block? ### ida_gdl.CHART_GEN_DOT generate .dot file (file extension is forced to .dot) ### ida_gdl.CHART_GEN_GDL generate .gdl file (file extension is forced to .gdl) ### ida_gdl.CHART_WINGRAPH call grapher to display the graph ### ida_gdl.gen_simple_call_chart(filename: [str](https://docs.python.org/3/library/stdtypes.html#str), wait: [str](https://docs.python.org/3/library/stdtypes.html#str), title: [str](https://docs.python.org/3/library/stdtypes.html#str), gflags: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) Build and display a simple function call graph. * **Parameters:** * **filename** – output file name. the file extension is not used. maybe nullptr. * **wait** – message to display during graph building * **title** – graph title * **gflags** – combination of CHART_NOLIBFUNCS and Flow graph building flags. if none of CHART_GEN_DOT, CHART_GEN_GDL, CHART_WINGRAPH is specified, the function will return false. * **Returns:** success. if fails, a warning message is displayed on the screen ### ida_gdl.gen_complex_call_chart(filename: [str](https://docs.python.org/3/library/stdtypes.html#str), wait: [str](https://docs.python.org/3/library/stdtypes.html#str), title: [str](https://docs.python.org/3/library/stdtypes.html#str), ea1: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), ea2: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), flags: [int](https://docs.python.org/3/library/functions.html#int), recursion_depth: [int](https://docs.python.org/3/library/functions.html#int) = -1) → [bool](https://docs.python.org/3/library/functions.html#bool) Build and display a complex xref graph. * **Parameters:** * **filename** – output file name. the file extension is not used. maybe nullptr. * **wait** – message to display during graph building * **title** – graph title * **ea1** – address range * **ea2** – address range * **flags** – combination of Call chart building flags and Flow graph building flags. if none of CHART_GEN_DOT, CHART_GEN_GDL, CHART_WINGRAPH is specified, the function will return false. * **recursion_depth** – optional limit of recursion * **Returns:** success. if fails, a warning message is displayed on the screen ### ida_gdl.CHART_NOLIBFUNCS don’t include library functions in the graph ### ida_gdl.CHART_REFERENCING references to the addresses in the list ### ida_gdl.CHART_REFERENCED references from the addresses in the list ### ida_gdl.CHART_RECURSIVE analyze added blocks ### ida_gdl.CHART_FOLLOW_DIRECTION analyze references to added blocks only in the direction of the reference who discovered the current block ### ida_gdl.CHART_IGNORE_XTRN ### ida_gdl.CHART_IGNORE_DATA_BSS ### ida_gdl.CHART_IGNORE_LIB_TO ignore references to library functions ### ida_gdl.CHART_IGNORE_LIB_FROM ignore references from library functions ### ida_gdl.CHART_PRINT_COMMENTS ### ida_gdl.CHART_PRINT_DOTS print dots if xrefs exist outside of the range recursion depth ### *class* ida_gdl.cancellable_graph_t Bases: [`gdl_graph_t`](#ida_gdl.gdl_graph_t) #### thisown #### cancelled *: [bool](https://docs.python.org/3/library/functions.html#bool)* ### *class* ida_gdl.qbasic_block_t Bases: [`ida_range.range_t`](../ida_range/index.md#ida_range.range_t) #### thisown ### ida_gdl.is_noret_block(btype: fc_block_type_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Does this block never return? ### ida_gdl.is_ret_block(btype: fc_block_type_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Does this block return? ### ida_gdl.FC_PRINT print names (used only by display_flow_chart()) ### ida_gdl.FC_NOEXT do not compute external blocks. Use this to prevent jumps leaving the function from appearing in the flow chart. Unless specified, the targets of those outgoing jumps will be present in the flow chart under the form of one-instruction blocks ### ida_gdl.FC_RESERVED former FC_PREDS ### ida_gdl.FC_APPND multirange flowchart (set by append_to_flowchart) ### ida_gdl.FC_CHKBREAK build_qflow_chart() may be aborted by user ### ida_gdl.FC_CALL_ENDS call instructions terminate basic blocks ### ida_gdl.FC_NOPREDS do not compute predecessor lists ### ida_gdl.FC_OUTLINES include outlined code (with FUNC_OUTLINE) ### *class* ida_gdl.qflow_chart_t(\*args) Bases: [`cancellable_graph_t`](#ida_gdl.cancellable_graph_t) #### thisown #### title *: [str](https://docs.python.org/3/library/stdtypes.html#str)* #### bounds *: [range_t](../ida_range/index.md#ida_range.range_t)* overall bounds of the qflow_chart_t instance #### pfn *: func_t \** the function this instance was built upon #### flags *: [int](https://docs.python.org/3/library/functions.html#int)* flags. See Flow chart flags #### nproper *: [int](https://docs.python.org/3/library/functions.html#int)* number of basic blocks belonging to the specified range #### create(\*args) → [None](https://docs.python.org/3/library/constants.html#None) This function has the following signatures: > 1. create(_title: str, \_pfn: func_t > ``` > * > ``` > , \_ea1: ida_idaapi.ea_t, \_ea2: ida_idaapi.ea_t, \_flags: int) -> None > 2. create(_title: str, ranges: const rangevec_t &, \_flags: int) -> None # 0: create(_title: str, \_pfn: func_t ``` * ``` , \_ea1: ida_idaapi.ea_t, \_ea2: ida_idaapi.ea_t, \_flags: int) -> None # 1: create(_title: str, ranges: const rangevec_t &, \_flags: int) -> None #### append_to_flowchart(ea1: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), ea2: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### refresh() → [None](https://docs.python.org/3/library/constants.html#None) #### calc_block_type(blknum: [int](https://docs.python.org/3/library/functions.html#int)) → fc_block_type_t #### is_ret_block(blknum: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_noret_block(blknum: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### print_node_attributes(fp: FILE \*, n: int) → [None](https://docs.python.org/3/library/constants.html#None) #### nsucc(node: [int](https://docs.python.org/3/library/functions.html#int)) → [int](https://docs.python.org/3/library/functions.html#int) #### npred(node: [int](https://docs.python.org/3/library/functions.html#int)) → [int](https://docs.python.org/3/library/functions.html#int) #### succ(node: [int](https://docs.python.org/3/library/functions.html#int), i: [int](https://docs.python.org/3/library/functions.html#int)) → [int](https://docs.python.org/3/library/functions.html#int) #### pred(node: [int](https://docs.python.org/3/library/functions.html#int), i: [int](https://docs.python.org/3/library/functions.html#int)) → [int](https://docs.python.org/3/library/functions.html#int) #### get_node_label(\*args) → char \* #### size() → [int](https://docs.python.org/3/library/functions.html#int) #### print_names() → [bool](https://docs.python.org/3/library/functions.html#bool) ### *class* ida_gdl.qflow_chart_ea_t(\*args) Bases: [`cancellable_graph_t`](#ida_gdl.cancellable_graph_t) #### thisown #### title *: [str](https://docs.python.org/3/library/stdtypes.html#str)* #### bounds *: [range_t](../ida_range/index.md#ida_range.range_t)* overall bounds of the qflow_chart_ea_t instance #### func_ea *: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)* start address of the function (BADADDR for range-based charts) #### flags *: [int](https://docs.python.org/3/library/functions.html#int)* flags. See Flow chart flags #### nproper *: [int](https://docs.python.org/3/library/functions.html#int)* number of basic blocks belonging to the specified range #### create(\*args) → [None](https://docs.python.org/3/library/constants.html#None) This function has the following signatures: > 1. create(_title: str, \_func_ea: ida_idaapi.ea_t, \_ea1: ida_idaapi.ea_t, \_ea2: ida_idaapi.ea_t, \_flags: int) -> None > 2. create(_title: str, ranges: const rangevec_t &, \_flags: int) -> None # 0: create(_title: str, \_func_ea: ida_idaapi.ea_t, \_ea1: ida_idaapi.ea_t, \_ea2: ida_idaapi.ea_t, \_flags: int) -> None # 1: create(_title: str, ranges: const rangevec_t &, \_flags: int) -> None #### append_to_flowchart(ea1: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), ea2: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### refresh() → [None](https://docs.python.org/3/library/constants.html#None) #### calc_block_type(blknum: [int](https://docs.python.org/3/library/functions.html#int)) → fc_block_type_t #### is_ret_block(blknum: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_noret_block(blknum: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### print_node_attributes(fp: FILE \*, n: int) → [None](https://docs.python.org/3/library/constants.html#None) #### nsucc(node: [int](https://docs.python.org/3/library/functions.html#int)) → [int](https://docs.python.org/3/library/functions.html#int) #### npred(node: [int](https://docs.python.org/3/library/functions.html#int)) → [int](https://docs.python.org/3/library/functions.html#int) #### succ(node: [int](https://docs.python.org/3/library/functions.html#int), i: [int](https://docs.python.org/3/library/functions.html#int)) → [int](https://docs.python.org/3/library/functions.html#int) #### pred(node: [int](https://docs.python.org/3/library/functions.html#int), i: [int](https://docs.python.org/3/library/functions.html#int)) → [int](https://docs.python.org/3/library/functions.html#int) #### get_node_label(\*args) → char \* #### size() → [int](https://docs.python.org/3/library/functions.html#int) #### print_names() → [bool](https://docs.python.org/3/library/functions.html#bool) ### *class* ida_gdl.BasicBlock(id, bb, fc) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) Basic block class. It is returned by the Flowchart class #### id Basic block ID #### start_ea start_ea of basic block #### end_ea end_ea of basic block #### type Block type (check fc_block_type_t enum) #### preds() Iterates the predecessors list #### succs() Iterates the successors list ### *class* ida_gdl.FlowChart(f=None, bounds=None, flags=0) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) Flowchart class used to determine basic blocks. Check ex_gdl_qflow_chart.py for sample usage. #### size Number of blocks in the flow chart #### refresh() Refreshes the flow chart ### ida_gdl.FC_PREDS *= 0* ### ida_gdl.gen_flow_graph # index.html.md # dscu_query summary: query a Dyld Shared Cache (DSC) from IDAPython description: : This script touches a few highlights of dscu_svc_t – the public service driving IDA’s DSC workflow: cache layout, image lookup, symbol search, string search.
The full surface is much wider than what’s shown here – it can also load modules on demand, walk dependencies, query regions, etc. Run help(svc) after svc = ida_dscu.get_dscu_svc() to see every method available.
Run this script in a database opened from a DSC file. level: beginner ## Attributes | [`svc`](#dscu_query.svc) | | |----------------------------------------|----| | [`image_name`](#dscu_query.image_name) | | ## Module Contents ### dscu_query.svc ### dscu_query.image_name *= '/usr/lib/system/libsystem_malloc.dylib'* # index.html.md # sync_two_graphs summary: follow the movements of one graph, in another description: : Since it is possible to be notified of movements that happen take place in a widget, it’s possible to “replay” those movements in another.
In this case, “IDA View-B” (will be opened if necessary) will show the same contents as “IDA View-A”, slightly zoomed out. keywords: graph, idaview see_also: wrap_idaview level: intermediate ## Attributes | [`wrap_a`](#id0) | | |-----------------------------------------|----| | [`title`](#sync_two_graphs.title) | | | [`widget_a`](#sync_two_graphs.widget_a) | | | [`widget_b`](#sync_two_graphs.widget_b) | | | [`wrap_a`](#id0) | | ## Classes | [`IDAViewA_monitor_t`](#sync_two_graphs.IDAViewA_monitor_t) | Deprecated. Use View_Hooks instead. | |---------------------------------------------------------------|---------------------------------------| ## Functions | [`fit_widget_a`](#sync_two_graphs.fit_widget_a)() | | |-----------------------------------------------------|----| ## Module Contents ### sync_two_graphs.wrap_a *= None* ### *class* sync_two_graphs.IDAViewA_monitor_t Bases: [`ida_kernwin.IDAViewWrapper`](../ida_kernwin/index.md#ida_kernwin.IDAViewWrapper) Deprecated. Use View_Hooks instead. Because the lifecycle of an IDAView is not trivial to track (e.g., a user might close, then re-open the same disassembly view), this wrapper doesn’t bring anything superior to the View_Hooks: quite the contrary, as the latter is much more generic (and better maps IDA’s internal model.) #### OnViewLocationChanged(now, was) #### update_widget_b() ### sync_two_graphs.title *= 'IDA View-A'* ### sync_two_graphs.widget_a ### sync_two_graphs.widget_b ### sync_two_graphs.wrap_a ### sync_two_graphs.fit_widget_a() # index.html.md # create_union_by_member summary: create a union description: : The goal of this script is to demonstrate some usage of the type API. In this script, we create a union by building it member after member. level: intermediate ## Attributes | [`field_list`](#create_union_by_member.field_list) | | |------------------------------------------------------|----| | [`udt`](#create_union_by_member.udt) | | | [`udm`](#id0) | | | [`tif`](#create_union_by_member.tif) | | | [`udm`](#id0) | | ## Module Contents ### create_union_by_member.field_list ### create_union_by_member.udt ### create_union_by_member.udm ### create_union_by_member.tif ### create_union_by_member.udm # index.html.md # serialize summary: serialize and deserialize the decompilation output description: : Decompiles the current function and serializes it into two byte vectors: one for mba and one for cfunc_t. Then deserializes these bytes and creates new mba and cfunc_t objects.
This sample shows how the decompilation output can be converted into a pair of strings that can later be stored somewhere. level: beginner ## Functions | [`main`](#serialize.main)() | | |-------------------------------|----| ## Module Contents ### serialize.main() # index.html.md # show_selected_strings summary: retrieve the selection from the “Strings” window description: : In IDA it’s possible to write actions that can be applied even to core (i.e., “standard”) widgets. The actions in this example use the action “context” to know what the current selection is.
This example shows how you can either retrieve string literals data directly from the chooser (ida_kernwin.get_chooser_data), or by querying the IDB (ida_bytes.get_strlit_contents) keywords: actions see_also: list_strings level: intermediate ## Attributes | [`klasses`](#show_selected_strings.klasses) | | |-----------------------------------------------|----| | [`sw`](#id0) | | | [`sw`](#id0) | | ## Classes | [`show_strings_base_ah_t`](#show_selected_strings.show_strings_base_ah_t) | | |---------------------------------------------------------------------------------------------------------------|----| | [`show_strings_using_get_chooser_data_ah_t`](#show_selected_strings.show_strings_using_get_chooser_data_ah_t) | | | [`show_strings_using_get_strlist_item_ah_t`](#show_selected_strings.show_strings_using_get_strlist_item_ah_t) | | ## Module Contents ### *class* show_selected_strings.show_strings_base_ah_t(use_get_chooser_data) Bases: [`ida_kernwin.action_handler_t`](../ida_kernwin/index.md#ida_kernwin.action_handler_t) #### use_get_chooser_data #### activate(ctx) Activate an action. This function implements the core behavior of an action. It is called when the action is triggered, from a menu, from a popup menu, from the toolbar, or programmatically. * **Returns:** non-zero: all IDA windows will be refreshed #### update(ctx) Update an action. This is called when the context of the UI changed, and we need to let the action update some of its properties if needed (label, icon, …) In addition, this lets IDA know whether the action is enabled, and when it should be queried for availability again. Note: This callback is not meant to change anything in the application’s state, except by calling one (or many) of the “update_action_\*()” functions on this very action. ### *class* show_selected_strings.show_strings_using_get_chooser_data_ah_t Bases: [`show_strings_base_ah_t`](#show_selected_strings.show_strings_base_ah_t) #### ACTION_NAME *= 'test:show_string_using_get_chooser_data'* #### ACTION_LABEL *= 'Show current string(s) using get_chooser_data()'* #### ACTION_SHORTCUT *= 'Ctrl+Shift+S'* ### *class* show_selected_strings.show_strings_using_get_strlist_item_ah_t Bases: [`show_strings_base_ah_t`](#show_selected_strings.show_strings_base_ah_t) #### ACTION_NAME *= 'test:show_string_using_get_strlist_item'* #### ACTION_LABEL *= 'Show current string(s) using get_strlist_item() + get_strlit_contents()'* #### ACTION_SHORTCUT *= 'Ctrl+Shift+K'* ### show_selected_strings.klasses ### show_selected_strings.sw ### show_selected_strings.sw # index.html.md # vds13 summary: generate microcode for the selected range of instructions description: : Generates microcode for selection and dumps it to the output window. level: beginner ## Attributes | [`w`](#vds13.w) | | |-------------------|----| ## Module Contents ### vds13.w # index.html.md # colorize_pseudocode_lines summary: interactively color decompilation lines description: : Provides an action that can be used to dynamically alter the lines background rendering for pseudocode listings (as opposed to using ida_hexrays.cfunc_t.pseudocode[N].bgcolor)
After running this script, pressing ‘M’ on a line in a “Pseudocode-?” widget, will cause that line to be rendered with a special background color. keywords: colors level: intermediate ## Attributes | [`hooks`](#colorize_pseudocode_lines.hooks) | | |-----------------------------------------------------------|----| | [`act_name`](#colorize_pseudocode_lines.act_name) | | | [`act_shortcut`](#colorize_pseudocode_lines.act_shortcut) | | ## Classes | [`pseudo_line_t`](#colorize_pseudocode_lines.pseudo_line_t) | | |-------------------------------------------------------------------------------------------------------|------------------------------------------------------------| | [`pseudocode_lines_rendering_hooks_t`](#colorize_pseudocode_lines.pseudocode_lines_rendering_hooks_t) | | | [`toggle_line_marked_ah_t`](#colorize_pseudocode_lines.toggle_line_marked_ah_t) | We could very well use an ARGB value, but instead let's go | ## Module Contents ### *class* colorize_pseudocode_lines.pseudo_line_t(func_ea, line_nr) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### func_ea #### line_nr ### *class* colorize_pseudocode_lines.pseudocode_lines_rendering_hooks_t Bases: [`ida_kernwin.UI_Hooks`](../ida_kernwin/index.md#ida_kernwin.UI_Hooks) #### marked_lines #### get_lines_rendering_info(out, widget, rin) get lines rendering information * **Parameters:** * **out** – (lines_rendering_output_t ``` * ``` ) * **widget** – (const TWidget ``` * ``` ) * **info** – (const lines_rendering_input_t ``` * ``` ) * **Returns:** void ### *class* colorize_pseudocode_lines.toggle_line_marked_ah_t(hooks) Bases: [`ida_kernwin.action_handler_t`](../ida_kernwin/index.md#ida_kernwin.action_handler_t) We could very well use an ARGB value, but instead let’s go go with a color ‘key’: those can be altered by the user/theme, and therefore have a better chance of being appropriate (or at least expected.) #### COLOR_KEY #### hooks #### activate(ctx) Activate an action. This function implements the core behavior of an action. It is called when the action is triggered, from a menu, from a popup menu, from the toolbar, or programmatically. * **Returns:** non-zero: all IDA windows will be refreshed #### update(ctx) Update an action. This is called when the context of the UI changed, and we need to let the action update some of its properties if needed (label, icon, …) In addition, this lets IDA know whether the action is enabled, and when it should be queried for availability again. Note: This callback is not meant to change anything in the application’s state, except by calling one (or many) of the “update_action_\*()” functions on this very action. ### colorize_pseudocode_lines.hooks ### colorize_pseudocode_lines.act_name *= 'example:colorize_pseudocode_line'* ### colorize_pseudocode_lines.act_shortcut *= 'M'* # index.html.md # ida_fixup Functions that deal with fixup information. A loader should setup fixup information using set_fixup(). ## Attributes | [`FIXUP_OFF8`](#ida_fixup.FIXUP_OFF8) | 8-bit offset | |-------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------| | [`FIXUP_OFF16`](#ida_fixup.FIXUP_OFF16) | 16-bit offset | | [`FIXUP_SEG16`](#ida_fixup.FIXUP_SEG16) | 16-bit base-logical segment base (selector) | | [`FIXUP_PTR16`](#ida_fixup.FIXUP_PTR16) | 32-bit long pointer (16-bit base:16-bit offset) | | [`FIXUP_OFF32`](#ida_fixup.FIXUP_OFF32) | 32-bit offset | | [`FIXUP_PTR32`](#ida_fixup.FIXUP_PTR32) | 48-bit pointer (16-bit base:32-bit offset) | | [`FIXUP_HI8`](#ida_fixup.FIXUP_HI8) | high 8 bits of 16-bit offset | | [`FIXUP_HI16`](#ida_fixup.FIXUP_HI16) | high 16 bits of 32-bit offset | | [`FIXUP_LOW8`](#ida_fixup.FIXUP_LOW8) | low 8 bits of 16-bit offset | | [`FIXUP_LOW16`](#ida_fixup.FIXUP_LOW16) | low 16 bits of 32-bit offset | | [`V695_FIXUP_VHIGH`](#ida_fixup.V695_FIXUP_VHIGH) | obsolete | | [`V695_FIXUP_VLOW`](#ida_fixup.V695_FIXUP_VLOW) | obsolete | | [`FIXUP_OFF64`](#ida_fixup.FIXUP_OFF64) | 64-bit offset | | [`FIXUP_OFF8S`](#ida_fixup.FIXUP_OFF8S) | 8-bit signed offset | | [`FIXUP_OFF16S`](#ida_fixup.FIXUP_OFF16S) | 16-bit signed offset | | [`FIXUP_OFF32S`](#ida_fixup.FIXUP_OFF32S) | 32-bit signed offset | | [`FIXUP_CUSTOM`](#ida_fixup.FIXUP_CUSTOM) | start of the custom types range | | [`FIXUPF_REL`](#ida_fixup.FIXUPF_REL) | fixup is relative to the linear address base. Otherwise fixup is relative to the start of the segment with sel selector. | | [`FIXUPF_EXTDEF`](#ida_fixup.FIXUPF_EXTDEF) | target is a location (otherwise - segment). Use this bit if the target is a symbol rather than an offset from the beginning of a segment. | | [`FIXUPF_UNUSED`](#ida_fixup.FIXUPF_UNUSED) | fixup is ignored by IDA | | [`FIXUPF_CREATED`](#ida_fixup.FIXUPF_CREATED) | fixup was not present in the input file | | [`FIXUPF_LOADER_MASK`](#ida_fixup.FIXUPF_LOADER_MASK) | additional flags. The bits from this mask are not stored in the database and can be used by the loader at its discretion. | ## Classes | [`fixup_data_t`](#ida_fixup.fixup_data_t) | | |---------------------------------------------|----| | [`fixup_info_t`](#ida_fixup.fixup_info_t) | | ## Functions | [`is_fixup_custom`](#ida_fixup.is_fixup_custom)(→ bool) | Is fixup processed by processor module? | |---------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [`get_fixup`](#ida_fixup.get_fixup)(→ bool) | Get fixup information. | | [`exists_fixup`](#ida_fixup.exists_fixup)(→ bool) | Check that a fixup exists at the given address. | | [`set_fixup`](#ida_fixup.set_fixup)(→ None) | Set fixup information. You should fill fixup_data_t and call this function and the kernel will remember information in the database. | | [`del_fixup`](#ida_fixup.del_fixup)(→ None) | Delete fixup information. | | [`get_first_fixup_ea`](#ida_fixup.get_first_fixup_ea)(→ ida_idaapi.ea_t) | | | [`get_next_fixup_ea`](#ida_fixup.get_next_fixup_ea)(→ ida_idaapi.ea_t) | | | [`get_prev_fixup_ea`](#ida_fixup.get_prev_fixup_ea)(→ ida_idaapi.ea_t) | | | [`get_fixup_handler`](#ida_fixup.get_fixup_handler)(→ fixup_handler_t const \*) | Get handler of standard or custom fixup. | | [`get_fixup_value`](#ida_fixup.get_fixup_value)(→ int) | Get the operand value. This function get fixup bytes from data or an instruction at ea and convert them to the operand value (maybe partially). It is opposite in meaning to the patch_fixup_value(). For example, FIXUP_HI8 read a byte at ea and shifts it left by 8 bits, or AArch64's custom fixup BRANCH26 get low 26 bits of the insn at ea and shifts it left by 2 bits. This function is mainly used to get a relocation addend. | | [`patch_fixup_value`](#ida_fixup.patch_fixup_value)(→ bool) | Patch the fixup bytes. This function updates data or an instruction at ea to the fixup bytes. For example, FIXUP_HI8 updates a byte at ea to the high byte of fd->off, or AArch64's custom fixup BRANCH26 updates low 26 bits of the insn at ea to the value of fd->off shifted right by 2. | | [`get_fixup_desc`](#ida_fixup.get_fixup_desc)(→ Union[str, None]) | Get FIXUP description comment. | | [`calc_fixup_size`](#ida_fixup.calc_fixup_size)(→ int) | Calculate size of fixup in bytes (the number of bytes the fixup patches) | | [`find_custom_fixup`](#ida_fixup.find_custom_fixup)(→ fixup_type_t) | | | [`get_fixups`](#ida_fixup.get_fixups)(→ bool) | | | [`contains_fixups`](#ida_fixup.contains_fixups)(→ bool) | Does the specified address range contain any fixup information? | | [`gen_fix_fixups`](#ida_fixup.gen_fix_fixups)(→ None) | Relocate the bytes with fixup information once more (generic function). This function may be called from loader_t::move_segm() if it suits the goal. If loader_t::move_segm is not defined then this function will be called automatically when moving segments or rebasing the entire program. Special parameter values (from = BADADDR, size = 0, to = delta) are used when the function is called from rebase_program(delta). | | [`handle_fixups_in_macro`](#ida_fixup.handle_fixups_in_macro)(→ bool) | Handle two fixups in a macro. We often combine two instruction that load parts of a value into one macro instruction. For example: | ## Module Contents ### ida_fixup.FIXUP_OFF8 8-bit offset ### ida_fixup.FIXUP_OFF16 16-bit offset ### ida_fixup.FIXUP_SEG16 16-bit base-logical segment base (selector) ### ida_fixup.FIXUP_PTR16 32-bit long pointer (16-bit base:16-bit offset) ### ida_fixup.FIXUP_OFF32 32-bit offset ### ida_fixup.FIXUP_PTR32 48-bit pointer (16-bit base:32-bit offset) ### ida_fixup.FIXUP_HI8 high 8 bits of 16-bit offset ### ida_fixup.FIXUP_HI16 high 16 bits of 32-bit offset ### ida_fixup.FIXUP_LOW8 low 8 bits of 16-bit offset ### ida_fixup.FIXUP_LOW16 low 16 bits of 32-bit offset ### ida_fixup.V695_FIXUP_VHIGH obsolete ### ida_fixup.V695_FIXUP_VLOW obsolete ### ida_fixup.FIXUP_OFF64 64-bit offset ### ida_fixup.FIXUP_OFF8S 8-bit signed offset ### ida_fixup.FIXUP_OFF16S 16-bit signed offset ### ida_fixup.FIXUP_OFF32S 32-bit signed offset ### ida_fixup.FIXUP_CUSTOM start of the custom types range ### ida_fixup.is_fixup_custom(type: fixup_type_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Is fixup processed by processor module? ### ida_fixup.FIXUPF_REL fixup is relative to the linear address base. Otherwise fixup is relative to the start of the segment with sel selector. ### ida_fixup.FIXUPF_EXTDEF target is a location (otherwise - segment). Use this bit if the target is a symbol rather than an offset from the beginning of a segment. ### ida_fixup.FIXUPF_UNUSED fixup is ignored by IDA \* disallows the kernel to convert operands \* this fixup is not used during output ### ida_fixup.FIXUPF_CREATED fixup was not present in the input file ### ida_fixup.FIXUPF_LOADER_MASK additional flags. The bits from this mask are not stored in the database and can be used by the loader at its discretion. ### *class* ida_fixup.fixup_data_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### sel *: sel_t* selector of the target segment. BADSEL means an absolute (zero based) target. #### off *: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)* target offset #### displacement *: adiff_t* displacement (offset from the target) #### get_type() → fixup_type_t Fixup type Types of fixups. #### set_type(type_: fixup_type_t) → [None](https://docs.python.org/3/library/constants.html#None) #### set_type_and_flags(type_: fixup_type_t, flags_: [int](https://docs.python.org/3/library/functions.html#int) = 0) → [None](https://docs.python.org/3/library/constants.html#None) #### is_custom() → [bool](https://docs.python.org/3/library/functions.html#bool) is_fixup_custom() #### get_flags() → [int](https://docs.python.org/3/library/functions.html#int) Fixup flags Fixup flags. #### is_extdef() → [bool](https://docs.python.org/3/library/functions.html#bool) #### set_extdef() → [None](https://docs.python.org/3/library/constants.html#None) #### clr_extdef() → [None](https://docs.python.org/3/library/constants.html#None) #### is_unused() → [bool](https://docs.python.org/3/library/functions.html#bool) #### set_unused() → [None](https://docs.python.org/3/library/constants.html#None) #### clr_unused() → [None](https://docs.python.org/3/library/constants.html#None) #### has_base() → [bool](https://docs.python.org/3/library/functions.html#bool) Is fixup relative? #### was_created() → [bool](https://docs.python.org/3/library/functions.html#bool) Is fixup artificial? #### get_base() → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) Get base of fixup. #### set_base(new_base: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) Set base of fixup. The target should be set before a call of this function. #### set_sel(\*args) → [None](https://docs.python.org/3/library/constants.html#None) This function has the following signatures: > 1. set_sel(_sel: sel_t) -> None > 2. set_sel(seg: const segment_t > ``` > * > ``` > ) -> DEPRECATED void # 0: set_sel(_sel: sel_t) -> None # 1: set_sel(seg: const segment_t ``` * ``` ) -> DEPRECATED void #### set_target_sel() → [None](https://docs.python.org/3/library/constants.html#None) Set selector of fixup to the target. The target should be set before a call of this function. #### set(source: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) set_fixup() #### get(source: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) get_fixup() #### get_handler() → fixup_handler_t const \* get_fixup_handler() #### get_desc(source: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None) get_fixup_desc() #### calc_size() → [int](https://docs.python.org/3/library/functions.html#int) calc_fixup_size() #### get_value(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [int](https://docs.python.org/3/library/functions.html#int) get_fixup_value() #### patch_value(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) patch_fixup_value() ### ida_fixup.get_fixup(fd: [fixup_data_t](#ida_fixup.fixup_data_t), source: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Get fixup information. ### ida_fixup.exists_fixup(source: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Check that a fixup exists at the given address. ### ida_fixup.set_fixup(source: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), fd: [fixup_data_t](#ida_fixup.fixup_data_t)) → [None](https://docs.python.org/3/library/constants.html#None) Set fixup information. You should fill fixup_data_t and call this function and the kernel will remember information in the database. * **Parameters:** * **source** – the fixup source address, i.e. the address modified by the fixup * **fd** – fixup data ### ida_fixup.del_fixup(source: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) Delete fixup information. ### ida_fixup.get_first_fixup_ea() → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) ### ida_fixup.get_next_fixup_ea(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) ### ida_fixup.get_prev_fixup_ea(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) ### ida_fixup.get_fixup_handler(type: fixup_type_t) → fixup_handler_t const \* Get handler of standard or custom fixup. ### ida_fixup.get_fixup_value(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), type: fixup_type_t) → [int](https://docs.python.org/3/library/functions.html#int) Get the operand value. This function get fixup bytes from data or an instruction at ea and convert them to the operand value (maybe partially). It is opposite in meaning to the patch_fixup_value(). For example, FIXUP_HI8 read a byte at ea and shifts it left by 8 bits, or AArch64’s custom fixup BRANCH26 get low 26 bits of the insn at ea and shifts it left by 2 bits. This function is mainly used to get a relocation addend. * **Parameters:** * **ea** – address to get fixup bytes from, the size of the fixup bytes depends on the fixup type. * **type** – fixup type * **Returns:** operand: value ### ida_fixup.patch_fixup_value(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), fd: [fixup_data_t](#ida_fixup.fixup_data_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Patch the fixup bytes. This function updates data or an instruction at ea to the fixup bytes. For example, FIXUP_HI8 updates a byte at ea to the high byte of fd->off, or AArch64’s custom fixup BRANCH26 updates low 26 bits of the insn at ea to the value of fd->off shifted right by 2. * **Parameters:** * **ea** – address where data are changed, the size of the changed data depends on the fixup type. * **fd** – fixup data * **Returns:** false: the fixup bytes do not fit (e.g. fd->off is greater than 0xFFFFFFC for BRANCH26). The database is changed even in this case. ### ida_fixup.get_fixup_desc(source: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), fd: [fixup_data_t](#ida_fixup.fixup_data_t)) → [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None) Get FIXUP description comment. ### ida_fixup.calc_fixup_size(type: fixup_type_t) → [int](https://docs.python.org/3/library/functions.html#int) Calculate size of fixup in bytes (the number of bytes the fixup patches) * **Returns:** -1: means error ### ida_fixup.find_custom_fixup(name: [str](https://docs.python.org/3/library/stdtypes.html#str)) → fixup_type_t ### *class* ida_fixup.fixup_info_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### ea *: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)* #### fd *: [fixup_data_t](#ida_fixup.fixup_data_t)* ### ida_fixup.get_fixups(out: fixups_t \*, ea: ida_idaapi.ea_t, size: asize_t) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_fixup.contains_fixups(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), size: asize_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Does the specified address range contain any fixup information? ### ida_fixup.gen_fix_fixups(\_from: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), to: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), size: asize_t) → [None](https://docs.python.org/3/library/constants.html#None) Relocate the bytes with fixup information once more (generic function). This function may be called from loader_t::move_segm() if it suits the goal. If loader_t::move_segm is not defined then this function will be called automatically when moving segments or rebasing the entire program. Special parameter values (from = BADADDR, size = 0, to = delta) are used when the function is called from rebase_program(delta). ### ida_fixup.handle_fixups_in_macro(ri: [refinfo_t](../ida_nalt/index.md#ida_nalt.refinfo_t), ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), other: fixup_type_t, macro_reft_and_flags: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) Handle two fixups in a macro. We often combine two instruction that load parts of a value into one macro instruction. For example: : > ADRP X0, [#var@PAGE](mailto:#var@PAGE) > : ADD X0, X0, [#var@PAGEOFF](mailto:#var@PAGEOFF) –> ADRL X0, var
lui $v0, %hi(var) : addiu $v0, $v0, %lo(var) –> la $v0, var * **Returns:** success (‘false’ means that RI was not changed) # index.html.md # inject_command summary: inject commands in the “Output” window description: : This example illustrates how one can execute commands in the “Output” window, from their own widgets.
A few notes:
* the original, underlying cli:Execute action, that has to be triggered for the code present in the input field to execute and be placed in the history, requires that the input field has focus (otherwise it simply won’t do anything.) * this, in turn, forces us to do “delayed” execution of that action, hence the need for a QTimer * the IDA/SWiG ‘TWidget’ type that we retrieve through ida_kernwin.find_widget, is not the same type as a QtWidgets.QWidget. We therefore need to convert it using ida_kernwin.PluginForm.TWidgetToPyQtWidget level: advanced ## Attributes | [`delayed_exec_timer`](#inject_command.delayed_exec_timer) | | |--------------------------------------------------------------|----| ## Functions | [`show_dialog`](#inject_command.show_dialog)() | | |--------------------------------------------------|----| ## Module Contents ### inject_command.delayed_exec_timer ### inject_command.show_dialog() # index.html.md # ida_netnode Functions that provide the lowest level public interface to the database. Namely, we use Btree. To learn more about BTree: [[https://en.wikipedia.org/wiki/B-tree](https://en.wikipedia.org/wiki/B-tree](https://en.wikipedia.org/wiki/B-tree](https://en.wikipedia.org/wiki/B-tree)) We do not use Btree directly. Instead, we have another layer built on the top of Btree. Here is a brief explanation of this layer. An object called “netnode” is modeled on the top of Btree. Each netnode has a unique id: a 32-bit value (64-bit for ida64). Initially there is a trivial mapping of the linear addresses used in the program to netnodes (later this mapping may be modified using ea2node and node2ea functions; this is used for fast database rebasings). If we have additional information about an address (for example, a comment is attached to it), this information is stored in the corresponding netnode. See nalt.hpp to see how the kernel uses netnodes. Also, some netnodes have no corresponding linear address (however, they still have an id). They are used to store information not related to a particular address. Each netnode \_may_ have the following attributes: * a name: an arbitrary non-empty string, up to 255KB-1 bytes * a value: arbitrary sized object, max size is MAXSPECSIZE * altvals: a sparse array of 32-bit values. indexes in this array may be 8-bit or 32-bit values * supvals: an array of arbitrary sized objects. (size of each object is limited by MAXSPECSIZE) indexes in this array may be 8-bit or 32-bit values * charvals: a sparse array of 8-bit values. indexes in this array may be 8-bit or 32-bit values * hashvals: a hash (an associative array). indexes in this array are strings values are arbitrary sized (max size is MAXSPECSIZE) Initially a new netnode contains no information at all so no disk space is used for it. As you add new information, the netnode grows. All arrays that are attached to the netnode behave in the same manner. Initially: \* all members of altvals/charvals array are zeroes \* all members of supvals/hashvals array are undefined If you need to store objects bigger that MAXSPECSIZE, please note that there are high-level functions to store arbitrary sized objects in supvals. See setblob/getblob and other blob-related functions. You may use netnodes to store additional information about the program. Limitations on the use of netnodes are the following: * use netnodes only if you could not find a kernel service to store your type of information * do not create netnodes with valid identifier names. Use the “$ “ prefix (or any other prefix with characters not allowed in the identifiers for the names of your netnodes. Although you will probably not destroy anything by accident, using already defined names for the names of your netnodes is still discouraged. * you may create as many netnodes as you want (creation of an unnamed netnode does not increase the size of the database). however, since each netnode has a number, creating too many netnodes could lead to the exhaustion of the netnode numbers (the numbering starts at 0xFF000000) * remember that netnodes are automatically saved to the disk by the kernel. Advanced info: In fact a netnode may contain up to 256 arrays of arbitrary sized objects (not only the 4 listed above). Each array has an 8-bit tag. Usually tags are represented by character constants. For example, altvals and supvals are simply 2 of 256 arrays, with the tags ‘A’ and ‘S’ respectively. ## Attributes | [`BADNODE`](#ida_netnode.BADNODE) | A number to represent a bad netnode reference. | |-------------------------------------------------------|------------------------------------------------------------------------| | [`SIZEOF_nodeidx_t`](#ida_netnode.SIZEOF_nodeidx_t) | | | [`cvar`](#ida_netnode.cvar) | | | [`MAXNAMESIZE`](#ida_netnode.MAXNAMESIZE) | Maximum length of a netnode name. WILL BE REMOVED IN THE FUTURE. | | [`MAX_NODENAME_SIZE`](#ida_netnode.MAX_NODENAME_SIZE) | Maximum length of a name. We permit names up to 32KB-1 bytes. | | [`MAXSPECSIZE`](#ida_netnode.MAXSPECSIZE) | Maximum length of strings or objects stored in a supval array element. | | [`atag`](#ida_netnode.atag) | Array of altvals. | | [`stag`](#ida_netnode.stag) | Array of supvals. | | [`htag`](#ida_netnode.htag) | Array of hashvals. | | [`vtag`](#ida_netnode.vtag) | Value of netnode. | | [`ntag`](#ida_netnode.ntag) | Name of netnode. | | [`ltag`](#ida_netnode.ltag) | Links between netnodes. | | [`NETMAP_IDX`](#ida_netnode.NETMAP_IDX) | | | [`NETMAP_VAL`](#ida_netnode.NETMAP_VAL) | | | [`NETMAP_STR`](#ida_netnode.NETMAP_STR) | | | [`NETMAP_X8`](#ida_netnode.NETMAP_X8) | | | [`NETMAP_V8`](#ida_netnode.NETMAP_V8) | | | [`NETMAP_VAL_NDX`](#ida_netnode.NETMAP_VAL_NDX) | | | [`netnode_exist`](#ida_netnode.netnode_exist) | | ## Classes | [`netnode`](#ida_netnode.netnode) | | |-------------------------------------|----| ## Functions | [`exist`](#ida_netnode.exist)(→ bool) | | |-----------------------------------------|----| ## Module Contents ### ida_netnode.BADNODE A number to represent a bad netnode reference. ### ida_netnode.SIZEOF_nodeidx_t ### *class* ida_netnode.netnode(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### *static* exist(\_name: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [bool](https://docs.python.org/3/library/functions.html#bool) Does the netnode with the specified name exist? #### create(\*args) → [bool](https://docs.python.org/3/library/functions.html#bool) #### kill() → [None](https://docs.python.org/3/library/constants.html#None) #### get_name() → [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None) #### rename(newname: [str](https://docs.python.org/3/library/stdtypes.html#str), namlen: [int](https://docs.python.org/3/library/functions.html#int) = 0) → [bool](https://docs.python.org/3/library/functions.html#bool) #### valobj(\*args) → [bytes](https://docs.python.org/3/library/stdtypes.html#bytes) | [None](https://docs.python.org/3/library/constants.html#None) #### valstr() → [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None) #### set(value: void const \*) → [bool](https://docs.python.org/3/library/functions.html#bool) #### delvalue() → [bool](https://docs.python.org/3/library/functions.html#bool) #### set_long(x: nodeidx_t) → [bool](https://docs.python.org/3/library/functions.html#bool) #### value_exists() → [bool](https://docs.python.org/3/library/functions.html#bool) #### long_value() → nodeidx_t #### altval(\*args) → nodeidx_t #### altval_ea(\*args) → nodeidx_t #### altset(\*args) → [bool](https://docs.python.org/3/library/functions.html#bool) #### altset_ea(\*args) → [bool](https://docs.python.org/3/library/functions.html#bool) #### altdel_ea(\*args) → [bool](https://docs.python.org/3/library/functions.html#bool) #### easet(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), addr: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), tag: uchar) → [bool](https://docs.python.org/3/library/functions.html#bool) #### eaget(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), tag: uchar) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) #### eadel(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), tag: uchar) → [bool](https://docs.python.org/3/library/functions.html#bool) #### easet_idx(idx: nodeidx_t, addr: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), tag: uchar) → [bool](https://docs.python.org/3/library/functions.html#bool) #### eaget_idx(idx: nodeidx_t, tag: uchar) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) #### easet_idx8(idx: uchar, addr: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), tag: uchar) → [bool](https://docs.python.org/3/library/functions.html#bool) #### eaget_idx8(idx: uchar, tag: uchar) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) #### eadel_idx8(idx: uchar, tag: uchar) → [bool](https://docs.python.org/3/library/functions.html#bool) #### altfirst(\*args) → nodeidx_t #### altnext(\*args) → nodeidx_t #### altlast(\*args) → nodeidx_t #### altprev(\*args) → nodeidx_t #### altshift(\*args) → [int](https://docs.python.org/3/library/functions.html#int) #### charval(alt: nodeidx_t, tag: uchar) → uchar #### charset(alt: nodeidx_t, val: uchar, tag: uchar) → [bool](https://docs.python.org/3/library/functions.html#bool) #### chardel(alt: nodeidx_t, tag: uchar) → [bool](https://docs.python.org/3/library/functions.html#bool) #### charval_ea(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), tag: uchar) → uchar #### charset_ea(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), val: uchar, tag: uchar) → [bool](https://docs.python.org/3/library/functions.html#bool) #### chardel_ea(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), tag: uchar) → [bool](https://docs.python.org/3/library/functions.html#bool) #### charfirst(tag: uchar) → nodeidx_t #### charnext(cur: nodeidx_t, tag: uchar) → nodeidx_t #### charlast(tag: uchar) → nodeidx_t #### charprev(cur: nodeidx_t, tag: uchar) → nodeidx_t #### charshift(\_from: nodeidx_t, to: nodeidx_t, size: nodeidx_t, tag: uchar) → [int](https://docs.python.org/3/library/functions.html#int) #### altval_idx8(alt: uchar, tag: uchar) → nodeidx_t #### altset_idx8(alt: uchar, val: nodeidx_t, tag: uchar) → [bool](https://docs.python.org/3/library/functions.html#bool) #### altdel_idx8(alt: uchar, tag: uchar) → [bool](https://docs.python.org/3/library/functions.html#bool) #### altfirst_idx8(tag: uchar) → nodeidx_t #### altnext_idx8(cur: uchar, tag: uchar) → nodeidx_t #### altlast_idx8(tag: uchar) → nodeidx_t #### altprev_idx8(cur: uchar, tag: uchar) → nodeidx_t #### charval_idx8(alt: uchar, tag: uchar) → uchar #### charset_idx8(alt: uchar, val: uchar, tag: uchar) → [bool](https://docs.python.org/3/library/functions.html#bool) #### chardel_idx8(alt: uchar, tag: uchar) → [bool](https://docs.python.org/3/library/functions.html#bool) #### charfirst_idx8(tag: uchar) → nodeidx_t #### charnext_idx8(cur: uchar, tag: uchar) → nodeidx_t #### charlast_idx8(tag: uchar) → nodeidx_t #### charprev_idx8(cur: uchar, tag: uchar) → nodeidx_t #### altdel(\*args) → [bool](https://docs.python.org/3/library/functions.html#bool) #### altdel_all(\*args) → [bool](https://docs.python.org/3/library/functions.html#bool) #### supval(\*args) → ssize_t #### supval_ea(\*args) → ssize_t #### supstr(\*args) → ssize_t #### supstr_ea(\*args) → ssize_t #### supdel_ea(\*args) → [bool](https://docs.python.org/3/library/functions.html#bool) #### lower_bound(\*args) → nodeidx_t #### lower_bound_ea(\*args) → nodeidx_t #### supfirst(\*args) → nodeidx_t #### supnext(\*args) → nodeidx_t #### suplast(\*args) → nodeidx_t #### supprev(\*args) → nodeidx_t #### supshift(\*args) → [int](https://docs.python.org/3/library/functions.html#int) #### supval_idx8(\*args) → [bytes](https://docs.python.org/3/library/stdtypes.html#bytes) | [None](https://docs.python.org/3/library/constants.html#None) #### supstr_idx8(alt: uchar, tag: uchar) → [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None) #### supset_idx8(alt: uchar, value: void const \*, tag: uchar) → [bool](https://docs.python.org/3/library/functions.html#bool) #### supdel_idx8(alt: uchar, tag: uchar) → [bool](https://docs.python.org/3/library/functions.html#bool) #### lower_bound_idx8(alt: uchar, tag: uchar) → nodeidx_t #### supfirst_idx8(tag: uchar) → nodeidx_t #### supnext_idx8(alt: uchar, tag: uchar) → nodeidx_t #### suplast_idx8(tag: uchar) → nodeidx_t #### supprev_idx8(alt: uchar, tag: uchar) → nodeidx_t #### supdel(\*args) → [bool](https://docs.python.org/3/library/functions.html#bool) #### supdel_all(tag: uchar) → [bool](https://docs.python.org/3/library/functions.html#bool) #### supdel_range(idx1: nodeidx_t, idx2: nodeidx_t, tag: uchar) → [int](https://docs.python.org/3/library/functions.html#int) #### supdel_range_idx8(idx1: uchar, idx2: uchar, tag: uchar) → [int](https://docs.python.org/3/library/functions.html#int) #### hashval(\*args) → ssize_t #### hashstr(\*args) → ssize_t #### hashval_long(\*args) → nodeidx_t #### hashset(\*args) → [bool](https://docs.python.org/3/library/functions.html#bool) #### hashset_idx(\*args) → [bool](https://docs.python.org/3/library/functions.html#bool) #### hashdel(\*args) → [bool](https://docs.python.org/3/library/functions.html#bool) #### hashfirst(\*args) → ssize_t #### hashnext(\*args) → ssize_t #### hashlast(\*args) → ssize_t #### hashprev(\*args) → ssize_t #### hashdel_all(\*args) → [bool](https://docs.python.org/3/library/functions.html#bool) #### blobsize(\_start: nodeidx_t, tag: uchar) → [int](https://docs.python.org/3/library/functions.html#int) #### blobsize_ea(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), tag: uchar) → [int](https://docs.python.org/3/library/functions.html#int) #### setblob(buf: void const \*, \_start: nodeidx_t, tag: uchar) → [bool](https://docs.python.org/3/library/functions.html#bool) #### setblob_ea(buf: void const \*, ea: ida_idaapi.ea_t, tag: uchar) → [bool](https://docs.python.org/3/library/functions.html#bool) #### delblob(\_start: nodeidx_t, tag: uchar) → [int](https://docs.python.org/3/library/functions.html#int) #### delblob_ea(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), tag: uchar) → [int](https://docs.python.org/3/library/functions.html#int) #### blobshift(\_from: nodeidx_t, to: nodeidx_t, size: nodeidx_t, tag: uchar) → [int](https://docs.python.org/3/library/functions.html#int) #### start() → [bool](https://docs.python.org/3/library/functions.html#bool) #### end() → [bool](https://docs.python.org/3/library/functions.html#bool) #### next() → [bool](https://docs.python.org/3/library/functions.html#bool) #### prev() → [bool](https://docs.python.org/3/library/functions.html#bool) #### copyto(destnode: [netnode](#ida_netnode.netnode), count: nodeidx_t = 1) → [int](https://docs.python.org/3/library/functions.html#int) #### moveto(destnode: [netnode](#ida_netnode.netnode), count: nodeidx_t = 1) → [int](https://docs.python.org/3/library/functions.html#int) #### index() → nodeidx_t #### getblob(start, tag) → [bytes](https://docs.python.org/3/library/stdtypes.html#bytes) | [None](https://docs.python.org/3/library/constants.html#None) Get a blob from a netnode. * **Parameters:** * **start** – the index where the blob starts (it may span on multiple indexes) * **tag** – the netnode tag * **Returns:** a blob, or None #### getclob(start, tag) → [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None) Get a large amount of text from a netnode. * **Parameters:** * **start** – the index where the clob starts (it may span on multiple indexes) * **tag** – the netnode tag * **Returns:** a clob, or None #### getblob_ea(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), tag: char) → PyObject \* #### hashstr_buf(\*args) → PyObject \* #### hashset_buf(\*args) → [bool](https://docs.python.org/3/library/functions.html#bool) #### supset(\*args) → [bool](https://docs.python.org/3/library/functions.html#bool) #### supset_ea(\*args) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_netnode.cvar ### ida_netnode.MAXNAMESIZE Maximum length of a netnode name. WILL BE REMOVED IN THE FUTURE. ### ida_netnode.MAX_NODENAME_SIZE Maximum length of a name. We permit names up to 32KB-1 bytes. ### ida_netnode.MAXSPECSIZE Maximum length of strings or objects stored in a supval array element. ### ida_netnode.atag Array of altvals. ### ida_netnode.stag Array of supvals. ### ida_netnode.htag Array of hashvals. ### ida_netnode.vtag Value of netnode. ### ida_netnode.ntag Name of netnode. ### ida_netnode.ltag Links between netnodes. ### ida_netnode.NETMAP_IDX ### ida_netnode.NETMAP_VAL ### ida_netnode.NETMAP_STR ### ida_netnode.NETMAP_X8 ### ida_netnode.NETMAP_V8 ### ida_netnode.NETMAP_VAL_NDX ### ida_netnode.exist(n: [netnode](#ida_netnode.netnode)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_netnode.netnode_exist # index.html.md # choose_with_checkboxes summary: a flat list, with checkboxes description: : Shows how to subclass the ida_kernwin.Choose class to show data organized in a simple table, and react to “checked state” events. keywords: chooser, actions see_also: choose_multi level: intermediate ## Attributes | [`groceries`](#choose_with_checkboxes.groceries) | | |----------------------------------------------------|----| ## Classes | [`grocery_list_chooser_t`](#choose_with_checkboxes.grocery_list_chooser_t) | Chooser wrapper class. | |------------------------------------------------------------------------------|--------------------------| ## Module Contents ### *class* choose_with_checkboxes.grocery_list_chooser_t(title, flags=0, modal=False) Bases: [`ida_kernwin.Choose`](../ida_kernwin/index.md#ida_kernwin.Choose) Chooser wrapper class. Some constants are defined in this class. Please refer to kernwin.hpp for more information. #### n *= 0* #### items *= [['Onions', '6'], ['Waffles', '3']]* #### excluded #### modal *= False* #### OnGetSize() Get the number of elements in the chooser. This callback is mandatory * **Returns:** the number of elements #### OnGetLine(n) Get data for an element This callback is mandatory * **Parameters:** **n** – the index to fetch data for * **Returns:** a list of strings #### OnGetLineAttr(n) Get attributes for an element * **Parameters:** **n** – index of the element * **Returns:** a tuple (color, flags) #### OnInsertLine(n) User asked to insert an element * **Parameters:** **sel** – the current selection * **Returns:** a tuple (changed, selection) #### OnDeleteLine(n) User deleted an element * **Parameters:** **sel** – the current selection * **Returns:** a tuple (changed, selection) #### OnCheckedLine(n, state) User changed the checkbox state * **Parameters:** * **n** – element number (0-based) * **state** – the new state: 0-unchecked, 1-partially checked, 2-checked * **Returns:** a tuple (changed, selection) #### show() ### choose_with_checkboxes.groceries # index.html.md # vds12 summary: list instruction registers description: : Shows a list of direct references to a register from the current instruction. level: advanced ## Attributes | [`ea`](#vds12.ea) | | |---------------------|----| ## Classes | [`xref_chooser_t`](#vds12.xref_chooser_t) | Chooser wrapper class. | |---------------------------------------------|--------------------------| ## Functions | [`collect_block_xrefs`](#vds12.collect_block_xrefs)(out, mlist, blk, ins, find_uses) | | |----------------------------------------------------------------------------------------|----| | [`collect_xrefs`](#vds12.collect_xrefs)(out, ctx, mop, mlist, du, find_uses) | | | [`show_xrefs`](#vds12.show_xrefs)(ea, gco, xrefs, ndefs) | | ## Module Contents ### vds12.collect_block_xrefs(out, mlist, blk, ins, find_uses) ### vds12.collect_xrefs(out, ctx, mop, mlist, du, find_uses) ### *class* vds12.xref_chooser_t(xrefs, t, n, ea, gco) Bases: [`ida_kernwin.Choose`](../ida_kernwin/index.md#ida_kernwin.Choose) Chooser wrapper class. Some constants are defined in this class. Please refer to kernwin.hpp for more information. #### xrefs #### ndefs #### curr_ea #### gco #### items #### OnGetSize() Get the number of elements in the chooser. This callback is mandatory * **Returns:** the number of elements #### OnGetLine(n) Get data for an element This callback is mandatory * **Parameters:** **n** – the index to fetch data for * **Returns:** a list of strings ### vds12.show_xrefs(ea, gco, xrefs, ndefs) ### vds12.ea # index.html.md # ida_idp Contains definition of the interface to IDP modules. The interface consists of two structures: \* definition of target assembler: ::ash \* definition of current processor: ::ph These structures contain information about target processor and assembler features. It also defines two groups of kernel events: \* processor_t::event_t processor related events \* idb_event:event_code_t database related events The processor related events are used to communicate with the processor module. The database related events are used to inform any interested parties, like plugins or processor modules, about the changes in the database. ## Attributes | [`IDP_INTERFACE_VERSION`](#ida_idp.IDP_INTERFACE_VERSION) | The interface version number. | |-----------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [`CF_STOP`](#ida_idp.CF_STOP) | Instruction doesn't pass execution to the next instruction | | [`CF_CALL`](#ida_idp.CF_CALL) | CALL instruction (should make a procedure here). | | [`CF_CHG1`](#ida_idp.CF_CHG1) | The instruction modifies the first operand. | | [`CF_CHG2`](#ida_idp.CF_CHG2) | The instruction modifies the second operand. | | [`CF_CHG3`](#ida_idp.CF_CHG3) | The instruction modifies the third operand. | | [`CF_CHG4`](#ida_idp.CF_CHG4) | The instruction modifies the fourth operand. | | [`CF_CHG5`](#ida_idp.CF_CHG5) | The instruction modifies the fifth operand. | | [`CF_CHG6`](#ida_idp.CF_CHG6) | The instruction modifies the sixth operand. | | [`CF_USE1`](#ida_idp.CF_USE1) | The instruction uses value of the first operand. | | [`CF_USE2`](#ida_idp.CF_USE2) | The instruction uses value of the second operand. | | [`CF_USE3`](#ida_idp.CF_USE3) | The instruction uses value of the third operand. | | [`CF_USE4`](#ida_idp.CF_USE4) | The instruction uses value of the fourth operand. | | [`CF_USE5`](#ida_idp.CF_USE5) | The instruction uses value of the fifth operand. | | [`CF_USE6`](#ida_idp.CF_USE6) | The instruction uses value of the sixth operand. | | [`CF_JUMP`](#ida_idp.CF_JUMP) | The instruction passes execution using indirect jump or call (thus needs additional analysis) | | [`CF_SHFT`](#ida_idp.CF_SHFT) | Bit-shift instruction (shl,shr...). | | [`CF_HLL`](#ida_idp.CF_HLL) | Instruction may be present in a high level language function | | [`CF_CHG7`](#ida_idp.CF_CHG7) | The instruction modifies the seventh operand. | | [`CF_CHG8`](#ida_idp.CF_CHG8) | The instruction modifies the eighth operand. | | [`CF_USE7`](#ida_idp.CF_USE7) | The instruction uses value of the seventh operand. | | [`CF_USE8`](#ida_idp.CF_USE8) | The instruction uses value of the eighth operand | | [`IRI_EXTENDED`](#ida_idp.IRI_EXTENDED) | Is the instruction a "return"? | | [`IRI_RET_LITERALLY`](#ida_idp.IRI_RET_LITERALLY) | report only 'ret' instructions | | [`IRI_SKIP_RETTARGET`](#ida_idp.IRI_SKIP_RETTARGET) | exclude 'ret' instructions that have special targets (see set_ret_target in PC) | | [`IRI_STRICT`](#ida_idp.IRI_STRICT) | | | [`AS_OFFST`](#ida_idp.AS_OFFST) | offsets are 'offset xxx' ? | | [`AS_COLON`](#ida_idp.AS_COLON) | create colons after data names ? | | [`AS_UDATA`](#ida_idp.AS_UDATA) | can use '?' in data directives | | [`AS_2CHRE`](#ida_idp.AS_2CHRE) | double char constants are: "xy | | [`AS_NCHRE`](#ida_idp.AS_NCHRE) | char constants are: 'x | | [`AS_N2CHR`](#ida_idp.AS_N2CHR) | can't have 2 byte char consts | | [`AS_1TEXT`](#ida_idp.AS_1TEXT) | 1 text per line, no bytes | | [`AS_NHIAS`](#ida_idp.AS_NHIAS) | no characters with high bit | | [`AS_NCMAS`](#ida_idp.AS_NCMAS) | no commas in ascii directives | | [`AS_HEXFM`](#ida_idp.AS_HEXFM) | mask - hex number format | | [`ASH_HEXF0`](#ida_idp.ASH_HEXF0) | 34h | | [`ASH_HEXF1`](#ida_idp.ASH_HEXF1) | h'34 | | [`ASH_HEXF2`](#ida_idp.ASH_HEXF2) | 34 | | [`ASH_HEXF3`](#ida_idp.ASH_HEXF3) | 0x34 | | [`ASH_HEXF4`](#ida_idp.ASH_HEXF4) | $34 | | [`ASH_HEXF5`](#ida_idp.ASH_HEXF5) | <^R > (radix) | | [`AS_DECFM`](#ida_idp.AS_DECFM) | mask - decimal number format | | [`ASD_DECF0`](#ida_idp.ASD_DECF0) | 34 | | [`ASD_DECF1`](#ida_idp.ASD_DECF1) | #34 | | [`ASD_DECF2`](#ida_idp.ASD_DECF2) | | | [`ASD_DECF3`](#ida_idp.ASD_DECF3) | .34 | | [`AS_OCTFM`](#ida_idp.AS_OCTFM) | mask - octal number format | | [`ASO_OCTF0`](#ida_idp.ASO_OCTF0) | 123o | | [`ASO_OCTF1`](#ida_idp.ASO_OCTF1) | 0123 | | [`ASO_OCTF2`](#ida_idp.ASO_OCTF2) | 123 | | [`ASO_OCTF3`](#ida_idp.ASO_OCTF3) | @123 | | [`ASO_OCTF4`](#ida_idp.ASO_OCTF4) | o'123 | | [`ASO_OCTF5`](#ida_idp.ASO_OCTF5) | 123q | | [`ASO_OCTF6`](#ida_idp.ASO_OCTF6) | ~123 | | [`ASO_OCTF7`](#ida_idp.ASO_OCTF7) | q'123 | | [`AS_BINFM`](#ida_idp.AS_BINFM) | mask - binary number format | | [`ASB_BINF0`](#ida_idp.ASB_BINF0) | 010101b | | [`ASB_BINF1`](#ida_idp.ASB_BINF1) | ^B010101 | | [`ASB_BINF2`](#ida_idp.ASB_BINF2) | %010101 | | [`ASB_BINF3`](#ida_idp.ASB_BINF3) | 0b1010101 | | [`ASB_BINF4`](#ida_idp.ASB_BINF4) | b'1010101 | | [`ASB_BINF5`](#ida_idp.ASB_BINF5) | b'1010101' | | [`AS_UNEQU`](#ida_idp.AS_UNEQU) | replace undefined data items with EQU (for ANTA's A80) | | [`AS_ONEDUP`](#ida_idp.AS_ONEDUP) | One array definition per line. | | [`AS_NOXRF`](#ida_idp.AS_NOXRF) | Disable xrefs during the output file generation. | | [`AS_XTRNTYPE`](#ida_idp.AS_XTRNTYPE) | Assembler understands type of extern symbols as ":type" suffix. | | [`AS_RELSUP`](#ida_idp.AS_RELSUP) | Checkarg: 'and','or','xor' operations with addresses are possible. | | [`AS_LALIGN`](#ida_idp.AS_LALIGN) | Labels at "align" keyword are supported. | | [`AS_NOCODECLN`](#ida_idp.AS_NOCODECLN) | don't create colons after code names | | [`AS_NOSPACE`](#ida_idp.AS_NOSPACE) | No spaces in expressions. | | [`AS_ALIGN2`](#ida_idp.AS_ALIGN2) | .align directive expects an exponent rather than a power of 2 (.align 5 means to align at 32byte boundary) | | [`AS_ASCIIC`](#ida_idp.AS_ASCIIC) | ascii directive accepts C-like escape sequences (n,x01 and similar) | | [`AS_ASCIIZ`](#ida_idp.AS_ASCIIZ) | ascii directive inserts implicit zero byte at the end | | [`AS2_BRACE`](#ida_idp.AS2_BRACE) | Use braces for all expressions. | | [`AS2_STRINV`](#ida_idp.AS2_STRINV) | Invert meaning of idainfo::wide_high_byte_first for text strings (for processors with bytes bigger than 8 bits) | | [`AS2_BYTE1CHAR`](#ida_idp.AS2_BYTE1CHAR) | One symbol per processor byte. Meaningful only for wide byte processors | | [`AS2_IDEALDSCR`](#ida_idp.AS2_IDEALDSCR) | Description of struc/union is in the 'reverse' form (keyword before name), the same as in borland tasm ideal | | [`AS2_TERSESTR`](#ida_idp.AS2_TERSESTR) | 'terse' structure initialization form; NAME is supported | | [`AS2_COLONSUF`](#ida_idp.AS2_COLONSUF) | addresses may have ":xx" suffix; this suffix must be ignored when extracting the address under the cursor | | [`AS2_YWORD`](#ida_idp.AS2_YWORD) | a_yword field is present and valid | | [`AS2_ZWORD`](#ida_idp.AS2_ZWORD) | a_zword field is present and valid | | [`HKCB_GLOBAL`](#ida_idp.HKCB_GLOBAL) | is global event listener? if true, the listener will survive database closing and opening. it will stay in the memory until explicitly unhooked. otherwise the kernel will delete it as soon as the owner is unloaded. should be used only with PLUGIN_FIX plugins. | | [`PLFM_386`](#ida_idp.PLFM_386) | Intel 80x86. | | [`PLFM_Z80`](#ida_idp.PLFM_Z80) | 8085, Z80 | | [`PLFM_I860`](#ida_idp.PLFM_I860) | Intel 860. | | [`PLFM_8051`](#ida_idp.PLFM_8051) | 8051 | | [`PLFM_TMS`](#ida_idp.PLFM_TMS) | Texas Instruments TMS320C5x. | | [`PLFM_6502`](#ida_idp.PLFM_6502) | 6502 | | [`PLFM_PDP`](#ida_idp.PLFM_PDP) | PDP11. | | [`PLFM_68K`](#ida_idp.PLFM_68K) | Motorola 680x0. | | [`PLFM_JAVA`](#ida_idp.PLFM_JAVA) | Java. | | [`PLFM_6800`](#ida_idp.PLFM_6800) | Motorola 68xx. | | [`PLFM_ST7`](#ida_idp.PLFM_ST7) | SGS-Thomson ST7. | | [`PLFM_MC6812`](#ida_idp.PLFM_MC6812) | Motorola 68HC12. | | [`PLFM_MIPS`](#ida_idp.PLFM_MIPS) | MIPS. | | [`PLFM_ARM`](#ida_idp.PLFM_ARM) | Advanced RISC Machines. | | [`PLFM_TMSC6`](#ida_idp.PLFM_TMSC6) | Texas Instruments TMS320C6x. | | [`PLFM_PPC`](#ida_idp.PLFM_PPC) | PowerPC. | | [`PLFM_80196`](#ida_idp.PLFM_80196) | Intel 80196. | | [`PLFM_Z8`](#ida_idp.PLFM_Z8) | Z8. | | [`PLFM_SH`](#ida_idp.PLFM_SH) | Renesas (formerly Hitachi) SuperH. | | [`PLFM_NET`](#ida_idp.PLFM_NET) | Microsoft Visual Studio.Net. | | [`PLFM_AVR`](#ida_idp.PLFM_AVR) | Atmel 8-bit RISC processor(s). | | [`PLFM_H8`](#ida_idp.PLFM_H8) | Hitachi H8/300, H8/2000. | | [`PLFM_PIC`](#ida_idp.PLFM_PIC) | Microchip's PIC. | | [`PLFM_SPARC`](#ida_idp.PLFM_SPARC) | SPARC. | | [`PLFM_ALPHA`](#ida_idp.PLFM_ALPHA) | DEC Alpha. | | [`PLFM_HPPA`](#ida_idp.PLFM_HPPA) | Hewlett-Packard PA-RISC. | | [`PLFM_H8500`](#ida_idp.PLFM_H8500) | Hitachi H8/500. | | [`PLFM_TRICORE`](#ida_idp.PLFM_TRICORE) | Tasking Tricore. | | [`PLFM_DSP56K`](#ida_idp.PLFM_DSP56K) | Motorola DSP5600x. | | [`PLFM_C166`](#ida_idp.PLFM_C166) | Siemens C166 family. | | [`PLFM_ST20`](#ida_idp.PLFM_ST20) | SGS-Thomson ST20. | | [`PLFM_IA64`](#ida_idp.PLFM_IA64) | Intel Itanium IA64. | | [`PLFM_I960`](#ida_idp.PLFM_I960) | Intel 960. | | [`PLFM_F2MC`](#ida_idp.PLFM_F2MC) | Fujitsu F2MC-16. | | [`PLFM_TMS320C54`](#ida_idp.PLFM_TMS320C54) | Texas Instruments TMS320C54xx. | | [`PLFM_TMS320C55`](#ida_idp.PLFM_TMS320C55) | Texas Instruments TMS320C55xx. | | [`PLFM_TRIMEDIA`](#ida_idp.PLFM_TRIMEDIA) | Trimedia. | | [`PLFM_M32R`](#ida_idp.PLFM_M32R) | Mitsubishi 32-bit RISC. | | [`PLFM_NEC_78K0`](#ida_idp.PLFM_NEC_78K0) | NEC 78K0. | | [`PLFM_NEC_78K0S`](#ida_idp.PLFM_NEC_78K0S) | NEC 78K0S. | | [`PLFM_M740`](#ida_idp.PLFM_M740) | Mitsubishi 8bit. | | [`PLFM_M7700`](#ida_idp.PLFM_M7700) | Mitsubishi 16-bit. | | [`PLFM_ST9`](#ida_idp.PLFM_ST9) | ST9+. | | [`PLFM_FR`](#ida_idp.PLFM_FR) | Fujitsu FR Family. | | [`PLFM_MC6816`](#ida_idp.PLFM_MC6816) | Motorola 68HC16. | | [`PLFM_M7900`](#ida_idp.PLFM_M7900) | Mitsubishi 7900. | | [`PLFM_TMS320C3`](#ida_idp.PLFM_TMS320C3) | Texas Instruments TMS320C3. | | [`PLFM_KR1878`](#ida_idp.PLFM_KR1878) | Angstrem KR1878. | | [`PLFM_AD218X`](#ida_idp.PLFM_AD218X) | Analog Devices ADSP 218X. | | [`PLFM_OAKDSP`](#ida_idp.PLFM_OAKDSP) | Atmel OAK DSP. | | [`PLFM_TLCS900`](#ida_idp.PLFM_TLCS900) | Toshiba TLCS-900. | | [`PLFM_C39`](#ida_idp.PLFM_C39) | Rockwell C39. | | [`PLFM_CR16`](#ida_idp.PLFM_CR16) | NSC CR16. | | [`PLFM_MN102L00`](#ida_idp.PLFM_MN102L00) | Panasonic MN10200. | | [`PLFM_TMS320C1X`](#ida_idp.PLFM_TMS320C1X) | Texas Instruments TMS320C1x. | | [`PLFM_NEC_V850X`](#ida_idp.PLFM_NEC_V850X) | NEC V850 and V850ES/E1/E2. | | [`PLFM_SCR_ADPT`](#ida_idp.PLFM_SCR_ADPT) | Processor module adapter for processor modules written in scripting languages. | | [`PLFM_EBC`](#ida_idp.PLFM_EBC) | EFI Bytecode. | | [`PLFM_MSP430`](#ida_idp.PLFM_MSP430) | Texas Instruments MSP430. | | [`PLFM_SPU`](#ida_idp.PLFM_SPU) | Cell Broadband Engine Synergistic Processor Unit. | | [`PLFM_DALVIK`](#ida_idp.PLFM_DALVIK) | Android Dalvik Virtual Machine. | | [`PLFM_65C816`](#ida_idp.PLFM_65C816) | 65802/65816 | | [`PLFM_M16C`](#ida_idp.PLFM_M16C) | Renesas M16C. | | [`PLFM_ARC`](#ida_idp.PLFM_ARC) | Argonaut RISC Core. | | [`PLFM_UNSP`](#ida_idp.PLFM_UNSP) | SunPlus unSP. | | [`PLFM_TMS320C28`](#ida_idp.PLFM_TMS320C28) | Texas Instruments TMS320C28x. | | [`PLFM_DSP96K`](#ida_idp.PLFM_DSP96K) | Motorola DSP96000. | | [`PLFM_SPC700`](#ida_idp.PLFM_SPC700) | Sony SPC700. | | [`PLFM_AD2106X`](#ida_idp.PLFM_AD2106X) | Analog Devices ADSP 2106X. | | [`PLFM_PIC16`](#ida_idp.PLFM_PIC16) | Microchip's 16-bit PIC. | | [`PLFM_S390`](#ida_idp.PLFM_S390) | IBM's S390. | | [`PLFM_XTENSA`](#ida_idp.PLFM_XTENSA) | Tensilica Xtensa. | | [`PLFM_RISCV`](#ida_idp.PLFM_RISCV) | RISC-V. | | [`PLFM_RL78`](#ida_idp.PLFM_RL78) | Renesas RL78. | | [`PLFM_RX`](#ida_idp.PLFM_RX) | Renesas RX. | | [`PLFM_WASM`](#ida_idp.PLFM_WASM) | WASM. | | [`PLFM_NDS32`](#ida_idp.PLFM_NDS32) | Andes Technology NDS32. | | [`PLFM_MCORE`](#ida_idp.PLFM_MCORE) | Motorola M\*Core. | | [`PR_SEGS`](#ida_idp.PR_SEGS) | has segment registers? | | [`PR_USE32`](#ida_idp.PR_USE32) | supports 32-bit addressing? | | [`PR_DEFSEG32`](#ida_idp.PR_DEFSEG32) | segments are 32-bit by default | | [`PR_RNAMESOK`](#ida_idp.PR_RNAMESOK) | allow user register names for location names | | [`PR_ADJSEGS`](#ida_idp.PR_ADJSEGS) | IDA may adjust segments' starting/ending addresses. | | [`PR_DEFNUM`](#ida_idp.PR_DEFNUM) | mask - default number representation | | [`PRN_HEX`](#ida_idp.PRN_HEX) | hex | | [`PRN_OCT`](#ida_idp.PRN_OCT) | octal | | [`PRN_DEC`](#ida_idp.PRN_DEC) | decimal | | [`PRN_BIN`](#ida_idp.PRN_BIN) | binary | | [`PR_WORD_INS`](#ida_idp.PR_WORD_INS) | instruction codes are grouped 2bytes in binary line prefix | | [`PR_NOCHANGE`](#ida_idp.PR_NOCHANGE) | The user can't change segments and code/data attributes (display only) | | [`PR_ASSEMBLE`](#ida_idp.PR_ASSEMBLE) | Module has a built-in assembler and will react to ev_assemble. | | [`PR_ALIGN`](#ida_idp.PR_ALIGN) | All data items should be aligned properly. | | [`PR_TYPEINFO`](#ida_idp.PR_TYPEINFO) | the processor module fully supports type information callbacks; without full support, function argument locations and other things will probably be wrong. | | [`PR_USE64`](#ida_idp.PR_USE64) | supports 64-bit addressing? | | [`PR_SGROTHER`](#ida_idp.PR_SGROTHER) | the segment registers don't contain the segment selectors. | | [`PR_STACK_UP`](#ida_idp.PR_STACK_UP) | the stack grows up | | [`PR_BINMEM`](#ida_idp.PR_BINMEM) | the processor module provides correct segmentation for binary files (i.e. it creates additional segments). The kernel will not ask the user to specify the RAM/ROM sizes | | [`PR_SEGTRANS`](#ida_idp.PR_SEGTRANS) | the processor module supports the segment translation feature (meaning it calculates the code addresses using the map_code_ea() function) | | [`PR_CHK_XREF`](#ida_idp.PR_CHK_XREF) | don't allow near xrefs between segments with different bases | | [`PR_NO_SEGMOVE`](#ida_idp.PR_NO_SEGMOVE) | the processor module doesn't support move_segm() (i.e. the user can't move segments) | | [`PR_USE_ARG_TYPES`](#ida_idp.PR_USE_ARG_TYPES) | use processor_t::use_arg_types callback | | [`PR_SCALE_STKVARS`](#ida_idp.PR_SCALE_STKVARS) | use processor_t::get_stkvar_scale callback | | [`PR_DELAYED`](#ida_idp.PR_DELAYED) | has delayed jumps and calls. If this flag is set, processor_t::is_basic_block_end, processor_t::delay_slot_insn should be implemented | | [`PR_ALIGN_INSN`](#ida_idp.PR_ALIGN_INSN) | allow ida to create alignment instructions arbitrarily. Since these instructions might lead to other wrong instructions and spoil the listing, IDA does not create them by default anymore | | [`PR_PURGING`](#ida_idp.PR_PURGING) | there are calling conventions which may purge bytes from the stack | | [`PR_CNDINSNS`](#ida_idp.PR_CNDINSNS) | has conditional instructions | | [`PR_USE_TBYTE`](#ida_idp.PR_USE_TBYTE) | BTMT_SPECFLT means \_TBYTE type | | [`PR_DEFSEG64`](#ida_idp.PR_DEFSEG64) | segments are 64-bit by default | | [`PR_OUTER`](#ida_idp.PR_OUTER) | has outer operands (currently only mc68k) | | [`PR2_MAPPINGS`](#ida_idp.PR2_MAPPINGS) | the processor module uses memory mapping | | [`PR2_IDP_OPTS`](#ida_idp.PR2_IDP_OPTS) | the module has processor-specific configuration options | | [`PR2_CODE16_BIT`](#ida_idp.PR2_CODE16_BIT) | low bit of code addresses has special meaning e.g. ARM Thumb, MIPS16 | | [`PR2_MACRO`](#ida_idp.PR2_MACRO) | processor supports macro instructions | | [`PR2_USE_CALCREL`](#ida_idp.PR2_USE_CALCREL) | (Lumina) the module supports calcrel info | | [`PR2_REL_BITS`](#ida_idp.PR2_REL_BITS) | (Lumina) calcrel info has bits granularity, not bytes - construction flag only | | [`PR2_FORCE_16BIT`](#ida_idp.PR2_FORCE_16BIT) | use 16-bit basic types despite of 32-bit segments (used by c166) | | [`PR2_IGNORE_IDA_GUESS`](#ida_idp.PR2_IGNORE_IDA_GUESS) | allow to create items inside the IDA-guessed data arrays | | [`OP_FP_BASED`](#ida_idp.OP_FP_BASED) | operand is FP based | | [`OP_SP_BASED`](#ida_idp.OP_SP_BASED) | operand is SP based | | [`OP_SP_ADD`](#ida_idp.OP_SP_ADD) | operand value is added to the pointer | | [`OP_SP_SUB`](#ida_idp.OP_SP_SUB) | operand value is subtracted from the pointer | | [`CUSTOM_INSN_ITYPE`](#ida_idp.CUSTOM_INSN_ITYPE) | Custom instruction codes defined by processor extension plugins must be greater than or equal to this | | [`REG_SPOIL`](#ida_idp.REG_SPOIL) | processor_t::use_regarg_type uses this bit in the return value to indicate that the register value has been spoiled | | [`NO_ACCESS`](#ida_idp.NO_ACCESS) | | | [`WRITE_ACCESS`](#ida_idp.WRITE_ACCESS) | | | [`READ_ACCESS`](#ida_idp.READ_ACCESS) | | | [`RW_ACCESS`](#ida_idp.RW_ACCESS) | | | [`SETPROC_IDB`](#ida_idp.SETPROC_IDB) | set processor type for old idb | | [`SETPROC_LOADER`](#ida_idp.SETPROC_LOADER) | set processor type for new idb; if the user has specified a compatible processor, return success without changing it. if failure, call loader_failure() | | [`SETPROC_LOADER_NON_FATAL`](#ida_idp.SETPROC_LOADER_NON_FATAL) | the same as SETPROC_LOADER but non-fatal failures. | | [`SETPROC_USER`](#ida_idp.SETPROC_USER) | set user-specified processor used for -p and manual processor change at later time | | [`LTC_NONE`](#ida_idp.LTC_NONE) | no event (internal use) | | [`LTC_ADDED`](#ida_idp.LTC_ADDED) | added a local type | | [`LTC_DELETED`](#ida_idp.LTC_DELETED) | deleted a local type | | [`LTC_EDITED`](#ida_idp.LTC_EDITED) | edited a local type | | [`LTC_ALIASED`](#ida_idp.LTC_ALIASED) | added a type alias | | [`LTC_COMPILER`](#ida_idp.LTC_COMPILER) | changed the compiler and calling convention | | [`LTC_TIL_LOADED`](#ida_idp.LTC_TIL_LOADED) | loaded a til file | | [`LTC_TIL_UNLOADED`](#ida_idp.LTC_TIL_UNLOADED) | unloaded a til file | | [`LTC_TIL_COMPACTED`](#ida_idp.LTC_TIL_COMPACTED) | numbered types have been compacted compact_numbered_types() | | [`closebase`](#ida_idp.closebase) | | | [`savebase`](#ida_idp.savebase) | | | [`upgraded`](#ida_idp.upgraded) | | | [`auto_empty`](#ida_idp.auto_empty) | | | [`auto_empty_finally`](#ida_idp.auto_empty_finally) | | | [`determined_main`](#ida_idp.determined_main) | | | [`extlang_changed`](#ida_idp.extlang_changed) | | | [`idasgn_loaded`](#ida_idp.idasgn_loaded) | | | [`kernel_config_loaded`](#ida_idp.kernel_config_loaded) | | | [`loader_finished`](#ida_idp.loader_finished) | | | [`flow_chart_created`](#ida_idp.flow_chart_created) | | | [`compiler_changed`](#ida_idp.compiler_changed) | | | [`changing_ti`](#ida_idp.changing_ti) | | | [`ti_changed`](#ida_idp.ti_changed) | | | [`changing_op_ti`](#ida_idp.changing_op_ti) | | | [`op_ti_changed`](#ida_idp.op_ti_changed) | | | [`changing_op_type`](#ida_idp.changing_op_type) | | | [`op_type_changed`](#ida_idp.op_type_changed) | | | [`segm_added`](#ida_idp.segm_added) | | | [`deleting_segm`](#ida_idp.deleting_segm) | | | [`segm_deleted`](#ida_idp.segm_deleted) | | | [`changing_segm_start`](#ida_idp.changing_segm_start) | | | [`segm_start_changed`](#ida_idp.segm_start_changed) | | | [`changing_segm_end`](#ida_idp.changing_segm_end) | | | [`segm_end_changed`](#ida_idp.segm_end_changed) | | | [`changing_segm_name`](#ida_idp.changing_segm_name) | | | [`segm_name_changed`](#ida_idp.segm_name_changed) | | | [`changing_segm_class`](#ida_idp.changing_segm_class) | | | [`segm_class_changed`](#ida_idp.segm_class_changed) | | | [`segm_attrs_updated`](#ida_idp.segm_attrs_updated) | | | [`segm_moved`](#ida_idp.segm_moved) | | | [`allsegs_moved`](#ida_idp.allsegs_moved) | | | [`func_added`](#ida_idp.func_added) | | | [`func_updated`](#ida_idp.func_updated) | | | [`set_func_start`](#ida_idp.set_func_start) | | | [`set_func_end`](#ida_idp.set_func_end) | | | [`deleting_func`](#ida_idp.deleting_func) | | | [`frame_deleted`](#ida_idp.frame_deleted) | | | [`thunk_func_created`](#ida_idp.thunk_func_created) | | | [`func_tail_appended`](#ida_idp.func_tail_appended) | | | [`deleting_func_tail`](#ida_idp.deleting_func_tail) | | | [`func_tail_deleted`](#ida_idp.func_tail_deleted) | | | [`tail_owner_changed`](#ida_idp.tail_owner_changed) | | | [`func_noret_changed`](#ida_idp.func_noret_changed) | | | [`stkpnts_changed`](#ida_idp.stkpnts_changed) | | | [`updating_tryblks`](#ida_idp.updating_tryblks) | | | [`tryblks_updated`](#ida_idp.tryblks_updated) | | | [`deleting_tryblks`](#ida_idp.deleting_tryblks) | | | [`sgr_changed`](#ida_idp.sgr_changed) | | | [`make_code`](#ida_idp.make_code) | | | [`make_data`](#ida_idp.make_data) | | | [`destroyed_items`](#ida_idp.destroyed_items) | | | [`renamed`](#ida_idp.renamed) | | | [`byte_patched`](#ida_idp.byte_patched) | | | [`changing_cmt`](#ida_idp.changing_cmt) | | | [`cmt_changed`](#ida_idp.cmt_changed) | | | [`changing_range_cmt`](#ida_idp.changing_range_cmt) | | | [`range_cmt_changed`](#ida_idp.range_cmt_changed) | | | [`extra_cmt_changed`](#ida_idp.extra_cmt_changed) | | | [`item_color_changed`](#ida_idp.item_color_changed) | | | [`callee_addr_changed`](#ida_idp.callee_addr_changed) | | | [`bookmark_changed`](#ida_idp.bookmark_changed) | | | [`sgr_deleted`](#ida_idp.sgr_deleted) | | | [`adding_segm`](#ida_idp.adding_segm) | | | [`func_deleted`](#ida_idp.func_deleted) | | | [`dirtree_mkdir`](#ida_idp.dirtree_mkdir) | | | [`dirtree_rmdir`](#ida_idp.dirtree_rmdir) | | | [`dirtree_link`](#ida_idp.dirtree_link) | | | [`dirtree_move`](#ida_idp.dirtree_move) | | | [`dirtree_rank`](#ida_idp.dirtree_rank) | | | [`dirtree_rminode`](#ida_idp.dirtree_rminode) | | | [`dirtree_segm_moved`](#ida_idp.dirtree_segm_moved) | | | [`local_types_changed`](#ida_idp.local_types_changed) | | | [`lt_udm_created`](#ida_idp.lt_udm_created) | | | [`lt_udm_deleted`](#ida_idp.lt_udm_deleted) | | | [`lt_udm_renamed`](#ida_idp.lt_udm_renamed) | | | [`lt_udm_changed`](#ida_idp.lt_udm_changed) | | | [`lt_udt_expanded`](#ida_idp.lt_udt_expanded) | | | [`frame_created`](#ida_idp.frame_created) | | | [`frame_udm_created`](#ida_idp.frame_udm_created) | | | [`frame_udm_deleted`](#ida_idp.frame_udm_deleted) | | | [`frame_udm_renamed`](#ida_idp.frame_udm_renamed) | | | [`frame_udm_changed`](#ida_idp.frame_udm_changed) | | | [`frame_expanded`](#ida_idp.frame_expanded) | | | [`idasgn_matched_ea`](#ida_idp.idasgn_matched_ea) | | | [`lt_edm_created`](#ida_idp.lt_edm_created) | | | [`lt_edm_deleted`](#ida_idp.lt_edm_deleted) | | | [`lt_edm_renamed`](#ida_idp.lt_edm_renamed) | | | [`lt_edm_changed`](#ida_idp.lt_edm_changed) | | | [`local_type_renamed`](#ida_idp.local_type_renamed) | | | [`dirtree_ordering_changed`](#ida_idp.dirtree_ordering_changed) | | | [`dirtree_bulk_move`](#ida_idp.dirtree_bulk_move) | | | [`segment_added`](#ida_idp.segment_added) | | | [`changing_segment_start`](#ida_idp.changing_segment_start) | | | [`segment_start_changed`](#ida_idp.segment_start_changed) | | | [`changing_segment_end`](#ida_idp.changing_segment_end) | | | [`segment_end_changed`](#ida_idp.segment_end_changed) | | | [`changing_segment_name`](#ida_idp.changing_segment_name) | | | [`segment_name_changed`](#ida_idp.segment_name_changed) | | | [`changing_segment_class`](#ida_idp.changing_segment_class) | | | [`segment_class_changed`](#ida_idp.segment_class_changed) | | | [`segment_attrs_updated`](#ida_idp.segment_attrs_updated) | | | [`function_added`](#ida_idp.function_added) | | | [`function_updated`](#ida_idp.function_updated) | | | [`set_function_start`](#ida_idp.set_function_start) | | | [`set_function_end`](#ida_idp.set_function_end) | | | [`deleting_function`](#ida_idp.deleting_function) | | | [`function_tail_appended`](#ida_idp.function_tail_appended) | | | [`deleting_function_tail`](#ida_idp.deleting_function_tail) | | | [`function_tail_deleted`](#ida_idp.function_tail_deleted) | | | [`function_tail_owner_changed`](#ida_idp.function_tail_owner_changed) | | | [`function_noret_changed`](#ida_idp.function_noret_changed) | | | [`function_stkpnts_changed`](#ida_idp.function_stkpnts_changed) | | | [`thunk_function_created`](#ida_idp.thunk_function_created) | | | [`function_frame_deleted`](#ida_idp.function_frame_deleted) | | | [`moving_range_cmt`](#ida_idp.moving_range_cmt) | | | [`IDPOPT_CST`](#ida_idp.IDPOPT_CST) | | | [`IDPOPT_JVL`](#ida_idp.IDPOPT_JVL) | | | [`IDPOPT_PRI_DEFAULT`](#ida_idp.IDPOPT_PRI_DEFAULT) | | | [`IDPOPT_PRI_HIGH`](#ida_idp.IDPOPT_PRI_HIGH) | | | [`IDPOPT_NUM_INT`](#ida_idp.IDPOPT_NUM_INT) | | | [`IDPOPT_NUM_CHAR`](#ida_idp.IDPOPT_NUM_CHAR) | | | [`IDPOPT_NUM_SHORT`](#ida_idp.IDPOPT_NUM_SHORT) | | | [`IDPOPT_NUM_RANGE`](#ida_idp.IDPOPT_NUM_RANGE) | | | [`IDPOPT_NUM_UNS`](#ida_idp.IDPOPT_NUM_UNS) | | | [`IDPOPT_BIT_UINT`](#ida_idp.IDPOPT_BIT_UINT) | | | [`IDPOPT_BIT_UCHAR`](#ida_idp.IDPOPT_BIT_UCHAR) | | | [`IDPOPT_BIT_USHORT`](#ida_idp.IDPOPT_BIT_USHORT) | | | [`IDPOPT_BIT_BOOL`](#ida_idp.IDPOPT_BIT_BOOL) | | | [`IDPOPT_STR_QSTRING`](#ida_idp.IDPOPT_STR_QSTRING) | | | [`IDPOPT_STR_LONG`](#ida_idp.IDPOPT_STR_LONG) | | | [`IDPOPT_I64_RANGE`](#ida_idp.IDPOPT_I64_RANGE) | | | [`IDPOPT_I64_UNS`](#ida_idp.IDPOPT_I64_UNS) | | | [`IDPOPT_CST_PARAMS`](#ida_idp.IDPOPT_CST_PARAMS) | | | [`IDPOPT_MBROFF`](#ida_idp.IDPOPT_MBROFF) | | | [`cik_string`](#ida_idp.cik_string) | | | [`cik_filename`](#ida_idp.cik_filename) | | | [`cik_path`](#ida_idp.cik_path) | | | [`REAL_ERROR_FORMAT`](#ida_idp.REAL_ERROR_FORMAT) | | | [`REAL_ERROR_RANGE`](#ida_idp.REAL_ERROR_RANGE) | | | [`REAL_ERROR_BADDATA`](#ida_idp.REAL_ERROR_BADDATA) | | | [`IDPOPT_STR`](#ida_idp.IDPOPT_STR) | | | [`IDPOPT_NUM`](#ida_idp.IDPOPT_NUM) | | | [`IDPOPT_BIT`](#ida_idp.IDPOPT_BIT) | | | [`IDPOPT_FLT`](#ida_idp.IDPOPT_FLT) | | | [`IDPOPT_I64`](#ida_idp.IDPOPT_I64) | | | [`IDPOPT_OK`](#ida_idp.IDPOPT_OK) | | | [`IDPOPT_BADKEY`](#ida_idp.IDPOPT_BADKEY) | | | [`IDPOPT_BADTYPE`](#ida_idp.IDPOPT_BADTYPE) | | | [`IDPOPT_BADVALUE`](#ida_idp.IDPOPT_BADVALUE) | | | [`ph`](#ida_idp.ph) | | ## Classes | [`reg_access_vec_t`](#ida_idp.reg_access_vec_t) | | |---------------------------------------------------|----| | [`asm_t`](#ida_idp.asm_t) | | | [`unmapped_info_t`](#ida_idp.unmapped_info_t) | | | [`reg_info_t`](#ida_idp.reg_info_t) | | | [`reg_access_t`](#ida_idp.reg_access_t) | | | [`reg_accesses_t`](#ida_idp.reg_accesses_t) | | | [`num_range_t`](#ida_idp.num_range_t) | | | [`params_t`](#ida_idp.params_t) | | | [`IDP_Hooks`](#ida_idp.IDP_Hooks) | | | [`processor_t`](#ida_idp.processor_t) | | | [`IDB_Hooks`](#ida_idp.IDB_Hooks) | | ## Functions | [`has_cf_chg`](#ida_idp.has_cf_chg)(→ bool) | Does an instruction with the specified feature modify the i-th operand? | |--------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [`has_cf_use`](#ida_idp.has_cf_use)(→ bool) | Does an instruction with the specified feature use a value of the i-th operand? | | [`has_insn_feature`](#ida_idp.has_insn_feature)(→ bool) | Does the specified instruction have the specified feature? | | [`is_call_insn`](#ida_idp.is_call_insn)(→ bool) | Is the instruction a "call"? | | [`is_ret_insn`](#ida_idp.is_ret_insn)(→ bool) | | | [`is_indirect_jump_insn`](#ida_idp.is_indirect_jump_insn)(→ bool) | Is the instruction an indirect jump? | | [`is_basic_block_end`](#ida_idp.is_basic_block_end)(→ bool) | Is the instruction the end of a basic block? | | [`get_ph`](#ida_idp.get_ph)(→ processor_t \*) | | | [`get_ash`](#ida_idp.get_ash)(→ asm_t \*) | | | [`str2reg`](#ida_idp.str2reg)(→ int) | Get any register number (-1 on error). | | [`is_align_insn`](#ida_idp.is_align_insn)(→ int) | If the instruction at 'ea' looks like an alignment instruction, return its length in bytes. Otherwise return 0. | | [`get_reg_name`](#ida_idp.get_reg_name)(→ str) | Get text representation of a register. For most processors this function will just return processor_t::reg_names[reg]. If the processor module has implemented processor_t::get_reg_name, it will be used instead | | [`parse_reg_name`](#ida_idp.parse_reg_name)(→ bool) | Get register info by name. | | [`set_processor_type`](#ida_idp.set_processor_type)(→ bool) | Set target processor type. Once a processor module is loaded, it cannot be replaced until we close the idb. | | [`get_idp_name`](#ida_idp.get_idp_name)(→ Union[str, None]) | Get name of the current processor module. The name is derived from the file name. For example, for IBM PC the module is named "pc.w32" (windows version), then the module name is "PC" (uppercase). If no processor module is loaded, this function will return nullptr | | [`set_target_assembler`](#ida_idp.set_target_assembler)(→ bool) | Set target assembler. | | [`gen_idb_event`](#ida_idp.gen_idb_event)(→ None) | the kernel will use this function to generate idb_events | | [`register_cfgopts`](#ida_idp.register_cfgopts)(→ bool) | | | [`get_config_value`](#ida_idp.get_config_value)(→ jvalue_t \*) | | | [`cfg_get_cc_parm`](#ida_idp.cfg_get_cc_parm)(→ str) | | | [`cfg_get_cc_header_path`](#ida_idp.cfg_get_cc_header_path)(→ str) | | | [`cfg_get_cc_predefined_macros`](#ida_idp.cfg_get_cc_predefined_macros)(→ str) | | | [`process_config_directive`](#ida_idp.process_config_directive)(→ None) | | | [`AssembleLine`](#ida_idp.AssembleLine)(ea, cs, ip, use32, line) | Assemble an instruction to a string (display a warning if an error is found) | | [`assemble`](#ida_idp.assemble)(ea, cs, ip, use32, line) | Assemble an instruction into the database (display a warning if an error is found) | | [`ph_get_id`](#ida_idp.ph_get_id)() | Returns the 'ph.id' field | | [`ph_get_version`](#ida_idp.ph_get_version)() | Returns the 'ph.version' | | [`ph_get_flag`](#ida_idp.ph_get_flag)() | Returns the 'ph.flag' | | [`ph_get_cnbits`](#ida_idp.ph_get_cnbits)() | Returns the 'ph.cnbits' | | [`ph_get_dnbits`](#ida_idp.ph_get_dnbits)() | Returns the 'ph.dnbits' | | [`ph_get_reg_first_sreg`](#ida_idp.ph_get_reg_first_sreg)() | Returns the 'ph.reg_first_sreg' | | [`ph_get_reg_last_sreg`](#ida_idp.ph_get_reg_last_sreg)() | Returns the 'ph.reg_last_sreg' | | [`ph_get_segreg_size`](#ida_idp.ph_get_segreg_size)() | Returns the 'ph.segreg_size' | | [`ph_get_reg_code_sreg`](#ida_idp.ph_get_reg_code_sreg)() | Returns the 'ph.reg_code_sreg' | | [`ph_get_reg_data_sreg`](#ida_idp.ph_get_reg_data_sreg)() | Returns the 'ph.reg_data_sreg' | | [`ph_get_icode_return`](#ida_idp.ph_get_icode_return)() | Returns the 'ph.icode_return' | | [`ph_get_instruc_start`](#ida_idp.ph_get_instruc_start)() | Returns the 'ph.instruc_start' | | [`ph_get_instruc_end`](#ida_idp.ph_get_instruc_end)() | Returns the 'ph.instruc_end' | | [`ph_get_tbyte_size`](#ida_idp.ph_get_tbyte_size)() | Returns the 'ph.tbyte_size' field as defined in he processor module | | [`ph_get_instruc`](#ida_idp.ph_get_instruc)() | Returns a list of tuples (instruction_name, instruction_feature) containing the | | [`ph_get_regnames`](#ida_idp.ph_get_regnames)() | Returns the list of register names as defined in the processor module | | [`ph_get_operand_info`](#ida_idp.ph_get_operand_info)(→ Union[Tuple[int, ...) | Returns the operand information given an ea and operand number. | | [`ph_calcrel`](#ida_idp.ph_calcrel)(→ bytevec_t \*, size_t \*) | | | [`ph_find_reg_value`](#ida_idp.ph_find_reg_value)(→ uint64 \*) | | | [`ph_find_op_value`](#ida_idp.ph_find_op_value)(→ uint64 \*) | | | [`ph_get_reg_accesses`](#ida_idp.ph_get_reg_accesses)(→ ssize_t) | | | [`ph_get_abi_info`](#ida_idp.ph_get_abi_info)(→ qstrvec_t \*, qstrvec_t \*) | | | [`get_idp_notifier_addr`](#ida_idp.get_idp_notifier_addr)(→ PyObject \*) | | | [`get_idp_notifier_ud_addr`](#ida_idp.get_idp_notifier_ud_addr)(→ PyObject \*) | | | [`delay_slot_insn`](#ida_idp.delay_slot_insn)(→ bool) | | | [`get_reg_info`](#ida_idp.get_reg_info)(→ str) | | | [`sizeof_ldbl`](#ida_idp.sizeof_ldbl)(→ int) | | | [`str2sreg`](#ida_idp.str2sreg)(name) | get segment register number from its name or -1 | | [`get_idb_notifier_addr`](#ida_idp.get_idb_notifier_addr)(→ PyObject \*) | | | [`get_idb_notifier_ud_addr`](#ida_idp.get_idb_notifier_ud_addr)(→ PyObject \*) | | ## Module Contents ### *class* ida_idp.reg_access_vec_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### push_back(\*args) → reg_access_t & #### pop_back() → [None](https://docs.python.org/3/library/constants.html#None) #### size() → [int](https://docs.python.org/3/library/functions.html#int) #### empty() → [bool](https://docs.python.org/3/library/functions.html#bool) #### at(\_idx: [int](https://docs.python.org/3/library/functions.html#int)) → reg_access_t const & #### qclear() → [None](https://docs.python.org/3/library/constants.html#None) #### clear() → [None](https://docs.python.org/3/library/constants.html#None) #### resize(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### grow(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### capacity() → [int](https://docs.python.org/3/library/functions.html#int) #### reserve(cnt: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### truncate() → [None](https://docs.python.org/3/library/constants.html#None) #### swap(r: [reg_access_vec_t](#ida_idp.reg_access_vec_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extract() → reg_access_t \* #### inject(s: [reg_access_t](#ida_idp.reg_access_t), len: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### begin(\*args) → qvector< reg_access_t >::const_iterator #### end(\*args) → qvector< reg_access_t >::const_iterator #### insert(it: [reg_access_t](#ida_idp.reg_access_t), x: [reg_access_t](#ida_idp.reg_access_t)) → qvector< reg_access_t >::iterator #### erase(\*args) → qvector< reg_access_t >::iterator #### find(\*args) → qvector< reg_access_t >::const_iterator #### has(x: [reg_access_t](#ida_idp.reg_access_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### add_unique(x: [reg_access_t](#ida_idp.reg_access_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### append(x: [reg_access_t](#ida_idp.reg_access_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extend(x: [reg_access_vec_t](#ida_idp.reg_access_vec_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### front #### back ### ida_idp.IDP_INTERFACE_VERSION The interface version number. ### ida_idp.CF_STOP Instruction doesn’t pass execution to the next instruction ### ida_idp.CF_CALL CALL instruction (should make a procedure here). ### ida_idp.CF_CHG1 The instruction modifies the first operand. ### ida_idp.CF_CHG2 The instruction modifies the second operand. ### ida_idp.CF_CHG3 The instruction modifies the third operand. ### ida_idp.CF_CHG4 The instruction modifies the fourth operand. ### ida_idp.CF_CHG5 The instruction modifies the fifth operand. ### ida_idp.CF_CHG6 The instruction modifies the sixth operand. ### ida_idp.CF_USE1 The instruction uses value of the first operand. ### ida_idp.CF_USE2 The instruction uses value of the second operand. ### ida_idp.CF_USE3 The instruction uses value of the third operand. ### ida_idp.CF_USE4 The instruction uses value of the fourth operand. ### ida_idp.CF_USE5 The instruction uses value of the fifth operand. ### ida_idp.CF_USE6 The instruction uses value of the sixth operand. ### ida_idp.CF_JUMP The instruction passes execution using indirect jump or call (thus needs additional analysis) ### ida_idp.CF_SHFT Bit-shift instruction (shl,shr…). ### ida_idp.CF_HLL Instruction may be present in a high level language function ### ida_idp.CF_CHG7 The instruction modifies the seventh operand. ### ida_idp.CF_CHG8 The instruction modifies the eighth operand. ### ida_idp.CF_USE7 The instruction uses value of the seventh operand. ### ida_idp.CF_USE8 The instruction uses value of the eighth operand ### ida_idp.has_cf_chg(feature: [int](https://docs.python.org/3/library/functions.html#int), opnum: uint) → [bool](https://docs.python.org/3/library/functions.html#bool) Does an instruction with the specified feature modify the i-th operand? ### ida_idp.has_cf_use(feature: [int](https://docs.python.org/3/library/functions.html#int), opnum: uint) → [bool](https://docs.python.org/3/library/functions.html#bool) Does an instruction with the specified feature use a value of the i-th operand? ### ida_idp.has_insn_feature(icode: uint16, bit: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) Does the specified instruction have the specified feature? ### ida_idp.is_call_insn(insn: insn_t const &) → [bool](https://docs.python.org/3/library/functions.html#bool) Is the instruction a “call”? ### ida_idp.IRI_EXTENDED Is the instruction a “return”? include instructions like “leave” that begin the function epilog ### ida_idp.IRI_RET_LITERALLY report only ‘ret’ instructions ### ida_idp.IRI_SKIP_RETTARGET exclude ‘ret’ instructions that have special targets (see set_ret_target in PC) ### ida_idp.IRI_STRICT ### ida_idp.is_ret_insn(\*args) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_idp.is_indirect_jump_insn(insn: insn_t const &) → [bool](https://docs.python.org/3/library/functions.html#bool) Is the instruction an indirect jump? ### ida_idp.is_basic_block_end(insn: insn_t const &, call_insn_stops_block: bool) → [bool](https://docs.python.org/3/library/functions.html#bool) Is the instruction the end of a basic block? ### *class* ida_idp.asm_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### flag *: [int](https://docs.python.org/3/library/functions.html#int)* Assembler feature bits #### uflag *: uint16* user defined flags (local only for IDP) you may define and use your own bits #### name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* Assembler name (displayed in menus). #### help *: help_t* Help screen number, 0 - no help. #### header *: char const \*const \** array of automatically generated header lines they appear at the start of disassembled text #### origin *: [str](https://docs.python.org/3/library/stdtypes.html#str)* org directive #### end *: [str](https://docs.python.org/3/library/stdtypes.html#str)* end directive #### cmnt *: [str](https://docs.python.org/3/library/stdtypes.html#str)* comment string (see also cmnt2) #### ascsep *: char* string literal delimiter #### accsep *: char* char constant delimiter #### esccodes *: [str](https://docs.python.org/3/library/stdtypes.html#str)* special chars that cannot appear as is in string and char literals #### a_ascii *: [str](https://docs.python.org/3/library/stdtypes.html#str)* string literal directive #### a_byte *: [str](https://docs.python.org/3/library/stdtypes.html#str)* byte directive #### a_word *: [str](https://docs.python.org/3/library/stdtypes.html#str)* word directive #### a_dword *: [str](https://docs.python.org/3/library/stdtypes.html#str)* nullptr if not allowed #### a_qword *: [str](https://docs.python.org/3/library/stdtypes.html#str)* nullptr if not allowed #### a_oword *: [str](https://docs.python.org/3/library/stdtypes.html#str)* nullptr if not allowed #### a_float *: [str](https://docs.python.org/3/library/stdtypes.html#str)* float; 4bytes; nullptr if not allowed #### a_double *: [str](https://docs.python.org/3/library/stdtypes.html#str)* double; 8bytes; nullptr if not allowed #### a_tbyte *: [str](https://docs.python.org/3/library/stdtypes.html#str)* long double; nullptr if not allowed #### a_packreal *: [str](https://docs.python.org/3/library/stdtypes.html#str)* packed decimal real nullptr if not allowed #### a_dups *: [str](https://docs.python.org/3/library/stdtypes.html#str)* array keyword. the following sequences may appear: \* #h header \* #d size \* #v value \* #s(b,w,l,q,f,d,o) size specifiers for byte,word, dword,qword, float,double,oword #### a_bss *: [str](https://docs.python.org/3/library/stdtypes.html#str)* uninitialized data directive should include ‘s’ for the size of data #### a_equ *: [str](https://docs.python.org/3/library/stdtypes.html#str)* ‘equ’ Used if AS_UNEQU is set #### a_seg *: [str](https://docs.python.org/3/library/stdtypes.html#str)* ‘seg ‘ prefix (example: push seg seg001) #### a_curip *: [str](https://docs.python.org/3/library/stdtypes.html#str)* current IP (instruction pointer) symbol in assembler #### a_public *: [str](https://docs.python.org/3/library/stdtypes.html#str)* “public” name keyword. nullptr-use default, “”-do not generate #### a_weak *: [str](https://docs.python.org/3/library/stdtypes.html#str)* “weak” name keyword. nullptr-use default, “”-do not generate #### a_extrn *: [str](https://docs.python.org/3/library/stdtypes.html#str)* “extern” name keyword #### a_comdef *: [str](https://docs.python.org/3/library/stdtypes.html#str)* “comm” (communal variable) #### a_align *: [str](https://docs.python.org/3/library/stdtypes.html#str)* “align” keyword #### lbrace *: char* left brace used in complex expressions #### rbrace *: char* right brace used in complex expressions #### a_mod *: [str](https://docs.python.org/3/library/stdtypes.html#str)* % mod assembler time operation #### a_band *: [str](https://docs.python.org/3/library/stdtypes.html#str)* & bit and assembler time operation #### a_bor *: [str](https://docs.python.org/3/library/stdtypes.html#str)* bit or assembler time operation
#### a_xor *: [str](https://docs.python.org/3/library/stdtypes.html#str)* ^ bit xor assembler time operation #### a_bnot *: [str](https://docs.python.org/3/library/stdtypes.html#str)* ~ bit not assembler time operation #### a_shl *: [str](https://docs.python.org/3/library/stdtypes.html#str)* << shift left assembler time operation #### a_shr *: [str](https://docs.python.org/3/library/stdtypes.html#str)* >> shift right assembler time operation #### a_sizeof_fmt *: [str](https://docs.python.org/3/library/stdtypes.html#str)* size of type (format string) #### flag2 *: [int](https://docs.python.org/3/library/functions.html#int)* Secondary assembler feature bits #### cmnt2 *: [str](https://docs.python.org/3/library/stdtypes.html#str)* comment close string (usually nullptr) this is used to denote a string which closes comments, for example, if the comments are represented with (\* … *) then cmnt = “(*” and cmnt2 = “ ``` * ``` )” #### low8 *: [str](https://docs.python.org/3/library/stdtypes.html#str)* low8 operation, should contain s for the operand #### high8 *: [str](https://docs.python.org/3/library/stdtypes.html#str)* high8 #### low16 *: [str](https://docs.python.org/3/library/stdtypes.html#str)* low16 #### high16 *: [str](https://docs.python.org/3/library/stdtypes.html#str)* high16 #### a_include_fmt *: [str](https://docs.python.org/3/library/stdtypes.html#str)* the include directive (format string) #### a_vstruc_fmt *: [str](https://docs.python.org/3/library/stdtypes.html#str)* if a named item is a structure and displayed in the verbose (multiline) form then display the name as printf(a_strucname_fmt, typename) (for asms with type checking, e.g. tasm ideal) #### a_rva *: [str](https://docs.python.org/3/library/stdtypes.html#str)* ‘rva’ keyword for image based offsets (see REFINFO_RVAOFF) #### a_yword *: [str](https://docs.python.org/3/library/stdtypes.html#str)* 32-byte (256-bit) data; nullptr if not allowed requires AS2_YWORD #### a_zword *: [str](https://docs.python.org/3/library/stdtypes.html#str)* 64-byte (512-bit) data; nullptr if not allowed requires AS2_ZWORD ### ida_idp.AS_OFFST offsets are ‘offset xxx’ ? ### ida_idp.AS_COLON create colons after data names ? ### ida_idp.AS_UDATA can use ‘?’ in data directives ### ida_idp.AS_2CHRE double char constants are: “xy ### ida_idp.AS_NCHRE char constants are: ‘x ### ida_idp.AS_N2CHR can’t have 2 byte char consts ### ida_idp.AS_1TEXT 1 text per line, no bytes ### ida_idp.AS_NHIAS no characters with high bit ### ida_idp.AS_NCMAS no commas in ascii directives ### ida_idp.AS_HEXFM mask - hex number format ### ida_idp.ASH_HEXF0 34h ### ida_idp.ASH_HEXF1 h’34 ### ida_idp.ASH_HEXF2 34 ### ida_idp.ASH_HEXF3 0x34 ### ida_idp.ASH_HEXF4 $34 ### ida_idp.ASH_HEXF5 <^R > (radix) ### ida_idp.AS_DECFM mask - decimal number format ### ida_idp.ASD_DECF0 34 ### ida_idp.ASD_DECF1 #34 ### ida_idp.ASD_DECF2 ### ida_idp.ASD_DECF3 .34 ### ida_idp.AS_OCTFM mask - octal number format ### ida_idp.ASO_OCTF0 123o ### ida_idp.ASO_OCTF1 0123 ### ida_idp.ASO_OCTF2 123 ### ida_idp.ASO_OCTF3 @123 ### ida_idp.ASO_OCTF4 o’123 ### ida_idp.ASO_OCTF5 123q ### ida_idp.ASO_OCTF6 ~123 ### ida_idp.ASO_OCTF7 q’123 ### ida_idp.AS_BINFM mask - binary number format ### ida_idp.ASB_BINF0 010101b ### ida_idp.ASB_BINF1 ^B010101 ### ida_idp.ASB_BINF2 %010101 ### ida_idp.ASB_BINF3 0b1010101 ### ida_idp.ASB_BINF4 b’1010101 ### ida_idp.ASB_BINF5 b’1010101’ ### ida_idp.AS_UNEQU replace undefined data items with EQU (for ANTA’s A80) ### ida_idp.AS_ONEDUP One array definition per line. ### ida_idp.AS_NOXRF Disable xrefs during the output file generation. ### ida_idp.AS_XTRNTYPE Assembler understands type of extern symbols as “:type” suffix. ### ida_idp.AS_RELSUP Checkarg: ‘and’,’or’,’xor’ operations with addresses are possible. ### ida_idp.AS_LALIGN Labels at “align” keyword are supported. ### ida_idp.AS_NOCODECLN don’t create colons after code names ### ida_idp.AS_NOSPACE No spaces in expressions. ### ida_idp.AS_ALIGN2 .align directive expects an exponent rather than a power of 2 (.align 5 means to align at 32byte boundary) ### ida_idp.AS_ASCIIC ascii directive accepts C-like escape sequences (n,x01 and similar) ### ida_idp.AS_ASCIIZ ascii directive inserts implicit zero byte at the end ### ida_idp.AS2_BRACE Use braces for all expressions. ### ida_idp.AS2_STRINV Invert meaning of idainfo::wide_high_byte_first for text strings (for processors with bytes bigger than 8 bits) ### ida_idp.AS2_BYTE1CHAR One symbol per processor byte. Meaningful only for wide byte processors ### ida_idp.AS2_IDEALDSCR Description of struc/union is in the ‘reverse’ form (keyword before name), the same as in borland tasm ideal ### ida_idp.AS2_TERSESTR ‘terse’ structure initialization form; NAME is supported ### ida_idp.AS2_COLONSUF addresses may have “:xx” suffix; this suffix must be ignored when extracting the address under the cursor ### ida_idp.AS2_YWORD a_yword field is present and valid ### ida_idp.AS2_ZWORD a_zword field is present and valid ### *class* ida_idp.unmapped_info_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### qualifier *: [str](https://docs.python.org/3/library/stdtypes.html#str)* #### symbol *: [str](https://docs.python.org/3/library/stdtypes.html#str)* The symbol “qualifier”. E.g., the path of a DyldSharedCache image. #### offset *: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)* The symbol thath is being targeted by the address - empty if no symbol was found. ### ida_idp.HKCB_GLOBAL is global event listener? if true, the listener will survive database closing and opening. it will stay in the memory until explicitly unhooked. otherwise the kernel will delete it as soon as the owner is unloaded. should be used only with PLUGIN_FIX plugins. ### ida_idp.PLFM_386 Intel 80x86. ### ida_idp.PLFM_Z80 8085, Z80 ### ida_idp.PLFM_I860 Intel 860. ### ida_idp.PLFM_8051 8051 ### ida_idp.PLFM_TMS Texas Instruments TMS320C5x. ### ida_idp.PLFM_6502 6502 ### ida_idp.PLFM_PDP PDP11. ### ida_idp.PLFM_68K Motorola 680x0. ### ida_idp.PLFM_JAVA Java. ### ida_idp.PLFM_6800 Motorola 68xx. ### ida_idp.PLFM_ST7 SGS-Thomson ST7. ### ida_idp.PLFM_MC6812 Motorola 68HC12. ### ida_idp.PLFM_MIPS MIPS. ### ida_idp.PLFM_ARM Advanced RISC Machines. ### ida_idp.PLFM_TMSC6 Texas Instruments TMS320C6x. ### ida_idp.PLFM_PPC PowerPC. ### ida_idp.PLFM_80196 Intel 80196. ### ida_idp.PLFM_Z8 Z8. ### ida_idp.PLFM_SH Renesas (formerly Hitachi) SuperH. ### ida_idp.PLFM_NET Microsoft Visual Studio.Net. ### ida_idp.PLFM_AVR Atmel 8-bit RISC processor(s). ### ida_idp.PLFM_H8 Hitachi H8/300, H8/2000. ### ida_idp.PLFM_PIC Microchip’s PIC. ### ida_idp.PLFM_SPARC SPARC. ### ida_idp.PLFM_ALPHA DEC Alpha. ### ida_idp.PLFM_HPPA Hewlett-Packard PA-RISC. ### ida_idp.PLFM_H8500 Hitachi H8/500. ### ida_idp.PLFM_TRICORE Tasking Tricore. ### ida_idp.PLFM_DSP56K Motorola DSP5600x. ### ida_idp.PLFM_C166 Siemens C166 family. ### ida_idp.PLFM_ST20 SGS-Thomson ST20. ### ida_idp.PLFM_IA64 Intel Itanium IA64. ### ida_idp.PLFM_I960 Intel 960. ### ida_idp.PLFM_F2MC Fujitsu F2MC-16. ### ida_idp.PLFM_TMS320C54 Texas Instruments TMS320C54xx. ### ida_idp.PLFM_TMS320C55 Texas Instruments TMS320C55xx. ### ida_idp.PLFM_TRIMEDIA Trimedia. ### ida_idp.PLFM_M32R Mitsubishi 32-bit RISC. ### ida_idp.PLFM_NEC_78K0 NEC 78K0. ### ida_idp.PLFM_NEC_78K0S NEC 78K0S. ### ida_idp.PLFM_M740 Mitsubishi 8bit. ### ida_idp.PLFM_M7700 Mitsubishi 16-bit. ### ida_idp.PLFM_ST9 ST9+. ### ida_idp.PLFM_FR Fujitsu FR Family. ### ida_idp.PLFM_MC6816 Motorola 68HC16. ### ida_idp.PLFM_M7900 Mitsubishi 7900. ### ida_idp.PLFM_TMS320C3 Texas Instruments TMS320C3. ### ida_idp.PLFM_KR1878 Angstrem KR1878. ### ida_idp.PLFM_AD218X Analog Devices ADSP 218X. ### ida_idp.PLFM_OAKDSP Atmel OAK DSP. ### ida_idp.PLFM_TLCS900 Toshiba TLCS-900. ### ida_idp.PLFM_C39 Rockwell C39. ### ida_idp.PLFM_CR16 NSC CR16. ### ida_idp.PLFM_MN102L00 Panasonic MN10200. ### ida_idp.PLFM_TMS320C1X Texas Instruments TMS320C1x. ### ida_idp.PLFM_NEC_V850X NEC V850 and V850ES/E1/E2. ### ida_idp.PLFM_SCR_ADPT Processor module adapter for processor modules written in scripting languages. ### ida_idp.PLFM_EBC EFI Bytecode. ### ida_idp.PLFM_MSP430 Texas Instruments MSP430. ### ida_idp.PLFM_SPU Cell Broadband Engine Synergistic Processor Unit. ### ida_idp.PLFM_DALVIK Android Dalvik Virtual Machine. ### ida_idp.PLFM_65C816 65802/65816 ### ida_idp.PLFM_M16C Renesas M16C. ### ida_idp.PLFM_ARC Argonaut RISC Core. ### ida_idp.PLFM_UNSP SunPlus unSP. ### ida_idp.PLFM_TMS320C28 Texas Instruments TMS320C28x. ### ida_idp.PLFM_DSP96K Motorola DSP96000. ### ida_idp.PLFM_SPC700 Sony SPC700. ### ida_idp.PLFM_AD2106X Analog Devices ADSP 2106X. ### ida_idp.PLFM_PIC16 Microchip’s 16-bit PIC. ### ida_idp.PLFM_S390 IBM’s S390. ### ida_idp.PLFM_XTENSA Tensilica Xtensa. ### ida_idp.PLFM_RISCV RISC-V. ### ida_idp.PLFM_RL78 Renesas RL78. ### ida_idp.PLFM_RX Renesas RX. ### ida_idp.PLFM_WASM WASM. ### ida_idp.PLFM_NDS32 Andes Technology NDS32. ### ida_idp.PLFM_MCORE Motorola M\*Core. ### ida_idp.PR_SEGS has segment registers? ### ida_idp.PR_USE32 supports 32-bit addressing? ### ida_idp.PR_DEFSEG32 segments are 32-bit by default ### ida_idp.PR_RNAMESOK allow user register names for location names ### ida_idp.PR_ADJSEGS IDA may adjust segments’ starting/ending addresses. ### ida_idp.PR_DEFNUM mask - default number representation ### ida_idp.PRN_HEX hex ### ida_idp.PRN_OCT octal ### ida_idp.PRN_DEC decimal ### ida_idp.PRN_BIN binary ### ida_idp.PR_WORD_INS instruction codes are grouped 2bytes in binary line prefix ### ida_idp.PR_NOCHANGE The user can’t change segments and code/data attributes (display only) ### ida_idp.PR_ASSEMBLE Module has a built-in assembler and will react to ev_assemble. ### ida_idp.PR_ALIGN All data items should be aligned properly. ### ida_idp.PR_TYPEINFO the processor module fully supports type information callbacks; without full support, function argument locations and other things will probably be wrong. ### ida_idp.PR_USE64 supports 64-bit addressing? ### ida_idp.PR_SGROTHER the segment registers don’t contain the segment selectors. ### ida_idp.PR_STACK_UP the stack grows up ### ida_idp.PR_BINMEM the processor module provides correct segmentation for binary files (i.e. it creates additional segments). The kernel will not ask the user to specify the RAM/ROM sizes ### ida_idp.PR_SEGTRANS the processor module supports the segment translation feature (meaning it calculates the code addresses using the map_code_ea() function) ### ida_idp.PR_CHK_XREF don’t allow near xrefs between segments with different bases ### ida_idp.PR_NO_SEGMOVE the processor module doesn’t support move_segm() (i.e. the user can’t move segments) ### ida_idp.PR_USE_ARG_TYPES use processor_t::use_arg_types callback ### ida_idp.PR_SCALE_STKVARS use processor_t::get_stkvar_scale callback ### ida_idp.PR_DELAYED has delayed jumps and calls. If this flag is set, processor_t::is_basic_block_end, processor_t::delay_slot_insn should be implemented ### ida_idp.PR_ALIGN_INSN allow ida to create alignment instructions arbitrarily. Since these instructions might lead to other wrong instructions and spoil the listing, IDA does not create them by default anymore ### ida_idp.PR_PURGING there are calling conventions which may purge bytes from the stack ### ida_idp.PR_CNDINSNS has conditional instructions ### ida_idp.PR_USE_TBYTE BTMT_SPECFLT means \_TBYTE type ### ida_idp.PR_DEFSEG64 segments are 64-bit by default ### ida_idp.PR_OUTER has outer operands (currently only mc68k) ### ida_idp.PR2_MAPPINGS the processor module uses memory mapping ### ida_idp.PR2_IDP_OPTS the module has processor-specific configuration options ### ida_idp.PR2_CODE16_BIT low bit of code addresses has special meaning e.g. ARM Thumb, MIPS16 ### ida_idp.PR2_MACRO processor supports macro instructions ### ida_idp.PR2_USE_CALCREL (Lumina) the module supports calcrel info ### ida_idp.PR2_REL_BITS (Lumina) calcrel info has bits granularity, not bytes - construction flag only ### ida_idp.PR2_FORCE_16BIT use 16-bit basic types despite of 32-bit segments (used by c166) ### ida_idp.PR2_IGNORE_IDA_GUESS allow to create items inside the IDA-guessed data arrays ### ida_idp.OP_FP_BASED operand is FP based ### ida_idp.OP_SP_BASED operand is SP based ### ida_idp.OP_SP_ADD operand value is added to the pointer ### ida_idp.OP_SP_SUB operand value is subtracted from the pointer ### ida_idp.CUSTOM_INSN_ITYPE Custom instruction codes defined by processor extension plugins must be greater than or equal to this ### ida_idp.REG_SPOIL processor_t::use_regarg_type uses this bit in the return value to indicate that the register value has been spoiled ### ida_idp.get_ph() → processor_t \* ### ida_idp.get_ash() → asm_t \* ### ida_idp.str2reg(p: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [int](https://docs.python.org/3/library/functions.html#int) Get any register number (-1 on error). ### ida_idp.is_align_insn(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [int](https://docs.python.org/3/library/functions.html#int) If the instruction at ‘ea’ looks like an alignment instruction, return its length in bytes. Otherwise return 0. ### ida_idp.get_reg_name(reg: [int](https://docs.python.org/3/library/functions.html#int), width: [int](https://docs.python.org/3/library/functions.html#int), reghi: [int](https://docs.python.org/3/library/functions.html#int) = -1) → [str](https://docs.python.org/3/library/stdtypes.html#str) Get text representation of a register. For most processors this function will just return processor_t::reg_names[reg]. If the processor module has implemented processor_t::get_reg_name, it will be used instead * **Parameters:** * **reg** – internal register number as defined in the processor module * **width** – register width in bytes * **reghi** – if specified, then this function will return the register pair * **Returns:** length of register name in bytes or -1 if failure ### *class* ida_idp.reg_info_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### reg *: [int](https://docs.python.org/3/library/functions.html#int)* register number #### size *: [int](https://docs.python.org/3/library/functions.html#int)* register size #### compare(r: [reg_info_t](#ida_idp.reg_info_t)) → [int](https://docs.python.org/3/library/functions.html#int) ### ida_idp.parse_reg_name(ri: [reg_info_t](#ida_idp.reg_info_t), regname: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [bool](https://docs.python.org/3/library/functions.html#bool) Get register info by name. * **Parameters:** * **ri** – result * **regname** – name of register * **Returns:** success ### ida_idp.NO_ACCESS ### ida_idp.WRITE_ACCESS ### ida_idp.READ_ACCESS ### ida_idp.RW_ACCESS ### *class* ida_idp.reg_access_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### regnum *: [int](https://docs.python.org/3/library/functions.html#int)* register number (only entire registers) #### range *: [bitrange_t](../ida_bitrange/index.md#ida_bitrange.bitrange_t)* bitrange inside the register #### access_type *: access_type_t* #### opnum *: uchar* operand number #### have_common_bits(r: [reg_access_t](#ida_idp.reg_access_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### *class* ida_idp.reg_accesses_t Bases: [`reg_access_vec_t`](#ida_idp.reg_access_vec_t) #### thisown ### ida_idp.SETPROC_IDB set processor type for old idb ### ida_idp.SETPROC_LOADER set processor type for new idb; if the user has specified a compatible processor, return success without changing it. if failure, call loader_failure() ### ida_idp.SETPROC_LOADER_NON_FATAL the same as SETPROC_LOADER but non-fatal failures. ### ida_idp.SETPROC_USER set user-specified processor used for -p and manual processor change at later time ### ida_idp.set_processor_type(procname: [str](https://docs.python.org/3/library/stdtypes.html#str), level: setproc_level_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Set target processor type. Once a processor module is loaded, it cannot be replaced until we close the idb. * **Parameters:** * **procname** – name of processor type (one of names present in processor_t::psnames) * **level** – ``` SETPROC_ ``` * **Returns:** success ### ida_idp.get_idp_name() → [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None) Get name of the current processor module. The name is derived from the file name. For example, for IBM PC the module is named “pc.w32” (windows version), then the module name is “PC” (uppercase). If no processor module is loaded, this function will return nullptr ### ida_idp.set_target_assembler(asmnum: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) Set target assembler. * **Parameters:** **asmnum** – number of assembler in the current processor module * **Returns:** success ### ida_idp.LTC_NONE no event (internal use) ### ida_idp.LTC_ADDED added a local type ### ida_idp.LTC_DELETED deleted a local type ### ida_idp.LTC_EDITED edited a local type ### ida_idp.LTC_ALIASED added a type alias ### ida_idp.LTC_COMPILER changed the compiler and calling convention ### ida_idp.LTC_TIL_LOADED loaded a til file ### ida_idp.LTC_TIL_UNLOADED unloaded a til file ### ida_idp.LTC_TIL_COMPACTED numbered types have been compacted compact_numbered_types() ### ida_idp.closebase ### ida_idp.savebase ### ida_idp.upgraded ### ida_idp.auto_empty ### ida_idp.auto_empty_finally ### ida_idp.determined_main ### ida_idp.extlang_changed ### ida_idp.idasgn_loaded ### ida_idp.kernel_config_loaded ### ida_idp.loader_finished ### ida_idp.flow_chart_created ### ida_idp.compiler_changed ### ida_idp.changing_ti ### ida_idp.ti_changed ### ida_idp.changing_op_ti ### ida_idp.op_ti_changed ### ida_idp.changing_op_type ### ida_idp.op_type_changed ### ida_idp.segm_added ### ida_idp.deleting_segm ### ida_idp.segm_deleted ### ida_idp.changing_segm_start ### ida_idp.segm_start_changed ### ida_idp.changing_segm_end ### ida_idp.segm_end_changed ### ida_idp.changing_segm_name ### ida_idp.segm_name_changed ### ida_idp.changing_segm_class ### ida_idp.segm_class_changed ### ida_idp.segm_attrs_updated ### ida_idp.segm_moved ### ida_idp.allsegs_moved ### ida_idp.func_added ### ida_idp.func_updated ### ida_idp.set_func_start ### ida_idp.set_func_end ### ida_idp.deleting_func ### ida_idp.frame_deleted ### ida_idp.thunk_func_created ### ida_idp.func_tail_appended ### ida_idp.deleting_func_tail ### ida_idp.func_tail_deleted ### ida_idp.tail_owner_changed ### ida_idp.func_noret_changed ### ida_idp.stkpnts_changed ### ida_idp.updating_tryblks ### ida_idp.tryblks_updated ### ida_idp.deleting_tryblks ### ida_idp.sgr_changed ### ida_idp.make_code ### ida_idp.make_data ### ida_idp.destroyed_items ### ida_idp.renamed ### ida_idp.byte_patched ### ida_idp.changing_cmt ### ida_idp.cmt_changed ### ida_idp.changing_range_cmt ### ida_idp.range_cmt_changed ### ida_idp.extra_cmt_changed ### ida_idp.item_color_changed ### ida_idp.callee_addr_changed ### ida_idp.bookmark_changed ### ida_idp.sgr_deleted ### ida_idp.adding_segm ### ida_idp.func_deleted ### ida_idp.dirtree_mkdir ### ida_idp.dirtree_rmdir ### ida_idp.dirtree_link ### ida_idp.dirtree_move ### ida_idp.dirtree_rank ### ida_idp.dirtree_rminode ### ida_idp.dirtree_segm_moved ### ida_idp.local_types_changed ### ida_idp.lt_udm_created ### ida_idp.lt_udm_deleted ### ida_idp.lt_udm_renamed ### ida_idp.lt_udm_changed ### ida_idp.lt_udt_expanded ### ida_idp.frame_created ### ida_idp.frame_udm_created ### ida_idp.frame_udm_deleted ### ida_idp.frame_udm_renamed ### ida_idp.frame_udm_changed ### ida_idp.frame_expanded ### ida_idp.idasgn_matched_ea ### ida_idp.lt_edm_created ### ida_idp.lt_edm_deleted ### ida_idp.lt_edm_renamed ### ida_idp.lt_edm_changed ### ida_idp.local_type_renamed ### ida_idp.dirtree_ordering_changed ### ida_idp.dirtree_bulk_move ### ida_idp.segment_added ### ida_idp.changing_segment_start ### ida_idp.segment_start_changed ### ida_idp.changing_segment_end ### ida_idp.segment_end_changed ### ida_idp.changing_segment_name ### ida_idp.segment_name_changed ### ida_idp.changing_segment_class ### ida_idp.segment_class_changed ### ida_idp.segment_attrs_updated ### ida_idp.function_added ### ida_idp.function_updated ### ida_idp.set_function_start ### ida_idp.set_function_end ### ida_idp.deleting_function ### ida_idp.function_tail_appended ### ida_idp.deleting_function_tail ### ida_idp.function_tail_deleted ### ida_idp.function_tail_owner_changed ### ida_idp.function_noret_changed ### ida_idp.function_stkpnts_changed ### ida_idp.thunk_function_created ### ida_idp.function_frame_deleted ### ida_idp.moving_range_cmt ### ida_idp.gen_idb_event(\*args) → [None](https://docs.python.org/3/library/constants.html#None) the kernel will use this function to generate idb_events ### ida_idp.IDPOPT_CST ### ida_idp.IDPOPT_JVL ### ida_idp.IDPOPT_PRI_DEFAULT ### ida_idp.IDPOPT_PRI_HIGH ### ida_idp.IDPOPT_NUM_INT ### ida_idp.IDPOPT_NUM_CHAR ### ida_idp.IDPOPT_NUM_SHORT ### ida_idp.IDPOPT_NUM_RANGE ### ida_idp.IDPOPT_NUM_UNS ### ida_idp.IDPOPT_BIT_UINT ### ida_idp.IDPOPT_BIT_UCHAR ### ida_idp.IDPOPT_BIT_USHORT ### ida_idp.IDPOPT_BIT_BOOL ### ida_idp.IDPOPT_STR_QSTRING ### ida_idp.IDPOPT_STR_LONG ### ida_idp.IDPOPT_I64_RANGE ### ida_idp.IDPOPT_I64_UNS ### ida_idp.IDPOPT_CST_PARAMS ### ida_idp.IDPOPT_MBROFF ### *class* ida_idp.num_range_t(\_min: int64, \_max: int64) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### minval *: int64* #### maxval *: int64* ### *class* ida_idp.params_t(\_p1: int64, \_p2: int64) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### p1 *: int64* #### p2 *: int64* ### ida_idp.cik_string ### ida_idp.cik_filename ### ida_idp.cik_path ### ida_idp.register_cfgopts(opts: cfgopt_t const [], nopts: int, cb: config_changed_cb_t \* = None, obj: void \* = None) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_idp.get_config_value(key: [str](https://docs.python.org/3/library/stdtypes.html#str)) → jvalue_t \* ### ida_idp.cfg_get_cc_parm(compid: comp_t, name: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [str](https://docs.python.org/3/library/stdtypes.html#str) ### ida_idp.cfg_get_cc_header_path(compid: comp_t) → [str](https://docs.python.org/3/library/stdtypes.html#str) ### ida_idp.cfg_get_cc_predefined_macros(compid: comp_t) → [str](https://docs.python.org/3/library/stdtypes.html#str) ### ida_idp.process_config_directive(directive: [str](https://docs.python.org/3/library/stdtypes.html#str), priority: [int](https://docs.python.org/3/library/functions.html#int) = 2) → [None](https://docs.python.org/3/library/constants.html#None) ### ida_idp.AssembleLine(ea, cs, ip, use32, line) Assemble an instruction to a string (display a warning if an error is found) * **Parameters:** * **ea** – linear address of instruction * **cs** – cs of instruction * **ip** – ip of instruction * **use32** – is 32bit segment * **line** – line to assemble * **Returns:** a string containing the assembled instruction, or None on failure ### ida_idp.assemble(ea, cs, ip, use32, line) Assemble an instruction into the database (display a warning if an error is found) * **Parameters:** * **ea** – linear address of instruction * **cs** – cs of instruction * **ip** – ip of instruction * **use32** – is 32bit segment? * **line** – line to assemble * **Returns:** Boolean. True on success. ### ida_idp.ph_get_id() Returns the ‘ph.id’ field ### ida_idp.ph_get_version() Returns the ‘ph.version’ ### ida_idp.ph_get_flag() Returns the ‘ph.flag’ ### ida_idp.ph_get_cnbits() Returns the ‘ph.cnbits’ ### ida_idp.ph_get_dnbits() Returns the ‘ph.dnbits’ ### ida_idp.ph_get_reg_first_sreg() Returns the ‘ph.reg_first_sreg’ ### ida_idp.ph_get_reg_last_sreg() Returns the ‘ph.reg_last_sreg’ ### ida_idp.ph_get_segreg_size() Returns the ‘ph.segreg_size’ ### ida_idp.ph_get_reg_code_sreg() Returns the ‘ph.reg_code_sreg’ ### ida_idp.ph_get_reg_data_sreg() Returns the ‘ph.reg_data_sreg’ ### ida_idp.ph_get_icode_return() Returns the ‘ph.icode_return’ ### ida_idp.ph_get_instruc_start() Returns the ‘ph.instruc_start’ ### ida_idp.ph_get_instruc_end() Returns the ‘ph.instruc_end’ ### ida_idp.ph_get_tbyte_size() Returns the ‘ph.tbyte_size’ field as defined in he processor module ### ida_idp.ph_get_instruc() Returns a list of tuples (instruction_name, instruction_feature) containing the instructions list as defined in he processor module ### ida_idp.ph_get_regnames() Returns the list of register names as defined in the processor module ### ida_idp.ph_get_operand_info(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), n: [int](https://docs.python.org/3/library/functions.html#int)) → Tuple[[int](https://docs.python.org/3/library/functions.html#int), [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), [int](https://docs.python.org/3/library/functions.html#int), [int](https://docs.python.org/3/library/functions.html#int), [int](https://docs.python.org/3/library/functions.html#int)] | [None](https://docs.python.org/3/library/constants.html#None) Returns the operand information given an ea and operand number. * **Parameters:** * **ea** – address * **n** – operand number * **Returns:** Returns an idd_opinfo_t as a tuple: (modified, ea, reg_ival, regidx, value_size). Please refer to idd_opinfo_t structure in the SDK. ### ida_idp.ph_calcrel(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → bytevec_t \*, size_t \* ### ida_idp.ph_find_reg_value(insn: insn_t const &, reg: int) → uint64 \* ### ida_idp.ph_find_op_value(insn: insn_t const &, op: int) → uint64 \* ### ida_idp.ph_get_reg_accesses(accvec: reg_accesses_t, insn: insn_t const &, flags: int) → ssize_t ### ida_idp.ph_get_abi_info(comp: comp_t) → qstrvec_t \*, qstrvec_t \* ### *class* ida_idp.IDP_Hooks(\_flags: [int](https://docs.python.org/3/library/functions.html#int) = 0, \_hkcb_flags: [int](https://docs.python.org/3/library/functions.html#int) = 1) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### hook() → [bool](https://docs.python.org/3/library/functions.html#bool) #### unhook() → [bool](https://docs.python.org/3/library/functions.html#bool) #### ev_init(idp_modname: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [int](https://docs.python.org/3/library/functions.html#int) The IDP module is just loaded. * **Parameters:** **idp_modname** – (const char ``` * ``` ) processor module name * **Returns:** <0: on failure #### ev_term() → [int](https://docs.python.org/3/library/functions.html#int) The IDP module is being unloaded. #### ev_newprc(pnum: [int](https://docs.python.org/3/library/functions.html#int), keep_cfg: [bool](https://docs.python.org/3/library/functions.html#bool)) → [int](https://docs.python.org/3/library/functions.html#int) Before changing processor type. * **Parameters:** * **pnum** – (int) processor number in the array of processor names * **keep_cfg** – (bool) true: do not modify kernel configuration * **Returns:** 1: ok * **Returns:** <0: prohibit #### ev_newasm(asmnum: [int](https://docs.python.org/3/library/functions.html#int)) → [int](https://docs.python.org/3/library/functions.html#int) Before setting a new assembler. * **Parameters:** **asmnum** – (int) See also ev_asm_installed #### ev_newfile(fname: char \*) → [int](https://docs.python.org/3/library/functions.html#int) A new file has been loaded. * **Parameters:** **fname** – (char ``` * ``` ) input file name #### ev_oldfile(fname: char \*) → [int](https://docs.python.org/3/library/functions.html#int) An old file has been loaded. * **Parameters:** **fname** – (char ``` * ``` ) input file name #### ev_newbinary(filename: char \*, fileoff: qoff64_t, basepara: ida_idaapi.ea_t, binoff: ida_idaapi.ea_t, nbytes: uint64) → [int](https://docs.python.org/3/library/functions.html#int) IDA is about to load a binary file. * **Parameters:** * **filename** – (char ``` * ``` ) binary file name * **fileoff** – (qoff64_t) offset in the file * **basepara** – (ea_t) base loading paragraph * **binoff** – (ea_t) loader offset * **nbytes** – (uint64) number of bytes to load #### ev_endbinary(ok: [bool](https://docs.python.org/3/library/functions.html#bool)) → [int](https://docs.python.org/3/library/functions.html#int) IDA has loaded a binary file. * **Parameters:** **ok** – (bool) file loaded successfully? #### ev_set_idp_options(keyword: str, value_type: int, value: void const \*, idb_loaded: bool) → [int](https://docs.python.org/3/library/functions.html#int) Set IDP-specific configuration option Also see set_options_t in config.hpp * **Parameters:** * **keyword** – (const char ``` * ``` ) * **value_type** – (int) * **value** – (const void ``` * ``` ) * **idb_loaded** – (bool) true if the ev_oldfile/ev_newfile events have been generated * **Returns:** 1: ok * **Returns:** 0: not implemented * **Returns:** -1: error (and message in errbuf) #### ev_set_proc_options(options: [str](https://docs.python.org/3/library/stdtypes.html#str), confidence: [int](https://docs.python.org/3/library/functions.html#int)) → [int](https://docs.python.org/3/library/functions.html#int) Called if the user specified an option string in the command line: -p:. Can be used for setting a processor subtype. Also called if option string is passed to set_processor_type() and IDC’s SetProcessorType(). * **Parameters:** * **options** – (const char ``` * ``` ) * **confidence** – (int) 0: loader’s suggestion 1: user’s decision * **Returns:** <0: if bad option string #### ev_ana_insn(out: insn_t \*) → [bool](https://docs.python.org/3/library/functions.html#bool) Analyze one instruction and fill ‘out’ structure. This function shouldn’t change the database, flags or anything else. All these actions should be performed only by emu_insn() function. insn_t::ea contains address of instruction to analyze. * **Parameters:** **out** – (insn_t ``` * ``` ) * **Returns:** length of the instruction in bytes, 0 if instruction can’t be decoded. * **Returns:** 0: if instruction can’t be decoded. #### ev_emu_insn(insn: insn_t const \*) → [bool](https://docs.python.org/3/library/functions.html#bool) 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. * **Parameters:** **insn** – (const insn_t ``` * ``` ) * **Returns:** 1: ok * **Returns:** -1: the kernel will delete the instruction #### ev_out_header(outctx: outctx_t \*) → [int](https://docs.python.org/3/library/functions.html#int) Function to produce start of disassembled text * **Parameters:** **outctx** – (outctx_t ``` * ``` ) * **Returns:** void: #### ev_out_footer(outctx: outctx_t \*) → [int](https://docs.python.org/3/library/functions.html#int) Function to produce end of disassembled text * **Parameters:** **outctx** – (outctx_t ``` * ``` ) * **Returns:** void: #### ev_out_segstart(outctx: outctx_t \*, seg: segment_t \*) → [int](https://docs.python.org/3/library/functions.html#int) Function to produce start of segment * **Parameters:** * **outctx** – (outctx_t ``` * ``` ) * **seg** – (segment_t ``` * ``` ) * **Returns:** 1: ok * **Returns:** 0: not implemented #### ev_out_segend(outctx: outctx_t \*, seg: segment_t \*) → [int](https://docs.python.org/3/library/functions.html#int) Function to produce end of segment * **Parameters:** * **outctx** – (outctx_t ``` * ``` ) * **seg** – (segment_t ``` * ``` ) * **Returns:** 1: ok * **Returns:** 0: not implemented #### ev_out_assumes(outctx: outctx_t \*) → [int](https://docs.python.org/3/library/functions.html#int) Function to produce assume directives when segment register value changes. * **Parameters:** **outctx** – (outctx_t ``` * ``` ) * **Returns:** 1: ok * **Returns:** 0: not implemented #### ev_out_insn(outctx: outctx_t \*) → [bool](https://docs.python.org/3/library/functions.html#bool) Generate text representation of an instruction in ‘ctx.insn’ outctx_t provides functions to output the generated text. This function shouldn’t change the database, flags or anything else. All these actions should be performed only by emu_insn() function. * **Parameters:** **outctx** – (outctx_t ``` * ``` ) * **Returns:** void: #### ev_out_mnem(outctx: outctx_t \*) → [int](https://docs.python.org/3/library/functions.html#int) Generate instruction mnemonics. This callback should append the colored mnemonics to ctx.outbuf Optional notification, if absent, out_mnem will be called. * **Parameters:** **outctx** – (outctx_t ``` * ``` ) * **Returns:** 1: if appended the mnemonics * **Returns:** 0: not implemented #### ev_out_operand(outctx: outctx_t \*, op: op_t const \*) → [bool](https://docs.python.org/3/library/functions.html#bool) Generate text representation of an instruction operand outctx_t provides functions to output the generated text. All these actions should be performed only by emu_insn() function. * **Parameters:** * **outctx** – (outctx_t ``` * ``` ) * **op** – (const op_t ``` * ``` ) * **Returns:** 1: ok * **Returns:** -1: operand is hidden #### ev_out_data(outctx: outctx_t \*, analyze_only: bool) → [int](https://docs.python.org/3/library/functions.html#int) Generate text representation of data items This function may change the database and create cross-references if analyze_only is set * **Parameters:** * **outctx** – (outctx_t ``` * ``` ) * **analyze_only** – (bool) * **Returns:** 1: ok * **Returns:** 0: not implemented #### ev_out_label(outctx: outctx_t \*, colored_name: str) → [int](https://docs.python.org/3/library/functions.html#int) The kernel is going to generate an instruction label line or a function header. * **Parameters:** * **outctx** – (outctx_t ``` * ``` ) * **colored_name** – (const char ``` * ``` ) * **Returns:** <0: if the kernel should not generate the label * **Returns:** 0: not implemented or continue #### ev_out_special_item(outctx: outctx_t \*, segtype: uchar) → [int](https://docs.python.org/3/library/functions.html#int) Generate text representation of an item in a special segment i.e. absolute symbols, externs, communal definitions etc * **Parameters:** * **outctx** – (outctx_t ``` * ``` ) * **segtype** – (uchar) * **Returns:** 1: ok * **Returns:** 0: not implemented * **Returns:** -1: overflow #### ev_gen_regvar_def(outctx: outctx_t \*, v: regvar_t \*) → [int](https://docs.python.org/3/library/functions.html#int) Generate register variable definition line. * **Parameters:** * **outctx** – (outctx_t ``` * ``` ) * **v** – (regvar_t ``` * ``` ) * **Returns:** >0: ok, generated the definition text * **Returns:** 0: not implemented #### ev_gen_src_file_lnnum(outctx: outctx_t \*, file: str, lnnum: int) → [int](https://docs.python.org/3/library/functions.html#int) Callback: generate analog of: : #line 123 * **Parameters:** * **outctx** – (outctx_t ``` * ``` ) output context * **file** – (const char ``` * ``` ) source file (may be nullptr) * **lnnum** – (size_t) line number * **Returns:** 1: directive has been generated * **Returns:** 0: not implemented #### ev_creating_segm(seg: segment_t \*) → [int](https://docs.python.org/3/library/functions.html#int) A new segment is about to be created. * **Parameters:** **seg** – (segment_t ``` * ``` ) * **Returns:** 1: ok * **Returns:** <0: segment should not be created #### ev_moving_segm(seg: segment_t \*, to: ida_idaapi.ea_t, flags: int) → [int](https://docs.python.org/3/library/functions.html#int) May the kernel move the segment? * **Parameters:** * **seg** – (segment_t ``` * ``` ) segment to move * **to** – (ea_t) new segment start address * **flags** – (int) combination of Move segment flags * **Returns:** 0: yes * **Returns:** <0: the kernel should stop #### ev_coagulate(start_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [int](https://docs.python.org/3/library/functions.html#int) Try to define some unexplored bytes. This notification will be called if the kernel tried all possibilities and could not find anything more useful than to convert to array of bytes. The module can help the kernel and convert the bytes into something more useful. * **Parameters:** **start_ea** – (ea_t) * **Returns:** number of converted bytes #### ev_undefine(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [int](https://docs.python.org/3/library/functions.html#int) An item in the database (insn or data) is being deleted. * **Parameters:** **ea** – (ea_t) * **Returns:** 1: do not delete srranges at the item end * **Returns:** 0: srranges can be deleted #### ev_treat_hindering_item(hindering_item_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), new_item_flags: flags64_t, new_item_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), new_item_length: asize_t) → [int](https://docs.python.org/3/library/functions.html#int) An item hinders creation of another item. * **Parameters:** * **hindering_item_ea** – (ea_t) * **new_item_flags** – (flags64_t) (0 for code) * **new_item_ea** – (ea_t) * **new_item_length** – (asize_t) * **Returns:** 0: no reaction * **Returns:** !=0: the kernel may delete the hindering item #### ev_rename(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), new_name: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [int](https://docs.python.org/3/library/functions.html#int) The kernel is going to rename a byte. * **Parameters:** * **ea** – (ea_t) * **new_name** – (const char ``` * ``` ) * **Returns:** <0: if the kernel should not rename it. * **Returns:** 2: to inhibit the notification. I.e., the kernel should not rename, but ‘set_name()’ should return ‘true’. also see renamed the return value is ignored when kernel is going to delete name #### ev_is_far_jump(icode: [int](https://docs.python.org/3/library/functions.html#int)) → [int](https://docs.python.org/3/library/functions.html#int) is indirect far jump or call instruction? meaningful only if the processor has ‘near’ and ‘far’ reference types * **Parameters:** **icode** – (int) * **Returns:** 0: not implemented * **Returns:** 1: yes * **Returns:** -1: no #### ev_is_sane_insn(insn: insn_t const \*, no_crefs: int) → [int](https://docs.python.org/3/library/functions.html#int) Is the instruction sane for the current file type? * **Parameters:** * **insn** – (const insn_t\*) the instruction * **no_crefs** – (int) 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:** >=0: ok * **Returns:** <0: no, the instruction isn’t likely to appear in the program #### ev_is_cond_insn(insn: insn_t const \*) → [int](https://docs.python.org/3/library/functions.html#int) Is conditional instruction? * **Parameters:** **insn** – (const insn_t ``` * ``` ) instruction address * **Returns:** 1: yes * **Returns:** -1: no * **Returns:** 0: not implemented or not instruction #### ev_is_call_insn(insn: insn_t const \*) → [int](https://docs.python.org/3/library/functions.html#int) Is the instruction a “call”? * **Parameters:** **insn** – (const insn_t ``` * ``` ) instruction * **Returns:** 0: unknown * **Returns:** <0: no * **Returns:** 1: yes #### ev_is_ret_insn(insn: insn_t const \*, flags: uchar) → [int](https://docs.python.org/3/library/functions.html#int) Is the instruction a “return”? * **Parameters:** * **insn** – (const insn_t ``` * ``` ) instruction * **flags** – (uchar), combination of ``` IRI_ ``` … flags (see above) * **Returns:** 0: unknown * **Returns:** <0: no * **Returns:** 1: yes #### ev_may_be_func(insn: insn_t const \*, state: int) → [int](https://docs.python.org/3/library/functions.html#int) Can a function start here? * **Parameters:** * **insn** – (const insn_t\*) the instruction * **state** – (int) autoanalysis phase 0: creating functions 1: creating chunks * **Returns:** probability 1..100 #### ev_is_basic_block_end(insn: insn_t const \*, call_insn_stops_block: bool) → [int](https://docs.python.org/3/library/functions.html#int) Is the current instruction end of a basic block? This function should be defined for processors with delayed jump slots. * **Parameters:** * **insn** – (const insn_t\*) the instruction * **call_insn_stops_block** – (bool) * **Returns:** 0: unknown * **Returns:** <0: no * **Returns:** 1: yes #### ev_is_indirect_jump(insn: insn_t const \*) → [int](https://docs.python.org/3/library/functions.html#int) Determine if instruction is an indirect jump. If CF_JUMP bit cannot describe all jump types jumps, please define this callback. * **Parameters:** **insn** – (const insn_t\*) the instruction * **Returns:** 0: use CF_JUMP * **Returns:** 1: no * **Returns:** 2: yes #### ev_is_insn_table_jump() → [int](https://docs.python.org/3/library/functions.html#int) Reserved. #### ev_is_switch(si: switch_info_t, insn: insn_t const \*) → [int](https://docs.python.org/3/library/functions.html#int) Find ‘switch’ idiom or override processor module’s decision. It will be called for instructions marked with CF_JUMP. * **Parameters:** * **si** – (switch_info_t ``` * ``` ), out * **insn** – (const insn_t ``` * ``` ) instruction possibly belonging to a switch * **Returns:** 1: switch is found, ‘si’ is filled. IDA will create the switch using the filled ‘si’ * **Returns:** -1: no switch found. This value forbids switch creation by the processor module * **Returns:** 0: not implemented #### ev_calc_switch_cases(casevec: casevec_t \*, targets: eavec_t \*, insn_ea: ida_idaapi.ea_t, si: switch_info_t) → [int](https://docs.python.org/3/library/functions.html#int) Calculate case values and targets for a custom jump table. * **Parameters:** * **casevec** – (::casevec_t ``` * ``` ) vector of case values (may be nullptr) * **targets** – (eavec_t ``` * ``` ) corresponding target addresses (my be nullptr) * **insn_ea** – (ea_t) address of the ‘indirect jump’ instruction * **si** – (switch_info_t ``` * ``` ) switch information * **Returns:** 1: ok * **Returns:** <=0: failed #### ev_create_switch_xrefs(jumpea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), si: [switch_info_t](../ida_nalt/index.md#ida_nalt.switch_info_t)) → [int](https://docs.python.org/3/library/functions.html#int) Create xrefs for a custom jump table. * **Parameters:** * **jumpea** – (ea_t) address of the jump insn * **si** – (const switch_info_t ``` * ``` ) switch information * **Returns:** must return 1 Must be implemented if module uses custom jump tables, SWI_CUSTOM #### ev_is_align_insn(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [int](https://docs.python.org/3/library/functions.html#int) Is the instruction created only for alignment purposes?. Do not directly call this function, use is_align_insn() * **Parameters:** **ea** – (ea_t) - instruction address * **Returns:** number: of bytes in the instruction #### ev_is_alloca_probe(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [int](https://docs.python.org/3/library/functions.html#int) Does the function at ‘ea’ behave like \_\_alloca_probe? * **Parameters:** **ea** – (ea_t) * **Returns:** 1: yes * **Returns:** 0: no #### ev_delay_slot_insn(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), bexec: [bool](https://docs.python.org/3/library/functions.html#bool), fexec: [bool](https://docs.python.org/3/library/functions.html#bool)) → PyObject \* Get delay slot instruction * **Parameters:** * **ea** – (ea_t ``` * ``` ) in: instruction address in question, out: (if the answer is positive) if the delay slot contains valid insn: the address of the delay slot insn else: BADADDR (invalid insn, e.g. a branch) * **bexec** – (bool ``` * ``` ) execute slot if jumping, initially set to ‘true’ * **fexec** – (bool ``` * ``` ) execute slot if not jumping, initially set to ‘true’ * **Returns:** 1: positive answer * **Returns:** <=0: ordinary insn #### ev_is_sp_based(mode: int \*, insn: insn_t const \*, op: op_t const \*) → [int](https://docs.python.org/3/library/functions.html#int) Check whether the operand is relative to stack pointer or frame pointer This event is used to determine how to output a stack variable If not implemented, then all operands are sp based by default. Implement this event only if some stack references use frame pointer instead of stack pointer. * **Parameters:** * **mode** – (int ``` * ``` ) out, combination of SP/FP operand flags * **insn** – (const insn_t ``` * ``` ) * **op** – (const op_t ``` * ``` ) * **Returns:** 0: not implemented * **Returns:** 1: ok #### ev_can_have_type(op: op_t const \*) → [int](https://docs.python.org/3/library/functions.html#int) Can the operand have a type as offset, segment, decimal, etc? (for example, a register AX can’t have a type, meaning that the user can’t change its representation. see bytes.hpp for information about types and flags) * **Parameters:** **op** – (const op_t ``` * ``` ) * **Returns:** 0: unknown * **Returns:** <0: no * **Returns:** 1: yes #### ev_cmp_operands(op1: op_t const \*, op2: op_t const \*) → [int](https://docs.python.org/3/library/functions.html#int) Compare instruction operands * **Parameters:** * **op1** – (const op_t\*) * **op2** – (const op_t\*) * **Returns:** 1: equal * **Returns:** -1: not equal * **Returns:** 0: not implemented #### ev_adjust_refinfo(ri: refinfo_t, ea: ida_idaapi.ea_t, n: int, fd: fixup_data_t const \*) → [int](https://docs.python.org/3/library/functions.html#int) Called from apply_fixup before converting operand to reference. Can be used for changing the reference info. (e.g. the PPC module adds REFINFO_NOBASE for some references) * **Parameters:** * **ri** – (refinfo_t ``` * ``` ) * **ea** – (ea_t) instruction address * **n** – (int) operand number * **fd** – (const fixup_data_t ``` * ``` ) * **Returns:** <0: do not create an offset * **Returns:** 0: not implemented or refinfo adjusted #### ev_get_operand_string(insn: insn_t const \*, opnum: int) → PyObject \* Request text string for operand (cli, java, …). * **Parameters:** * **insn** – (const insn_t\*) the instruction * **opnum** – (int) operand number, -1 means any string operand * **Returns:** buf: (qstring ``` * ``` ) #### ev_get_reg_name(reg: [int](https://docs.python.org/3/library/functions.html#int), width: [int](https://docs.python.org/3/library/functions.html#int), reghi: [int](https://docs.python.org/3/library/functions.html#int)) → PyObject \* Generate text representation of a register. Most processor modules do not need to implement this callback. It is useful only if processor_t::reg_names[reg] does not provide the correct register name. * **Parameters:** * **reg** – (int) internal register number as defined in the processor module * **width** – (size_t) register width in bytes * **reghi** – (int) if not -1 then this function will return the register pair * **Returns:** buf: (qstring ``` * ``` ) output buffer #### ev_str2reg(regname: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [int](https://docs.python.org/3/library/functions.html#int) Convert a register name to a register number. The register number is the register index in the processor_t::reg_names array Most processor modules do not need to implement this callback It is useful only if processor_t::reg_names[reg] does not provide the correct register names * **Parameters:** **regname** – (const char ``` * ``` ) * **Returns:** register: number + 1 * **Returns:** 0: not implemented or could not be decoded #### ev_get_autocmt(insn: insn_t const \*) → PyObject \* Callback: get dynamic auto comment. Will be called if the autocomments are enabled and the comment retrieved from ida.int starts with ‘$!’. ‘insn’ contains valid info. * **Parameters:** **insn** – (const insn_t\*) the instruction * **Returns:** buf: (qstring ``` * ``` ) output buffer #### ev_get_bg_color(color: bgcolor_t \*, ea: ida_idaapi.ea_t) → [int](https://docs.python.org/3/library/functions.html#int) Get item background color. Plugins can hook this callback to color disassembly lines dynamically * **Parameters:** * **color** – (bgcolor_t ``` * ``` ), out * **ea** – (ea_t) * **Returns:** 0: not implemented * **Returns:** 1: color set #### ev_is_jump_func(pfn: func_t \*, jump_target: ea_t \*, func_pointer: ea_t \*) → [int](https://docs.python.org/3/library/functions.html#int) Is the function a trivial “jump” function? * **Parameters:** * **pfn** – (func_t ``` * ``` ) * **jump_target** – (ea_t ``` * ``` ) * **func_pointer** – (ea_t ``` * ``` ) * **Returns:** <0: no * **Returns:** 0: don’t know * **Returns:** 1: yes, see ‘jump_target’ and ‘func_pointer’ #### ev_func_bounds(possible_return_code: int \*, pfn: func_t \*, max_func_end_ea: ida_idaapi.ea_t) → [int](https://docs.python.org/3/library/functions.html#int) find_func_bounds() finished its work. * **Parameters:** * **possible_return_code** – (int ``` * ``` ), in/out * **pfn** – (func_t ``` * ``` ) * **max_func_end_ea** – (ea_t) (from the kernel’s point of view) * **Returns:** void: #### ev_verify_sp(pfn: func_t \*) → [int](https://docs.python.org/3/library/functions.html#int) All function instructions have been analyzed. * **Parameters:** **pfn** – (func_t ``` * ``` ) * **Returns:** 0: ok * **Returns:** <0: bad stack pointer #### ev_verify_noreturn(pfn: func_t \*) → [int](https://docs.python.org/3/library/functions.html#int) The kernel wants to set ‘noreturn’ flags for a function. * **Parameters:** **pfn** – (func_t ``` * ``` ) * **Returns:** 0: ok. any other value: do not set ‘noreturn’ flag #### ev_create_func_frame(pfn: func_t \*) → [int](https://docs.python.org/3/library/functions.html#int) Create a function frame for a newly created function * **Parameters:** **pfn** – (func_t ``` * ``` ) * **Returns:** 1: ok * **Returns:** 0: not implemented #### ev_get_frame_retsize(frsize: int \*, pfn: func_t const \*) → [int](https://docs.python.org/3/library/functions.html#int) Get size of function return address in bytes * **Parameters:** * **frsize** – (int ``` * ``` ) frame size (out) * **pfn** – (const func_t ``` * ``` ), can’t be nullptr * **Returns:** 1: ok * **Returns:** 0: not implemented #### ev_get_stkvar_scale_factor() → [int](https://docs.python.org/3/library/functions.html#int) Should stack variable references be multiplied by a coefficient before being used in the stack frame? Currently used by TMS320C55 because the references into the stack should be multiplied by 2 * **Returns:** scaling factor * **Returns:** 0: not implemented #### ev_demangle_name(name: [str](https://docs.python.org/3/library/stdtypes.html#str), disable_mask: [int](https://docs.python.org/3/library/functions.html#int), demreq: [int](https://docs.python.org/3/library/functions.html#int)) → PyObject \* Demangle a C++ (or another language) name into a user-readable string. This event is called by demangle_name() * **Parameters:** * **name** – (const char ``` * ``` ) mangled name * **disable_mask** – (uint32) flags to inhibit parts of output or compiler info/other (see ``` MNG_ ``` ) * **demreq** – (demreq_type_t) operation to perform * **Returns:** out: (qstring ``` * ``` ) output buffer. may be nullptr; res: (int32 ``` * ``` ) value to return from demangle_name() #### ev_add_cref(\_from: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), to: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), type: cref_t) → [int](https://docs.python.org/3/library/functions.html#int) A code reference is being created. * **Parameters:** * **to** – (ea_t) * **type** – (cref_t) * **Returns:** <0: cancel cref creation * **Returns:** 0: not implemented or continue #### ev_add_dref(\_from: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), to: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), type: dref_t) → [int](https://docs.python.org/3/library/functions.html#int) A data reference is being created. * **Parameters:** * **to** – (ea_t) * **type** – (dref_t) * **Returns:** <0: cancel dref creation * **Returns:** 0: not implemented or continue #### ev_del_cref(\_from: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), to: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), expand: [bool](https://docs.python.org/3/library/functions.html#bool)) → [int](https://docs.python.org/3/library/functions.html#int) A code reference is being deleted. * **Parameters:** * **to** – (ea_t) * **expand** – (bool) * **Returns:** <0: cancel cref deletion * **Returns:** 0: not implemented or continue #### ev_del_dref(\_from: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), to: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [int](https://docs.python.org/3/library/functions.html#int) A data reference is being deleted. * **Parameters:** **to** – (ea_t) * **Returns:** <0: cancel dref deletion * **Returns:** 0: not implemented or continue #### ev_coagulate_dref(\_from: ida_idaapi.ea_t, to: ida_idaapi.ea_t, may_define: bool, code_ea: ea_t \*) → [int](https://docs.python.org/3/library/functions.html#int) Data reference is being analyzed. plugin may correct ‘code_ea’ (e.g. for thumb mode refs, we clear the last bit) * **Parameters:** * **to** – (ea_t) * **may_define** – (bool) * **code_ea** – (ea_t ``` * ``` ) * **Returns:** <0: failed dref analysis, >0 done dref analysis * **Returns:** 0: not implemented or continue #### ev_may_show_sreg(current_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [int](https://docs.python.org/3/library/functions.html#int) The kernel wants to display the segment registers in the messages window. * **Parameters:** **current_ea** – (ea_t) * **Returns:** <0: if the kernel should not show the segment registers. (assuming that the module has done it) * **Returns:** 0: not implemented #### ev_auto_queue_empty(type: atype_t) → [int](https://docs.python.org/3/library/functions.html#int) One analysis queue is empty. * **Parameters:** **type** – (atype_t) * **Returns:** void: see also idb_event::auto_empty_finally #### ev_validate_flirt_func(start_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), funcname: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [int](https://docs.python.org/3/library/functions.html#int) Flirt has recognized a library function. This callback can be used by a plugin or proc module to intercept it and validate such a function. * **Parameters:** * **start_ea** – (ea_t) * **funcname** – (const char ``` * ``` ) * **Returns:** -1: do not create a function, * **Returns:** 0: function is validated #### ev_adjust_libfunc_ea(sig: idasgn_t const \*, libfun: libfunc_t const \*, ea: ea_t \*) → [int](https://docs.python.org/3/library/functions.html#int) Called when a signature module has been matched against bytes in the database. This is used to compute the offset at which a particular module’s libfunc should be applied. * **Parameters:** * **sig** – (const idasgn_t ``` * ``` ) * **libfun** – (const libfunc_t ``` * ``` ) * **ea** – (ea_t ``` * ``` ) * **Returns:** 1: the ea_t pointed to by the third argument was modified. * **Returns:** <=0: not modified. use default algorithm. #### ev_assemble(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), cs: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), ip: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), use32: [bool](https://docs.python.org/3/library/functions.html#bool), line: [str](https://docs.python.org/3/library/stdtypes.html#str)) → PyObject \* Assemble an instruction. (display a warning if an error occurs). * **Parameters:** * **ea** – (ea_t) linear address of instruction * **cs** – (ea_t) cs of instruction * **ip** – (ea_t) ip of instruction * **use32** – (bool) is 32-bit segment? * **line** – (const char ``` * ``` ) line to assemble * **Returns:** bin: (uchar ``` * ``` ) pointer to output opcode buffer #### ev_extract_address(out_ea: ea_t \*, screen_ea: ida_idaapi.ea_t, string: str, position: int) → [int](https://docs.python.org/3/library/functions.html#int) Extract address from a string. * **Parameters:** * **out_ea** – (ea_t ``` * ``` ), out * **screen_ea** – (ea_t) * **string** – (const char ``` * ``` ) * **position** – (size_t) * **Returns:** 1: ok * **Returns:** 0: kernel should use the standard algorithm * **Returns:** -1: error #### ev_realcvt(m: void \*, e: fpvalue_t \*, swt: uint16) → [int](https://docs.python.org/3/library/functions.html#int) Floating point -> IEEE conversion * **Parameters:** * **m** – (void ``` * ``` ) ptr to processor-specific floating point value * **e** – (fpvalue_t ``` * ``` ) IDA representation of a floating point value * **swt** – (uint16) operation (see realcvt() in ieee.h) * **Returns:** 0: not implemented #### ev_gen_asm_or_lst(starting: bool, fp: FILE \*, is_asm: bool, flags: int, outline: html_line_cb_t \*\*) → [int](https://docs.python.org/3/library/functions.html#int) Callback: generating asm or lst file. The kernel calls this callback twice, at the beginning and at the end of listing generation. The processor module can intercept this event and adjust its output * **Parameters:** * **starting** – (bool) beginning listing generation * **fp** – (FILE ``` * ``` ) output file * **is_asm** – (bool) true:assembler, false:listing * **flags** – (int) flags passed to gen_file() * **outline** – (html_line_cb_t ``` ** ``` ) ptr to ptr to outline callback. if this callback is defined for this code, it will be used by the kernel to output the generated lines * **Returns:** void: #### ev_gen_map_file(nlines: int \*, fp: FILE \*) → [int](https://docs.python.org/3/library/functions.html#int) Generate map file. If not implemented the kernel itself will create the map file. * **Parameters:** * **nlines** – (int ``` * ``` ) number of lines in map file (-1 means write error) * **fp** – (FILE ``` * ``` ) output file * **Returns:** 0: not implemented * **Returns:** 1: ok * **Returns:** -1: write error #### ev_create_flat_group(image_base: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), bitness: [int](https://docs.python.org/3/library/functions.html#int), dataseg_sel: sel_t) → [int](https://docs.python.org/3/library/functions.html#int) Create special segment representing the flat group. * **Parameters:** * **image_base** – (ea_t) * **bitness** – (int) * **dataseg_sel** – (sel_t) return value is ignored #### ev_getreg(regval: uval_t \*, regnum: int) → [int](https://docs.python.org/3/library/functions.html#int) IBM PC only internal request, should never be used for other purpose Get register value by internal index * **Parameters:** * **regval** – (uval_t ``` * ``` ), out * **regnum** – (int) * **Returns:** 1: ok * **Returns:** 0: not implemented * **Returns:** -1: failed (undefined value or bad regnum) #### ev_analyze_prolog(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [int](https://docs.python.org/3/library/functions.html#int) Analyzes function prolog, epilog, and updates purge, and function attributes * **Parameters:** **ea** – (ea_t) start of function * **Returns:** 1: ok * **Returns:** 0: not implemented #### ev_calc_spdelta(spdelta: sval_t \*, insn: insn_t const \*) → [int](https://docs.python.org/3/library/functions.html#int) Calculate amount of change to sp for the given insn. This event is required to decompile code snippets. * **Parameters:** * **spdelta** – (sval_t ``` * ``` ) * **insn** – (const insn_t ``` * ``` ) * **Returns:** 1: ok * **Returns:** 0: not implemented #### ev_calcrel() → [int](https://docs.python.org/3/library/functions.html#int) Reserved. #### ev_find_reg_value(pinsn: insn_t const \*, reg: int) → PyObject \* Find register value via a register tracker. The returned value in ‘out’ is valid before executing the instruction. * **Parameters:** * **pinsn** – (const insn_t ``` * ``` ) instruction * **reg** – (int) register index * **Returns:** out: (uval_t ``` * ``` ) pointer to the found value #### ev_find_op_value(pinsn: insn_t const \*, opn: int) → PyObject \* Find operand value via a register tracker. The returned value in ‘out’ is valid before executing the instruction. * **Parameters:** * **pinsn** – (const insn_t ``` * ``` ) instruction * **opn** – (int) operand index * **Returns:** out: (uval_t ``` * ``` ) pointer to the found value #### ev_replaying_undo(action_name: str, vec: undo_records_t const \*, is_undo: bool) → [int](https://docs.python.org/3/library/functions.html#int) Replaying an undo/redo buffer * **Parameters:** * **action_name** – (const char ``` * ``` ) action that we perform undo/redo for. may be nullptr for intermediate buffers. * **vec** – (const undo_records_t ``` * ``` ) * **is_undo** – (bool) true if performing undo, false if performing redo This event may be generated multiple times per undo/redo #### ev_ending_undo(action_name: [str](https://docs.python.org/3/library/stdtypes.html#str), is_undo: [bool](https://docs.python.org/3/library/functions.html#bool)) → [int](https://docs.python.org/3/library/functions.html#int) Ended undoing/redoing an action * **Parameters:** * **action_name** – (const char ``` * ``` ) action that we finished undoing/redoing. is not nullptr. * **is_undo** – (bool) true if performing undo, false if performing redo #### ev_set_code16_mode(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), code16: [bool](https://docs.python.org/3/library/functions.html#bool)) → [int](https://docs.python.org/3/library/functions.html#int) Some processors have ISA 16-bit mode e.g. ARM Thumb mode, PPC VLE, MIPS16 Set ISA 16-bit mode * **Parameters:** * **ea** – (ea_t) address to set new ISA mode * **code16** – (bool) true for 16-bit mode, false for 32-bit mode #### ev_get_code16_mode(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [int](https://docs.python.org/3/library/functions.html#int) Get ISA 16-bit mode * **Parameters:** **ea** – (ea_t) address to get the ISA mode * **Returns:** 1: 16-bit mode * **Returns:** 0: not implemented or 32-bit mode #### ev_get_procmod() → [int](https://docs.python.org/3/library/functions.html#int) Get pointer to the processor module object. All processor modules must implement this. The pointer is returned as size_t. #### ev_asm_installed(asmnum: [int](https://docs.python.org/3/library/functions.html#int)) → [int](https://docs.python.org/3/library/functions.html#int) After setting a new assembler * **Parameters:** **asmnum** – (int) See also ev_newasm #### ev_get_reg_accesses(accvec: reg_accesses_t, insn: insn_t const \*, flags: int) → [int](https://docs.python.org/3/library/functions.html#int) Get info about the registers that are used/changed by an instruction. * **Parameters:** * **accvec** – (reg_accesses_t\*) out: info about accessed registers * **insn** – (const insn_t ``` * ``` ) instruction in question * **flags** – (int) reserved, must be 0 * **Returns:** -1: if accvec is nullptr * **Returns:** 1: found the requested access (and filled accvec) * **Returns:** 0: not implemented #### ev_is_control_flow_guard(p_reg: int \*, insn: insn_t const \*) → [int](https://docs.python.org/3/library/functions.html#int) Detect if an instruction is a “thunk call” to a flow guard function (equivalent to call reg/return/nop) * **Parameters:** * **p_reg** – (int ``` * ``` ) indirect register number, may be -1 * **insn** – (const insn_t ``` * ``` ) call/jump instruction * **Returns:** -1: no thunk detected * **Returns:** 1: indirect call * **Returns:** 2: security check routine call (NOP) * **Returns:** 3: return thunk * **Returns:** 0: not implemented #### ev_create_merge_handlers(md: merge_data_t \*) → [int](https://docs.python.org/3/library/functions.html#int) Create merge handlers, if needed * **Parameters:** **md** – (merge_data_t ``` * ``` ) This event is generated immediately after opening idbs. * **Returns:** must be 0 #### ev_privrange_changed(old_privrange: [range_t](../ida_range/index.md#ida_range.range_t), delta: adiff_t) → [int](https://docs.python.org/3/library/functions.html#int) Privrange interval has been moved to a new location. Most common actions to be done by module in this case: fix indices of netnodes used by module * **Parameters:** * **old_privrange** – (const range_t ``` * ``` ) - old privrange interval * **delta** – (adiff_t) * **Returns:** 0: Ok * **Returns:** -1: error (and message in errbuf) #### ev_cvt64_supval(node: nodeidx_t, tag: uchar, idx: nodeidx_t, data: uchar const \*) → [int](https://docs.python.org/3/library/functions.html#int) perform 32-64 conversion for a netnode array element * **Parameters:** * **node** – (nodeidx_t) * **tag** – (uchar) * **idx** – (nodeidx_t) * **data** – (const uchar ``` * ``` ) * **Returns:** 0: nothing was done * **Returns:** 1: converted successfully * **Returns:** -1: error (and message in errbuf) #### ev_cvt64_hashval(node: nodeidx_t, tag: uchar, name: str, data: uchar const \*) → [int](https://docs.python.org/3/library/functions.html#int) perform 32-64 conversion for a hash value * **Parameters:** * **node** – (nodeidx_t) * **tag** – (uchar) * **name** – (const ::char ``` * ``` ) * **data** – (const uchar ``` * ``` ) * **Returns:** 0: nothing was done * **Returns:** 1: converted successfully * **Returns:** -1: error (and message in errbuf) #### ev_gen_stkvar_def(outctx: outctx_t \*, stkvar: udm_t, v: int, tid: tid_t) → [int](https://docs.python.org/3/library/functions.html#int) Generate stack variable definition line Default line is varname = type ptr value, where ‘type’ is one of byte,word,dword,qword,tbyte * **Parameters:** * **outctx** – (outctx_t ``` * ``` ) * **stkvar** – (const udm_t ``` * ``` ) * **v** – (sval_t) * **tid** – (tid_t) stkvar TID * **Returns:** 1: ok * **Returns:** 0: not implemented #### ev_is_addr_insn(type: int \*, insn: insn_t const \*) → [int](https://docs.python.org/3/library/functions.html#int) Does the instruction calculate some address using an immediate operand? e.g. in PC such operand may be o_displ: ‘lea eax, [esi+4]’ * **Parameters:** **type** – (int ``` * ``` ) pointer to the returned instruction type: * 0 the “add” instruction (the immediate operand is a relative value) * 1 the “move” instruction (the immediate operand is an absolute value) * 2 the “sub” instruction (the immediate operand is a relative value) * **Parameters:** **insn** – (const insn_t ``` * ``` ) instruction * **Returns:** >0 the operand number+1 * **Returns:** 0: not implemented #### ev_out_segment_start(outctx: outctx_t \*, seg_start_ea: ida_idaapi.ea_t) → [int](https://docs.python.org/3/library/functions.html#int) Function to produce start of segment * **Parameters:** * **outctx** – (outctx_t ``` * ``` ) * **seg_start_ea** – (ea_t) * **Returns:** 1: ok * **Returns:** 0: not implemented #### ev_out_segment_end(outctx: outctx_t \*, seg_start_ea: ida_idaapi.ea_t) → [int](https://docs.python.org/3/library/functions.html#int) Function to produce end of segment * **Parameters:** * **outctx** – (outctx_t ``` * ``` ) * **seg_start_ea** – (ea_t) * **Returns:** 1: ok * **Returns:** 0: not implemented #### ev_creating_segment(seg_info: segment_info_t \*) → [int](https://docs.python.org/3/library/functions.html#int) A new segment is about to be created. * **Parameters:** **seg_info** – (segment_info_t ``` * ``` ) * **Returns:** 1: ok * **Returns:** <0: segment should not be created #### ev_moving_segment(seg_start_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), to: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), flags: [int](https://docs.python.org/3/library/functions.html#int)) → [int](https://docs.python.org/3/library/functions.html#int) May the kernel move the segment? * **Parameters:** * **seg_start_ea** – (ea_t) * **to** – (ea_t) new segment start address * **flags** – (int) combination of Move segment flags * **Returns:** 0: yes * **Returns:** <0: the kernel should stop #### ev_is_jump_function(fi: func_entry_info_t \*, jump_target: ea_t \*, func_pointer: ea_t \*) → [int](https://docs.python.org/3/library/functions.html#int) Is the function a trivial “jump” function? * **Parameters:** * **fi** – (func_entry_info_t ``` * ``` ) * **jump_target** – (ea_t ``` * ``` ) * **func_pointer** – (ea_t ``` * ``` ) * **Returns:** <0: no * **Returns:** 0: don’t know * **Returns:** 1: yes, see ‘jump_target’ and ‘func_pointer’ #### ev_function_bounds(possible_return_code: int \*, fi: fchunk_info_t \*, max_func_end_ea: ida_idaapi.ea_t) → [int](https://docs.python.org/3/library/functions.html#int) find_function_bounds() finished its work. The module may fine tune the function bounds * **Parameters:** * **possible_return_code** – (int ``` * ``` ), in/out * **fi** – (fchunk_info_t ``` * ``` ) * **max_func_end_ea** – (ea_t) (from the kernel’s point of view) * **Returns:** void: #### ev_verify_function_sp(func_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [int](https://docs.python.org/3/library/functions.html#int) All function instructions have been analyzed. Now the processor module can analyze the stack pointer for the whole function * **Parameters:** **func_ea** – (ea_t) function entry start address * **Returns:** 0: ok * **Returns:** <0: bad stack pointer #### ev_verify_function_noreturn(func_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [int](https://docs.python.org/3/library/functions.html#int) The kernel wants to set ‘noreturn’ flags for a function. * **Parameters:** **func_ea** – (ea_t) function entry start address * **Returns:** 0: ok. any other value: do not set ‘noreturn’ flag #### ev_create_function_frame(func_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [int](https://docs.python.org/3/library/functions.html#int) Create a function frame for a newly created function. Set up frame size, its attributes etc * **Parameters:** **func_ea** – (ea_t) function entry start address * **Returns:** 1: ok * **Returns:** 0: not implemented #### ev_get_function_retsize(frsize: int \*, func_ea: ida_idaapi.ea_t) → [int](https://docs.python.org/3/library/functions.html#int) Get size of function return address in bytes. If this event is not implemented, the kernel will assume \* 8 bytes for 64-bit function \* 4 bytes for 32-bit function \* 2 bytes otherwise * **Parameters:** * **frsize** – (int ``` * ``` ) frame size (out) * **func_ea** – (ea_t) function entry start address * **Returns:** 1: ok * **Returns:** 0: not implemented #### ev_out_function_header(outctx: outctx_t \*, func_ea: ida_idaapi.ea_t) → [int](https://docs.python.org/3/library/functions.html#int) Generate function header lines. If this event is not implemented, the kernel will use asm_t::out_func_header if available, or display function headers as normal lines. * **Parameters:** * **outctx** – (outctx_t ``` * ``` ) * **func_ea** – (ea_t) * **Returns:** 1: ok * **Returns:** 0: not implemented #### ev_out_function_footer(outctx: outctx_t \*, func_ea: ida_idaapi.ea_t) → [int](https://docs.python.org/3/library/functions.html#int) Generate function footer lines. If this event is not implemented, the kernel will use asm_t::out_func_footer if available, or display a comment line. * **Parameters:** * **outctx** – (outctx_t ``` * ``` ) * **func_ea** – (ea_t) * **Returns:** 1: ok * **Returns:** 0: not implemented #### ev_sanitize_name(name: [str](https://docs.python.org/3/library/stdtypes.html#str), cc: callcnv_t) → [int](https://docs.python.org/3/library/functions.html#int) Apply processor/language-specific rewrites to a candidate name before the kernel validates its character set. E.g. the golang plugin uses this to rewrite “\*” -> “_ptr_”, “[]” -> “_slice_”, … * **Parameters:** * **name** – (qstring ``` * ``` ) name to sanitize (in/out) * **cc** – (callcnv_t) calling convention hint (pass CM_CC_UNKNOWN if not known; plugins can resolve via get_effective_cc()) * **Returns:** 1: handled (name may have been modified) * **Returns:** 0: not implemented #### ev_is_outlined_function(func_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [int](https://docs.python.org/3/library/functions.html#int) The kernel is creating a function and wants to know whether it is an outlined helper (sets FUNC_OUTLINE). * **Parameters:** **func_ea** – (ea_t) function entry start address * **Returns:** 1: the function is outlined * **Returns:** 0: not implemented / not outlined #### ev_next_exec_insn(target: ea_t \*, ea: ida_idaapi.ea_t, tid: int, getreg: processor_t::regval_getter_t \*, regvalues: regval_t) → [int](https://docs.python.org/3/library/functions.html#int) Get next address to be executed This function must return the next address to be executed. If the instruction following the current one is executed, then it must return BADADDR Usually the instructions to consider are: jumps, branches, calls, returns. This function is essential if the ‘single step’ is not supported in hardware. * **Parameters:** * **target** – (ea_t ``` * ``` ), out: pointer to the answer * **ea** – (ea_t) instruction address * **tid** – (int) current therad id * **getreg** – (::processor_t::regval_getter_t ``` * ``` ) function to get register values * **regvalues** – (const regval_t ``` * ``` ) register values array * **Returns:** 0: unimplemented * **Returns:** 1: implemented #### ev_calc_step_over(target: ea_t \*, ip: ida_idaapi.ea_t) → [int](https://docs.python.org/3/library/functions.html#int) Calculate the address of the instruction which will be executed after “step over”. The kernel will put a breakpoint there. If the step over is equal to step into or we cannot calculate the address, return BADADDR. * **Parameters:** * **target** – (ea_t ``` * ``` ) pointer to the answer * **ip** – (ea_t) instruction address * **Returns:** 0: unimplemented * **Returns:** 1: implemented #### ev_calc_next_eas(res: eavec_t \*, insn: insn_t const \*, over: bool) → [int](https://docs.python.org/3/library/functions.html#int) Calculate list of addresses the instruction in ‘insn’ may pass control to. This callback is required for source level debugging. * **Parameters:** * **res** – (eavec_t ``` * ``` ), out: array for the results. * **insn** – (const insn_t\*) the instruction * **over** – (bool) calculate for step over (ignore call targets) * **Returns:** <0: incalculable (indirect jumps, for example) * **Returns:** >=0: number of addresses of called functions in the array. They must be put at the beginning of the array (0 if over=true) #### ev_get_macro_insn_head(head: ea_t \*, ip: ida_idaapi.ea_t) → [int](https://docs.python.org/3/library/functions.html#int) Calculate the start of a macro instruction. This notification is called if IP points to the middle of an instruction * **Parameters:** * **head** – (ea_t ``` * ``` ), out: answer, BADADDR means normal instruction * **ip** – (ea_t) instruction address * **Returns:** 0: unimplemented * **Returns:** 1: implemented #### ev_get_dbr_opnum(opnum: int \*, insn: insn_t const \*) → [int](https://docs.python.org/3/library/functions.html#int) Get the number of the operand to be displayed in the debugger reference view (text mode). * **Parameters:** * **opnum** – (int ``` * ``` ) operand number (out, -1 means no such operand) * **insn** – (const insn_t\*) the instruction * **Returns:** 0: unimplemented * **Returns:** 1: implemented #### ev_insn_reads_tbit(insn: insn_t const \*, getreg: processor_t::regval_getter_t \*, regvalues: regval_t) → [int](https://docs.python.org/3/library/functions.html#int) Check if insn will read the TF bit. * **Parameters:** * **insn** – (const insn_t\*) the instruction * **getreg** – (::processor_t::regval_getter_t ``` * ``` ) function to get register values * **regvalues** – (const regval_t ``` * ``` ) register values array * **Returns:** 2: yes, will generate ‘step’ exception * **Returns:** 1: yes, will store the TF bit in memory * **Returns:** 0: no #### ev_clean_tbit(ea: ida_idaapi.ea_t, getreg: processor_t::regval_getter_t \*, regvalues: regval_t) → [int](https://docs.python.org/3/library/functions.html#int) Clear the TF bit after an insn like pushf stored it in memory. * **Parameters:** * **ea** – (ea_t) instruction address * **getreg** – (::processor_t::regval_getter_t ``` * ``` ) function to get register values * **regvalues** – (const regval_t ``` * ``` ) register values array * **Returns:** 1: ok * **Returns:** 0: failed #### ev_get_reg_info(main_regname: char const \*\*, bitrange: bitrange_t, regname: str) → [int](https://docs.python.org/3/library/functions.html#int) Get register information by its name. example: “ah” returns: \* main_regname=”eax” \* bitrange_t = { offset==8, nbits==8 } This callback may be unimplemented if the register names are all present in processor_t::reg_names and they all have the same size * **Parameters:** * **main_regname** – (const char ``` ** ``` ), out * **bitrange** – (bitrange_t ``` * ``` ), out: position and size of the value within ‘main_regname’ (empty bitrange == whole register) * **regname** – (const char ``` * ``` ) * **Returns:** 1: ok * **Returns:** -1: failed (not found) * **Returns:** 0: unimplemented #### ev_update_call_stack(stack: call_stack_t, tid: int, getreg: processor_t::regval_getter_t \*, regvalues: regval_t) → [int](https://docs.python.org/3/library/functions.html#int) Calculate the call stack trace for the given thread. This callback is invoked when the process is suspended and should fill the ‘trace’ object with the information about the current call stack. Note that this callback is NOT invoked if the current debugger backend implements stack tracing via debugger_t::event_t::ev_update_call_stack. The debugger-specific algorithm takes priority. Implementing this callback in the processor module is useful when multiple debugging platforms follow similar patterns, and thus the same processor-specific algorithm can be used for different platforms. * **Parameters:** * **stack** – (call_stack_t ``` * ``` ) result * **tid** – (int) thread id * **getreg** – (::processor_t::regval_getter_t ``` * ``` ) function to get register values * **regvalues** – (const regval_t ``` * ``` ) register values array * **Returns:** 1: ok * **Returns:** -1: failed * **Returns:** 0: unimplemented #### ev_setup_til() → [int](https://docs.python.org/3/library/functions.html#int) Setup default type libraries. (called after loading a new file into the database). The processor module may load tils, setup memory model and perform other actions required to set up the type system. This is an optional callback. * **Returns:** void: #### ev_get_abi_info(comp: comp_t) → [int](https://docs.python.org/3/library/functions.html#int) Get all possible ABI names and optional extensions for given compiler abiname/option is a string entirely consisting of letters, digits and underscore * **Parameters:** **comp** – (comp_t) - compiler ID * **Returns:** 0: not implemented * **Returns:** 1: ok #### ev_max_ptr_size() → [int](https://docs.python.org/3/library/functions.html#int) Get maximal size of a pointer in bytes. * **Returns:** max possible size of a pointer #### ev_get_default_enum_size() → [int](https://docs.python.org/3/library/functions.html#int) Get default enum size. Not generated anymore. inf_get_cc_size_e() is used instead #### ev_get_cc_regs(regs: [callregs_t](../ida_typeinf/index.md#ida_typeinf.callregs_t), cc: callcnv_t) → [int](https://docs.python.org/3/library/functions.html#int) Get register allocation convention for given calling convention * **Parameters:** * **regs** – (callregs_t ``` * ``` ), out * **cc** – (callcnv_t) * **Returns:** 1: * **Returns:** 0: not implemented #### ev_get_simd_types(out: simd_info_vec_t, simd_attrs: simd_info_t, argloc: argloc_t, create_tifs: bool, insn: insn_t const \*, op: op_t const \*) → [int](https://docs.python.org/3/library/functions.html#int) Get SIMD-related types according to given attributes ant/or argument location * **Parameters:** * **out** – (simd_info_vec_t ``` * ``` ) * **simd_attrs** – (const simd_info_t ``` * ``` ), may be nullptr * **argloc** – (const argloc_t ``` * ``` ), may be nullptr * **create_tifs** – (bool) return valid tinfo_t objects, create if neccessary * **insn** – (::const insn_t ``` * ``` ) * **op** – (::const op_t ``` * ``` ) * **Returns:** number: of found types * **Returns:** -1: error If insn and op are specified, return only the types that match them #### ev_calc_cdecl_purged_bytes(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [int](https://docs.python.org/3/library/functions.html#int) Calculate number of purged bytes after call. * **Parameters:** **ea** – (ea_t) address of the call instruction * **Returns:** number of purged bytes (usually add sp, N) #### ev_calc_purged_bytes(p_purged_bytes: int \*, fti: func_type_data_t) → [int](https://docs.python.org/3/library/functions.html#int) Calculate number of purged bytes by the given function type. * **Parameters:** * **p_purged_bytes** – (int ``` * ``` ) ptr to output * **fti** – (const func_type_data_t ``` * ``` ) func type details * **Returns:** 1: * **Returns:** 0: not implemented #### ev_calc_retloc(retloc: [argloc_t](../ida_typeinf/index.md#ida_typeinf.argloc_t), rettype: [tinfo_t](../ida_typeinf/index.md#ida_typeinf.tinfo_t), cc: callcnv_t) → [int](https://docs.python.org/3/library/functions.html#int) Calculate return value location. * **Parameters:** * **retloc** – (argloc_t ``` * ``` ) * **rettype** – (const tinfo_t ``` * ``` ) * **cc** – (callcnv_t) * **Returns:** 0: not implemented * **Returns:** 1: ok, * **Returns:** -1: error #### ev_calc_arglocs(fti: [func_type_data_t](../ida_typeinf/index.md#ida_typeinf.func_type_data_t)) → [int](https://docs.python.org/3/library/functions.html#int) Calculate function argument locations. This callback should fill retloc, all arglocs, and stkargs. This callback is never called for CM_CC_SPECIAL functions. * **Parameters:** **fti** – (func_type_data_t ``` * ``` ) points to the func type info * **Returns:** 0: not implemented * **Returns:** 1: ok * **Returns:** -1: error #### ev_calc_varglocs(ftd: [func_type_data_t](../ida_typeinf/index.md#ida_typeinf.func_type_data_t), aux_regs: [regobjs_t](../ida_typeinf/index.md#ida_typeinf.regobjs_t), aux_stkargs: relobj_t, nfixed: [int](https://docs.python.org/3/library/functions.html#int)) → [int](https://docs.python.org/3/library/functions.html#int) Calculate locations of the arguments that correspond to ‘…’. * **Parameters:** * **ftd** – (func_type_data_t ``` * ``` ), inout: info about all arguments (including varargs) * **aux_regs** – (regobjs_t ``` * ``` ) buffer for hidden register arguments, may be nullptr * **aux_stkargs** – (relobj_t ``` * ``` ) buffer for hidden stack arguments, may be nullptr * **nfixed** – (int) number of fixed arguments * **Returns:** 0: not implemented * **Returns:** 1: ok * **Returns:** -1: error On some platforms variadic calls require passing additional information: for example, number of floating variadic arguments must be passed in rax on gcc-x64. The locations and values that constitute this additional information are returned in the buffers pointed by aux_regs and aux_stkargs #### ev_adjust_argloc(argloc: [argloc_t](../ida_typeinf/index.md#ida_typeinf.argloc_t), optional_type: [tinfo_t](../ida_typeinf/index.md#ida_typeinf.tinfo_t), size: [int](https://docs.python.org/3/library/functions.html#int)) → [int](https://docs.python.org/3/library/functions.html#int) Adjust argloc according to its type/size and platform endianess * **Parameters:** * **argloc** – (argloc_t ``` * ``` ), inout * **size** – (int) ‘size’ makes no sense if type != nullptr (type->get_size() should be used instead) * **Returns:** 0: not implemented * **Returns:** 1: ok * **Returns:** -1: error #### ev_lower_func_type(argnums: intvec_t \*, fti: func_type_data_t) → [int](https://docs.python.org/3/library/functions.html#int) Get function arguments which should be converted to pointers when lowering function prototype. The processor module can also modify ‘fti’ in order to make non-standard conversion of some arguments. * **Parameters:** * **argnums** – (intvec_t ``` * ``` ), out - numbers of arguments to be converted to pointers in ascending order * **fti** – (func_type_data_t ``` * ``` ), inout func type details * **Returns:** 0: not implemented * **Returns:** 1: argnums was filled * **Returns:** 2: argnums was filled and made substantial changes to fti argnums[0] can contain a special negative value indicating that the return value should be passed as a hidden ‘retstr’ argument: -1 this argument is passed as the first one and the function returns a pointer to the argument, -2 this argument is passed as the last one and the function returns a pointer to the argument, -3 this argument is passed as the first one and the function returns ‘void’. #### ev_equal_reglocs(a1: [argloc_t](../ida_typeinf/index.md#ida_typeinf.argloc_t), a2: [argloc_t](../ida_typeinf/index.md#ida_typeinf.argloc_t)) → [int](https://docs.python.org/3/library/functions.html#int) Are 2 register arglocs the same?. We need this callback for the pc module. * **Parameters:** * **a1** – (argloc_t ``` * ``` ) * **a2** – (argloc_t ``` * ``` ) * **Returns:** 1: yes * **Returns:** -1: no * **Returns:** 0: not implemented #### ev_use_stkarg_type(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), arg: [funcarg_t](../ida_typeinf/index.md#ida_typeinf.funcarg_t)) → [int](https://docs.python.org/3/library/functions.html#int) Use information about a stack argument. * **Parameters:** * **ea** – (ea_t) address of the push instruction which pushes the function argument into the stack * **arg** – (const funcarg_t ``` * ``` ) argument info * **Returns:** 1: ok * **Returns:** <=0: failed, the kernel will create a comment with the argument name or type for the instruction #### ev_use_regarg_type(ea: ida_idaapi.ea_t, rargs: funcargvec_t const \*) → PyObject \* Use information about register argument. * **Parameters:** * **ea** – (ea_t) address of the instruction * **rargs** – (const funcargvec_t ``` * ``` ) vector of register arguments (including regs extracted from scattered arguments) * **Returns:** idx: (int ``` * ``` ) pointer to the returned value, may contain: * idx of the used argument, if the argument is defined in the current instruction, a comment will be applied by the kernel * idx | REG_SPOIL - argument is spoiled by the instruction * -1 if the instruction doesn’t change any registers * -2 if the instruction spoils all registers #### ev_use_arg_types(ea: ida_idaapi.ea_t, fti: func_type_data_t, rargs: funcargvec_t \*) → [int](https://docs.python.org/3/library/functions.html#int) Use information about callee arguments. * **Parameters:** * **ea** – (ea_t) address of the call instruction * **fti** – (func_type_data_t ``` * ``` ) info about function type * **rargs** – (funcargvec_t ``` * ``` ) array of register arguments * **Returns:** 1: (and removes handled arguments from fti and rargs) * **Returns:** 0: not implemented #### ev_arg_addrs_ready(caller: ida_idaapi.ea_t, n: int, tif: tinfo_t, addrs: ea_t \*) → [int](https://docs.python.org/3/library/functions.html#int) Argument address info is ready. * **Parameters:** * **caller** – (ea_t) * **n** – (int) number of formal arguments * **tif** – (tinfo_t ``` * ``` ) call prototype * **addrs** – (ea_t ``` * ``` ) argument intilization addresses * **Returns:** <0: do not save into idb; other values mean “ok to save” #### ev_decorate_name(name: [str](https://docs.python.org/3/library/stdtypes.html#str), mangle: [bool](https://docs.python.org/3/library/functions.html#bool), cc: [int](https://docs.python.org/3/library/functions.html#int), optional_type: [tinfo_t](../ida_typeinf/index.md#ida_typeinf.tinfo_t)) → PyObject \* Decorate/undecorate a C symbol name. * **Parameters:** * **name** – (const char ``` * ``` ) name of symbol * **mangle** – (bool) true-mangle, false-unmangle * **cc** – (callcnv_t) calling convention * **Returns:** outbuf: (qstring ``` * ``` ) output buffer #### ev_arch_changed() → [int](https://docs.python.org/3/library/functions.html#int) The loader is done parsing arch-related information, which the processor module might want to use to finish its initialization. * **Returns:** 1: if success * **Returns:** 0: not implemented or failed #### ev_get_stkarg_area_info(out: [stkarg_area_info_t](../ida_typeinf/index.md#ida_typeinf.stkarg_area_info_t), cc: callcnv_t) → [int](https://docs.python.org/3/library/functions.html#int) Get some metrics of the stack argument area. * **Parameters:** * **out** – (stkarg_area_info_t ``` * ``` ) ptr to stkarg_area_info_t * **cc** – (callcnv_t) calling convention * **Returns:** 1: if success * **Returns:** 0: not implemented #### ev_query_unmapped_address(out: [unmapped_info_t](#ida_idp.unmapped_info_t), ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [int](https://docs.python.org/3/library/functions.html#int) Get information about an unmapped address * **Parameters:** * **out** – (unmapped_info_t ``` * ``` ) output information (can be nullptr) * **ea** – (ea_t) the (currently unmapped) address * **Returns:** 1: the address can be loaded * **Returns:** 0: not implemented or failed #### ev_load_unmapped_address(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [int](https://docs.python.org/3/library/functions.html#int) Load the dependency covering the provided address. * **Parameters:** **ea** – (ea_t) the (currently unmapped) address * **Returns:** 1: if success * **Returns:** 0: not implemented or failed #### ev_get_stkarg_parts(insn: insn_t const \*, parts: stkarg_part_t, max_parts: int) → [int](https://docs.python.org/3/library/functions.html#int) Enumerate the stkarg stores performed by an instruction. Used by the kernel to drive multi-slot stkarg propagation (e.g. ARM “STMIA SP, {R0-R3}” writes 4 slots). When the processor returns 0, the kernel falls back to argtinfo_helper_t::is_stkarg_load. * **Parameters:** * **insn** – (const insn_t ``` * ``` ) * **parts** – (stkarg_part_t ``` * ``` ) output array * **max_parts** – (int) size of the output array * **Returns:** N>0: produced N parts (use them) * **Returns:** 0: not implemented for this insn #### ev_get_swift_abi_regs() → [int](https://docs.python.org/3/library/functions.html#int) Reserved. #### ev_last_cb_before_loader() → [int](https://docs.python.org/3/library/functions.html#int) #### ev_loader() → [int](https://docs.python.org/3/library/functions.html#int) This code and higher ones are reserved for the loaders. The arguments and the return values are defined by the loaders ### ida_idp.get_idp_notifier_addr(arg1: PyObject \*) → PyObject \* ### ida_idp.get_idp_notifier_ud_addr(hooks: [IDP_Hooks](#ida_idp.IDP_Hooks)) → PyObject \* ### ida_idp.delay_slot_insn(ea: ea_t \*, bexec: bool \*, fexec: bool \*) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_idp.get_reg_info(regname: [str](https://docs.python.org/3/library/stdtypes.html#str), bitrange: [bitrange_t](../ida_bitrange/index.md#ida_bitrange.bitrange_t)) → [str](https://docs.python.org/3/library/stdtypes.html#str) ### ida_idp.sizeof_ldbl() → [int](https://docs.python.org/3/library/functions.html#int) ### ida_idp.REAL_ERROR_FORMAT *= -1* ### ida_idp.REAL_ERROR_RANGE *= -2* ### ida_idp.REAL_ERROR_BADDATA *= -3* ### ida_idp.IDPOPT_STR *= 1* ### ida_idp.IDPOPT_NUM *= 2* ### ida_idp.IDPOPT_BIT *= 3* ### ida_idp.IDPOPT_FLT *= 4* ### ida_idp.IDPOPT_I64 *= 5* ### ida_idp.IDPOPT_OK *= 0* ### ida_idp.IDPOPT_BADKEY *= 1* ### ida_idp.IDPOPT_BADTYPE *= 2* ### ida_idp.IDPOPT_BADVALUE *= 3* ### *class* ida_idp.processor_t Bases: [`IDP_Hooks`](#ida_idp.IDP_Hooks) #### idb_hooks #### get_idpdesc() 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. #### get_auxpref(insn) This function returns insn.auxpref value #### ev_newprc(\*args) Before changing processor type. * **Parameters:** * **pnum** – (int) processor number in the array of processor names * **keep_cfg** – (bool) true: do not modify kernel configuration * **Returns:** 1: ok * **Returns:** <0: prohibit #### ev_newfile(\*args) A new file has been loaded. * **Parameters:** **fname** – (char ``` * ``` ) input file name #### ev_oldfile(\*args) An old file has been loaded. * **Parameters:** **fname** – (char ``` * ``` ) input file name #### ev_newbinary(\*args) IDA is about to load a binary file. * **Parameters:** * **filename** – (char ``` * ``` ) binary file name * **fileoff** – (qoff64_t) offset in the file * **basepara** – (ea_t) base loading paragraph * **binoff** – (ea_t) loader offset * **nbytes** – (uint64) number of bytes to load #### ev_endbinary(\*args) IDA has loaded a binary file. * **Parameters:** **ok** – (bool) file loaded successfully? #### ev_set_idp_options(keyword, value_type, value, idb_loaded) Set IDP-specific configuration option Also see set_options_t in config.hpp * **Parameters:** * **keyword** – (const char ``` * ``` ) * **value_type** – (int) * **value** – (const void ``` * ``` ) * **idb_loaded** – (bool) true if the ev_oldfile/ev_newfile events have been generated * **Returns:** 1: ok * **Returns:** 0: not implemented * **Returns:** -1: error (and message in errbuf) #### ev_set_proc_options(\*args) Called if the user specified an option string in the command line: -p:. Can be used for setting a processor subtype. Also called if option string is passed to set_processor_type() and IDC’s SetProcessorType(). * **Parameters:** * **options** – (const char ``` * ``` ) * **confidence** – (int) 0: loader’s suggestion 1: user’s decision * **Returns:** <0: if bad option string #### ev_ana_insn(\*args) Analyze one instruction and fill ‘out’ structure. This function shouldn’t change the database, flags or anything else. All these actions should be performed only by emu_insn() function. insn_t::ea contains address of instruction to analyze. * **Parameters:** **out** – (insn_t ``` * ``` ) * **Returns:** length of the instruction in bytes, 0 if instruction can’t be decoded. * **Returns:** 0: if instruction can’t be decoded. #### ev_emu_insn(\*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. * **Parameters:** **insn** – (const insn_t ``` * ``` ) * **Returns:** 1: ok * **Returns:** -1: the kernel will delete the instruction #### ev_out_header(\*args) Function to produce start of disassembled text * **Parameters:** **outctx** – (outctx_t ``` * ``` ) * **Returns:** void: #### ev_out_footer(\*args) Function to produce end of disassembled text * **Parameters:** **outctx** – (outctx_t ``` * ``` ) * **Returns:** void: #### ev_out_segstart(ctx, s) Function to produce start of segment * **Parameters:** * **outctx** – (outctx_t ``` * ``` ) * **seg** – (segment_t ``` * ``` ) * **Returns:** 1: ok * **Returns:** 0: not implemented #### ev_out_segment_start(ctx, seg_start_ea) Function to produce start of segment * **Parameters:** * **outctx** – (outctx_t ``` * ``` ) * **seg_start_ea** – (ea_t) * **Returns:** 1: ok * **Returns:** 0: not implemented #### ev_out_segend(ctx, s) Function to produce end of segment * **Parameters:** * **outctx** – (outctx_t ``` * ``` ) * **seg** – (segment_t ``` * ``` ) * **Returns:** 1: ok * **Returns:** 0: not implemented #### ev_out_segment_end(ctx, seg_start_ea) Function to produce end of segment * **Parameters:** * **outctx** – (outctx_t ``` * ``` ) * **seg_start_ea** – (ea_t) * **Returns:** 1: ok * **Returns:** 0: not implemented #### ev_out_assumes(\*args) Function to produce assume directives when segment register value changes. * **Parameters:** **outctx** – (outctx_t ``` * ``` ) * **Returns:** 1: ok * **Returns:** 0: not implemented #### ev_out_insn(\*args) Generate text representation of an instruction in ‘ctx.insn’ outctx_t provides functions to output the generated text. This function shouldn’t change the database, flags or anything else. All these actions should be performed only by emu_insn() function. * **Parameters:** **outctx** – (outctx_t ``` * ``` ) * **Returns:** void: #### ev_out_mnem(\*args) Generate instruction mnemonics. This callback should append the colored mnemonics to ctx.outbuf Optional notification, if absent, out_mnem will be called. * **Parameters:** **outctx** – (outctx_t ``` * ``` ) * **Returns:** 1: if appended the mnemonics * **Returns:** 0: not implemented #### ev_out_operand(\*args) Generate text representation of an instruction operand outctx_t provides functions to output the generated text. All these actions should be performed only by emu_insn() function. * **Parameters:** * **outctx** – (outctx_t ``` * ``` ) * **op** – (const op_t ``` * ``` ) * **Returns:** 1: ok * **Returns:** -1: operand is hidden #### ev_out_data(\*args) Generate text representation of data items This function may change the database and create cross-references if analyze_only is set * **Parameters:** * **outctx** – (outctx_t ``` * ``` ) * **analyze_only** – (bool) * **Returns:** 1: ok * **Returns:** 0: not implemented #### ev_out_label(\*args) The kernel is going to generate an instruction label line or a function header. * **Parameters:** * **outctx** – (outctx_t ``` * ``` ) * **colored_name** – (const char ``` * ``` ) * **Returns:** <0: if the kernel should not generate the label * **Returns:** 0: not implemented or continue #### ev_out_special_item(\*args) Generate text representation of an item in a special segment i.e. absolute symbols, externs, communal definitions etc * **Parameters:** * **outctx** – (outctx_t ``` * ``` ) * **segtype** – (uchar) * **Returns:** 1: ok * **Returns:** 0: not implemented * **Returns:** -1: overflow #### ev_gen_regvar_def(ctx, v) Generate register variable definition line. * **Parameters:** * **outctx** – (outctx_t ``` * ``` ) * **v** – (regvar_t ``` * ``` ) * **Returns:** >0: ok, generated the definition text * **Returns:** 0: not implemented #### ev_gen_src_file_lnnum(\*args) Callback: generate analog of: : #line 123 * **Parameters:** * **outctx** – (outctx_t ``` * ``` ) output context * **file** – (const char ``` * ``` ) source file (may be nullptr) * **lnnum** – (size_t) line number * **Returns:** 1: directive has been generated * **Returns:** 0: not implemented #### ev_creating_segm(s) A new segment is about to be created. * **Parameters:** **seg** – (segment_t ``` * ``` ) * **Returns:** 1: ok * **Returns:** <0: segment should not be created #### ev_creating_segment(si) A new segment is about to be created. * **Parameters:** **seg_info** – (segment_info_t ``` * ``` ) * **Returns:** 1: ok * **Returns:** <0: segment should not be created #### ev_moving_segm(s, to_ea, flags) May the kernel move the segment? * **Parameters:** * **seg** – (segment_t ``` * ``` ) segment to move * **to** – (ea_t) new segment start address * **flags** – (int) combination of Move segment flags * **Returns:** 0: yes * **Returns:** <0: the kernel should stop #### ev_moving_segment(seg_start_ea, to_ea, flags) May the kernel move the segment? * **Parameters:** * **seg_start_ea** – (ea_t) * **to** – (ea_t) new segment start address * **flags** – (int) combination of Move segment flags * **Returns:** 0: yes * **Returns:** <0: the kernel should stop #### ev_coagulate(\*args) Try to define some unexplored bytes. This notification will be called if the kernel tried all possibilities and could not find anything more useful than to convert to array of bytes. The module can help the kernel and convert the bytes into something more useful. * **Parameters:** **start_ea** – (ea_t) * **Returns:** number of converted bytes #### ev_undefine(\*args) An item in the database (insn or data) is being deleted. * **Parameters:** **ea** – (ea_t) * **Returns:** 1: do not delete srranges at the item end * **Returns:** 0: srranges can be deleted #### ev_treat_hindering_item(\*args) An item hinders creation of another item. * **Parameters:** * **hindering_item_ea** – (ea_t) * **new_item_flags** – (flags64_t) (0 for code) * **new_item_ea** – (ea_t) * **new_item_length** – (asize_t) * **Returns:** 0: no reaction * **Returns:** !=0: the kernel may delete the hindering item #### ev_rename(\*args) The kernel is going to rename a byte. * **Parameters:** * **ea** – (ea_t) * **new_name** – (const char ``` * ``` ) * **Returns:** <0: if the kernel should not rename it. * **Returns:** 2: to inhibit the notification. I.e., the kernel should not rename, but ‘set_name()’ should return ‘true’. also see renamed the return value is ignored when kernel is going to delete name #### ev_is_far_jump(\*args) is indirect far jump or call instruction? meaningful only if the processor has ‘near’ and ‘far’ reference types * **Parameters:** **icode** – (int) * **Returns:** 0: not implemented * **Returns:** 1: yes * **Returns:** -1: no #### ev_is_sane_insn(\*args) Is the instruction sane for the current file type? * **Parameters:** * **insn** – (const insn_t\*) the instruction * **no_crefs** – (int) 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:** >=0: ok * **Returns:** <0: no, the instruction isn’t likely to appear in the program #### ev_is_call_insn(\*args) Is the instruction a “call”? * **Parameters:** **insn** – (const insn_t ``` * ``` ) instruction * **Returns:** 0: unknown * **Returns:** <0: no * **Returns:** 1: yes #### ev_is_ret_insn(\*args) Is the instruction a “return”? * **Parameters:** * **insn** – (const insn_t ``` * ``` ) instruction * **flags** – (uchar), combination of ``` IRI_ ``` … flags (see above) * **Returns:** 0: unknown * **Returns:** <0: no * **Returns:** 1: yes #### ev_may_be_func(\*args) Can a function start here? * **Parameters:** * **insn** – (const insn_t\*) the instruction * **state** – (int) autoanalysis phase 0: creating functions 1: creating chunks * **Returns:** probability 1..100 #### ev_is_basic_block_end(\*args) Is the current instruction end of a basic block? This function should be defined for processors with delayed jump slots. * **Parameters:** * **insn** – (const insn_t\*) the instruction * **call_insn_stops_block** – (bool) * **Returns:** 0: unknown * **Returns:** <0: no * **Returns:** 1: yes #### ev_is_indirect_jump(\*args) Determine if instruction is an indirect jump. If CF_JUMP bit cannot describe all jump types jumps, please define this callback. * **Parameters:** **insn** – (const insn_t\*) the instruction * **Returns:** 0: use CF_JUMP * **Returns:** 1: no * **Returns:** 2: yes #### ev_is_insn_table_jump(\*args) Reserved. #### ev_is_switch(\*args) Find ‘switch’ idiom or override processor module’s decision. It will be called for instructions marked with CF_JUMP. * **Parameters:** * **si** – (switch_info_t ``` * ``` ), out * **insn** – (const insn_t ``` * ``` ) instruction possibly belonging to a switch * **Returns:** 1: switch is found, ‘si’ is filled. IDA will create the switch using the filled ‘si’ * **Returns:** -1: no switch found. This value forbids switch creation by the processor module * **Returns:** 0: not implemented #### ev_create_switch_xrefs(\*args) Create xrefs for a custom jump table. * **Parameters:** * **jumpea** – (ea_t) address of the jump insn * **si** – (const switch_info_t ``` * ``` ) switch information * **Returns:** must return 1 Must be implemented if module uses custom jump tables, SWI_CUSTOM #### ev_is_align_insn(\*args) Is the instruction created only for alignment purposes?. Do not directly call this function, use is_align_insn() * **Parameters:** **ea** – (ea_t) - instruction address * **Returns:** number: of bytes in the instruction #### ev_is_alloca_probe(\*args) Does the function at ‘ea’ behave like \_\_alloca_probe? * **Parameters:** **ea** – (ea_t) * **Returns:** 1: yes * **Returns:** 0: no #### ev_is_sp_based(mode, insn, op) Check whether the operand is relative to stack pointer or frame pointer This event is used to determine how to output a stack variable If not implemented, then all operands are sp based by default. Implement this event only if some stack references use frame pointer instead of stack pointer. * **Parameters:** * **mode** – (int ``` * ``` ) out, combination of SP/FP operand flags * **insn** – (const insn_t ``` * ``` ) * **op** – (const op_t ``` * ``` ) * **Returns:** 0: not implemented * **Returns:** 1: ok #### ev_can_have_type(\*args) Can the operand have a type as offset, segment, decimal, etc? (for example, a register AX can’t have a type, meaning that the user can’t change its representation. see bytes.hpp for information about types and flags) * **Parameters:** **op** – (const op_t ``` * ``` ) * **Returns:** 0: unknown * **Returns:** <0: no * **Returns:** 1: yes #### ev_cmp_operands(\*args) Compare instruction operands * **Parameters:** * **op1** – (const op_t\*) * **op2** – (const op_t\*) * **Returns:** 1: equal * **Returns:** -1: not equal * **Returns:** 0: not implemented #### ev_get_operand_string(buf, insn, opnum) Request text string for operand (cli, java, …). * **Parameters:** * **insn** – (const insn_t\*) the instruction * **opnum** – (int) operand number, -1 means any string operand * **Returns:** buf: (qstring ``` * ``` ) #### ev_str2reg(\*args) Convert a register name to a register number. The register number is the register index in the processor_t::reg_names array Most processor modules do not need to implement this callback It is useful only if processor_t::reg_names[reg] does not provide the correct register names * **Parameters:** **regname** – (const char ``` * ``` ) * **Returns:** register: number + 1 * **Returns:** 0: not implemented or could not be decoded #### ev_get_autocmt(\*args) Callback: get dynamic auto comment. Will be called if the autocomments are enabled and the comment retrieved from ida.int starts with ‘$!’. ‘insn’ contains valid info. * **Parameters:** **insn** – (const insn_t\*) the instruction * **Returns:** buf: (qstring ``` * ``` ) output buffer #### ev_func_bounds(\_possible_return_code, pfn, max_func_end_ea) find_func_bounds() finished its work. * **Parameters:** * **possible_return_code** – (int ``` * ``` ), in/out * **pfn** – (func_t ``` * ``` ) * **max_func_end_ea** – (ea_t) (from the kernel’s point of view) * **Returns:** void: #### ev_function_bounds(\_possible_return_code, fchunk, max_func_end_ea) find_function_bounds() finished its work. The module may fine tune the function bounds * **Parameters:** * **possible_return_code** – (int ``` * ``` ), in/out * **fi** – (fchunk_info_t ``` * ``` ) * **max_func_end_ea** – (ea_t) (from the kernel’s point of view) * **Returns:** void: #### ev_verify_sp(pfn) All function instructions have been analyzed. * **Parameters:** **pfn** – (func_t ``` * ``` ) * **Returns:** 0: ok * **Returns:** <0: bad stack pointer #### ev_verify_function_sp(func_ea) All function instructions have been analyzed. Now the processor module can analyze the stack pointer for the whole function * **Parameters:** **func_ea** – (ea_t) function entry start address * **Returns:** 0: ok * **Returns:** <0: bad stack pointer #### ev_verify_noreturn(pfn) The kernel wants to set ‘noreturn’ flags for a function. * **Parameters:** **pfn** – (func_t ``` * ``` ) * **Returns:** 0: ok. any other value: do not set ‘noreturn’ flag #### ev_verify_function_noreturn(func_ea) The kernel wants to set ‘noreturn’ flags for a function. * **Parameters:** **func_ea** – (ea_t) function entry start address * **Returns:** 0: ok. any other value: do not set ‘noreturn’ flag #### ev_create_func_frame(pfn) Create a function frame for a newly created function * **Parameters:** **pfn** – (func_t ``` * ``` ) * **Returns:** 1: ok * **Returns:** 0: not implemented #### ev_create_function_frame(func_ea) Create a function frame for a newly created function. Set up frame size, its attributes etc * **Parameters:** **func_ea** – (ea_t) function entry start address * **Returns:** 1: ok * **Returns:** 0: not implemented #### ev_get_frame_retsize(frsize, pfn) Get size of function return address in bytes * **Parameters:** * **frsize** – (int ``` * ``` ) frame size (out) * **pfn** – (const func_t ``` * ``` ), can’t be nullptr * **Returns:** 1: ok * **Returns:** 0: not implemented #### ev_get_function_retsize(frsize, func_ea) Get size of function return address in bytes. If this event is not implemented, the kernel will assume \* 8 bytes for 64-bit function \* 4 bytes for 32-bit function \* 2 bytes otherwise * **Parameters:** * **frsize** – (int ``` * ``` ) frame size (out) * **func_ea** – (ea_t) function entry start address * **Returns:** 1: ok * **Returns:** 0: not implemented #### ev_coagulate_dref(from_ea, to_ea, may_define, \_code_ea) Data reference is being analyzed. plugin may correct ‘code_ea’ (e.g. for thumb mode refs, we clear the last bit) * **Parameters:** * **to** – (ea_t) * **may_define** – (bool) * **code_ea** – (ea_t ``` * ``` ) * **Returns:** <0: failed dref analysis, >0 done dref analysis * **Returns:** 0: not implemented or continue #### ev_may_show_sreg(\*args) The kernel wants to display the segment registers in the messages window. * **Parameters:** **current_ea** – (ea_t) * **Returns:** <0: if the kernel should not show the segment registers. (assuming that the module has done it) * **Returns:** 0: not implemented #### ev_auto_queue_empty(\*args) One analysis queue is empty. * **Parameters:** **type** – (atype_t) * **Returns:** void: see also idb_event::auto_empty_finally #### ev_validate_flirt_func(\*args) Flirt has recognized a library function. This callback can be used by a plugin or proc module to intercept it and validate such a function. * **Parameters:** * **start_ea** – (ea_t) * **funcname** – (const char ``` * ``` ) * **Returns:** -1: do not create a function, * **Returns:** 0: function is validated #### ev_assemble(\*args) Assemble an instruction. (display a warning if an error occurs). * **Parameters:** * **ea** – (ea_t) linear address of instruction * **cs** – (ea_t) cs of instruction * **ip** – (ea_t) ip of instruction * **use32** – (bool) is 32-bit segment? * **line** – (const char ``` * ``` ) line to assemble * **Returns:** bin: (uchar ``` * ``` ) pointer to output opcode buffer #### ev_gen_map_file(nlines, fp) Generate map file. If not implemented the kernel itself will create the map file. * **Parameters:** * **nlines** – (int ``` * ``` ) number of lines in map file (-1 means write error) * **fp** – (FILE ``` * ``` ) output file * **Returns:** 0: not implemented * **Returns:** 1: ok * **Returns:** -1: write error #### ev_calc_step_over(target, ip) Calculate the address of the instruction which will be executed after “step over”. The kernel will put a breakpoint there. If the step over is equal to step into or we cannot calculate the address, return BADADDR. * **Parameters:** * **target** – (ea_t ``` * ``` ) pointer to the answer * **ip** – (ea_t) instruction address * **Returns:** 0: unimplemented * **Returns:** 1: implemented #### closebase(\*args) #### savebase(\*args) #### auto_empty(\*args) #### auto_empty_finally(\*args) #### determined_main(\*args) #### idasgn_loaded(\*args) #### kernel_config_loaded(\*args) #### compiler_changed(\*args) #### segm_moved(from_ea, to_ea, size, changed_netmap) #### func_added(pfn) #### function_added(func_ea) #### set_func_start(\*args) #### set_function_start(\*args) #### set_func_end(\*args) #### set_function_end(\*args) #### deleting_func(pfn) #### deleting_function(func_ea) #### sgr_changed(\*args) #### make_code(\*args) #### make_data(\*args) #### renamed(\*args) ### ida_idp.str2sreg(name: [str](https://docs.python.org/3/library/stdtypes.html#str)) get segment register number from its name or -1 ### ida_idp.ph ### *class* ida_idp.IDB_Hooks(\_flags: [int](https://docs.python.org/3/library/functions.html#int) = 0, \_hkcb_flags: [int](https://docs.python.org/3/library/functions.html#int) = 1) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### hook() → [bool](https://docs.python.org/3/library/functions.html#bool) #### unhook() → [bool](https://docs.python.org/3/library/functions.html#bool) #### closebase() → [None](https://docs.python.org/3/library/constants.html#None) The database will be closed now. #### savebase() → [None](https://docs.python.org/3/library/constants.html#None) The database is being saved. #### upgraded(\_from: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) The database has been upgraded and the receiver can upgrade its info as well #### auto_empty() → [None](https://docs.python.org/3/library/constants.html#None) Info: all analysis queues are empty. This callback is called once when the initial analysis is finished. If the queue is not empty upon the return from this callback, it will be called later again. #### auto_empty_finally() → [None](https://docs.python.org/3/library/constants.html#None) Info: all analysis queues are empty definitively. This callback is called only once. #### determined_main(main: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) The main() function has been determined. * **Parameters:** **main** – (ea_t) address of the main() function #### extlang_changed(kind: int, el: extlang_t \*, idx: int) → [None](https://docs.python.org/3/library/constants.html#None) The list of extlangs or the default extlang was changed. * **Parameters:** * **kind** – (int) 0: extlang installed 1: extlang removed 2: default extlang changed * **el** – (extlang_t ``` * ``` ) pointer to the extlang affected * **idx** – (int) extlang index #### idasgn_loaded(short_sig_name: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [None](https://docs.python.org/3/library/constants.html#None) FLIRT signature has been loaded for normal processing (not for recognition of startup sequences). * **Parameters:** **short_sig_name** – (const char ``` * ``` ) #### kernel_config_loaded(pass_number: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) This event is issued when ida.cfg is parsed. * **Parameters:** **pass_number** – (int) #### loader_finished(li: linput_t \*, neflags: uint16, filetypename: str) → [None](https://docs.python.org/3/library/constants.html#None) External file loader finished its work. Use this event to augment the existing loader functionality. * **Parameters:** * **li** – (linput_t ``` * ``` ) * **neflags** – (uint16) Load file flags * **filetypename** – (const char ``` * ``` ) #### flow_chart_created(fc: [qflow_chart_t](../ida_gdl/index.md#ida_gdl.qflow_chart_t)) → [None](https://docs.python.org/3/library/constants.html#None) Gui has retrieved a function flow chart. Plugins may modify the flow chart in this callback. * **Parameters:** **fc** – (qflow_chart_t ``` * ``` ) #### compiler_changed(adjust_inf_fields: [bool](https://docs.python.org/3/library/functions.html#bool)) → [None](https://docs.python.org/3/library/constants.html#None) The kernel has changed the compiler information. ( idainfo::cc structure; get_abi_name) * **Parameters:** **adjust_inf_fields** – (::bool) may change inf fields? #### changing_ti(ea: ida_idaapi.ea_t, new_type: type_t const \*, new_fnames: p_list const \*) → [None](https://docs.python.org/3/library/constants.html#None) An item typestring (c/c++ prototype) is to be changed. * **Parameters:** * **ea** – (ea_t) * **new_type** – (const type_t ``` * ``` ) * **new_fnames** – (const p_list ``` * ``` ) #### ti_changed(ea: ida_idaapi.ea_t, type: type_t const \*, fnames: p_list const \*) → [None](https://docs.python.org/3/library/constants.html#None) An item typestring (c/c++ prototype) has been changed. * **Parameters:** * **ea** – (ea_t) * **type** – (const type_t ``` * ``` ) * **fnames** – (const p_list ``` * ``` ) #### changing_op_ti(ea: ida_idaapi.ea_t, n: int, new_type: type_t const \*, new_fnames: p_list const \*) → [None](https://docs.python.org/3/library/constants.html#None) An operand typestring (c/c++ prototype) is to be changed. * **Parameters:** * **ea** – (ea_t) * **n** – (int) * **new_type** – (const type_t ``` * ``` ) * **new_fnames** – (const p_list ``` * ``` ) #### op_ti_changed(ea: ida_idaapi.ea_t, n: int, type: type_t const \*, fnames: p_list const \*) → [None](https://docs.python.org/3/library/constants.html#None) An operand typestring (c/c++ prototype) has been changed. * **Parameters:** * **ea** – (ea_t) * **n** – (int) * **type** – (const type_t ``` * ``` ) * **fnames** – (const p_list ``` * ``` ) #### changing_op_type(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), n: [int](https://docs.python.org/3/library/functions.html#int), opinfo: [opinfo_t](../ida_nalt/index.md#ida_nalt.opinfo_t)) → [None](https://docs.python.org/3/library/constants.html#None) An operand type (offset, hex, etc…) is to be changed. * **Parameters:** * **ea** – (ea_t) * **n** – (int) eventually or’ed with OPND_OUTER or OPND_ALL * **opinfo** – (const opinfo_t ``` * ``` ) additional operand info #### op_type_changed(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), n: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) An operand type (offset, hex, etc…) has been set or deleted. * **Parameters:** * **ea** – (ea_t) * **n** – (int) eventually or’ed with OPND_OUTER or OPND_ALL #### segm_added(s: segment_t \*) → [None](https://docs.python.org/3/library/constants.html#None) A new segment has been created. * **Parameters:** **s** – (segment_t ``` * ``` ) See also adding_segm #### deleting_segm(start_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) A segment is to be deleted. * **Parameters:** **start_ea** – (ea_t) #### segm_deleted(start_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), end_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), flags: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) A segment has been deleted. * **Parameters:** * **start_ea** – (ea_t) * **end_ea** – (ea_t) * **flags** – (int) #### changing_segm_start(s: segment_t \*, new_start: ida_idaapi.ea_t, segmod_flags: int) → [None](https://docs.python.org/3/library/constants.html#None) Segment start address is to be changed. * **Parameters:** * **s** – (segment_t ``` * ``` ) * **new_start** – (ea_t) * **segmod_flags** – (int) #### segm_start_changed(s: segment_t \*, oldstart: ida_idaapi.ea_t) → [None](https://docs.python.org/3/library/constants.html#None) Segment start address has been changed. * **Parameters:** * **s** – (segment_t ``` * ``` ) * **oldstart** – (ea_t) #### changing_segm_end(s: segment_t \*, new_end: ida_idaapi.ea_t, segmod_flags: int) → [None](https://docs.python.org/3/library/constants.html#None) Segment end address is to be changed. * **Parameters:** * **s** – (segment_t ``` * ``` ) * **new_end** – (ea_t) * **segmod_flags** – (int) #### segm_end_changed(s: segment_t \*, oldend: ida_idaapi.ea_t) → [None](https://docs.python.org/3/library/constants.html#None) Segment end address has been changed. * **Parameters:** * **s** – (segment_t ``` * ``` ) * **oldend** – (ea_t) #### changing_segm_name(s: segment_t \*, oldname: str) → [None](https://docs.python.org/3/library/constants.html#None) Segment name is being changed. * **Parameters:** * **s** – (segment_t ``` * ``` ) * **oldname** – (const char ``` * ``` ) #### segm_name_changed(s: segment_t \*, name: str) → [None](https://docs.python.org/3/library/constants.html#None) Segment name has been changed. * **Parameters:** * **s** – (segment_t ``` * ``` ) * **name** – (const char ``` * ``` ) #### changing_segm_class(s: segment_t \*) → [None](https://docs.python.org/3/library/constants.html#None) Segment class is being changed. * **Parameters:** **s** – (segment_t ``` * ``` ) #### segm_class_changed(s: segment_t \*, sclass: str) → [None](https://docs.python.org/3/library/constants.html#None) Segment class has been changed. * **Parameters:** * **s** – (segment_t ``` * ``` ) * **sclass** – (const char ``` * ``` ) #### segm_attrs_updated(s: segment_t \*) → [None](https://docs.python.org/3/library/constants.html#None) Segment attributes has been changed. * **Parameters:** **s** – (segment_t ``` * ``` ) This event is generated for secondary segment attributes (examples: color, permissions, etc) #### segm_moved(\_from: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), to: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), size: asize_t, changed_netmap: [bool](https://docs.python.org/3/library/functions.html#bool)) → [None](https://docs.python.org/3/library/constants.html#None) Segment has been moved. * **Parameters:** * **to** – (ea_t) * **size** – (asize_t) * **changed_netmap** – (bool) See also idb_event::allsegs_moved #### allsegs_moved(info: segm_move_infos_t \*) → [None](https://docs.python.org/3/library/constants.html#None) Program rebasing is complete. This event is generated after series of segm_moved events * **Parameters:** **info** – (segm_move_infos_t ``` * ``` ) #### func_added(pfn: func_t \*) → [None](https://docs.python.org/3/library/constants.html#None) The kernel has added a function. * **Parameters:** **pfn** – (func_t ``` * ``` ) #### func_updated(pfn: func_t \*) → [None](https://docs.python.org/3/library/constants.html#None) The kernel has updated a function. * **Parameters:** **pfn** – (func_t ``` * ``` ) #### set_func_start(pfn: func_t \*, new_start: ida_idaapi.ea_t) → [None](https://docs.python.org/3/library/constants.html#None) Function chunk start address will be changed. * **Parameters:** * **pfn** – (func_t ``` * ``` ) * **new_start** – (ea_t) #### set_func_end(pfn: func_t \*, new_end: ida_idaapi.ea_t) → [None](https://docs.python.org/3/library/constants.html#None) Function chunk end address will be changed. * **Parameters:** * **pfn** – (func_t ``` * ``` ) * **new_end** – (ea_t) #### deleting_func(pfn: func_t \*) → [None](https://docs.python.org/3/library/constants.html#None) The kernel is about to delete a function. * **Parameters:** **pfn** – (func_t ``` * ``` ) #### frame_deleted(pfn: func_t \*) → [None](https://docs.python.org/3/library/constants.html#None) The kernel has deleted a function frame. * **Parameters:** **pfn** – (func_t ``` * ``` ) idb_event::frame_created #### thunk_func_created(pfn: func_t \*) → [None](https://docs.python.org/3/library/constants.html#None) A thunk bit has been set for a function. * **Parameters:** **pfn** – (func_t ``` * ``` ) #### func_tail_appended(pfn: func_t \*, tail: func_t \*) → [None](https://docs.python.org/3/library/constants.html#None) A function tail chunk has been appended. * **Parameters:** * **pfn** – (func_t ``` * ``` ) * **tail** – (func_t ``` * ``` ) #### deleting_func_tail(pfn: func_t \*, tail: range_t) → [None](https://docs.python.org/3/library/constants.html#None) A function tail chunk is to be removed. * **Parameters:** * **pfn** – (func_t ``` * ``` ) * **tail** – (const range_t ``` * ``` ) #### func_tail_deleted(pfn: func_t \*, tail_ea: ida_idaapi.ea_t) → [None](https://docs.python.org/3/library/constants.html#None) A function tail chunk has been removed. * **Parameters:** * **pfn** – (func_t ``` * ``` ) * **tail_ea** – (ea_t) #### tail_owner_changed(tail: func_t \*, owner_func: ida_idaapi.ea_t, old_owner: ida_idaapi.ea_t) → [None](https://docs.python.org/3/library/constants.html#None) A tail chunk owner has been changed. * **Parameters:** * **tail** – (func_t ``` * ``` ) * **owner_func** – (ea_t) * **old_owner** – (ea_t) #### func_noret_changed(pfn: func_t \*) → [None](https://docs.python.org/3/library/constants.html#None) FUNC_NORET bit has been changed. * **Parameters:** **pfn** – (func_t ``` * ``` ) #### stkpnts_changed(pfn: func_t \*) → [None](https://docs.python.org/3/library/constants.html#None) Stack change points have been modified. * **Parameters:** **pfn** – (func_t ``` * ``` ) #### updating_tryblks(tbv: tryblks_t const \*) → [None](https://docs.python.org/3/library/constants.html#None) About to update tryblk information * **Parameters:** **tbv** – (const tryblks_t ``` * ``` ) #### tryblks_updated(tbv: tryblks_t const \*) → [None](https://docs.python.org/3/library/constants.html#None) Updated tryblk information * **Parameters:** **tbv** – (const tryblks_t ``` * ``` ) #### deleting_tryblks(range: [range_t](../ida_range/index.md#ida_range.range_t)) → [None](https://docs.python.org/3/library/constants.html#None) About to delete tryblk information in given range * **Parameters:** **range** – (const range_t ``` * ``` ) #### sgr_changed(start_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), end_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), regnum: [int](https://docs.python.org/3/library/functions.html#int), value: sel_t, old_value: sel_t, tag: uchar) → [None](https://docs.python.org/3/library/constants.html#None) The kernel has changed a segment register value. * **Parameters:** * **start_ea** – (ea_t) * **end_ea** – (ea_t) * **regnum** – (int) * **value** – (sel_t) * **old_value** – (sel_t) * **tag** – (uchar) Segment register range tags #### make_code(insn: insn_t const \*) → [None](https://docs.python.org/3/library/constants.html#None) An instruction is being created. * **Parameters:** **insn** – (const insn_t\*) #### make_data(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), flags: flags64_t, tid: tid_t, len: asize_t) → [None](https://docs.python.org/3/library/constants.html#None) A data item is being created. * **Parameters:** * **ea** – (ea_t) * **flags** – (flags64_t) * **tid** – (tid_t) * **len** – (asize_t) #### destroyed_items(ea1: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), ea2: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), will_disable_range: [bool](https://docs.python.org/3/library/functions.html#bool)) → [None](https://docs.python.org/3/library/constants.html#None) Instructions/data have been destroyed in [ea1,ea2). * **Parameters:** * **ea1** – (ea_t) * **ea2** – (ea_t) * **will_disable_range** – (bool) #### renamed(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), new_name: [str](https://docs.python.org/3/library/stdtypes.html#str), local_name: [bool](https://docs.python.org/3/library/functions.html#bool), old_name: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [None](https://docs.python.org/3/library/constants.html#None) The kernel has renamed a byte. See also the rename event * **Parameters:** * **ea** – (ea_t) * **new_name** – (const char ``` * ``` ) can be nullptr * **local_name** – (bool) * **old_name** – (const char ``` * ``` ) can be nullptr #### byte_patched(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), old_value: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) A byte has been patched. * **Parameters:** * **ea** – (ea_t) * **old_value** – (uint32) #### changing_cmt(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), repeatable_cmt: [bool](https://docs.python.org/3/library/functions.html#bool), newcmt: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [None](https://docs.python.org/3/library/constants.html#None) An item comment is to be changed. * **Parameters:** * **ea** – (ea_t) * **repeatable_cmt** – (bool) * **newcmt** – (const char ``` * ``` ) #### cmt_changed(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), repeatable_cmt: [bool](https://docs.python.org/3/library/functions.html#bool)) → [None](https://docs.python.org/3/library/constants.html#None) An item comment has been changed. * **Parameters:** * **ea** – (ea_t) * **repeatable_cmt** – (bool) #### changing_range_cmt(kind: range_kind_t, a: [range_t](../ida_range/index.md#ida_range.range_t), cmt: [str](https://docs.python.org/3/library/stdtypes.html#str), repeatable: [bool](https://docs.python.org/3/library/functions.html#bool)) → [None](https://docs.python.org/3/library/constants.html#None) Range comment is to be changed. * **Parameters:** * **kind** – (range_kind_t) * **a** – (const range_t ``` * ``` ) * **cmt** – (const char ``` * ``` ) * **repeatable** – (bool) #### range_cmt_changed(kind: range_kind_t, a: [range_t](../ida_range/index.md#ida_range.range_t), cmt: [str](https://docs.python.org/3/library/stdtypes.html#str), repeatable: [bool](https://docs.python.org/3/library/functions.html#bool)) → [None](https://docs.python.org/3/library/constants.html#None) Range comment has been changed. * **Parameters:** * **kind** – (range_kind_t) * **a** – (const range_t ``` * ``` ) * **cmt** – (const char ``` * ``` ) * **repeatable** – (bool) #### extra_cmt_changed(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), line_idx: [int](https://docs.python.org/3/library/functions.html#int), cmt: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [None](https://docs.python.org/3/library/constants.html#None) An extra comment has been changed. * **Parameters:** * **ea** – (ea_t) * **line_idx** – (int) * **cmt** – (const char ``` * ``` ) #### item_color_changed(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), color: bgcolor_t) → [None](https://docs.python.org/3/library/constants.html#None) An item color has been changed. * **Parameters:** * **ea** – (ea_t) * **color** – (bgcolor_t) if color==DEFCOLOR, the color is deleted. #### callee_addr_changed(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), callee: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) Callee address has been updated by the user. * **Parameters:** * **ea** – (ea_t) * **callee** – (ea_t) #### bookmark_changed(index: int, pos: lochist_entry_t const \*, desc: str, operation: int) → [None](https://docs.python.org/3/library/constants.html#None) Bookmarked position changed. * **Parameters:** * **index** – (uint32) * **pos** – (::const lochist_entry_t ``` * ``` ) * **desc** – (::const char ``` * ``` ) * **operation** – (int) 0-added, 1-updated, 2-deleted if desc==nullptr, then the bookmark was deleted. #### sgr_deleted(start_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), end_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), regnum: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) The kernel has deleted a segment register value. * **Parameters:** * **start_ea** – (ea_t) * **end_ea** – (ea_t) * **regnum** – (int) #### adding_segm(s: segment_t \*) → [None](https://docs.python.org/3/library/constants.html#None) A segment is being created. * **Parameters:** **s** – (segment_t ``` * ``` ) #### func_deleted(func_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) A function has been deleted. * **Parameters:** **func_ea** – (ea_t) #### dirtree_mkdir(dt: dirtree_t \*, path: str) → [None](https://docs.python.org/3/library/constants.html#None) Dirtree: a directory has been created. * **Parameters:** * **dt** – (dirtree_t ``` * ``` ) * **path** – (::const char ``` * ``` ) #### dirtree_rmdir(dt: dirtree_t \*, path: str) → [None](https://docs.python.org/3/library/constants.html#None) Dirtree: a directory has been deleted. * **Parameters:** * **dt** – (dirtree_t ``` * ``` ) * **path** – (::const char ``` * ``` ) #### dirtree_link(dt: dirtree_t \*, path: str, link: bool) → [None](https://docs.python.org/3/library/constants.html#None) Dirtree: an item has been linked/unlinked. * **Parameters:** * **dt** – (dirtree_t ``` * ``` ) * **path** – (::const char ``` * ``` ) * **link** – (::bool) #### dirtree_move(dt: dirtree_t \*, \_from: str, to: str) → [None](https://docs.python.org/3/library/constants.html#None) Dirtree: a directory or item has been moved. * **Parameters:** * **dt** – (dirtree_t ``` * ``` ) * **to** – (::const char ``` * ``` ) #### dirtree_rank(dt: dirtree_t \*, path: str, rank: int) → [None](https://docs.python.org/3/library/constants.html#None) Dirtree: a directory or item rank has been changed. * **Parameters:** * **dt** – (dirtree_t ``` * ``` ) * **path** – (::const char ``` * ``` ) * **rank** – (::size_t) #### dirtree_rminode(dt: dirtree_t \*, inode: inode_t) → [None](https://docs.python.org/3/library/constants.html#None) Dirtree: an inode became unavailable. * **Parameters:** * **dt** – (dirtree_t ``` * ``` ) * **inode** – (inode_t) #### dirtree_segm_moved(dt: dirtree_t \*) → [None](https://docs.python.org/3/library/constants.html#None) Dirtree: inodes were changed due to a segment movement or a program rebasing * **Parameters:** **dt** – (dirtree_t ``` * ``` ) #### local_types_changed(ltc: local_type_change_t, ordinal: [int](https://docs.python.org/3/library/functions.html#int), name: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [None](https://docs.python.org/3/library/constants.html#None) Local types have been changed * **Parameters:** * **ltc** – (local_type_change_t) * **ordinal** – (uint32) 0 means ordinal is unknown * **name** – (const char ``` * ``` ) nullptr means name is unknown #### lt_udm_created(udtname: [str](https://docs.python.org/3/library/stdtypes.html#str), udm: [udm_t](../ida_typeinf/index.md#ida_typeinf.udm_t)) → [None](https://docs.python.org/3/library/constants.html#None) local type udt member has been added * **Parameters:** * **udtname** – (::const char ``` * ``` ) * **udm** – (::const udm_t ``` * ``` ) #### lt_udm_deleted(udtname: [str](https://docs.python.org/3/library/stdtypes.html#str), udm_tid: tid_t, udm: [udm_t](../ida_typeinf/index.md#ida_typeinf.udm_t)) → [None](https://docs.python.org/3/library/constants.html#None) local type udt member has been deleted * **Parameters:** * **udtname** – (::const char ``` * ``` ) * **udm_tid** – (tid_t) * **udm** – (::const udm_t ``` * ``` ) #### lt_udm_renamed(udtname: [str](https://docs.python.org/3/library/stdtypes.html#str), udm: [udm_t](../ida_typeinf/index.md#ida_typeinf.udm_t), oldname: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [None](https://docs.python.org/3/library/constants.html#None) local type udt member has been renamed * **Parameters:** * **udtname** – (::const char ``` * ``` ) * **udm** – (::const udm_t ``` * ``` ) * **oldname** – (::const char ``` * ``` ) #### lt_udm_changed(udtname: [str](https://docs.python.org/3/library/stdtypes.html#str), udm_tid: tid_t, udmold: [udm_t](../ida_typeinf/index.md#ida_typeinf.udm_t), udmnew: [udm_t](../ida_typeinf/index.md#ida_typeinf.udm_t)) → [None](https://docs.python.org/3/library/constants.html#None) local type udt member has been changed * **Parameters:** * **udtname** – (::const char ``` * ``` ) * **udm_tid** – (tid_t) * **udmold** – (::const udm_t ``` * ``` ) * **udmnew** – (::const udm_t ``` * ``` ) #### lt_udt_expanded(udtname: [str](https://docs.python.org/3/library/stdtypes.html#str), udm_tid: tid_t, delta: adiff_t) → [None](https://docs.python.org/3/library/constants.html#None) A structure type has been expanded/shrank. * **Parameters:** * **udtname** – (::const char ``` * ``` ) * **udm_tid** – (tid_t) the gap was added/removed before this member * **delta** – (adiff_t) number of added/removed bytes #### frame_created(func_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) A function frame has been created. * **Parameters:** **func_ea** – (ea_t) idb_event::frame_deleted #### frame_udm_created(func_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), udm: [udm_t](../ida_typeinf/index.md#ida_typeinf.udm_t)) → [None](https://docs.python.org/3/library/constants.html#None) Frame member has been added. * **Parameters:** * **func_ea** – (ea_t) * **udm** – (::const udm_t ``` * ``` ) #### frame_udm_deleted(func_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), udm_tid: tid_t, udm: [udm_t](../ida_typeinf/index.md#ida_typeinf.udm_t)) → [None](https://docs.python.org/3/library/constants.html#None) Frame member has been deleted. * **Parameters:** * **func_ea** – (ea_t) * **udm_tid** – (tid_t) * **udm** – (::const udm_t ``` * ``` ) #### frame_udm_renamed(func_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), udm: [udm_t](../ida_typeinf/index.md#ida_typeinf.udm_t), oldname: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [None](https://docs.python.org/3/library/constants.html#None) Frame member has been renamed. * **Parameters:** * **func_ea** – (ea_t) * **udm** – (::const udm_t ``` * ``` ) * **oldname** – (::const char ``` * ``` ) #### frame_udm_changed(func_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), udm_tid: tid_t, udmold: [udm_t](../ida_typeinf/index.md#ida_typeinf.udm_t), udmnew: [udm_t](../ida_typeinf/index.md#ida_typeinf.udm_t)) → [None](https://docs.python.org/3/library/constants.html#None) Frame member has been changed. * **Parameters:** * **func_ea** – (ea_t) * **udm_tid** – (tid_t) * **udmold** – (::const udm_t ``` * ``` ) * **udmnew** – (::const udm_t ``` * ``` ) #### frame_expanded(func_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), udm_tid: tid_t, delta: adiff_t) → [None](https://docs.python.org/3/library/constants.html#None) A frame type has been expanded/shrank. * **Parameters:** * **func_ea** – (ea_t) * **udm_tid** – (tid_t) the gap was added/removed before this member * **delta** – (adiff_t) number of added/removed bytes #### idasgn_matched_ea(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), name: [str](https://docs.python.org/3/library/stdtypes.html#str), lib_name: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [None](https://docs.python.org/3/library/constants.html#None) A FLIRT match has been found * **Parameters:** * **ea** – (ea_t) the matching address * **name** – (::const char ``` * ``` ) the matched name * **lib_name** – (::const char ``` * ``` ) library name extracted from signature file #### lt_edm_created(enumname: [str](https://docs.python.org/3/library/stdtypes.html#str), edm: [edm_t](../ida_typeinf/index.md#ida_typeinf.edm_t)) → [None](https://docs.python.org/3/library/constants.html#None) local type enum member has been added * **Parameters:** * **enumname** – (::const char ``` * ``` ) * **edm** – (::const edm_t ``` * ``` ) #### lt_edm_deleted(enumname: [str](https://docs.python.org/3/library/stdtypes.html#str), edm_tid: tid_t, edm: [edm_t](../ida_typeinf/index.md#ida_typeinf.edm_t)) → [None](https://docs.python.org/3/library/constants.html#None) local type enum member has been deleted * **Parameters:** * **enumname** – (::const char ``` * ``` ) * **edm_tid** – (tid_t) * **edm** – (::const edm_t ``` * ``` ) #### lt_edm_renamed(enumname: [str](https://docs.python.org/3/library/stdtypes.html#str), edm: [edm_t](../ida_typeinf/index.md#ida_typeinf.edm_t), oldname: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [None](https://docs.python.org/3/library/constants.html#None) local type enum member has been renamed * **Parameters:** * **enumname** – (::const char ``` * ``` ) * **edm** – (::const edm_t ``` * ``` ) * **oldname** – (::const char ``` * ``` ) #### lt_edm_changed(enumname: [str](https://docs.python.org/3/library/stdtypes.html#str), edm_tid: tid_t, edmold: [edm_t](../ida_typeinf/index.md#ida_typeinf.edm_t), edmnew: [edm_t](../ida_typeinf/index.md#ida_typeinf.edm_t)) → [None](https://docs.python.org/3/library/constants.html#None) local type enum member has been changed * **Parameters:** * **enumname** – (::const char ``` * ``` ) * **edm_tid** – (tid_t) * **edmold** – (::const edm_t ``` * ``` ) * **edmnew** – (::const edm_t ``` * ``` ) #### local_type_renamed(ordinal: [int](https://docs.python.org/3/library/functions.html#int), oldname: [str](https://docs.python.org/3/library/stdtypes.html#str), newname: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [None](https://docs.python.org/3/library/constants.html#None) Local type has been renamed * **Parameters:** * **ordinal** – (uint32) 0 means ordinal is unknown * **oldname** – (const char ``` * ``` ) nullptr means name is unknown * **newname** – (const char ``` * ``` ) nullptr means name is unknown #### dirtree_ordering_changed(dt: dirtree_t \*, diridx: diridx_t, natural: bool) → [None](https://docs.python.org/3/library/constants.html#None) Dirtree: a directory’s “natural” ordering changed * **Parameters:** * **dt** – (dirtree_t ``` * ``` ) * **diridx** – (diridx_t) * **natural** – (::bool) #### dirtree_bulk_move(dt: dirtree_t \*, sources: dirtree_bulk_results_t \*, moved_items: dirtree_cursor_vec_t \*, dstdir: str, dstrank: ssize_t) → [None](https://docs.python.org/3/library/constants.html#None) Dirtree: many items have been moved. * **Parameters:** * **dt** – (dirtree_t ``` * ``` ) * **sources** – (dirtree_bulk_results_t ``` * ``` ) * **moved_items** – (dirtree_cursor_vec_t ``` * ``` ) * **dstdir** – (::const char ``` * ``` ) * **dstrank** – (ssize_t) SOURCES and MOVED_ITEMS correspond to each other #### segment_added(seg_start_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) A new segment has been created. * **Parameters:** **seg_start_ea** – (ea_t) #### changing_segment_start(seg_start_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), new_start: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), segmod_flags: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) Segment start address is to be changed. * **Parameters:** * **seg_start_ea** – (ea_t) * **new_start** – (ea_t) * **segmod_flags** – (int) #### segment_start_changed(seg_start_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), oldstart: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) Segment start address has been changed. * **Parameters:** * **seg_start_ea** – (ea_t) * **oldstart** – (ea_t) #### changing_segment_end(seg_start_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), new_end: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), segmod_flags: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) Segment end address is to be changed. * **Parameters:** * **seg_start_ea** – (ea_t) * **new_end** – (ea_t) * **segmod_flags** – (int) #### segment_end_changed(seg_start_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), oldend: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) Segment end address has been changed. * **Parameters:** * **seg_start_ea** – (ea_t) * **oldend** – (ea_t) #### changing_segment_name(seg_start_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), oldname: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [None](https://docs.python.org/3/library/constants.html#None) Segment name is being changed. * **Parameters:** * **seg_start_ea** – (ea_t) * **oldname** – (const char ``` * ``` ) #### segment_name_changed(seg_start_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), name: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [None](https://docs.python.org/3/library/constants.html#None) Segment name has been changed. * **Parameters:** * **seg_start_ea** – (ea_t) * **name** – (const char ``` * ``` ) #### changing_segment_class(seg_start_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) Segment class is being changed. * **Parameters:** **seg_start_ea** – (ea_t) #### segment_class_changed(seg_start_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), sclass: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [None](https://docs.python.org/3/library/constants.html#None) Segment class has been changed. * **Parameters:** * **seg_start_ea** – (ea_t) * **sclass** – (const char ``` * ``` ) #### segment_attrs_updated(seg_start_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) Segment attributes has been changed. * **Parameters:** **seg_start_ea** – (ea_t) This event is generated for secondary segment attributes (examples: color, permissions, etc) #### function_added(func_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) The kernel has added a function. * **Parameters:** **func_ea** – (ea_t) function entry start address #### function_updated(fchunk_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) The kernel has updated a function. * **Parameters:** **fchunk_ea** – (ea_t) function entry or tail start address #### set_function_start(fchunk: fchunk_info_t \*, new_start: ida_idaapi.ea_t) → [None](https://docs.python.org/3/library/constants.html#None) Function chunk start address will be changed. * **Parameters:** * **fchunk** – (fchunk_info_t ``` * ``` ) * **new_start** – (ea_t) #### set_function_end(fchunk: fchunk_info_t \*, new_end: ida_idaapi.ea_t) → [None](https://docs.python.org/3/library/constants.html#None) Function chunk end address will be changed. * **Parameters:** * **fchunk** – (fchunk_info_t ``` * ``` ) * **new_end** – (ea_t) #### deleting_function(func_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) The kernel is about to delete a function. * **Parameters:** **func_ea** – (ea_t) function entry start address #### function_tail_appended(func_ea: ida_idaapi.ea_t, tail: func_tail_info_t \*) → [None](https://docs.python.org/3/library/constants.html#None) A function tail chunk has been appended. * **Parameters:** * **func_ea** – (ea_t) function entry start address * **tail** – (func_tail_info_t ``` * ``` ) #### deleting_function_tail(func_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), tail: [range_t](../ida_range/index.md#ida_range.range_t)) → [None](https://docs.python.org/3/library/constants.html#None) A function tail chunk is to be removed. * **Parameters:** * **func_ea** – (ea_t) function entry start address * **tail** – (const range_t ``` * ``` ) #### function_tail_deleted(func_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), tail_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) A function tail chunk has been removed. * **Parameters:** * **func_ea** – (ea_t) function entry start address * **tail_ea** – (ea_t) #### function_tail_owner_changed(tail: func_tail_info_t \*, owner_func: ida_idaapi.ea_t, old_owner: ida_idaapi.ea_t) → [None](https://docs.python.org/3/library/constants.html#None) A tail chunk owner has been changed. * **Parameters:** * **tail** – (func_tail_info_t ``` * ``` ) * **owner_func** – (ea_t) * **old_owner** – (ea_t) #### function_noret_changed(func_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) FUNC_NORET bit has been changed. * **Parameters:** **func_ea** – (ea_t) function entry start address #### function_stkpnts_changed(func_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) Stack change points have been modified. * **Parameters:** **func_ea** – (ea_t) function entry start address #### thunk_function_created(func_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) A thunk bit has been set for a function. * **Parameters:** **func_ea** – (ea_t) function entry start address #### function_frame_deleted(func_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) The kernel has deleted a function frame. * **Parameters:** **func_ea** – (ea_t) function entry start address #### moving_range_cmt(kind: range_kind_t, oldea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), newea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), repeatable: [bool](https://docs.python.org/3/library/functions.html#bool)) → [None](https://docs.python.org/3/library/constants.html#None) Range comment is to be moved. * **Parameters:** * **kind** – (range_kind_t) * **oldea** – (ea_t) * **newea** – (ea_t) * **repeatable** – (bool) ### ida_idp.get_idb_notifier_addr(arg1: PyObject \*) → PyObject \* ### ida_idp.get_idb_notifier_ud_addr(hooks: [IDB_Hooks](#ida_idp.IDB_Hooks)) → PyObject \* # index.html.md # ida_graph Graph view management. ## Attributes | [`NIF_BG_COLOR`](#ida_graph.NIF_BG_COLOR) | node_info_t::bg_color | |-----------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [`NIF_FRAME_COLOR`](#ida_graph.NIF_FRAME_COLOR) | node_info_t::frame_color | | [`NIF_EA`](#ida_graph.NIF_EA) | node_info_t::ea | | [`NIF_TEXT`](#ida_graph.NIF_TEXT) | node_info_t::text | | [`NIF_FLAGS`](#ida_graph.NIF_FLAGS) | node_info_t::flags | | [`NIF_ALL`](#ida_graph.NIF_ALL) | | | [`GLICTL_CENTER`](#ida_graph.GLICTL_CENTER) | the gli should be set/get as center | | [`NIFF_SHOW_CONTENTS`](#ida_graph.NIFF_SHOW_CONTENTS) | | | [`cvar`](#ida_graph.cvar) | | | [`layout_none`](#ida_graph.layout_none) | | | [`layout_digraph`](#ida_graph.layout_digraph) | | | [`layout_tree`](#ida_graph.layout_tree) | | | [`layout_circle`](#ida_graph.layout_circle) | | | [`layout_polar_tree`](#ida_graph.layout_polar_tree) | | | [`layout_orthogonal`](#ida_graph.layout_orthogonal) | | | [`layout_radial_tree`](#ida_graph.layout_radial_tree) | | | [`git_none`](#ida_graph.git_none) | nothing | | [`git_edge`](#ida_graph.git_edge) | edge (graph_item_t::e, graph_item_t::n. n is farthest edge endpoint) | | [`git_node`](#ida_graph.git_node) | node title (graph_item_t::n) | | [`git_tool`](#ida_graph.git_tool) | node title button (graph_item_t::n, graph_item_t::b) | | [`git_text`](#ida_graph.git_text) | node text (graph_item_t::n, graph_item_t::p) | | [`git_elp`](#ida_graph.git_elp) | edge layout point (graph_item_t::elp) | | [`ygap`](#ida_graph.ygap) | | | [`xgap`](#ida_graph.xgap) | | | [`arrow_height`](#ida_graph.arrow_height) | | | [`arrow_width`](#ida_graph.arrow_width) | | | [`MTG_GROUP_NODE`](#ida_graph.MTG_GROUP_NODE) | is group node? | | [`MTG_DOT_NODE`](#ida_graph.MTG_DOT_NODE) | is dot node? | | [`MTG_NON_DISPLAYABLE_NODE`](#ida_graph.MTG_NON_DISPLAYABLE_NODE) | for disassembly graphs - non-displayable nodes have a visible area that is too large to generate disassembly lines for without IDA slowing down significantly (see MAX_VISIBLE_NODE_AREA) | | [`COLLAPSED_NODE`](#ida_graph.COLLAPSED_NODE) | | | [`grcode_calculating_layout`](#ida_graph.grcode_calculating_layout) | calculating user-defined graph layout. | | [`grcode_layout_calculated`](#ida_graph.grcode_layout_calculated) | graph layout calculated. | | [`grcode_changed_graph`](#ida_graph.grcode_changed_graph) | new graph has been set. | | [`grcode_reserved`](#ida_graph.grcode_reserved) | | | [`grcode_clicked`](#ida_graph.grcode_clicked) | graph is being clicked. this callback allows you to ignore some clicks. it occurs too early, internal graph variables are not updated yet. current_item1, current_item2 point to the same thing. item2 has more information. see also: custom_viewer_click_t | | [`grcode_dblclicked`](#ida_graph.grcode_dblclicked) | a graph node has been double clicked. | | [`grcode_creating_group`](#ida_graph.grcode_creating_group) | a group is being created. this provides an opportunity for the graph to forbid creation of the group. Note that groups management is done by the interactive_graph_t instance itself: there is no need to modify the graph in this callback. | | [`grcode_deleting_group`](#ida_graph.grcode_deleting_group) | a group is being deleted. this provides an opportunity for the graph to forbid deletion of the group. Note that groups management is done by the interactive_graph_t instance itself: there is no need to modify the graph in this callback. | | [`grcode_group_visibility`](#ida_graph.grcode_group_visibility) | a group is being collapsed/uncollapsed this provides an opportunity for the graph to forbid changing the visibility of the group. Note that groups management is done by the interactive_graph_t instance itself: there is no need to modify the graph in this callback. | | [`grcode_gotfocus`](#ida_graph.grcode_gotfocus) | a graph viewer got focus. | | [`grcode_lostfocus`](#ida_graph.grcode_lostfocus) | a graph viewer lost focus. | | [`grcode_user_refresh`](#ida_graph.grcode_user_refresh) | refresh user-defined graph nodes and edges This is called when the UI considers that it is necessary to recreate the graph layout, and thus has to ensure that the 'interactive_graph_t' instance it is using, is up-to-date. For example: | | [`grcode_reserved2`](#ida_graph.grcode_reserved2) | | | [`grcode_user_text`](#ida_graph.grcode_user_text) | retrieve text for user-defined graph node. NB: do not use anything calling GDI! | | [`grcode_user_size`](#ida_graph.grcode_user_size) | calculate node size for user-defined graph. | | [`grcode_user_title`](#ida_graph.grcode_user_title) | render node title of a user-defined graph. | | [`grcode_user_draw`](#ida_graph.grcode_user_draw) | render node of a user-defined graph. NB: draw only on the specified DC and nowhere else! | | [`grcode_user_hint`](#ida_graph.grcode_user_hint) | retrieve hint for the user-defined graph. | | [`grcode_destroyed`](#ida_graph.grcode_destroyed) | graph is being destroyed. Note that this doesn't mean the graph viewer is being destroyed; this only means that the graph that is being displayed by it is being destroyed, and that, e.g., any possibly cached data should be invalidated (this event can happen when, for example, the user decides to group nodes together: that operation will effectively create a new graph, that will replace the old one.) To be notified when the graph viewer itself is being destroyed, please see notification 'view_close', in kernwin.hpp | | [`grcode_create_graph_viewer`](#ida_graph.grcode_create_graph_viewer) | use create_graph_viewer() | | [`grcode_get_graph_viewer`](#ida_graph.grcode_get_graph_viewer) | use get_graph_viewer() | | [`grcode_get_viewer_graph`](#ida_graph.grcode_get_viewer_graph) | use get_viewer_graph() | | [`grcode_create_interactive_graph`](#ida_graph.grcode_create_interactive_graph) | use create_interactive_graph() | | [`grcode_set_viewer_graph`](#ida_graph.grcode_set_viewer_graph) | use set_viewer_graph() | | [`grcode_refresh_viewer`](#ida_graph.grcode_refresh_viewer) | use refresh_viewer() | | [`grcode_fit_window`](#ida_graph.grcode_fit_window) | use viewer_fit_window() | | [`grcode_get_curnode`](#ida_graph.grcode_get_curnode) | use viewer_get_curnode() | | [`grcode_center_on`](#ida_graph.grcode_center_on) | use viewer_center_on() | | [`grcode_get_selection`](#ida_graph.grcode_get_selection) | use viewer_get_selection() | | [`grcode_del_custom_layout`](#ida_graph.grcode_del_custom_layout) | use interactive_graph_t::del_custom_layout() | | [`grcode_set_custom_layout`](#ida_graph.grcode_set_custom_layout) | use interactive_graph_t::set_custom_layout() | | [`grcode_set_graph_groups`](#ida_graph.grcode_set_graph_groups) | use interactive_graph_t::set_graph_groups() | | [`grcode_clear`](#ida_graph.grcode_clear) | use interactive_graph_t::clear() | | [`grcode_create_digraph_layout`](#ida_graph.grcode_create_digraph_layout) | use interactive_graph_t::create_digraph_layout() | | [`grcode_create_tree_layout`](#ida_graph.grcode_create_tree_layout) | use drawable_graph_t::create_tree_layout() | | [`grcode_create_circle_layout`](#ida_graph.grcode_create_circle_layout) | use drawable_graph_t::create_circle_layout() | | [`grcode_get_node_representative`](#ida_graph.grcode_get_node_representative) | use interactive_graph_t::get_node_representative() | | [`grcode_find_subgraph_node`](#ida_graph.grcode_find_subgraph_node) | use interactive_graph_t::_find_subgraph_node() | | [`grcode_create_group`](#ida_graph.grcode_create_group) | use interactive_graph_t::create_group() | | [`grcode_get_custom_layout`](#ida_graph.grcode_get_custom_layout) | use interactive_graph_t::get_custom_layout() | | [`grcode_get_graph_groups`](#ida_graph.grcode_get_graph_groups) | use interactive_graph_t::get_graph_groups() | | [`grcode_empty`](#ida_graph.grcode_empty) | use interactive_graph_t::empty() | | [`grcode_is_visible_node`](#ida_graph.grcode_is_visible_node) | use interactive_graph_t::is_visible_node() | | [`grcode_delete_group`](#ida_graph.grcode_delete_group) | use interactive_graph_t::delete_group() | | [`grcode_change_group_visibility`](#ida_graph.grcode_change_group_visibility) | use interactive_graph_t::change_group_visibility() | | [`grcode_set_edge`](#ida_graph.grcode_set_edge) | use interactive_graph_t::set_edge() | | [`grcode_node_qty`](#ida_graph.grcode_node_qty) | use interactive_graph_t::node_qty() | | [`grcode_nrect`](#ida_graph.grcode_nrect) | use interactive_graph_t::nrect() | | [`grcode_set_titlebar_height`](#ida_graph.grcode_set_titlebar_height) | use viewer_set_titlebar_height() | | [`grcode_create_user_graph_place`](#ida_graph.grcode_create_user_graph_place) | use create_user_graph_place() | | [`grcode_create_disasm_graph1`](#ida_graph.grcode_create_disasm_graph1) | use create_disasm_graph(ea_t ea) | | [`grcode_create_disasm_graph2`](#ida_graph.grcode_create_disasm_graph2) | use create_disasm_graph(const rangevec_t &ranges) | | [`grcode_set_node_info`](#ida_graph.grcode_set_node_info) | use viewer_set_node_info() | | [`grcode_get_node_info`](#ida_graph.grcode_get_node_info) | use viewer_get_node_info() | | [`grcode_del_node_info`](#ida_graph.grcode_del_node_info) | use viewer_del_node_info() | | [`grcode_viewer_create_groups`](#ida_graph.grcode_viewer_create_groups) | | | [`grcode_viewer_delete_groups`](#ida_graph.grcode_viewer_delete_groups) | | | [`grcode_viewer_groups_visibility`](#ida_graph.grcode_viewer_groups_visibility) | | | [`grcode_viewer_create_groups_vec`](#ida_graph.grcode_viewer_create_groups_vec) | use viewer_create_groups() | | [`grcode_viewer_delete_groups_vec`](#ida_graph.grcode_viewer_delete_groups_vec) | use viewer_delete_groups() | | [`grcode_viewer_groups_visibility_vec`](#ida_graph.grcode_viewer_groups_visibility_vec) | use viewer_set_groups_visibility() | | [`grcode_delete_interactive_graph`](#ida_graph.grcode_delete_interactive_graph) | use delete_interactive_graph() | | [`grcode_edge_infos_wrapper_copy`](#ida_graph.grcode_edge_infos_wrapper_copy) | use edge_infos_wrapper_t::operator=() | | [`grcode_edge_infos_wrapper_clear`](#ida_graph.grcode_edge_infos_wrapper_clear) | use edge_infos_wrapper_t::clear() | | [`grcode_attach_menu_item`](#ida_graph.grcode_attach_menu_item) | | | [`grcode_set_gli`](#ida_graph.grcode_set_gli) | use viewer_set_gli() | | [`grcode_get_gli`](#ida_graph.grcode_get_gli) | use viewer_get_gli() | | [`edge_t`](#ida_graph.edge_t) | | | [`node_ordering_t`](#ida_graph.node_ordering_t) | | | [`abstract_graph_t`](#ida_graph.abstract_graph_t) | | | [`mutable_graph_t`](#ida_graph.mutable_graph_t) | | | [`create_mutable_graph`](#ida_graph.create_mutable_graph) | | | [`delete_mutable_graph`](#ida_graph.delete_mutable_graph) | | | [`grcode_create_mutable_graph`](#id0) | | | [`grcode_create_mutable_graph`](#id0) | | ## Classes | [`screen_graph_selection_base_t`](#ida_graph.screen_graph_selection_base_t) | | |-------------------------------------------------------------------------------|----| | [`node_layout_t`](#ida_graph.node_layout_t) | | | [`pointvec_t`](#ida_graph.pointvec_t) | | | [`node_info_t`](#ida_graph.node_info_t) | | | [`graph_node_visitor_t`](#ida_graph.graph_node_visitor_t) | | | [`graph_path_visitor_t`](#ida_graph.graph_path_visitor_t) | | | [`point_t`](#ida_graph.point_t) | | | [`pointseq_t`](#ida_graph.pointseq_t) | | | [`rect_t`](#ida_graph.rect_t) | | | [`TPointDouble`](#ida_graph.TPointDouble) | | | [`edge_info_t`](#ida_graph.edge_info_t) | | | [`edge_layout_point_t`](#ida_graph.edge_layout_point_t) | | | [`selection_item_t`](#ida_graph.selection_item_t) | | | [`screen_graph_selection_t`](#ida_graph.screen_graph_selection_t) | | | [`edge_segment_t`](#ida_graph.edge_segment_t) | | | [`graph_item_t`](#ida_graph.graph_item_t) | | | [`interval_t`](#ida_graph.interval_t) | | | [`row_info_t`](#ida_graph.row_info_t) | | | [`drawable_graph_t`](#ida_graph.drawable_graph_t) | | | [`edge_infos_wrapper_t`](#ida_graph.edge_infos_wrapper_t) | | | [`interactive_graph_t`](#ida_graph.interactive_graph_t) | | | [`graph_visitor_t`](#ida_graph.graph_visitor_t) | | | [`group_crinfo_t`](#ida_graph.group_crinfo_t) | | | [`user_graph_place_t`](#ida_graph.user_graph_place_t) | | | [`GraphViewer`](#ida_graph.GraphViewer) | | ## Functions | [`get_node_info`](#ida_graph.get_node_info)(→ bool) | Get node info. | |---------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [`set_node_info`](#ida_graph.set_node_info)(→ None) | Set node info. | | [`del_node_info`](#ida_graph.del_node_info)(→ None) | Delete the node_info_t for the given node. | | [`clr_node_info`](#ida_graph.clr_node_info)(→ None) | Clear node info for the given node. | | [`calc_dist`](#ida_graph.calc_dist)(→ double) | Calculate distance between p and q. | | [`create_graph_viewer`](#ida_graph.create_graph_viewer)(→ graph_viewer_t \*) | Create a custom graph viewer. | | [`get_graph_viewer`](#ida_graph.get_graph_viewer)(→ graph_viewer_t \*) | Get custom graph viewer for given form. | | [`create_interactive_graph`](#ida_graph.create_interactive_graph)(→ interactive_graph_t \*) | Create a new empty graph with given id. | | [`create_disasm_graph`](#ida_graph.create_disasm_graph)(→ interactive_graph_t \*) | This function has the following signatures: | | [`get_viewer_graph`](#ida_graph.get_viewer_graph)(→ interactive_graph_t \*) | Get graph object for given custom graph viewer. | | [`set_viewer_graph`](#ida_graph.set_viewer_graph)(→ None) | Set the underlying graph object for the given viewer. | | [`refresh_viewer`](#ida_graph.refresh_viewer)(→ None) | Redraw the graph in the given view. | | [`viewer_fit_window`](#ida_graph.viewer_fit_window)(→ None) | Fit graph viewer to its parent form. | | [`viewer_get_curnode`](#ida_graph.viewer_get_curnode)(→ int) | Get number of currently selected node (-1 if none). | | [`viewer_center_on`](#ida_graph.viewer_center_on)(→ None) | Center the graph view on the given node. | | [`viewer_set_gli`](#ida_graph.viewer_set_gli)(→ None) | Set location info for given graph view If flags contains GLICTL_CENTER, then the gli will be set to be the center of the view. Otherwise it will be the top-left. | | [`viewer_get_gli`](#ida_graph.viewer_get_gli)(→ bool) | Get location info for given graph view If flags contains GLICTL_CENTER, then the gli that will be retrieved, will be the one at the center of the view. Otherwise it will be the top-left. | | [`viewer_set_node_info`](#ida_graph.viewer_set_node_info)(→ None) | Set node info for node in given viewer (see set_node_info()). | | [`viewer_get_node_info`](#ida_graph.viewer_get_node_info)(→ bool) | Get node info for node in given viewer (see get_node_info()). | | [`viewer_del_node_info`](#ida_graph.viewer_del_node_info)(→ None) | Delete node info for node in given viewer (see del_node_info()). | | [`viewer_create_groups`](#ida_graph.viewer_create_groups)(→ bool) | This will perform an operation similar to what happens when a user manually selects a set of nodes, right-clicks and selects "Create group". This is a wrapper around interactive_graph_t::create_group that will, in essence: | | [`viewer_delete_groups`](#ida_graph.viewer_delete_groups)(→ bool) | Wrapper around interactive_graph_t::delete_group. This function will: | | [`viewer_set_groups_visibility`](#ida_graph.viewer_set_groups_visibility)(→ bool) | Wrapper around interactive_graph_t::change_visibility. This function will: | | [`viewer_attach_menu_item`](#ida_graph.viewer_attach_menu_item)(→ bool) | Attach a previously-registered action to the view's context menu. See kernwin.hpp for how to register actions. | | [`viewer_get_selection`](#ida_graph.viewer_get_selection)(→ bool) | Get currently selected items for graph viewer. | | [`viewer_set_titlebar_height`](#ida_graph.viewer_set_titlebar_height)(→ int) | Set height of node title bars (grcode_set_titlebar_height). | | [`delete_interactive_graph`](#ida_graph.delete_interactive_graph)(→ None) | Delete graph object. | | [`create_user_graph_place`](#ida_graph.create_user_graph_place)(→ user_graph_place_t \*) | Get a copy of a user_graph_place_t (returns a pointer to static storage). | | [`pyg_close`](#ida_graph.pyg_close)(→ None) | | | [`pyg_select_node`](#ida_graph.pyg_select_node)(→ None) | | | [`pyg_show`](#ida_graph.pyg_show)(→ bool) | | ## Module Contents ### *class* ida_graph.screen_graph_selection_base_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### push_back(\*args) → selection_item_t & #### pop_back() → [None](https://docs.python.org/3/library/constants.html#None) #### size() → [int](https://docs.python.org/3/library/functions.html#int) #### empty() → [bool](https://docs.python.org/3/library/functions.html#bool) #### at(\_idx: [int](https://docs.python.org/3/library/functions.html#int)) → selection_item_t const & #### qclear() → [None](https://docs.python.org/3/library/constants.html#None) #### clear() → [None](https://docs.python.org/3/library/constants.html#None) #### resize(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### grow(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### capacity() → [int](https://docs.python.org/3/library/functions.html#int) #### reserve(cnt: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### truncate() → [None](https://docs.python.org/3/library/constants.html#None) #### swap(r: [screen_graph_selection_base_t](#ida_graph.screen_graph_selection_base_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extract() → selection_item_t \* #### inject(s: [selection_item_t](#ida_graph.selection_item_t), len: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### begin(\*args) → qvector< selection_item_t >::const_iterator #### end(\*args) → qvector< selection_item_t >::const_iterator #### insert(it: [selection_item_t](#ida_graph.selection_item_t), x: [selection_item_t](#ida_graph.selection_item_t)) → qvector< selection_item_t >::iterator #### erase(\*args) → qvector< selection_item_t >::iterator #### find(\*args) → qvector< selection_item_t >::const_iterator #### has(x: [selection_item_t](#ida_graph.selection_item_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### add_unique(x: [selection_item_t](#ida_graph.selection_item_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### append(x: [selection_item_t](#ida_graph.selection_item_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extend(x: [screen_graph_selection_base_t](#ida_graph.screen_graph_selection_base_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### front #### back ### *class* ida_graph.node_layout_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### push_back(\*args) → rect_t & #### pop_back() → [None](https://docs.python.org/3/library/constants.html#None) #### size() → [int](https://docs.python.org/3/library/functions.html#int) #### empty() → [bool](https://docs.python.org/3/library/functions.html#bool) #### at(\_idx: [int](https://docs.python.org/3/library/functions.html#int)) → rect_t const & #### qclear() → [None](https://docs.python.org/3/library/constants.html#None) #### clear() → [None](https://docs.python.org/3/library/constants.html#None) #### resize(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### grow(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### capacity() → [int](https://docs.python.org/3/library/functions.html#int) #### reserve(cnt: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### truncate() → [None](https://docs.python.org/3/library/constants.html#None) #### swap(r: [node_layout_t](#ida_graph.node_layout_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extract() → rect_t \* #### inject(s: [rect_t](#ida_graph.rect_t), len: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### begin(\*args) → qvector< rect_t >::const_iterator #### end(\*args) → qvector< rect_t >::const_iterator #### insert(it: [rect_t](#ida_graph.rect_t), x: [rect_t](#ida_graph.rect_t)) → qvector< rect_t >::iterator #### erase(\*args) → qvector< rect_t >::iterator #### find(\*args) → qvector< rect_t >::const_iterator #### has(x: [rect_t](#ida_graph.rect_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### add_unique(x: [rect_t](#ida_graph.rect_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### append(x: [rect_t](#ida_graph.rect_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extend(x: [node_layout_t](#ida_graph.node_layout_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### front #### back ### *class* ida_graph.pointvec_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### push_back(\*args) → point_t & #### pop_back() → [None](https://docs.python.org/3/library/constants.html#None) #### size() → [int](https://docs.python.org/3/library/functions.html#int) #### empty() → [bool](https://docs.python.org/3/library/functions.html#bool) #### at(\_idx: [int](https://docs.python.org/3/library/functions.html#int)) → point_t const & #### qclear() → [None](https://docs.python.org/3/library/constants.html#None) #### clear() → [None](https://docs.python.org/3/library/constants.html#None) #### resize(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### grow(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### capacity() → [int](https://docs.python.org/3/library/functions.html#int) #### reserve(cnt: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### truncate() → [None](https://docs.python.org/3/library/constants.html#None) #### swap(r: [pointvec_t](#ida_graph.pointvec_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extract() → point_t \* #### inject(s: [point_t](#ida_graph.point_t), len: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### begin(\*args) → qvector< point_t >::const_iterator #### end(\*args) → qvector< point_t >::const_iterator #### insert(it: [point_t](#ida_graph.point_t), x: [point_t](#ida_graph.point_t)) → qvector< point_t >::iterator #### erase(\*args) → qvector< point_t >::iterator #### find(\*args) → qvector< point_t >::const_iterator #### has(x: [point_t](#ida_graph.point_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### add_unique(x: [point_t](#ida_graph.point_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### append(x: [point_t](#ida_graph.point_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extend(x: [pointvec_t](#ida_graph.pointvec_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### front #### back ### ida_graph.NIF_BG_COLOR node_info_t::bg_color ### ida_graph.NIF_FRAME_COLOR node_info_t::frame_color ### ida_graph.NIF_EA node_info_t::ea ### ida_graph.NIF_TEXT node_info_t::text ### ida_graph.NIF_FLAGS node_info_t::flags ### ida_graph.NIF_ALL ### ida_graph.GLICTL_CENTER the gli should be set/get as center ### *class* ida_graph.node_info_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### bg_color *: bgcolor_t* background color #### frame_color *: bgcolor_t* color of enclosing frame #### flags *: [int](https://docs.python.org/3/library/functions.html#int)* flags #### ea *: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)* address #### text *: [str](https://docs.python.org/3/library/stdtypes.html#str)* node contents #### valid_bg_color() → [bool](https://docs.python.org/3/library/functions.html#bool) Has valid bg_color? #### valid_frame_color() → [bool](https://docs.python.org/3/library/functions.html#bool) Has valid frame_color? #### valid_ea() → [bool](https://docs.python.org/3/library/functions.html#bool) Has valid ea? #### valid_text() → [bool](https://docs.python.org/3/library/functions.html#bool) Has non-empty text? #### valid_flags() → [bool](https://docs.python.org/3/library/functions.html#bool) Has valid flags? #### get_flags_for_valid() → [int](https://docs.python.org/3/library/functions.html#int) Get combination of Node info flags describing which attributes are valid. ### ida_graph.NIFF_SHOW_CONTENTS ### ida_graph.get_node_info(out: [node_info_t](#ida_graph.node_info_t), gid: graph_id_t, node: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) Get node info. * **Parameters:** * **out** – result * **gid** – id of desired graph * **node** – node number * **Returns:** success ### ida_graph.set_node_info(gid: graph_id_t, node: [int](https://docs.python.org/3/library/functions.html#int), ni: [node_info_t](#ida_graph.node_info_t), flags: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) Set node info. * **Parameters:** * **gid** – id of desired graph * **node** – node number * **ni** – node info to use * **flags** – combination of Node info flags, identifying which fields of ‘ni’ will be used ### ida_graph.del_node_info(gid: graph_id_t, node: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) Delete the node_info_t for the given node. ### ida_graph.clr_node_info(gid: graph_id_t, node: [int](https://docs.python.org/3/library/functions.html#int), flags: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) Clear node info for the given node. * **Parameters:** * **gid** – id of desired graph * **node** – node number * **flags** – combination of Node info flags, identifying which fields of node_info_t will be cleared ### *class* ida_graph.graph_node_visitor_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### reinit() → [None](https://docs.python.org/3/library/constants.html#None) Reset visited nodes. #### set_visited(n: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) Mark node as visited. #### is_visited(n: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) Have we already visited the given node? #### visit_node(arg0: [int](https://docs.python.org/3/library/functions.html#int)) → [int](https://docs.python.org/3/library/functions.html#int) Implements action to take when a node is visited. #### is_forbidden_edge(arg0: [int](https://docs.python.org/3/library/functions.html#int), arg1: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) Should the edge between ‘n’ and ‘m’ be ignored? ### *class* ida_graph.graph_path_visitor_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### path *: [intvec_t](../ida_pro/index.md#ida_pro.intvec_t)* current path #### prune *: [bool](https://docs.python.org/3/library/functions.html#bool)* walk_forward(): prune := true means to stop the current path #### walk_forward(arg0: [int](https://docs.python.org/3/library/functions.html#int)) → [int](https://docs.python.org/3/library/functions.html#int) #### walk_backward(arg0: [int](https://docs.python.org/3/library/functions.html#int)) → [int](https://docs.python.org/3/library/functions.html#int) ### *class* ida_graph.point_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### x *: [int](https://docs.python.org/3/library/functions.html#int)* #### y *: [int](https://docs.python.org/3/library/functions.html#int)* #### add(r: [point_t](#ida_graph.point_t)) → point_t & #### sub(r: [point_t](#ida_graph.point_t)) → point_t & #### negate() → [None](https://docs.python.org/3/library/constants.html#None) ### ida_graph.calc_dist(p: [point_t](#ida_graph.point_t), q: [point_t](#ida_graph.point_t)) → double Calculate distance between p and q. ### *class* ida_graph.pointseq_t Bases: [`pointvec_t`](#ida_graph.pointvec_t) #### thisown ### *class* ida_graph.rect_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### left *: [int](https://docs.python.org/3/library/functions.html#int)* #### top *: [int](https://docs.python.org/3/library/functions.html#int)* #### right *: [int](https://docs.python.org/3/library/functions.html#int)* #### bottom *: [int](https://docs.python.org/3/library/functions.html#int)* #### verify() → [None](https://docs.python.org/3/library/constants.html#None) #### width() → [int](https://docs.python.org/3/library/functions.html#int) #### height() → [int](https://docs.python.org/3/library/functions.html#int) #### move_to(p: [point_t](#ida_graph.point_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### move_by(p: [point_t](#ida_graph.point_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### center() → [point_t](#ida_graph.point_t) #### topleft() → [point_t](#ida_graph.point_t) #### bottomright() → [point_t](#ida_graph.point_t) #### grow(delta: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### intersect(r: [rect_t](#ida_graph.rect_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### make_union(r: [rect_t](#ida_graph.rect_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### empty() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_intersection_empty(r: [rect_t](#ida_graph.rect_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### contains(p: [point_t](#ida_graph.point_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### area() → [int](https://docs.python.org/3/library/functions.html#int) ### *class* ida_graph.TPointDouble(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### x *: double* #### y *: double* #### add(r: [TPointDouble](#ida_graph.TPointDouble)) → [None](https://docs.python.org/3/library/constants.html#None) #### sub(r: [TPointDouble](#ida_graph.TPointDouble)) → [None](https://docs.python.org/3/library/constants.html#None) #### negate() → [None](https://docs.python.org/3/library/constants.html#None) ### *class* ida_graph.edge_info_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### color *: bgcolor_t* edge color #### width *: [int](https://docs.python.org/3/library/functions.html#int)* edge width #### srcoff *: [int](https://docs.python.org/3/library/functions.html#int)* source: edge port offset from the left #### dstoff *: [int](https://docs.python.org/3/library/functions.html#int)* destination: edge port offset from the left #### layout *: [pointseq_t](#ida_graph.pointseq_t)* describes geometry of edge #### reverse_layout() → [None](https://docs.python.org/3/library/constants.html#None) ### ida_graph.cvar ### ida_graph.layout_none ### ida_graph.layout_digraph ### ida_graph.layout_tree ### ida_graph.layout_circle ### ida_graph.layout_polar_tree ### ida_graph.layout_orthogonal ### ida_graph.layout_radial_tree ### *class* ida_graph.edge_layout_point_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### pidx *: [int](https://docs.python.org/3/library/functions.html#int)* index into edge_info_t::layout #### e *: [edge_t](../ida_gdl/index.md#ida_gdl.edge_t)* parent edge #### compare(r: [edge_layout_point_t](#ida_graph.edge_layout_point_t)) → [int](https://docs.python.org/3/library/functions.html#int) ### *class* ida_graph.selection_item_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### is_node *: [bool](https://docs.python.org/3/library/functions.html#bool)* represents a selected node? #### node *: [int](https://docs.python.org/3/library/functions.html#int)* node number (is_node = true) #### elp *: [edge_layout_point_t](#ida_graph.edge_layout_point_t)* edge layout point (is_node = false) #### compare(r: [selection_item_t](#ida_graph.selection_item_t)) → [int](https://docs.python.org/3/library/functions.html#int) ### *class* ida_graph.screen_graph_selection_t Bases: [`screen_graph_selection_base_t`](#ida_graph.screen_graph_selection_base_t) #### thisown #### has(item: [selection_item_t](#ida_graph.selection_item_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### add(s: [screen_graph_selection_t](#ida_graph.screen_graph_selection_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### sub(s: [screen_graph_selection_t](#ida_graph.screen_graph_selection_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### add_node(node: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### del_node(node: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### add_point(e: [edge_t](../ida_gdl/index.md#ida_gdl.edge_t), idx: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### del_point(e: [edge_t](../ida_gdl/index.md#ida_gdl.edge_t), idx: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### nodes_count() → [int](https://docs.python.org/3/library/functions.html#int) #### points_count() → [int](https://docs.python.org/3/library/functions.html#int) #### items_count(look_for_nodes: [bool](https://docs.python.org/3/library/functions.html#bool)) → [int](https://docs.python.org/3/library/functions.html#int) ### *class* ida_graph.edge_segment_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### e *: [edge_t](../ida_gdl/index.md#ida_gdl.edge_t)* #### nseg *: [int](https://docs.python.org/3/library/functions.html#int)* #### x0 *: [int](https://docs.python.org/3/library/functions.html#int)* #### x1 *: [int](https://docs.python.org/3/library/functions.html#int)* #### length() → [int](https://docs.python.org/3/library/functions.html#int) #### toright() → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_graph.git_none nothing ### ida_graph.git_edge edge (graph_item_t::e, graph_item_t::n. n is farthest edge endpoint) ### ida_graph.git_node node title (graph_item_t::n) ### ida_graph.git_tool node title button (graph_item_t::n, graph_item_t::b) ### ida_graph.git_text node text (graph_item_t::n, graph_item_t::p) ### ida_graph.git_elp edge layout point (graph_item_t::elp) ### *class* ida_graph.graph_item_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### type *: graph_item_type_t* type #### e *: [edge_t](../ida_gdl/index.md#ida_gdl.edge_t)* edge source and destination #### n *: [int](https://docs.python.org/3/library/functions.html#int)* node number #### b *: [int](https://docs.python.org/3/library/functions.html#int)* button number #### p *: [point_t](#ida_graph.point_t)* text coordinates in the node #### elp *: [edge_layout_point_t](#ida_graph.edge_layout_point_t)* edge layout point #### is_node() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_edge() → [bool](https://docs.python.org/3/library/functions.html#bool) ### *class* ida_graph.interval_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### x0 *: [int](https://docs.python.org/3/library/functions.html#int)* #### x1 *: [int](https://docs.python.org/3/library/functions.html#int)* #### empty() → [bool](https://docs.python.org/3/library/functions.html#bool) #### intersect(r: [interval_t](#ida_graph.interval_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### make_union(r: [interval_t](#ida_graph.interval_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### move_by(shift: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### length() → [int](https://docs.python.org/3/library/functions.html#int) #### contains(x: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### *class* ida_graph.row_info_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### nodes *: [intvec_t](../ida_pro/index.md#ida_pro.intvec_t)* list of nodes at the row #### top *: [int](https://docs.python.org/3/library/functions.html#int)* top y coord of the row #### bottom *: [int](https://docs.python.org/3/library/functions.html#int)* bottom y coord of the row #### height() → [int](https://docs.python.org/3/library/functions.html#int) ### *class* ida_graph.drawable_graph_t Bases: [`ida_gdl.gdl_graph_t`](../ida_gdl/index.md#ida_gdl.gdl_graph_t) #### thisown #### title *: [str](https://docs.python.org/3/library/stdtypes.html#str)* graph title #### rect_edges_made *: [bool](https://docs.python.org/3/library/functions.html#bool)* have create rectangular edges? #### current_layout *: layout_type_t* see Proximity view layouts #### circle_center *: [point_t](#ida_graph.point_t)* for layout_circle #### circle_radius *: [int](https://docs.python.org/3/library/functions.html#int)* for layout_circle #### callback_ud *: void \** user data for callback #### create_tree_layout() → [bool](https://docs.python.org/3/library/functions.html#bool) #### create_circle_layout(p: [point_t](#ida_graph.point_t), radius: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### set_callback(\_callback: hook_cb_t \*, \_ud: void \*) → [None](https://docs.python.org/3/library/constants.html#None) #### grcall(code: [int](https://docs.python.org/3/library/functions.html#int)) → ssize_t #### get_edge(e: [edge_t](../ida_gdl/index.md#ida_gdl.edge_t)) → edge_info_t \* #### nrect(n: [int](https://docs.python.org/3/library/functions.html#int)) → [rect_t](#ida_graph.rect_t) ### ida_graph.ygap ### ida_graph.xgap ### ida_graph.arrow_height ### ida_graph.arrow_width ### *class* ida_graph.edge_infos_wrapper_t(\*args, \*\*kwargs) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### clear() → [None](https://docs.python.org/3/library/constants.html#None) #### ptr *: edge_infos_t \** ### *class* ida_graph.interactive_graph_t(\*args, \*\*kwargs) Bases: [`drawable_graph_t`](#ida_graph.drawable_graph_t) #### thisown #### gid *: [int](https://docs.python.org/3/library/functions.html#int)* graph id - unique for the database for flowcharts it is equal to the function start_ea #### belongs *: [intvec_t](../ida_pro/index.md#ida_pro.intvec_t)* the subgraph the node belongs to INT_MAX means that the node doesn’t exist sign bit means collapsed node #### node_flags *: bytevec_t* node flags #### org_succs *: array_of_intvec_t* #### org_preds *: array_of_intvec_t* #### succs *: array_of_intvec_t* #### preds *: array_of_intvec_t* #### nodes *: interactive_graph_t::node_layout_t* #### edges *: [edge_infos_wrapper_t](#ida_graph.edge_infos_wrapper_t)* #### size() → [int](https://docs.python.org/3/library/functions.html#int) Get the total number of nodes (including group nodes, and including hidden nodes.) See also node_qty() * **Returns:** the total number of nodes in the graph #### node_qty() → [int](https://docs.python.org/3/library/functions.html#int) Get the number of visible nodes (the list can be retrieved using gdl.hpp’s node_iterator) See also size() * **Returns:** the number of visible nodes #### empty() → [bool](https://docs.python.org/3/library/functions.html#bool) Is the graph (visually) empty? * **Returns:** true if there are no visible nodes #### exists(node: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) Is the node visible? * **Parameters:** **node** – the node number * **Returns:** success #### get_node_representative(node: [int](https://docs.python.org/3/library/functions.html#int)) → [int](https://docs.python.org/3/library/functions.html#int) Get the node that currently visually represents ‘node’. This will find the “closest” parent group node that’s visible, by attempting to walk up the group nodes that contain ‘node’, and will stop when it finds a node that is currently visible. See also get_group_node() * **Parameters:** **node** – the node * **Returns:** the node that represents ‘node’, or ‘node’ if it’s not part of any group #### get_node_group(node: [int](https://docs.python.org/3/library/functions.html#int)) → [int](https://docs.python.org/3/library/functions.html#int) #### set_node_group(node: [int](https://docs.python.org/3/library/functions.html#int), group: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### is_deleted_node(node: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### set_deleted_node(node: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### is_subgraph_node(node: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_dot_node(node: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_group_node(node: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_displayable_node(node: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_simple_node(node: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_collapsed_node(node: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_uncollapsed_node(node: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_visible_node(node: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) Is the node currently visible? An invisible node is a node that’s part of a group that’s currently collapsed. * **Parameters:** **node** – the node * **Returns:** success #### get_first_subgraph_node(group: [int](https://docs.python.org/3/library/functions.html#int)) → [int](https://docs.python.org/3/library/functions.html#int) #### get_next_subgraph_node(group: [int](https://docs.python.org/3/library/functions.html#int), current: [int](https://docs.python.org/3/library/functions.html#int)) → [int](https://docs.python.org/3/library/functions.html#int) #### create_group(nodes: intvec_t const &) → [int](https://docs.python.org/3/library/functions.html#int) Create a new group node, that will contain all the nodes in ‘nodes’. * **Parameters:** **nodes** – the nodes that will be part of the group * **Returns:** the group node, or -1 in case of error #### delete_group(group: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) Delete a group node. This deletes the group node only; it does not delete nodes that are part of the group. * **Parameters:** **group** – the group node * **Returns:** success #### change_group_visibility(group: [int](https://docs.python.org/3/library/functions.html#int), expand: [bool](https://docs.python.org/3/library/functions.html#bool)) → [bool](https://docs.python.org/3/library/functions.html#bool) Expand/collapse a group node * **Parameters:** * **group** – the group node * **expand** – whether to expand or collapse * **Returns:** success #### nsucc(b: [int](https://docs.python.org/3/library/functions.html#int)) → [int](https://docs.python.org/3/library/functions.html#int) #### npred(b: [int](https://docs.python.org/3/library/functions.html#int)) → [int](https://docs.python.org/3/library/functions.html#int) #### succ(b: [int](https://docs.python.org/3/library/functions.html#int), i: [int](https://docs.python.org/3/library/functions.html#int)) → [int](https://docs.python.org/3/library/functions.html#int) #### pred(b: [int](https://docs.python.org/3/library/functions.html#int), i: [int](https://docs.python.org/3/library/functions.html#int)) → [int](https://docs.python.org/3/library/functions.html#int) #### succset(b: [int](https://docs.python.org/3/library/functions.html#int)) → intvec_t const & #### predset(b: [int](https://docs.python.org/3/library/functions.html#int)) → intvec_t const & #### reset() → [None](https://docs.python.org/3/library/constants.html#None) #### redo_layout() → [bool](https://docs.python.org/3/library/functions.html#bool) Recompute the layout, according to the value of ‘current_layout’. * **Returns:** success #### resize(n: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) Resize the graph to ‘n’ nodes * **Parameters:** **n** – the new size #### add_node(r: [rect_t](#ida_graph.rect_t)) → [int](https://docs.python.org/3/library/functions.html#int) Add a node, possibly with a specific geometry * **Parameters:** **r** – the node geometry (can be nullptr) * **Returns:** the new node #### del_node(n: [int](https://docs.python.org/3/library/functions.html#int)) → ssize_t Delete a node * **Parameters:** **n** – the node to delete * **Returns:** the number of deleted edges #### add_edge(i: [int](https://docs.python.org/3/library/functions.html#int), j: [int](https://docs.python.org/3/library/functions.html#int), ei: [edge_info_t](#ida_graph.edge_info_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### del_edge(i: [int](https://docs.python.org/3/library/functions.html#int), j: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### replace_edge(i: [int](https://docs.python.org/3/library/functions.html#int), j: [int](https://docs.python.org/3/library/functions.html#int), x: [int](https://docs.python.org/3/library/functions.html#int), y: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### refresh() → [bool](https://docs.python.org/3/library/functions.html#bool) Refresh the graph A graph needs refreshing when it’s “backing data”. E.g., if the number (or contents) of the objects in the above example, change. Let’s say the user’s plugin ends up finding a 5th piece of scattered data. It should then add it to its internal list of known objects, and tell IDA that the graph needs to be refreshed, using refresh_viewer(). This will cause IDA to: \* discard all its internal rendering information, \* call interactive_graph_t::refresh() on the graph so that the user’s plugin has a chance to “sync” the number of nodes & edges that this graph contains, to the information that the plugin has collected so far \* re-create internal rendering information, and \* repaint the view * **Returns:** success #### set_nrect(n: [int](https://docs.python.org/3/library/functions.html#int), r: [rect_t](#ida_graph.rect_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### set_edge(e: [edge_t](../ida_gdl/index.md#ida_gdl.edge_t), ei: [edge_info_t](#ida_graph.edge_info_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### create_digraph_layout() → [bool](https://docs.python.org/3/library/functions.html#bool) #### del_custom_layout() → [None](https://docs.python.org/3/library/constants.html#None) #### get_custom_layout() → [bool](https://docs.python.org/3/library/functions.html#bool) #### set_custom_layout() → [None](https://docs.python.org/3/library/constants.html#None) #### get_graph_groups() → [bool](https://docs.python.org/3/library/functions.html#bool) #### set_graph_groups() → [None](https://docs.python.org/3/library/constants.html#None) #### calc_group_ea(arg2: intvec_t const &) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) #### is_user_graph() → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_graph.MTG_GROUP_NODE is group node? ### ida_graph.MTG_DOT_NODE is dot node? ### ida_graph.MTG_NON_DISPLAYABLE_NODE for disassembly graphs - non-displayable nodes have a visible area that is too large to generate disassembly lines for without IDA slowing down significantly (see MAX_VISIBLE_NODE_AREA) ### ida_graph.COLLAPSED_NODE ### *class* ida_graph.graph_visitor_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### visit_node(arg2: [int](https://docs.python.org/3/library/functions.html#int), arg3: [rect_t](#ida_graph.rect_t)) → [int](https://docs.python.org/3/library/functions.html#int) #### visit_edge(arg2: [edge_t](../ida_gdl/index.md#ida_gdl.edge_t), arg3: [edge_info_t](#ida_graph.edge_info_t)) → [int](https://docs.python.org/3/library/functions.html#int) ### ida_graph.grcode_calculating_layout calculating user-defined graph layout. ### ida_graph.grcode_layout_calculated graph layout calculated. ### ida_graph.grcode_changed_graph new graph has been set. ### ida_graph.grcode_reserved ### ida_graph.grcode_clicked graph is being clicked. this callback allows you to ignore some clicks. it occurs too early, internal graph variables are not updated yet. current_item1, current_item2 point to the same thing. item2 has more information. see also: custom_viewer_click_t ### ida_graph.grcode_dblclicked a graph node has been double clicked. ### ida_graph.grcode_creating_group a group is being created. this provides an opportunity for the graph to forbid creation of the group. Note that groups management is done by the interactive_graph_t instance itself: there is no need to modify the graph in this callback. ### ida_graph.grcode_deleting_group a group is being deleted. this provides an opportunity for the graph to forbid deletion of the group. Note that groups management is done by the interactive_graph_t instance itself: there is no need to modify the graph in this callback. ### ida_graph.grcode_group_visibility a group is being collapsed/uncollapsed this provides an opportunity for the graph to forbid changing the visibility of the group. Note that groups management is done by the interactive_graph_t instance itself: there is no need to modify the graph in this callback. ### ida_graph.grcode_gotfocus a graph viewer got focus. ### ida_graph.grcode_lostfocus a graph viewer lost focus. ### ida_graph.grcode_user_refresh refresh user-defined graph nodes and edges This is called when the UI considers that it is necessary to recreate the graph layout, and thus has to ensure that the ‘interactive_graph_t’ instance it is using, is up-to-date. For example: \* at graph creation-time \* if a refresh_viewer() call was made ### ida_graph.grcode_reserved2 ### ida_graph.grcode_user_text retrieve text for user-defined graph node. NB: do not use anything calling GDI! ### ida_graph.grcode_user_size calculate node size for user-defined graph. ### ida_graph.grcode_user_title render node title of a user-defined graph. ### ida_graph.grcode_user_draw render node of a user-defined graph. NB: draw only on the specified DC and nowhere else! ### ida_graph.grcode_user_hint retrieve hint for the user-defined graph. ### ida_graph.grcode_destroyed graph is being destroyed. Note that this doesn’t mean the graph viewer is being destroyed; this only means that the graph that is being displayed by it is being destroyed, and that, e.g., any possibly cached data should be invalidated (this event can happen when, for example, the user decides to group nodes together: that operation will effectively create a new graph, that will replace the old one.) To be notified when the graph viewer itself is being destroyed, please see notification ‘view_close’, in kernwin.hpp ### ida_graph.grcode_create_graph_viewer use create_graph_viewer() ### ida_graph.grcode_get_graph_viewer use get_graph_viewer() ### ida_graph.grcode_get_viewer_graph use get_viewer_graph() ### ida_graph.grcode_create_interactive_graph use create_interactive_graph() ### ida_graph.grcode_set_viewer_graph use set_viewer_graph() ### ida_graph.grcode_refresh_viewer use refresh_viewer() ### ida_graph.grcode_fit_window use viewer_fit_window() ### ida_graph.grcode_get_curnode use viewer_get_curnode() ### ida_graph.grcode_center_on use viewer_center_on() ### ida_graph.grcode_get_selection use viewer_get_selection() ### ida_graph.grcode_del_custom_layout use interactive_graph_t::del_custom_layout() ### ida_graph.grcode_set_custom_layout use interactive_graph_t::set_custom_layout() ### ida_graph.grcode_set_graph_groups use interactive_graph_t::set_graph_groups() ### ida_graph.grcode_clear use interactive_graph_t::clear() ### ida_graph.grcode_create_digraph_layout use interactive_graph_t::create_digraph_layout() ### ida_graph.grcode_create_tree_layout use drawable_graph_t::create_tree_layout() ### ida_graph.grcode_create_circle_layout use drawable_graph_t::create_circle_layout() ### ida_graph.grcode_get_node_representative use interactive_graph_t::get_node_representative() ### ida_graph.grcode_find_subgraph_node use interactive_graph_t::_find_subgraph_node() ### ida_graph.grcode_create_group use interactive_graph_t::create_group() ### ida_graph.grcode_get_custom_layout use interactive_graph_t::get_custom_layout() ### ida_graph.grcode_get_graph_groups use interactive_graph_t::get_graph_groups() ### ida_graph.grcode_empty use interactive_graph_t::empty() ### ida_graph.grcode_is_visible_node use interactive_graph_t::is_visible_node() ### ida_graph.grcode_delete_group use interactive_graph_t::delete_group() ### ida_graph.grcode_change_group_visibility use interactive_graph_t::change_group_visibility() ### ida_graph.grcode_set_edge use interactive_graph_t::set_edge() ### ida_graph.grcode_node_qty use interactive_graph_t::node_qty() ### ida_graph.grcode_nrect use interactive_graph_t::nrect() ### ida_graph.grcode_set_titlebar_height use viewer_set_titlebar_height() ### ida_graph.grcode_create_user_graph_place use create_user_graph_place() ### ida_graph.grcode_create_disasm_graph1 use create_disasm_graph(ea_t ea) ### ida_graph.grcode_create_disasm_graph2 use create_disasm_graph(const rangevec_t &ranges) ### ida_graph.grcode_set_node_info use viewer_set_node_info() ### ida_graph.grcode_get_node_info use viewer_get_node_info() ### ida_graph.grcode_del_node_info use viewer_del_node_info() ### ida_graph.grcode_viewer_create_groups ### ida_graph.grcode_viewer_delete_groups ### ida_graph.grcode_viewer_groups_visibility ### ida_graph.grcode_viewer_create_groups_vec use viewer_create_groups() ### ida_graph.grcode_viewer_delete_groups_vec use viewer_delete_groups() ### ida_graph.grcode_viewer_groups_visibility_vec use viewer_set_groups_visibility() ### ida_graph.grcode_delete_interactive_graph use delete_interactive_graph() ### ida_graph.grcode_edge_infos_wrapper_copy use edge_infos_wrapper_t::operator=() ### ida_graph.grcode_edge_infos_wrapper_clear use edge_infos_wrapper_t::clear() ### ida_graph.grcode_attach_menu_item ### ida_graph.grcode_set_gli use viewer_set_gli() ### ida_graph.grcode_get_gli use viewer_get_gli() ### *class* ida_graph.group_crinfo_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### nodes *: [intvec_t](../ida_pro/index.md#ida_pro.intvec_t)* #### text *: [str](https://docs.python.org/3/library/stdtypes.html#str)* ### ida_graph.create_graph_viewer(title: str, id: int, callback: hook_cb_t \*, ud: void \*, title_height: int, parent: TWidget \* = None) → graph_viewer_t \* Create a custom graph viewer. * **Parameters:** * **title** – the widget title * **id** – graph id * **callback** – callback to handle graph notifications (graph_notification_t) * **ud** – user data passed to callback * **title_height** – node title height * **parent** – the parent widget of the graph viewer * **Returns:** new viewer ### ida_graph.get_graph_viewer(parent: TWidget \*) → graph_viewer_t \* Get custom graph viewer for given form. ### ida_graph.create_interactive_graph(id: [int](https://docs.python.org/3/library/functions.html#int)) → interactive_graph_t \* Create a new empty graph with given id. ### ida_graph.create_disasm_graph(\*args) → interactive_graph_t \* This function has the following signatures: > 1. create_disasm_graph(ea: ida_idaapi.ea_t) -> interactive_graph_t \* > 2. create_disasm_graph(ranges: const rangevec_t &) -> interactive_graph_t \* # 0: create_disasm_graph(ea: ida_idaapi.ea_t) -> interactive_graph_t \* Create a graph for the function that contains ‘ea’. # 1: create_disasm_graph(ranges: const rangevec_t &) -> interactive_graph_t \* Create a graph using an arbitrary set of ranges. ### ida_graph.get_viewer_graph(gv: graph_viewer_t \*) → interactive_graph_t \* Get graph object for given custom graph viewer. ### ida_graph.set_viewer_graph(gv: graph_viewer_t \*, g: interactive_graph_t) → [None](https://docs.python.org/3/library/constants.html#None) Set the underlying graph object for the given viewer. ### ida_graph.refresh_viewer(gv: graph_viewer_t \*) → [None](https://docs.python.org/3/library/constants.html#None) Redraw the graph in the given view. ### ida_graph.viewer_fit_window(gv: graph_viewer_t \*) → [None](https://docs.python.org/3/library/constants.html#None) Fit graph viewer to its parent form. ### ida_graph.viewer_get_curnode(gv: graph_viewer_t \*) → [int](https://docs.python.org/3/library/functions.html#int) Get number of currently selected node (-1 if none). ### ida_graph.viewer_center_on(gv: graph_viewer_t \*, node: int) → [None](https://docs.python.org/3/library/constants.html#None) Center the graph view on the given node. ### ida_graph.viewer_set_gli(gv: graph_viewer_t \*, gli: graph_location_info_t const \*, flags: int = 0) → [None](https://docs.python.org/3/library/constants.html#None) Set location info for given graph view If flags contains GLICTL_CENTER, then the gli will be set to be the center of the view. Otherwise it will be the top-left. ### ida_graph.viewer_get_gli(out: graph_location_info_t \*, gv: graph_viewer_t \*, flags: int = 0) → [bool](https://docs.python.org/3/library/functions.html#bool) Get location info for given graph view If flags contains GLICTL_CENTER, then the gli that will be retrieved, will be the one at the center of the view. Otherwise it will be the top-left. ### ida_graph.viewer_set_node_info(gv: graph_viewer_t \*, n: int, ni: node_info_t, flags: int) → [None](https://docs.python.org/3/library/constants.html#None) Set node info for node in given viewer (see set_node_info()). ### ida_graph.viewer_get_node_info(gv: graph_viewer_t \*, out: node_info_t, n: int) → [bool](https://docs.python.org/3/library/functions.html#bool) Get node info for node in given viewer (see get_node_info()). ### ida_graph.viewer_del_node_info(gv: graph_viewer_t \*, n: int) → [None](https://docs.python.org/3/library/constants.html#None) Delete node info for node in given viewer (see del_node_info()). ### ida_graph.viewer_create_groups(gv: graph_viewer_t \*, out_group_nodes: intvec_t \*, gi: groups_crinfos_t const &) → [bool](https://docs.python.org/3/library/functions.html#bool) This will perform an operation similar to what happens when a user manually selects a set of nodes, right-clicks and selects “Create group”. This is a wrapper around interactive_graph_t::create_group that will, in essence: \* clone the current graph \* for each group_crinfo_t, attempt creating group in that new graph \* if all were successful, animate to that new graph. ### ida_graph.viewer_delete_groups(gv: graph_viewer_t \*, groups: intvec_t const &, new_current: int = -1) → [bool](https://docs.python.org/3/library/functions.html#bool) Wrapper around interactive_graph_t::delete_group. This function will: \* clone the current graph \* attempt deleting the groups in that new graph \* if successful, animate to that new graph. ### ida_graph.viewer_set_groups_visibility(gv: graph_viewer_t \*, groups: intvec_t const &, expand: bool, new_current: int = -1) → [bool](https://docs.python.org/3/library/functions.html#bool) Wrapper around interactive_graph_t::change_visibility. This function will: \* clone the current graph \* attempt changing visibility of the groups in that new graph \* if successful, animate to that new graph. ### ida_graph.viewer_attach_menu_item(g: graph_viewer_t \*, name: str) → [bool](https://docs.python.org/3/library/functions.html#bool) Attach a previously-registered action to the view’s context menu. See kernwin.hpp for how to register actions. * **Parameters:** * **g** – graph viewer * **name** – action name * **Returns:** success ### ida_graph.viewer_get_selection(gv: graph_viewer_t \*, sgs: screen_graph_selection_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Get currently selected items for graph viewer. ### ida_graph.viewer_set_titlebar_height(gv: graph_viewer_t \*, height: int) → [int](https://docs.python.org/3/library/functions.html#int) Set height of node title bars (grcode_set_titlebar_height). ### ida_graph.delete_interactive_graph(g: [interactive_graph_t](#ida_graph.interactive_graph_t)) → [None](https://docs.python.org/3/library/constants.html#None) Delete graph object. ### *class* ida_graph.user_graph_place_t(\*args, \*\*kwargs) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### node *: [int](https://docs.python.org/3/library/functions.html#int)* ### ida_graph.create_user_graph_place(node: [int](https://docs.python.org/3/library/functions.html#int), lnnum: [int](https://docs.python.org/3/library/functions.html#int)) → user_graph_place_t \* Get a copy of a user_graph_place_t (returns a pointer to static storage). ### ida_graph.pyg_close(\_self: PyObject \*) → [None](https://docs.python.org/3/library/constants.html#None) ### ida_graph.pyg_select_node(\_self: PyObject \*, nid: int) → [None](https://docs.python.org/3/library/constants.html#None) ### ida_graph.pyg_show(\_self: PyObject \*) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_graph.edge_t ### ida_graph.node_ordering_t ### ida_graph.abstract_graph_t ### ida_graph.mutable_graph_t ### ida_graph.create_mutable_graph ### ida_graph.delete_mutable_graph ### ida_graph.grcode_create_mutable_graph ### ida_graph.grcode_create_mutable_graph ### *class* ida_graph.GraphViewer(title, close_open=False) Bases: [`ida_kernwin.CustomIDAMemo`](../ida_kernwin/index.md#ida_kernwin.CustomIDAMemo) #### *class* UI_Hooks_Trampoline(v) Bases: [`ida_kernwin.UI_Hooks`](../ida_kernwin/index.md#ida_kernwin.UI_Hooks) #### v #### populating_widget_popup(w, popup_handle) IDA is populating the context menu for a widget. This is your chance to attach_action_to_popup(). Have a look at ui_finish_populating_widget_popup, if you want to augment the context menu with your own actions after the menu has had a chance to be properly populated by the owning component or plugin (which typically does it on ui_populating_widget_popup.) * **Parameters:** * **widget** – (TWidget ``` * ``` ) * **popup_handle** – (TPopupMenu ``` * ``` ) * **ctx** – (const action_activation_ctx_t ``` * ``` ) * **Returns:** void #### ui_hooks_trampoline #### AddNode(obj) Creates a node associated with the given object and returns the node id #### AddEdge(src_node, dest_node) Creates an edge between two given node ids #### Clear() Clears all the nodes and edges #### Count() Returns the node count #### Close() Closes the graph. It is possible to call Show() again (which will recreate the graph) #### Show() Shows an existing graph or creates a new one * **Returns:** Boolean #### Select(node_id) Selects a node on the graph #### OnRefresh() Event called when the graph is refreshed or first created. From this event you are supposed to create nodes and edges. This callback is mandatory. NOTE: **\*It is important to clear previous nodes before adding nodes.\*** * **Returns:** Returning True tells the graph viewer to use the items. Otherwise old items will be used. #### AddCommand(title, shortcut) #### OnPopup(widget, popup_handle) #### OnCommand(cmd_id) # index.html.md # paint_over_graph summary: paint text on graph view edges description: : This sample registers an action enabling painting of a recognizable string of text over horizontal nodes edge sections beyond a satisfying size threshold.
In a disassembly view, open the context menu and select “Paint on edges”. This should work for both graph disassembly, and proximity browser.
Using an “event filter”, we will intercept paint events targeted at the disassembly view, let it paint itself, and then add our own markers along. level: advanced ## Attributes | [`edge_segment_threshold`](#paint_over_graph.edge_segment_threshold) | | |------------------------------------------------------------------------|----| | [`text_color`](#paint_over_graph.text_color) | | | [`text_antialiasing`](#paint_over_graph.text_antialiasing) | | | [`verbose`](#paint_over_graph.verbose) | | | [`painter`](#paint_over_graph.painter) | | | [`action_name`](#paint_over_graph.action_name) | | | [`hooks`](#paint_over_graph.hooks) | | ## Classes | [`painter_t`](#paint_over_graph.painter_t) | | |------------------------------------------------------------------|----| | [`paint_on_edges_t`](#paint_over_graph.paint_on_edges_t) | | | [`context_menu_hooks_t`](#paint_over_graph.context_menu_hooks_t) | | ## Module Contents ### paint_over_graph.edge_segment_threshold *= 50* ### paint_over_graph.text_color ### paint_over_graph.text_antialiasing *= True* ### paint_over_graph.verbose *= False* ### *class* paint_over_graph.painter_t(w, verbose=False) Bases: `PySide6.QtCore.QObject` #### idaview #### idaview_pyqt #### target #### painting *= False* #### eventFilter(receiver, event) ### paint_over_graph.painter *= None* ### *class* paint_over_graph.paint_on_edges_t Bases: [`ida_kernwin.action_handler_t`](../ida_kernwin/index.md#ida_kernwin.action_handler_t) #### activate(ctx) Activate an action. This function implements the core behavior of an action. It is called when the action is triggered, from a menu, from a popup menu, from the toolbar, or programmatically. * **Returns:** non-zero: all IDA windows will be refreshed #### update(ctx) Update an action. This is called when the context of the UI changed, and we need to let the action update some of its properties if needed (label, icon, …) In addition, this lets IDA know whether the action is enabled, and when it should be queried for availability again. Note: This callback is not meant to change anything in the application’s state, except by calling one (or many) of the “update_action_\*()” functions on this very action. #### get_idaview(ctx) ### paint_over_graph.action_name *= 'paint_over_graph:enable'* ### *class* paint_over_graph.context_menu_hooks_t(\_flags: [int](https://docs.python.org/3/library/functions.html#int) = 0, \_hkcb_flags: [int](https://docs.python.org/3/library/functions.html#int) = 1) Bases: [`ida_kernwin.UI_Hooks`](../ida_kernwin/index.md#ida_kernwin.UI_Hooks) #### finish_populating_widget_popup(widget, popup) IDA is about to be done populating the context menu for a widget. This is your chance to attach_action_to_popup(). * **Parameters:** * **widget** – (TWidget ``` * ``` ) * **popup_handle** – (TPopupMenu ``` * ``` ) * **ctx** – (const action_activation_ctx_t ``` * ``` ) * **Returns:** void ### paint_over_graph.hooks # index.html.md # choose_multi summary: show tabular data, with multiple selection description: : Similar to @{choose}, but with multiple selection keywords: chooser, actions see_also: choose level: intermediate ## Classes | [`MyChoose`](#choose_multi.MyChoose) | Chooser wrapper class. | |----------------------------------------|--------------------------| ## Functions | [`test_choose`](#choose_multi.test_choose)(num) | | |---------------------------------------------------|----| ## Module Contents ### *class* choose_multi.MyChoose(title, nb=5) Bases: [`ida_kernwin.Choose`](../ida_kernwin/index.md#ida_kernwin.Choose) Chooser wrapper class. Some constants are defined in this class. Please refer to kernwin.hpp for more information. #### items #### OnGetSize() Get the number of elements in the chooser. This callback is mandatory * **Returns:** the number of elements #### OnGetLine(n) Get data for an element This callback is mandatory * **Parameters:** **n** – the index to fetch data for * **Returns:** a list of strings #### OnSelectLine(n) User pressed the enter key, or double-clicked a selection * **Parameters:** **sel** – the current selection * **Returns:** a tuple (changed, selection) #### OnDeleteLine(indices) User deleted an element * **Parameters:** **sel** – the current selection * **Returns:** a tuple (changed, selection) #### show(num) ### choose_multi.test_choose(num) # index.html.md # create_bmenum summary: create a bitmask enumeration description: : The goal of this script is to demonstrate some usage of the type API. In this script, we create a bitmask enumeration member by member. level: intermediate ## Attributes | [`tif`](#create_bmenum.tif) | | |-------------------------------|----| ## Module Contents ### create_bmenum.tif # index.html.md # custom_data_types_and_formats summary: custom data types & printers description: : IDA can be extended to support certain data types that it does not know about out-of-the-box.
A ‘custom data type’ provide information about the type & size of a piece of data, while a ‘custom data format’ is in charge of formatting that data (there can be more than one format for a specific ‘custom data type’.) level: advanced ## Attributes | [`new_formats`](#custom_data_types_and_formats.new_formats) | | |---------------------------------------------------------------|----| | [`f`](#custom_data_types_and_formats.f) | | ## Classes | [`pascal_data_type`](#custom_data_types_and_formats.pascal_data_type) | Information about a data type | |---------------------------------------------------------------------------------|---------------------------------| | [`pascal_data_format`](#custom_data_types_and_formats.pascal_data_format) | Information about a data format | | [`simplevm_data_type`](#custom_data_types_and_formats.simplevm_data_type) | Information about a data type | | [`simplevm_data_format`](#custom_data_types_and_formats.simplevm_data_format) | Information about a data format | | [`makedword_data_format`](#custom_data_types_and_formats.makedword_data_format) | Information about a data format | | [`rsrc_string_format`](#custom_data_types_and_formats.rsrc_string_format) | Information about a data format | ## Functions | [`nw_handler`](#custom_data_types_and_formats.nw_handler)(code[, old]) | | |--------------------------------------------------------------------------|----| ## Module Contents ### *class* custom_data_types_and_formats.pascal_data_type Bases: [`ida_bytes.data_type_t`](../ida_bytes/index.md#ida_bytes.data_type_t) Information about a data type #### calc_item_size(ea, maxsize) ### *class* custom_data_types_and_formats.pascal_data_format Bases: [`ida_bytes.data_format_t`](../ida_bytes/index.md#ida_bytes.data_format_t) Information about a data format #### FORMAT_NAME *= 'py_pascal_string_pstr'* #### printf(value, current_ea, operand_num, dtid) ### *class* custom_data_types_and_formats.simplevm_data_type(name='py_simple_vm', value_size=1, menu_name='SimpleVM', asm_keyword=ASM_KEYWORD) Bases: [`ida_bytes.data_type_t`](../ida_bytes/index.md#ida_bytes.data_type_t) Information about a data type #### ASM_KEYWORD *= 'svm_emit'* #### calc_item_size(ea, maxsize) ### *class* custom_data_types_and_formats.simplevm_data_format(name='py_simple_vm_format', menu_name='SimpleVM') Bases: [`ida_bytes.data_format_t`](../ida_bytes/index.md#ida_bytes.data_format_t) Information about a data format #### INST #### REGS #### disasm(inst) A simple local disassembler. In reality one can use a full-blown disassembler to render the text #### printf(value, current_ea, operand_num, dtid) ### *class* custom_data_types_and_formats.makedword_data_format Bases: [`ida_bytes.data_format_t`](../ida_bytes/index.md#ida_bytes.data_format_t) Information about a data format #### printf(value, current_ea, operand_num, dtid) ### *class* custom_data_types_and_formats.rsrc_string_format Bases: [`ida_bytes.data_format_t`](../ida_bytes/index.md#ida_bytes.data_format_t) Information about a data format #### cache_node #### get_rsrc_string(fn, id) Simple method that loads the input file as a DLL with LOAD_LIBRARY_AS_DATAFILE flag. It then tries to LoadString() #### printf(value, current_ea, operand_num, dtid) ### custom_data_types_and_formats.new_formats ### custom_data_types_and_formats.nw_handler(code, old=0) ### custom_data_types_and_formats.f *= 11* # index.html.md # produce_lst_file summary: produce disassembly listing for the entire file description: : automate IDA to perform auto-analysis on a file and, once that is done, produce a .lst file with the disassembly.
Run like so:
> ida -A “-S…path/to/produce_lst_file.py”
where:
> * -A instructs IDA to run in non-interactive mode > * -S holds a path to the script to run (note this is a single token; > : there is no space between ‘-S’ and its path.) level: beginner ## Attributes | [`idb_path`](#produce_lst_file.idb_path) | | |--------------------------------------------|----| | [`lst_path`](#produce_lst_file.lst_path) | | | [`fptr`](#produce_lst_file.fptr) | | ## Module Contents ### produce_lst_file.idb_path ### produce_lst_file.lst_path ### produce_lst_file.fptr # index.html.md # gap_size_align_snippet summary: utilities to detect structure gaps & alignment description: : The goal of this script is to illustrate ways to detect gaps & alignments in structures, from a structure name & (byte) offset. level: intermediate ## Functions | [`get_member_size_align`](#gap_size_align_snippet.get_member_size_align)(struct_name, byte_offset) | | |------------------------------------------------------------------------------------------------------|----| | [`is_struct_gap`](#gap_size_align_snippet.is_struct_gap)(struc_name, byte_offset) | | ## Module Contents ### gap_size_align_snippet.get_member_size_align(struct_name, byte_offset) ### gap_size_align_snippet.is_struct_gap(struc_name, byte_offset) # index.html.md # import_type_from_til summary: load a type library from a file, and then a type from it description: : The goal of this script is to demonstrate some usage of the type API. : In this script, we: \* ask the user for a specific til to be lodaed \* if successfully loaded ask the user for a type name to be imported. \* append the type to the local types. level: intermediate ## Functions | [`main`](#import_type_from_til.main)() | | |------------------------------------------|----| ## Module Contents ### import_type_from_til.main() # index.html.md # ida_bitrange Definition of the bitrange_t class. ## Classes | [`bitrange_t`](#ida_bitrange.bitrange_t) | | |--------------------------------------------|----| ## Module Contents ### *class* ida_bitrange.bitrange_t(bit_ofs: uint16 = 0, size_in_bits: uint16 = 0) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### init(bit_ofs: uint16, size_in_bits: uint16) → [None](https://docs.python.org/3/library/constants.html#None) Initialize offset and size to given values. #### reset() → [None](https://docs.python.org/3/library/constants.html#None) Make the bitrange empty. #### empty() → [bool](https://docs.python.org/3/library/functions.html#bool) Is the bitrange empty? #### bitoff() → uint Get offset of 1st bit. #### bitsize() → uint Get size of the value in bits. #### bytesize() → uint Size of the value in bytes. #### mask64() → uint64 Convert to mask of 64 bits. #### has_common(r: [bitrange_t](#ida_bitrange.bitrange_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Does have common bits with another bitrange? #### apply_mask(subrange: [bitrange_t](#ida_bitrange.bitrange_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Apply mask to a bitrange * **Parameters:** **subrange** – range *inside* the main bitrange to keep After this operation the main bitrange will be truncated to have only the bits that are specified by subrange. Example: [off=8,nbits=4], subrange[off=1,nbits=2] => [off=9,nbits=2] * **Returns:** success #### intersect(r: [bitrange_t](#ida_bitrange.bitrange_t)) → [None](https://docs.python.org/3/library/constants.html#None) Intersect two ranges. #### create_union(r: [bitrange_t](#ida_bitrange.bitrange_t)) → [None](https://docs.python.org/3/library/constants.html#None) Create union of 2 ranges including the hole between them. #### sub(r: [bitrange_t](#ida_bitrange.bitrange_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Subtract a bitrange. #### shift_down(cnt: uint) → [None](https://docs.python.org/3/library/constants.html#None) Shift range down (left). #### shift_up(cnt: uint) → [None](https://docs.python.org/3/library/constants.html#None) Shift range up (right). #### extract(src: void const \*, is_mf: bool) → [bool](https://docs.python.org/3/library/functions.html#bool) #### inject(dst: void \*, src: bytevec_t const &, is_mf: bool) → [bool](https://docs.python.org/3/library/functions.html#bool) #### compare(r: [bitrange_t](#ida_bitrange.bitrange_t)) → [int](https://docs.python.org/3/library/functions.html#int) # index.html.md # mark_func_spoiled summary: mark a register “spoiled” by a function description: : At least two possibilies are offered in order to indicate that a function spoils registers (excluding the “normal” ones):
You can either parse & apply a declaration:
> func_tfinfo = ida_typeinf.tinfo_t(“int \_spoils main();”) > ida_typeinf.apply_tinfo(func.start_ea, func_tinfo, ida_typeinf.TINFO_DEFINITE)
or retrieve & modify the tinfo_t object directly.
This script showcases the latter. level: beginner ## Functions | [`mark_spoiled`](#mark_func_spoiled.mark_spoiled)(address, regs) | | |--------------------------------------------------------------------|----| ## Module Contents ### mark_func_spoiled.mark_spoiled(address, regs) # index.html.md # ida_loader Definitions of IDP, LDR, PLUGIN module interfaces. This file also contains: * functions to load files into the database * functions to generate output files * high level functions to work with the database (open, save, close) The LDR interface consists of one structure: loader_t The IDP interface consists of one structure: processor_t The PLUGIN interface consists of one structure: plugin_t Modules can’t use standard FILE\* functions. They must use functions from Modules can’t use standard memory allocation functions. They must use functions from The exported entry #1 in the module should point to the the appropriate structure. (loader_t for LDR module, for example) ## Attributes | [`LDRF_RELOAD`](#ida_loader.LDRF_RELOAD) | loader recognizes NEF_RELOAD flag | |--------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------| | [`LDRF_REQ_PROC`](#ida_loader.LDRF_REQ_PROC) | Requires a processor to be set. if this bit is not set, load_file() must call set_processor_type(..., SETPROC_LOADER) | | [`ACCEPT_ARCHIVE`](#ida_loader.ACCEPT_ARCHIVE) | Specify that a file format is served by archive loader See loader_t::accept_file | | [`ACCEPT_CONTINUE`](#ida_loader.ACCEPT_CONTINUE) | Specify that the function must be called another time See loader_t::accept_file | | [`ACCEPT_FIRST`](#ida_loader.ACCEPT_FIRST) | Specify that a file format should be place first in "load file" dialog box. See loader_t::accept_file | | [`NEF_SEGS`](#ida_loader.NEF_SEGS) | Create segments. | | [`NEF_RSCS`](#ida_loader.NEF_RSCS) | Load resources. | | [`NEF_NAME`](#ida_loader.NEF_NAME) | Rename entries. | | [`NEF_MAN`](#ida_loader.NEF_MAN) | Manual load. | | [`NEF_FILL`](#ida_loader.NEF_FILL) | Fill segment gaps. | | [`NEF_IMPS`](#ida_loader.NEF_IMPS) | Create import segment. | | [`NEF_FIRST`](#ida_loader.NEF_FIRST) | This is the first file loaded into the database. | | [`NEF_CODE`](#ida_loader.NEF_CODE) | for load_binary_file(): load as a code segment | | [`NEF_RELOAD`](#ida_loader.NEF_RELOAD) | reload the file at the same place: | | [`NEF_FLAT`](#ida_loader.NEF_FLAT) | Autocreate FLAT group (PE). | | [`NEF_MINI`](#ida_loader.NEF_MINI) | Create mini database (do not copy segment bytes from the input file; use only the file header metadata) | | [`NEF_LOPT`](#ida_loader.NEF_LOPT) | Display additional loader options dialog. | | [`NEF_LALL`](#ida_loader.NEF_LALL) | Load all segments without questions. | | [`DLLEXT`](#ida_loader.DLLEXT) | | | [`LOADER_DLL`](#ida_loader.LOADER_DLL) | | | [`OFILE_MAP`](#ida_loader.OFILE_MAP) | MAP file. | | [`OFILE_EXE`](#ida_loader.OFILE_EXE) | Executable file. | | [`OFILE_IDC`](#ida_loader.OFILE_IDC) | IDC file. | | [`OFILE_LST`](#ida_loader.OFILE_LST) | Disassembly listing. | | [`OFILE_ASM`](#ida_loader.OFILE_ASM) | Assembly. | | [`OFILE_DIF`](#ida_loader.OFILE_DIF) | Difference. | | [`GENFLG_MAPSEG`](#ida_loader.GENFLG_MAPSEG) | OFILE_MAP: generate map of segments | | [`GENFLG_MAPNAME`](#ida_loader.GENFLG_MAPNAME) | OFILE_MAP: include dummy names | | [`GENFLG_MAPDMNG`](#ida_loader.GENFLG_MAPDMNG) | OFILE_MAP: demangle names | | [`GENFLG_MAPLOC`](#ida_loader.GENFLG_MAPLOC) | OFILE_MAP: include local names | | [`GENFLG_IDCTYPE`](#ida_loader.GENFLG_IDCTYPE) | OFILE_IDC: gen only information about types | | [`GENFLG_ASMTYPE`](#ida_loader.GENFLG_ASMTYPE) | OFILE_ASM,OFILE_LST: gen information about types too | | [`GENFLG_GENHTML`](#ida_loader.GENFLG_GENHTML) | OFILE_ASM,OFILE_LST: generate html (ui_genfile_callback will be used) | | [`GENFLG_ASMINC`](#ida_loader.GENFLG_ASMINC) | OFILE_ASM,OFILE_LST: gen information only about types | | [`FILEREG_PATCHABLE`](#ida_loader.FILEREG_PATCHABLE) | means that the input file may be patched (i.e. no compression, no iterated data, etc) | | [`FILEREG_NOTPATCHABLE`](#ida_loader.FILEREG_NOTPATCHABLE) | the data is kept in some encoded form in the file. | | [`PLUGIN_DLL`](#ida_loader.PLUGIN_DLL) | Pattern to find plugin files. | | [`MODULE_ENTRY_LOADER`](#ida_loader.MODULE_ENTRY_LOADER) | | | [`MODULE_ENTRY_PLUGIN`](#ida_loader.MODULE_ENTRY_PLUGIN) | | | [`MODULE_ENTRY_IDP`](#ida_loader.MODULE_ENTRY_IDP) | | | [`IDP_DLL`](#ida_loader.IDP_DLL) | | | [`MAX_DATABASE_DESCRIPTION`](#ida_loader.MAX_DATABASE_DESCRIPTION) | Maximum database snapshot description length. | | [`SSF_AUTOMATIC`](#ida_loader.SSF_AUTOMATIC) | automatic snapshot | | [`SSUF_DESC`](#ida_loader.SSUF_DESC) | Update the description. | | [`SSUF_PATH`](#ida_loader.SSUF_PATH) | Update the path. | | [`SSUF_FLAGS`](#ida_loader.SSUF_FLAGS) | Update the flags. | | [`DBFL_KILL`](#ida_loader.DBFL_KILL) | delete unpacked database | | [`DBFL_COMP`](#ida_loader.DBFL_COMP) | collect garbage | | [`DBFL_BAK`](#ida_loader.DBFL_BAK) | create backup file (if !DBFL_KILL) | | [`DBFL_TEMP`](#ida_loader.DBFL_TEMP) | temporary database | | [`PATH_TYPE_CMD`](#ida_loader.PATH_TYPE_CMD) | full path to the file specified in the command line | | [`PATH_TYPE_IDB`](#ida_loader.PATH_TYPE_IDB) | full path of IDB file | | [`PATH_TYPE_ID0`](#ida_loader.PATH_TYPE_ID0) | full path of ID0 file | ## Classes | [`qvector_snapshotvec_t`](#ida_loader.qvector_snapshotvec_t) | | |----------------------------------------------------------------|----| | [`loader_t`](#ida_loader.loader_t) | | | [`idp_name_t`](#ida_loader.idp_name_t) | | | [`idp_desc_t`](#ida_loader.idp_desc_t) | | | [`plugin_info_t`](#ida_loader.plugin_info_t) | | | [`snapshot_t`](#ida_loader.snapshot_t) | | ## Functions | [`load_binary_file`](#ida_loader.load_binary_file)(→ bool) | Load a binary file into the database. This function usually is called from ui. | |-----------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [`process_archive`](#ida_loader.process_archive)(→ Union[str, None]) | Calls loader_t::process_archive() For parameters and return value description look at loader_t::process_archive(). Additional parameter 'loader' is a pointer to load_info_t structure. | | [`gen_file`](#ida_loader.gen_file)(→ int) | Generate an output file. OFILE_EXE: | | [`file2base`](#ida_loader.file2base)(→ int) | Load portion of file into the database. This function will include (ea1..ea2) into the addressing space of the program (make it enabled). | | [`base2file`](#ida_loader.base2file)(→ int) | Unload database to a binary file. This function works for wide byte processors too. | | [`get_basic_file_type`](#ida_loader.get_basic_file_type)(→ filetype_t) | Get the input file type. This function can recognize libraries and zip files. | | [`get_file_type_name`](#ida_loader.get_file_type_name)(→ Union[str, None]) | Get name of the current file type. The current file type is kept in idainfo::filetype. | | [`import_module`](#ida_loader.import_module)(→ None) | Register imports in the database, the way file loaders do. | | [`set_import_ordinal`](#ida_loader.set_import_ordinal)(→ None) | Set information about the ordinal import entry. This function performs 'modnode.altset(ord, ea2node(ea));' | | [`set_import_name`](#ida_loader.set_import_name)(→ None) | Set information about the named import entry. This function performs 'modnode.supset_ea(ea, name);' | | [`load_ids_module`](#ida_loader.load_ids_module)(→ int) | Load and apply IDS file. This function loads the specified IDS file and applies it to the database. If the program imports functions from a module with the same name as the name of the ids file being loaded, then only functions from this module will be affected. Otherwise (i.e. when the program does not import a module with this name) any function in the program may be affected. | | [`get_plugin_options`](#ida_loader.get_plugin_options)(→ str) | Get plugin options from the command line. If the user has specified the options in the -Oplugin_name:options format, them this function will return the 'options' part of it The 'plugin' parameter should denote the plugin name Returns nullptr if there we no options specified | | [`find_plugin`](#ida_loader.find_plugin)(→ plugin_t \*) | Find a user-defined plugin and optionally load it. | | [`get_fileregion_offset`](#ida_loader.get_fileregion_offset)(→ qoff64_t) | Get offset in the input file which corresponds to the given ea. If the specified ea can't be mapped into the input file offset, return -1. | | [`get_fileregion_ea`](#ida_loader.get_fileregion_ea)(→ ida_idaapi.ea_t) | Get linear address which corresponds to the specified input file offset. If can't be found, return BADADDR | | [`gen_exe_file`](#ida_loader.gen_exe_file)(→ int) | Generate an exe file (unload the database in binary form). | | [`reload_file`](#ida_loader.reload_file)(→ bool) | Reload the input file. This function reloads the byte values from the input file. It doesn't modify the segmentation, names, comments, etc. | | [`build_snapshot_tree`](#ida_loader.build_snapshot_tree)(→ bool) | Build the snapshot tree. | | [`flush_buffers`](#ida_loader.flush_buffers)(→ int) | Flush buffers to the disk. | | [`is_trusted_idb`](#ida_loader.is_trusted_idb)(→ bool) | Is the database considered as trusted? | | [`save_database`](#ida_loader.save_database)(→ bool) | Save current database using a new file name. | | [`is_database_flag`](#ida_loader.is_database_flag)(→ bool) | Get the current database flag | | [`set_database_flag`](#ida_loader.set_database_flag)(→ None) | Set or clear database flag | | [`clr_database_flag`](#ida_loader.clr_database_flag)(→ None) | | | [`get_path`](#ida_loader.get_path)(→ str) | Get the file path | | [`set_path`](#ida_loader.set_path)(→ None) | Set the file path | | [`get_elf_debug_file_directory`](#ida_loader.get_elf_debug_file_directory)(→ str) | Get the value of the ELF_DEBUG_FILE_DIRECTORY configuration directive. | | [`mem2base`](#ida_loader.mem2base)(mem, ea, fpos) | Load database from the memory. | | [`load_plugin`](#ida_loader.load_plugin)(name) | Loads a plugin | | [`run_plugin`](#ida_loader.run_plugin)(plg, arg) | Runs a plugin | | [`load_and_run_plugin`](#ida_loader.load_and_run_plugin)(→ bool) | Load & run a plugin. | | [`extract_module_from_archive`](#ida_loader.extract_module_from_archive)(→ PyObject \*) | Extract a module for an archive file. Parse an archive file, show the list of modules to the user, allow him to select a module, extract the selected module to a file (if the extract module is an archive, repeat the process). This function can handle ZIP, AR, AIXAR, OMFLIB files. The temporary file will be automatically deleted by IDA at the end. | ## Module Contents ### *class* ida_loader.qvector_snapshotvec_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### push_back(\*args) → snapshot_t \*& #### pop_back() → [None](https://docs.python.org/3/library/constants.html#None) #### size() → [int](https://docs.python.org/3/library/functions.html#int) #### empty() → [bool](https://docs.python.org/3/library/functions.html#bool) #### at(\_idx: [int](https://docs.python.org/3/library/functions.html#int)) → snapshot_t \*const & #### qclear() → [None](https://docs.python.org/3/library/constants.html#None) #### clear() → [None](https://docs.python.org/3/library/constants.html#None) #### resize(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### capacity() → [int](https://docs.python.org/3/library/functions.html#int) #### reserve(cnt: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### truncate() → [None](https://docs.python.org/3/library/constants.html#None) #### swap(r: [qvector_snapshotvec_t](#ida_loader.qvector_snapshotvec_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extract() → snapshot_t \*\* #### inject(s: snapshot_t \*\*, len: int) → [None](https://docs.python.org/3/library/constants.html#None) #### begin(\*args) → qvector< snapshot_t \* >::const_iterator #### end(\*args) → qvector< snapshot_t \* >::const_iterator #### insert(it: qvector< snapshot_t \* >::iterator, x: snapshot_t) → qvector< snapshot_t \* >::iterator #### erase(\*args) → qvector< snapshot_t \* >::iterator #### find(\*args) → qvector< snapshot_t \* >::const_iterator #### has(x: [snapshot_t](#ida_loader.snapshot_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### add_unique(x: [snapshot_t](#ida_loader.snapshot_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### append(x: [snapshot_t](#ida_loader.snapshot_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extend(x: [qvector_snapshotvec_t](#ida_loader.qvector_snapshotvec_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### front #### back ### *class* ida_loader.loader_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### version *: [int](https://docs.python.org/3/library/functions.html#int)* api version, should be IDP_INTERFACE_VERSION #### flags *: [int](https://docs.python.org/3/library/functions.html#int)* Loader flags ### ida_loader.LDRF_RELOAD loader recognizes NEF_RELOAD flag ### ida_loader.LDRF_REQ_PROC Requires a processor to be set. if this bit is not set, load_file() must call set_processor_type(…, SETPROC_LOADER) ### ida_loader.ACCEPT_ARCHIVE Specify that a file format is served by archive loader See loader_t::accept_file ### ida_loader.ACCEPT_CONTINUE Specify that the function must be called another time See loader_t::accept_file ### ida_loader.ACCEPT_FIRST Specify that a file format should be place first in “load file” dialog box. See loader_t::accept_file ### ida_loader.NEF_SEGS Create segments. ### ida_loader.NEF_RSCS Load resources. ### ida_loader.NEF_NAME Rename entries. ### ida_loader.NEF_MAN Manual load. ### ida_loader.NEF_FILL Fill segment gaps. ### ida_loader.NEF_IMPS Create import segment. ### ida_loader.NEF_FIRST This is the first file loaded into the database. ### ida_loader.NEF_CODE for load_binary_file(): load as a code segment ### ida_loader.NEF_RELOAD reload the file at the same place: \* don’t create segments \* don’t create fixup info \* don’t import segments \* etc. Load only the bytes into the base. A loader should have the LDRF_RELOAD bit set. ### ida_loader.NEF_FLAT Autocreate FLAT group (PE). ### ida_loader.NEF_MINI Create mini database (do not copy segment bytes from the input file; use only the file header metadata) ### ida_loader.NEF_LOPT Display additional loader options dialog. ### ida_loader.NEF_LALL Load all segments without questions. ### ida_loader.DLLEXT ### ida_loader.LOADER_DLL ### ida_loader.load_binary_file(filename: str, li: linput_t \*, \_neflags: ushort, fileoff: qoff64_t, basepara: ida_idaapi.ea_t, binoff: ida_idaapi.ea_t, nbytes: uint64) → [bool](https://docs.python.org/3/library/functions.html#bool) Load a binary file into the database. This function usually is called from ui. * **Parameters:** * **filename** – the name of input file as is (if the input file is from library, then this is the name from the library) * **li** – loader input source * **\_neflags** – Load file flags. For the first file, the flag NEF_FIRST must be set. * **fileoff** – Offset in the input file * **basepara** – Load address in paragraphs * **binoff** – Load offset (load_address=(basepara<<4)+binoff) * **nbytes** – Number of bytes to load from the file. * 0: up to the end of the file * **Returns:** true: ok * **Returns:** false: failed (couldn’t open the file) ### ida_loader.process_archive(temp_file: str, li: linput_t \*, module_name: str, neflags: ushort \*, defmember: str, loader: load_info_t const \*) → [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None) Calls loader_t::process_archive() For parameters and return value description look at loader_t::process_archive(). Additional parameter ‘loader’ is a pointer to load_info_t structure. ### ida_loader.OFILE_MAP MAP file. ### ida_loader.OFILE_EXE Executable file. ### ida_loader.OFILE_IDC IDC file. ### ida_loader.OFILE_LST Disassembly listing. ### ida_loader.OFILE_ASM Assembly. ### ida_loader.OFILE_DIF Difference. ### ida_loader.gen_file(otype: ofile_type_t, fp: FILE \*, ea1: ida_idaapi.ea_t, ea2: ida_idaapi.ea_t, flags: int) → [int](https://docs.python.org/3/library/functions.html#int) Generate an output file. OFILE_EXE: * **Parameters:** * **otype** – type of output file. * **fp** – the output file handle * **ea1** – start address. For some file types this argument is ignored * **ea2** – end address. For some file types this argument is ignored as usual in ida, the end address of the range is not included * **flags** – Generate file flags * **Returns:** number of the generated lines. -1 if an error occurred * **Returns:** 0: can’t generate exe file * **Returns:** 1: ok ### ida_loader.GENFLG_MAPSEG OFILE_MAP: generate map of segments ### ida_loader.GENFLG_MAPNAME OFILE_MAP: include dummy names ### ida_loader.GENFLG_MAPDMNG OFILE_MAP: demangle names ### ida_loader.GENFLG_MAPLOC OFILE_MAP: include local names ### ida_loader.GENFLG_IDCTYPE OFILE_IDC: gen only information about types ### ida_loader.GENFLG_ASMTYPE OFILE_ASM,OFILE_LST: gen information about types too ### ida_loader.GENFLG_GENHTML OFILE_ASM,OFILE_LST: generate html (ui_genfile_callback will be used) ### ida_loader.GENFLG_ASMINC OFILE_ASM,OFILE_LST: gen information only about types ### ida_loader.file2base(li: linput_t \*, pos: qoff64_t, ea1: ida_idaapi.ea_t, ea2: ida_idaapi.ea_t, patchable: int) → [int](https://docs.python.org/3/library/functions.html#int) Load portion of file into the database. This function will include (ea1..ea2) into the addressing space of the program (make it enabled). * **Parameters:** * **li** – pointer of input source * **pos** – position in the file * **ea1** – range of destination linear addresses * **ea2** – range of destination linear addresses * **patchable** – should the kernel remember correspondence of file offsets to linear addresses. * **Returns:** 1: ok * **Returns:** 0: read error, a warning is displayed ### ida_loader.FILEREG_PATCHABLE means that the input file may be patched (i.e. no compression, no iterated data, etc) ### ida_loader.FILEREG_NOTPATCHABLE the data is kept in some encoded form in the file. ### ida_loader.base2file(fp: FILE \*, pos: qoff64_t, ea1: ida_idaapi.ea_t, ea2: ida_idaapi.ea_t) → [int](https://docs.python.org/3/library/functions.html#int) Unload database to a binary file. This function works for wide byte processors too. * **Parameters:** * **fp** – pointer to file * **pos** – position in the file * **ea1** – range of source linear addresses * **ea2** – range of source linear addresses * **Returns:** 1-ok(always), write error leads to immediate exit ### ida_loader.get_basic_file_type(li: linput_t \*) → filetype_t Get the input file type. This function can recognize libraries and zip files. ### ida_loader.get_file_type_name() → [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None) Get name of the current file type. The current file type is kept in idainfo::filetype. * **Returns:** size of answer, this function always succeeds ### ida_loader.import_module(module: [str](https://docs.python.org/3/library/stdtypes.html#str), windir: [str](https://docs.python.org/3/library/stdtypes.html#str), modnode: [int](https://docs.python.org/3/library/functions.html#int), importer: [None](https://docs.python.org/3/library/constants.html#None), ostype: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [None](https://docs.python.org/3/library/constants.html#None) Register imports in the database, the way file loaders do. Before calling, populate `modnode` with the entries to register using [`set_import_name()`](#ida_loader.set_import_name) (named imports) and/or [`set_import_ordinal()`](#ida_loader.set_import_ordinal) (ordinal imports). After the call the module appears in the Imports view and is enumerable through [`ida_nalt.get_import_module_qty()`](../ida_nalt/index.md#ida_nalt.get_import_module_qty), [`ida_nalt.get_import_module_name()`](../ida_nalt/index.md#ida_nalt.get_import_module_name) and [`ida_nalt.enum_import_names()`](../ida_nalt/index.md#ida_nalt.enum_import_names). * **Parameters:** * **module** – DLL/library name (e.g. `"libfoo.so"`) * **windir** – system directory with DLLs to probe; may be None * **modnode** – index of a netnode you previously created with `netnode().create()` and populated * **importer** – must be `None`. In a C++ loader this slot accepts an optional callback IDA uses to walk a sibling DLL on disk and discover its exports (used by the PE/NE/LX loaders); a Python loader has already parsed its input and has no DLL on disk for IDA to probe, so the hook is not exposed. The argument is kept in the signature for one-to-one parity with the C++ API. * **ostype** – OS subdir under `ids/` to look in (e.g. `"win"`, `"linux"`); None means the IDS directory root ### ida_loader.set_import_ordinal(modnode: [int](https://docs.python.org/3/library/functions.html#int), ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), ord: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) Set information about the ordinal import entry. This function performs ‘modnode.altset(ord, ea2node(ea));’ * **Parameters:** * **modnode** – node with information about imported entries * **ea** – linear address of the entry * **ord** – ordinal number of the entry ### ida_loader.set_import_name(modnode: [int](https://docs.python.org/3/library/functions.html#int), ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), name: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [None](https://docs.python.org/3/library/constants.html#None) Set information about the named import entry. This function performs ‘modnode.supset_ea(ea, name);’ * **Parameters:** * **modnode** – node with information about imported entries * **ea** – linear address of the entry * **name** – name of the entry ### ida_loader.load_ids_module(fname: char \*) → [int](https://docs.python.org/3/library/functions.html#int) Load and apply IDS file. This function loads the specified IDS file and applies it to the database. If the program imports functions from a module with the same name as the name of the ids file being loaded, then only functions from this module will be affected. Otherwise (i.e. when the program does not import a module with this name) any function in the program may be affected. * **Parameters:** **fname** – name of file to apply * **Returns:** 1: ok * **Returns:** 0: some error (a message is displayed). if the ids file does not exist, no message is displayed ### ida_loader.get_plugin_options(plugin: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [str](https://docs.python.org/3/library/stdtypes.html#str) Get plugin options from the command line. If the user has specified the options in the -Oplugin_name:options format, them this function will return the ‘options’ part of it The ‘plugin’ parameter should denote the plugin name Returns nullptr if there we no options specified ### ida_loader.PLUGIN_DLL Pattern to find plugin files. ### ida_loader.MODULE_ENTRY_LOADER ### ida_loader.MODULE_ENTRY_PLUGIN ### ida_loader.MODULE_ENTRY_IDP ### *class* ida_loader.idp_name_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### lname *: [str](https://docs.python.org/3/library/stdtypes.html#str)* long processor name #### sname *: [str](https://docs.python.org/3/library/stdtypes.html#str)* short processor name #### hidden *: [bool](https://docs.python.org/3/library/functions.html#bool)* is hidden ### *class* ida_loader.idp_desc_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### path *: [str](https://docs.python.org/3/library/stdtypes.html#str)* module file name #### mtime *: time_t* time of last modification #### family *: [str](https://docs.python.org/3/library/stdtypes.html#str)* processor’s family #### names *: idp_names_t* processor names #### is_script *: [bool](https://docs.python.org/3/library/functions.html#bool)* the processor module is a script #### checked *: [bool](https://docs.python.org/3/library/functions.html#bool)* internal, for cache management ### ida_loader.IDP_DLL ### *class* ida_loader.plugin_info_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### next *: plugin_info_t \** next plugin information #### path *: char \** full path to the plugin #### org_name *: char \** original short name of the plugin #### name *: char \** short name of the plugin it will appear in the menu #### org_hotkey *: ushort* original hotkey to run the plugin #### hotkey *: ushort* current hotkey to run the plugin #### arg *: [int](https://docs.python.org/3/library/functions.html#int)* argument used to call the plugin #### entry *: plugin_t \** pointer to the plugin if it is already loaded #### dllmem *: idadll_t* #### flags *: [int](https://docs.python.org/3/library/functions.html#int)* a copy of plugin_t::flags #### comment *: char \** a copy of plugin_t::comment #### idaplg_name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* “name” provided by ida-plugin.json or basename of path (without extension) ### ida_loader.find_plugin(name: [str](https://docs.python.org/3/library/stdtypes.html#str), load_if_needed: [bool](https://docs.python.org/3/library/functions.html#bool) = False) → plugin_t \* Find a user-defined plugin and optionally load it. * **Parameters:** * **name** – short plugin name without path and extension, or absolute path to the file name * **load_if_needed** – if the plugin is not present in the memory, try to load it * **Returns:** pointer to plugin description block ### ida_loader.get_fileregion_offset(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → qoff64_t Get offset in the input file which corresponds to the given ea. If the specified ea can’t be mapped into the input file offset, return -1. ### ida_loader.get_fileregion_ea(offset: qoff64_t) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) Get linear address which corresponds to the specified input file offset. If can’t be found, return BADADDR ### ida_loader.gen_exe_file(fp: FILE \*) → [int](https://docs.python.org/3/library/functions.html#int) Generate an exe file (unload the database in binary form). * **Returns:** fp the output file handle. if fp == nullptr then return: * 1: can generate an executable file * 0: can’t generate an executable file * **Returns:** 1: ok * **Returns:** 0: failed ### ida_loader.reload_file(file: [str](https://docs.python.org/3/library/stdtypes.html#str), is_remote: [bool](https://docs.python.org/3/library/functions.html#bool)) → [bool](https://docs.python.org/3/library/functions.html#bool) Reload the input file. This function reloads the byte values from the input file. It doesn’t modify the segmentation, names, comments, etc. * **Parameters:** **file** – name of the input file. if file == nullptr then returns: * 1: can reload the input file * 0: can’t reload the input file * **Parameters:** **is_remote** – is the file located on a remote computer with the debugger server? * **Returns:** success ### ida_loader.MAX_DATABASE_DESCRIPTION Maximum database snapshot description length. ### *class* ida_loader.snapshot_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### id *: qtime64_t* snapshot ID. This value is computed using qgettimeofday() #### flags *: uint16* Snapshot flags #### desc *: char[128]* snapshot description #### filename *: char[QMAXPATH]* snapshot file name #### children *: snapshots_t* snapshot children #### clear() → [None](https://docs.python.org/3/library/constants.html#None) ### ida_loader.SSF_AUTOMATIC automatic snapshot ### ida_loader.build_snapshot_tree(root: [snapshot_t](#ida_loader.snapshot_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Build the snapshot tree. * **Parameters:** **root** – snapshot root that will contain the snapshot tree elements. * **Returns:** success ### ida_loader.SSUF_DESC Update the description. ### ida_loader.SSUF_PATH Update the path. ### ida_loader.SSUF_FLAGS Update the flags. ### ida_loader.flush_buffers() → [int](https://docs.python.org/3/library/functions.html#int) Flush buffers to the disk. ### ida_loader.is_trusted_idb() → [bool](https://docs.python.org/3/library/functions.html#bool) Is the database considered as trusted? ### ida_loader.save_database(outfile: [str](https://docs.python.org/3/library/stdtypes.html#str) = None, flags: [int](https://docs.python.org/3/library/functions.html#int) = 0, root: [snapshot_t](#ida_loader.snapshot_t) = None, attr: [snapshot_t](#ida_loader.snapshot_t) = None) → [bool](https://docs.python.org/3/library/functions.html#bool) Save current database using a new file name. * **Parameters:** * **outfile** – output database file name; nullptr means the current path * **flags** – Database flags; 0 means the current flags * **root** – optional: snapshot tree root. * **attr** – optional: snapshot attributes * **Returns:** success ### ida_loader.DBFL_KILL delete unpacked database ### ida_loader.DBFL_COMP collect garbage ### ida_loader.DBFL_BAK create backup file (if !DBFL_KILL) ### ida_loader.DBFL_TEMP temporary database ### ida_loader.is_database_flag(dbfl: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) Get the current database flag * **Parameters:** **dbfl** – flag Database flags * **Returns:** the state of the flag (set or cleared) ### ida_loader.set_database_flag(dbfl: [int](https://docs.python.org/3/library/functions.html#int), cnd: [bool](https://docs.python.org/3/library/functions.html#bool) = True) → [None](https://docs.python.org/3/library/constants.html#None) Set or clear database flag * **Parameters:** * **dbfl** – flag Database flags * **cnd** – set if true or clear flag otherwise ### ida_loader.clr_database_flag(dbfl: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) ### ida_loader.PATH_TYPE_CMD full path to the file specified in the command line ### ida_loader.PATH_TYPE_IDB full path of IDB file ### ida_loader.PATH_TYPE_ID0 full path of ID0 file ### ida_loader.get_path(pt: path_type_t) → [str](https://docs.python.org/3/library/stdtypes.html#str) Get the file path * **Parameters:** **pt** – file path type Types of the file pathes * **Returns:** file path, never returns nullptr ### ida_loader.set_path(pt: path_type_t, path: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [None](https://docs.python.org/3/library/constants.html#None) Set the file path * **Parameters:** * **pt** – file path type Types of the file pathes * **path** – new file path, use nullptr or empty string to clear the file path ### ida_loader.get_elf_debug_file_directory() → [str](https://docs.python.org/3/library/stdtypes.html#str) Get the value of the ELF_DEBUG_FILE_DIRECTORY configuration directive. ### ida_loader.mem2base(mem, ea, fpos) Load database from the memory. * **Parameters:** * **mem** – the buffer * **ea** – start linear addresses * **fpos** – position in the input file the data is taken from. if == -1, then no file position correspond to the data. * **Returns:** 1, or 0 in case of failure ### ida_loader.load_plugin(name) Loads a plugin * **Parameters:** **name** – short plugin name without path and extension, or absolute path to the file name * **Returns:** An opaque object representing the loaded plugin, or None if plugin could not be loaded ### ida_loader.run_plugin(plg, arg) Runs a plugin * **Parameters:** * **plg** – A plugin object (returned by load_plugin()) * **arg** – the code to pass to the plugin’s “run()” function * **Returns:** Boolean ### ida_loader.load_and_run_plugin(name: [str](https://docs.python.org/3/library/stdtypes.html#str), arg: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) Load & run a plugin. ### ida_loader.extract_module_from_archive(fname: [str](https://docs.python.org/3/library/stdtypes.html#str), is_remote: [bool](https://docs.python.org/3/library/functions.html#bool) = False) → PyObject \* Extract a module for an archive file. Parse an archive file, show the list of modules to the user, allow him to select a module, extract the selected module to a file (if the extract module is an archive, repeat the process). This function can handle ZIP, AR, AIXAR, OMFLIB files. The temporary file will be automatically deleted by IDA at the end. * **Parameters:** **is_remote** – is the input file remote? * **Returns:** true: ok * **Returns:** false: something bad happened (error message has been displayed to the user) # index.html.md # custom_calling_convention summary: implement a custom calling convention description: : The Delphi LStrCatN variadic function is unusual in the sense that it is variadic, purges the bytes from the stack, and the number of bytes to purge is held in EDX. This example shows how to add support for such ad-hoc calling conventions.
You can test this example with the IDB at ../idbs/delphi6_lstrcatn.i64 keywords: types level: intermediate ## Attributes | [`EAX`](#custom_calling_convention.EAX) | | |-------------------------------------------------|----| | [`EDX`](#custom_calling_convention.EDX) | | | [`REGARGS`](#custom_calling_convention.REGARGS) | | | [`ccid`](#custom_calling_convention.ccid) | | ## Classes | [`delphi_LStrCatN_cc`](#custom_calling_convention.delphi_LStrCatN_cc) | | |-------------------------------------------------------------------------|----| ## Module Contents ### custom_calling_convention.EAX *= 0* ### custom_calling_convention.EDX *= 2* ### custom_calling_convention.REGARGS ### *class* custom_calling_convention.delphi_LStrCatN_cc Bases: [`ida_typeinf.custom_callcnv_t`](../ida_typeinf/index.md#ida_typeinf.custom_callcnv_t) #### name *= '_\_lstrcatn'* the name is used as a keyword in the function prototype #### flags #### abibits abibits to be used for the calling convention #### validate_func(fti) Validate a function prototype. This function is used during parsing or deserializing a function prototype to verify semantic limitations of the prototype (for example, returning arrays is forbidden in C) * **Parameters:** * **fti** – function prototype * **reterr** – buffer for error message #### calc_retloc(fti) Calculate the location of the return value. This function must fill fti->retloc. * **Parameters:** **fti** – function prototype * **Returns:** success #### calc_arglocs(fti) Calculate the argument locations. This function must fill all fti->at(i).argloc instances. It may be called for variadic functions too, in calc_varglocs fails. * **Parameters:** **fti** – function prototype * **Returns:** success #### find_edx_value(call_ea, blk) #### find_varargs(fti, call_ea, blk) Discover variadic arguments. This function is called only for variadic functions. It is currently used by the decompiler. * **Parameters:** * **fti** – function prototype. find_varargs() should append the discovered variadic arguments to it. * **call_ea** – address of the call instruction * **blk** – microcode block with the call instruction * **Returns:** >0 - total number of arguments after the call <0 - failure ==0 - means to use the standard algorithm to discover variadic args #### calc_varglocs(fti, regs, stkargs, nfixed) Calculate the argument locations for a variadic function. This function must fill all fti->at(i).argloc instances and provide more detailed info about registers and stkargs. * **Parameters:** * **fti** – function prototype * **regs** – buffer for hidden register arguments, may be nullptr * **stkargs** – buffer for hidden stack arguments, may be nullptr * **nfixed** – number of fixed arguments * **Returns:** success #### get_cc_regs(callregs) Retrieve generic information about call registers. #### get_stkarg_area_info(stkarg_area_info) Retrieve generic information about stack arguments. #### calc_purged_bytes(fti, call_ea) Calculate the number of purged bytes * **Parameters:** * **fti** – function prototype * **call_ea** – address of the call instruction (not used yet) #### decorate_name(name, should_decorate, cc, ftype) Function to be overloaded for custom calling conventions. Decorate a function name. Some compilers decorate names depending on the calling convention. This function provides the means to handle it for custom callcnvs. Please note that this is about name decoration (C), not name mangling (C++). ### custom_calling_convention.ccid # index.html.md # ida_strlist Functions that deal with the string list. While the kernel keeps the string list, it does not update it. The string list is not used by the kernel because keeping it up-to-date would slow down IDA without any benefit. If the string list is not cleared using clear_strlist(), the list will be saved to the database and restored on the next startup. The users of this list should call build_strlist() if they need an up-to-date version. ## Classes | [`strwinsetup_t`](#ida_strlist.strwinsetup_t) | | |-----------------------------------------------------|----| | [`string_info_t`](#ida_strlist.string_info_t) | | | [`string_info_ex_t`](#ida_strlist.string_info_ex_t) | | ## Functions | [`get_strlist_options`](#ida_strlist.get_strlist_options)(→ strwinsetup_t const \*) | Get the static string list options. | |---------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------| | [`build_strlist`](#ida_strlist.build_strlist)(→ None) | Rebuild the string list. | | [`clear_strlist`](#ida_strlist.clear_strlist)(→ None) | Clear the string list. | | [`get_strlist_qty`](#ida_strlist.get_strlist_qty)(→ int) | Get number of elements in the string list. The list will be loaded from the database (if saved) or built from scratch. | | [`get_strlist_item`](#ida_strlist.get_strlist_item)(→ bool) | Get nth element of the string list (n=0..get_strlist_qty()-1). | | [`get_strlist_item_ex`](#ida_strlist.get_strlist_item_ex)(→ bool) | Get nth element of the string list, including the decompiler string. | ## Module Contents ### *class* ida_strlist.strwinsetup_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### minlen *: [int](https://docs.python.org/3/library/functions.html#int)* #### display_only_existing_strings *: uchar* #### only_7bit *: uchar* #### ignore_heads *: uchar* #### strtypes ### *class* ida_strlist.string_info_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### ea *: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)* #### length *: [int](https://docs.python.org/3/library/functions.html#int)* #### type *: [int](https://docs.python.org/3/library/functions.html#int)* ### *class* ida_strlist.string_info_ex_t(\*args) Bases: [`string_info_t`](#ida_strlist.string_info_t) #### thisown #### decompiler_string *: [str](https://docs.python.org/3/library/stdtypes.html#str)* ### ida_strlist.get_strlist_options() → strwinsetup_t const \* Get the static string list options. ### ida_strlist.build_strlist() → [None](https://docs.python.org/3/library/constants.html#None) Rebuild the string list. ### ida_strlist.clear_strlist() → [None](https://docs.python.org/3/library/constants.html#None) Clear the string list. ### ida_strlist.get_strlist_qty() → [int](https://docs.python.org/3/library/functions.html#int) Get number of elements in the string list. The list will be loaded from the database (if saved) or built from scratch. ### ida_strlist.get_strlist_item(si: [string_info_t](#ida_strlist.string_info_t), n: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) Get nth element of the string list (n=0..get_strlist_qty()-1). ### ida_strlist.get_strlist_item_ex(si: [string_info_ex_t](#ida_strlist.string_info_ex_t), n: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) Get nth element of the string list, including the decompiler string. # index.html.md # log_idp_events summary: react to processor events/notifications description: : these hooks will be notified about IDP events, and dump their information to the “Output” window level: intermediate ## Attributes | [`idp_hooks`](#log_idp_events.idp_hooks) | | |--------------------------------------------|----| ## Classes | [`idp_logger_hooks_t`](#log_idp_events.idp_logger_hooks_t) | | |--------------------------------------------------------------|----| ## Module Contents ### *class* log_idp_events.idp_logger_hooks_t Bases: [`ida_idp.IDP_Hooks`](../ida_idp/index.md#ida_idp.IDP_Hooks) #### inhibit_log *= 0* #### ev_get_abi_info(comp) Get all possible ABI names and optional extensions for given compiler abiname/option is a string entirely consisting of letters, digits and underscore * **Parameters:** **comp** – (comp_t) - compiler ID * **Returns:** 0: not implemented * **Returns:** 1: ok ### log_idp_events.idp_hooks # index.html.md # ida_xref Functions that deal with cross-references (xrefs). There are 2 groups of xrefs: CODE and DATA references. All xrefs are kept in the bTree except the ordinary execution flow to the next instruction. The ordinary execution flow to the next instruction is kept in flags (see bytes.hpp) The source address of an xref must be an item head (is_head) or a structure member id. Even if an xref is generated by an element in the middle of the item, the item head address must be used. There are some exceptions to the rule but they are not worth mentioning here. Xrefs are automatically sorted by addresses. However, the flow to the next instruction is always at the beginning of the list. Xrefs are usually created by the processor module, as a reaction to the ev_emu_insn event. Plugins may create xrefs too but please note that upon a reanalysis of an item, all its xrefs, except the ones marked with XREF_USER, are deleted by the kernel. ## Attributes | [`fl_U`](#ida_xref.fl_U) | unknown - for compatibility with old versions. Should not be used anymore. | |--------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [`fl_CF`](#ida_xref.fl_CF) | Call Far This xref creates a function at the referenced location | | [`fl_CN`](#ida_xref.fl_CN) | Call Near This xref creates a function at the referenced location | | [`fl_JF`](#ida_xref.fl_JF) | Jump Far. | | [`fl_JN`](#ida_xref.fl_JN) | Jump Near. | | [`fl_USobsolete`](#ida_xref.fl_USobsolete) | User specified (obsolete). | | [`fl_F`](#ida_xref.fl_F) | Ordinary flow: used to specify execution flow to the next instruction. | | [`dr_U`](#ida_xref.dr_U) | Unknown - for compatibility with old versions. Should not be used anymore. | | [`dr_O`](#ida_xref.dr_O) | Offset The reference uses 'offset' of data rather than its value OR The reference appeared because the "OFFSET" flag of instruction is set. The meaning of this type is IDP dependent. | | [`dr_W`](#ida_xref.dr_W) | Write access. | | [`dr_R`](#ida_xref.dr_R) | Read access. | | [`dr_T`](#ida_xref.dr_T) | Text (for forced operands only) Name of data is used in manual operand | | [`dr_I`](#ida_xref.dr_I) | Informational (a derived java class references its base class informationally) | | [`dr_S`](#ida_xref.dr_S) | Reference to enum member (symbolic constant). | | [`XREF_USER`](#ida_xref.XREF_USER) | User specified xref. This xref will not be deleted by IDA. This bit should be combined with the existing xref types (cref_t & dref_t) Cannot be used for fl_F xrefs | | [`XREF_TAIL`](#ida_xref.XREF_TAIL) | Reference to tail byte in extrn symbols. | | [`XREF_BASE`](#ida_xref.XREF_BASE) | Reference to the base part of an offset. | | [`XREF_MASK`](#ida_xref.XREF_MASK) | Mask to get xref type. | | [`XREF_PASTEND`](#ida_xref.XREF_PASTEND) | Reference is past item. This bit may be passed to add_dref() functions but it won't be saved in the database. It will prevent the destruction of eventual alignment directives. | | [`XREF_FLOW`](#ida_xref.XREF_FLOW) | return all references, including ordinary flow xrefs | | [`XREF_NOFLOW`](#ida_xref.XREF_NOFLOW) | skip ordinary flow xrefs (code xrefs to the next insn) | | [`XREF_DATA`](#ida_xref.XREF_DATA) | return only data references (

```
dr_
```

...) | | [`XREF_CODE`](#ida_xref.XREF_CODE) | return only code references (

```
fl_
```

...) | | [`XREF_EA`](#ida_xref.XREF_EA) | return only program addresses | | [`XREF_TID`](#ida_xref.XREF_TID) | return only type ids. XREF_EA and XREF_TID are exclusive, only one of them can be specified | | [`XREF_ALL`](#id0) | | | [`XREF_FAR`](#id1) | | | [`XREF_ALL`](#id0) | | | [`XREF_FAR`](#id1) | | | [`has_external_refs`](#id2) | | ## Classes | [`cases_and_targets_t`](#ida_xref.cases_and_targets_t) | | |----------------------------------------------------------|----| | [`xrefblk_t`](#ida_xref.xrefblk_t) | | | [`casevec_t`](#ida_xref.casevec_t) | | ## Functions | [`create_switch_xrefs`](#ida_xref.create_switch_xrefs)(ea, si) | This function creates xrefs from the indirect jump. | |-----------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [`calc_switch_cases`](#ida_xref.calc_switch_cases)(ea, si) | Get information about a switch's cases. | | [`create_switch_table`](#ida_xref.create_switch_table)(ea, si) | Create switch table from the switch information | | [`xrefchar`](#ida_xref.xrefchar)(→ char) | Get character describing the xref type. | | [`add_cref`](#ida_xref.add_cref)(→ bool) | Create a code cross-reference. | | [`del_cref`](#ida_xref.del_cref)(→ bool) | Delete a code cross-reference. | | [`add_dref`](#ida_xref.add_dref)(→ bool) | Create a data cross-reference. | | [`del_dref`](#ida_xref.del_dref)(→ None) | Delete a data cross-reference. | | [`get_first_dref_from`](#ida_xref.get_first_dref_from)(→ ida_idaapi.ea_t) | Get first data referenced from the specified address. | | [`get_next_dref_from`](#ida_xref.get_next_dref_from)(→ ida_idaapi.ea_t) | Get next data referenced from the specified address. | | [`get_first_dref_to`](#ida_xref.get_first_dref_to)(→ ida_idaapi.ea_t) | Get address of instruction/data referencing to the specified data. | | [`get_next_dref_to`](#ida_xref.get_next_dref_to)(→ ida_idaapi.ea_t) | Get address of instruction/data referencing to the specified data | | [`get_first_cref_from`](#ida_xref.get_first_cref_from)(→ ida_idaapi.ea_t) | Get first instruction referenced from the specified instruction. If the specified instruction passes execution to the next instruction then the next instruction is returned. Otherwise the lowest referenced address is returned (remember that xrefs are kept sorted!). | | [`get_next_cref_from`](#ida_xref.get_next_cref_from)(→ ida_idaapi.ea_t) | Get next instruction referenced from the specified instruction. | | [`get_first_cref_to`](#ida_xref.get_first_cref_to)(→ ida_idaapi.ea_t) | Get first instruction referencing to the specified instruction. If the specified instruction may be executed immediately after its previous instruction then the previous instruction is returned. Otherwise the lowest referencing address is returned. (remember that xrefs are kept sorted!). | | [`get_next_cref_to`](#ida_xref.get_next_cref_to)(→ ida_idaapi.ea_t) | Get next instruction referencing to the specified instruction. | | [`get_first_fcref_from`](#ida_xref.get_first_fcref_from)(→ ida_idaapi.ea_t) | | | [`get_next_fcref_from`](#ida_xref.get_next_fcref_from)(→ ida_idaapi.ea_t) | | | [`get_first_fcref_to`](#ida_xref.get_first_fcref_to)(→ ida_idaapi.ea_t) | | | [`get_next_fcref_to`](#ida_xref.get_next_fcref_to)(→ ida_idaapi.ea_t) | | | [`has_external_refs_ea`](#ida_xref.has_external_refs_ea)(→ bool) | Does 'ea' have references from outside of the function at 'func_ea'? | | [`has_external_refs`](#id2) | | | [`has_jump_or_flow_xref`](#ida_xref.has_jump_or_flow_xref)(→ bool) | Are there jump or flow references to EA? | | [`delete_switch_table`](#ida_xref.delete_switch_table)(→ None) | | ## Module Contents ### ida_xref.create_switch_xrefs(ea, si) This function creates xrefs from the indirect jump. Usually there is no need to call this function directly because the kernel will call it for switch tables Note: Custom switch information are not supported yet. * **Parameters:** * **ea** – address of the ‘indirect jump’ instruction * **si** – switch information * **Returns:** Boolean ### *class* ida_xref.cases_and_targets_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### cases *: [casevec_t](#ida_xref.casevec_t)* #### targets *: eavec_t* ### ida_xref.calc_switch_cases(ea, si) Get information about a switch’s cases. The returned information can be used as follows: > for idx in range(len(results.cases)): > : cur_case = results.cases[idx] > for cidx in range(len(cur_case)): >
> > print(“case: %d” % cur_case[cidx]) >
> print(” goto 0x%x” % results.targets[idx]) * **Parameters:** * **ea** – address of the ‘indirect jump’ instruction * **si** – switch information * **Returns:** a structure with 2 members: ‘cases’, and ‘targets’. ### ida_xref.create_switch_table(ea, si) Create switch table from the switch information * **Parameters:** * **ea** – address of the ‘indirect jump’ instruction * **si** – switch information * **Returns:** Boolean ### ida_xref.fl_U unknown - for compatibility with old versions. Should not be used anymore. ### ida_xref.fl_CF Call Far This xref creates a function at the referenced location ### ida_xref.fl_CN Call Near This xref creates a function at the referenced location ### ida_xref.fl_JF Jump Far. ### ida_xref.fl_JN Jump Near. ### ida_xref.fl_USobsolete User specified (obsolete). ### ida_xref.fl_F Ordinary flow: used to specify execution flow to the next instruction. ### ida_xref.dr_U Unknown - for compatibility with old versions. Should not be used anymore. ### ida_xref.dr_O Offset The reference uses ‘offset’ of data rather than its value OR The reference appeared because the “OFFSET” flag of instruction is set. The meaning of this type is IDP dependent. ### ida_xref.dr_W Write access. ### ida_xref.dr_R Read access. ### ida_xref.dr_T Text (for forced operands only) Name of data is used in manual operand ### ida_xref.dr_I Informational (a derived java class references its base class informationally) ### ida_xref.dr_S Reference to enum member (symbolic constant). ### ida_xref.XREF_USER User specified xref. This xref will not be deleted by IDA. This bit should be combined with the existing xref types (cref_t & dref_t) Cannot be used for fl_F xrefs ### ida_xref.XREF_TAIL Reference to tail byte in extrn symbols. ### ida_xref.XREF_BASE Reference to the base part of an offset. ### ida_xref.XREF_MASK Mask to get xref type. ### ida_xref.XREF_PASTEND Reference is past item. This bit may be passed to add_dref() functions but it won’t be saved in the database. It will prevent the destruction of eventual alignment directives. ### ida_xref.xrefchar(xrtype: char) → char Get character describing the xref type. * **Parameters:** **xrtype** – combination of Cross-Reference type flags and a cref_t of dref_t value ### ida_xref.add_cref(frm: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), to: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), type: cref_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Create a code cross-reference. * **Parameters:** * **to** – linear address of referenced instruction * **type** – cross-reference type * **Returns:** success ### ida_xref.del_cref(frm: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), to: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), expand: [bool](https://docs.python.org/3/library/functions.html#bool)) → [bool](https://docs.python.org/3/library/functions.html#bool) Delete a code cross-reference. * **Parameters:** * **to** – linear address of referenced instruction * **expand** – policy to delete the referenced instruction * 1: plan to delete the referenced instruction if it has no more references. * 0: don’t delete the referenced instruction even if no more cross-references point to it * **Returns:** true: if the referenced instruction will be deleted ### ida_xref.add_dref(frm: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), to: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), type: dref_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Create a data cross-reference. * **Parameters:** * **to** – linear address of referenced data * **type** – cross-reference type * **Returns:** success (may fail if user-defined xref exists from->to) ### ida_xref.del_dref(frm: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), to: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) Delete a data cross-reference. * **Parameters:** **to** – linear address of referenced data ### *class* ida_xref.xrefblk_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### frm *: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)* #### to *: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)* the referenced address - filled by first_from(), next_from() #### iscode *: [bool](https://docs.python.org/3/library/functions.html#bool)* is code reference (cref_t)? otherwise it is a data reference (dref_t) #### type *: uchar* type of the last returned reference (cref_t & dref_t) #### user *: [bool](https://docs.python.org/3/library/functions.html#bool)* is user defined xref? otherwise defined by ida #### first_from(\_from: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), flags: [int](https://docs.python.org/3/library/functions.html#int) = 0) → [bool](https://docs.python.org/3/library/functions.html#bool) #### first_to(\_to: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), flags: [int](https://docs.python.org/3/library/functions.html#int) = 0) → [bool](https://docs.python.org/3/library/functions.html#bool) #### next_from(\*args) → [bool](https://docs.python.org/3/library/functions.html#bool) #### next_to(\*args) → [bool](https://docs.python.org/3/library/functions.html#bool) #### crefs_to(ea) Provide an iterator on code references to ea including flow references #### fcrefs_to(ea) Provide an iterator on code references to ea #### crefs_from(ea) Provide an iterator on code references from ea including flow references #### fcrefs_from(ea) Provide an iterator on code references from ea #### drefs_to(ea) Provide an iterator on data references to ea #### drefs_from(ea) Provide an iterator on data references from ea #### refs_from(ea, flag) Provide an iterator on from reference represented by flag #### refs_to(ea, flag) Provide an iterator on to reference represented by flag ### ida_xref.XREF_FLOW return all references, including ordinary flow xrefs ### ida_xref.XREF_NOFLOW skip ordinary flow xrefs (code xrefs to the next insn) ### ida_xref.XREF_DATA return only data references ( ``` dr_ ``` …) ### ida_xref.XREF_CODE return only code references ( ``` fl_ ``` …) ### ida_xref.XREF_EA return only program addresses ### ida_xref.XREF_TID return only type ids. XREF_EA and XREF_TID are exclusive, only one of them can be specified ### ida_xref.get_first_dref_from(frm: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) Get first data referenced from the specified address. * **Returns:** linear address of first (lowest) data referenced from the specified address. Return BADADDR if the specified instruction/data doesn’t reference to anything. ### ida_xref.get_next_dref_from(frm: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), current: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) Get next data referenced from the specified address. * **Parameters:** **current** – linear address of current referenced data. This value is returned by get_first_dref_from() or previous call to get_next_dref_from() functions. * **Returns:** linear address of next data or BADADDR. ### ida_xref.get_first_dref_to(to: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) Get address of instruction/data referencing to the specified data. * **Parameters:** **to** – linear address of referencing instruction or data * **Returns:** BADADDR if nobody refers to the specified data. ### ida_xref.get_next_dref_to(to: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), current: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) Get address of instruction/data referencing to the specified data * **Parameters:** * **to** – linear address of referencing instruction or data * **current** – current linear address. This value is returned by get_first_dref_to() or previous call to get_next_dref_to() functions. * **Returns:** BADADDR if nobody refers to the specified data. ### ida_xref.get_first_cref_from(frm: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) Get first instruction referenced from the specified instruction. If the specified instruction passes execution to the next instruction then the next instruction is returned. Otherwise the lowest referenced address is returned (remember that xrefs are kept sorted!). * **Returns:** first referenced address. If the specified instruction doesn’t reference to other instructions then returns BADADDR. ### ida_xref.get_next_cref_from(frm: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), current: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) Get next instruction referenced from the specified instruction. * **Parameters:** **current** – linear address of current referenced instruction This value is returned by get_first_cref_from() or previous call to get_next_cref_from() functions. * **Returns:** next referenced address or BADADDR. ### ida_xref.get_first_cref_to(to: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) Get first instruction referencing to the specified instruction. If the specified instruction may be executed immediately after its previous instruction then the previous instruction is returned. Otherwise the lowest referencing address is returned. (remember that xrefs are kept sorted!). * **Parameters:** **to** – linear address of referenced instruction * **Returns:** linear address of the first referencing instruction or BADADDR. ### ida_xref.get_next_cref_to(to: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), current: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) Get next instruction referencing to the specified instruction. * **Parameters:** * **to** – linear address of referenced instruction * **current** – linear address of current referenced instruction This value is returned by get_first_cref_to() or previous call to get_next_cref_to() functions. * **Returns:** linear address of the next referencing instruction or BADADDR. ### ida_xref.get_first_fcref_from(frm: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) ### ida_xref.get_next_fcref_from(frm: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), current: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) ### ida_xref.get_first_fcref_to(to: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) ### ida_xref.get_next_fcref_to(to: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), current: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) ### ida_xref.has_external_refs_ea(func_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Does ‘ea’ have references from outside of the function at ‘func_ea’? ### ida_xref.has_external_refs(pfn: func_t \*, ea: ida_idaapi.ea_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Does ‘ea’ have references from outside of the function at ‘func_ea’? ### ida_xref.has_jump_or_flow_xref(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Are there jump or flow references to EA? ### ida_xref.delete_switch_table(jump_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), si: [switch_info_t](../ida_nalt/index.md#ida_nalt.switch_info_t)) → [None](https://docs.python.org/3/library/constants.html#None) ### ida_xref.XREF_ALL ### ida_xref.XREF_FAR ### *class* ida_xref.casevec_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### push_back(\*args) → qvector< long long > & #### pop_back() → [None](https://docs.python.org/3/library/constants.html#None) #### size() → [int](https://docs.python.org/3/library/functions.html#int) #### empty() → [bool](https://docs.python.org/3/library/functions.html#bool) #### at(\_idx: [int](https://docs.python.org/3/library/functions.html#int)) → qvector< long long > const & #### qclear() → [None](https://docs.python.org/3/library/constants.html#None) #### clear() → [None](https://docs.python.org/3/library/constants.html#None) #### resize(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### grow(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### capacity() → [int](https://docs.python.org/3/library/functions.html#int) #### reserve(cnt: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### truncate() → [None](https://docs.python.org/3/library/constants.html#None) #### swap(r: [casevec_t](#ida_xref.casevec_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extract() → qvector< long long > \* #### inject(s: qvector< long long > \*, len: int) → [None](https://docs.python.org/3/library/constants.html#None) #### begin(\*args) → qvector< qvector< long long > >::const_iterator #### end(\*args) → qvector< qvector< long long > >::const_iterator #### insert(it: qvector< qvector< long long > >::iterator, x: qvector< long long > const &) → qvector< qvector< long long > >::iterator #### erase(\*args) → qvector< qvector< long long > >::iterator #### find(\*args) → qvector< qvector< long long > >::const_iterator #### has(x: qvector< long long > const &) → [bool](https://docs.python.org/3/library/functions.html#bool) #### add_unique(x: qvector< long long > const &) → [bool](https://docs.python.org/3/library/functions.html#bool) #### append(x: qvector< long long > const &) → [None](https://docs.python.org/3/library/constants.html#None) #### extend(x: [casevec_t](#ida_xref.casevec_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### front #### back ### ida_xref.XREF_ALL ### ida_xref.XREF_FAR ### ida_xref.has_external_refs # index.html.md # ida_hexrays There are 2 representations of the binary code in the decompiler: Hex-Rays Decompiler project Copyright (c) 1990-2025 Hex-Rays ALL RIGHTS RESERVED. * microcode: processor instructions are translated into it and then the decompiler optimizes and transforms it * ctree: ctree is built from the optimized microcode and represents AST-like tree with C statements and expressions. It can be printed as C code. Microcode is represented by the following classes: \* mba_t keeps general info about the decompiled code and array of basic blocks. usually mba_t is named ‘mba’ \* mblock_t a basic block. includes list of instructions \* minsn_t an instruction. contains 3 operands: left, right, and destination \* mop_t an operand. depending on its type may hold various info like a number, register, stack variable, etc. \* mlist_t list of memory or register locations; can hold vast areas of memory and multiple registers. this class is used very extensively in the decompiler. it may represent list of locations accessed by an instruction or even an entire basic block. it is also used as argument of many functions. for example, there is a function that searches for an instruction that refers to a mlist_t. See [[https://hex-rays.com/blog/microcode-in-pictures](https://hex-rays.com/blog/microcode-in-pictures](https://hex-rays.com/blog/microcode-in-pictures](https://hex-rays.com/blog/microcode-in-pictures)) for a few pictures. Ctree is represented by: \* cfunc_t keeps general info about the decompiled code, including a pointer to mba_t. deleting cfunc_t will delete mba_t too (however, decompiler returns cfuncptr_t, which is a reference counting object and deletes the underlying function as soon as all references to it go out of scope). cfunc_t has ‘body’, which represents the decompiled function body as cinsn_t. \* cinsn_t a C statement. can be a compound statement or any other legal C statements (like if, for, while, return, expression-statement, etc). depending on the statement type has pointers to additional info. for example, the ‘if’ statement has poiner to cif_t, which holds the ‘if’ condition, ‘then’ branch, and optionally ‘else’ branch. Please note that despite of the name cinsn_t we say “statements”, not “instructions”. For us instructions are part of microcode, not ctree. \* cexpr_t a C expression. is used as part of a C statement, when necessary. cexpr_t has ‘type’ field, which keeps the expression type. \* citem_t a base class for cinsn_t and cexpr_t, holds common info like the address, label, and opcode. \* cnumber_t a constant 64-bit number. in addition to its value also holds information how to represent it: decimal, hex, or as a symbolic constant (enum member). please note that numbers are represented by another class (mnumber_t) in microcode. See [[https://hex-rays.com/blog/hex-rays-decompiler-primer](https://hex-rays.com/blog/hex-rays-decompiler-primer](https://hex-rays.com/blog/hex-rays-decompiler-primer](https://hex-rays.com/blog/hex-rays-decompiler-primer)) for more pictures and more details. Both microcode and ctree use the following class: \* lvar_t a local variable. may represent a stack or register variable. a variable has a name, type, location, etc. the list of variables is stored in mba->vars. \* lvar_locator_t holds a variable location (vdloc_t) and its definition address. \* vdloc_t describes a variable location, like a register number, a stack offset, or, in complex cases, can be a mix of register and stack locations. very similar to argloc_t, which is used in ida. the differences between argloc_t and vdloc_t are: \* vdloc_t never uses ARGLOC_REG2 \* vdloc_t uses micro register numbers instead of processor register numbers \* the stack offsets are never negative in vdloc_t, while in argloc_t there can be negative offsets The above are the most important classes in this header file. There are many auxiliary classes, please see their definitions in the header file. See also the description of Virtual Machine used by Microcode. ## Attributes | [`MAX_SUPPORTED_STACK_SIZE`](#ida_hexrays.MAX_SUPPORTED_STACK_SIZE) | | |-----------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [`MAX_VLR_SIZE`](#ida_hexrays.MAX_VLR_SIZE) | | | [`CMP_NZ`](#ida_hexrays.CMP_NZ) | | | [`CMP_Z`](#ida_hexrays.CMP_Z) | | | [`CMP_AE`](#ida_hexrays.CMP_AE) | | | [`CMP_B`](#ida_hexrays.CMP_B) | | | [`CMP_A`](#ida_hexrays.CMP_A) | | | [`CMP_BE`](#ida_hexrays.CMP_BE) | | | [`CMP_GT`](#ida_hexrays.CMP_GT) | | | [`CMP_GE`](#ida_hexrays.CMP_GE) | | | [`CMP_LT`](#ida_hexrays.CMP_LT) | | | [`CMP_LE`](#ida_hexrays.CMP_LE) | | | [`cvar`](#ida_hexrays.cvar) | | | [`MAX_VLR_VALUE`](#ida_hexrays.MAX_VLR_VALUE) | | | [`MAX_VLR_SVALUE`](#ida_hexrays.MAX_VLR_SVALUE) | | | [`MIN_VLR_SVALUE`](#ida_hexrays.MIN_VLR_SVALUE) | | | [`MERR_OK`](#ida_hexrays.MERR_OK) | ok | | [`MERR_BLOCK`](#ida_hexrays.MERR_BLOCK) | no error, switch to new block | | [`MERR_INTERR`](#ida_hexrays.MERR_INTERR) | internal error | | [`MERR_INSN`](#ida_hexrays.MERR_INSN) | cannot convert to microcode | | [`MERR_MEM`](#ida_hexrays.MERR_MEM) | not enough memory | | [`MERR_BADBLK`](#ida_hexrays.MERR_BADBLK) | bad block found | | [`MERR_BADSP`](#ida_hexrays.MERR_BADSP) | positive sp value has been found | | [`MERR_PROLOG`](#ida_hexrays.MERR_PROLOG) | prolog analysis failed | | [`MERR_SWITCH`](#ida_hexrays.MERR_SWITCH) | wrong switch idiom | | [`MERR_EXCEPTION`](#ida_hexrays.MERR_EXCEPTION) | exception analysis failed | | [`MERR_HUGESTACK`](#ida_hexrays.MERR_HUGESTACK) | stack frame is too big | | [`MERR_LVARS`](#ida_hexrays.MERR_LVARS) | local variable allocation failed | | [`MERR_BITNESS`](#ida_hexrays.MERR_BITNESS) | 16-bit functions cannot be decompiled | | [`MERR_BADCALL`](#ida_hexrays.MERR_BADCALL) | could not determine call arguments | | [`MERR_BADFRAME`](#ida_hexrays.MERR_BADFRAME) | function frame is wrong | | [`MERR_UNKTYPE`](#ida_hexrays.MERR_UNKTYPE) | undefined type s (currently unused error code) | | [`MERR_BADIDB`](#ida_hexrays.MERR_BADIDB) | inconsistent database information | | [`MERR_SIZEOF`](#ida_hexrays.MERR_SIZEOF) | wrong basic type sizes in compiler settings | | [`MERR_REDO`](#ida_hexrays.MERR_REDO) | redecompilation has been requested | | [`MERR_CANCELED`](#ida_hexrays.MERR_CANCELED) | decompilation has been cancelled | | [`MERR_RECDEPTH`](#ida_hexrays.MERR_RECDEPTH) | max recursion depth reached during lvar allocation | | [`MERR_OVERLAP`](#ida_hexrays.MERR_OVERLAP) | variables would overlap: s | | [`MERR_PARTINIT`](#ida_hexrays.MERR_PARTINIT) | partially initialized variable s | | [`MERR_COMPLEX`](#ida_hexrays.MERR_COMPLEX) | too complex function | | [`MERR_LICENSE`](#ida_hexrays.MERR_LICENSE) | no license available | | [`MERR_ONLY32`](#ida_hexrays.MERR_ONLY32) | only 32-bit functions can be decompiled for the current database | | [`MERR_ONLY64`](#ida_hexrays.MERR_ONLY64) | only 64-bit functions can be decompiled for the current database | | [`MERR_BUSY`](#ida_hexrays.MERR_BUSY) | already decompiling a function | | [`MERR_FARPTR`](#ida_hexrays.MERR_FARPTR) | far memory model is supported only for pc | | [`MERR_EXTERN`](#ida_hexrays.MERR_EXTERN) | special segments cannot be decompiled | | [`MERR_FUNCSIZE`](#ida_hexrays.MERR_FUNCSIZE) | too big function | | [`MERR_BADRANGES`](#ida_hexrays.MERR_BADRANGES) | bad input ranges | | [`MERR_BADARCH`](#ida_hexrays.MERR_BADARCH) | current architecture is not supported | | [`MERR_DSLOT`](#ida_hexrays.MERR_DSLOT) | bad instruction in the delay slot | | [`MERR_STOP`](#ida_hexrays.MERR_STOP) | no error, stop the analysis | | [`MERR_CLOUD`](#ida_hexrays.MERR_CLOUD) | cloud: s | | [`MERR_EMULATOR`](#ida_hexrays.MERR_EMULATOR) | emulator: s | | [`MERR_MAX_ERR`](#ida_hexrays.MERR_MAX_ERR) | | | [`MERR_LOOP`](#ida_hexrays.MERR_LOOP) | internal code: redo last loop (never reported) | | [`MUST_ACCESS`](#ida_hexrays.MUST_ACCESS) | | | [`MAY_ACCESS`](#ida_hexrays.MAY_ACCESS) | | | [`MAYMUST_ACCESS_MASK`](#ida_hexrays.MAYMUST_ACCESS_MASK) | | | [`ONE_ACCESS_TYPE`](#ida_hexrays.ONE_ACCESS_TYPE) | | | [`INCLUDE_SPOILED_REGS`](#ida_hexrays.INCLUDE_SPOILED_REGS) | | | [`EXCLUDE_PASS_REGS`](#ida_hexrays.EXCLUDE_PASS_REGS) | | | [`FULL_XDSU`](#ida_hexrays.FULL_XDSU) | | | [`WITH_ASSERTS`](#ida_hexrays.WITH_ASSERTS) | | | [`EXCLUDE_VOLATILE`](#ida_hexrays.EXCLUDE_VOLATILE) | | | [`INCLUDE_UNUSED_SRC`](#ida_hexrays.INCLUDE_UNUSED_SRC) | | | [`INCLUDE_DEAD_RETREGS`](#ida_hexrays.INCLUDE_DEAD_RETREGS) | | | [`INCLUDE_RESTRICTED`](#ida_hexrays.INCLUDE_RESTRICTED) | | | [`CALL_SPOILS_ONLY_ARGS`](#ida_hexrays.CALL_SPOILS_ONLY_ARGS) | | | [`m_nop`](#ida_hexrays.m_nop) | | | [`m_stx`](#ida_hexrays.m_stx) | | | [`m_ldx`](#ida_hexrays.m_ldx) | | | [`m_ldc`](#ida_hexrays.m_ldc) | | | [`m_mov`](#ida_hexrays.m_mov) | | | [`m_neg`](#ida_hexrays.m_neg) | | | [`m_lnot`](#ida_hexrays.m_lnot) | | | [`m_bnot`](#ida_hexrays.m_bnot) | | | [`m_xds`](#ida_hexrays.m_xds) | | | [`m_xdu`](#ida_hexrays.m_xdu) | | | [`m_low`](#ida_hexrays.m_low) | | | [`m_high`](#ida_hexrays.m_high) | | | [`m_add`](#ida_hexrays.m_add) | | | [`m_sub`](#ida_hexrays.m_sub) | | | [`m_mul`](#ida_hexrays.m_mul) | | | [`m_udiv`](#ida_hexrays.m_udiv) | | | [`m_sdiv`](#ida_hexrays.m_sdiv) | | | [`m_umod`](#ida_hexrays.m_umod) | | | [`m_smod`](#ida_hexrays.m_smod) | | | [`m_or`](#ida_hexrays.m_or) | | | [`m_and`](#ida_hexrays.m_and) | | | [`m_xor`](#ida_hexrays.m_xor) | | | [`m_shl`](#ida_hexrays.m_shl) | | | [`m_shr`](#ida_hexrays.m_shr) | | | [`m_sar`](#ida_hexrays.m_sar) | | | [`m_cfadd`](#ida_hexrays.m_cfadd) | | | [`m_ofadd`](#ida_hexrays.m_ofadd) | | | [`m_cfshl`](#ida_hexrays.m_cfshl) | | | [`m_cfshr`](#ida_hexrays.m_cfshr) | | | [`m_sets`](#ida_hexrays.m_sets) | | | [`m_seto`](#ida_hexrays.m_seto) | | | [`m_setp`](#ida_hexrays.m_setp) | | | [`m_setnz`](#ida_hexrays.m_setnz) | | | [`m_setz`](#ida_hexrays.m_setz) | | | [`m_setae`](#ida_hexrays.m_setae) | | | [`m_setb`](#ida_hexrays.m_setb) | | | [`m_seta`](#ida_hexrays.m_seta) | | | [`m_setbe`](#ida_hexrays.m_setbe) | | | [`m_setg`](#ida_hexrays.m_setg) | | | [`m_setge`](#ida_hexrays.m_setge) | | | [`m_setl`](#ida_hexrays.m_setl) | | | [`m_setle`](#ida_hexrays.m_setle) | | | [`m_jcnd`](#ida_hexrays.m_jcnd) | | | [`m_jnz`](#ida_hexrays.m_jnz) | | | [`m_jz`](#ida_hexrays.m_jz) | | | [`m_jae`](#ida_hexrays.m_jae) | | | [`m_jb`](#ida_hexrays.m_jb) | | | [`m_ja`](#ida_hexrays.m_ja) | | | [`m_jbe`](#ida_hexrays.m_jbe) | | | [`m_jg`](#ida_hexrays.m_jg) | | | [`m_jge`](#ida_hexrays.m_jge) | | | [`m_jl`](#ida_hexrays.m_jl) | | | [`m_jle`](#ida_hexrays.m_jle) | | | [`m_jtbl`](#ida_hexrays.m_jtbl) | | | [`m_ijmp`](#ida_hexrays.m_ijmp) | | | [`m_goto`](#ida_hexrays.m_goto) | | | [`m_call`](#ida_hexrays.m_call) | | | [`m_icall`](#ida_hexrays.m_icall) | | | [`m_ret`](#ida_hexrays.m_ret) | | | [`m_push`](#ida_hexrays.m_push) | | | [`m_pop`](#ida_hexrays.m_pop) | | | [`m_und`](#ida_hexrays.m_und) | | | [`m_ext`](#ida_hexrays.m_ext) | | | [`m_f2i`](#ida_hexrays.m_f2i) | | | [`m_f2u`](#ida_hexrays.m_f2u) | | | [`m_i2f`](#ida_hexrays.m_i2f) | | | [`m_u2f`](#ida_hexrays.m_u2f) | | | [`m_f2f`](#ida_hexrays.m_f2f) | | | [`m_fneg`](#ida_hexrays.m_fneg) | | | [`m_fadd`](#ida_hexrays.m_fadd) | | | [`m_fsub`](#ida_hexrays.m_fsub) | | | [`m_fmul`](#ida_hexrays.m_fmul) | | | [`m_fdiv`](#ida_hexrays.m_fdiv) | | | [`mr_none`](#ida_hexrays.mr_none) | | | [`mr_cf`](#ida_hexrays.mr_cf) | | | [`mr_zf`](#ida_hexrays.mr_zf) | | | [`mr_sf`](#ida_hexrays.mr_sf) | | | [`mr_of`](#ida_hexrays.mr_of) | | | [`mr_pf`](#ida_hexrays.mr_pf) | | | [`cc_count`](#ida_hexrays.cc_count) | | | [`mr_cc`](#ida_hexrays.mr_cc) | | | [`mr_first`](#ida_hexrays.mr_first) | | | [`NF_FIXED`](#ida_hexrays.NF_FIXED) | number format has been defined by the user | | [`NF_NEGDONE`](#ida_hexrays.NF_NEGDONE) | temporary internal bit: negation has been performed | | [`NF_BINVDONE`](#ida_hexrays.NF_BINVDONE) | temporary internal bit: inverting bits is done | | [`NF_NEGATE`](#ida_hexrays.NF_NEGATE) | The user asked to negate the constant. | | [`NF_BITNOT`](#ida_hexrays.NF_BITNOT) | The user asked to invert bits of the constant. | | [`NF_VALID`](#ida_hexrays.NF_VALID) | internal bit: stroff or enum is valid for enums: this bit is set immediately for stroffs: this bit is set at the end of decompilation | | [`GUESSED_NONE`](#ida_hexrays.GUESSED_NONE) | | | [`GUESSED_WEAK`](#ida_hexrays.GUESSED_WEAK) | | | [`GUESSED_FUNC`](#ida_hexrays.GUESSED_FUNC) | | | [`GUESSED_DATA`](#ida_hexrays.GUESSED_DATA) | | | [`TS_NOELL`](#ida_hexrays.TS_NOELL) | | | [`TS_SHRINK`](#ida_hexrays.TS_SHRINK) | | | [`TS_DONTREF`](#ida_hexrays.TS_DONTREF) | | | [`TS_MASK`](#ida_hexrays.TS_MASK) | | | [`SVW_INT`](#ida_hexrays.SVW_INT) | | | [`SVW_FLOAT`](#ida_hexrays.SVW_FLOAT) | | | [`SVW_SOFT`](#ida_hexrays.SVW_SOFT) | | | [`LVINF_KEEP`](#ida_hexrays.LVINF_KEEP) | preserve saved user settings regardless of vars for example, if a var loses all its user-defined attributes or even gets destroyed, keep its lvar_saved_info_t. this is used for ephemeral variables that get destroyed by macro recognition. | | [`LVINF_SPLIT`](#ida_hexrays.LVINF_SPLIT) | split allocation of a new variable. forces the decompiler to create a new variable at ll.defea | | [`LVINF_NOPTR`](#ida_hexrays.LVINF_NOPTR) | variable type should not be a pointer | | [`LVINF_NOMAP`](#ida_hexrays.LVINF_NOMAP) | forbid automatic mapping of the variable | | [`LVINF_UNUSED`](#ida_hexrays.LVINF_UNUSED) | unused argument, corresponds to CVAR_UNUSED | | [`LVINF_NOPROP`](#ida_hexrays.LVINF_NOPROP) | don't propagate assignments to this lvar (CVAR_NOPROP) | | [`ULV_PRECISE_DEFEA`](#ida_hexrays.ULV_PRECISE_DEFEA) | Use precise defea's for lvar locations. | | [`MLI_NAME`](#ida_hexrays.MLI_NAME) | apply lvar name | | [`MLI_TYPE`](#ida_hexrays.MLI_TYPE) | apply lvar type | | [`MLI_CMT`](#ida_hexrays.MLI_CMT) | apply lvar comment | | [`MLI_SET_FLAGS`](#ida_hexrays.MLI_SET_FLAGS) | set

```
LVINF_
```

... bits | | [`MLI_CLR_FLAGS`](#ida_hexrays.MLI_CLR_FLAGS) | clear

```
LVINF_
```

... bits | | [`bitset_width`](#ida_hexrays.bitset_width) | | | [`bitset_align`](#ida_hexrays.bitset_align) | | | [`bitset_shift`](#ida_hexrays.bitset_shift) | | | [`mop_z`](#ida_hexrays.mop_z) | none | | [`mop_r`](#ida_hexrays.mop_r) | register (they exist until MMAT_LVARS) | | [`mop_n`](#ida_hexrays.mop_n) | immediate number constant | | [`mop_str`](#ida_hexrays.mop_str) | immediate string constant (user representation) | | [`mop_d`](#ida_hexrays.mop_d) | result of another instruction | | [`mop_S`](#ida_hexrays.mop_S) | local stack variable (they exist until MMAT_LVARS) | | [`mop_v`](#ida_hexrays.mop_v) | global variable | | [`mop_b`](#ida_hexrays.mop_b) | micro basic block (mblock_t) | | [`mop_f`](#ida_hexrays.mop_f) | list of arguments | | [`mop_l`](#ida_hexrays.mop_l) | local variable | | [`mop_a`](#ida_hexrays.mop_a) | mop_addr_t: address of operand (mop_l, mop_v, mop_S, mop_r) | | [`mop_h`](#ida_hexrays.mop_h) | helper function | | [`mop_c`](#ida_hexrays.mop_c) | mcases | | [`mop_fn`](#ida_hexrays.mop_fn) | floating point constant | | [`mop_p`](#ida_hexrays.mop_p) | operand pair | | [`mop_sc`](#ida_hexrays.mop_sc) | scattered | | [`NOSIZE`](#ida_hexrays.NOSIZE) | wrong or unexisting operand size | | [`SHINS_NUMADDR`](#ida_hexrays.SHINS_NUMADDR) | display definition addresses for numbers | | [`SHINS_VALNUM`](#ida_hexrays.SHINS_VALNUM) | display value numbers | | [`SHINS_SHORT`](#ida_hexrays.SHINS_SHORT) | do not display use-def chains and other attrs | | [`SHINS_LDXEA`](#ida_hexrays.SHINS_LDXEA) | display address of ldx expressions (not used) | | [`SHINS_NOEA`](#ida_hexrays.SHINS_NOEA) | do not display the ea | | [`NO_SIDEFF`](#ida_hexrays.NO_SIDEFF) | change operand size but ignore side effects if you decide to keep the changed operand, handle_new_size() must be called | | [`WITH_SIDEFF`](#ida_hexrays.WITH_SIDEFF) | change operand size and handle side effects | | [`ONLY_SIDEFF`](#ida_hexrays.ONLY_SIDEFF) | only handle side effects | | [`ANY_REGSIZE`](#ida_hexrays.ANY_REGSIZE) | any register size is permitted | | [`ANY_FPSIZE`](#ida_hexrays.ANY_FPSIZE) | any size of floating operand is permitted | | [`OPROP_IMPDONE`](#ida_hexrays.OPROP_IMPDONE) | imported operand (a pointer) has been dereferenced | | [`OPROP_UDT`](#ida_hexrays.OPROP_UDT) | a struct or union | | [`OPROP_FLOAT`](#ida_hexrays.OPROP_FLOAT) | possibly floating value | | [`OPROP_CCFLAGS`](#ida_hexrays.OPROP_CCFLAGS) | mop_n: a pc-relative value mop_a: an address obtained from a relocation else: value of a condition code register (like mr_cc) | | [`OPROP_UDEFVAL`](#ida_hexrays.OPROP_UDEFVAL) | uses undefined value | | [`OPROP_LOWADDR`](#ida_hexrays.OPROP_LOWADDR) | a low address offset | | [`OPROP_ABI`](#ida_hexrays.OPROP_ABI) | is used to organize arg/retval of a call such operands should be combined more carefully than others at least on BE platforms | | [`ROLE_UNK`](#ida_hexrays.ROLE_UNK) | unknown function role | | [`ROLE_EMPTY`](#ida_hexrays.ROLE_EMPTY) | empty, does not do anything (maybe spoils regs) | | [`ROLE_MEMSET`](#ida_hexrays.ROLE_MEMSET) | memset(void

```
*
```

dst, uchar value, size_t count); | | [`ROLE_MEMSET32`](#ida_hexrays.ROLE_MEMSET32) | memset32(void

```
*
```

dst, uint32 value, size_t count); | | [`ROLE_MEMSET64`](#ida_hexrays.ROLE_MEMSET64) | memset64(void

```
*
```

dst, uint64 value, size_t count); | | [`ROLE_MEMCPY`](#ida_hexrays.ROLE_MEMCPY) | memcpy(void

```
*
```

dst, const void

```
*
```

src, size_t count); | | [`ROLE_STRCPY`](#ida_hexrays.ROLE_STRCPY) | strcpy(char

```
*
```

dst, const char

```
*
```

src); | | [`ROLE_STRLEN`](#ida_hexrays.ROLE_STRLEN) | strlen(const char

```
*
```

src); | | [`ROLE_STRCAT`](#ida_hexrays.ROLE_STRCAT) | strcat(char

```
*
```

dst, const char

```
*
```

src); | | [`ROLE_TAIL`](#ida_hexrays.ROLE_TAIL) | char

```
*
```

tail(const char

```
*
```

str); | | [`ROLE_BUG`](#ida_hexrays.ROLE_BUG) | BUG() helper macro: never returns, causes exception. | | [`ROLE_ALLOCA`](#ida_hexrays.ROLE_ALLOCA) | alloca() function | | [`ROLE_BSWAP`](#ida_hexrays.ROLE_BSWAP) | bswap() function (any size) | | [`ROLE_PRESENT`](#ida_hexrays.ROLE_PRESENT) | present() function (used in patterns) | | [`ROLE_CONTAINING_RECORD`](#ida_hexrays.ROLE_CONTAINING_RECORD) | CONTAINING_RECORD() macro. | | [`ROLE_FASTFAIL`](#ida_hexrays.ROLE_FASTFAIL) | \_\_fastfail() | | [`ROLE_READFLAGS`](#ida_hexrays.ROLE_READFLAGS) | \_\_readeflags, \_\_readcallersflags | | [`ROLE_IS_MUL_OK`](#ida_hexrays.ROLE_IS_MUL_OK) | is_mul_ok | | [`ROLE_SATURATED_MUL`](#ida_hexrays.ROLE_SATURATED_MUL) | saturated_mul | | [`ROLE_BITTEST`](#ida_hexrays.ROLE_BITTEST) | [lock] bt | | [`ROLE_BITTESTANDSET`](#ida_hexrays.ROLE_BITTESTANDSET) | [lock] bts | | [`ROLE_BITTESTANDRESET`](#ida_hexrays.ROLE_BITTESTANDRESET) | [lock] btr | | [`ROLE_BITTESTANDCOMPLEMENT`](#ida_hexrays.ROLE_BITTESTANDCOMPLEMENT) | [lock] btc | | [`ROLE_VA_ARG`](#ida_hexrays.ROLE_VA_ARG) | va_arg() macro | | [`ROLE_VA_COPY`](#ida_hexrays.ROLE_VA_COPY) | va_copy() function | | [`ROLE_VA_START`](#ida_hexrays.ROLE_VA_START) | va_start() function | | [`ROLE_VA_END`](#ida_hexrays.ROLE_VA_END) | va_end() function | | [`ROLE_ROL`](#ida_hexrays.ROLE_ROL) | rotate left | | [`ROLE_ROR`](#ida_hexrays.ROLE_ROR) | rotate right | | [`ROLE_CFSUB3`](#ida_hexrays.ROLE_CFSUB3) | carry flag after subtract with carry | | [`ROLE_OFSUB3`](#ida_hexrays.ROLE_OFSUB3) | overflow flag after subtract with carry | | [`ROLE_ABS`](#ida_hexrays.ROLE_ABS) | integer absolute value | | [`ROLE_3WAYCMP0`](#ida_hexrays.ROLE_3WAYCMP0) | 3-way compare helper, returns -1/0/1 | | [`ROLE_3WAYCMP1`](#ida_hexrays.ROLE_3WAYCMP1) | 3-way compare helper, returns 0/1/2 | | [`ROLE_WMEMCPY`](#ida_hexrays.ROLE_WMEMCPY) | wchar_t

```
*
```

wmemcpy(wchar_t

```
*
```

dst, const wchar_t

```
*
```

src, size_t n) | | [`ROLE_WMEMSET`](#ida_hexrays.ROLE_WMEMSET) | wchar_t

```
*
```

wmemset(wchar_t

```
*
```

dst, wchar_t wc, size_t n) | | [`ROLE_WCSCPY`](#ida_hexrays.ROLE_WCSCPY) | wchar_t

```
*
```

wcscpy(wchar_t

```
*
```

dst, const wchar_t

```
*
```

src); | | [`ROLE_WCSLEN`](#ida_hexrays.ROLE_WCSLEN) | size_t wcslen(const wchar_t

```
*
```

s) | | [`ROLE_WCSCAT`](#ida_hexrays.ROLE_WCSCAT) | wchar_t

```
*
```

wcscat(wchar_t

```
*
```

dst, const wchar_t

```
*
```

src) | | [`ROLE_SSE_CMP4`](#ida_hexrays.ROLE_SSE_CMP4) | e.g. \_mm_cmpgt_ss | | [`ROLE_SSE_CMP8`](#ida_hexrays.ROLE_SSE_CMP8) | e.g. \_mm_cmpgt_sd | | [`ROLE_EH_TRY`](#ida_hexrays.ROLE_EH_TRY) | \_\_eh_try() try block start | | [`ROLE_EH_WIND`](#ida_hexrays.ROLE_EH_WIND) | \_\_eh_wind() wind state (C++ destructors) | | [`ROLE_EH_CATCH`](#ida_hexrays.ROLE_EH_CATCH) | \_\_eh_catch() catch block start | | [`ROLE_EH_CATCH_TYPE`](#ida_hexrays.ROLE_EH_CATCH_TYPE) | \_\_eh_catch_type() typed catch clause | | [`ROLE_EH_CATCH_ELLIPSIS`](#ida_hexrays.ROLE_EH_CATCH_ELLIPSIS) | \_\_eh_catch_ellipsis() catch-all | | [`ROLE_EH_UNWIND`](#ida_hexrays.ROLE_EH_UNWIND) | \_\_eh_unwind() destructor handler | | [`ROLE_EH_THROW`](#ida_hexrays.ROLE_EH_THROW) | \_\_eh_throw() throw statement | | [`ROLE_EH_TRY_CONTINUATION`](#ida_hexrays.ROLE_EH_TRY_CONTINUATION) | \_\_eh_try_continuation() internal | | [`ROLE_EH_SCOPE_STRUT`](#ida_hexrays.ROLE_EH_SCOPE_STRUT) | \_\_eh_scope_strut() internal | | [`ROLE_EH_DEAD_END_TRY`](#ida_hexrays.ROLE_EH_DEAD_END_TRY) | \_\_eh_dead_end_try() internal | | [`ROLE_EH_DEAD_END_WIND`](#ida_hexrays.ROLE_EH_DEAD_END_WIND) | \_\_eh_dead_end_wind() internal | | [`ROLE_EH_PROPAGATE`](#ida_hexrays.ROLE_EH_PROPAGATE) | \_\_eh_propagate_exception_into_caller() | | [`ROLE_EH_CONTINUE_UNWINDING`](#ida_hexrays.ROLE_EH_CONTINUE_UNWINDING) | \_\_eh_continue_unwinding() | | [`ROLE_EH_ENTER_WIND_STATE`](#ida_hexrays.ROLE_EH_ENTER_WIND_STATE) | \_\_eh_enter_wind_state() internal | | [`ROLE_EH_ENTER_TRY_STATE`](#ida_hexrays.ROLE_EH_ENTER_TRY_STATE) | \_\_eh_enter_try_state() internal | | [`ROLE_EH_EXIT_WIND_STATE`](#ida_hexrays.ROLE_EH_EXIT_WIND_STATE) | \_\_eh_exit_wind_state() internal | | [`ROLE_EH_EXIT_TRY_STATE`](#ida_hexrays.ROLE_EH_EXIT_TRY_STATE) | \_\_eh_exit_try_state() internal | | [`ROLE_EH_NO_UNWIND_HANDLER`](#ida_hexrays.ROLE_EH_NO_UNWIND_HANDLER) | \_\_eh_no_unwind_handler() internal | | [`ROLE_EH_CAUGHT_TYPE`](#ida_hexrays.ROLE_EH_CAUGHT_TYPE) | \_\_eh_caught_type() paired with catch_type | | [`ROLE_EH_CAUGHT_ELLIPSIS`](#ida_hexrays.ROLE_EH_CAUGHT_ELLIPSIS) | \_\_eh_caught_ellipsis() paired with catch_ellipsis | | [`ROLE_EH_CAUGHT`](#ida_hexrays.ROLE_EH_CAUGHT) | \_\_eh_caught() internal | | [`ROLE_EH_RETHROW`](#ida_hexrays.ROLE_EH_RETHROW) | \_\_eh_rethrow_uncaught_exception() internal | | [`ROLE_EH_UNWIND_ABSENT`](#ida_hexrays.ROLE_EH_UNWIND_ABSENT) | \_\_eh_unwind_handler_absent() internal | | [`ROLE_EH_CATCH_ABSENT`](#ida_hexrays.ROLE_EH_CATCH_ABSENT) | \_\_eh_catch_handler_absent() internal | | [`ROLE_NEW_OBJ`](#ida_hexrays.ROLE_NEW_OBJ) | allocate new object instance | | [`ROLE_NEW_ARRAY`](#ida_hexrays.ROLE_NEW_ARRAY) | allocate new array | | [`ROLE_FILL_ARRAY`](#ida_hexrays.ROLE_FILL_ARRAY) | allocate and fill new array | | [`ROLE_ARRLEN`](#ida_hexrays.ROLE_ARRLEN) | get array length | | [`ROLE_CHKCAST`](#ida_hexrays.ROLE_CHKCAST) | check and cast object type | | [`ROLE_INSTANCEOF`](#ida_hexrays.ROLE_INSTANCEOF) | test object type (returns 0/1) | | [`ROLE_LOCK`](#ida_hexrays.ROLE_LOCK) | acquire lock (monitor enter) | | [`ROLE_UNLOCK`](#ida_hexrays.ROLE_UNLOCK) | release lock (monitor exit) | | [`ROLE_IGET`](#ida_hexrays.ROLE_IGET) | get instance field | | [`ROLE_IPUT`](#ida_hexrays.ROLE_IPUT) | set instance field | | [`ROLE_SGET`](#ida_hexrays.ROLE_SGET) | get static field | | [`ROLE_SPUT`](#ida_hexrays.ROLE_SPUT) | set static field | | [`ROLE_AGET`](#ida_hexrays.ROLE_AGET) | get array element | | [`ROLE_APUT`](#ida_hexrays.ROLE_APUT) | set array element | | [`ROLE_FMOD`](#ida_hexrays.ROLE_FMOD) | floating-point remainder (fmod) | | [`ROLE_INVOKE_VIRTUAL`](#ida_hexrays.ROLE_INVOKE_VIRTUAL) | instance method call (obj.method) | | [`ROLE_INVOKE_SUPER`](#ida_hexrays.ROLE_INVOKE_SUPER) | parent class method call (super.method) | | [`ROLE_INVOKE_INIT`](#ida_hexrays.ROLE_INVOKE_INIT) | constructor call on new object (merged with new) | | [`ROLE_INVOKE_INIT_SUPER`](#ida_hexrays.ROLE_INVOKE_INIT_SUPER) | constructor chain to parent (super(args)) | | [`ROLE_INVOKE_INIT_THIS`](#ida_hexrays.ROLE_INVOKE_INIT_THIS) | constructor chain to self (this(args)) | | [`ROLE_CATCH_EXCEPTION`](#ida_hexrays.ROLE_CATCH_EXCEPTION) | get caught exception object (Dalvik MOVE_EXCEPTION) | | [`ROLE_CONST_CLASS`](#ida_hexrays.ROLE_CONST_CLASS) | get class reference (Dalvik CONST_CLASS) | | [`ROLE_FILL_ARRAY_DATA`](#ida_hexrays.ROLE_FILL_ARRAY_DATA) | fill existing array with constant data (Dalvik FILL_ARRAY_DATA, no allocation) | | [`FUNC_NAME_MEMCPY`](#ida_hexrays.FUNC_NAME_MEMCPY) | | | [`FUNC_NAME_WMEMCPY`](#ida_hexrays.FUNC_NAME_WMEMCPY) | | | [`FUNC_NAME_MEMSET`](#ida_hexrays.FUNC_NAME_MEMSET) | | | [`FUNC_NAME_WMEMSET`](#ida_hexrays.FUNC_NAME_WMEMSET) | | | [`FUNC_NAME_MEMSET32`](#ida_hexrays.FUNC_NAME_MEMSET32) | | | [`FUNC_NAME_MEMSET64`](#ida_hexrays.FUNC_NAME_MEMSET64) | | | [`FUNC_NAME_STRCPY`](#ida_hexrays.FUNC_NAME_STRCPY) | | | [`FUNC_NAME_WCSCPY`](#ida_hexrays.FUNC_NAME_WCSCPY) | | | [`FUNC_NAME_STRLEN`](#ida_hexrays.FUNC_NAME_STRLEN) | | | [`FUNC_NAME_WCSLEN`](#ida_hexrays.FUNC_NAME_WCSLEN) | | | [`FUNC_NAME_STRCAT`](#ida_hexrays.FUNC_NAME_STRCAT) | | | [`FUNC_NAME_WCSCAT`](#ida_hexrays.FUNC_NAME_WCSCAT) | | | [`FUNC_NAME_TAIL`](#ida_hexrays.FUNC_NAME_TAIL) | | | [`FUNC_NAME_VA_ARG`](#ida_hexrays.FUNC_NAME_VA_ARG) | | | [`FUNC_NAME_EMPTY`](#ida_hexrays.FUNC_NAME_EMPTY) | | | [`FUNC_NAME_PRESENT`](#ida_hexrays.FUNC_NAME_PRESENT) | | | [`FUNC_NAME_CONTAINING_RECORD`](#ida_hexrays.FUNC_NAME_CONTAINING_RECORD) | | | [`FUNC_NAME_MORESTACK`](#ida_hexrays.FUNC_NAME_MORESTACK) | | | [`FCI_PROP`](#ida_hexrays.FCI_PROP) | call has been propagated | | [`FCI_DEAD`](#ida_hexrays.FCI_DEAD) | some return registers were determined dead | | [`FCI_FINAL`](#ida_hexrays.FCI_FINAL) | call type is final, should not be changed | | [`FCI_NORET`](#ida_hexrays.FCI_NORET) | call does not return | | [`FCI_PURE`](#ida_hexrays.FCI_PURE) | pure function | | [`FCI_NOSIDE`](#ida_hexrays.FCI_NOSIDE) | call does not have side effects | | [`FCI_SPLOK`](#ida_hexrays.FCI_SPLOK) | spoiled/visible_memory lists have been optimized. for some functions we can reduce them as soon as information about the arguments becomes available. in order not to try optimize them again we use this bit. | | [`FCI_HASCALL`](#ida_hexrays.FCI_HASCALL) | A function is an synthetic helper combined from several instructions and at least one of them was a call to a real functions | | [`FCI_HASFMT`](#ida_hexrays.FCI_HASFMT) | A variadic function with recognized printf- or scanf-style format string | | [`FCI_EXPLOCS`](#ida_hexrays.FCI_EXPLOCS) | all arglocs are specified explicitly | | [`CHF_INITED`](#ida_hexrays.CHF_INITED) | is chain initialized? (valid only after lvar allocation) | | [`CHF_REPLACED`](#ida_hexrays.CHF_REPLACED) | chain operands have been replaced? | | [`CHF_OVER`](#ida_hexrays.CHF_OVER) | overlapped chain | | [`CHF_FAKE`](#ida_hexrays.CHF_FAKE) | fake chain created by widen_chains() | | [`CHF_PASSTHRU`](#ida_hexrays.CHF_PASSTHRU) | pass-thru chain, must use the input variable to the block | | [`CHF_TERM`](#ida_hexrays.CHF_TERM) | terminating chain; the variable does not survive across the block | | [`GCA_EMPTY`](#ida_hexrays.GCA_EMPTY) | include empty chains | | [`GCA_SPEC`](#ida_hexrays.GCA_SPEC) | include chains for special registers | | [`GCA_ALLOC`](#ida_hexrays.GCA_ALLOC) | enumerate only allocated chains | | [`GCA_NALLOC`](#ida_hexrays.GCA_NALLOC) | enumerate only non-allocated chains | | [`GCA_OFIRST`](#ida_hexrays.GCA_OFIRST) | consider only chains of the first block | | [`GCA_OLAST`](#ida_hexrays.GCA_OLAST) | consider only chains of the last block | | [`IPROP_OPTIONAL`](#ida_hexrays.IPROP_OPTIONAL) | optional instruction | | [`IPROP_PERSIST`](#ida_hexrays.IPROP_PERSIST) | persistent insn; they are not destroyed | | [`IPROP_WILDMATCH`](#ida_hexrays.IPROP_WILDMATCH) | match multiple insns | | [`IPROP_CLNPOP`](#ida_hexrays.IPROP_CLNPOP) | the purpose of the instruction is to clean stack (e.g. "pop ecx" is often used for that) | | [`IPROP_FPINSN`](#ida_hexrays.IPROP_FPINSN) | floating point insn | | [`IPROP_FARCALL`](#ida_hexrays.IPROP_FARCALL) | call of a far function using push cs/call sequence | | [`IPROP_TAILCALL`](#ida_hexrays.IPROP_TAILCALL) | tail call | | [`IPROP_ASSERT`](#ida_hexrays.IPROP_ASSERT) | assertion: usually mov #val, op. assertions are used to help the optimizer. assertions are ignored when generating ctree | | [`IPROP_SPLIT`](#ida_hexrays.IPROP_SPLIT) | the instruction has been split: | | [`IPROP_SPLIT1`](#ida_hexrays.IPROP_SPLIT1) | into 1 byte | | [`IPROP_SPLIT2`](#ida_hexrays.IPROP_SPLIT2) | into 2 bytes | | [`IPROP_SPLIT4`](#ida_hexrays.IPROP_SPLIT4) | into 4 bytes | | [`IPROP_SPLIT8`](#ida_hexrays.IPROP_SPLIT8) | into 8 bytes | | [`IPROP_COMBINED`](#ida_hexrays.IPROP_COMBINED) | insn has been modified because of a partial reference | | [`IPROP_EXTSTX`](#ida_hexrays.IPROP_EXTSTX) | this is m_ext propagated into m_stx | | [`IPROP_IGNLOWSRC`](#ida_hexrays.IPROP_IGNLOWSRC) | low part of the instruction source operand has been created artificially (this bit is used only for 'and x, 80...') | | [`IPROP_INV_JX`](#ida_hexrays.IPROP_INV_JX) | inverted conditional jump | | [`IPROP_WAS_NORET`](#ida_hexrays.IPROP_WAS_NORET) | was noret icall | | [`IPROP_MULTI_MOV`](#ida_hexrays.IPROP_MULTI_MOV) | bits that can be set by plugins: | | [`IPROP_DONT_PROP`](#ida_hexrays.IPROP_DONT_PROP) | may not propagate | | [`IPROP_DONT_COMB`](#ida_hexrays.IPROP_DONT_COMB) | may not combine this instruction with others | | [`IPROP_MBARRIER`](#ida_hexrays.IPROP_MBARRIER) | this instruction acts as a memory barrier (instructions accessing memory may not be reordered past it) | | [`IPROP_UNMERGED`](#ida_hexrays.IPROP_UNMERGED) | 'goto' instruction was transformed info 'call' | | [`IPROP_UNPAIRED`](#ida_hexrays.IPROP_UNPAIRED) | instruction is a result of del_dest_pairs() transformation | | [`IPROP_WAS_FUNC`](#ida_hexrays.IPROP_WAS_FUNC) | mov-instruction was initially a memcpy call | | [`OPTI_ADDREXPRS`](#ida_hexrays.OPTI_ADDREXPRS) | optimize all address expressions (&x+N; &x-&y) | | [`OPTI_MINSTKREF`](#ida_hexrays.OPTI_MINSTKREF) | may update minstkref | | [`OPTI_COMBINSNS`](#ida_hexrays.OPTI_COMBINSNS) | may combine insns (only for optimize_insn) | | [`OPTI_NO_LDXOPT`](#ida_hexrays.OPTI_NO_LDXOPT) | the function is called after the propagation attempt, we do not optimize low/high(ldx) in this case | | [`OPTI_NO_VALRNG`](#ida_hexrays.OPTI_NO_VALRNG) | forbid using valranges | | [`EQ_IGNSIZE`](#ida_hexrays.EQ_IGNSIZE) | ignore source operand sizes | | [`EQ_IGNCODE`](#ida_hexrays.EQ_IGNCODE) | ignore instruction opcodes | | [`EQ_CMPDEST`](#ida_hexrays.EQ_CMPDEST) | compare instruction destinations | | [`EQ_OPTINSN`](#ida_hexrays.EQ_OPTINSN) | optimize mop_d operands | | [`NORET_IGNORE_WAS_NORET_ICALL`](#ida_hexrays.NORET_IGNORE_WAS_NORET_ICALL) | | | [`NORET_FORBID_ANALYSIS`](#ida_hexrays.NORET_FORBID_ANALYSIS) | | | [`BLT_NONE`](#ida_hexrays.BLT_NONE) | unknown block type | | [`BLT_STOP`](#ida_hexrays.BLT_STOP) | stops execution regularly (must be the last block) | | [`BLT_0WAY`](#ida_hexrays.BLT_0WAY) | does not have successors (tail is a noret function) | | [`BLT_1WAY`](#ida_hexrays.BLT_1WAY) | passes execution to one block (regular or goto block) | | [`BLT_2WAY`](#ida_hexrays.BLT_2WAY) | passes execution to two blocks (conditional jump) | | [`BLT_NWAY`](#ida_hexrays.BLT_NWAY) | passes execution to many blocks (switch idiom) | | [`BLT_XTRN`](#ida_hexrays.BLT_XTRN) | external block (out of function address) | | [`MBL_PRIV`](#ida_hexrays.MBL_PRIV) | private block - no instructions except the specified are accepted (used in patterns) | | [`MBL_NONFAKE`](#ida_hexrays.MBL_NONFAKE) | regular block | | [`MBL_FAKE`](#ida_hexrays.MBL_FAKE) | fake block | | [`MBL_GOTO`](#ida_hexrays.MBL_GOTO) | this block is a goto target | | [`MBL_TCAL`](#ida_hexrays.MBL_TCAL) | aritifical call block for tail calls | | [`MBL_PUSH`](#ida_hexrays.MBL_PUSH) | needs "convert push/pop instructions" | | [`MBL_DMT64`](#ida_hexrays.MBL_DMT64) | needs "demote 64bits" | | [`MBL_COMB`](#ida_hexrays.MBL_COMB) | needs "combine" pass | | [`MBL_PROP`](#ida_hexrays.MBL_PROP) | needs 'propagation' pass | | [`MBL_DEAD`](#ida_hexrays.MBL_DEAD) | needs "eliminate deads" pass | | [`MBL_LIST`](#ida_hexrays.MBL_LIST) | use/def lists are ready (not dirty) | | [`MBL_INCONST`](#ida_hexrays.MBL_INCONST) | inconsistent lists: we are building them | | [`MBL_CALL`](#ida_hexrays.MBL_CALL) | call information has been built | | [`MBL_BACKPROP`](#ida_hexrays.MBL_BACKPROP) | performed backprop_cc | | [`MBL_NORET`](#ida_hexrays.MBL_NORET) | dead end block: doesn't return execution control | | [`MBL_DSLOT`](#ida_hexrays.MBL_DSLOT) | block for delay slot | | [`MBL_VALRANGES`](#ida_hexrays.MBL_VALRANGES) | should optimize using value ranges | | [`MBL_KEEP`](#ida_hexrays.MBL_KEEP) | do not remove even if unreachable | | [`MBL_INLINED`](#ida_hexrays.MBL_INLINED) | block was inlined, not originally part of mbr | | [`MBL_EXTFRAME`](#ida_hexrays.MBL_EXTFRAME) | an inlined block with an external frame | | [`FD_BACKWARD`](#ida_hexrays.FD_BACKWARD) | search direction | | [`FD_FORWARD`](#ida_hexrays.FD_FORWARD) | search direction | | [`FD_USE`](#ida_hexrays.FD_USE) | look for use | | [`FD_DEF`](#ida_hexrays.FD_DEF) | look for definition | | [`FD_DIRTY`](#ida_hexrays.FD_DIRTY) | ignore possible implicit definitions by function calls and indirect memory access | | [`VR_AT_START`](#ida_hexrays.VR_AT_START) | get value ranges before the instruction or at the block start (if M is nullptr) | | [`VR_AT_END`](#ida_hexrays.VR_AT_END) | get value ranges after the instruction or at the block end, just after the last instruction (if M is nullptr) | | [`VR_EXACT`](#ida_hexrays.VR_EXACT) | find exact match. if not set, the returned valrng size will be >= vivl.size | | [`WARN_VARARG_REGS`](#ida_hexrays.WARN_VARARG_REGS) | 0 cannot handle register arguments in vararg function, discarded them | | [`WARN_ILL_PURGED`](#ida_hexrays.WARN_ILL_PURGED) | 1 odd caller purged bytes d, correcting | | [`WARN_ILL_FUNCTYPE`](#ida_hexrays.WARN_ILL_FUNCTYPE) | 2 invalid function type 's' has been ignored | | [`WARN_VARARG_TCAL`](#ida_hexrays.WARN_VARARG_TCAL) | 3 cannot handle tail call to vararg | | [`WARN_VARARG_NOSTK`](#ida_hexrays.WARN_VARARG_NOSTK) | 4 call vararg without local stack | | [`WARN_VARARG_MANY`](#ida_hexrays.WARN_VARARG_MANY) | 5 too many varargs, some ignored | | [`WARN_ADDR_OUTARGS`](#ida_hexrays.WARN_ADDR_OUTARGS) | 6 cannot handle address arithmetics in outgoing argument area of stack frame - unused | | [`WARN_DEP_UNK_CALLS`](#ida_hexrays.WARN_DEP_UNK_CALLS) | 7 found interdependent unknown calls | | [`WARN_ILL_ELLIPSIS`](#ida_hexrays.WARN_ILL_ELLIPSIS) | 8 erroneously detected ellipsis type has been ignored | | [`WARN_GUESSED_TYPE`](#ida_hexrays.WARN_GUESSED_TYPE) | 9 using guessed type s; | | [`WARN_EXP_LINVAR`](#ida_hexrays.WARN_EXP_LINVAR) | 10 failed to expand a linear variable | | [`WARN_WIDEN_CHAINS`](#ida_hexrays.WARN_WIDEN_CHAINS) | 11 failed to widen chains | | [`WARN_BAD_PURGED`](#ida_hexrays.WARN_BAD_PURGED) | 12 inconsistent function type and number of purged bytes | | [`WARN_CBUILD_LOOPS`](#ida_hexrays.WARN_CBUILD_LOOPS) | 13 too many cbuild loops | | [`WARN_NO_SAVE_REST`](#ida_hexrays.WARN_NO_SAVE_REST) | 14 could not find valid save-restore pair for s | | [`WARN_ODD_INPUT_REG`](#ida_hexrays.WARN_ODD_INPUT_REG) | 15 odd input register s | | [`WARN_ODD_ADDR_USE`](#ida_hexrays.WARN_ODD_ADDR_USE) | 16 odd use of a variable address | | [`WARN_MUST_RET_FP`](#ida_hexrays.WARN_MUST_RET_FP) | 17 function return type is incorrect (must be floating point) | | [`WARN_ILL_FPU_STACK`](#ida_hexrays.WARN_ILL_FPU_STACK) | 18 inconsistent fpu stack | | [`WARN_SELFREF_PROP`](#ida_hexrays.WARN_SELFREF_PROP) | 19 self-referencing variable has been detected | | [`WARN_WOULD_OVERLAP`](#ida_hexrays.WARN_WOULD_OVERLAP) | 20 variables would overlap: s | | [`WARN_ARRAY_INARG`](#ida_hexrays.WARN_ARRAY_INARG) | 21 array has been used for an input argument | | [`WARN_MAX_ARGS`](#ida_hexrays.WARN_MAX_ARGS) | 22 too many input arguments, some ignored | | [`WARN_BAD_FIELD_TYPE`](#ida_hexrays.WARN_BAD_FIELD_TYPE) | 23 incorrect structure member type for s::s, ignored | | [`WARN_WRITE_CONST`](#ida_hexrays.WARN_WRITE_CONST) | 24 write access to const memory at a has been detected | | [`WARN_BAD_RETVAR`](#ida_hexrays.WARN_BAD_RETVAR) | 25 wrong return variable | | [`WARN_FRAG_LVAR`](#ida_hexrays.WARN_FRAG_LVAR) | 26 fragmented variable at s may be wrong | | [`WARN_HUGE_STKOFF`](#ida_hexrays.WARN_HUGE_STKOFF) | 27 exceedingly huge offset into the stack frame | | [`WARN_UNINITED_REG`](#ida_hexrays.WARN_UNINITED_REG) | 28 reference to an uninitialized register has been removed: s | | [`WARN_FIXED_INSN`](#ida_hexrays.WARN_FIXED_INSN) | 29 fixed broken insn | | [`WARN_WRONG_VA_OFF`](#ida_hexrays.WARN_WRONG_VA_OFF) | 30 wrong offset of va_list variable | | [`WARN_CR_NOFIELD`](#ida_hexrays.WARN_CR_NOFIELD) | 31 CONTAINING_RECORD: no field 's' in struct 's' at d | | [`WARN_CR_BADOFF`](#ida_hexrays.WARN_CR_BADOFF) | 32 CONTAINING_RECORD: too small offset d for struct 's' | | [`WARN_BAD_STROFF`](#ida_hexrays.WARN_BAD_STROFF) | 33 user specified stroff has not been processed: s | | [`WARN_BAD_VARSIZE`](#ida_hexrays.WARN_BAD_VARSIZE) | 34 inconsistent variable size for 's' | | [`WARN_UNSUPP_REG`](#ida_hexrays.WARN_UNSUPP_REG) | 35 unsupported processor register 's' | | [`WARN_UNALIGNED_ARG`](#ida_hexrays.WARN_UNALIGNED_ARG) | 36 unaligned function argument 's' | | [`WARN_BAD_STD_TYPE`](#ida_hexrays.WARN_BAD_STD_TYPE) | 37 corrupted or unexisting local type 's' | | [`WARN_BAD_CALL_SP`](#ida_hexrays.WARN_BAD_CALL_SP) | 38 bad sp value at call | | [`WARN_MISSED_SWITCH`](#ida_hexrays.WARN_MISSED_SWITCH) | 39 wrong markup of switch jump, skipped it | | [`WARN_BAD_SP`](#ida_hexrays.WARN_BAD_SP) | 40 positive sp value a has been found | | [`WARN_BAD_STKPNT`](#ida_hexrays.WARN_BAD_STKPNT) | 41 wrong sp change point | | [`WARN_UNDEF_LVAR`](#ida_hexrays.WARN_UNDEF_LVAR) | 42 variable 's' is possibly undefined | | [`WARN_JUMPOUT`](#ida_hexrays.WARN_JUMPOUT) | 43 control flows out of bounds | | [`WARN_BAD_VALRNG`](#ida_hexrays.WARN_BAD_VALRNG) | 44 values range analysis failed | | [`WARN_BAD_SHADOW`](#ida_hexrays.WARN_BAD_SHADOW) | 45 ignored the value written to the shadow area of the succeeding call | | [`WARN_OPT_VALRNG`](#ida_hexrays.WARN_OPT_VALRNG) | 46 conditional instruction was optimized away because s | | [`WARN_RET_LOCREF`](#ida_hexrays.WARN_RET_LOCREF) | 47 returning address of temporary local variable 's' | | [`WARN_BAD_MAPDST`](#ida_hexrays.WARN_BAD_MAPDST) | 48 too short map destination 's' for variable 's' | | [`WARN_BAD_INSN`](#ida_hexrays.WARN_BAD_INSN) | 49 bad instruction | | [`WARN_ODD_ABI`](#ida_hexrays.WARN_ODD_ABI) | 50 encountered odd instruction for the current ABI | | [`WARN_UNBALANCED_STACK`](#ida_hexrays.WARN_UNBALANCED_STACK) | 51 unbalanced stack, ignored a potential tail call | | [`WARN_OPT_VALRNG2`](#ida_hexrays.WARN_OPT_VALRNG2) | 52 mask 0xX is shortened because s <= 0xX" | | [`WARN_OPT_VALRNG3`](#ida_hexrays.WARN_OPT_VALRNG3) | 53 masking with 0XX was optimized away because s <= 0xX | | [`WARN_OPT_USELESS_JCND`](#ida_hexrays.WARN_OPT_USELESS_JCND) | 54 simplified comparisons for 's': s became s | | [`WARN_SUBFRAME_OVERFLOW`](#ida_hexrays.WARN_SUBFRAME_OVERFLOW) | 55 call arguments overflow the function chunk frame | | [`WARN_OPT_VALRNG4`](#ida_hexrays.WARN_OPT_VALRNG4) | 56 the cases s were optimized away because s | | [`WARN_FRAME_ACCESS`](#ida_hexrays.WARN_FRAME_ACCESS) | 57 illegal frame access | | [`WARN_BAD_EHINFO`](#ida_hexrays.WARN_BAD_EHINFO) | 58 inconsistent exception info | | [`WARN_INCOMPAT_TYPE`](#ida_hexrays.WARN_INCOMPAT_TYPE) | 59 incompatible types for 's': expected s but encountered s | | [`WARN_DALVIK_ENUM`](#ida_hexrays.WARN_DALVIK_ENUM) | 60 could not fully analyze enum ; constant order or bodies may be incomplete | | [`WARN_MAX`](#ida_hexrays.WARN_MAX) | may be used in notes as a placeholder when the warning id is not available | | [`MMAT_ZERO`](#ida_hexrays.MMAT_ZERO) | microcode does not exist | | [`MMAT_GENERATED`](#ida_hexrays.MMAT_GENERATED) | generated microcode | | [`MMAT_PREOPTIMIZED`](#ida_hexrays.MMAT_PREOPTIMIZED) | preoptimized pass is complete | | [`MMAT_LOCOPT`](#ida_hexrays.MMAT_LOCOPT) | local optimization of each basic block is complete. control flow graph is ready too. | | [`MMAT_CALLS`](#ida_hexrays.MMAT_CALLS) | detected call arguments. see also hxe_calls_done | | [`MMAT_GLBOPT1`](#ida_hexrays.MMAT_GLBOPT1) | performed the first pass of global optimization | | [`MMAT_GLBOPT2`](#ida_hexrays.MMAT_GLBOPT2) | most global optimization passes are done | | [`MMAT_GLBOPT3`](#ida_hexrays.MMAT_GLBOPT3) | completed all global optimization. microcode is fixed now. | | [`MMAT_LVARS`](#ida_hexrays.MMAT_LVARS) | allocated local variables | | [`UMA_DEL`](#ida_hexrays.UMA_DEL) | delete the instruction | | [`UMA_INS`](#ida_hexrays.UMA_INS) | insert the instruction before the current | | [`UMA_APP`](#ida_hexrays.UMA_APP) | insert the instruction after the current | | [`UMA_MAX`](#ida_hexrays.UMA_MAX) | | | [`MMIDX_GLBLOW`](#ida_hexrays.MMIDX_GLBLOW) | global memory: low part | | [`MMIDX_LVARS`](#ida_hexrays.MMIDX_LVARS) | stack: local variables | | [`MMIDX_RETADDR`](#ida_hexrays.MMIDX_RETADDR) | stack: return address | | [`MMIDX_SHADOW`](#ida_hexrays.MMIDX_SHADOW) | stack: shadow arguments | | [`MMIDX_ARGS`](#ida_hexrays.MMIDX_ARGS) | stack: regular stack arguments | | [`MMIDX_GLBHIGH`](#ida_hexrays.MMIDX_GLBHIGH) | global memory: high part | | [`MBA_PRCDEFS`](#ida_hexrays.MBA_PRCDEFS) | use precise defeas for chain-allocated lvars | | [`MBA_NOFUNC`](#ida_hexrays.MBA_NOFUNC) | function is not present, addresses might be wrong | | [`MBA_PATTERN`](#ida_hexrays.MBA_PATTERN) | microcode pattern, callinfo is present | | [`MBA_LOADED`](#ida_hexrays.MBA_LOADED) | loaded gdl, no instructions (debugging) | | [`MBA_RETFP`](#ida_hexrays.MBA_RETFP) | function returns floating point value | | [`MBA_SPLINFO`](#ida_hexrays.MBA_SPLINFO) | (final_type ? idb_spoiled : spoiled_regs) is valid | | [`MBA_PASSREGS`](#ida_hexrays.MBA_PASSREGS) | has mcallinfo_t::pass_regs | | [`MBA_THUNK`](#ida_hexrays.MBA_THUNK) | thunk function | | [`MBA_CMNSTK`](#ida_hexrays.MBA_CMNSTK) | stkvars+stkargs should be considered as one area | | [`MBA_PREOPT`](#ida_hexrays.MBA_PREOPT) | preoptimization stage complete | | [`MBA_CMBBLK`](#ida_hexrays.MBA_CMBBLK) | request to combine blocks | | [`MBA_ASRTOK`](#ida_hexrays.MBA_ASRTOK) | assertions have been generated | | [`MBA_CALLS`](#ida_hexrays.MBA_CALLS) | callinfo has been built | | [`MBA_ASRPROP`](#ida_hexrays.MBA_ASRPROP) | assertion have been propagated | | [`MBA_SAVRST`](#ida_hexrays.MBA_SAVRST) | save-restore analysis has been performed | | [`MBA_RETREF`](#ida_hexrays.MBA_RETREF) | return type has been refined | | [`MBA_GLBOPT`](#ida_hexrays.MBA_GLBOPT) | microcode has been optimized globally | | [`MBA_LVARS0`](#ida_hexrays.MBA_LVARS0) | lvar pre-allocation has been performed | | [`MBA_LVARS1`](#ida_hexrays.MBA_LVARS1) | lvar real allocation has been performed | | [`MBA_DELPAIRS`](#ida_hexrays.MBA_DELPAIRS) | pairs have been deleted once | | [`MBA_CHVARS`](#ida_hexrays.MBA_CHVARS) | can verify chain varnums | | [`MBA_SHORT`](#ida_hexrays.MBA_SHORT) | use short display | | [`MBA_COLGDL`](#ida_hexrays.MBA_COLGDL) | display graph after each reduction | | [`MBA_INSGDL`](#ida_hexrays.MBA_INSGDL) | display instruction in graphs | | [`MBA_NICE`](#ida_hexrays.MBA_NICE) | apply transformations to c code | | [`MBA_REFINE`](#ida_hexrays.MBA_REFINE) | may refine return value size | | [`MBA_WINGR32`](#ida_hexrays.MBA_WINGR32) | use wingraph32 (deprecated, see hexrays_config_t::use_external_graph) | | [`MBA_NUMADDR`](#ida_hexrays.MBA_NUMADDR) | display definition addresses for numbers | | [`MBA_VALNUM`](#ida_hexrays.MBA_VALNUM) | display value numbers | | [`MBA_SHOWEA`](#ida_hexrays.MBA_SHOWEA) | display EA in line prefix | | [`MBA_INITIAL_FLAGS`](#ida_hexrays.MBA_INITIAL_FLAGS) | | | [`MBA2_LVARNAMES_OK`](#ida_hexrays.MBA2_LVARNAMES_OK) | may verify lvar_names? | | [`MBA2_LVARS_RENAMED`](#ida_hexrays.MBA2_LVARS_RENAMED) | accept empty names now? | | [`MBA2_OVER_CHAINS`](#ida_hexrays.MBA2_OVER_CHAINS) | has overlapped chains? | | [`MBA2_VALRNG_DONE`](#ida_hexrays.MBA2_VALRNG_DONE) | calculated valranges? | | [`MBA2_IS_CTR`](#ida_hexrays.MBA2_IS_CTR) | is constructor? | | [`MBA2_IS_DTR`](#ida_hexrays.MBA2_IS_DTR) | is destructor? | | [`MBA2_ARGIDX_OK`](#ida_hexrays.MBA2_ARGIDX_OK) | may verify input argument list? | | [`MBA2_NO_DUP_CALLS`](#ida_hexrays.MBA2_NO_DUP_CALLS) | forbid multiple calls with the same ea | | [`MBA2_NO_DUP_LVARS`](#ida_hexrays.MBA2_NO_DUP_LVARS) | forbid multiple lvars with the same ea | | [`MBA2_UNDEF_RETVAR`](#ida_hexrays.MBA2_UNDEF_RETVAR) | return value is undefined | | [`MBA2_ARGIDX_SORTED`](#ida_hexrays.MBA2_ARGIDX_SORTED) | args finally sorted according to ABI (e.g. reverse stkarg order in Borland) | | [`MBA2_CODE16_BIT`](#ida_hexrays.MBA2_CODE16_BIT) | the code16 bit got removed | | [`MBA2_STACK_RETVAL`](#ida_hexrays.MBA2_STACK_RETVAL) | the return value (or its part) is on the stack | | [`MBA2_HAS_OUTLINES`](#ida_hexrays.MBA2_HAS_OUTLINES) | calls to outlined code have been inlined | | [`MBA2_NO_FRAME`](#ida_hexrays.MBA2_NO_FRAME) | do not use function frame info (only snippet mode) | | [`MBA2_PROP_COMPLEX`](#ida_hexrays.MBA2_PROP_COMPLEX) | allow propagation of more complex variable definitions | | [`MBA2_DONT_VERIFY`](#ida_hexrays.MBA2_DONT_VERIFY) | Do not verify microcode. This flag is recomended to be set only when debugging decompiler plugins | | [`MBA2_INITIAL_FLAGS`](#ida_hexrays.MBA2_INITIAL_FLAGS) | | | [`MBA2_ALL_FLAGS`](#ida_hexrays.MBA2_ALL_FLAGS) | | | [`NALT_VD`](#ida_hexrays.NALT_VD) | this index is not used by ida | | [`LOCOPT_ALL`](#ida_hexrays.LOCOPT_ALL) | redo optimization for all blocks. if this bit is not set, only dirty blocks will be optimized | | [`LOCOPT_REFINE`](#ida_hexrays.LOCOPT_REFINE) | refine return type, ok to fail | | [`LOCOPT_REFINE2`](#ida_hexrays.LOCOPT_REFINE2) | refine return type, try harder | | [`ACFL_LOCOPT`](#ida_hexrays.ACFL_LOCOPT) | perform local propagation (requires ACFL_BLKOPT) | | [`ACFL_BLKOPT`](#ida_hexrays.ACFL_BLKOPT) | perform interblock transformations | | [`ACFL_GLBPROP`](#ida_hexrays.ACFL_GLBPROP) | perform global propagation | | [`ACFL_GLBDEL`](#ida_hexrays.ACFL_GLBDEL) | perform dead code eliminition | | [`ACFL_GUESS`](#ida_hexrays.ACFL_GUESS) | may guess calling conventions | | [`CPBLK_FAST`](#ida_hexrays.CPBLK_FAST) | do not update minbstkref and minbargref | | [`CPBLK_MINREF`](#ida_hexrays.CPBLK_MINREF) | update minbstkref and minbargref | | [`CPBLK_OPTJMP`](#ida_hexrays.CPBLK_OPTJMP) | del the jump insn at the end of the block if it becomes useless | | [`INLINE_EXTFRAME`](#ida_hexrays.INLINE_EXTFRAME) | Inlined function has its own (external) frame. | | [`INLINE_DONTCOPY`](#ida_hexrays.INLINE_DONTCOPY) | Do not reuse old inlined copy even if it exists. | | [`INLINE_NORETADDR`](#ida_hexrays.INLINE_NORETADDR) | The inlining call does not push/consume a return address (e.g. an exception funclet spliced into the CFG). Do not reserve a return slot in the external subframe. | | [`GC_REGS_AND_STKVARS`](#ida_hexrays.GC_REGS_AND_STKVARS) | registers and stkvars (restricted memory only) | | [`GC_ASR`](#ida_hexrays.GC_ASR) | all the above and assertions | | [`GC_XDSU`](#ida_hexrays.GC_XDSU) | only registers calculated with FULL_XDSU | | [`GC_END`](#ida_hexrays.GC_END) | number of chain types | | [`GC_DIRTY_ALL`](#ida_hexrays.GC_DIRTY_ALL) | bitmask to represent all chains | | [`OPF_REUSE`](#ida_hexrays.OPF_REUSE) | reuse existing window | | [`OPF_NEW_WINDOW`](#ida_hexrays.OPF_NEW_WINDOW) | open new window | | [`OPF_REUSE_ACTIVE`](#ida_hexrays.OPF_REUSE_ACTIVE) | reuse existing window, only if the currently active widget is a pseudocode view | | [`OPF_NO_WAIT`](#ida_hexrays.OPF_NO_WAIT) | do not display waitbox if decompilation happens | | [`OPF_WINDOW_MGMT_MASK`](#ida_hexrays.OPF_WINDOW_MGMT_MASK) | | | [`VDRUN_NEWFILE`](#ida_hexrays.VDRUN_NEWFILE) | Create a new file or overwrite existing file. | | [`VDRUN_APPEND`](#ida_hexrays.VDRUN_APPEND) | Create a new file or append to existing file. | | [`VDRUN_ONLYNEW`](#ida_hexrays.VDRUN_ONLYNEW) | Fail if output file already exists. | | [`VDRUN_SILENT`](#ida_hexrays.VDRUN_SILENT) | Silent decompilation. | | [`VDRUN_SENDIDB`](#ida_hexrays.VDRUN_SENDIDB) | Send problematic databases to hex-rays.com. | | [`VDRUN_MAYSTOP`](#ida_hexrays.VDRUN_MAYSTOP) | The user can cancel decompilation. | | [`VDRUN_CMDLINE`](#ida_hexrays.VDRUN_CMDLINE) | Called from ida's command line. | | [`VDRUN_STATS`](#ida_hexrays.VDRUN_STATS) | Print statistics into vd_stats.txt. | | [`VDRUN_LUMINA`](#ida_hexrays.VDRUN_LUMINA) | Use lumina server. | | [`VDRUN_PERF`](#ida_hexrays.VDRUN_PERF) | Print performance stats to ida.log. | | [`GCO_STK`](#ida_hexrays.GCO_STK) | a stack variable | | [`GCO_REG`](#ida_hexrays.GCO_REG) | is register? otherwise a stack variable | | [`GCO_USE`](#ida_hexrays.GCO_USE) | is source operand? | | [`GCO_DEF`](#ida_hexrays.GCO_DEF) | is destination operand? | | [`cot_empty`](#ida_hexrays.cot_empty) | | | [`cot_comma`](#ida_hexrays.cot_comma) | x, y | | [`cot_asg`](#ida_hexrays.cot_asg) | x = y | | [`cot_asgbor`](#ida_hexrays.cot_asgbor) | x

```
|
```

= y | | [`cot_asgxor`](#ida_hexrays.cot_asgxor) | x ^= y | | [`cot_asgband`](#ida_hexrays.cot_asgband) | x &= y | | [`cot_asgadd`](#ida_hexrays.cot_asgadd) | x += y | | [`cot_asgsub`](#ida_hexrays.cot_asgsub) | x -= y | | [`cot_asgmul`](#ida_hexrays.cot_asgmul) | x

```
*
```

= y | | [`cot_asgsshr`](#ida_hexrays.cot_asgsshr) | x >>= y signed | | [`cot_asgushr`](#ida_hexrays.cot_asgushr) | x >>= y unsigned | | [`cot_asgshl`](#ida_hexrays.cot_asgshl) | x <<= y | | [`cot_asgsdiv`](#ida_hexrays.cot_asgsdiv) | x /= y signed | | [`cot_asgudiv`](#ida_hexrays.cot_asgudiv) | x /= y unsigned | | [`cot_asgsmod`](#ida_hexrays.cot_asgsmod) | x %= y signed | | [`cot_asgumod`](#ida_hexrays.cot_asgumod) | x %= y unsigned | | [`cot_tern`](#ida_hexrays.cot_tern) | x ? y : z | | [`cot_lor`](#ida_hexrays.cot_lor) | x || y | | [`cot_land`](#ida_hexrays.cot_land) | x && y | | [`cot_bor`](#ida_hexrays.cot_bor) | x | y | | [`cot_xor`](#ida_hexrays.cot_xor) | x ^ y | | [`cot_band`](#ida_hexrays.cot_band) | x & y | | [`cot_eq`](#ida_hexrays.cot_eq) | x == y int or fpu (see EXFL_FPOP) | | [`cot_ne`](#ida_hexrays.cot_ne) | x != y int or fpu (see EXFL_FPOP) | | [`cot_sge`](#ida_hexrays.cot_sge) | x >= y signed or fpu (see EXFL_FPOP) | | [`cot_uge`](#ida_hexrays.cot_uge) | x >= y unsigned | | [`cot_sle`](#ida_hexrays.cot_sle) | x <= y signed or fpu (see EXFL_FPOP) | | [`cot_ule`](#ida_hexrays.cot_ule) | x <= y unsigned | | [`cot_sgt`](#ida_hexrays.cot_sgt) | x > y signed or fpu (see EXFL_FPOP) | | [`cot_ugt`](#ida_hexrays.cot_ugt) | x > y unsigned | | [`cot_slt`](#ida_hexrays.cot_slt) | x < y signed or fpu (see EXFL_FPOP) | | [`cot_ult`](#ida_hexrays.cot_ult) | x < y unsigned | | [`cot_sshr`](#ida_hexrays.cot_sshr) | x >> y signed | | [`cot_ushr`](#ida_hexrays.cot_ushr) | x >> y unsigned | | [`cot_shl`](#ida_hexrays.cot_shl) | x << y | | [`cot_add`](#ida_hexrays.cot_add) | x + y | | [`cot_sub`](#ida_hexrays.cot_sub) | x - y | | [`cot_mul`](#ida_hexrays.cot_mul) | x \* y | | [`cot_sdiv`](#ida_hexrays.cot_sdiv) | x / y signed | | [`cot_udiv`](#ida_hexrays.cot_udiv) | x / y unsigned | | [`cot_smod`](#ida_hexrays.cot_smod) | x % y signed | | [`cot_umod`](#ida_hexrays.cot_umod) | x % y unsigned | | [`cot_fadd`](#ida_hexrays.cot_fadd) | x + y fp | | [`cot_fsub`](#ida_hexrays.cot_fsub) | x - y fp | | [`cot_fmul`](#ida_hexrays.cot_fmul) | x \* y fp | | [`cot_fdiv`](#ida_hexrays.cot_fdiv) | x / y fp | | [`cot_fneg`](#ida_hexrays.cot_fneg) | -x fp | | [`cot_neg`](#ida_hexrays.cot_neg) | -x | | [`cot_cast`](#ida_hexrays.cot_cast) | (type)x | | [`cot_lnot`](#ida_hexrays.cot_lnot) | !x | | [`cot_bnot`](#ida_hexrays.cot_bnot) | ~x | | [`cot_ptr`](#ida_hexrays.cot_ptr) | ```
*
```

x, access size in 'ptrsize' | | [`cot_ref`](#ida_hexrays.cot_ref) | &x | | [`cot_postinc`](#ida_hexrays.cot_postinc) | x++ | | [`cot_postdec`](#ida_hexrays.cot_postdec) | x- | | [`cot_preinc`](#ida_hexrays.cot_preinc) | ++x | | [`cot_predec`](#ida_hexrays.cot_predec) | -x | | [`cot_call`](#ida_hexrays.cot_call) | x(...) | | [`cot_idx`](#ida_hexrays.cot_idx) | x[y] | | [`cot_memref`](#ida_hexrays.cot_memref) | x.m | | [`cot_memptr`](#ida_hexrays.cot_memptr) | x->m, access size in 'ptrsize' | | [`cot_num`](#ida_hexrays.cot_num) | n | | [`cot_fnum`](#ida_hexrays.cot_fnum) | fpc | | [`cot_str`](#ida_hexrays.cot_str) | string constant (user representation) | | [`cot_obj`](#ida_hexrays.cot_obj) | obj_ea | | [`cot_var`](#ida_hexrays.cot_var) | v | | [`cot_insn`](#ida_hexrays.cot_insn) | instruction in expression, internal representation only | | [`cot_sizeof`](#ida_hexrays.cot_sizeof) | sizeof(x) | | [`cot_helper`](#ida_hexrays.cot_helper) | arbitrary name | | [`cot_type`](#ida_hexrays.cot_type) | arbitrary type | | [`cot_last`](#ida_hexrays.cot_last) | | | [`cit_empty`](#ida_hexrays.cit_empty) | instruction types start here | | [`cit_block`](#ida_hexrays.cit_block) | block-statement: { ... } | | [`cit_expr`](#ida_hexrays.cit_expr) | expression-statement: expr; | | [`cit_if`](#ida_hexrays.cit_if) | if-statement | | [`cit_for`](#ida_hexrays.cit_for) | for-statement | | [`cit_while`](#ida_hexrays.cit_while) | while-statement | | [`cit_do`](#ida_hexrays.cit_do) | do-statement | | [`cit_switch`](#ida_hexrays.cit_switch) | switch-statement | | [`cit_break`](#ida_hexrays.cit_break) | break-statement | | [`cit_continue`](#ida_hexrays.cit_continue) | continue-statement | | [`cit_return`](#ida_hexrays.cit_return) | return-statement | | [`cit_goto`](#ida_hexrays.cit_goto) | goto-statement | | [`cit_asm`](#ida_hexrays.cit_asm) | asm-statement | | [`cit_try`](#ida_hexrays.cit_try) | C++ try-statement. | | [`cit_throw`](#ida_hexrays.cit_throw) | C++ throw-statement. | | [`cit_end`](#ida_hexrays.cit_end) | | | [`CMAT_ZERO`](#ida_hexrays.CMAT_ZERO) | does not exist | | [`CMAT_BUILT`](#ida_hexrays.CMAT_BUILT) | just generated | | [`CMAT_TRANS1`](#ida_hexrays.CMAT_TRANS1) | applied first wave of transformations | | [`CMAT_NICE`](#ida_hexrays.CMAT_NICE) | nicefied expressions | | [`CMAT_TRANS2`](#ida_hexrays.CMAT_TRANS2) | applied second wave of transformations | | [`CMAT_CPA`](#ida_hexrays.CMAT_CPA) | corrected pointer arithmetic | | [`CMAT_TRANS3`](#ida_hexrays.CMAT_TRANS3) | applied third wave of transformations | | [`CMAT_CASTED`](#ida_hexrays.CMAT_CASTED) | added necessary casts | | [`CMAT_FINAL`](#ida_hexrays.CMAT_FINAL) | ready-to-use | | [`ITP_EMPTY`](#ida_hexrays.ITP_EMPTY) | nothing | | [`ITP_ARG1`](#ida_hexrays.ITP_ARG1) | , (64 entries are reserved for 64 call arguments) | | [`ITP_ARG64`](#ida_hexrays.ITP_ARG64) | | | [`ITP_BRACE1`](#ida_hexrays.ITP_BRACE1) | | | [`ITP_INNER_LAST`](#ida_hexrays.ITP_INNER_LAST) | | | [`ITP_ASM`](#ida_hexrays.ITP_ASM) | \_\_asm-line | | [`ITP_ELSE`](#ida_hexrays.ITP_ELSE) | else-line | | [`ITP_DO`](#ida_hexrays.ITP_DO) | do-line | | [`ITP_SEMI`](#ida_hexrays.ITP_SEMI) | semicolon | | [`ITP_CURLY1`](#ida_hexrays.ITP_CURLY1) | | | [`ITP_CURLY2`](#ida_hexrays.ITP_CURLY2) | | | [`ITP_BRACE2`](#ida_hexrays.ITP_BRACE2) | | | [`ITP_COLON`](#ida_hexrays.ITP_COLON) | : (label) | | [`ITP_BLOCK1`](#ida_hexrays.ITP_BLOCK1) | opening block comment. this comment is printed before the item (other comments are indented and printed after the item) | | [`ITP_BLOCK2`](#ida_hexrays.ITP_BLOCK2) | closing block comment. | | [`ITP_TRY`](#ida_hexrays.ITP_TRY) | C++ try statement. | | [`ITP_CASE`](#ida_hexrays.ITP_CASE) | bit for switch cases | | [`ITP_SIGN`](#ida_hexrays.ITP_SIGN) | if this bit is set too, then we have a negative case value | | [`RETRIEVE_ONCE`](#ida_hexrays.RETRIEVE_ONCE) | Retrieve comment if it has not been used yet. | | [`RETRIEVE_ALWAYS`](#ida_hexrays.RETRIEVE_ALWAYS) | Retrieve comment even if it has been used. | | [`EXFL_CPADONE`](#ida_hexrays.EXFL_CPADONE) | pointer arithmetic correction done | | [`EXFL_LVALUE`](#ida_hexrays.EXFL_LVALUE) | expression is lvalue even if it doesn't look like it | | [`EXFL_FPOP`](#ida_hexrays.EXFL_FPOP) | floating point operation | | [`EXFL_ALONE`](#ida_hexrays.EXFL_ALONE) | standalone helper | | [`EXFL_CSTR`](#ida_hexrays.EXFL_CSTR) | string literal | | [`EXFL_PARTIAL`](#ida_hexrays.EXFL_PARTIAL) | type of the expression is considered partial | | [`EXFL_UNDEF`](#ida_hexrays.EXFL_UNDEF) | expression uses undefined value | | [`EXFL_JUMPOUT`](#ida_hexrays.EXFL_JUMPOUT) | jump out-of-function | | [`EXFL_VFTABLE`](#ida_hexrays.EXFL_VFTABLE) | is ptr to vftable (used for cot_memptr, cot_memref) | | [`EXFL_UCAST`](#ida_hexrays.EXFL_UCAST) | user-defined cast, not to be removed by CPA | | [`EXFL_ALL`](#ida_hexrays.EXFL_ALL) | all currently defined bits | | [`CALC_CURLY_BRACES`](#ida_hexrays.CALC_CURLY_BRACES) | print curly braces if necessary | | [`NO_CURLY_BRACES`](#ida_hexrays.NO_CURLY_BRACES) | don't print curly braces | | [`USE_CURLY_BRACES`](#ida_hexrays.USE_CURLY_BRACES) | print curly braces without any checks | | [`CFL_FINAL`](#ida_hexrays.CFL_FINAL) | call type is final, should not be changed | | [`CFL_HELPER`](#ida_hexrays.CFL_HELPER) | created from a decompiler helper function | | [`CFL_NORET`](#ida_hexrays.CFL_NORET) | call does not return | | [`CTRY_WIND`](#ida_hexrays.CTRY_WIND) | | | [`CTRY_SYNC`](#ida_hexrays.CTRY_SYNC) | | | [`CV_FAST`](#ida_hexrays.CV_FAST) | do not maintain parent information | | [`CV_PRUNE`](#ida_hexrays.CV_PRUNE) | this bit is set by visit...() to prune the walk | | [`CV_PARENTS`](#ida_hexrays.CV_PARENTS) | maintain parent information | | [`CV_POST`](#ida_hexrays.CV_POST) | call the leave...() functions | | [`CV_RESTART`](#ida_hexrays.CV_RESTART) | restart enumeration at the top expr (apply_to_exprs) | | [`CV_INSNS`](#ida_hexrays.CV_INSNS) | visit only statements, prune all expressions do not use before the final ctree maturity because expressions may contain statements at intermediate stages (see cot_insn). Otherwise you risk missing statements embedded into expressions. | | [`ANCHOR_INDEX`](#ida_hexrays.ANCHOR_INDEX) | | | [`ANCHOR_MASK`](#ida_hexrays.ANCHOR_MASK) | | | [`ANCHOR_CITEM`](#ida_hexrays.ANCHOR_CITEM) | c-tree item | | [`ANCHOR_LVAR`](#ida_hexrays.ANCHOR_LVAR) | declaration of local variable | | [`ANCHOR_ITP`](#ida_hexrays.ANCHOR_ITP) | item type preciser | | [`ANCHOR_BLKCMT`](#ida_hexrays.ANCHOR_BLKCMT) | block comment (for ctree items) | | [`VDI_NONE`](#ida_hexrays.VDI_NONE) | undefined | | [`VDI_EXPR`](#ida_hexrays.VDI_EXPR) | c-tree item | | [`VDI_LVAR`](#ida_hexrays.VDI_LVAR) | declaration of local variable | | [`VDI_FUNC`](#ida_hexrays.VDI_FUNC) | the function itself (the very first line with the function prototype) | | [`VDI_TAIL`](#ida_hexrays.VDI_TAIL) | cursor is at (beyond) the line end (commentable line) | | [`GLN_CURRENT`](#ida_hexrays.GLN_CURRENT) | get label of the current item | | [`GLN_GOTO_TARGET`](#ida_hexrays.GLN_GOTO_TARGET) | get goto target | | [`GLN_ALL`](#ida_hexrays.GLN_ALL) | get both | | [`FORBID_UNUSED_LABELS`](#ida_hexrays.FORBID_UNUSED_LABELS) | Unused labels cause interr. | | [`ALLOW_UNUSED_LABELS`](#ida_hexrays.ALLOW_UNUSED_LABELS) | Unused labels are permitted. | | [`CIT_COLLAPSED`](#ida_hexrays.CIT_COLLAPSED) | display ctree item in collapsed form | | [`CIT_INVERTED`](#ida_hexrays.CIT_INVERTED) | if-statement condition is inverted (then/else swapped) | | [`CIT_THEN_COLLAPSED`](#ida_hexrays.CIT_THEN_COLLAPSED) | display then-branch in collapsed form | | [`CIT_ELSE_COLLAPSED`](#ida_hexrays.CIT_ELSE_COLLAPSED) | display else-branch in collapsed form | | [`CFS_BOUNDS`](#ida_hexrays.CFS_BOUNDS) | 'eamap' and 'boundaries' are ready | | [`CFS_TEXT`](#ida_hexrays.CFS_TEXT) | 'sv' is ready (and hdrlines) | | [`CFS_LVARS_HIDDEN`](#ida_hexrays.CFS_LVARS_HIDDEN) | local variable definitions are collapsed | | [`CFS_LOCKED`](#ida_hexrays.CFS_LOCKED) | cfunc is temporarily locked | | [`DECOMP_NO_WAIT`](#ida_hexrays.DECOMP_NO_WAIT) | do not display waitbox | | [`DECOMP_NO_CACHE`](#ida_hexrays.DECOMP_NO_CACHE) | do not use decompilation cache (snippets are never cached) | | [`DECOMP_NO_FRAME`](#ida_hexrays.DECOMP_NO_FRAME) | do not use function frame info (only snippet mode) | | [`DECOMP_WARNINGS`](#ida_hexrays.DECOMP_WARNINGS) | display warnings in the output window | | [`DECOMP_ALL_BLKS`](#ida_hexrays.DECOMP_ALL_BLKS) | generate microcode for unreachable blocks | | [`DECOMP_NO_HIDE`](#ida_hexrays.DECOMP_NO_HIDE) | do not close display waitbox. see close_hexrays_waitbox() | | [`DECOMP_GXREFS_DEFLT`](#ida_hexrays.DECOMP_GXREFS_DEFLT) | the default behavior: do not update the global xrefs cache upon decompile() call, but when the pseudocode text is generated (e.g., through cfunc_t.get_pseudocode()) | | [`DECOMP_GXREFS_NOUPD`](#ida_hexrays.DECOMP_GXREFS_NOUPD) | do not update the global xrefs cache | | [`DECOMP_GXREFS_FORCE`](#ida_hexrays.DECOMP_GXREFS_FORCE) | update the global xrefs cache immediately | | [`DECOMP_VOID_MBA`](#ida_hexrays.DECOMP_VOID_MBA) | return empty mba object (to be used with gen_microcode) | | [`DECOMP_OUTLINE`](#ida_hexrays.DECOMP_OUTLINE) | generate code for an outline | | [`hxe_flowchart`](#ida_hexrays.hxe_flowchart) | Flowchart has been generated. | | [`hxe_stkpnts`](#ida_hexrays.hxe_stkpnts) | SP change points have been calculated. | | [`hxe_prolog`](#ida_hexrays.hxe_prolog) | Prolog analysis has been finished. | | [`hxe_microcode`](#ida_hexrays.hxe_microcode) | Microcode has been generated. | | [`hxe_preoptimized`](#ida_hexrays.hxe_preoptimized) | Microcode has been preoptimized. | | [`hxe_locopt`](#ida_hexrays.hxe_locopt) | Basic block level optimization has been finished. | | [`hxe_prealloc`](#ida_hexrays.hxe_prealloc) | Local variables: preallocation step begins. | | [`hxe_glbopt`](#ida_hexrays.hxe_glbopt) | Global optimization has been finished. If microcode is modified, MERR_LOOP must be returned. It will cause a complete restart of the optimization. | | [`hxe_pre_structural`](#ida_hexrays.hxe_pre_structural) | Structure analysis is starting. | | [`hxe_structural`](#ida_hexrays.hxe_structural) | Structural analysis has been finished. | | [`hxe_maturity`](#ida_hexrays.hxe_maturity) | Ctree maturity level is being changed. | | [`hxe_interr`](#ida_hexrays.hxe_interr) | Internal error has occurred. | | [`hxe_combine`](#ida_hexrays.hxe_combine) | Trying to combine instructions of basic block. | | [`hxe_print_func`](#ida_hexrays.hxe_print_func) | Printing ctree and generating text. | | [`hxe_func_printed`](#ida_hexrays.hxe_func_printed) | Function text has been generated. Plugins may modify the text in cfunc_t::sv. However, it is too late to modify the ctree or microcode. The text uses regular color codes (see lines.hpp) COLOR_ADDR is used to store pointers to ctree items. | | [`hxe_resolve_stkaddrs`](#ida_hexrays.hxe_resolve_stkaddrs) | The optimizer is about to resolve stack addresses. | | [`hxe_build_callinfo`](#ida_hexrays.hxe_build_callinfo) | Analyzing a call instruction. | | [`hxe_callinfo_built`](#ida_hexrays.hxe_callinfo_built) | A call instruction has been anallyzed. | | [`hxe_calls_done`](#ida_hexrays.hxe_calls_done) | All calls have been analyzed. | | [`hxe_begin_inlining`](#ida_hexrays.hxe_begin_inlining) | Starting to inline outlined functions. | | [`hxe_inlining_func`](#ida_hexrays.hxe_inlining_func) | A set of ranges is going to be inlined. | | [`hxe_inlined_func`](#ida_hexrays.hxe_inlined_func) | A set of ranges got inlined. | | [`hxe_collect_warnings`](#ida_hexrays.hxe_collect_warnings) | Collect warning messages from plugins. These warnings will be displayed at the function header, after the user-defined comments. | | [`hxe_flowchart_ea`](#ida_hexrays.hxe_flowchart_ea) | Flowchart has been generated (ea-based variant). Replaces the deprecated hxe_flowchart which passes a qflow_chart_t\* with a raw func_t\* inside. | | [`hxe_prolog_ea`](#ida_hexrays.hxe_prolog_ea) | Prolog analysis has been finished (ea-based variant). Replaces the deprecated hxe_prolog which passes a qflow_chart_t\* with a raw func_t\* inside. | | [`hxe_inlining_function`](#ida_hexrays.hxe_inlining_function) | A set of ranges is going to be inlined (ea-based variant). Replaces the deprecated hxe_inlining_func which passes an mba_ranges_t\* with a raw func_t\* inside. | | [`hxe_inlined_function`](#ida_hexrays.hxe_inlined_function) | A set of ranges got inlined (ea-based variant). Replaces the deprecated hxe_inlined_func which passes an mba_ranges_t\* with a raw func_t\* inside. | | [`hxe_open_pseudocode`](#ida_hexrays.hxe_open_pseudocode) | New pseudocode view has been opened. | | [`hxe_switch_pseudocode`](#ida_hexrays.hxe_switch_pseudocode) | Existing pseudocode view has been reloaded with a new function. Its text has not been refreshed yet, only cfunc and mba pointers are ready. | | [`hxe_refresh_pseudocode`](#ida_hexrays.hxe_refresh_pseudocode) | Existing pseudocode text has been refreshed. Adding/removing pseudocode lines is forbidden in this event. | | [`hxe_close_pseudocode`](#ida_hexrays.hxe_close_pseudocode) | Pseudocode view is being closed. | | [`hxe_keyboard`](#ida_hexrays.hxe_keyboard) | Keyboard has been hit. | | [`hxe_right_click`](#ida_hexrays.hxe_right_click) | Mouse right click. Use hxe_populating_popup instead, in case you want to add items in the popup menu. | | [`hxe_double_click`](#ida_hexrays.hxe_double_click) | Mouse double click. | | [`hxe_curpos`](#ida_hexrays.hxe_curpos) | Current cursor position has been changed. (for example, by left-clicking or using keyboard) | | [`hxe_create_hint`](#ida_hexrays.hxe_create_hint) | Create a hint for the current item. | | [`hxe_text_ready`](#ida_hexrays.hxe_text_ready) | Decompiled text is ready. | | [`hxe_populating_popup`](#ida_hexrays.hxe_populating_popup) | Populating popup menu. We can add menu items now. | | [`lxe_lvar_name_changed`](#ida_hexrays.lxe_lvar_name_changed) | Local variable got renamed. | | [`lxe_lvar_type_changed`](#ida_hexrays.lxe_lvar_type_changed) | Local variable type got changed. | | [`lxe_lvar_cmt_changed`](#ida_hexrays.lxe_lvar_cmt_changed) | Local variable comment got changed. | | [`lxe_lvar_mapping_changed`](#ida_hexrays.lxe_lvar_mapping_changed) | Local variable mapping got changed. | | [`hxe_cmt_changed`](#ida_hexrays.hxe_cmt_changed) | Comment got changed. | | [`hxe_mba_maturity`](#ida_hexrays.hxe_mba_maturity) | Maturity level of an MBA was changed. | | [`USE_KEYBOARD`](#ida_hexrays.USE_KEYBOARD) | Keyboard. | | [`USE_MOUSE`](#ida_hexrays.USE_MOUSE) | Mouse. | | [`HEXRAYS_API_MAGIC`](#ida_hexrays.HEXRAYS_API_MAGIC) | | | [`CMT_NONE`](#ida_hexrays.CMT_NONE) | No comment is possible. | | [`CMT_TAIL`](#ida_hexrays.CMT_TAIL) | Indented comment. | | [`CMT_BLOCK1`](#ida_hexrays.CMT_BLOCK1) | Anterioir block comment. | | [`CMT_BLOCK2`](#ida_hexrays.CMT_BLOCK2) | Posterior block comment. | | [`CMT_LVAR`](#ida_hexrays.CMT_LVAR) | Local variable comment. | | [`CMT_FUNC`](#ida_hexrays.CMT_FUNC) | Function comment. | | [`CMT_ALL`](#ida_hexrays.CMT_ALL) | All comments. | | [`VDUI_VISIBLE`](#ida_hexrays.VDUI_VISIBLE) | is visible? | | [`VDUI_VALID`](#ida_hexrays.VDUI_VALID) | is valid? | | [`hx_user_numforms_begin`](#ida_hexrays.hx_user_numforms_begin) | | | [`hx_user_numforms_end`](#ida_hexrays.hx_user_numforms_end) | | | [`hx_user_numforms_next`](#ida_hexrays.hx_user_numforms_next) | | | [`hx_user_numforms_prev`](#ida_hexrays.hx_user_numforms_prev) | | | [`hx_user_numforms_first`](#ida_hexrays.hx_user_numforms_first) | | | [`hx_user_numforms_second`](#ida_hexrays.hx_user_numforms_second) | | | [`hx_user_numforms_find`](#ida_hexrays.hx_user_numforms_find) | | | [`hx_user_numforms_insert`](#ida_hexrays.hx_user_numforms_insert) | | | [`hx_user_numforms_erase`](#ida_hexrays.hx_user_numforms_erase) | | | [`hx_user_numforms_clear`](#ida_hexrays.hx_user_numforms_clear) | | | [`hx_user_numforms_size`](#ida_hexrays.hx_user_numforms_size) | | | [`hx_user_numforms_free`](#ida_hexrays.hx_user_numforms_free) | | | [`hx_user_numforms_new`](#ida_hexrays.hx_user_numforms_new) | | | [`hx_lvar_mapping_begin`](#ida_hexrays.hx_lvar_mapping_begin) | | | [`hx_lvar_mapping_end`](#ida_hexrays.hx_lvar_mapping_end) | | | [`hx_lvar_mapping_next`](#ida_hexrays.hx_lvar_mapping_next) | | | [`hx_lvar_mapping_prev`](#ida_hexrays.hx_lvar_mapping_prev) | | | [`hx_lvar_mapping_first`](#ida_hexrays.hx_lvar_mapping_first) | | | [`hx_lvar_mapping_second`](#ida_hexrays.hx_lvar_mapping_second) | | | [`hx_lvar_mapping_find`](#ida_hexrays.hx_lvar_mapping_find) | | | [`hx_lvar_mapping_insert`](#ida_hexrays.hx_lvar_mapping_insert) | | | [`hx_lvar_mapping_erase`](#ida_hexrays.hx_lvar_mapping_erase) | | | [`hx_lvar_mapping_clear`](#ida_hexrays.hx_lvar_mapping_clear) | | | [`hx_lvar_mapping_size`](#ida_hexrays.hx_lvar_mapping_size) | | | [`hx_lvar_mapping_free`](#ida_hexrays.hx_lvar_mapping_free) | | | [`hx_lvar_mapping_new`](#ida_hexrays.hx_lvar_mapping_new) | | | [`hx_udcall_map_begin`](#ida_hexrays.hx_udcall_map_begin) | | | [`hx_udcall_map_end`](#ida_hexrays.hx_udcall_map_end) | | | [`hx_udcall_map_next`](#ida_hexrays.hx_udcall_map_next) | | | [`hx_udcall_map_prev`](#ida_hexrays.hx_udcall_map_prev) | | | [`hx_udcall_map_first`](#ida_hexrays.hx_udcall_map_first) | | | [`hx_udcall_map_second`](#ida_hexrays.hx_udcall_map_second) | | | [`hx_udcall_map_find`](#ida_hexrays.hx_udcall_map_find) | | | [`hx_udcall_map_insert`](#ida_hexrays.hx_udcall_map_insert) | | | [`hx_udcall_map_erase`](#ida_hexrays.hx_udcall_map_erase) | | | [`hx_udcall_map_clear`](#ida_hexrays.hx_udcall_map_clear) | | | [`hx_udcall_map_size`](#ida_hexrays.hx_udcall_map_size) | | | [`hx_udcall_map_free`](#ida_hexrays.hx_udcall_map_free) | | | [`hx_udcall_map_new`](#ida_hexrays.hx_udcall_map_new) | | | [`hx_user_cmts_begin`](#ida_hexrays.hx_user_cmts_begin) | | | [`hx_user_cmts_end`](#ida_hexrays.hx_user_cmts_end) | | | [`hx_user_cmts_next`](#ida_hexrays.hx_user_cmts_next) | | | [`hx_user_cmts_prev`](#ida_hexrays.hx_user_cmts_prev) | | | [`hx_user_cmts_first`](#ida_hexrays.hx_user_cmts_first) | | | [`hx_user_cmts_second`](#ida_hexrays.hx_user_cmts_second) | | | [`hx_user_cmts_find`](#ida_hexrays.hx_user_cmts_find) | | | [`hx_user_cmts_insert`](#ida_hexrays.hx_user_cmts_insert) | | | [`hx_user_cmts_erase`](#ida_hexrays.hx_user_cmts_erase) | | | [`hx_user_cmts_clear`](#ida_hexrays.hx_user_cmts_clear) | | | [`hx_user_cmts_size`](#ida_hexrays.hx_user_cmts_size) | | | [`hx_user_cmts_free`](#ida_hexrays.hx_user_cmts_free) | | | [`hx_user_cmts_new`](#ida_hexrays.hx_user_cmts_new) | | | [`hx_user_iflags_begin`](#ida_hexrays.hx_user_iflags_begin) | | | [`hx_user_iflags_end`](#ida_hexrays.hx_user_iflags_end) | | | [`hx_user_iflags_next`](#ida_hexrays.hx_user_iflags_next) | | | [`hx_user_iflags_prev`](#ida_hexrays.hx_user_iflags_prev) | | | [`hx_user_iflags_first`](#ida_hexrays.hx_user_iflags_first) | | | [`hx_user_iflags_second`](#ida_hexrays.hx_user_iflags_second) | | | [`hx_user_iflags_find`](#ida_hexrays.hx_user_iflags_find) | | | [`hx_user_iflags_insert`](#ida_hexrays.hx_user_iflags_insert) | | | [`hx_user_iflags_erase`](#ida_hexrays.hx_user_iflags_erase) | | | [`hx_user_iflags_clear`](#ida_hexrays.hx_user_iflags_clear) | | | [`hx_user_iflags_size`](#ida_hexrays.hx_user_iflags_size) | | | [`hx_user_iflags_free`](#ida_hexrays.hx_user_iflags_free) | | | [`hx_user_iflags_new`](#ida_hexrays.hx_user_iflags_new) | | | [`hx_user_unions_begin`](#ida_hexrays.hx_user_unions_begin) | | | [`hx_user_unions_end`](#ida_hexrays.hx_user_unions_end) | | | [`hx_user_unions_next`](#ida_hexrays.hx_user_unions_next) | | | [`hx_user_unions_prev`](#ida_hexrays.hx_user_unions_prev) | | | [`hx_user_unions_first`](#ida_hexrays.hx_user_unions_first) | | | [`hx_user_unions_second`](#ida_hexrays.hx_user_unions_second) | | | [`hx_user_unions_find`](#ida_hexrays.hx_user_unions_find) | | | [`hx_user_unions_insert`](#ida_hexrays.hx_user_unions_insert) | | | [`hx_user_unions_erase`](#ida_hexrays.hx_user_unions_erase) | | | [`hx_user_unions_clear`](#ida_hexrays.hx_user_unions_clear) | | | [`hx_user_unions_size`](#ida_hexrays.hx_user_unions_size) | | | [`hx_user_unions_free`](#ida_hexrays.hx_user_unions_free) | | | [`hx_user_unions_new`](#ida_hexrays.hx_user_unions_new) | | | [`hx_user_labels_begin`](#ida_hexrays.hx_user_labels_begin) | | | [`hx_user_labels_end`](#ida_hexrays.hx_user_labels_end) | | | [`hx_user_labels_next`](#ida_hexrays.hx_user_labels_next) | | | [`hx_user_labels_prev`](#ida_hexrays.hx_user_labels_prev) | | | [`hx_user_labels_first`](#ida_hexrays.hx_user_labels_first) | | | [`hx_user_labels_second`](#ida_hexrays.hx_user_labels_second) | | | [`hx_user_labels_find`](#ida_hexrays.hx_user_labels_find) | | | [`hx_user_labels_insert`](#ida_hexrays.hx_user_labels_insert) | | | [`hx_user_labels_erase`](#ida_hexrays.hx_user_labels_erase) | | | [`hx_user_labels_clear`](#ida_hexrays.hx_user_labels_clear) | | | [`hx_user_labels_size`](#ida_hexrays.hx_user_labels_size) | | | [`hx_user_labels_free`](#ida_hexrays.hx_user_labels_free) | | | [`hx_user_labels_new`](#ida_hexrays.hx_user_labels_new) | | | [`hx_eamap_begin`](#ida_hexrays.hx_eamap_begin) | | | [`hx_eamap_end`](#ida_hexrays.hx_eamap_end) | | | [`hx_eamap_next`](#ida_hexrays.hx_eamap_next) | | | [`hx_eamap_prev`](#ida_hexrays.hx_eamap_prev) | | | [`hx_eamap_first`](#ida_hexrays.hx_eamap_first) | | | [`hx_eamap_second`](#ida_hexrays.hx_eamap_second) | | | [`hx_eamap_find`](#ida_hexrays.hx_eamap_find) | | | [`hx_eamap_insert`](#ida_hexrays.hx_eamap_insert) | | | [`hx_eamap_erase`](#ida_hexrays.hx_eamap_erase) | | | [`hx_eamap_clear`](#ida_hexrays.hx_eamap_clear) | | | [`hx_eamap_size`](#ida_hexrays.hx_eamap_size) | | | [`hx_eamap_free`](#ida_hexrays.hx_eamap_free) | | | [`hx_eamap_new`](#ida_hexrays.hx_eamap_new) | | | [`hx_boundaries_begin`](#ida_hexrays.hx_boundaries_begin) | | | [`hx_boundaries_end`](#ida_hexrays.hx_boundaries_end) | | | [`hx_boundaries_next`](#ida_hexrays.hx_boundaries_next) | | | [`hx_boundaries_prev`](#ida_hexrays.hx_boundaries_prev) | | | [`hx_boundaries_first`](#ida_hexrays.hx_boundaries_first) | | | [`hx_boundaries_second`](#ida_hexrays.hx_boundaries_second) | | | [`hx_boundaries_find`](#ida_hexrays.hx_boundaries_find) | | | [`hx_boundaries_insert`](#ida_hexrays.hx_boundaries_insert) | | | [`hx_boundaries_erase`](#ida_hexrays.hx_boundaries_erase) | | | [`hx_boundaries_clear`](#ida_hexrays.hx_boundaries_clear) | | | [`hx_boundaries_size`](#ida_hexrays.hx_boundaries_size) | | | [`hx_boundaries_free`](#ida_hexrays.hx_boundaries_free) | | | [`hx_boundaries_new`](#ida_hexrays.hx_boundaries_new) | | | [`hx_block_chains_begin`](#ida_hexrays.hx_block_chains_begin) | | | [`hx_block_chains_end`](#ida_hexrays.hx_block_chains_end) | | | [`hx_block_chains_next`](#ida_hexrays.hx_block_chains_next) | | | [`hx_block_chains_prev`](#ida_hexrays.hx_block_chains_prev) | | | [`hx_block_chains_get`](#ida_hexrays.hx_block_chains_get) | | | [`hx_block_chains_find`](#ida_hexrays.hx_block_chains_find) | | | [`hx_block_chains_insert`](#ida_hexrays.hx_block_chains_insert) | | | [`hx_block_chains_erase`](#ida_hexrays.hx_block_chains_erase) | | | [`hx_block_chains_clear`](#ida_hexrays.hx_block_chains_clear) | | | [`hx_block_chains_size`](#ida_hexrays.hx_block_chains_size) | | | [`hx_block_chains_free`](#ida_hexrays.hx_block_chains_free) | | | [`hx_block_chains_new`](#ida_hexrays.hx_block_chains_new) | | | [`hx_hexrays_alloc`](#ida_hexrays.hx_hexrays_alloc) | | | [`hx_hexrays_free`](#ida_hexrays.hx_hexrays_free) | | | [`hx_valrng_t_clear`](#ida_hexrays.hx_valrng_t_clear) | | | [`hx_valrng_t_copy`](#ida_hexrays.hx_valrng_t_copy) | | | [`hx_valrng_t_assign`](#ida_hexrays.hx_valrng_t_assign) | | | [`hx_valrng_t_compare`](#ida_hexrays.hx_valrng_t_compare) | | | [`hx_valrng_t_set_eq`](#ida_hexrays.hx_valrng_t_set_eq) | | | [`hx_valrng_t_set_cmp`](#ida_hexrays.hx_valrng_t_set_cmp) | | | [`hx_valrng_t_reduce_size`](#ida_hexrays.hx_valrng_t_reduce_size) | | | [`hx_valrng_t_intersect_with`](#ida_hexrays.hx_valrng_t_intersect_with) | | | [`hx_valrng_t_unite_with`](#ida_hexrays.hx_valrng_t_unite_with) | | | [`hx_valrng_t_inverse`](#ida_hexrays.hx_valrng_t_inverse) | | | [`hx_valrng_t_has`](#ida_hexrays.hx_valrng_t_has) | | | [`hx_valrng_t_print`](#ida_hexrays.hx_valrng_t_print) | | | [`hx_valrng_t_dstr`](#ida_hexrays.hx_valrng_t_dstr) | | | [`hx_valrng_t_cvt_to_single_value`](#ida_hexrays.hx_valrng_t_cvt_to_single_value) | | | [`hx_valrng_t_cvt_to_cmp`](#ida_hexrays.hx_valrng_t_cvt_to_cmp) | | | [`hx_get_merror_desc`](#ida_hexrays.hx_get_merror_desc) | | | [`hx_must_mcode_close_block`](#ida_hexrays.hx_must_mcode_close_block) | | | [`hx_is_mcode_propagatable`](#ida_hexrays.hx_is_mcode_propagatable) | | | [`hx_negate_mcode_relation`](#ida_hexrays.hx_negate_mcode_relation) | | | [`hx_swap_mcode_relation`](#ida_hexrays.hx_swap_mcode_relation) | | | [`hx_get_signed_mcode`](#ida_hexrays.hx_get_signed_mcode) | | | [`hx_get_unsigned_mcode`](#ida_hexrays.hx_get_unsigned_mcode) | | | [`hx_mcode_modifies_d`](#ida_hexrays.hx_mcode_modifies_d) | | | [`hx_operand_locator_t_compare`](#ida_hexrays.hx_operand_locator_t_compare) | | | [`hx_vd_printer_t_print`](#ida_hexrays.hx_vd_printer_t_print) | | | [`hx_file_printer_t_print`](#ida_hexrays.hx_file_printer_t_print) | | | [`hx_qstring_printer_t_print`](#ida_hexrays.hx_qstring_printer_t_print) | | | [`hx_dstr`](#ida_hexrays.hx_dstr) | | | [`hx_is_type_correct`](#ida_hexrays.hx_is_type_correct) | | | [`hx_is_small_udt`](#ida_hexrays.hx_is_small_udt) | | | [`hx_is_nonbool_type`](#ida_hexrays.hx_is_nonbool_type) | | | [`hx_is_bool_type`](#ida_hexrays.hx_is_bool_type) | | | [`hx_partial_type_num`](#ida_hexrays.hx_partial_type_num) | | | [`hx_get_float_type`](#ida_hexrays.hx_get_float_type) | | | [`hx_get_int_type_by_width_and_sign`](#ida_hexrays.hx_get_int_type_by_width_and_sign) | | | [`hx_get_unk_type`](#ida_hexrays.hx_get_unk_type) | | | [`hx_dummy_ptrtype`](#ida_hexrays.hx_dummy_ptrtype) | | | [`hx_get_member_type`](#ida_hexrays.hx_get_member_type) | | | [`hx_make_pointer`](#ida_hexrays.hx_make_pointer) | | | [`hx_create_typedef`](#ida_hexrays.hx_create_typedef) | | | [`hx_get_type`](#ida_hexrays.hx_get_type) | | | [`hx_set_type`](#ida_hexrays.hx_set_type) | | | [`hx_vdloc_t_dstr`](#ida_hexrays.hx_vdloc_t_dstr) | | | [`hx_vdloc_t_compare`](#ida_hexrays.hx_vdloc_t_compare) | | | [`hx_vdloc_t_is_aliasable`](#ida_hexrays.hx_vdloc_t_is_aliasable) | | | [`hx_print_vdloc`](#ida_hexrays.hx_print_vdloc) | | | [`hx_arglocs_overlap`](#ida_hexrays.hx_arglocs_overlap) | | | [`hx_lvar_locator_t_compare`](#ida_hexrays.hx_lvar_locator_t_compare) | | | [`hx_lvar_locator_t_dstr`](#ida_hexrays.hx_lvar_locator_t_dstr) | | | [`hx_lvar_t_dstr`](#ida_hexrays.hx_lvar_t_dstr) | | | [`hx_lvar_t_is_promoted_arg`](#ida_hexrays.hx_lvar_t_is_promoted_arg) | | | [`hx_lvar_t_accepts_type`](#ida_hexrays.hx_lvar_t_accepts_type) | | | [`hx_lvar_t_set_lvar_type`](#ida_hexrays.hx_lvar_t_set_lvar_type) | | | [`hx_lvar_t_set_width`](#ida_hexrays.hx_lvar_t_set_width) | | | [`hx_lvar_t_append_list`](#ida_hexrays.hx_lvar_t_append_list) | | | [`hx_lvar_t_append_list_`](#ida_hexrays.hx_lvar_t_append_list_) | | | [`hx_lvars_t_find_stkvar`](#ida_hexrays.hx_lvars_t_find_stkvar) | | | [`hx_lvars_t_find`](#ida_hexrays.hx_lvars_t_find) | | | [`hx_lvars_t_find_lvar`](#ida_hexrays.hx_lvars_t_find_lvar) | | | [`hx_restore_user_lvar_settings`](#ida_hexrays.hx_restore_user_lvar_settings) | | | [`hx_save_user_lvar_settings`](#ida_hexrays.hx_save_user_lvar_settings) | | | [`hx_modify_user_lvars`](#ida_hexrays.hx_modify_user_lvars) | | | [`hx_modify_user_lvar_info`](#ida_hexrays.hx_modify_user_lvar_info) | | | [`hx_locate_lvar`](#ida_hexrays.hx_locate_lvar) | | | [`hx_restore_user_defined_calls`](#ida_hexrays.hx_restore_user_defined_calls) | | | [`hx_save_user_defined_calls`](#ida_hexrays.hx_save_user_defined_calls) | | | [`hx_parse_user_call`](#ida_hexrays.hx_parse_user_call) | | | [`hx_convert_to_user_call`](#ida_hexrays.hx_convert_to_user_call) | | | [`hx_install_microcode_filter`](#ida_hexrays.hx_install_microcode_filter) | | | [`hx_udc_filter_t_cleanup`](#ida_hexrays.hx_udc_filter_t_cleanup) | | | [`hx_udc_filter_t_init`](#ida_hexrays.hx_udc_filter_t_init) | | | [`hx_udc_filter_t_apply`](#ida_hexrays.hx_udc_filter_t_apply) | | | [`hx_bitset_t_bitset_t`](#ida_hexrays.hx_bitset_t_bitset_t) | | | [`hx_bitset_t_copy`](#ida_hexrays.hx_bitset_t_copy) | | | [`hx_bitset_t_add`](#ida_hexrays.hx_bitset_t_add) | | | [`hx_bitset_t_add_`](#ida_hexrays.hx_bitset_t_add_) | | | [`hx_bitset_t_add__`](#ida_hexrays.hx_bitset_t_add__) | | | [`hx_bitset_t_sub`](#ida_hexrays.hx_bitset_t_sub) | | | [`hx_bitset_t_sub_`](#ida_hexrays.hx_bitset_t_sub_) | | | [`hx_bitset_t_sub__`](#ida_hexrays.hx_bitset_t_sub__) | | | [`hx_bitset_t_cut_at`](#ida_hexrays.hx_bitset_t_cut_at) | | | [`hx_bitset_t_shift_down`](#ida_hexrays.hx_bitset_t_shift_down) | | | [`hx_bitset_t_has`](#ida_hexrays.hx_bitset_t_has) | | | [`hx_bitset_t_has_all`](#ida_hexrays.hx_bitset_t_has_all) | | | [`hx_bitset_t_has_any`](#ida_hexrays.hx_bitset_t_has_any) | | | [`hx_bitset_t_dstr`](#ida_hexrays.hx_bitset_t_dstr) | | | [`hx_bitset_t_empty`](#ida_hexrays.hx_bitset_t_empty) | | | [`hx_bitset_t_count`](#ida_hexrays.hx_bitset_t_count) | | | [`hx_bitset_t_count_`](#ida_hexrays.hx_bitset_t_count_) | | | [`hx_bitset_t_last`](#ida_hexrays.hx_bitset_t_last) | | | [`hx_bitset_t_fill_with_ones`](#ida_hexrays.hx_bitset_t_fill_with_ones) | | | [`hx_bitset_t_fill_gaps`](#ida_hexrays.hx_bitset_t_fill_gaps) | | | [`hx_bitset_t_has_common`](#ida_hexrays.hx_bitset_t_has_common) | | | [`hx_bitset_t_intersect`](#ida_hexrays.hx_bitset_t_intersect) | | | [`hx_bitset_t_is_subset_of`](#ida_hexrays.hx_bitset_t_is_subset_of) | | | [`hx_bitset_t_compare`](#ida_hexrays.hx_bitset_t_compare) | | | [`hx_bitset_t_goup`](#ida_hexrays.hx_bitset_t_goup) | | | [`hx_ivl_t_dstr`](#ida_hexrays.hx_ivl_t_dstr) | | | [`hx_ivl_t_compare`](#ida_hexrays.hx_ivl_t_compare) | | | [`hx_ivlset_t_add`](#ida_hexrays.hx_ivlset_t_add) | | | [`hx_ivlset_t_add_`](#ida_hexrays.hx_ivlset_t_add_) | | | [`hx_ivlset_t_addmasked`](#ida_hexrays.hx_ivlset_t_addmasked) | | | [`hx_ivlset_t_sub`](#ida_hexrays.hx_ivlset_t_sub) | | | [`hx_ivlset_t_sub_`](#ida_hexrays.hx_ivlset_t_sub_) | | | [`hx_ivlset_t_has_common`](#ida_hexrays.hx_ivlset_t_has_common) | | | [`hx_ivlset_t_print`](#ida_hexrays.hx_ivlset_t_print) | | | [`hx_ivlset_t_dstr`](#ida_hexrays.hx_ivlset_t_dstr) | | | [`hx_ivlset_t_count`](#ida_hexrays.hx_ivlset_t_count) | | | [`hx_ivlset_t_has_common_`](#ida_hexrays.hx_ivlset_t_has_common_) | | | [`hx_ivlset_t_contains`](#ida_hexrays.hx_ivlset_t_contains) | | | [`hx_ivlset_t_includes`](#ida_hexrays.hx_ivlset_t_includes) | | | [`hx_ivlset_t_intersect`](#ida_hexrays.hx_ivlset_t_intersect) | | | [`hx_ivlset_t_compare`](#ida_hexrays.hx_ivlset_t_compare) | | | [`hx_rlist_t_print`](#ida_hexrays.hx_rlist_t_print) | | | [`hx_rlist_t_dstr`](#ida_hexrays.hx_rlist_t_dstr) | | | [`hx_mlist_t_addmem`](#ida_hexrays.hx_mlist_t_addmem) | | | [`hx_mlist_t_print`](#ida_hexrays.hx_mlist_t_print) | | | [`hx_mlist_t_dstr`](#ida_hexrays.hx_mlist_t_dstr) | | | [`hx_mlist_t_compare`](#ida_hexrays.hx_mlist_t_compare) | | | [`hx_get_temp_regs`](#ida_hexrays.hx_get_temp_regs) | | | [`hx_is_kreg`](#ida_hexrays.hx_is_kreg) | | | [`hx_reg2mreg`](#ida_hexrays.hx_reg2mreg) | | | [`hx_mreg2reg`](#ida_hexrays.hx_mreg2reg) | | | [`hx_get_mreg_name`](#ida_hexrays.hx_get_mreg_name) | | | [`hx_install_optinsn_handler`](#ida_hexrays.hx_install_optinsn_handler) | | | [`hx_remove_optinsn_handler`](#ida_hexrays.hx_remove_optinsn_handler) | | | [`hx_install_optblock_handler`](#ida_hexrays.hx_install_optblock_handler) | | | [`hx_remove_optblock_handler`](#ida_hexrays.hx_remove_optblock_handler) | | | [`hx_simple_graph_t_compute_dominators`](#ida_hexrays.hx_simple_graph_t_compute_dominators) | | | [`hx_simple_graph_t_compute_immediate_dominators`](#ida_hexrays.hx_simple_graph_t_compute_immediate_dominators) | | | [`hx_simple_graph_t_depth_first_preorder`](#ida_hexrays.hx_simple_graph_t_depth_first_preorder) | | | [`hx_simple_graph_t_depth_first_postorder`](#ida_hexrays.hx_simple_graph_t_depth_first_postorder) | | | [`hx_simple_graph_t_goup`](#ida_hexrays.hx_simple_graph_t_goup) | | | [`hx_mutable_graph_t_resize`](#ida_hexrays.hx_mutable_graph_t_resize) | | | [`hx_mutable_graph_t_goup`](#ida_hexrays.hx_mutable_graph_t_goup) | | | [`hx_mutable_graph_t_del_edge`](#ida_hexrays.hx_mutable_graph_t_del_edge) | | | [`hx_lvar_ref_t_compare`](#ida_hexrays.hx_lvar_ref_t_compare) | | | [`hx_lvar_ref_t_var`](#ida_hexrays.hx_lvar_ref_t_var) | | | [`hx_stkvar_ref_t_compare`](#ida_hexrays.hx_stkvar_ref_t_compare) | | | [`hx_stkvar_ref_t_get_stkvar`](#ida_hexrays.hx_stkvar_ref_t_get_stkvar) | | | [`hx_fnumber_t_print`](#ida_hexrays.hx_fnumber_t_print) | | | [`hx_fnumber_t_dstr`](#ida_hexrays.hx_fnumber_t_dstr) | | | [`hx_mop_t_copy`](#ida_hexrays.hx_mop_t_copy) | | | [`hx_mop_t_assign`](#ida_hexrays.hx_mop_t_assign) | | | [`hx_mop_t_swap`](#ida_hexrays.hx_mop_t_swap) | | | [`hx_mop_t_erase`](#ida_hexrays.hx_mop_t_erase) | | | [`hx_mop_t_print`](#ida_hexrays.hx_mop_t_print) | | | [`hx_mop_t_dstr`](#ida_hexrays.hx_mop_t_dstr) | | | [`hx_mop_t_create_from_mlist`](#ida_hexrays.hx_mop_t_create_from_mlist) | | | [`hx_mop_t_create_from_ivlset`](#ida_hexrays.hx_mop_t_create_from_ivlset) | | | [`hx_mop_t_create_from_vdloc`](#ida_hexrays.hx_mop_t_create_from_vdloc) | | | [`hx_mop_t_create_from_scattered_vdloc`](#ida_hexrays.hx_mop_t_create_from_scattered_vdloc) | | | [`hx_mop_t_create_from_insn`](#ida_hexrays.hx_mop_t_create_from_insn) | | | [`hx_mop_t_make_number`](#ida_hexrays.hx_mop_t_make_number) | | | [`hx_mop_t_make_fpnum`](#ida_hexrays.hx_mop_t_make_fpnum) | | | [`hx_mop_t__make_gvar`](#ida_hexrays.hx_mop_t__make_gvar) | | | [`hx_mop_t_make_gvar`](#ida_hexrays.hx_mop_t_make_gvar) | | | [`hx_mop_t_make_reg_pair`](#ida_hexrays.hx_mop_t_make_reg_pair) | | | [`hx_mop_t_make_helper`](#ida_hexrays.hx_mop_t_make_helper) | | | [`hx_mop_t_is_bit_reg`](#ida_hexrays.hx_mop_t_is_bit_reg) | | | [`hx_mop_t_may_use_aliased_memory`](#ida_hexrays.hx_mop_t_may_use_aliased_memory) | | | [`hx_mop_t_is01`](#ida_hexrays.hx_mop_t_is01) | | | [`hx_mop_t_is_sign_extended_from`](#ida_hexrays.hx_mop_t_is_sign_extended_from) | | | [`hx_mop_t_is_zero_extended_from`](#ida_hexrays.hx_mop_t_is_zero_extended_from) | | | [`hx_mop_t_equal_mops`](#ida_hexrays.hx_mop_t_equal_mops) | | | [`hx_mop_t_lexcompare`](#ida_hexrays.hx_mop_t_lexcompare) | | | [`hx_mop_t_for_all_ops`](#ida_hexrays.hx_mop_t_for_all_ops) | | | [`hx_mop_t_for_all_scattered_submops`](#ida_hexrays.hx_mop_t_for_all_scattered_submops) | | | [`hx_mop_t_is_constant`](#ida_hexrays.hx_mop_t_is_constant) | | | [`hx_mop_t_get_stkoff`](#ida_hexrays.hx_mop_t_get_stkoff) | | | [`hx_mop_t_make_low_half`](#ida_hexrays.hx_mop_t_make_low_half) | | | [`hx_mop_t_make_high_half`](#ida_hexrays.hx_mop_t_make_high_half) | | | [`hx_mop_t_make_first_half`](#ida_hexrays.hx_mop_t_make_first_half) | | | [`hx_mop_t_make_second_half`](#ida_hexrays.hx_mop_t_make_second_half) | | | [`hx_mop_t_shift_mop`](#ida_hexrays.hx_mop_t_shift_mop) | | | [`hx_mop_t_change_size`](#ida_hexrays.hx_mop_t_change_size) | | | [`hx_mop_t_preserve_side_effects`](#ida_hexrays.hx_mop_t_preserve_side_effects) | | | [`hx_mop_t_apply_ld_mcode`](#ida_hexrays.hx_mop_t_apply_ld_mcode) | | | [`hx_mcallarg_t_print`](#ida_hexrays.hx_mcallarg_t_print) | | | [`hx_mcallarg_t_dstr`](#ida_hexrays.hx_mcallarg_t_dstr) | | | [`hx_mcallarg_t_set_regarg`](#ida_hexrays.hx_mcallarg_t_set_regarg) | | | [`hx_mcallinfo_t_lexcompare`](#ida_hexrays.hx_mcallinfo_t_lexcompare) | | | [`hx_mcallinfo_t_set_type`](#ida_hexrays.hx_mcallinfo_t_set_type) | | | [`hx_mcallinfo_t_get_type`](#ida_hexrays.hx_mcallinfo_t_get_type) | | | [`hx_mcallinfo_t_print`](#ida_hexrays.hx_mcallinfo_t_print) | | | [`hx_mcallinfo_t_dstr`](#ida_hexrays.hx_mcallinfo_t_dstr) | | | [`hx_mcases_t_compare`](#ida_hexrays.hx_mcases_t_compare) | | | [`hx_mcases_t_print`](#ida_hexrays.hx_mcases_t_print) | | | [`hx_mcases_t_dstr`](#ida_hexrays.hx_mcases_t_dstr) | | | [`hx_vivl_t_extend_to_cover`](#ida_hexrays.hx_vivl_t_extend_to_cover) | | | [`hx_vivl_t_intersect`](#ida_hexrays.hx_vivl_t_intersect) | | | [`hx_vivl_t_print`](#ida_hexrays.hx_vivl_t_print) | | | [`hx_vivl_t_dstr`](#ida_hexrays.hx_vivl_t_dstr) | | | [`hx_chain_t_print`](#ida_hexrays.hx_chain_t_print) | | | [`hx_chain_t_dstr`](#ida_hexrays.hx_chain_t_dstr) | | | [`hx_chain_t_append_list`](#ida_hexrays.hx_chain_t_append_list) | | | [`hx_chain_t_append_list_`](#ida_hexrays.hx_chain_t_append_list_) | | | [`hx_block_chains_t_get_chain`](#ida_hexrays.hx_block_chains_t_get_chain) | | | [`hx_block_chains_t_print`](#ida_hexrays.hx_block_chains_t_print) | | | [`hx_block_chains_t_dstr`](#ida_hexrays.hx_block_chains_t_dstr) | | | [`hx_graph_chains_t_for_all_chains`](#ida_hexrays.hx_graph_chains_t_for_all_chains) | | | [`hx_graph_chains_t_release`](#ida_hexrays.hx_graph_chains_t_release) | | | [`hx_minsn_t_init`](#ida_hexrays.hx_minsn_t_init) | | | [`hx_minsn_t_copy`](#ida_hexrays.hx_minsn_t_copy) | | | [`hx_minsn_t_set_combined`](#ida_hexrays.hx_minsn_t_set_combined) | | | [`hx_minsn_t_swap`](#ida_hexrays.hx_minsn_t_swap) | | | [`hx_minsn_t_print`](#ida_hexrays.hx_minsn_t_print) | | | [`hx_minsn_t_dstr`](#ida_hexrays.hx_minsn_t_dstr) | | | [`hx_minsn_t_setaddr`](#ida_hexrays.hx_minsn_t_setaddr) | | | [`hx_minsn_t_optimize_subtree`](#ida_hexrays.hx_minsn_t_optimize_subtree) | | | [`hx_minsn_t_for_all_ops`](#ida_hexrays.hx_minsn_t_for_all_ops) | | | [`hx_minsn_t_for_all_insns`](#ida_hexrays.hx_minsn_t_for_all_insns) | | | [`hx_minsn_t__make_nop`](#ida_hexrays.hx_minsn_t__make_nop) | | | [`hx_minsn_t_equal_insns`](#ida_hexrays.hx_minsn_t_equal_insns) | | | [`hx_minsn_t_lexcompare`](#ida_hexrays.hx_minsn_t_lexcompare) | | | [`hx_minsn_t_is_noret_call`](#ida_hexrays.hx_minsn_t_is_noret_call) | | | [`hx_minsn_t_is_helper`](#ida_hexrays.hx_minsn_t_is_helper) | | | [`hx_minsn_t_find_call`](#ida_hexrays.hx_minsn_t_find_call) | | | [`hx_minsn_t_has_side_effects`](#ida_hexrays.hx_minsn_t_has_side_effects) | | | [`hx_minsn_t_find_opcode`](#ida_hexrays.hx_minsn_t_find_opcode) | | | [`hx_minsn_t_find_ins_op`](#ida_hexrays.hx_minsn_t_find_ins_op) | | | [`hx_minsn_t_find_num_op`](#ida_hexrays.hx_minsn_t_find_num_op) | | | [`hx_minsn_t_modifies_d`](#ida_hexrays.hx_minsn_t_modifies_d) | | | [`hx_minsn_t_is_between`](#ida_hexrays.hx_minsn_t_is_between) | | | [`hx_minsn_t_may_use_aliased_memory`](#ida_hexrays.hx_minsn_t_may_use_aliased_memory) | | | [`hx_minsn_t_serialize`](#ida_hexrays.hx_minsn_t_serialize) | | | [`hx_minsn_t_deserialize`](#ida_hexrays.hx_minsn_t_deserialize) | | | [`hx_getf_reginsn`](#ida_hexrays.hx_getf_reginsn) | | | [`hx_getb_reginsn`](#ida_hexrays.hx_getb_reginsn) | | | [`hx_mblock_t_init`](#ida_hexrays.hx_mblock_t_init) | | | [`hx_mblock_t_print`](#ida_hexrays.hx_mblock_t_print) | | | [`hx_mblock_t_dump`](#ida_hexrays.hx_mblock_t_dump) | | | [`hx_mblock_t_vdump_block`](#ida_hexrays.hx_mblock_t_vdump_block) | | | [`hx_mblock_t_insert_into_block`](#ida_hexrays.hx_mblock_t_insert_into_block) | | | [`hx_mblock_t_remove_from_block`](#ida_hexrays.hx_mblock_t_remove_from_block) | | | [`hx_mblock_t_for_all_insns`](#ida_hexrays.hx_mblock_t_for_all_insns) | | | [`hx_mblock_t_for_all_ops`](#ida_hexrays.hx_mblock_t_for_all_ops) | | | [`hx_mblock_t_for_all_uses`](#ida_hexrays.hx_mblock_t_for_all_uses) | | | [`hx_mblock_t_optimize_insn`](#ida_hexrays.hx_mblock_t_optimize_insn) | | | [`hx_mblock_t_optimize_block`](#ida_hexrays.hx_mblock_t_optimize_block) | | | [`hx_mblock_t_build_lists`](#ida_hexrays.hx_mblock_t_build_lists) | | | [`hx_mblock_t_optimize_useless_jump`](#ida_hexrays.hx_mblock_t_optimize_useless_jump) | | | [`hx_mblock_t_append_use_list`](#ida_hexrays.hx_mblock_t_append_use_list) | | | [`hx_mblock_t_append_def_list`](#ida_hexrays.hx_mblock_t_append_def_list) | | | [`hx_mblock_t_build_use_list`](#ida_hexrays.hx_mblock_t_build_use_list) | | | [`hx_mblock_t_build_def_list`](#ida_hexrays.hx_mblock_t_build_def_list) | | | [`hx_mblock_t_find_first_use`](#ida_hexrays.hx_mblock_t_find_first_use) | | | [`hx_mblock_t_find_redefinition`](#ida_hexrays.hx_mblock_t_find_redefinition) | | | [`hx_mblock_t_is_rhs_redefined`](#ida_hexrays.hx_mblock_t_is_rhs_redefined) | | | [`hx_mblock_t_find_access`](#ida_hexrays.hx_mblock_t_find_access) | | | [`hx_mblock_t_get_valranges`](#ida_hexrays.hx_mblock_t_get_valranges) | | | [`hx_mblock_t_get_valranges_`](#ida_hexrays.hx_mblock_t_get_valranges_) | | | [`hx_mblock_t_get_reginsn_qty`](#ida_hexrays.hx_mblock_t_get_reginsn_qty) | | | [`hx_mba_ranges_t_range_contains`](#ida_hexrays.hx_mba_ranges_t_range_contains) | | | [`hx_mba_t_stkoff_vd2ida`](#ida_hexrays.hx_mba_t_stkoff_vd2ida) | | | [`hx_mba_t_stkoff_ida2vd`](#ida_hexrays.hx_mba_t_stkoff_ida2vd) | | | [`hx_mba_t_idaloc2vd`](#ida_hexrays.hx_mba_t_idaloc2vd) | | | [`hx_mba_t_idaloc2vd_`](#ida_hexrays.hx_mba_t_idaloc2vd_) | | | [`hx_mba_t_vd2idaloc`](#ida_hexrays.hx_mba_t_vd2idaloc) | | | [`hx_mba_t_vd2idaloc_`](#ida_hexrays.hx_mba_t_vd2idaloc_) | | | [`hx_mba_t_term`](#ida_hexrays.hx_mba_t_term) | | | [`hx_mba_t_get_curfunc`](#ida_hexrays.hx_mba_t_get_curfunc) | | | [`hx_mba_t_set_maturity`](#ida_hexrays.hx_mba_t_set_maturity) | | | [`hx_mba_t_optimize_local`](#ida_hexrays.hx_mba_t_optimize_local) | | | [`hx_mba_t_build_graph`](#ida_hexrays.hx_mba_t_build_graph) | | | [`hx_mba_t_get_graph`](#ida_hexrays.hx_mba_t_get_graph) | | | [`hx_mba_t_analyze_calls`](#ida_hexrays.hx_mba_t_analyze_calls) | | | [`hx_mba_t_optimize_global`](#ida_hexrays.hx_mba_t_optimize_global) | | | [`hx_mba_t_alloc_lvars`](#ida_hexrays.hx_mba_t_alloc_lvars) | | | [`hx_mba_t_dump`](#ida_hexrays.hx_mba_t_dump) | | | [`hx_mba_t_vdump_mba`](#ida_hexrays.hx_mba_t_vdump_mba) | | | [`hx_mba_t_print`](#ida_hexrays.hx_mba_t_print) | | | [`hx_mba_t_verify`](#ida_hexrays.hx_mba_t_verify) | | | [`hx_mba_t_mark_chains_dirty`](#ida_hexrays.hx_mba_t_mark_chains_dirty) | | | [`hx_mba_t_insert_block`](#ida_hexrays.hx_mba_t_insert_block) | | | [`hx_mba_t_remove_block`](#ida_hexrays.hx_mba_t_remove_block) | | | [`hx_mba_t_copy_block`](#ida_hexrays.hx_mba_t_copy_block) | | | [`hx_mba_t_remove_empty_and_unreachable_blocks`](#ida_hexrays.hx_mba_t_remove_empty_and_unreachable_blocks) | | | [`hx_mba_t_merge_blocks`](#ida_hexrays.hx_mba_t_merge_blocks) | | | [`hx_mba_t_for_all_ops`](#ida_hexrays.hx_mba_t_for_all_ops) | | | [`hx_mba_t_for_all_insns`](#ida_hexrays.hx_mba_t_for_all_insns) | | | [`hx_mba_t_for_all_topinsns`](#ida_hexrays.hx_mba_t_for_all_topinsns) | | | [`hx_mba_t_find_mop`](#ida_hexrays.hx_mba_t_find_mop) | | | [`hx_mba_t_create_helper_call`](#ida_hexrays.hx_mba_t_create_helper_call) | | | [`hx_mba_t_get_func_output_lists`](#ida_hexrays.hx_mba_t_get_func_output_lists) | | | [`hx_mba_t_arg`](#ida_hexrays.hx_mba_t_arg) | | | [`hx_mba_t_alloc_fict_ea`](#ida_hexrays.hx_mba_t_alloc_fict_ea) | | | [`hx_mba_t_map_fict_ea`](#ida_hexrays.hx_mba_t_map_fict_ea) | | | [`hx_mba_t_serialize`](#ida_hexrays.hx_mba_t_serialize) | | | [`hx_mba_t_deserialize`](#ida_hexrays.hx_mba_t_deserialize) | | | [`hx_mba_t_save_snapshot`](#ida_hexrays.hx_mba_t_save_snapshot) | | | [`hx_mba_t_alloc_kreg`](#ida_hexrays.hx_mba_t_alloc_kreg) | | | [`hx_mba_t_free_kreg`](#ida_hexrays.hx_mba_t_free_kreg) | | | [`hx_mba_t_inline_func`](#ida_hexrays.hx_mba_t_inline_func) | | | [`hx_mba_t_locate_stkpnt`](#ida_hexrays.hx_mba_t_locate_stkpnt) | | | [`hx_mba_t_set_lvar_name`](#ida_hexrays.hx_mba_t_set_lvar_name) | | | [`hx_mbl_graph_t_is_accessed_globally`](#ida_hexrays.hx_mbl_graph_t_is_accessed_globally) | | | [`hx_mbl_graph_t_get_ud`](#ida_hexrays.hx_mbl_graph_t_get_ud) | | | [`hx_mbl_graph_t_get_du`](#ida_hexrays.hx_mbl_graph_t_get_du) | | | [`hx_cdg_insn_iterator_t_next`](#ida_hexrays.hx_cdg_insn_iterator_t_next) | | | [`hx_codegen_t_clear`](#ida_hexrays.hx_codegen_t_clear) | | | [`hx_codegen_t_emit`](#ida_hexrays.hx_codegen_t_emit) | | | [`hx_codegen_t_emit_`](#ida_hexrays.hx_codegen_t_emit_) | | | [`hx_change_hexrays_config`](#ida_hexrays.hx_change_hexrays_config) | | | [`hx_get_hexrays_version`](#ida_hexrays.hx_get_hexrays_version) | | | [`hx_open_pseudocode`](#ida_hexrays.hx_open_pseudocode) | | | [`hx_close_pseudocode`](#ida_hexrays.hx_close_pseudocode) | | | [`hx_get_widget_vdui`](#ida_hexrays.hx_get_widget_vdui) | | | [`hx_decompile_many`](#ida_hexrays.hx_decompile_many) | | | [`hx_hexrays_failure_t_desc`](#ida_hexrays.hx_hexrays_failure_t_desc) | | | [`hx_send_database`](#ida_hexrays.hx_send_database) | | | [`hx_gco_info_t_append_to_list`](#ida_hexrays.hx_gco_info_t_append_to_list) | | | [`hx_get_current_operand`](#ida_hexrays.hx_get_current_operand) | | | [`hx_remitem`](#ida_hexrays.hx_remitem) | | | [`hx_negated_relation`](#ida_hexrays.hx_negated_relation) | | | [`hx_swapped_relation`](#ida_hexrays.hx_swapped_relation) | | | [`hx_get_op_signness`](#ida_hexrays.hx_get_op_signness) | | | [`hx_asgop`](#ida_hexrays.hx_asgop) | | | [`hx_asgop_revert`](#ida_hexrays.hx_asgop_revert) | | | [`hx_cnumber_t_print`](#ida_hexrays.hx_cnumber_t_print) | | | [`hx_cnumber_t_value`](#ida_hexrays.hx_cnumber_t_value) | | | [`hx_cnumber_t_assign`](#ida_hexrays.hx_cnumber_t_assign) | | | [`hx_cnumber_t_compare`](#ida_hexrays.hx_cnumber_t_compare) | | | [`hx_var_ref_t_compare`](#ida_hexrays.hx_var_ref_t_compare) | | | [`hx_ctree_visitor_t_apply_to`](#ida_hexrays.hx_ctree_visitor_t_apply_to) | | | [`hx_ctree_visitor_t_apply_to_exprs`](#ida_hexrays.hx_ctree_visitor_t_apply_to_exprs) | | | [`hx_ctree_parentee_t_recalc_parent_types`](#ida_hexrays.hx_ctree_parentee_t_recalc_parent_types) | | | [`hx_cfunc_parentee_t_calc_rvalue_type`](#ida_hexrays.hx_cfunc_parentee_t_calc_rvalue_type) | | | [`hx_citem_locator_t_compare`](#ida_hexrays.hx_citem_locator_t_compare) | | | [`hx_citem_t_contains_expr`](#ida_hexrays.hx_citem_t_contains_expr) | | | [`hx_citem_t_contains_label`](#ida_hexrays.hx_citem_t_contains_label) | | | [`hx_citem_t_find_parent_of`](#ida_hexrays.hx_citem_t_find_parent_of) | | | [`hx_citem_t_find_closest_addr`](#ida_hexrays.hx_citem_t_find_closest_addr) | | | [`hx_cexpr_t_assign`](#ida_hexrays.hx_cexpr_t_assign) | | | [`hx_cexpr_t_compare`](#ida_hexrays.hx_cexpr_t_compare) | | | [`hx_cexpr_t_replace_by`](#ida_hexrays.hx_cexpr_t_replace_by) | | | [`hx_cexpr_t_cleanup`](#ida_hexrays.hx_cexpr_t_cleanup) | | | [`hx_cexpr_t_put_number`](#ida_hexrays.hx_cexpr_t_put_number) | | | [`hx_cexpr_t_print1`](#ida_hexrays.hx_cexpr_t_print1) | | | [`hx_cexpr_t_calc_type`](#ida_hexrays.hx_cexpr_t_calc_type) | | | [`hx_cexpr_t_equal_effect`](#ida_hexrays.hx_cexpr_t_equal_effect) | | | [`hx_cexpr_t_is_child_of`](#ida_hexrays.hx_cexpr_t_is_child_of) | | | [`hx_cexpr_t_contains_operator`](#ida_hexrays.hx_cexpr_t_contains_operator) | | | [`hx_cexpr_t_get_high_nbit_bound`](#ida_hexrays.hx_cexpr_t_get_high_nbit_bound) | | | [`hx_cexpr_t_get_low_nbit_bound`](#ida_hexrays.hx_cexpr_t_get_low_nbit_bound) | | | [`hx_cexpr_t_requires_lvalue`](#ida_hexrays.hx_cexpr_t_requires_lvalue) | | | [`hx_cexpr_t_has_side_effects`](#ida_hexrays.hx_cexpr_t_has_side_effects) | | | [`hx_cexpr_t_maybe_ptr`](#ida_hexrays.hx_cexpr_t_maybe_ptr) | | | [`hx_cexpr_t_dstr`](#ida_hexrays.hx_cexpr_t_dstr) | | | [`hx_cif_t_assign`](#ida_hexrays.hx_cif_t_assign) | | | [`hx_cif_t_compare`](#ida_hexrays.hx_cif_t_compare) | | | [`hx_cloop_t_assign`](#ida_hexrays.hx_cloop_t_assign) | | | [`hx_cfor_t_compare`](#ida_hexrays.hx_cfor_t_compare) | | | [`hx_cwhile_t_compare`](#ida_hexrays.hx_cwhile_t_compare) | | | [`hx_cdo_t_compare`](#ida_hexrays.hx_cdo_t_compare) | | | [`hx_creturn_t_compare`](#ida_hexrays.hx_creturn_t_compare) | | | [`hx_cthrow_t_compare`](#ida_hexrays.hx_cthrow_t_compare) | | | [`hx_cgoto_t_compare`](#ida_hexrays.hx_cgoto_t_compare) | | | [`hx_casm_t_compare`](#ida_hexrays.hx_casm_t_compare) | | | [`hx_cinsn_t_assign`](#ida_hexrays.hx_cinsn_t_assign) | | | [`hx_cinsn_t_compare`](#ida_hexrays.hx_cinsn_t_compare) | | | [`hx_cinsn_t_replace_by`](#ida_hexrays.hx_cinsn_t_replace_by) | | | [`hx_cinsn_t_cleanup`](#ida_hexrays.hx_cinsn_t_cleanup) | | | [`hx_cinsn_t_new_insn`](#ida_hexrays.hx_cinsn_t_new_insn) | | | [`hx_cinsn_t_create_if`](#ida_hexrays.hx_cinsn_t_create_if) | | | [`hx_cinsn_t_print`](#ida_hexrays.hx_cinsn_t_print) | | | [`hx_cinsn_t_print1`](#ida_hexrays.hx_cinsn_t_print1) | | | [`hx_cinsn_t_is_ordinary_flow`](#ida_hexrays.hx_cinsn_t_is_ordinary_flow) | | | [`hx_cinsn_t_contains_insn`](#ida_hexrays.hx_cinsn_t_contains_insn) | | | [`hx_cinsn_t_collect_free_breaks`](#ida_hexrays.hx_cinsn_t_collect_free_breaks) | | | [`hx_cinsn_t_collect_free_continues`](#ida_hexrays.hx_cinsn_t_collect_free_continues) | | | [`hx_cinsn_t_dstr`](#ida_hexrays.hx_cinsn_t_dstr) | | | [`hx_cblock_t_compare`](#ida_hexrays.hx_cblock_t_compare) | | | [`hx_carglist_t_compare`](#ida_hexrays.hx_carglist_t_compare) | | | [`hx_ccase_t_compare`](#ida_hexrays.hx_ccase_t_compare) | | | [`hx_ccases_t_compare`](#ida_hexrays.hx_ccases_t_compare) | | | [`hx_cswitch_t_compare`](#ida_hexrays.hx_cswitch_t_compare) | | | [`hx_ccatch_t_compare`](#ida_hexrays.hx_ccatch_t_compare) | | | [`hx_ctry_t_compare`](#ida_hexrays.hx_ctry_t_compare) | | | [`hx_ctree_item_t_get_udm`](#ida_hexrays.hx_ctree_item_t_get_udm) | | | [`hx_ctree_item_t_get_edm`](#ida_hexrays.hx_ctree_item_t_get_edm) | | | [`hx_ctree_item_t_get_lvar`](#ida_hexrays.hx_ctree_item_t_get_lvar) | | | [`hx_ctree_item_t_get_ea`](#ida_hexrays.hx_ctree_item_t_get_ea) | | | [`hx_ctree_item_t_get_label_num`](#ida_hexrays.hx_ctree_item_t_get_label_num) | | | [`hx_ctree_item_t_print`](#ida_hexrays.hx_ctree_item_t_print) | | | [`hx_ctree_item_t_dstr`](#ida_hexrays.hx_ctree_item_t_dstr) | | | [`hx_lnot`](#ida_hexrays.hx_lnot) | | | [`hx_new_block`](#ida_hexrays.hx_new_block) | | | [`hx_vcreate_helper`](#ida_hexrays.hx_vcreate_helper) | | | [`hx_vcall_helper`](#ida_hexrays.hx_vcall_helper) | | | [`hx_make_num`](#ida_hexrays.hx_make_num) | | | [`hx_make_ref`](#ida_hexrays.hx_make_ref) | | | [`hx_dereference`](#ida_hexrays.hx_dereference) | | | [`hx_save_user_labels`](#ida_hexrays.hx_save_user_labels) | | | [`hx_save_user_cmts`](#ida_hexrays.hx_save_user_cmts) | | | [`hx_save_user_numforms`](#ida_hexrays.hx_save_user_numforms) | | | [`hx_save_user_iflags`](#ida_hexrays.hx_save_user_iflags) | | | [`hx_save_user_unions`](#ida_hexrays.hx_save_user_unions) | | | [`hx_restore_user_labels`](#ida_hexrays.hx_restore_user_labels) | | | [`hx_restore_user_cmts`](#ida_hexrays.hx_restore_user_cmts) | | | [`hx_restore_user_numforms`](#ida_hexrays.hx_restore_user_numforms) | | | [`hx_restore_user_iflags`](#ida_hexrays.hx_restore_user_iflags) | | | [`hx_restore_user_unions`](#ida_hexrays.hx_restore_user_unions) | | | [`hx_cfunc_t_build_c_tree`](#ida_hexrays.hx_cfunc_t_build_c_tree) | | | [`hx_cfunc_t_verify`](#ida_hexrays.hx_cfunc_t_verify) | | | [`hx_cfunc_t_print_dcl`](#ida_hexrays.hx_cfunc_t_print_dcl) | | | [`hx_cfunc_t_print_func`](#ida_hexrays.hx_cfunc_t_print_func) | | | [`hx_cfunc_t_get_func_type`](#ida_hexrays.hx_cfunc_t_get_func_type) | | | [`hx_cfunc_t_get_lvars`](#ida_hexrays.hx_cfunc_t_get_lvars) | | | [`hx_cfunc_t_get_stkoff_delta`](#ida_hexrays.hx_cfunc_t_get_stkoff_delta) | | | [`hx_cfunc_t_find_label`](#ida_hexrays.hx_cfunc_t_find_label) | | | [`hx_cfunc_t_remove_unused_labels`](#ida_hexrays.hx_cfunc_t_remove_unused_labels) | | | [`hx_cfunc_t_get_user_cmt`](#ida_hexrays.hx_cfunc_t_get_user_cmt) | | | [`hx_cfunc_t_set_user_cmt`](#ida_hexrays.hx_cfunc_t_set_user_cmt) | | | [`hx_cfunc_t_get_user_iflags`](#ida_hexrays.hx_cfunc_t_get_user_iflags) | | | [`hx_cfunc_t_set_user_iflags`](#ida_hexrays.hx_cfunc_t_set_user_iflags) | | | [`hx_cfunc_t_has_orphan_cmts`](#ida_hexrays.hx_cfunc_t_has_orphan_cmts) | | | [`hx_cfunc_t_del_orphan_cmts`](#ida_hexrays.hx_cfunc_t_del_orphan_cmts) | | | [`hx_cfunc_t_get_user_union_selection`](#ida_hexrays.hx_cfunc_t_get_user_union_selection) | | | [`hx_cfunc_t_set_user_union_selection`](#ida_hexrays.hx_cfunc_t_set_user_union_selection) | | | [`hx_cfunc_t_save_user_labels`](#ida_hexrays.hx_cfunc_t_save_user_labels) | | | [`hx_cfunc_t_save_user_cmts`](#ida_hexrays.hx_cfunc_t_save_user_cmts) | | | [`hx_cfunc_t_save_user_numforms`](#ida_hexrays.hx_cfunc_t_save_user_numforms) | | | [`hx_cfunc_t_save_user_iflags`](#ida_hexrays.hx_cfunc_t_save_user_iflags) | | | [`hx_cfunc_t_save_user_unions`](#ida_hexrays.hx_cfunc_t_save_user_unions) | | | [`hx_cfunc_t_get_line_item`](#ida_hexrays.hx_cfunc_t_get_line_item) | | | [`hx_cfunc_t_get_warnings`](#ida_hexrays.hx_cfunc_t_get_warnings) | | | [`hx_cfunc_t_get_eamap`](#ida_hexrays.hx_cfunc_t_get_eamap) | | | [`hx_cfunc_t_get_boundaries`](#ida_hexrays.hx_cfunc_t_get_boundaries) | | | [`hx_cfunc_t_get_pseudocode`](#ida_hexrays.hx_cfunc_t_get_pseudocode) | | | [`hx_cfunc_t_refresh_func_ctext`](#ida_hexrays.hx_cfunc_t_refresh_func_ctext) | | | [`hx_cfunc_t_gather_derefs`](#ida_hexrays.hx_cfunc_t_gather_derefs) | | | [`hx_cfunc_t_find_item_coords`](#ida_hexrays.hx_cfunc_t_find_item_coords) | | | [`hx_cfunc_t_cleanup`](#ida_hexrays.hx_cfunc_t_cleanup) | | | [`hx_close_hexrays_waitbox`](#ida_hexrays.hx_close_hexrays_waitbox) | | | [`hx_decompile`](#ida_hexrays.hx_decompile) | | | [`hx_gen_microcode`](#ida_hexrays.hx_gen_microcode) | | | [`hx_create_cfunc`](#ida_hexrays.hx_create_cfunc) | | | [`hx_mark_cfunc_dirty`](#ida_hexrays.hx_mark_cfunc_dirty) | | | [`hx_clear_cached_cfuncs`](#ida_hexrays.hx_clear_cached_cfuncs) | | | [`hx_has_cached_cfunc`](#ida_hexrays.hx_has_cached_cfunc) | | | [`hx_get_ctype_name`](#ida_hexrays.hx_get_ctype_name) | | | [`hx_create_field_name`](#ida_hexrays.hx_create_field_name) | | | [`hx_install_hexrays_callback`](#ida_hexrays.hx_install_hexrays_callback) | | | [`hx_remove_hexrays_callback`](#ida_hexrays.hx_remove_hexrays_callback) | | | [`hx_vdui_t_set_locked`](#ida_hexrays.hx_vdui_t_set_locked) | | | [`hx_vdui_t_refresh_view`](#ida_hexrays.hx_vdui_t_refresh_view) | | | [`hx_vdui_t_refresh_ctext`](#ida_hexrays.hx_vdui_t_refresh_ctext) | | | [`hx_vdui_t_switch_to`](#ida_hexrays.hx_vdui_t_switch_to) | | | [`hx_vdui_t_get_number`](#ida_hexrays.hx_vdui_t_get_number) | | | [`hx_vdui_t_get_current_label`](#ida_hexrays.hx_vdui_t_get_current_label) | | | [`hx_vdui_t_clear`](#ida_hexrays.hx_vdui_t_clear) | | | [`hx_vdui_t_refresh_cpos`](#ida_hexrays.hx_vdui_t_refresh_cpos) | | | [`hx_vdui_t_get_current_item`](#ida_hexrays.hx_vdui_t_get_current_item) | | | [`hx_vdui_t_ui_rename_lvar`](#ida_hexrays.hx_vdui_t_ui_rename_lvar) | | | [`hx_vdui_t_rename_lvar`](#ida_hexrays.hx_vdui_t_rename_lvar) | | | [`hx_vdui_t_ui_set_call_type`](#ida_hexrays.hx_vdui_t_ui_set_call_type) | | | [`hx_vdui_t_ui_set_lvar_type`](#ida_hexrays.hx_vdui_t_ui_set_lvar_type) | | | [`hx_vdui_t_set_lvar_type`](#ida_hexrays.hx_vdui_t_set_lvar_type) | | | [`hx_vdui_t_set_noptr_lvar`](#ida_hexrays.hx_vdui_t_set_noptr_lvar) | | | [`hx_vdui_t_ui_edit_lvar_cmt`](#ida_hexrays.hx_vdui_t_ui_edit_lvar_cmt) | | | [`hx_vdui_t_set_lvar_cmt`](#ida_hexrays.hx_vdui_t_set_lvar_cmt) | | | [`hx_vdui_t_ui_map_lvar`](#ida_hexrays.hx_vdui_t_ui_map_lvar) | | | [`hx_vdui_t_ui_unmap_lvar`](#ida_hexrays.hx_vdui_t_ui_unmap_lvar) | | | [`hx_vdui_t_map_lvar`](#ida_hexrays.hx_vdui_t_map_lvar) | | | [`hx_vdui_t_set_udm_type`](#ida_hexrays.hx_vdui_t_set_udm_type) | | | [`hx_vdui_t_rename_udm`](#ida_hexrays.hx_vdui_t_rename_udm) | | | [`hx_vdui_t_set_global_type`](#ida_hexrays.hx_vdui_t_set_global_type) | | | [`hx_vdui_t_rename_global`](#ida_hexrays.hx_vdui_t_rename_global) | | | [`hx_vdui_t_rename_label`](#ida_hexrays.hx_vdui_t_rename_label) | | | [`hx_vdui_t_jump_enter`](#ida_hexrays.hx_vdui_t_jump_enter) | | | [`hx_vdui_t_ctree_to_disasm`](#ida_hexrays.hx_vdui_t_ctree_to_disasm) | | | [`hx_vdui_t_calc_cmt_type`](#ida_hexrays.hx_vdui_t_calc_cmt_type) | | | [`hx_vdui_t_edit_cmt`](#ida_hexrays.hx_vdui_t_edit_cmt) | | | [`hx_vdui_t_edit_func_cmt`](#ida_hexrays.hx_vdui_t_edit_func_cmt) | | | [`hx_vdui_t_del_orphan_cmts`](#ida_hexrays.hx_vdui_t_del_orphan_cmts) | | | [`hx_vdui_t_set_num_radix`](#ida_hexrays.hx_vdui_t_set_num_radix) | | | [`hx_vdui_t_set_num_enum`](#ida_hexrays.hx_vdui_t_set_num_enum) | | | [`hx_vdui_t_set_num_stroff`](#ida_hexrays.hx_vdui_t_set_num_stroff) | | | [`hx_vdui_t_invert_sign`](#ida_hexrays.hx_vdui_t_invert_sign) | | | [`hx_vdui_t_invert_bits`](#ida_hexrays.hx_vdui_t_invert_bits) | | | [`hx_vdui_t_collapse_item`](#ida_hexrays.hx_vdui_t_collapse_item) | | | [`hx_vdui_t_collapse_lvars`](#ida_hexrays.hx_vdui_t_collapse_lvars) | | | [`hx_vdui_t_split_item`](#ida_hexrays.hx_vdui_t_split_item) | | | [`hx_select_udt_by_offset`](#ida_hexrays.hx_select_udt_by_offset) | | | [`hx_catchexpr_t_compare`](#ida_hexrays.hx_catchexpr_t_compare) | | | [`hx_mba_t_split_block`](#ida_hexrays.hx_mba_t_split_block) | | | [`hx_mba_t_remove_blocks`](#ida_hexrays.hx_mba_t_remove_blocks) | | | [`hx_cfunc_t_recalc_item_addresses`](#ida_hexrays.hx_cfunc_t_recalc_item_addresses) | | | [`hx_obsolete_int64_emulator_t_mop_value`](#ida_hexrays.hx_obsolete_int64_emulator_t_mop_value) | | | [`hx_obsolete_int64_emulator_t_minsn_value`](#ida_hexrays.hx_obsolete_int64_emulator_t_minsn_value) | | | [`hx_int64_emulator_t__mop_value`](#ida_hexrays.hx_int64_emulator_t__mop_value) | | | [`hx_int64_emulator_t__minsn_value`](#ida_hexrays.hx_int64_emulator_t__minsn_value) | | | [`hx_cfunc_t_serialize`](#ida_hexrays.hx_cfunc_t_serialize) | | | [`hx_cfunc_t_deserialize`](#ida_hexrays.hx_cfunc_t_deserialize) | | | [`hx_mblock_t_verify_insn`](#ida_hexrays.hx_mblock_t_verify_insn) | | | [`hx_vdui_t_ui_noprop_lvar`](#ida_hexrays.hx_vdui_t_ui_noprop_lvar) | | | [`hx_save_user_casts`](#ida_hexrays.hx_save_user_casts) | | | [`hx_restore_user_casts`](#ida_hexrays.hx_restore_user_casts) | | | [`hx_user_casts_begin`](#ida_hexrays.hx_user_casts_begin) | | | [`hx_user_casts_end`](#ida_hexrays.hx_user_casts_end) | | | [`hx_user_casts_next`](#ida_hexrays.hx_user_casts_next) | | | [`hx_user_casts_prev`](#ida_hexrays.hx_user_casts_prev) | | | [`hx_user_casts_first`](#ida_hexrays.hx_user_casts_first) | | | [`hx_user_casts_second`](#ida_hexrays.hx_user_casts_second) | | | [`hx_user_casts_find`](#ida_hexrays.hx_user_casts_find) | | | [`hx_user_casts_insert`](#ida_hexrays.hx_user_casts_insert) | | | [`hx_user_casts_erase`](#ida_hexrays.hx_user_casts_erase) | | | [`hx_user_casts_clear`](#ida_hexrays.hx_user_casts_clear) | | | [`hx_user_casts_size`](#ida_hexrays.hx_user_casts_size) | | | [`hx_user_casts_free`](#ida_hexrays.hx_user_casts_free) | | | [`hx_user_casts_new`](#ida_hexrays.hx_user_casts_new) | | | [`hx_cfunc_t_save_user_casts`](#ida_hexrays.hx_cfunc_t_save_user_casts) | | | [`hx_cfunc_t_set_user_cast`](#ida_hexrays.hx_cfunc_t_set_user_cast) | | | [`hx_cfunc_t_get_user_cast`](#ida_hexrays.hx_cfunc_t_get_user_cast) | | | [`hx_vdui_t_ui_add_cast`](#ida_hexrays.hx_vdui_t_ui_add_cast) | | | [`hx_cfunc_t_redirect_gotos`](#ida_hexrays.hx_cfunc_t_redirect_gotos) | | | [`hx_mba_t_add_user_minsn`](#ida_hexrays.hx_mba_t_add_user_minsn) | | | [`hx_mba_t_del_user_minsn`](#ida_hexrays.hx_mba_t_del_user_minsn) | | | [`hx_add_user_minsn`](#ida_hexrays.hx_add_user_minsn) | | | [`hx_del_user_minsn`](#ida_hexrays.hx_del_user_minsn) | | | [`hx_user_minsn_t_compare`](#ida_hexrays.hx_user_minsn_t_compare) | | | [`hx_decomp_ranges_t_range_contains`](#ida_hexrays.hx_decomp_ranges_t_range_contains) | | | [`hx_mba_t_get_decomp_ranges`](#ida_hexrays.hx_mba_t_get_decomp_ranges) | | | [`hx_mba_t_inline_function`](#ida_hexrays.hx_mba_t_inline_function) | | | [`hx_decompile_`](#ida_hexrays.hx_decompile_) | | | [`hx_gen_microcode_`](#ida_hexrays.hx_gen_microcode_) | | | [`hx_mop_t_get_bitwidth`](#ida_hexrays.hx_mop_t_get_bitwidth) | | | [`hx_mblock_t_undef_spoiled_regs`](#ida_hexrays.hx_mblock_t_undef_spoiled_regs) | | | [`hx_mba_t_get_numform`](#ida_hexrays.hx_mba_t_get_numform) | | | [`hx_mba_t_set_numform`](#ida_hexrays.hx_mba_t_set_numform) | | | [`hx_mba_t_clr_numform`](#ida_hexrays.hx_mba_t_clr_numform) | | | [`hx_get_cached_cfunc_eas`](#ida_hexrays.hx_get_cached_cfunc_eas) | | | [`hx_cfunc_t_find_addressable_item`](#ida_hexrays.hx_cfunc_t_find_addressable_item) | | | [`is_small_struni`](#ida_hexrays.is_small_struni) | | | [`mbl_array_t`](#ida_hexrays.mbl_array_t) | | | [`is_allowed_on_small_struni`](#ida_hexrays.is_allowed_on_small_struni) | | | [`decompile_func`](#id373) | | | [`gen_microcode`](#id374) | | | [`create_empty_mba`](#id375) | | ## Exceptions | [`DecompilationFailure`](#ida_hexrays.DecompilationFailure) | Common base class for all non-exit exceptions. | |---------------------------------------------------------------|--------------------------------------------------| ## Classes | [`hexwarns_t`](#ida_hexrays.hexwarns_t) | | |---------------------------------------------------------------------|----| | [`user_numforms_t`](#ida_hexrays.user_numforms_t) | | | [`ctree_items_t`](#ida_hexrays.ctree_items_t) | | | [`user_labels_t`](#ida_hexrays.user_labels_t) | | | [`user_unions_t`](#ida_hexrays.user_unions_t) | | | [`user_cmts_t`](#ida_hexrays.user_cmts_t) | | | [`user_iflags_t`](#ida_hexrays.user_iflags_t) | | | [`cinsnptrvec_t`](#ida_hexrays.cinsnptrvec_t) | | | [`eamap_t`](#ida_hexrays.eamap_t) | | | [`boundaries_t`](#ida_hexrays.boundaries_t) | | | [`cfuncptr_t`](#ida_hexrays.cfuncptr_t) | | | [`qvector_history_t`](#ida_hexrays.qvector_history_t) | | | [`history_t`](#ida_hexrays.history_t) | | | [`cinsn_list_t_iterator`](#ida_hexrays.cinsn_list_t_iterator) | | | [`cinsn_list_t`](#ida_hexrays.cinsn_list_t) | | | [`qvector_carg_t`](#ida_hexrays.qvector_carg_t) | | | [`qvector_ccase_t`](#ida_hexrays.qvector_ccase_t) | | | [`qvector_catchexprs_t`](#ida_hexrays.qvector_catchexprs_t) | | | [`qvector_ccatchvec_t`](#ida_hexrays.qvector_ccatchvec_t) | | | [`cblock_posvec_t`](#ida_hexrays.cblock_posvec_t) | | | [`ui_stroff_ops_t`](#ida_hexrays.ui_stroff_ops_t) | | | [`array_of_bitsets`](#ida_hexrays.array_of_bitsets) | | | [`mopvec_t`](#ida_hexrays.mopvec_t) | | | [`mcallargs_t`](#ida_hexrays.mcallargs_t) | | | [`block_chains_vec_t`](#ida_hexrays.block_chains_vec_t) | | | [`lvar_mapping_t`](#ida_hexrays.lvar_mapping_t) | | | [`qvector_lvar_t`](#ida_hexrays.qvector_lvar_t) | | | [`lvar_saved_infos_t`](#ida_hexrays.lvar_saved_infos_t) | | | [`Hexrays_Hooks`](#ida_hexrays.Hexrays_Hooks) | | | [`valrng_t`](#ida_hexrays.valrng_t) | | | [`hexrays_failure_t`](#ida_hexrays.hexrays_failure_t) | | | [`vd_failure_t`](#ida_hexrays.vd_failure_t) | | | [`vd_interr_t`](#ida_hexrays.vd_interr_t) | | | [`operand_locator_t`](#ida_hexrays.operand_locator_t) | | | [`number_format_t`](#ida_hexrays.number_format_t) | | | [`vd_printer_t`](#ida_hexrays.vd_printer_t) | | | [`vc_printer_t`](#ida_hexrays.vc_printer_t) | | | [`qstring_printer_t`](#ida_hexrays.qstring_printer_t) | | | [`vdloc_t`](#ida_hexrays.vdloc_t) | | | [`lvar_locator_t`](#ida_hexrays.lvar_locator_t) | | | [`lvar_t`](#ida_hexrays.lvar_t) | | | [`lvars_t`](#ida_hexrays.lvars_t) | | | [`lvar_saved_info_t`](#ida_hexrays.lvar_saved_info_t) | | | [`lvar_uservec_t`](#ida_hexrays.lvar_uservec_t) | | | [`user_lvar_modifier_t`](#ida_hexrays.user_lvar_modifier_t) | | | [`udcall_t`](#ida_hexrays.udcall_t) | | | [`microcode_filter_t`](#ida_hexrays.microcode_filter_t) | | | [`udc_filter_t`](#ida_hexrays.udc_filter_t) | | | [`bitset_t`](#ida_hexrays.bitset_t) | | | [`iterator`](#ida_hexrays.iterator) | | | [`node_bitset_t`](#ida_hexrays.node_bitset_t) | | | [`array_of_node_bitset_t`](#ida_hexrays.array_of_node_bitset_t) | | | [`ivl_t`](#ida_hexrays.ivl_t) | | | [`ivl_with_name_t`](#ida_hexrays.ivl_with_name_t) | | | [`ivlset_visitor_t`](#ida_hexrays.ivlset_visitor_t) | | | [`ivlset_t`](#ida_hexrays.ivlset_t) | | | [`rlist_t`](#ida_hexrays.rlist_t) | | | [`mlist_t`](#ida_hexrays.mlist_t) | | | [`optinsn_t`](#ida_hexrays.optinsn_t) | | | [`optblock_t`](#ida_hexrays.optblock_t) | | | [`simple_graph_t`](#ida_hexrays.simple_graph_t) | | | [`op_parent_info_t`](#ida_hexrays.op_parent_info_t) | | | [`minsn_visitor_t`](#ida_hexrays.minsn_visitor_t) | | | [`mop_visitor_t`](#ida_hexrays.mop_visitor_t) | | | [`scif_visitor_t`](#ida_hexrays.scif_visitor_t) | | | [`mlist_mop_visitor_t`](#ida_hexrays.mlist_mop_visitor_t) | | | [`lvar_ref_t`](#ida_hexrays.lvar_ref_t) | | | [`stkvar_ref_t`](#ida_hexrays.stkvar_ref_t) | | | [`scif_t`](#ida_hexrays.scif_t) | | | [`mnumber_t`](#ida_hexrays.mnumber_t) | | | [`fnumber_t`](#ida_hexrays.fnumber_t) | | | [`mop_t`](#ida_hexrays.mop_t) | | | [`mop_pair_t`](#ida_hexrays.mop_pair_t) | | | [`mop_addr_t`](#ida_hexrays.mop_addr_t) | | | [`mcallarg_t`](#ida_hexrays.mcallarg_t) | | | [`mcallinfo_t`](#ida_hexrays.mcallinfo_t) | | | [`mcases_t`](#ida_hexrays.mcases_t) | | | [`voff_t`](#ida_hexrays.voff_t) | | | [`vivl_t`](#ida_hexrays.vivl_t) | | | [`chain_t`](#ida_hexrays.chain_t) | | | [`block_chains_t`](#ida_hexrays.block_chains_t) | | | [`chain_visitor_t`](#ida_hexrays.chain_visitor_t) | | | [`graph_chains_t`](#ida_hexrays.graph_chains_t) | | | [`minsn_t`](#ida_hexrays.minsn_t) | | | [`intval64_t`](#ida_hexrays.intval64_t) | | | [`int64_emulator_t`](#ida_hexrays.int64_emulator_t) | | | [`mblock_t`](#ida_hexrays.mblock_t) | | | [`hexwarn_t`](#ida_hexrays.hexwarn_t) | | | [`minsn_locator_t`](#ida_hexrays.minsn_locator_t) | | | [`user_minsn_t`](#ida_hexrays.user_minsn_t) | | | [`mba_ranges_t`](#ida_hexrays.mba_ranges_t) | | | [`decomp_ranges_t`](#ida_hexrays.decomp_ranges_t) | | | [`mba_range_iterator_t`](#ida_hexrays.mba_range_iterator_t) | | | [`decomp_range_iterator_t`](#ida_hexrays.decomp_range_iterator_t) | | | [`mba_t`](#ida_hexrays.mba_t) | | | [`chain_keeper_t`](#ida_hexrays.chain_keeper_t) | | | [`mbl_graph_t`](#ida_hexrays.mbl_graph_t) | | | [`cdg_insn_iterator_t`](#ida_hexrays.cdg_insn_iterator_t) | | | [`codegen_t`](#ida_hexrays.codegen_t) | | | [`gco_info_t`](#ida_hexrays.gco_info_t) | | | [`cnumber_t`](#ida_hexrays.cnumber_t) | | | [`var_ref_t`](#ida_hexrays.var_ref_t) | | | [`treeloc_t`](#ida_hexrays.treeloc_t) | | | [`citem_cmt_t`](#ida_hexrays.citem_cmt_t) | | | [`citem_locator_t`](#ida_hexrays.citem_locator_t) | | | [`bit_bound_t`](#ida_hexrays.bit_bound_t) | | | [`citem_t`](#ida_hexrays.citem_t) | | | [`cexpr_t`](#ida_hexrays.cexpr_t) | | | [`ceinsn_t`](#ida_hexrays.ceinsn_t) | | | [`cif_t`](#ida_hexrays.cif_t) | | | [`cloop_t`](#ida_hexrays.cloop_t) | | | [`cfor_t`](#ida_hexrays.cfor_t) | | | [`cwhile_t`](#ida_hexrays.cwhile_t) | | | [`cdo_t`](#ida_hexrays.cdo_t) | | | [`creturn_t`](#ida_hexrays.creturn_t) | | | [`cgoto_t`](#ida_hexrays.cgoto_t) | | | [`casm_t`](#ida_hexrays.casm_t) | | | [`cinsn_t`](#ida_hexrays.cinsn_t) | | | [`cblock_t`](#ida_hexrays.cblock_t) | | | [`carg_t`](#ida_hexrays.carg_t) | | | [`carglist_t`](#ida_hexrays.carglist_t) | | | [`ccase_t`](#ida_hexrays.ccase_t) | | | [`ccases_t`](#ida_hexrays.ccases_t) | | | [`cswitch_t`](#ida_hexrays.cswitch_t) | | | [`catchexpr_t`](#ida_hexrays.catchexpr_t) | | | [`ccatch_t`](#ida_hexrays.ccatch_t) | | | [`ctry_t`](#ida_hexrays.ctry_t) | | | [`cthrow_t`](#ida_hexrays.cthrow_t) | | | [`cblock_pos_t`](#ida_hexrays.cblock_pos_t) | | | [`ctree_visitor_t`](#ida_hexrays.ctree_visitor_t) | | | [`ctree_parentee_t`](#ida_hexrays.ctree_parentee_t) | | | [`cfunc_parentee_t`](#ida_hexrays.cfunc_parentee_t) | | | [`ctree_anchor_t`](#ida_hexrays.ctree_anchor_t) | | | [`ctree_item_t`](#ida_hexrays.ctree_item_t) | | | [`cfunc_t`](#ida_hexrays.cfunc_t) | | | [`ctext_position_t`](#ida_hexrays.ctext_position_t) | | | [`history_item_t`](#ida_hexrays.history_item_t) | | | [`vdui_t`](#ida_hexrays.vdui_t) | | | [`ui_stroff_op_t`](#ida_hexrays.ui_stroff_op_t) | | | [`ui_stroff_applicator_t`](#ida_hexrays.ui_stroff_applicator_t) | | | [`user_numforms_iterator_t`](#ida_hexrays.user_numforms_iterator_t) | | | [`lvar_mapping_iterator_t`](#ida_hexrays.lvar_mapping_iterator_t) | | | [`udcall_map_iterator_t`](#ida_hexrays.udcall_map_iterator_t) | | | [`user_cmts_iterator_t`](#ida_hexrays.user_cmts_iterator_t) | | | [`user_iflags_iterator_t`](#ida_hexrays.user_iflags_iterator_t) | | | [`user_casts_iterator_t`](#ida_hexrays.user_casts_iterator_t) | | | [`user_unions_iterator_t`](#ida_hexrays.user_unions_iterator_t) | | | [`user_labels_iterator_t`](#ida_hexrays.user_labels_iterator_t) | | | [`eamap_iterator_t`](#ida_hexrays.eamap_iterator_t) | | | [`boundaries_iterator_t`](#ida_hexrays.boundaries_iterator_t) | | | [`block_chains_iterator_t`](#ida_hexrays.block_chains_iterator_t) | | | [`array_of_ivlsets`](#ida_hexrays.array_of_ivlsets) | | ## Functions | [`get_widget_vdui`](#ida_hexrays.get_widget_vdui)(→ vdui_t \*) | Get the vdui_t instance associated to the TWidget | |--------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [`init_hexrays_plugin`](#ida_hexrays.init_hexrays_plugin)(→ bool) | Check that your plugin is compatible with hex-rays decompiler. This function must be called before calling any other decompiler function. | | [`boundaries_find`](#ida_hexrays.boundaries_find)(→ boundaries_iterator_t) | Find the specified key in boundaries_t. | | [`boundaries_insert`](#ida_hexrays.boundaries_insert)(→ boundaries_iterator_t) | Insert new (cinsn_t

```
*
```

, rangeset_t) pair into boundaries_t. | | [`term_hexrays_plugin`](#ida_hexrays.term_hexrays_plugin)(→ None) | Stop working with hex-rays decompiler. | | [`debug_hexrays_ctree`](#ida_hexrays.debug_hexrays_ctree)(→ None) | | | [`qswap`](#ida_hexrays.qswap)(→ None) | | | [`hexrays_alloc`](#ida_hexrays.hexrays_alloc)(→ void \*) | | | [`hexrays_free`](#ida_hexrays.hexrays_free)(→ None) | | | [`max_vlr_value`](#ida_hexrays.max_vlr_value)(→ uvlr_t) | | | [`min_vlr_svalue`](#ida_hexrays.min_vlr_svalue)(→ uvlr_t) | | | [`max_vlr_svalue`](#ida_hexrays.max_vlr_svalue)(→ uvlr_t) | | | [`is_unsigned_cmpop`](#ida_hexrays.is_unsigned_cmpop)(→ bool) | | | [`is_signed_cmpop`](#ida_hexrays.is_signed_cmpop)(→ bool) | | | [`is_cmpop_with_eq`](#ida_hexrays.is_cmpop_with_eq)(→ bool) | | | [`is_cmpop_without_eq`](#ida_hexrays.is_cmpop_without_eq)(→ bool) | | | [`is_may_access`](#ida_hexrays.is_may_access)(→ bool) | | | [`get_merror_desc`](#ida_hexrays.get_merror_desc)(→ Union[str, None]) | Get textual description of an error code | | [`must_mcode_close_block`](#ida_hexrays.must_mcode_close_block)(→ bool) | Must an instruction with the given opcode be the last one in a block? Such opcodes are called closing opcodes. | | [`is_mcode_propagatable`](#ida_hexrays.is_mcode_propagatable)(→ bool) | May opcode be propagated? Such opcodes can be used in sub-instructions (nested instructions) There is a handful of non-propagatable opcodes, like jumps, ret, nop, etc All other regular opcodes are propagatable and may appear in a nested instruction. | | [`is_mcode_addsub`](#ida_hexrays.is_mcode_addsub)(→ bool) | | | [`is_mcode_xdsu`](#ida_hexrays.is_mcode_xdsu)(→ bool) | | | [`is_mcode_set`](#ida_hexrays.is_mcode_set)(→ bool) | | | [`is_mcode_set1`](#ida_hexrays.is_mcode_set1)(→ bool) | | | [`is_mcode_j1`](#ida_hexrays.is_mcode_j1)(→ bool) | | | [`is_mcode_jcond`](#ida_hexrays.is_mcode_jcond)(→ bool) | | | [`is_mcode_convertible_to_jmp`](#ida_hexrays.is_mcode_convertible_to_jmp)(→ bool) | | | [`is_mcode_convertible_to_set`](#ida_hexrays.is_mcode_convertible_to_set)(→ bool) | | | [`is_mcode_call`](#ida_hexrays.is_mcode_call)(→ bool) | | | [`is_mcode_fpu`](#ida_hexrays.is_mcode_fpu)(→ bool) | | | [`is_mcode_commutative`](#ida_hexrays.is_mcode_commutative)(→ bool) | | | [`is_mcode_shift`](#ida_hexrays.is_mcode_shift)(→ bool) | | | [`is_mcode_divmod`](#ida_hexrays.is_mcode_divmod)(→ bool) | | | [`has_mcode_seloff`](#ida_hexrays.has_mcode_seloff)(→ bool) | | | [`set2jcnd`](#ida_hexrays.set2jcnd)(→ mcode_t) | | | [`jcnd2set`](#ida_hexrays.jcnd2set)(→ mcode_t) | | | [`negate_mcode_relation`](#ida_hexrays.negate_mcode_relation)(→ mcode_t) | | | [`swap_mcode_relation`](#ida_hexrays.swap_mcode_relation)(→ mcode_t) | | | [`get_signed_mcode`](#ida_hexrays.get_signed_mcode)(→ mcode_t) | | | [`get_unsigned_mcode`](#ida_hexrays.get_unsigned_mcode)(→ mcode_t) | | | [`is_signed_mcode`](#ida_hexrays.is_signed_mcode)(→ bool) | | | [`is_unsigned_mcode`](#ida_hexrays.is_unsigned_mcode)(→ bool) | | | [`mcode_modifies_d`](#ida_hexrays.mcode_modifies_d)(→ bool) | | | [`dstr`](#ida_hexrays.dstr)(→ str) | Print the specified type info. This function can be used from a debugger by typing "tif->dstr()" | | [`is_type_correct`](#ida_hexrays.is_type_correct)(→ bool) | Verify a type string. | | [`is_small_udt`](#ida_hexrays.is_small_udt)(→ bool) | Is a small structure or union? | | [`is_nonbool_type`](#ida_hexrays.is_nonbool_type)(→ bool) | Is definitely a non-boolean type? | | [`is_bool_type`](#ida_hexrays.is_bool_type)(→ bool) | Is a boolean type? | | [`is_ptr_or_array`](#ida_hexrays.is_ptr_or_array)(→ bool) | Is a pointer or array type? | | [`is_paf`](#ida_hexrays.is_paf)(→ bool) | Is a pointer, array, or function type? | | [`is_inplace_def`](#ida_hexrays.is_inplace_def)(→ bool) | Is struct/union/enum definition (not declaration)? | | [`partial_type_num`](#ida_hexrays.partial_type_num)(→ int) | Calculate number of partial subtypes. | | [`get_float_type`](#ida_hexrays.get_float_type)(→ tinfo_t) | Get a type of a floating point value with the specified width | | [`get_int_type_by_width_and_sign`](#ida_hexrays.get_int_type_by_width_and_sign)(→ tinfo_t) | Create a type info by width and sign. Returns a simple type (examples: int, short) with the given width and sign. | | [`get_unk_type`](#ida_hexrays.get_unk_type)(→ tinfo_t) | Create a partial type info by width. Returns a partially defined type (examples: \_DWORD, \_BYTE) with the given width. | | [`dummy_ptrtype`](#ida_hexrays.dummy_ptrtype)(→ tinfo_t) | Generate a dummy pointer type | | [`make_pointer`](#ida_hexrays.make_pointer)(→ tinfo_t) | Create a pointer type. This function performs the following conversion: "type" -> "type\*" | | [`create_typedef`](#ida_hexrays.create_typedef)(→ tinfo_t) | This function has the following signatures: | | [`get_type`](#ida_hexrays.get_type)(→ bool) | Get a global type. Global types are types of addressable objects and struct/union/enum types | | [`set_type`](#ida_hexrays.set_type)(→ bool) | Set a global type. | | [`print_vdloc`](#ida_hexrays.print_vdloc)(→ str) | Print vdloc. Since vdloc does not always carry the size info, we pass it as NBYTES.. | | [`arglocs_overlap`](#ida_hexrays.arglocs_overlap)(→ bool) | Do two arglocs overlap? | | [`restore_user_lvar_settings`](#ida_hexrays.restore_user_lvar_settings)(→ bool) | Restore user defined local variable settings in the database. | | [`save_user_lvar_settings`](#ida_hexrays.save_user_lvar_settings)(→ None) | Save user defined local variable settings into the database. | | [`modify_user_lvars`](#ida_hexrays.modify_user_lvars)(→ bool) | Modify saved local variable settings. | | [`modify_user_lvar_info`](#ida_hexrays.modify_user_lvar_info)(→ bool) | Modify saved local variable settings of one variable. | | [`locate_lvar`](#ida_hexrays.locate_lvar)(→ bool) | Find a variable by name. | | [`rename_lvar`](#ida_hexrays.rename_lvar)(→ bool) | Rename a local variable. | | [`restore_user_defined_calls`](#ida_hexrays.restore_user_defined_calls)(→ bool) | Restore user defined function calls from the database. | | [`save_user_defined_calls`](#ida_hexrays.save_user_defined_calls)(→ None) | Save user defined local function calls into the database. | | [`parse_user_call`](#ida_hexrays.parse_user_call)(→ bool) | Convert function type declaration into internal structure | | [`convert_to_user_call`](#ida_hexrays.convert_to_user_call)(→ merror_t) | try to generate user-defined call for an instruction | | [`install_microcode_filter`](#ida_hexrays.install_microcode_filter)(→ bool) | register/unregister non-standard microcode generator | | [`get_temp_regs`](#ida_hexrays.get_temp_regs)(→ mlist_t const &) | Get list of temporary registers. Tempregs are temporary registers that are used during code generation. They do not map to regular processor registers. They are used only to store temporary values during execution of one instruction. Tempregs may not be used to pass a value from one block to another. In other words, at the end of a block all tempregs must be dead. | | [`is_kreg`](#ida_hexrays.is_kreg)(→ bool) | Is a kernel register? Kernel registers are temporary registers that can be used freely. They may be used to store values that cross instruction or basic block boundaries. Kernel registers do not map to regular processor registers. See also mba_t::alloc_kreg() | | [`reg2mreg`](#ida_hexrays.reg2mreg)(→ mreg_t) | Map a processor register to a microregister. | | [`mreg2reg`](#ida_hexrays.mreg2reg)(→ int) | Map a microregister to a processor register. | | [`get_mreg_name`](#ida_hexrays.get_mreg_name)(→ str) | Get the microregister name. | | [`lexcompare`](#ida_hexrays.lexcompare)(→ int) | | | [`is_eh_role`](#ida_hexrays.is_eh_role)(→ bool) | Is this an EH exception handling role? | | [`getf_reginsn`](#ida_hexrays.getf_reginsn)(→ minsn_t \*) | Skip assertions forward. | | [`getb_reginsn`](#ida_hexrays.getb_reginsn)(→ minsn_t \*) | Skip assertions backward. | | [`add_user_minsn`](#ida_hexrays.add_user_minsn)(→ None) | Add a user-defined microinstruction action. This is a standalone version that loads user minsns from the database, adds the action, and saves back. Use it when an mba_t is not available. | | [`del_user_minsn`](#ida_hexrays.del_user_minsn)(→ bool) | Delete a user-defined microinstruction action. This is a standalone version that loads user minsns from the database, deletes the action, and saves back. Use it when an mba_t is not available. | | [`change_hexrays_config`](#ida_hexrays.change_hexrays_config)(→ bool) | Parse DIRECTIVE and update the current configuration variables. For the syntax see hexrays.cfg | | [`get_hexrays_version`](#ida_hexrays.get_hexrays_version)(→ str) | Get decompiler version. The returned string is of the form ... | | [`open_pseudocode`](#ida_hexrays.open_pseudocode)(→ vdui_t \*) | Open pseudocode window. The specified function is decompiled and the pseudocode window is opened. | | [`close_pseudocode`](#ida_hexrays.close_pseudocode)(→ bool) | Close pseudocode window. | | [`decompile_many`](#ida_hexrays.decompile_many)(→ bool) | Batch decompilation. Decompile all or the specified functions | | [`send_database`](#ida_hexrays.send_database)(→ None) | Send the database to Hex-Rays. This function sends the current database to the Hex-Rays server. The database is sent in the compressed form over an encrypted (SSL) connection. | | [`get_current_operand`](#ida_hexrays.get_current_operand)(→ bool) | Get the instruction operand under the cursor. This function determines the operand that is under the cursor in the active disassembly listing. If the operand refers to a register or stack variable, it returns true. | | [`remitem`](#ida_hexrays.remitem)(→ None) | | | [`negated_relation`](#ida_hexrays.negated_relation)(→ ctype_t) | Negate a comparison operator. For example, cot_sge becomes cot_slt. | | [`swapped_relation`](#ida_hexrays.swapped_relation)(→ ctype_t) | Swap a comparison operator. For example, cot_sge becomes cot_sle. | | [`get_op_signness`](#ida_hexrays.get_op_signness)(→ type_sign_t) | Get operator sign. Meaningful for sign-dependent operators, like cot_sdiv. | | [`asgop`](#ida_hexrays.asgop)(→ ctype_t) | Convert plain operator into assignment operator. For example, cot_add returns cot_asgadd. | | [`asgop_revert`](#ida_hexrays.asgop_revert)(→ ctype_t) | Convert assignment operator into plain operator. For example, cot_asgadd returns cot_add | | [`op_uses_x`](#ida_hexrays.op_uses_x)(→ bool) | Does operator use the 'x' field of cexpr_t? | | [`op_uses_y`](#ida_hexrays.op_uses_y)(→ bool) | Does operator use the 'y' field of cexpr_t? | | [`op_uses_z`](#ida_hexrays.op_uses_z)(→ bool) | Does operator use the 'z' field of cexpr_t? | | [`is_binary`](#ida_hexrays.is_binary)(→ bool) | Is binary operator? | | [`is_unary`](#ida_hexrays.is_unary)(→ bool) | Is unary operator? | | [`is_relational`](#ida_hexrays.is_relational)(→ bool) | Is comparison operator? | | [`is_assignment`](#ida_hexrays.is_assignment)(→ bool) | Is assignment operator? | | [`accepts_udts`](#ida_hexrays.accepts_udts)(→ bool) | | | [`is_prepost`](#ida_hexrays.is_prepost)(→ bool) | Is pre/post increment/decrement operator? | | [`is_commutative`](#ida_hexrays.is_commutative)(→ bool) | Is commutative operator? | | [`is_additive`](#ida_hexrays.is_additive)(→ bool) | Is additive operator? | | [`is_multiplicative`](#ida_hexrays.is_multiplicative)(→ bool) | Is multiplicative operator? | | [`is_bitop`](#ida_hexrays.is_bitop)(→ bool) | Is bit related operator? | | [`is_logical`](#ida_hexrays.is_logical)(→ bool) | Is logical operator? | | [`is_loop`](#ida_hexrays.is_loop)(→ bool) | Is loop statement code? | | [`is_break_consumer`](#ida_hexrays.is_break_consumer)(→ bool) | Does a break statement influence the specified statement code? | | [`is_lvalue`](#ida_hexrays.is_lvalue)(→ bool) | Is Lvalue operator? | | [`accepts_small_udts`](#ida_hexrays.accepts_small_udts)(→ bool) | Is the operator allowed on small structure or union? | | [`save_user_labels`](#ida_hexrays.save_user_labels)(→ None) | Save user defined labels into the database. | | [`save_user_cmts`](#ida_hexrays.save_user_cmts)(→ None) | Save user defined comments into the database. | | [`save_user_numforms`](#ida_hexrays.save_user_numforms)(→ None) | Save user defined number formats into the database. | | [`save_user_iflags`](#ida_hexrays.save_user_iflags)(→ None) | Save user defined citem iflags into the database. | | [`save_user_unions`](#ida_hexrays.save_user_unions)(→ None) | Save user defined union field selections into the database. | | [`save_user_casts`](#ida_hexrays.save_user_casts)(→ None) | Save user defined casts into the database. | | [`restore_user_casts`](#ida_hexrays.restore_user_casts)(→ user_casts_t \*) | Restore user defined casts from the database. | | [`restore_user_labels`](#ida_hexrays.restore_user_labels)(→ user_labels_t \*) | Restore user defined labels from the database. | | [`restore_user_cmts`](#ida_hexrays.restore_user_cmts)(→ user_cmts_t \*) | Restore user defined comments from the database. | | [`restore_user_numforms`](#ida_hexrays.restore_user_numforms)(→ user_numforms_t \*) | Restore user defined number formats from the database. | | [`restore_user_iflags`](#ida_hexrays.restore_user_iflags)(→ user_iflags_t \*) | Restore user defined citem iflags from the database. | | [`restore_user_unions`](#ida_hexrays.restore_user_unions)(→ user_unions_t \*) | Restore user defined union field selections from the database. | | [`close_hexrays_waitbox`](#ida_hexrays.close_hexrays_waitbox)(→ None) | Close the waitbox displayed by the decompiler. Useful if DECOMP_NO_HIDE was used during decompilation. | | [`decompile`](#id0)(ea[, hf, flags]) | Decompile a snippet or a function. | | [`decompile_func`](#id373) | | | [`decompile_function`](#ida_hexrays.decompile_function)(→ cfuncptr_t) | Decompile a function (ea-based variant). Multiple decompilations of the same function return the same object. Replaces the deprecated decompile_func(func_t

```
*
```

). | | [`gen_microcode`](#id374) | | | [`create_empty_mba`](#id375) | | | [`create_cfunc`](#ida_hexrays.create_cfunc)(→ cfuncptr_t) | Create a new cfunc_t object. | | [`mark_cfunc_dirty`](#ida_hexrays.mark_cfunc_dirty)(→ bool) | Flush the cached decompilation results. Erases a cache entry for the specified function. | | [`clear_cached_cfuncs`](#ida_hexrays.clear_cached_cfuncs)(→ None) | Flush all cached decompilation results. | | [`has_cached_cfunc`](#ida_hexrays.has_cached_cfunc)(→ bool) | Do we have a cached decompilation result for 'ea'? | | [`get_cached_cfunc_eas`](#ida_hexrays.get_cached_cfunc_eas)(→ None) | Return the start EAs of all cached cfunc_t objects. | | [`get_ctype_name`](#ida_hexrays.get_ctype_name)(→ str) | | | [`create_field_name`](#ida_hexrays.create_field_name)(→ str) | | | [`select_udt_by_offset`](#ida_hexrays.select_udt_by_offset)(→ int) | Select UDT | | [`user_numforms_first`](#ida_hexrays.user_numforms_first)(→ operand_locator_t const &) | Get reference to the current map key. | | [`user_numforms_second`](#ida_hexrays.user_numforms_second)(→ number_format_t &) | Get reference to the current map value. | | [`user_numforms_find`](#ida_hexrays.user_numforms_find)(→ user_numforms_iterator_t) | Find the specified key in user_numforms_t. | | [`user_numforms_insert`](#ida_hexrays.user_numforms_insert)(→ user_numforms_iterator_t) | Insert new (operand_locator_t, number_format_t) pair into user_numforms_t. | | [`user_numforms_begin`](#ida_hexrays.user_numforms_begin)(→ user_numforms_iterator_t) | Get iterator pointing to the beginning of user_numforms_t. | | [`user_numforms_end`](#ida_hexrays.user_numforms_end)(→ user_numforms_iterator_t) | Get iterator pointing to the end of user_numforms_t. | | [`user_numforms_next`](#ida_hexrays.user_numforms_next)(→ user_numforms_iterator_t) | Move to the next element. | | [`user_numforms_prev`](#ida_hexrays.user_numforms_prev)(→ user_numforms_iterator_t) | Move to the previous element. | | [`user_numforms_erase`](#ida_hexrays.user_numforms_erase)(→ None) | Erase current element from user_numforms_t. | | [`user_numforms_clear`](#ida_hexrays.user_numforms_clear)(→ None) | Clear user_numforms_t. | | [`user_numforms_size`](#ida_hexrays.user_numforms_size)(→ int) | Get size of user_numforms_t. | | [`user_numforms_free`](#ida_hexrays.user_numforms_free)(→ None) | Delete user_numforms_t instance. | | [`user_numforms_new`](#ida_hexrays.user_numforms_new)(→ user_numforms_t \*) | Create a new user_numforms_t instance. | | [`lvar_mapping_first`](#ida_hexrays.lvar_mapping_first)(→ lvar_locator_t const &) | Get reference to the current map key. | | [`lvar_mapping_second`](#ida_hexrays.lvar_mapping_second)(→ lvar_locator_t &) | Get reference to the current map value. | | [`lvar_mapping_find`](#ida_hexrays.lvar_mapping_find)(→ lvar_mapping_iterator_t) | Find the specified key in lvar_mapping_t. | | [`lvar_mapping_insert`](#ida_hexrays.lvar_mapping_insert)(→ lvar_mapping_iterator_t) | Insert new (lvar_locator_t, lvar_locator_t) pair into lvar_mapping_t. | | [`lvar_mapping_begin`](#ida_hexrays.lvar_mapping_begin)(→ lvar_mapping_iterator_t) | Get iterator pointing to the beginning of lvar_mapping_t. | | [`lvar_mapping_end`](#ida_hexrays.lvar_mapping_end)(→ lvar_mapping_iterator_t) | Get iterator pointing to the end of lvar_mapping_t. | | [`lvar_mapping_next`](#ida_hexrays.lvar_mapping_next)(→ lvar_mapping_iterator_t) | Move to the next element. | | [`lvar_mapping_prev`](#ida_hexrays.lvar_mapping_prev)(→ lvar_mapping_iterator_t) | Move to the previous element. | | [`lvar_mapping_erase`](#ida_hexrays.lvar_mapping_erase)(→ None) | Erase current element from lvar_mapping_t. | | [`lvar_mapping_clear`](#ida_hexrays.lvar_mapping_clear)(→ None) | Clear lvar_mapping_t. | | [`lvar_mapping_size`](#ida_hexrays.lvar_mapping_size)(→ int) | Get size of lvar_mapping_t. | | [`lvar_mapping_free`](#ida_hexrays.lvar_mapping_free)(→ None) | Delete lvar_mapping_t instance. | | [`lvar_mapping_new`](#ida_hexrays.lvar_mapping_new)(→ lvar_mapping_t \*) | Create a new lvar_mapping_t instance. | | [`udcall_map_first`](#ida_hexrays.udcall_map_first)(→ ea_t const &) | Get reference to the current map key. | | [`udcall_map_second`](#ida_hexrays.udcall_map_second)(→ udcall_t &) | Get reference to the current map value. | | [`udcall_map_find`](#ida_hexrays.udcall_map_find)(→ udcall_map_iterator_t) | Find the specified key in udcall_map_t. | | [`udcall_map_insert`](#ida_hexrays.udcall_map_insert)(→ udcall_map_iterator_t) | Insert new (ea_t, udcall_t) pair into udcall_map_t. | | [`udcall_map_begin`](#ida_hexrays.udcall_map_begin)(→ udcall_map_iterator_t) | Get iterator pointing to the beginning of udcall_map_t. | | [`udcall_map_end`](#ida_hexrays.udcall_map_end)(→ udcall_map_iterator_t) | Get iterator pointing to the end of udcall_map_t. | | [`udcall_map_next`](#ida_hexrays.udcall_map_next)(→ udcall_map_iterator_t) | Move to the next element. | | [`udcall_map_prev`](#ida_hexrays.udcall_map_prev)(→ udcall_map_iterator_t) | Move to the previous element. | | [`udcall_map_erase`](#ida_hexrays.udcall_map_erase)(→ None) | Erase current element from udcall_map_t. | | [`udcall_map_clear`](#ida_hexrays.udcall_map_clear)(→ None) | Clear udcall_map_t. | | [`udcall_map_size`](#ida_hexrays.udcall_map_size)(→ int) | Get size of udcall_map_t. | | [`udcall_map_free`](#ida_hexrays.udcall_map_free)(→ None) | Delete udcall_map_t instance. | | [`udcall_map_new`](#ida_hexrays.udcall_map_new)(→ udcall_map_t \*) | Create a new udcall_map_t instance. | | [`user_cmts_first`](#ida_hexrays.user_cmts_first)(→ treeloc_t const &) | Get reference to the current map key. | | [`user_cmts_second`](#ida_hexrays.user_cmts_second)(→ citem_cmt_t &) | Get reference to the current map value. | | [`user_cmts_find`](#ida_hexrays.user_cmts_find)(→ user_cmts_iterator_t) | Find the specified key in user_cmts_t. | | [`user_cmts_insert`](#ida_hexrays.user_cmts_insert)(→ user_cmts_iterator_t) | Insert new (treeloc_t, citem_cmt_t) pair into user_cmts_t. | | [`user_cmts_begin`](#ida_hexrays.user_cmts_begin)(→ user_cmts_iterator_t) | Get iterator pointing to the beginning of user_cmts_t. | | [`user_cmts_end`](#ida_hexrays.user_cmts_end)(→ user_cmts_iterator_t) | Get iterator pointing to the end of user_cmts_t. | | [`user_cmts_next`](#ida_hexrays.user_cmts_next)(→ user_cmts_iterator_t) | Move to the next element. | | [`user_cmts_prev`](#ida_hexrays.user_cmts_prev)(→ user_cmts_iterator_t) | Move to the previous element. | | [`user_cmts_erase`](#ida_hexrays.user_cmts_erase)(→ None) | Erase current element from user_cmts_t. | | [`user_cmts_clear`](#ida_hexrays.user_cmts_clear)(→ None) | Clear user_cmts_t. | | [`user_cmts_size`](#ida_hexrays.user_cmts_size)(→ int) | Get size of user_cmts_t. | | [`user_cmts_free`](#ida_hexrays.user_cmts_free)(→ None) | Delete user_cmts_t instance. | | [`user_cmts_new`](#ida_hexrays.user_cmts_new)(→ user_cmts_t \*) | Create a new user_cmts_t instance. | | [`user_iflags_first`](#ida_hexrays.user_iflags_first)(→ citem_locator_t const &) | Get reference to the current map key. | | [`user_iflags_second`](#ida_hexrays.user_iflags_second)(→ int32 &) | Get reference to the current map value. | | [`user_iflags_find`](#ida_hexrays.user_iflags_find)(→ user_iflags_iterator_t) | Find the specified key in user_iflags_t. | | [`user_iflags_insert`](#ida_hexrays.user_iflags_insert)(→ user_iflags_iterator_t) | Insert new (citem_locator_t, int32) pair into user_iflags_t. | | [`user_iflags_begin`](#ida_hexrays.user_iflags_begin)(→ user_iflags_iterator_t) | Get iterator pointing to the beginning of user_iflags_t. | | [`user_iflags_end`](#ida_hexrays.user_iflags_end)(→ user_iflags_iterator_t) | Get iterator pointing to the end of user_iflags_t. | | [`user_iflags_next`](#ida_hexrays.user_iflags_next)(→ user_iflags_iterator_t) | Move to the next element. | | [`user_iflags_prev`](#ida_hexrays.user_iflags_prev)(→ user_iflags_iterator_t) | Move to the previous element. | | [`user_iflags_erase`](#ida_hexrays.user_iflags_erase)(→ None) | Erase current element from user_iflags_t. | | [`user_iflags_clear`](#ida_hexrays.user_iflags_clear)(→ None) | Clear user_iflags_t. | | [`user_iflags_size`](#ida_hexrays.user_iflags_size)(→ int) | Get size of user_iflags_t. | | [`user_iflags_free`](#ida_hexrays.user_iflags_free)(→ None) | Delete user_iflags_t instance. | | [`user_iflags_new`](#ida_hexrays.user_iflags_new)(→ user_iflags_t \*) | Create a new user_iflags_t instance. | | [`user_casts_first`](#ida_hexrays.user_casts_first)(→ citem_locator_t const &) | Get reference to the current map key. | | [`user_casts_second`](#ida_hexrays.user_casts_second)(→ tinfo_t &) | Get reference to the current map value. | | [`user_casts_find`](#ida_hexrays.user_casts_find)(→ user_casts_iterator_t) | Find the specified key in user_casts_t. | | [`user_casts_insert`](#ida_hexrays.user_casts_insert)(→ user_casts_iterator_t) | Insert new (citem_locator_t, tinfo_t) pair into user_casts_t. | | [`user_casts_begin`](#ida_hexrays.user_casts_begin)(→ user_casts_iterator_t) | Get iterator pointing to the beginning of user_casts_t. | | [`user_casts_end`](#ida_hexrays.user_casts_end)(→ user_casts_iterator_t) | Get iterator pointing to the end of user_casts_t. | | [`user_casts_next`](#ida_hexrays.user_casts_next)(→ user_casts_iterator_t) | Move to the next element. | | [`user_casts_prev`](#ida_hexrays.user_casts_prev)(→ user_casts_iterator_t) | Move to the previous element. | | [`user_casts_erase`](#ida_hexrays.user_casts_erase)(→ None) | Erase current element from user_casts_t. | | [`user_casts_clear`](#ida_hexrays.user_casts_clear)(→ None) | Clear user_casts_t. | | [`user_casts_size`](#ida_hexrays.user_casts_size)(→ int) | Get size of user_casts_t. | | [`user_casts_free`](#ida_hexrays.user_casts_free)(→ None) | Delete user_casts_t instance. | | [`user_casts_new`](#ida_hexrays.user_casts_new)(→ user_casts_t \*) | Create a new user_casts_t instance. | | [`user_unions_first`](#ida_hexrays.user_unions_first)(→ ea_t const &) | Get reference to the current map key. | | [`user_unions_second`](#ida_hexrays.user_unions_second)(→ intvec_t &) | Get reference to the current map value. | | [`user_unions_find`](#ida_hexrays.user_unions_find)(→ user_unions_iterator_t) | Find the specified key in user_unions_t. | | [`user_unions_insert`](#ida_hexrays.user_unions_insert)(→ user_unions_iterator_t) | Insert new (ea_t, intvec_t) pair into user_unions_t. | | [`user_unions_begin`](#ida_hexrays.user_unions_begin)(→ user_unions_iterator_t) | Get iterator pointing to the beginning of user_unions_t. | | [`user_unions_end`](#ida_hexrays.user_unions_end)(→ user_unions_iterator_t) | Get iterator pointing to the end of user_unions_t. | | [`user_unions_next`](#ida_hexrays.user_unions_next)(→ user_unions_iterator_t) | Move to the next element. | | [`user_unions_prev`](#ida_hexrays.user_unions_prev)(→ user_unions_iterator_t) | Move to the previous element. | | [`user_unions_erase`](#ida_hexrays.user_unions_erase)(→ None) | Erase current element from user_unions_t. | | [`user_unions_clear`](#ida_hexrays.user_unions_clear)(→ None) | Clear user_unions_t. | | [`user_unions_size`](#ida_hexrays.user_unions_size)(→ int) | Get size of user_unions_t. | | [`user_unions_free`](#ida_hexrays.user_unions_free)(→ None) | Delete user_unions_t instance. | | [`user_unions_new`](#ida_hexrays.user_unions_new)(→ user_unions_t \*) | Create a new user_unions_t instance. | | [`user_labels_first`](#ida_hexrays.user_labels_first)(→ int const &) | Get reference to the current map key. | | [`user_labels_second`](#ida_hexrays.user_labels_second)(→ str) | Get reference to the current map value. | | [`user_labels_find`](#ida_hexrays.user_labels_find)(→ user_labels_iterator_t) | Find the specified key in user_labels_t. | | [`user_labels_insert`](#ida_hexrays.user_labels_insert)(→ user_labels_iterator_t) | Insert new (int, qstring) pair into user_labels_t. | | [`user_labels_begin`](#ida_hexrays.user_labels_begin)(→ user_labels_iterator_t) | Get iterator pointing to the beginning of user_labels_t. | | [`user_labels_end`](#ida_hexrays.user_labels_end)(→ user_labels_iterator_t) | Get iterator pointing to the end of user_labels_t. | | [`user_labels_next`](#ida_hexrays.user_labels_next)(→ user_labels_iterator_t) | Move to the next element. | | [`user_labels_prev`](#ida_hexrays.user_labels_prev)(→ user_labels_iterator_t) | Move to the previous element. | | [`user_labels_erase`](#ida_hexrays.user_labels_erase)(→ None) | Erase current element from user_labels_t. | | [`user_labels_clear`](#ida_hexrays.user_labels_clear)(→ None) | Clear user_labels_t. | | [`user_labels_size`](#ida_hexrays.user_labels_size)(→ int) | Get size of user_labels_t. | | [`user_labels_free`](#ida_hexrays.user_labels_free)(→ None) | Delete user_labels_t instance. | | [`user_labels_new`](#ida_hexrays.user_labels_new)(→ user_labels_t \*) | Create a new user_labels_t instance. | | [`eamap_first`](#ida_hexrays.eamap_first)(→ ea_t const &) | Get reference to the current map key. | | [`eamap_second`](#ida_hexrays.eamap_second)(→ cinsnptrvec_t &) | Get reference to the current map value. | | [`eamap_find`](#ida_hexrays.eamap_find)(→ eamap_iterator_t) | Find the specified key in eamap_t. | | [`eamap_insert`](#ida_hexrays.eamap_insert)(→ eamap_iterator_t) | Insert new (ea_t, cinsnptrvec_t) pair into eamap_t. | | [`eamap_begin`](#ida_hexrays.eamap_begin)(→ eamap_iterator_t) | Get iterator pointing to the beginning of eamap_t. | | [`eamap_end`](#ida_hexrays.eamap_end)(→ eamap_iterator_t) | Get iterator pointing to the end of eamap_t. | | [`eamap_next`](#ida_hexrays.eamap_next)(→ eamap_iterator_t) | Move to the next element. | | [`eamap_prev`](#ida_hexrays.eamap_prev)(→ eamap_iterator_t) | Move to the previous element. | | [`eamap_erase`](#ida_hexrays.eamap_erase)(→ None) | Erase current element from eamap_t. | | [`eamap_clear`](#ida_hexrays.eamap_clear)(→ None) | Clear eamap_t. | | [`eamap_size`](#ida_hexrays.eamap_size)(→ int) | Get size of eamap_t. | | [`eamap_free`](#ida_hexrays.eamap_free)(→ None) | Delete eamap_t instance. | | [`eamap_new`](#ida_hexrays.eamap_new)(→ eamap_t \*) | Create a new eamap_t instance. | | [`boundaries_first`](#ida_hexrays.boundaries_first)(→ cinsn_t \*const &) | Get reference to the current map key. | | [`boundaries_second`](#ida_hexrays.boundaries_second)(→ rangeset_t &) | Get reference to the current map value. | | [`boundaries_begin`](#ida_hexrays.boundaries_begin)(→ boundaries_iterator_t) | Get iterator pointing to the beginning of boundaries_t. | | [`boundaries_end`](#ida_hexrays.boundaries_end)(→ boundaries_iterator_t) | Get iterator pointing to the end of boundaries_t. | | [`boundaries_next`](#ida_hexrays.boundaries_next)(→ boundaries_iterator_t) | Move to the next element. | | [`boundaries_prev`](#ida_hexrays.boundaries_prev)(→ boundaries_iterator_t) | Move to the previous element. | | [`boundaries_erase`](#ida_hexrays.boundaries_erase)(→ None) | Erase current element from boundaries_t. | | [`boundaries_clear`](#ida_hexrays.boundaries_clear)(→ None) | Clear boundaries_t. | | [`boundaries_size`](#ida_hexrays.boundaries_size)(→ int) | Get size of boundaries_t. | | [`boundaries_free`](#ida_hexrays.boundaries_free)(→ None) | Delete boundaries_t instance. | | [`boundaries_new`](#ida_hexrays.boundaries_new)(→ boundaries_t \*) | Create a new boundaries_t instance. | | [`block_chains_get`](#ida_hexrays.block_chains_get)(→ chain_t &) | Get reference to the current set value. | | [`block_chains_find`](#ida_hexrays.block_chains_find)(→ block_chains_iterator_t) | Find the specified key in set block_chains_t. | | [`block_chains_insert`](#ida_hexrays.block_chains_insert)(→ block_chains_iterator_t) | Insert new (chain_t) into set block_chains_t. | | [`block_chains_begin`](#ida_hexrays.block_chains_begin)(→ block_chains_iterator_t) | Get iterator pointing to the beginning of block_chains_t. | | [`block_chains_end`](#ida_hexrays.block_chains_end)(→ block_chains_iterator_t) | Get iterator pointing to the end of block_chains_t. | | [`block_chains_next`](#ida_hexrays.block_chains_next)(→ block_chains_iterator_t) | Move to the next element. | | [`block_chains_prev`](#ida_hexrays.block_chains_prev)(→ block_chains_iterator_t) | Move to the previous element. | | [`block_chains_erase`](#ida_hexrays.block_chains_erase)(→ None) | Erase current element from block_chains_t. | | [`block_chains_clear`](#ida_hexrays.block_chains_clear)(→ None) | Clear block_chains_t. | | [`block_chains_size`](#ida_hexrays.block_chains_size)(→ int) | Get size of block_chains_t. | | [`block_chains_free`](#ida_hexrays.block_chains_free)(→ None) | Delete block_chains_t instance. | | [`block_chains_new`](#ida_hexrays.block_chains_new)(→ block_chains_t \*) | Create a new block_chains_t instance. | | [`decompile`](#id0)(ea[, hf, flags]) | Decompile a snippet or a function. | | [`citem_to_specific_type`](#ida_hexrays.citem_to_specific_type)(self) | cast the citem_t object to its more specific type, either cexpr_t or cinsn_t. | | [`property_op_to_typename`](#ida_hexrays.property_op_to_typename)(self) | | | [`cexpr_operands`](#ida_hexrays.cexpr_operands)(self) | return a dictionary with the operands of a cexpr_t. | | [`cinsn_details`](#ida_hexrays.cinsn_details)(self) | return the details pointer for the cinsn_t object depending on the value of its op member. this is one of the cblock_t, cif_t, etc. objects. | | [`cfunc_type`](#ida_hexrays.cfunc_type)(self) | Get the function's return type tinfo_t object. | | [`lnot`](#ida_hexrays.lnot)(e) | Logically negate the specified expression. The specified expression will be logically negated. For example, "x == y" is converted into "x != y" by this function. | | [`make_ref`](#ida_hexrays.make_ref)(e) | Create a reference. This function performs the following conversion: "obj" => "&obj". It can handle casts, annihilate "&\*", and process other special cases. | | [`dereference`](#ida_hexrays.dereference)(e, ptrsize[, is_float]) | Dereference a pointer. This function dereferences a pointer expression. It performs the following conversion: "ptr" => "

```
*
```

ptr" It can handle discrepancies in the pointer type and the access size. | | [`call_helper`](#ida_hexrays.call_helper)(rettype, args, \*rest) | Create a helper call. | | [`new_block`](#ida_hexrays.new_block)() | Create a new block-statement. | | [`make_num`](#ida_hexrays.make_num)(\*args) | Create a number expression | | [`create_helper`](#ida_hexrays.create_helper)(\*args) | Create a helper object.. | | [`install_hexrays_callback`](#ida_hexrays.install_hexrays_callback)(callback) | Install handler for decompiler events. | | [`remove_hexrays_callback`](#ida_hexrays.remove_hexrays_callback)(callback) | Uninstall handler for decompiler events. | ## Module Contents ### ida_hexrays.get_widget_vdui(f: TWidget \*) → vdui_t \* Get the vdui_t instance associated to the TWidget * **Parameters:** **f** – pointer to window * **Returns:** a vdui_t ``` * ``` , or nullptr ### ida_hexrays.init_hexrays_plugin(flags: [int](https://docs.python.org/3/library/functions.html#int) = 0) → [bool](https://docs.python.org/3/library/functions.html#bool) Check that your plugin is compatible with hex-rays decompiler. This function must be called before calling any other decompiler function. * **Parameters:** **flags** – reserved, must be 0 * **Returns:** true if the decompiler exists and is compatible with your plugin ### ida_hexrays.boundaries_find(map: [boundaries_t](#ida_hexrays.boundaries_t), key: [cinsn_t](#ida_hexrays.cinsn_t)) → [boundaries_iterator_t](#ida_hexrays.boundaries_iterator_t) Find the specified key in boundaries_t. ### ida_hexrays.boundaries_insert(map: [boundaries_t](#ida_hexrays.boundaries_t), key: [cinsn_t](#ida_hexrays.cinsn_t), val: [rangeset_t](../ida_range/index.md#ida_range.rangeset_t)) → [boundaries_iterator_t](#ida_hexrays.boundaries_iterator_t) Insert new (cinsn_t ``` * ``` , rangeset_t) pair into boundaries_t. ### ida_hexrays.term_hexrays_plugin() → [None](https://docs.python.org/3/library/constants.html#None) Stop working with hex-rays decompiler. ### *class* ida_hexrays.hexwarns_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### push_back(\*args) → hexwarn_t & #### pop_back() → [None](https://docs.python.org/3/library/constants.html#None) #### size() → [int](https://docs.python.org/3/library/functions.html#int) #### empty() → [bool](https://docs.python.org/3/library/functions.html#bool) #### at(\_idx: [int](https://docs.python.org/3/library/functions.html#int)) → hexwarn_t const & #### qclear() → [None](https://docs.python.org/3/library/constants.html#None) #### clear() → [None](https://docs.python.org/3/library/constants.html#None) #### resize(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### grow(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### capacity() → [int](https://docs.python.org/3/library/functions.html#int) #### reserve(cnt: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### truncate() → [None](https://docs.python.org/3/library/constants.html#None) #### swap(r: [hexwarns_t](#ida_hexrays.hexwarns_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extract() → hexwarn_t \* #### inject(s: [hexwarn_t](#ida_hexrays.hexwarn_t), len: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### begin(\*args) → qvector< hexwarn_t >::const_iterator #### end(\*args) → qvector< hexwarn_t >::const_iterator #### insert(it: [hexwarn_t](#ida_hexrays.hexwarn_t), x: [hexwarn_t](#ida_hexrays.hexwarn_t)) → qvector< hexwarn_t >::iterator #### erase(\*args) → qvector< hexwarn_t >::iterator #### find(\*args) → qvector< hexwarn_t >::const_iterator #### has(x: [hexwarn_t](#ida_hexrays.hexwarn_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### add_unique(x: [hexwarn_t](#ida_hexrays.hexwarn_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### append(x: [hexwarn_t](#ida_hexrays.hexwarn_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extend(x: [hexwarns_t](#ida_hexrays.hexwarns_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### front #### back ### *class* ida_hexrays.user_numforms_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### at(\_Keyval: [operand_locator_t](#ida_hexrays.operand_locator_t)) → number_format_t & #### size() → [int](https://docs.python.org/3/library/functions.html#int) ### ida_hexrays.debug_hexrays_ctree(level: [int](https://docs.python.org/3/library/functions.html#int), msg: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [None](https://docs.python.org/3/library/constants.html#None) ### *class* ida_hexrays.ctree_items_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### push_back(\*args) → citem_t \*& #### pop_back() → [None](https://docs.python.org/3/library/constants.html#None) #### size() → [int](https://docs.python.org/3/library/functions.html#int) #### empty() → [bool](https://docs.python.org/3/library/functions.html#bool) #### at(\_idx: [int](https://docs.python.org/3/library/functions.html#int)) → citem_t \*const & #### qclear() → [None](https://docs.python.org/3/library/constants.html#None) #### clear() → [None](https://docs.python.org/3/library/constants.html#None) #### resize(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### capacity() → [int](https://docs.python.org/3/library/functions.html#int) #### reserve(cnt: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### truncate() → [None](https://docs.python.org/3/library/constants.html#None) #### swap(r: [ctree_items_t](#ida_hexrays.ctree_items_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extract() → citem_t \*\* #### inject(s: citem_t \*\*, len: int) → [None](https://docs.python.org/3/library/constants.html#None) #### begin(\*args) → qvector< citem_t \* >::const_iterator #### end(\*args) → qvector< citem_t \* >::const_iterator #### insert(it: qvector< citem_t \* >::iterator, x: citem_t) → qvector< citem_t \* >::iterator #### erase(\*args) → qvector< citem_t \* >::iterator #### find(\*args) → qvector< citem_t \* >::const_iterator #### has(x: [citem_t](#ida_hexrays.citem_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### add_unique(x: [citem_t](#ida_hexrays.citem_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### append(x: [citem_t](#ida_hexrays.citem_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extend(x: [ctree_items_t](#ida_hexrays.ctree_items_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### front #### back ### *class* ida_hexrays.user_labels_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### at(\_Keyval: int const &) → \_qstring< char > & #### size() → [int](https://docs.python.org/3/library/functions.html#int) ### *class* ida_hexrays.user_unions_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### at(\_Keyval: unsigned long long const &) → qvector< int > & #### size() → [int](https://docs.python.org/3/library/functions.html#int) ### *class* ida_hexrays.user_cmts_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### at(\_Keyval: [treeloc_t](#ida_hexrays.treeloc_t)) → citem_cmt_t & #### size() → [int](https://docs.python.org/3/library/functions.html#int) ### *class* ida_hexrays.user_iflags_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### at(\_Keyval: [citem_locator_t](#ida_hexrays.citem_locator_t)) → int & #### size() → [int](https://docs.python.org/3/library/functions.html#int) ### *class* ida_hexrays.cinsnptrvec_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### push_back(\*args) → cinsn_t \*& #### pop_back() → [None](https://docs.python.org/3/library/constants.html#None) #### size() → [int](https://docs.python.org/3/library/functions.html#int) #### empty() → [bool](https://docs.python.org/3/library/functions.html#bool) #### at(\_idx: [int](https://docs.python.org/3/library/functions.html#int)) → cinsn_t \*const & #### qclear() → [None](https://docs.python.org/3/library/constants.html#None) #### clear() → [None](https://docs.python.org/3/library/constants.html#None) #### resize(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### capacity() → [int](https://docs.python.org/3/library/functions.html#int) #### reserve(cnt: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### truncate() → [None](https://docs.python.org/3/library/constants.html#None) #### swap(r: [cinsnptrvec_t](#ida_hexrays.cinsnptrvec_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extract() → cinsn_t \*\* #### inject(s: cinsn_t \*\*, len: int) → [None](https://docs.python.org/3/library/constants.html#None) #### begin(\*args) → qvector< cinsn_t \* >::const_iterator #### end(\*args) → qvector< cinsn_t \* >::const_iterator #### insert(it: qvector< cinsn_t \* >::iterator, x: cinsn_t) → qvector< cinsn_t \* >::iterator #### erase(\*args) → qvector< cinsn_t \* >::iterator #### find(\*args) → qvector< cinsn_t \* >::const_iterator #### has(x: [cinsn_t](#ida_hexrays.cinsn_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### add_unique(x: [cinsn_t](#ida_hexrays.cinsn_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### append(x: [cinsn_t](#ida_hexrays.cinsn_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extend(x: [cinsnptrvec_t](#ida_hexrays.cinsnptrvec_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### front #### back ### *class* ida_hexrays.eamap_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### at(\_Keyval: unsigned long long const &) → cinsnptrvec_t & #### size() → [int](https://docs.python.org/3/library/functions.html#int) ### *class* ida_hexrays.boundaries_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### at(\_Keyval: [cinsn_t](#ida_hexrays.cinsn_t)) → rangeset_t & #### size() → [int](https://docs.python.org/3/library/functions.html#int) ### *class* ida_hexrays.cfuncptr_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### reset() → [None](https://docs.python.org/3/library/constants.html#None) #### entry_ea *: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)* #### mba *: mba_t \** #### body *: [cinsn_t](#ida_hexrays.cinsn_t)* #### argidx *: intvec_t &* #### maturity *: ctree_maturity_t* #### user_labels *: user_labels_t \** #### user_cmts *: user_cmts_t \** #### numforms *: user_numforms_t \** #### user_iflags *: user_iflags_t \** #### user_unions *: user_unions_t \** #### refcnt *: [int](https://docs.python.org/3/library/functions.html#int)* #### statebits *: [int](https://docs.python.org/3/library/functions.html#int)* #### hdrlines *: [int](https://docs.python.org/3/library/functions.html#int)* #### treeitems *: citem_pointers_t* #### user_casts *: user_casts_t \** #### release() → [None](https://docs.python.org/3/library/constants.html#None) #### build_c_tree() → [None](https://docs.python.org/3/library/constants.html#None) #### verify(aul: allow_unused_labels_t, even_without_debugger: [bool](https://docs.python.org/3/library/functions.html#bool)) → [None](https://docs.python.org/3/library/constants.html#None) #### print_dcl() → [str](https://docs.python.org/3/library/stdtypes.html#str) #### print_func(vp: [vc_printer_t](#ida_hexrays.vc_printer_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### get_func_type(type: [tinfo_t](../ida_typeinf/index.md#ida_typeinf.tinfo_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### get_lvars() → lvars_t \* #### get_stkoff_delta() → [int](https://docs.python.org/3/library/functions.html#int) #### find_label(label: [int](https://docs.python.org/3/library/functions.html#int)) → citem_t \* #### remove_unused_labels() → [None](https://docs.python.org/3/library/constants.html#None) #### redirect_gotos(frm: [int](https://docs.python.org/3/library/functions.html#int), to: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### get_user_cmt(loc: [treeloc_t](#ida_hexrays.treeloc_t), rt: cmt_retrieval_type_t) → [str](https://docs.python.org/3/library/stdtypes.html#str) #### set_user_cmt(loc: [treeloc_t](#ida_hexrays.treeloc_t), cmt: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [None](https://docs.python.org/3/library/constants.html#None) #### get_user_iflags(loc: [citem_locator_t](#ida_hexrays.citem_locator_t)) → [int](https://docs.python.org/3/library/functions.html#int) #### set_user_iflags(loc: [citem_locator_t](#ida_hexrays.citem_locator_t), iflags: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### has_orphan_cmts() → [bool](https://docs.python.org/3/library/functions.html#bool) #### del_orphan_cmts() → [int](https://docs.python.org/3/library/functions.html#int) #### get_user_union_selection(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), path: [intvec_t](../ida_pro/index.md#ida_pro.intvec_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### set_user_union_selection(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), path: [intvec_t](../ida_pro/index.md#ida_pro.intvec_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### save_user_labels() → [None](https://docs.python.org/3/library/constants.html#None) Save user defined labels into the database. #### save_user_cmts() → [None](https://docs.python.org/3/library/constants.html#None) Save user defined comments into the database. #### save_user_numforms() → [None](https://docs.python.org/3/library/constants.html#None) Save user defined number formats into the database. #### save_user_iflags() → [None](https://docs.python.org/3/library/constants.html#None) Save user defined citem iflags into the database. #### save_user_unions() → [None](https://docs.python.org/3/library/constants.html#None) Save user defined union field selections into the database. #### save_user_casts() → [None](https://docs.python.org/3/library/constants.html#None) Save user defined casts into the database. #### get_user_cast(loc: [citem_locator_t](#ida_hexrays.citem_locator_t)) → [tinfo_t](../ida_typeinf/index.md#ida_typeinf.tinfo_t) #### set_user_cast(loc: [citem_locator_t](#ida_hexrays.citem_locator_t), type: [tinfo_t](../ida_typeinf/index.md#ida_typeinf.tinfo_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### get_line_item(line: [str](https://docs.python.org/3/library/stdtypes.html#str), x: [int](https://docs.python.org/3/library/functions.html#int), is_ctree_line: [bool](https://docs.python.org/3/library/functions.html#bool), phead: [ctree_item_t](#ida_hexrays.ctree_item_t), pitem: [ctree_item_t](#ida_hexrays.ctree_item_t), ptail: [ctree_item_t](#ida_hexrays.ctree_item_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### get_warnings() → hexwarns_t & #### get_eamap() → eamap_t & #### get_boundaries() → boundaries_t & #### get_pseudocode() → strvec_t const & #### refresh_func_ctext() → [None](https://docs.python.org/3/library/constants.html#None) #### recalc_item_addresses() → [None](https://docs.python.org/3/library/constants.html#None) #### find_addressable_item(i: [citem_t](#ida_hexrays.citem_t)) → citem_t const \* #### gather_derefs(ci: [ctree_item_t](#ida_hexrays.ctree_item_t), udm: [udt_type_data_t](../ida_typeinf/index.md#ida_typeinf.udt_type_data_t) = None) → [bool](https://docs.python.org/3/library/functions.html#bool) #### find_item_coords(\*args) This method has the following signatures: > 1. find_item_coords(item: citem_t) -> Tuple[int, int] > 2. find_item_coords(item: citem_t, x: int_pointer, y: int_pointer) -> bool NOTE: The second form is retained for backward-compatibility, but we strongly recommend using the first. * **Parameters:** **item** – The item to find coordinates for in the pseudocode listing #### locked() → [bool](https://docs.python.org/3/library/functions.html#bool) #### serialize() → [bool](https://docs.python.org/3/library/functions.html#bool) #### deserialize(mba: mba_t, bytes: uchar const \*) → cfunc_t \* ### *class* ida_hexrays.qvector_history_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### push_back(\*args) → history_item_t & #### pop_back() → [None](https://docs.python.org/3/library/constants.html#None) #### size() → [int](https://docs.python.org/3/library/functions.html#int) #### empty() → [bool](https://docs.python.org/3/library/functions.html#bool) #### at(\_idx: [int](https://docs.python.org/3/library/functions.html#int)) → history_item_t const & #### qclear() → [None](https://docs.python.org/3/library/constants.html#None) #### clear() → [None](https://docs.python.org/3/library/constants.html#None) #### resize(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### grow(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### capacity() → [int](https://docs.python.org/3/library/functions.html#int) #### reserve(cnt: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### truncate() → [None](https://docs.python.org/3/library/constants.html#None) #### swap(r: [qvector_history_t](#ida_hexrays.qvector_history_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extract() → history_item_t \* #### inject(s: [history_item_t](#ida_hexrays.history_item_t), len: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### begin(\*args) → qvector< history_item_t >::const_iterator #### end(\*args) → qvector< history_item_t >::const_iterator #### insert(it: [history_item_t](#ida_hexrays.history_item_t), x: [history_item_t](#ida_hexrays.history_item_t)) → qvector< history_item_t >::iterator #### erase(\*args) → qvector< history_item_t >::iterator #### find(\*args) → qvector< history_item_t >::const_iterator #### has(x: [history_item_t](#ida_hexrays.history_item_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### add_unique(x: [history_item_t](#ida_hexrays.history_item_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### append(x: [history_item_t](#ida_hexrays.history_item_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extend(x: [qvector_history_t](#ida_hexrays.qvector_history_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### front #### back ### *class* ida_hexrays.history_t Bases: [`qvector_history_t`](#ida_hexrays.qvector_history_t) #### thisown #### pop() → [history_item_t](#ida_hexrays.history_item_t) #### top(\*args) → history_item_t & #### push(v: [history_item_t](#ida_hexrays.history_item_t)) → [None](https://docs.python.org/3/library/constants.html#None) ### *class* ida_hexrays.cinsn_list_t_iterator Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### cur *: cinsn_t const &* #### next ### *class* ida_hexrays.cinsn_list_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### swap(x: [cinsn_list_t](#ida_hexrays.cinsn_list_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### empty() → [bool](https://docs.python.org/3/library/functions.html#bool) #### size() → [int](https://docs.python.org/3/library/functions.html#int) #### front(\*args) → cinsn_t const & #### back(\*args) → cinsn_t const & #### rbegin(\*args) → qlist< cinsn_t >::const_reverse_iterator #### rend(\*args) → qlist< cinsn_t >::const_reverse_iterator #### push_front(x: [cinsn_t](#ida_hexrays.cinsn_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### push_back(\*args) → cinsn_t & #### clear() → [None](https://docs.python.org/3/library/constants.html#None) #### pop_front() → [None](https://docs.python.org/3/library/constants.html#None) #### pop_back() → [None](https://docs.python.org/3/library/constants.html#None) #### splice(pos: qlist< cinsn_t >::iterator, other: cinsn_list_t, first: qlist< cinsn_t >::iterator, last: qlist< cinsn_t >::iterator) → [None](https://docs.python.org/3/library/constants.html#None) #### remove(v: [cinsn_t](#ida_hexrays.cinsn_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### find(item) #### index(item) #### at(index) #### begin() → [cinsn_list_t_iterator](#ida_hexrays.cinsn_list_t_iterator) #### end() → [cinsn_list_t_iterator](#ida_hexrays.cinsn_list_t_iterator) #### insert(\*args) → [cinsn_list_t_iterator](#ida_hexrays.cinsn_list_t_iterator) #### erase(p: [cinsn_list_t_iterator](#ida_hexrays.cinsn_list_t_iterator)) → [None](https://docs.python.org/3/library/constants.html#None) ### *class* ida_hexrays.qvector_carg_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### push_back(\*args) → carg_t & #### pop_back() → [None](https://docs.python.org/3/library/constants.html#None) #### size() → [int](https://docs.python.org/3/library/functions.html#int) #### empty() → [bool](https://docs.python.org/3/library/functions.html#bool) #### at(\_idx: [int](https://docs.python.org/3/library/functions.html#int)) → carg_t const & #### qclear() → [None](https://docs.python.org/3/library/constants.html#None) #### clear() → [None](https://docs.python.org/3/library/constants.html#None) #### resize(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### grow(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### capacity() → [int](https://docs.python.org/3/library/functions.html#int) #### reserve(cnt: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### truncate() → [None](https://docs.python.org/3/library/constants.html#None) #### swap(r: [qvector_carg_t](#ida_hexrays.qvector_carg_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extract() → carg_t \* #### inject(s: [carg_t](#ida_hexrays.carg_t), len: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### begin(\*args) → qvector< carg_t >::const_iterator #### end(\*args) → qvector< carg_t >::const_iterator #### insert(it: [carg_t](#ida_hexrays.carg_t), x: [carg_t](#ida_hexrays.carg_t)) → qvector< carg_t >::iterator #### erase(\*args) → qvector< carg_t >::iterator #### find(\*args) → qvector< carg_t >::const_iterator #### has(x: [carg_t](#ida_hexrays.carg_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### add_unique(x: [carg_t](#ida_hexrays.carg_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### append(x: [carg_t](#ida_hexrays.carg_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extend(x: [qvector_carg_t](#ida_hexrays.qvector_carg_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### front #### back ### *class* ida_hexrays.qvector_ccase_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### push_back(\*args) → ccase_t & #### pop_back() → [None](https://docs.python.org/3/library/constants.html#None) #### size() → [int](https://docs.python.org/3/library/functions.html#int) #### empty() → [bool](https://docs.python.org/3/library/functions.html#bool) #### at(\_idx: [int](https://docs.python.org/3/library/functions.html#int)) → ccase_t const & #### qclear() → [None](https://docs.python.org/3/library/constants.html#None) #### clear() → [None](https://docs.python.org/3/library/constants.html#None) #### resize(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### grow(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### capacity() → [int](https://docs.python.org/3/library/functions.html#int) #### reserve(cnt: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### truncate() → [None](https://docs.python.org/3/library/constants.html#None) #### swap(r: [qvector_ccase_t](#ida_hexrays.qvector_ccase_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extract() → ccase_t \* #### inject(s: [ccase_t](#ida_hexrays.ccase_t), len: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### begin(\*args) → qvector< ccase_t >::const_iterator #### end(\*args) → qvector< ccase_t >::const_iterator #### insert(it: [ccase_t](#ida_hexrays.ccase_t), x: [ccase_t](#ida_hexrays.ccase_t)) → qvector< ccase_t >::iterator #### erase(\*args) → qvector< ccase_t >::iterator #### find(\*args) → qvector< ccase_t >::const_iterator #### has(x: [ccase_t](#ida_hexrays.ccase_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### add_unique(x: [ccase_t](#ida_hexrays.ccase_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### append(x: [ccase_t](#ida_hexrays.ccase_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extend(x: [qvector_ccase_t](#ida_hexrays.qvector_ccase_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### front #### back ### *class* ida_hexrays.qvector_catchexprs_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### push_back(\*args) → catchexpr_t & #### pop_back() → [None](https://docs.python.org/3/library/constants.html#None) #### size() → [int](https://docs.python.org/3/library/functions.html#int) #### empty() → [bool](https://docs.python.org/3/library/functions.html#bool) #### at(\_idx: [int](https://docs.python.org/3/library/functions.html#int)) → catchexpr_t const & #### qclear() → [None](https://docs.python.org/3/library/constants.html#None) #### clear() → [None](https://docs.python.org/3/library/constants.html#None) #### resize(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### grow(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### capacity() → [int](https://docs.python.org/3/library/functions.html#int) #### reserve(cnt: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### truncate() → [None](https://docs.python.org/3/library/constants.html#None) #### swap(r: [qvector_catchexprs_t](#ida_hexrays.qvector_catchexprs_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extract() → catchexpr_t \* #### inject(s: [catchexpr_t](#ida_hexrays.catchexpr_t), len: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### begin(\*args) → qvector< catchexpr_t >::const_iterator #### end(\*args) → qvector< catchexpr_t >::const_iterator #### insert(it: [catchexpr_t](#ida_hexrays.catchexpr_t), x: [catchexpr_t](#ida_hexrays.catchexpr_t)) → qvector< catchexpr_t >::iterator #### erase(\*args) → qvector< catchexpr_t >::iterator #### find(\*args) → qvector< catchexpr_t >::const_iterator #### has(x: [catchexpr_t](#ida_hexrays.catchexpr_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### add_unique(x: [catchexpr_t](#ida_hexrays.catchexpr_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### append(x: [catchexpr_t](#ida_hexrays.catchexpr_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extend(x: [qvector_catchexprs_t](#ida_hexrays.qvector_catchexprs_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### front #### back ### *class* ida_hexrays.qvector_ccatchvec_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### push_back(\*args) → ccatch_t & #### pop_back() → [None](https://docs.python.org/3/library/constants.html#None) #### size() → [int](https://docs.python.org/3/library/functions.html#int) #### empty() → [bool](https://docs.python.org/3/library/functions.html#bool) #### at(\_idx: [int](https://docs.python.org/3/library/functions.html#int)) → ccatch_t const & #### qclear() → [None](https://docs.python.org/3/library/constants.html#None) #### clear() → [None](https://docs.python.org/3/library/constants.html#None) #### resize(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### grow(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### capacity() → [int](https://docs.python.org/3/library/functions.html#int) #### reserve(cnt: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### truncate() → [None](https://docs.python.org/3/library/constants.html#None) #### swap(r: [qvector_ccatchvec_t](#ida_hexrays.qvector_ccatchvec_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extract() → ccatch_t \* #### inject(s: [ccatch_t](#ida_hexrays.ccatch_t), len: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### begin(\*args) → qvector< ccatch_t >::const_iterator #### end(\*args) → qvector< ccatch_t >::const_iterator #### insert(it: [ccatch_t](#ida_hexrays.ccatch_t), x: [ccatch_t](#ida_hexrays.ccatch_t)) → qvector< ccatch_t >::iterator #### erase(\*args) → qvector< ccatch_t >::iterator #### find(\*args) → qvector< ccatch_t >::const_iterator #### has(x: [ccatch_t](#ida_hexrays.ccatch_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### add_unique(x: [ccatch_t](#ida_hexrays.ccatch_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### append(x: [ccatch_t](#ida_hexrays.ccatch_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extend(x: [qvector_ccatchvec_t](#ida_hexrays.qvector_ccatchvec_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### front #### back ### *class* ida_hexrays.cblock_posvec_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### push_back(\*args) → cblock_pos_t & #### pop_back() → [None](https://docs.python.org/3/library/constants.html#None) #### size() → [int](https://docs.python.org/3/library/functions.html#int) #### empty() → [bool](https://docs.python.org/3/library/functions.html#bool) #### at(\_idx: [int](https://docs.python.org/3/library/functions.html#int)) → cblock_pos_t const & #### qclear() → [None](https://docs.python.org/3/library/constants.html#None) #### clear() → [None](https://docs.python.org/3/library/constants.html#None) #### resize(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### grow(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### capacity() → [int](https://docs.python.org/3/library/functions.html#int) #### reserve(cnt: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### truncate() → [None](https://docs.python.org/3/library/constants.html#None) #### swap(r: [cblock_posvec_t](#ida_hexrays.cblock_posvec_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extract() → cblock_pos_t \* #### inject(s: [cblock_pos_t](#ida_hexrays.cblock_pos_t), len: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### begin(\*args) → qvector< cblock_pos_t >::const_iterator #### end(\*args) → qvector< cblock_pos_t >::const_iterator #### insert(it: [cblock_pos_t](#ida_hexrays.cblock_pos_t), x: [cblock_pos_t](#ida_hexrays.cblock_pos_t)) → qvector< cblock_pos_t >::iterator #### erase(\*args) → qvector< cblock_pos_t >::iterator #### append(x: [cblock_pos_t](#ida_hexrays.cblock_pos_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extend(x: [cblock_posvec_t](#ida_hexrays.cblock_posvec_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### front #### back ### *class* ida_hexrays.ui_stroff_ops_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### push_back(\*args) → ui_stroff_op_t & #### pop_back() → [None](https://docs.python.org/3/library/constants.html#None) #### size() → [int](https://docs.python.org/3/library/functions.html#int) #### empty() → [bool](https://docs.python.org/3/library/functions.html#bool) #### at(\_idx: [int](https://docs.python.org/3/library/functions.html#int)) → ui_stroff_op_t const & #### qclear() → [None](https://docs.python.org/3/library/constants.html#None) #### clear() → [None](https://docs.python.org/3/library/constants.html#None) #### resize(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### grow(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### capacity() → [int](https://docs.python.org/3/library/functions.html#int) #### reserve(cnt: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### truncate() → [None](https://docs.python.org/3/library/constants.html#None) #### swap(r: [ui_stroff_ops_t](#ida_hexrays.ui_stroff_ops_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extract() → ui_stroff_op_t \* #### inject(s: [ui_stroff_op_t](#ida_hexrays.ui_stroff_op_t), len: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### begin(\*args) → qvector< ui_stroff_op_t >::const_iterator #### end(\*args) → qvector< ui_stroff_op_t >::const_iterator #### insert(it: [ui_stroff_op_t](#ida_hexrays.ui_stroff_op_t), x: [ui_stroff_op_t](#ida_hexrays.ui_stroff_op_t)) → qvector< ui_stroff_op_t >::iterator #### erase(\*args) → qvector< ui_stroff_op_t >::iterator #### find(\*args) → qvector< ui_stroff_op_t >::const_iterator #### has(x: [ui_stroff_op_t](#ida_hexrays.ui_stroff_op_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### add_unique(x: [ui_stroff_op_t](#ida_hexrays.ui_stroff_op_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### append(x: [ui_stroff_op_t](#ida_hexrays.ui_stroff_op_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extend(x: [ui_stroff_ops_t](#ida_hexrays.ui_stroff_ops_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### front #### back ### ida_hexrays.qswap(a: [cinsn_t](#ida_hexrays.cinsn_t), b: [cinsn_t](#ida_hexrays.cinsn_t)) → [None](https://docs.python.org/3/library/constants.html#None) ### *class* ida_hexrays.array_of_bitsets(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### push_back(\*args) → bitset_t & #### pop_back() → [None](https://docs.python.org/3/library/constants.html#None) #### size() → [int](https://docs.python.org/3/library/functions.html#int) #### empty() → [bool](https://docs.python.org/3/library/functions.html#bool) #### at(\_idx: [int](https://docs.python.org/3/library/functions.html#int)) → bitset_t const & #### qclear() → [None](https://docs.python.org/3/library/constants.html#None) #### clear() → [None](https://docs.python.org/3/library/constants.html#None) #### resize(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### grow(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### capacity() → [int](https://docs.python.org/3/library/functions.html#int) #### reserve(cnt: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### truncate() → [None](https://docs.python.org/3/library/constants.html#None) #### swap(r: [array_of_bitsets](#ida_hexrays.array_of_bitsets)) → [None](https://docs.python.org/3/library/constants.html#None) #### extract() → bitset_t \* #### inject(s: [bitset_t](#ida_hexrays.bitset_t), len: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### begin(\*args) → qvector< bitset_t >::const_iterator #### end(\*args) → qvector< bitset_t >::const_iterator #### insert(it: [bitset_t](#ida_hexrays.bitset_t), x: [bitset_t](#ida_hexrays.bitset_t)) → qvector< bitset_t >::iterator #### erase(\*args) → qvector< bitset_t >::iterator #### find(\*args) → qvector< bitset_t >::const_iterator #### has(x: [bitset_t](#ida_hexrays.bitset_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### add_unique(x: [bitset_t](#ida_hexrays.bitset_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### append(x: [bitset_t](#ida_hexrays.bitset_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extend(x: [array_of_bitsets](#ida_hexrays.array_of_bitsets)) → [None](https://docs.python.org/3/library/constants.html#None) #### front #### back ### *class* ida_hexrays.mopvec_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### push_back(\*args) → mop_t & #### pop_back() → [None](https://docs.python.org/3/library/constants.html#None) #### size() → [int](https://docs.python.org/3/library/functions.html#int) #### empty() → [bool](https://docs.python.org/3/library/functions.html#bool) #### at(\_idx: [int](https://docs.python.org/3/library/functions.html#int)) → mop_t const & #### qclear() → [None](https://docs.python.org/3/library/constants.html#None) #### clear() → [None](https://docs.python.org/3/library/constants.html#None) #### resize(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### grow(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### capacity() → [int](https://docs.python.org/3/library/functions.html#int) #### reserve(cnt: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### truncate() → [None](https://docs.python.org/3/library/constants.html#None) #### swap(r: [mopvec_t](#ida_hexrays.mopvec_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extract() → mop_t \* #### inject(s: [mop_t](#ida_hexrays.mop_t), len: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### begin(\*args) → qvector< mop_t >::const_iterator #### end(\*args) → qvector< mop_t >::const_iterator #### insert(it: [mop_t](#ida_hexrays.mop_t), x: [mop_t](#ida_hexrays.mop_t)) → qvector< mop_t >::iterator #### erase(\*args) → qvector< mop_t >::iterator #### find(\*args) → qvector< mop_t >::const_iterator #### has(x: [mop_t](#ida_hexrays.mop_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### add_unique(x: [mop_t](#ida_hexrays.mop_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### append(x: [mop_t](#ida_hexrays.mop_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extend(x: [mopvec_t](#ida_hexrays.mopvec_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### front #### back ### *class* ida_hexrays.mcallargs_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### push_back(\*args) → mcallarg_t & #### pop_back() → [None](https://docs.python.org/3/library/constants.html#None) #### size() → [int](https://docs.python.org/3/library/functions.html#int) #### empty() → [bool](https://docs.python.org/3/library/functions.html#bool) #### at(\_idx: [int](https://docs.python.org/3/library/functions.html#int)) → mcallarg_t const & #### qclear() → [None](https://docs.python.org/3/library/constants.html#None) #### clear() → [None](https://docs.python.org/3/library/constants.html#None) #### resize(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### grow(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### capacity() → [int](https://docs.python.org/3/library/functions.html#int) #### reserve(cnt: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### truncate() → [None](https://docs.python.org/3/library/constants.html#None) #### swap(r: [mcallargs_t](#ida_hexrays.mcallargs_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extract() → mcallarg_t \* #### inject(s: [mcallarg_t](#ida_hexrays.mcallarg_t), len: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### begin(\*args) → qvector< mcallarg_t >::const_iterator #### end(\*args) → qvector< mcallarg_t >::const_iterator #### insert(it: [mcallarg_t](#ida_hexrays.mcallarg_t), x: [mcallarg_t](#ida_hexrays.mcallarg_t)) → qvector< mcallarg_t >::iterator #### erase(\*args) → qvector< mcallarg_t >::iterator #### find(\*args) → qvector< mcallarg_t >::const_iterator #### has(x: [mcallarg_t](#ida_hexrays.mcallarg_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### add_unique(x: [mcallarg_t](#ida_hexrays.mcallarg_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### append(x: [mcallarg_t](#ida_hexrays.mcallarg_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extend(x: [mcallargs_t](#ida_hexrays.mcallargs_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### front #### back ### *class* ida_hexrays.block_chains_vec_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### push_back(\*args) → block_chains_t & #### pop_back() → [None](https://docs.python.org/3/library/constants.html#None) #### size() → [int](https://docs.python.org/3/library/functions.html#int) #### empty() → [bool](https://docs.python.org/3/library/functions.html#bool) #### at(\_idx: [int](https://docs.python.org/3/library/functions.html#int)) → block_chains_t const & #### qclear() → [None](https://docs.python.org/3/library/constants.html#None) #### clear() → [None](https://docs.python.org/3/library/constants.html#None) #### resize(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### grow(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### capacity() → [int](https://docs.python.org/3/library/functions.html#int) #### reserve(cnt: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### truncate() → [None](https://docs.python.org/3/library/constants.html#None) #### swap(r: [block_chains_vec_t](#ida_hexrays.block_chains_vec_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extract() → block_chains_t \* #### inject(s: [block_chains_t](#ida_hexrays.block_chains_t), len: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### begin(\*args) → qvector< block_chains_t >::const_iterator #### end(\*args) → qvector< block_chains_t >::const_iterator #### insert(it: [block_chains_t](#ida_hexrays.block_chains_t), x: [block_chains_t](#ida_hexrays.block_chains_t)) → qvector< block_chains_t >::iterator #### erase(\*args) → qvector< block_chains_t >::iterator #### append(x: [block_chains_t](#ida_hexrays.block_chains_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extend(x: [block_chains_vec_t](#ida_hexrays.block_chains_vec_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### front #### back ### *class* ida_hexrays.lvar_mapping_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### at(\_Keyval: [lvar_locator_t](#ida_hexrays.lvar_locator_t)) → lvar_locator_t & #### size() → [int](https://docs.python.org/3/library/functions.html#int) ### *class* ida_hexrays.qvector_lvar_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### push_back(\*args) → lvar_t & #### pop_back() → [None](https://docs.python.org/3/library/constants.html#None) #### size() → [int](https://docs.python.org/3/library/functions.html#int) #### empty() → [bool](https://docs.python.org/3/library/functions.html#bool) #### at(\_idx: [int](https://docs.python.org/3/library/functions.html#int)) → lvar_t const & #### qclear() → [None](https://docs.python.org/3/library/constants.html#None) #### clear() → [None](https://docs.python.org/3/library/constants.html#None) #### resize(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### grow(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### capacity() → [int](https://docs.python.org/3/library/functions.html#int) #### reserve(cnt: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### truncate() → [None](https://docs.python.org/3/library/constants.html#None) #### swap(r: [qvector_lvar_t](#ida_hexrays.qvector_lvar_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extract() → lvar_t \* #### inject(s: [lvar_t](#ida_hexrays.lvar_t), len: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### begin(\*args) → qvector< lvar_t >::const_iterator #### end(\*args) → qvector< lvar_t >::const_iterator #### insert(it: [lvar_t](#ida_hexrays.lvar_t), x: [lvar_t](#ida_hexrays.lvar_t)) → qvector< lvar_t >::iterator #### erase(\*args) → qvector< lvar_t >::iterator #### find(\*args) → qvector< lvar_t >::const_iterator #### has(x: [lvar_t](#ida_hexrays.lvar_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### add_unique(x: [lvar_t](#ida_hexrays.lvar_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### append(x: [lvar_t](#ida_hexrays.lvar_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extend(x: [qvector_lvar_t](#ida_hexrays.qvector_lvar_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### front #### back ### *class* ida_hexrays.lvar_saved_infos_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### push_back(\*args) → lvar_saved_info_t & #### pop_back() → [None](https://docs.python.org/3/library/constants.html#None) #### size() → [int](https://docs.python.org/3/library/functions.html#int) #### empty() → [bool](https://docs.python.org/3/library/functions.html#bool) #### at(\_idx: [int](https://docs.python.org/3/library/functions.html#int)) → lvar_saved_info_t const & #### qclear() → [None](https://docs.python.org/3/library/constants.html#None) #### clear() → [None](https://docs.python.org/3/library/constants.html#None) #### resize(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### grow(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### capacity() → [int](https://docs.python.org/3/library/functions.html#int) #### reserve(cnt: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### truncate() → [None](https://docs.python.org/3/library/constants.html#None) #### swap(r: [lvar_saved_infos_t](#ida_hexrays.lvar_saved_infos_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extract() → lvar_saved_info_t \* #### inject(s: [lvar_saved_info_t](#ida_hexrays.lvar_saved_info_t), len: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### begin(\*args) → qvector< lvar_saved_info_t >::const_iterator #### end(\*args) → qvector< lvar_saved_info_t >::const_iterator #### insert(it: [lvar_saved_info_t](#ida_hexrays.lvar_saved_info_t), x: [lvar_saved_info_t](#ida_hexrays.lvar_saved_info_t)) → qvector< lvar_saved_info_t >::iterator #### erase(\*args) → qvector< lvar_saved_info_t >::iterator #### find(\*args) → qvector< lvar_saved_info_t >::const_iterator #### has(x: [lvar_saved_info_t](#ida_hexrays.lvar_saved_info_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### add_unique(x: [lvar_saved_info_t](#ida_hexrays.lvar_saved_info_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### append(x: [lvar_saved_info_t](#ida_hexrays.lvar_saved_info_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extend(x: [lvar_saved_infos_t](#ida_hexrays.lvar_saved_infos_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### front #### back ### *class* ida_hexrays.Hexrays_Hooks(\_flags: [int](https://docs.python.org/3/library/functions.html#int) = 0, \_hkcb_flags: [int](https://docs.python.org/3/library/functions.html#int) = 1) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### hook() → [bool](https://docs.python.org/3/library/functions.html#bool) #### unhook() → [bool](https://docs.python.org/3/library/functions.html#bool) #### flowchart(fc: [qflow_chart_t](../ida_gdl/index.md#ida_gdl.qflow_chart_t), mba: [mba_t](#ida_hexrays.mba_t), reachable_blocks: [bitset_t](#ida_hexrays.bitset_t), decomp_flags: [int](https://docs.python.org/3/library/functions.html#int)) → [int](https://docs.python.org/3/library/functions.html#int) Flowchart has been generated. * **Parameters:** * **fc** – (const qflow_chart_t ``` * ``` ) * **mba** – (mba_t ``` * ``` ) * **reachable_blocks** – (bitset_t ``` * ``` ) * **decomp_flags** – (int) * **Returns:** Microcode error code #### stkpnts(mba: mba_t, \_sps: stkpnts_t \*) → [int](https://docs.python.org/3/library/functions.html#int) SP change points have been calculated. * **Parameters:** **mba** – (mba_t ``` * ``` ) * **Returns:** Microcode error code This event is generated for each inlined range as well. #### prolog(mba: [mba_t](#ida_hexrays.mba_t), fc: [qflow_chart_t](../ida_gdl/index.md#ida_gdl.qflow_chart_t), reachable_blocks: [bitset_t](#ida_hexrays.bitset_t), decomp_flags: [int](https://docs.python.org/3/library/functions.html#int)) → [int](https://docs.python.org/3/library/functions.html#int) Prolog analysis has been finished. * **Parameters:** * **mba** – (mba_t ``` * ``` ) * **fc** – (const qflow_chart_t ``` * ``` ) * **reachable_blocks** – (const bitset_t ``` * ``` ) * **decomp_flags** – (int) * **Returns:** Microcode error code This event is generated for each inlined range as well. #### microcode(mba: [mba_t](#ida_hexrays.mba_t)) → [int](https://docs.python.org/3/library/functions.html#int) Microcode has been generated. * **Parameters:** **mba** – (mba_t ``` * ``` ) * **Returns:** Microcode error code #### preoptimized(mba: [mba_t](#ida_hexrays.mba_t)) → [int](https://docs.python.org/3/library/functions.html#int) Microcode has been preoptimized. * **Parameters:** **mba** – (mba_t ``` * ``` ) * **Returns:** Microcode error code #### locopt(mba: [mba_t](#ida_hexrays.mba_t)) → [int](https://docs.python.org/3/library/functions.html#int) Basic block level optimization has been finished. * **Parameters:** **mba** – (mba_t ``` * ``` ) * **Returns:** Microcode error code #### prealloc(mba: [mba_t](#ida_hexrays.mba_t)) → [int](https://docs.python.org/3/library/functions.html#int) Local variables: preallocation step begins. * **Parameters:** **mba** – (mba_t ``` * ``` ) This event may occur several times. Should return: 1 if modified microcode Negative values are Microcode error code #### glbopt(mba: [mba_t](#ida_hexrays.mba_t)) → [int](https://docs.python.org/3/library/functions.html#int) Global optimization has been finished. If microcode is modified, MERR_LOOP must be returned. It will cause a complete restart of the optimization. * **Parameters:** **mba** – (mba_t ``` * ``` ) * **Returns:** Microcode error code #### pre_structural(ct: control_graph_t \*, cfunc: cfunc_t, g: simple_graph_t) → [int](https://docs.python.org/3/library/functions.html#int) Structure analysis is starting. * **Parameters:** * **ct** – (control_graph_t ``` * ``` ) in/out: control graph * **cfunc** – (cfunc_t ``` * ``` ) in: the current function * **g** – (const simple_graph_t ``` * ``` ) in: control flow graph * **Returns:** Microcode error code ; MERR_BLOCK means that the analysis has been performed by a plugin #### structural(ct: control_graph_t \*) → [int](https://docs.python.org/3/library/functions.html#int) Structural analysis has been finished. * **Parameters:** **ct** – (control_graph_t ``` * ``` ) #### maturity(cfunc: [cfunc_t](#ida_hexrays.cfunc_t), new_maturity: ctree_maturity_t) → [int](https://docs.python.org/3/library/functions.html#int) Ctree maturity level is being changed. * **Parameters:** * **cfunc** – (cfunc_t ``` * ``` ) * **new_maturity** – (ctree_maturity_t) #### interr(errcode: [int](https://docs.python.org/3/library/functions.html#int)) → [int](https://docs.python.org/3/library/functions.html#int) Internal error has occurred. * **Parameters:** **errcode** – (int ) #### combine(blk: [mblock_t](#ida_hexrays.mblock_t), insn: [minsn_t](#ida_hexrays.minsn_t)) → [int](https://docs.python.org/3/library/functions.html#int) Trying to combine instructions of basic block. * **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 #### print_func(cfunc: [cfunc_t](#ida_hexrays.cfunc_t), vp: [vc_printer_t](#ida_hexrays.vc_printer_t)) → [int](https://docs.python.org/3/library/functions.html#int) Printing ctree and generating text. * **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. #### func_printed(cfunc: [cfunc_t](#ida_hexrays.cfunc_t)) → [int](https://docs.python.org/3/library/functions.html#int) Function text has been generated. Plugins may modify the text in cfunc_t::sv. However, it is too late to modify the ctree or microcode. The text uses regular color codes (see lines.hpp) COLOR_ADDR is used to store pointers to ctree items. * **Parameters:** **cfunc** – (cfunc_t ``` * ``` ) #### resolve_stkaddrs(mba: [mba_t](#ida_hexrays.mba_t)) → [int](https://docs.python.org/3/library/functions.html#int) The optimizer is about to resolve stack addresses. * **Parameters:** **mba** – (mba_t ``` * ``` ) #### build_callinfo(blk: [mblock_t](#ida_hexrays.mblock_t), type: [tinfo_t](../ida_typeinf/index.md#ida_typeinf.tinfo_t)) → PyObject \* Analyzing a call instruction. * **Parameters:** * **blk** – (mblock_t ``` * ``` ) blk->tail is the call. * **type** – (tinfo_t ``` * ``` ) buffer for the output type. * **Returns:** callinfo: (mcallinfo_t ``` ** ``` ) prepared callinfo. The plugin should either specify the function type, either allocate and return a new mcallinfo_t object. #### callinfo_built(blk: [mblock_t](#ida_hexrays.mblock_t)) → [int](https://docs.python.org/3/library/functions.html#int) A call instruction has been anallyzed. * **Parameters:** **blk** – (mblock_t ``` * ``` ) blk->tail is the call. #### calls_done(mba: [mba_t](#ida_hexrays.mba_t)) → [int](https://docs.python.org/3/library/functions.html#int) All calls have been analyzed. * **Parameters:** **mba** – (mba_t ``` * ``` ) This event is generated immediately after analyzing all calls, before any optimizitions, call unmerging and block merging. #### begin_inlining(cdg: [codegen_t](#ida_hexrays.codegen_t), decomp_flags: [int](https://docs.python.org/3/library/functions.html#int)) → [int](https://docs.python.org/3/library/functions.html#int) Starting to inline outlined functions. * **Parameters:** * **cdg** – (codegen_t ``` * ``` ) * **decomp_flags** – (int) * **Returns:** Microcode error code This is an opportunity to inline other ranges. #### inlining_func(cdg: [codegen_t](#ida_hexrays.codegen_t), blk: [int](https://docs.python.org/3/library/functions.html#int), mbr: [mba_ranges_t](#ida_hexrays.mba_ranges_t)) → [int](https://docs.python.org/3/library/functions.html#int) A set of ranges is going to be inlined. * **Parameters:** * **cdg** – (codegen_t ``` * ``` ) * **blk** – (int) the block containing call/jump to inline * **mbr** – (mba_ranges_t ``` * ``` ) the range to inline #### inlined_func(cdg: [codegen_t](#ida_hexrays.codegen_t), blk: [int](https://docs.python.org/3/library/functions.html#int), mbr: [mba_ranges_t](#ida_hexrays.mba_ranges_t), i1: [int](https://docs.python.org/3/library/functions.html#int), i2: [int](https://docs.python.org/3/library/functions.html#int)) → [int](https://docs.python.org/3/library/functions.html#int) A set of ranges got inlined. * **Parameters:** * **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) #### collect_warnings(cfunc: [cfunc_t](#ida_hexrays.cfunc_t)) → [int](https://docs.python.org/3/library/functions.html#int) Collect warning messages from plugins. These warnings will be displayed at the function header, after the user-defined comments. * **Parameters:** **cfunc** – (cfunc_t ``` * ``` ) * **Returns:** warnings: (qstrvec_t ``` * ``` ) #### flowchart_ea(fc: [qflow_chart_ea_t](../ida_gdl/index.md#ida_gdl.qflow_chart_ea_t), mba: [mba_t](#ida_hexrays.mba_t), reachable_blocks: [bitset_t](#ida_hexrays.bitset_t), decomp_flags: [int](https://docs.python.org/3/library/functions.html#int)) → [int](https://docs.python.org/3/library/functions.html#int) Flowchart has been generated (ea-based variant). Replaces the deprecated hxe_flowchart which passes a qflow_chart_t\* with a raw func_t\* inside. * **Parameters:** * **fc** – (const qflow_chart_ea_t ``` * ``` ) * **mba** – (mba_t ``` * ``` ) * **reachable_blocks** – (bitset_t ``` * ``` ) * **decomp_flags** – (int) * **Returns:** Microcode error code #### prolog_ea(mba: [mba_t](#ida_hexrays.mba_t), fc: [qflow_chart_ea_t](../ida_gdl/index.md#ida_gdl.qflow_chart_ea_t), reachable_blocks: [bitset_t](#ida_hexrays.bitset_t), decomp_flags: [int](https://docs.python.org/3/library/functions.html#int)) → [int](https://docs.python.org/3/library/functions.html#int) Prolog analysis has been finished (ea-based variant). Replaces the deprecated hxe_prolog which passes a qflow_chart_t\* with a raw func_t\* inside. * **Parameters:** * **mba** – (mba_t ``` * ``` ) * **fc** – (const qflow_chart_ea_t ``` * ``` ) * **reachable_blocks** – (const bitset_t ``` * ``` ) * **decomp_flags** – (int) * **Returns:** Microcode error code This event is generated for each inlined range as well. #### inlining_function(cdg: [codegen_t](#ida_hexrays.codegen_t), blk: [int](https://docs.python.org/3/library/functions.html#int), dcr: [decomp_ranges_t](#ida_hexrays.decomp_ranges_t)) → [int](https://docs.python.org/3/library/functions.html#int) A set of ranges is going to be inlined (ea-based variant). Replaces the deprecated hxe_inlining_func which passes an mba_ranges_t\* with a raw func_t\* inside. * **Parameters:** * **cdg** – (codegen_t ``` * ``` ) * **blk** – (int) the block containing call/jump to inline * **dcr** – (const decomp_ranges_t ``` * ``` ) the range to inline #### inlined_function(cdg: [codegen_t](#ida_hexrays.codegen_t), blk: [int](https://docs.python.org/3/library/functions.html#int), dcr: [decomp_ranges_t](#ida_hexrays.decomp_ranges_t), i1: [int](https://docs.python.org/3/library/functions.html#int), i2: [int](https://docs.python.org/3/library/functions.html#int)) → [int](https://docs.python.org/3/library/functions.html#int) A set of ranges got inlined (ea-based variant). Replaces the deprecated hxe_inlined_func which passes an mba_ranges_t\* with a raw func_t\* inside. * **Parameters:** * **cdg** – (codegen_t ``` * ``` ) * **blk** – (int) the block containing call/jump to inline * **dcr** – (const decomp_ranges_t ``` * ``` ) the range to inline * **i1** – (int) blknum of the first inlined block * **i2** – (int) blknum of the last inlined block (excluded) #### open_pseudocode(vu: [vdui_t](#ida_hexrays.vdui_t)) → [int](https://docs.python.org/3/library/functions.html#int) New pseudocode view has been opened. * **Parameters:** **vu** – (vdui_t ``` * ``` ) #### switch_pseudocode(vu: [vdui_t](#ida_hexrays.vdui_t)) → [int](https://docs.python.org/3/library/functions.html#int) Existing pseudocode view has been reloaded with a new function. Its text has not been refreshed yet, only cfunc and mba pointers are ready. * **Parameters:** **vu** – (vdui_t ``` * ``` ) #### refresh_pseudocode(vu: [vdui_t](#ida_hexrays.vdui_t)) → [int](https://docs.python.org/3/library/functions.html#int) Existing pseudocode text has been refreshed. Adding/removing pseudocode lines is forbidden in this event. * **Parameters:** **vu** – (vdui_t ``` * ``` ) See also hxe_text_ready, which happens earlier #### close_pseudocode(vu: [vdui_t](#ida_hexrays.vdui_t)) → [int](https://docs.python.org/3/library/functions.html#int) Pseudocode view is being closed. * **Parameters:** **vu** – (vdui_t ``` * ``` ) #### keyboard(vu: [vdui_t](#ida_hexrays.vdui_t), key_code: [int](https://docs.python.org/3/library/functions.html#int), shift_state: [int](https://docs.python.org/3/library/functions.html#int)) → [int](https://docs.python.org/3/library/functions.html#int) Keyboard has been hit. * **Parameters:** * **vu** – (vdui_t ``` * ``` ) * **key_code** – (int) ``` VK_ ``` … * **shift_state** – (int) Should return: 1 if the event has been handled #### right_click(vu: [vdui_t](#ida_hexrays.vdui_t)) → [int](https://docs.python.org/3/library/functions.html#int) Mouse right click. Use hxe_populating_popup instead, in case you want to add items in the popup menu. * **Parameters:** **vu** – (vdui_t ``` * ``` ) #### double_click(vu: [vdui_t](#ida_hexrays.vdui_t), shift_state: [int](https://docs.python.org/3/library/functions.html#int)) → [int](https://docs.python.org/3/library/functions.html#int) Mouse double click. * **Parameters:** * **vu** – (vdui_t ``` * ``` ) * **shift_state** – (int) Should return: 1 if the event has been handled #### curpos(vu: [vdui_t](#ida_hexrays.vdui_t)) → [int](https://docs.python.org/3/library/functions.html#int) Current cursor position has been changed. (for example, by left-clicking or using keyboard) * **Parameters:** **vu** – (vdui_t ``` * ``` ) #### create_hint(vu: [vdui_t](#ida_hexrays.vdui_t)) → PyObject \* Create a hint for the current item. * **Parameters:** **vu** – (vdui_t ``` * ``` ) * **Returns:** hint: (qstring ``` * ``` ); important_lines: (int ``` * ``` ) #### text_ready(vu: [vdui_t](#ida_hexrays.vdui_t)) → [int](https://docs.python.org/3/library/functions.html#int) Decompiled text is ready. * **Parameters:** **vu** – (vdui_t ``` * ``` ) This event can be used to modify the output text (sv). Obsolete. Please use hxe_func_printed instead. #### populating_popup(widget: TWidget \*, popup_handle: TPopupMenu \*, vu: vdui_t) → [int](https://docs.python.org/3/library/functions.html#int) Populating popup menu. We can add menu items now. * **Parameters:** * **widget** – (TWidget ``` * ``` ) * **popup_handle** – (TPopupMenu ``` * ``` ) * **vu** – (vdui_t ``` * ``` ) #### lvar_name_changed(vu: [vdui_t](#ida_hexrays.vdui_t), v: [lvar_t](#ida_hexrays.lvar_t), name: [str](https://docs.python.org/3/library/stdtypes.html#str), is_user_name: [bool](https://docs.python.org/3/library/functions.html#bool)) → [int](https://docs.python.org/3/library/functions.html#int) Local variable got renamed. * **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(vu: [vdui_t](#ida_hexrays.vdui_t), v: [lvar_t](#ida_hexrays.lvar_t), tinfo: [tinfo_t](../ida_typeinf/index.md#ida_typeinf.tinfo_t)) → [int](https://docs.python.org/3/library/functions.html#int) Local variable type got changed. * **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. #### lvar_cmt_changed(vu: [vdui_t](#ida_hexrays.vdui_t), v: [lvar_t](#ida_hexrays.lvar_t), cmt: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [int](https://docs.python.org/3/library/functions.html#int) Local variable comment got changed. * **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(vu: [vdui_t](#ida_hexrays.vdui_t), frm: [lvar_t](#ida_hexrays.lvar_t), to: [lvar_t](#ida_hexrays.lvar_t)) → [int](https://docs.python.org/3/library/functions.html#int) Local variable mapping got changed. * **Parameters:** * **vu** – (vdui_t ``` * ``` ) * **to** – (lvar_t ``` * ``` ) Please note that it is possible to read/write user settings for lvars directly from the idb. #### cmt_changed(cfunc: [cfunc_t](#ida_hexrays.cfunc_t), loc: [treeloc_t](#ida_hexrays.treeloc_t), cmt: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [int](https://docs.python.org/3/library/functions.html#int) Comment got changed. * **Parameters:** * **cfunc** – (cfunc_t ``` * ``` ) * **loc** – (const treeloc_t ``` * ``` ) * **cmt** – (const char ``` * ``` ) #### mba_maturity(mba: [mba_t](#ida_hexrays.mba_t), reqmat: mba_maturity_t) → [int](https://docs.python.org/3/library/functions.html#int) Maturity level of an MBA was changed. * **Parameters:** * **mba** – (mba_t ``` * ``` ) * **reqmat** – (mba_maturity_t) requested maturity level * **Returns:** Microcode error code ### ida_hexrays.MAX_SUPPORTED_STACK_SIZE ### ida_hexrays.hexrays_alloc(size: [int](https://docs.python.org/3/library/functions.html#int)) → void \* ### ida_hexrays.hexrays_free(ptr: void \*) → [None](https://docs.python.org/3/library/constants.html#None) ### ida_hexrays.MAX_VLR_SIZE ### ida_hexrays.max_vlr_value(size: [int](https://docs.python.org/3/library/functions.html#int)) → uvlr_t ### ida_hexrays.min_vlr_svalue(size: [int](https://docs.python.org/3/library/functions.html#int)) → uvlr_t ### ida_hexrays.max_vlr_svalue(size: [int](https://docs.python.org/3/library/functions.html#int)) → uvlr_t ### ida_hexrays.CMP_NZ ### ida_hexrays.CMP_Z ### ida_hexrays.CMP_AE ### ida_hexrays.CMP_B ### ida_hexrays.CMP_A ### ida_hexrays.CMP_BE ### ida_hexrays.CMP_GT ### ida_hexrays.CMP_GE ### ida_hexrays.CMP_LT ### ida_hexrays.CMP_LE ### ida_hexrays.is_unsigned_cmpop(cmpop: cmpop_t) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_hexrays.is_signed_cmpop(cmpop: cmpop_t) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_hexrays.is_cmpop_with_eq(cmpop: cmpop_t) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_hexrays.is_cmpop_without_eq(cmpop: cmpop_t) → [bool](https://docs.python.org/3/library/functions.html#bool) ### *class* ida_hexrays.valrng_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### swap(r: [valrng_t](#ida_hexrays.valrng_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### compare(r: [valrng_t](#ida_hexrays.valrng_t)) → [int](https://docs.python.org/3/library/functions.html#int) #### set_none() → [None](https://docs.python.org/3/library/constants.html#None) #### set_all() → [None](https://docs.python.org/3/library/constants.html#None) #### set_unk() → [None](https://docs.python.org/3/library/constants.html#None) #### set_eq(v: uvlr_t) → [None](https://docs.python.org/3/library/constants.html#None) #### set_cmp(cmp: cmpop_t, \_value: uvlr_t) → [None](https://docs.python.org/3/library/constants.html#None) #### reduce_size(new_size: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### intersect_with(r: [valrng_t](#ida_hexrays.valrng_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### unite_with(r: [valrng_t](#ida_hexrays.valrng_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### inverse() → [None](https://docs.python.org/3/library/constants.html#None) #### empty() → [bool](https://docs.python.org/3/library/functions.html#bool) #### all_values() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_unknown() → [bool](https://docs.python.org/3/library/functions.html#bool) #### has(v: uvlr_t) → [bool](https://docs.python.org/3/library/functions.html#bool) #### dstr() → [str](https://docs.python.org/3/library/stdtypes.html#str) #### cvt_to_single_value() → [bool](https://docs.python.org/3/library/functions.html#bool) #### cvt_to_cmp() → [bool](https://docs.python.org/3/library/functions.html#bool) #### get_size() → [int](https://docs.python.org/3/library/functions.html#int) #### max_value() → uvlr_t #### min_svalue() → uvlr_t #### max_svalue() → uvlr_t ### ida_hexrays.cvar ### ida_hexrays.MAX_VLR_VALUE ### ida_hexrays.MAX_VLR_SVALUE ### ida_hexrays.MIN_VLR_SVALUE ### ida_hexrays.is_may_access(maymust: maymust_t) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_hexrays.MERR_OK ok ### ida_hexrays.MERR_BLOCK no error, switch to new block ### ida_hexrays.MERR_INTERR internal error ### ida_hexrays.MERR_INSN cannot convert to microcode ### ida_hexrays.MERR_MEM not enough memory ### ida_hexrays.MERR_BADBLK bad block found ### ida_hexrays.MERR_BADSP positive sp value has been found ### ida_hexrays.MERR_PROLOG prolog analysis failed ### ida_hexrays.MERR_SWITCH wrong switch idiom ### ida_hexrays.MERR_EXCEPTION exception analysis failed ### ida_hexrays.MERR_HUGESTACK stack frame is too big ### ida_hexrays.MERR_LVARS local variable allocation failed ### ida_hexrays.MERR_BITNESS 16-bit functions cannot be decompiled ### ida_hexrays.MERR_BADCALL could not determine call arguments ### ida_hexrays.MERR_BADFRAME function frame is wrong ### ida_hexrays.MERR_UNKTYPE undefined type s (currently unused error code) ### ida_hexrays.MERR_BADIDB inconsistent database information ### ida_hexrays.MERR_SIZEOF wrong basic type sizes in compiler settings ### ida_hexrays.MERR_REDO redecompilation has been requested ### ida_hexrays.MERR_CANCELED decompilation has been cancelled ### ida_hexrays.MERR_RECDEPTH max recursion depth reached during lvar allocation ### ida_hexrays.MERR_OVERLAP variables would overlap: s ### ida_hexrays.MERR_PARTINIT partially initialized variable s ### ida_hexrays.MERR_COMPLEX too complex function ### ida_hexrays.MERR_LICENSE no license available ### ida_hexrays.MERR_ONLY32 only 32-bit functions can be decompiled for the current database ### ida_hexrays.MERR_ONLY64 only 64-bit functions can be decompiled for the current database ### ida_hexrays.MERR_BUSY already decompiling a function ### ida_hexrays.MERR_FARPTR far memory model is supported only for pc ### ida_hexrays.MERR_EXTERN special segments cannot be decompiled ### ida_hexrays.MERR_FUNCSIZE too big function ### ida_hexrays.MERR_BADRANGES bad input ranges ### ida_hexrays.MERR_BADARCH current architecture is not supported ### ida_hexrays.MERR_DSLOT bad instruction in the delay slot ### ida_hexrays.MERR_STOP no error, stop the analysis ### ida_hexrays.MERR_CLOUD cloud: s ### ida_hexrays.MERR_EMULATOR emulator: s ### ida_hexrays.MERR_MAX_ERR ### ida_hexrays.MERR_LOOP internal code: redo last loop (never reported) ### ida_hexrays.get_merror_desc(code: merror_t, mba: [mba_t](#ida_hexrays.mba_t)) → [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None) Get textual description of an error code * **Parameters:** * **code** – Microcode error code * **mba** – the microcode array * **Returns:** the error address ### *class* ida_hexrays.hexrays_failure_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### code *: merror_t* Microcode error code #### errea *: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)* associated address #### str *: hexrays_failure_t.str* string information #### desc() → [str](https://docs.python.org/3/library/stdtypes.html#str) ### ida_hexrays.MUST_ACCESS ### ida_hexrays.MAY_ACCESS ### ida_hexrays.MAYMUST_ACCESS_MASK ### ida_hexrays.ONE_ACCESS_TYPE ### ida_hexrays.INCLUDE_SPOILED_REGS ### ida_hexrays.EXCLUDE_PASS_REGS ### ida_hexrays.FULL_XDSU ### ida_hexrays.WITH_ASSERTS ### ida_hexrays.EXCLUDE_VOLATILE ### ida_hexrays.INCLUDE_UNUSED_SRC ### ida_hexrays.INCLUDE_DEAD_RETREGS ### ida_hexrays.INCLUDE_RESTRICTED ### ida_hexrays.CALL_SPOILS_ONLY_ARGS ### *class* ida_hexrays.vd_failure_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### hf *: [hexrays_failure_t](#ida_hexrays.hexrays_failure_t)* #### desc() → [str](https://docs.python.org/3/library/stdtypes.html#str) ### *class* ida_hexrays.vd_interr_t(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), buf: [str](https://docs.python.org/3/library/stdtypes.html#str)) Bases: [`vd_failure_t`](#ida_hexrays.vd_failure_t) #### thisown ### ida_hexrays.m_nop ### ida_hexrays.m_stx ### ida_hexrays.m_ldx ### ida_hexrays.m_ldc ### ida_hexrays.m_mov ### ida_hexrays.m_neg ### ida_hexrays.m_lnot ### ida_hexrays.m_bnot ### ida_hexrays.m_xds ### ida_hexrays.m_xdu ### ida_hexrays.m_low ### ida_hexrays.m_high ### ida_hexrays.m_add ### ida_hexrays.m_sub ### ida_hexrays.m_mul ### ida_hexrays.m_udiv ### ida_hexrays.m_sdiv ### ida_hexrays.m_umod ### ida_hexrays.m_smod ### ida_hexrays.m_or ### ida_hexrays.m_and ### ida_hexrays.m_xor ### ida_hexrays.m_shl ### ida_hexrays.m_shr ### ida_hexrays.m_sar ### ida_hexrays.m_cfadd ### ida_hexrays.m_ofadd ### ida_hexrays.m_cfshl ### ida_hexrays.m_cfshr ### ida_hexrays.m_sets ### ida_hexrays.m_seto ### ida_hexrays.m_setp ### ida_hexrays.m_setnz ### ida_hexrays.m_setz ### ida_hexrays.m_setae ### ida_hexrays.m_setb ### ida_hexrays.m_seta ### ida_hexrays.m_setbe ### ida_hexrays.m_setg ### ida_hexrays.m_setge ### ida_hexrays.m_setl ### ida_hexrays.m_setle ### ida_hexrays.m_jcnd ### ida_hexrays.m_jnz ### ida_hexrays.m_jz ### ida_hexrays.m_jae ### ida_hexrays.m_jb ### ida_hexrays.m_ja ### ida_hexrays.m_jbe ### ida_hexrays.m_jg ### ida_hexrays.m_jge ### ida_hexrays.m_jl ### ida_hexrays.m_jle ### ida_hexrays.m_jtbl ### ida_hexrays.m_ijmp ### ida_hexrays.m_goto ### ida_hexrays.m_call ### ida_hexrays.m_icall ### ida_hexrays.m_ret ### ida_hexrays.m_push ### ida_hexrays.m_pop ### ida_hexrays.m_und ### ida_hexrays.m_ext ### ida_hexrays.m_f2i ### ida_hexrays.m_f2u ### ida_hexrays.m_i2f ### ida_hexrays.m_u2f ### ida_hexrays.m_f2f ### ida_hexrays.m_fneg ### ida_hexrays.m_fadd ### ida_hexrays.m_fsub ### ida_hexrays.m_fmul ### ida_hexrays.m_fdiv ### ida_hexrays.must_mcode_close_block(mcode: mcode_t, including_calls: [bool](https://docs.python.org/3/library/functions.html#bool)) → [bool](https://docs.python.org/3/library/functions.html#bool) Must an instruction with the given opcode be the last one in a block? Such opcodes are called closing opcodes. * **Parameters:** * **mcode** – instruction opcode * **including_calls** – should m_call/m_icall be considered as the closing opcodes? If this function returns true, the opcode cannot appear in the middle of a block. Calls are a special case: unknown calls (is_unknown_call) are considered as closing opcodes. ### ida_hexrays.is_mcode_propagatable(mcode: mcode_t) → [bool](https://docs.python.org/3/library/functions.html#bool) May opcode be propagated? Such opcodes can be used in sub-instructions (nested instructions) There is a handful of non-propagatable opcodes, like jumps, ret, nop, etc All other regular opcodes are propagatable and may appear in a nested instruction. ### ida_hexrays.is_mcode_addsub(mcode: mcode_t) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_hexrays.is_mcode_xdsu(mcode: mcode_t) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_hexrays.is_mcode_set(mcode: mcode_t) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_hexrays.is_mcode_set1(mcode: mcode_t) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_hexrays.is_mcode_j1(mcode: mcode_t) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_hexrays.is_mcode_jcond(mcode: mcode_t) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_hexrays.is_mcode_convertible_to_jmp(mcode: mcode_t) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_hexrays.is_mcode_convertible_to_set(mcode: mcode_t) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_hexrays.is_mcode_call(mcode: mcode_t) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_hexrays.is_mcode_fpu(mcode: mcode_t) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_hexrays.is_mcode_commutative(mcode: mcode_t) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_hexrays.is_mcode_shift(mcode: mcode_t) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_hexrays.is_mcode_divmod(op: mcode_t) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_hexrays.has_mcode_seloff(op: mcode_t) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_hexrays.set2jcnd(code: mcode_t) → mcode_t ### ida_hexrays.jcnd2set(code: mcode_t) → mcode_t ### ida_hexrays.negate_mcode_relation(code: mcode_t) → mcode_t ### ida_hexrays.swap_mcode_relation(code: mcode_t) → mcode_t ### ida_hexrays.get_signed_mcode(code: mcode_t) → mcode_t ### ida_hexrays.get_unsigned_mcode(code: mcode_t) → mcode_t ### ida_hexrays.is_signed_mcode(code: mcode_t) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_hexrays.is_unsigned_mcode(code: mcode_t) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_hexrays.mcode_modifies_d(mcode: mcode_t) → [bool](https://docs.python.org/3/library/functions.html#bool) ### *class* ida_hexrays.operand_locator_t(\_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), \_opnum: [int](https://docs.python.org/3/library/functions.html#int)) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### ea *: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)* address of the original processor instruction #### opnum *: [int](https://docs.python.org/3/library/functions.html#int)* operand number in the instruction #### compare(r: [operand_locator_t](#ida_hexrays.operand_locator_t)) → [int](https://docs.python.org/3/library/functions.html#int) ### ida_hexrays.mr_none ### ida_hexrays.mr_cf ### ida_hexrays.mr_zf ### ida_hexrays.mr_sf ### ida_hexrays.mr_of ### ida_hexrays.mr_pf ### ida_hexrays.cc_count ### ida_hexrays.mr_cc ### ida_hexrays.mr_first ### *class* ida_hexrays.number_format_t(\_opnum: [int](https://docs.python.org/3/library/functions.html#int) = 0) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### flags32 *: flags_t* low 32-bit of flags (for compatibility) #### opnum *: char* operand number: 0..UA_MAXOP #### props *: char* properties: combination of ``` NF_ ``` bits (Number format property bits) #### serial *: uchar* for enums: constant serial number #### org_nbytes *: char* original number size in bytes #### type_name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* for stroffs: structure for offsetof() for enums: enum name #### flags *: flags64_t* ida flags, which describe number radix, enum, etc #### get_radix() → [int](https://docs.python.org/3/library/functions.html#int) Get number radix * **Returns:** 2,8,10, or 16 #### is_fixed() → [bool](https://docs.python.org/3/library/functions.html#bool) Is number representation fixed? Fixed representation cannot be modified by the decompiler #### is_hex() → [bool](https://docs.python.org/3/library/functions.html#bool) Is a hexadecimal number? #### is_dec() → [bool](https://docs.python.org/3/library/functions.html#bool) Is a decimal number? #### is_oct() → [bool](https://docs.python.org/3/library/functions.html#bool) Is a octal number? #### is_enum() → [bool](https://docs.python.org/3/library/functions.html#bool) Is a symbolic constant? #### is_char() → [bool](https://docs.python.org/3/library/functions.html#bool) Is a character constant? #### is_stroff() → [bool](https://docs.python.org/3/library/functions.html#bool) Is a structure field offset? #### is_numop() → [bool](https://docs.python.org/3/library/functions.html#bool) Is a number? #### needs_to_be_inverted() → [bool](https://docs.python.org/3/library/functions.html#bool) Does the number need to be negated or bitwise negated? Returns true if the user requested a negation but it is not done yet #### has_unmutable_type() → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_hexrays.NF_FIXED number format has been defined by the user ### ida_hexrays.NF_NEGDONE temporary internal bit: negation has been performed ### ida_hexrays.NF_BINVDONE temporary internal bit: inverting bits is done ### ida_hexrays.NF_NEGATE The user asked to negate the constant. ### ida_hexrays.NF_BITNOT The user asked to invert bits of the constant. ### ida_hexrays.NF_VALID internal bit: stroff or enum is valid for enums: this bit is set immediately for stroffs: this bit is set at the end of decompilation ### *class* ida_hexrays.vd_printer_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### tmpbuf *: [str](https://docs.python.org/3/library/stdtypes.html#str)* #### hdrlines *: [int](https://docs.python.org/3/library/functions.html#int)* number of header lines (prototype+typedef+lvars) valid at the end of print process ### *class* ida_hexrays.vc_printer_t(f: [cfunc_t](#ida_hexrays.cfunc_t)) Bases: [`vd_printer_t`](#ida_hexrays.vd_printer_t) #### thisown #### func *: cfunc_t const \** cfunc_t to generate text for #### lastchar *: char* internal: last printed character #### oneliner() → [bool](https://docs.python.org/3/library/functions.html#bool) Are we generating one-line text representation? * **Returns:** true if the output will occupy one line without line breaks ### *class* ida_hexrays.qstring_printer_t(f: [cfunc_t](#ida_hexrays.cfunc_t), tags: [bool](https://docs.python.org/3/library/functions.html#bool)) Bases: [`vc_printer_t`](#ida_hexrays.vc_printer_t) #### thisown #### with_tags *: [bool](https://docs.python.org/3/library/functions.html#bool)* Generate output with color tags. #### s *: [str](https://docs.python.org/3/library/stdtypes.html#str)* Reference to the output string #### get_s() → [str](https://docs.python.org/3/library/stdtypes.html#str) ### ida_hexrays.dstr(tif: [tinfo_t](../ida_typeinf/index.md#ida_typeinf.tinfo_t)) → [str](https://docs.python.org/3/library/stdtypes.html#str) Print the specified type info. This function can be used from a debugger by typing “tif->dstr()” ### ida_hexrays.is_type_correct(ptr: type_t const \*) → [bool](https://docs.python.org/3/library/functions.html#bool) Verify a type string. * **Returns:** true if type string is correct ### ida_hexrays.is_small_udt(tif: [tinfo_t](../ida_typeinf/index.md#ida_typeinf.tinfo_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Is a small structure or union? * **Returns:** true if the type is a small UDT (user defined type). Small UDTs fit into a register (or pair or registers) as a rule. ### ida_hexrays.is_nonbool_type(type: [tinfo_t](../ida_typeinf/index.md#ida_typeinf.tinfo_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Is definitely a non-boolean type? * **Returns:** true if the type is a non-boolean type (non bool and well defined) ### ida_hexrays.is_bool_type(type: [tinfo_t](../ida_typeinf/index.md#ida_typeinf.tinfo_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Is a boolean type? * **Returns:** true if the type is a boolean type ### ida_hexrays.is_ptr_or_array(t: type_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Is a pointer or array type? ### ida_hexrays.is_paf(t: type_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Is a pointer, array, or function type? ### ida_hexrays.is_inplace_def(type: [tinfo_t](../ida_typeinf/index.md#ida_typeinf.tinfo_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Is struct/union/enum definition (not declaration)? ### ida_hexrays.partial_type_num(type: [tinfo_t](../ida_typeinf/index.md#ida_typeinf.tinfo_t)) → [int](https://docs.python.org/3/library/functions.html#int) Calculate number of partial subtypes. * **Returns:** number of partial subtypes. The bigger is this number, the uglier is the type. ### ida_hexrays.get_float_type(width: [int](https://docs.python.org/3/library/functions.html#int)) → [tinfo_t](../ida_typeinf/index.md#ida_typeinf.tinfo_t) Get a type of a floating point value with the specified width * **Parameters:** **width** – width of the desired type * **Returns:** type info object ### ida_hexrays.get_int_type_by_width_and_sign(srcwidth: [int](https://docs.python.org/3/library/functions.html#int), sign: type_sign_t) → [tinfo_t](../ida_typeinf/index.md#ida_typeinf.tinfo_t) Create a type info by width and sign. Returns a simple type (examples: int, short) with the given width and sign. * **Parameters:** * **srcwidth** – size of the type in bytes * **sign** – sign of the type ### ida_hexrays.get_unk_type(size: [int](https://docs.python.org/3/library/functions.html#int)) → [tinfo_t](../ida_typeinf/index.md#ida_typeinf.tinfo_t) Create a partial type info by width. Returns a partially defined type (examples: \_DWORD, \_BYTE) with the given width. * **Parameters:** **size** – size of the type in bytes. Must be a power of 2 (1, 2, 4, 8, 16). For non-power-of-2 sizes, returns an empty tinfo_t. Use make_valid_size() to round up arbitrary sizes before calling. ### ida_hexrays.dummy_ptrtype(ptrsize: [int](https://docs.python.org/3/library/functions.html#int), isfp: [bool](https://docs.python.org/3/library/functions.html#bool)) → [tinfo_t](../ida_typeinf/index.md#ida_typeinf.tinfo_t) Generate a dummy pointer type * **Parameters:** * **ptrsize** – size of pointed object * **isfp** – is floating point object? ### ida_hexrays.make_pointer(type: [tinfo_t](../ida_typeinf/index.md#ida_typeinf.tinfo_t)) → [tinfo_t](../ida_typeinf/index.md#ida_typeinf.tinfo_t) Create a pointer type. This function performs the following conversion: “type” -> “type\*” * **Parameters:** **type** – object type. * **Returns:** “type\*”. for example, if ‘char’ is passed as the argument, ### ida_hexrays.create_typedef(\*args) → [tinfo_t](../ida_typeinf/index.md#ida_typeinf.tinfo_t) This function has the following signatures: > 1. create_typedef(name: str) -> tinfo_t > 2. create_typedef(n: int) -> tinfo_t # 0: create_typedef(name: str) -> tinfo_t Create a reference to a named type. * **Returns:** type which refers to the specified name. For example, if name is “DWORD”, the type info which refers to “DWORD” is created. # 1: create_typedef(n: int) -> tinfo_t Create a reference to an ordinal type. * **Returns:** type which refers to the specified ordinal. For example, if n is 1, the type info which refers to ordinal type 1 is created. ### ida_hexrays.GUESSED_NONE ### ida_hexrays.GUESSED_WEAK ### ida_hexrays.GUESSED_FUNC ### ida_hexrays.GUESSED_DATA ### ida_hexrays.TS_NOELL ### ida_hexrays.TS_SHRINK ### ida_hexrays.TS_DONTREF ### ida_hexrays.TS_MASK ### ida_hexrays.get_type(id: [int](https://docs.python.org/3/library/functions.html#int), tif: [tinfo_t](../ida_typeinf/index.md#ida_typeinf.tinfo_t), guess: type_source_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Get a global type. Global types are types of addressable objects and struct/union/enum types * **Parameters:** * **id** – address or id of the object * **tif** – buffer for the answer * **guess** – what kind of types to consider * **Returns:** success ### ida_hexrays.set_type(id: [int](https://docs.python.org/3/library/functions.html#int), tif: [tinfo_t](../ida_typeinf/index.md#ida_typeinf.tinfo_t), source: type_source_t, force: [bool](https://docs.python.org/3/library/functions.html#bool) = False) → [bool](https://docs.python.org/3/library/functions.html#bool) Set a global type. * **Parameters:** * **id** – address or id of the object * **tif** – new type info * **source** – where the type comes from * **force** – true means to set the type as is, false means to merge the new type with the possibly existing old type info. * **Returns:** success ### *class* ida_hexrays.vdloc_t Bases: [`ida_typeinf.argloc_t`](../ida_typeinf/index.md#ida_typeinf.argloc_t) #### thisown #### reg1() → [int](https://docs.python.org/3/library/functions.html#int) Get the register info. Use when atype() == ALOC_REG1 or ALOC_REG2 #### set_reg1(r1: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) Set register location. #### compare(r: [vdloc_t](#ida_hexrays.vdloc_t)) → [int](https://docs.python.org/3/library/functions.html#int) #### is_aliasable(mb: [mba_t](#ida_hexrays.mba_t), size: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_hexrays.print_vdloc(loc: [vdloc_t](#ida_hexrays.vdloc_t), nbytes: [int](https://docs.python.org/3/library/functions.html#int)) → [str](https://docs.python.org/3/library/stdtypes.html#str) Print vdloc. Since vdloc does not always carry the size info, we pass it as NBYTES.. ### ida_hexrays.arglocs_overlap(loc1: [vdloc_t](#ida_hexrays.vdloc_t), w1: [int](https://docs.python.org/3/library/functions.html#int), loc2: [vdloc_t](#ida_hexrays.vdloc_t), w2: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) Do two arglocs overlap? ### *class* ida_hexrays.lvar_locator_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### location *: [vdloc_t](#ida_hexrays.vdloc_t)* Variable location. #### defea *: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)* Definition address. Usually, this is the address of the instruction that initializes the variable. In some cases it can be a fictional address. #### get_stkoff() → [int](https://docs.python.org/3/library/functions.html#int) Get offset of the varialbe in the stack frame. * **Returns:** a non-negative value for stack variables. The value is an offset from the bottom of the stack frame in terms of vd-offsets. negative values mean error (not a stack variable) #### is_reg1() → [bool](https://docs.python.org/3/library/functions.html#bool) Is variable located on one register? #### is_reg2() → [bool](https://docs.python.org/3/library/functions.html#bool) Is variable located on two registers? #### is_reg_var() → [bool](https://docs.python.org/3/library/functions.html#bool) Is variable located on register(s)? #### is_stk_var() → [bool](https://docs.python.org/3/library/functions.html#bool) Is variable located on the stack? #### is_scattered() → [bool](https://docs.python.org/3/library/functions.html#bool) Is variable scattered? #### get_reg1() → mreg_t Get the register number of the variable. #### get_reg2() → mreg_t Get the number of the second register (works only for ALOC_REG2 lvars). #### get_scattered() → scattered_aloc_t & Get information about scattered variable. #### compare(r: [lvar_locator_t](#ida_hexrays.lvar_locator_t)) → [int](https://docs.python.org/3/library/functions.html#int) ### *class* ida_hexrays.lvar_t(\*args, \*\*kwargs) Bases: [`lvar_locator_t`](#ida_hexrays.lvar_locator_t) #### thisown #### name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* variable name. use mba_t::set_nice_lvar_name() and mba_t::set_user_lvar_name() to modify it #### cmt *: [str](https://docs.python.org/3/library/stdtypes.html#str)* variable comment string #### tif *: [tinfo_t](../ida_typeinf/index.md#ida_typeinf.tinfo_t)* variable type #### width *: [int](https://docs.python.org/3/library/functions.html#int)* variable size in bytes #### defblk *: [int](https://docs.python.org/3/library/functions.html#int)* first block defining the variable. 0 for args, -1 if unknown #### divisor *: uint64* max known divisor of the variable #### used() → [bool](https://docs.python.org/3/library/functions.html#bool) Is the variable used in the code? #### typed() → [bool](https://docs.python.org/3/library/functions.html#bool) Has the variable a type? #### mreg_done() → [bool](https://docs.python.org/3/library/functions.html#bool) Have corresponding microregs been replaced by references to this variable? #### has_nice_name() → [bool](https://docs.python.org/3/library/functions.html#bool) Does the variable have a nice name? #### is_unknown_width() → [bool](https://docs.python.org/3/library/functions.html#bool) Do we know the width of the variable? #### has_user_info() → [bool](https://docs.python.org/3/library/functions.html#bool) Has any user-defined information? #### has_user_name() → [bool](https://docs.python.org/3/library/functions.html#bool) Has user-defined name? #### has_user_type() → [bool](https://docs.python.org/3/library/functions.html#bool) Has user-defined type? #### is_result_var() → [bool](https://docs.python.org/3/library/functions.html#bool) Is the function result? #### is_arg_var() → [bool](https://docs.python.org/3/library/functions.html#bool) Is the function argument? #### is_fake_var() → [bool](https://docs.python.org/3/library/functions.html#bool) Is fake return variable? #### is_overlapped_var() → [bool](https://docs.python.org/3/library/functions.html#bool) Is overlapped variable? #### is_floating_var() → [bool](https://docs.python.org/3/library/functions.html#bool) Used by a fpu insn? #### is_spoiled_var() → [bool](https://docs.python.org/3/library/functions.html#bool) Is spoiled var? (meaningful only during lvar allocation). #### is_noptr_var() → [bool](https://docs.python.org/3/library/functions.html#bool) Variable type should not be a pointer. #### is_mapdst_var() → [bool](https://docs.python.org/3/library/functions.html#bool) Other variable(s) map to this var? #### is_thisarg() → [bool](https://docs.python.org/3/library/functions.html#bool) Is ‘this’ argument of a C++ member function? #### is_split_var() → [bool](https://docs.python.org/3/library/functions.html#bool) Is a split variable? #### has_regname() → [bool](https://docs.python.org/3/library/functions.html#bool) Has a register name? (like \_RAX). #### in_asm() → [bool](https://docs.python.org/3/library/functions.html#bool) Is variable used in an instruction translated into \_\_asm? #### is_dummy_arg() → [bool](https://docs.python.org/3/library/functions.html#bool) Is a dummy argument (added to fill a hole in the argument list). #### is_notarg() → [bool](https://docs.python.org/3/library/functions.html#bool) Is a local variable? (local variable cannot be an input argument). #### is_automapped() → [bool](https://docs.python.org/3/library/functions.html#bool) Was the variable automatically mapped to another variable? #### is_used_byref() → [bool](https://docs.python.org/3/library/functions.html#bool) Was the address of the variable taken? #### is_decl_unused() → [bool](https://docs.python.org/3/library/functions.html#bool) Was declared as \_\_unused by the user? See CVAR_UNUSED. #### is_shared() → [bool](https://docs.python.org/3/library/functions.html#bool) Is lvar mapped to several chains. #### was_scattered_arg() → [bool](https://docs.python.org/3/library/functions.html#bool) Was lvar transformed from a scattered argument? #### is_noprop() → [bool](https://docs.python.org/3/library/functions.html#bool) Is it forbidden to propagate the variable? #### set_used() → [None](https://docs.python.org/3/library/constants.html#None) #### clear_used() → [None](https://docs.python.org/3/library/constants.html#None) #### set_typed() → [None](https://docs.python.org/3/library/constants.html#None) #### set_non_typed() → [None](https://docs.python.org/3/library/constants.html#None) #### clr_user_info() → [None](https://docs.python.org/3/library/constants.html#None) #### set_user_name() → [None](https://docs.python.org/3/library/constants.html#None) #### set_user_type() → [None](https://docs.python.org/3/library/constants.html#None) #### clr_user_type() → [None](https://docs.python.org/3/library/constants.html#None) #### clr_user_name() → [None](https://docs.python.org/3/library/constants.html#None) #### set_mreg_done() → [None](https://docs.python.org/3/library/constants.html#None) #### clr_mreg_done() → [None](https://docs.python.org/3/library/constants.html#None) #### set_unknown_width() → [None](https://docs.python.org/3/library/constants.html#None) #### clr_unknown_width() → [None](https://docs.python.org/3/library/constants.html#None) #### set_arg_var() → [None](https://docs.python.org/3/library/constants.html#None) #### clr_arg_var() → [None](https://docs.python.org/3/library/constants.html#None) #### set_fake_var() → [None](https://docs.python.org/3/library/constants.html#None) #### clr_fake_var() → [None](https://docs.python.org/3/library/constants.html#None) #### set_overlapped_var() → [None](https://docs.python.org/3/library/constants.html#None) #### clr_overlapped_var() → [None](https://docs.python.org/3/library/constants.html#None) #### set_floating_var() → [None](https://docs.python.org/3/library/constants.html#None) #### clr_floating_var() → [None](https://docs.python.org/3/library/constants.html#None) #### set_spoiled_var() → [None](https://docs.python.org/3/library/constants.html#None) #### clr_spoiled_var() → [None](https://docs.python.org/3/library/constants.html#None) #### set_mapdst_var() → [None](https://docs.python.org/3/library/constants.html#None) #### clr_mapdst_var() → [None](https://docs.python.org/3/library/constants.html#None) #### set_noptr_var() → [None](https://docs.python.org/3/library/constants.html#None) #### clr_noptr_var() → [None](https://docs.python.org/3/library/constants.html#None) #### set_thisarg() → [None](https://docs.python.org/3/library/constants.html#None) #### clr_thisarg() → [None](https://docs.python.org/3/library/constants.html#None) #### set_split_var() → [None](https://docs.python.org/3/library/constants.html#None) #### clr_split_var() → [None](https://docs.python.org/3/library/constants.html#None) #### set_dummy_arg() → [None](https://docs.python.org/3/library/constants.html#None) #### clr_dummy_arg() → [None](https://docs.python.org/3/library/constants.html#None) #### set_notarg() → [None](https://docs.python.org/3/library/constants.html#None) #### clr_notarg() → [None](https://docs.python.org/3/library/constants.html#None) #### set_automapped() → [None](https://docs.python.org/3/library/constants.html#None) #### clr_automapped() → [None](https://docs.python.org/3/library/constants.html#None) #### set_used_byref() → [None](https://docs.python.org/3/library/constants.html#None) #### clr_used_byref() → [None](https://docs.python.org/3/library/constants.html#None) #### set_decl_unused() → [None](https://docs.python.org/3/library/constants.html#None) #### clr_decl_unused() → [None](https://docs.python.org/3/library/constants.html#None) #### set_shared() → [None](https://docs.python.org/3/library/constants.html#None) #### clr_shared() → [None](https://docs.python.org/3/library/constants.html#None) #### set_scattered_arg() → [None](https://docs.python.org/3/library/constants.html#None) #### clr_scattered_arg() → [None](https://docs.python.org/3/library/constants.html#None) #### set_noprop() → [None](https://docs.python.org/3/library/constants.html#None) #### clr_noprop() → [None](https://docs.python.org/3/library/constants.html#None) #### has_common(v: [lvar_t](#ida_hexrays.lvar_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Do variables overlap? #### has_common_bit(loc: [vdloc_t](#ida_hexrays.vdloc_t), width2: asize_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Does the variable overlap with the specified location? #### type() → tinfo_t & Get variable type. #### accepts_type(t: [tinfo_t](../ida_typeinf/index.md#ida_typeinf.tinfo_t), may_change_thisarg: [bool](https://docs.python.org/3/library/functions.html#bool) = False) → [bool](https://docs.python.org/3/library/functions.html#bool) Check if the variable accept the specified type. Some types are forbidden (void, function types, wrong arrays, etc) #### set_lvar_type(t: [tinfo_t](../ida_typeinf/index.md#ida_typeinf.tinfo_t), may_fail: [bool](https://docs.python.org/3/library/functions.html#bool) = False) → [bool](https://docs.python.org/3/library/functions.html#bool) Set variable type Note: this function does not modify the idb, only the lvar instance in the memory. For permanent changes see modify_user_lvars() Also, the variable type is not considered as final by the decompiler and may be modified later by the type derivation. In some cases set_final_var_type() may work better, but it does not do persistent changes to the database neither. * **Parameters:** * **t** – new type * **may_fail** – if false and type is bad, interr * **Returns:** success #### set_final_lvar_type(t: [tinfo_t](../ida_typeinf/index.md#ida_typeinf.tinfo_t)) → [None](https://docs.python.org/3/library/constants.html#None) Set final variable type. #### set_width(w: [int](https://docs.python.org/3/library/functions.html#int), svw_flags: [int](https://docs.python.org/3/library/functions.html#int) = 0) → [bool](https://docs.python.org/3/library/functions.html#bool) Change the variable width. We call the variable size ‘width’, it is represents the number of bytes. This function may change the variable type using set_lvar_type(). * **Parameters:** * **w** – new width * **svw_flags** – combination of ``` SVW_ ``` … bits * **Returns:** success #### append_list(mba: [mba_t](#ida_hexrays.mba_t), lst: [mlist_t](#ida_hexrays.mlist_t), pad_if_scattered: [bool](https://docs.python.org/3/library/functions.html#bool) = False) → [None](https://docs.python.org/3/library/constants.html#None) Append local variable to mlist. * **Parameters:** * **mba** – ptr to the current mba_t * **lst** – list to append to * **pad_if_scattered** – if true, append padding bytes in case of scattered lvar #### is_aliasable(mba: [mba_t](#ida_hexrays.mba_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Is the variable aliasable? * **Parameters:** **mba** – ptr to the current mba_t Aliasable variables may be modified indirectly (through a pointer) ### ida_hexrays.SVW_INT ### ida_hexrays.SVW_FLOAT ### ida_hexrays.SVW_SOFT ### *class* ida_hexrays.lvars_t Bases: [`qvector_lvar_t`](#ida_hexrays.qvector_lvar_t) #### thisown #### find_input_lvar(argloc: [vdloc_t](#ida_hexrays.vdloc_t), \_size: [int](https://docs.python.org/3/library/functions.html#int)) → [int](https://docs.python.org/3/library/functions.html#int) Find an input variable at the specified location. * **Parameters:** * **argloc** – variable location * **\_size** – variable size in bytes * **Returns:** -1 if failed, otherwise an index into ‘vars’ #### find_input_reg(reg: [int](https://docs.python.org/3/library/functions.html#int), \_size: [int](https://docs.python.org/3/library/functions.html#int) = 1) → [int](https://docs.python.org/3/library/functions.html#int) Find an input register variable. * **Parameters:** * **reg** – register to find * **\_size** – variable size in bytes * **Returns:** -1 if failed, otherwise an index into ‘vars’ #### find_stkvar(spoff: [int](https://docs.python.org/3/library/functions.html#int), width: [int](https://docs.python.org/3/library/functions.html#int)) → [int](https://docs.python.org/3/library/functions.html#int) Find a stack variable at the specified location. * **Parameters:** * **spoff** – offset from the minimal sp * **width** – variable size in bytes * **Returns:** -1 if failed, otherwise an index into ‘vars’ #### find(ll: [lvar_locator_t](#ida_hexrays.lvar_locator_t)) → lvar_t \* Find a variable at the specified location. * **Parameters:** **ll** – variable location * **Returns:** pointer to variable or nullptr #### find_lvar(location: [vdloc_t](#ida_hexrays.vdloc_t), width: [int](https://docs.python.org/3/library/functions.html#int), defblk: [int](https://docs.python.org/3/library/functions.html#int) = -1) → [int](https://docs.python.org/3/library/functions.html#int) Find a variable at the specified location. * **Parameters:** * **location** – variable location * **width** – variable size in bytes * **defblk** – definition block of the lvar. -1 means any block * **Returns:** -1 if failed, otherwise an index into ‘vars’ ### *class* ida_hexrays.lvar_saved_info_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### ll *: [lvar_locator_t](#ida_hexrays.lvar_locator_t)* Variable locator. #### name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* Name. #### type *: [tinfo_t](../ida_typeinf/index.md#ida_typeinf.tinfo_t)* Type. #### cmt *: [str](https://docs.python.org/3/library/stdtypes.html#str)* Comment. #### size *: ssize_t* Type size (if not initialized then -1). #### flags *: [int](https://docs.python.org/3/library/functions.html#int)* saved user lvar info property bits #### has_info() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_kept() → [bool](https://docs.python.org/3/library/functions.html#bool) #### clear_keep() → [None](https://docs.python.org/3/library/constants.html#None) #### set_keep() → [None](https://docs.python.org/3/library/constants.html#None) #### is_split_lvar() → [bool](https://docs.python.org/3/library/functions.html#bool) #### set_split_lvar() → [None](https://docs.python.org/3/library/constants.html#None) #### clr_split_lvar() → [None](https://docs.python.org/3/library/constants.html#None) #### is_noptr_lvar() → [bool](https://docs.python.org/3/library/functions.html#bool) #### set_noptr_lvar() → [None](https://docs.python.org/3/library/constants.html#None) #### clr_noptr_lvar() → [None](https://docs.python.org/3/library/constants.html#None) #### is_nomap_lvar() → [bool](https://docs.python.org/3/library/functions.html#bool) #### set_nomap_lvar() → [None](https://docs.python.org/3/library/constants.html#None) #### clr_nomap_lvar() → [None](https://docs.python.org/3/library/constants.html#None) #### is_unused_lvar() → [bool](https://docs.python.org/3/library/functions.html#bool) #### set_unused_lvar() → [None](https://docs.python.org/3/library/constants.html#None) #### clr_unused_lvar() → [None](https://docs.python.org/3/library/constants.html#None) #### is_noprop_lvar() → [bool](https://docs.python.org/3/library/functions.html#bool) #### set_noprop_lvar() → [None](https://docs.python.org/3/library/constants.html#None) #### clr_noprop_lvar() → [None](https://docs.python.org/3/library/constants.html#None) ### ida_hexrays.LVINF_KEEP preserve saved user settings regardless of vars for example, if a var loses all its user-defined attributes or even gets destroyed, keep its lvar_saved_info_t. this is used for ephemeral variables that get destroyed by macro recognition. ### ida_hexrays.LVINF_SPLIT split allocation of a new variable. forces the decompiler to create a new variable at ll.defea ### ida_hexrays.LVINF_NOPTR variable type should not be a pointer ### ida_hexrays.LVINF_NOMAP forbid automatic mapping of the variable ### ida_hexrays.LVINF_UNUSED unused argument, corresponds to CVAR_UNUSED ### ida_hexrays.LVINF_NOPROP don’t propagate assignments to this lvar (CVAR_NOPROP) ### *class* ida_hexrays.lvar_uservec_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### lvvec *: [lvar_saved_infos_t](#ida_hexrays.lvar_saved_infos_t)* User-specified names, types, comments for lvars. Variables without user-specified info are not present in this vector. #### lmaps *: [lvar_mapping_t](#ida_hexrays.lvar_mapping_t)* Local variable mapping (used for merging variables). #### stkoff_delta *: [int](https://docs.python.org/3/library/functions.html#int)* Delta to add to IDA stack offset to calculate Hex-Rays stack offsets. Should be set by the caller before calling save_user_lvar_settings(); #### ulv_flags *: [int](https://docs.python.org/3/library/functions.html#int)* Various flags. Possible values are from lvar_uservec_t property bits. #### swap(r: [lvar_uservec_t](#ida_hexrays.lvar_uservec_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### clear() → [None](https://docs.python.org/3/library/constants.html#None) #### empty() → [bool](https://docs.python.org/3/library/functions.html#bool) #### find_info(vloc: [lvar_locator_t](#ida_hexrays.lvar_locator_t)) → lvar_saved_info_t \* find saved user settings for given var #### keep_info(v: [lvar_t](#ida_hexrays.lvar_t)) → [None](https://docs.python.org/3/library/constants.html#None) Preserve user settings for given var. ### ida_hexrays.ULV_PRECISE_DEFEA Use precise defea’s for lvar locations. ### ida_hexrays.restore_user_lvar_settings(lvinf: [lvar_uservec_t](#ida_hexrays.lvar_uservec_t), func_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Restore user defined local variable settings in the database. * **Parameters:** * **lvinf** – ptr to output buffer * **func_ea** – entry address of the function * **Returns:** success ### ida_hexrays.save_user_lvar_settings(func_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), lvinf: [lvar_uservec_t](#ida_hexrays.lvar_uservec_t)) → [None](https://docs.python.org/3/library/constants.html#None) Save user defined local variable settings into the database. * **Parameters:** * **func_ea** – entry address of the function * **lvinf** – user-specified info about local variables ### *class* ida_hexrays.user_lvar_modifier_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### modify_lvars(lvinf: [lvar_uservec_t](#ida_hexrays.lvar_uservec_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Modify lvar settings. Returns: true-modified ### ida_hexrays.modify_user_lvars(entry_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), mlv: [user_lvar_modifier_t](#ida_hexrays.user_lvar_modifier_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Modify saved local variable settings. * **Parameters:** * **entry_ea** – function start address * **mlv** – local variable modifier * **Returns:** true if modified variables ### ida_hexrays.modify_user_lvar_info(func_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), mli_flags: uint, info: [lvar_saved_info_t](#ida_hexrays.lvar_saved_info_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Modify saved local variable settings of one variable. * **Parameters:** * **func_ea** – function start address * **mli_flags** – bits that specify which attrs defined by INFO are to be set * **info** – local variable info attrs * **Returns:** true if modified, false if invalid MLI_FLAGS passed ### ida_hexrays.MLI_NAME apply lvar name ### ida_hexrays.MLI_TYPE apply lvar type ### ida_hexrays.MLI_CMT apply lvar comment ### ida_hexrays.MLI_SET_FLAGS set ``` LVINF_ ``` … bits ### ida_hexrays.MLI_CLR_FLAGS clear ``` LVINF_ ``` … bits ### ida_hexrays.locate_lvar(out: [lvar_locator_t](#ida_hexrays.lvar_locator_t), func_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), varname: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [bool](https://docs.python.org/3/library/functions.html#bool) Find a variable by name. * **Parameters:** * **out** – output buffer for the variable locator * **func_ea** – function start address * **varname** – variable name * **Returns:** success Since VARNAME is not always enough to find the variable, it may decompile the function. ### ida_hexrays.rename_lvar(func_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), oldname: [str](https://docs.python.org/3/library/stdtypes.html#str), newname: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [bool](https://docs.python.org/3/library/functions.html#bool) Rename a local variable. * **Parameters:** * **func_ea** – function start address * **oldname** – old name of the variable * **newname** – new name of the variable * **Returns:** success This is a convenience function. For bulk renaming consider using modify_user_lvars. ### *class* ida_hexrays.udcall_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* #### tif *: [tinfo_t](../ida_typeinf/index.md#ida_typeinf.tinfo_t)* #### compare(r: [udcall_t](#ida_hexrays.udcall_t)) → [int](https://docs.python.org/3/library/functions.html#int) #### empty() → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_hexrays.restore_user_defined_calls(udcalls: udcall_map_t \*, func_ea: ida_idaapi.ea_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Restore user defined function calls from the database. * **Parameters:** * **udcalls** – ptr to output buffer * **func_ea** – entry address of the function * **Returns:** success ### ida_hexrays.save_user_defined_calls(func_ea: ida_idaapi.ea_t, udcalls: udcall_map_t const &) → [None](https://docs.python.org/3/library/constants.html#None) Save user defined local function calls into the database. * **Parameters:** * **func_ea** – entry address of the function * **udcalls** – user-specified info about user defined function calls ### ida_hexrays.parse_user_call(udc: [udcall_t](#ida_hexrays.udcall_t), decl: [str](https://docs.python.org/3/library/stdtypes.html#str), silent: [bool](https://docs.python.org/3/library/functions.html#bool)) → [bool](https://docs.python.org/3/library/functions.html#bool) Convert function type declaration into internal structure * **Parameters:** * **udc** – - pointer to output structure * **decl** – - function type declaration * **silent** – - if TRUE: do not show warning in case of incorrect type * **Returns:** success ### ida_hexrays.convert_to_user_call(udc: [udcall_t](#ida_hexrays.udcall_t), cdg: [codegen_t](#ida_hexrays.codegen_t)) → merror_t try to generate user-defined call for an instruction * **Returns:** Microcode error code code: MERR_OK - user-defined call generated else - error (MERR_INSN == inacceptable udc.tif) ### *class* ida_hexrays.microcode_filter_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### match(cdg: [codegen_t](#ida_hexrays.codegen_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) check if the filter object is to be applied * **Returns:** success #### apply(cdg: [codegen_t](#ida_hexrays.codegen_t)) → merror_t generate microcode for an instruction * **Returns:** ``` MERR_ ``` … code: MERR_OK - user-defined microcode generated, go to the next instruction MERR_INSN - not generated - the caller should try the standard way else - error ### ida_hexrays.install_microcode_filter(filter: [microcode_filter_t](#ida_hexrays.microcode_filter_t), install: [bool](https://docs.python.org/3/library/functions.html#bool) = True) → [bool](https://docs.python.org/3/library/functions.html#bool) register/unregister non-standard microcode generator * **Parameters:** * **filter** – - microcode generator object * **install** – - TRUE - register the object, FALSE - unregister * **Returns:** success ### *class* ida_hexrays.udc_filter_t Bases: [`microcode_filter_t`](#ida_hexrays.microcode_filter_t) #### thisown #### cleanup() → [None](https://docs.python.org/3/library/constants.html#None) Cleanup the filter This function properly clears type information associated to this filter. #### match(cdg: [codegen_t](#ida_hexrays.codegen_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) return true if the filter object should be applied to given instruction #### apply(cdg: [codegen_t](#ida_hexrays.codegen_t)) → merror_t generate microcode for an instruction * **Returns:** ``` MERR_ ``` … code: MERR_OK - user-defined microcode generated, go to the next instruction MERR_INSN - not generated - the caller should try the standard way else - error #### empty() → [bool](https://docs.python.org/3/library/functions.html#bool) #### install() → [None](https://docs.python.org/3/library/constants.html#None) #### remove() → [bool](https://docs.python.org/3/library/functions.html#bool) #### init(decl: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### *class* ida_hexrays.bitset_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### swap(r: [bitset_t](#ida_hexrays.bitset_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### copy(m: [bitset_t](#ida_hexrays.bitset_t)) → bitset_t & #### add(\*args) → [bool](https://docs.python.org/3/library/functions.html#bool) This function has the following signatures: > 1. add(bit: int) -> bool > 2. add(bit: int, width: int) -> bool > 3. add(ml: const bitset_t &) -> bool # 0: add(bit: int) -> bool # 1: add(bit: int, width: int) -> bool # 2: add(ml: const bitset_t &) -> bool #### sub(\*args) → [bool](https://docs.python.org/3/library/functions.html#bool) This function has the following signatures: > 1. sub(bit: int) -> bool > 2. sub(bit: int, width: int) -> bool > 3. sub(ml: const bitset_t &) -> bool # 0: sub(bit: int) -> bool # 1: sub(bit: int, width: int) -> bool # 2: sub(ml: const bitset_t &) -> bool #### cut_at(maxbit: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### shift_down(shift: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### has(bit: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### has_all(bit: [int](https://docs.python.org/3/library/functions.html#int), width: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### has_any(bit: [int](https://docs.python.org/3/library/functions.html#int), width: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### dstr() → [str](https://docs.python.org/3/library/stdtypes.html#str) #### empty() → [bool](https://docs.python.org/3/library/functions.html#bool) #### count(\*args) → [int](https://docs.python.org/3/library/functions.html#int) This function has the following signatures: > 1. count() -> int > 2. count(bit: int) -> int # 0: count() -> int # 1: count(bit: int) -> int #### last() → [int](https://docs.python.org/3/library/functions.html#int) #### clear() → [None](https://docs.python.org/3/library/constants.html#None) #### fill_with_ones(maxbit: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### has_common(ml: [bitset_t](#ida_hexrays.bitset_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### intersect(ml: [bitset_t](#ida_hexrays.bitset_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_subset_of(ml: [bitset_t](#ida_hexrays.bitset_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### includes(ml: [bitset_t](#ida_hexrays.bitset_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### compare(r: [bitset_t](#ida_hexrays.bitset_t)) → [int](https://docs.python.org/3/library/functions.html#int) #### itat(n: [int](https://docs.python.org/3/library/functions.html#int)) → bitset_t::iterator #### begin() → bitset_t::iterator #### end() → bitset_t::iterator #### front() → [int](https://docs.python.org/3/library/functions.html#int) #### back() → [int](https://docs.python.org/3/library/functions.html#int) #### inc(p: [iterator](#ida_hexrays.iterator), n: [int](https://docs.python.org/3/library/functions.html#int) = 1) → [None](https://docs.python.org/3/library/constants.html#None) #### itv(it: [iterator](#ida_hexrays.iterator)) → [int](https://docs.python.org/3/library/functions.html#int) ### ida_hexrays.bitset_width ### ida_hexrays.bitset_align ### ida_hexrays.bitset_shift ### *class* ida_hexrays.iterator(n: [int](https://docs.python.org/3/library/functions.html#int) = -1) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown ### *class* ida_hexrays.node_bitset_t(\*args) Bases: [`bitset_t`](#ida_hexrays.bitset_t) #### thisown ### *class* ida_hexrays.array_of_node_bitset_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown ### *class* ida_hexrays.ivl_t(\_off: uint64 = 0, \_size: uint64 = 0) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### off *: uint64* #### size *: uint64* #### empty() → [bool](https://docs.python.org/3/library/functions.html#bool) #### valid() → [bool](https://docs.python.org/3/library/functions.html#bool) #### end() → uint64 #### last() → uint64 #### clear() → [None](https://docs.python.org/3/library/constants.html#None) #### dstr() → [str](https://docs.python.org/3/library/stdtypes.html#str) #### extend_to_cover(r: [ivl_t](#ida_hexrays.ivl_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### intersect(r: [ivl_t](#ida_hexrays.ivl_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### overlap(ivl: [ivl_t](#ida_hexrays.ivl_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### includes(ivl: [ivl_t](#ida_hexrays.ivl_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### contains(off2: uint64) → [bool](https://docs.python.org/3/library/functions.html#bool) #### compare(r: [ivl_t](#ida_hexrays.ivl_t)) → [int](https://docs.python.org/3/library/functions.html#int) ### *class* ida_hexrays.ivl_with_name_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### ivl *: [ivl_t](#ida_hexrays.ivl_t)* #### whole *: [str](https://docs.python.org/3/library/stdtypes.html#str)* #### part *: [str](https://docs.python.org/3/library/stdtypes.html#str)* ### *class* ida_hexrays.ivlset_visitor_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### visit_ivl(ivl: [ivl_t](#ida_hexrays.ivl_t)) → [int](https://docs.python.org/3/library/functions.html#int) ### *class* ida_hexrays.ivlset_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### swap(r: [ivlset_t](#ida_hexrays.ivlset_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### getivl(idx: [int](https://docs.python.org/3/library/functions.html#int)) → ivl_t const & #### lastivl() → ivl_t const & #### nivls() → [int](https://docs.python.org/3/library/functions.html#int) #### empty() → [bool](https://docs.python.org/3/library/functions.html#bool) #### clear() → [None](https://docs.python.org/3/library/constants.html#None) #### qclear() → [None](https://docs.python.org/3/library/constants.html#None) #### all_values() → [bool](https://docs.python.org/3/library/functions.html#bool) #### set_all_values() → [None](https://docs.python.org/3/library/constants.html#None) #### single_value(\*args) → [bool](https://docs.python.org/3/library/functions.html#bool) This function has the following signatures: > 1. single_value() -> bool > 2. single_value(v: uint64) -> bool # 0: single_value() -> bool # 1: single_value(v: uint64) -> bool #### add(\*args) → [bool](https://docs.python.org/3/library/functions.html#bool) This function has the following signatures: > 1. add(ivl: const ivl_t &) -> bool > 2. add(ea: ida_idaapi.ea_t, size: asize_t) -> bool > 3. add(ivs: const ivlset_t &) -> bool # 0: add(ivl: const ivl_t &) -> bool # 1: add(ea: ida_idaapi.ea_t, size: asize_t) -> bool # 2: add(ivs: const ivlset_t &) -> bool #### addmasked(ivs: [ivlset_t](#ida_hexrays.ivlset_t), mask: [ivl_t](#ida_hexrays.ivl_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### sub(\*args) → [bool](https://docs.python.org/3/library/functions.html#bool) This function has the following signatures: > 1. sub(ivl: const ivl_t &) -> bool > 2. sub(ea: ida_idaapi.ea_t, size: asize_t) -> bool > 3. sub(ivs: const ivlset_t &) -> bool # 0: sub(ivl: const ivl_t &) -> bool # 1: sub(ea: ida_idaapi.ea_t, size: asize_t) -> bool # 2: sub(ivs: const ivlset_t &) -> bool #### count() → asize_t #### has_common(\*args) → [bool](https://docs.python.org/3/library/functions.html#bool) This function has the following signatures: > 1. has_common(ivs: const ivlset_t &) -> bool > 2. has_common(ivl: const ivl_t &, strict: bool=false) -> bool # 0: has_common(ivs: const ivlset_t &) -> bool # 1: has_common(ivl: const ivl_t &, strict: bool=false) -> bool #### contains(off: uint64) → [bool](https://docs.python.org/3/library/functions.html#bool) #### includes(ivs: [ivlset_t](#ida_hexrays.ivlset_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### intersect(ivs: [ivlset_t](#ida_hexrays.ivlset_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_subset_of(ivs: [ivlset_t](#ida_hexrays.ivlset_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### compare(r: [ivlset_t](#ida_hexrays.ivlset_t)) → [int](https://docs.python.org/3/library/functions.html#int) #### begin(\*args) → ivlset_t::iterator This function has the following signatures: > 1. begin() -> const_iterator > 2. begin() -> iterator # 0: begin() -> const_iterator # 1: begin() -> iterator #### end(\*args) → ivlset_t::iterator This function has the following signatures: > 1. end() -> const_iterator > 2. end() -> iterator # 0: end() -> const_iterator # 1: end() -> iterator #### dstr() → [str](https://docs.python.org/3/library/stdtypes.html#str) ### *class* ida_hexrays.rlist_t(\*args) Bases: [`bitset_t`](#ida_hexrays.bitset_t) #### thisown #### dstr() → [str](https://docs.python.org/3/library/stdtypes.html#str) ### *class* ida_hexrays.mlist_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### reg *: [rlist_t](#ida_hexrays.rlist_t)* #### mem *: [ivlset_t](#ida_hexrays.ivlset_t)* #### swap(r: [mlist_t](#ida_hexrays.mlist_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### addmem(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), size: asize_t) → [bool](https://docs.python.org/3/library/functions.html#bool) #### add(\*args) → [bool](https://docs.python.org/3/library/functions.html#bool) This function has the following signatures: > 1. add(r: mreg_t, size: int) -> bool > 2. add(r: const rlist_t &) -> bool > 3. add(ivl: const ivl_t &) -> bool > 4. add(lst: const mlist_t &) -> bool # 0: add(r: mreg_t, size: int) -> bool # 1: add(r: const rlist_t &) -> bool # 2: add(ivl: const ivl_t &) -> bool # 3: add(lst: const mlist_t &) -> bool #### sub(\*args) → [bool](https://docs.python.org/3/library/functions.html#bool) This function has the following signatures: > 1. sub(r: mreg_t, size: int) -> bool > 2. sub(ivl: const ivl_t &) -> bool > 3. sub(lst: const mlist_t &) -> bool # 0: sub(r: mreg_t, size: int) -> bool # 1: sub(ivl: const ivl_t &) -> bool # 2: sub(lst: const mlist_t &) -> bool #### count() → asize_t #### dstr() → [str](https://docs.python.org/3/library/stdtypes.html#str) #### empty() → [bool](https://docs.python.org/3/library/functions.html#bool) #### clear() → [None](https://docs.python.org/3/library/constants.html#None) #### has(r: mreg_t) → [bool](https://docs.python.org/3/library/functions.html#bool) #### has_all(r: mreg_t, size: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### has_any(r: mreg_t, size: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### has_memory() → [bool](https://docs.python.org/3/library/functions.html#bool) #### has_common(lst: [mlist_t](#ida_hexrays.mlist_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### includes(lst: [mlist_t](#ida_hexrays.mlist_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### intersect(lst: [mlist_t](#ida_hexrays.mlist_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_subset_of(lst: [mlist_t](#ida_hexrays.mlist_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### compare(r: [mlist_t](#ida_hexrays.mlist_t)) → [int](https://docs.python.org/3/library/functions.html#int) ### ida_hexrays.get_temp_regs() → mlist_t const & Get list of temporary registers. Tempregs are temporary registers that are used during code generation. They do not map to regular processor registers. They are used only to store temporary values during execution of one instruction. Tempregs may not be used to pass a value from one block to another. In other words, at the end of a block all tempregs must be dead. ### ida_hexrays.is_kreg(r: mreg_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Is a kernel register? Kernel registers are temporary registers that can be used freely. They may be used to store values that cross instruction or basic block boundaries. Kernel registers do not map to regular processor registers. See also mba_t::alloc_kreg() ### ida_hexrays.reg2mreg(reg: [int](https://docs.python.org/3/library/functions.html#int)) → mreg_t Map a processor register to a microregister. * **Parameters:** **reg** – processor register number * **Returns:** microregister register id or mr_none ### ida_hexrays.mreg2reg(reg: mreg_t, width: [int](https://docs.python.org/3/library/functions.html#int)) → [int](https://docs.python.org/3/library/functions.html#int) Map a microregister to a processor register. * **Parameters:** * **reg** – microregister number * **width** – size of microregister in bytes * **Returns:** processor register id or -1 ### ida_hexrays.get_mreg_name(reg: mreg_t, width: int, ud: void \* = None) → [str](https://docs.python.org/3/library/stdtypes.html#str) Get the microregister name. * **Parameters:** * **reg** – microregister number * **width** – size of microregister in bytes. may be bigger than the real register size. * **ud** – reserved, must be nullptr * **Returns:** width of the printed register. this value may be less than the WIDTH argument. ### *class* ida_hexrays.optinsn_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### func(blk: [mblock_t](#ida_hexrays.mblock_t), ins: [minsn_t](#ida_hexrays.minsn_t), optflags: [int](https://docs.python.org/3/library/functions.html#int)) → [int](https://docs.python.org/3/library/functions.html#int) Optimize an instruction. * **Parameters:** * **blk** – current basic block. maybe nullptr, which means that the instruction must be optimized without context * **ins** – instruction to optimize; it is always a top-level instruction. the callback may not delete the instruction but may convert it into nop (see mblock_t::make_nop). to optimize sub-instructions, visit them using minsn_visitor_t. sub-instructions may not be converted into nop but can be converted to “mov x,x”. for example: add x,0,x => mov x,x this callback may change other instructions in the block, but should do this with care, e.g. to no break the propagation algorithm if called with OPTI_NO_LDXOPT. * **optflags** – combination of optimization flags bits * **Returns:** number of changes made to the instruction. if after this call the instruction’s use/def lists have changed, you must mark the block level lists as dirty (see mark_lists_dirty) #### install() → [None](https://docs.python.org/3/library/constants.html#None) #### remove() → [bool](https://docs.python.org/3/library/functions.html#bool) ### *class* ida_hexrays.optblock_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### func(blk: [mblock_t](#ida_hexrays.mblock_t)) → [int](https://docs.python.org/3/library/functions.html#int) Optimize a block. This function usually performs the optimizations that require analyzing the entire block and/or its neighbors. For example it can recognize patterns and perform conversions like: b0: b0: … … jnz x, 0, @b2 => jnz x, 0, @b2 b1: b1: add x, 0, y mov x, y … … * **Parameters:** **blk** – Basic block to optimize as a whole. * **Returns:** number of changes made to the block. See also mark_lists_dirty. #### install() → [None](https://docs.python.org/3/library/constants.html#None) #### remove() → [bool](https://docs.python.org/3/library/functions.html#bool) ### *class* ida_hexrays.simple_graph_t(\*args, \*\*kwargs) Bases: [`ida_gdl.gdl_graph_t`](../ida_gdl/index.md#ida_gdl.gdl_graph_t) #### thisown #### title *: [str](https://docs.python.org/3/library/stdtypes.html#str)* #### colored_gdl_edges *: [bool](https://docs.python.org/3/library/functions.html#bool)* #### compute_dominators(domin: [array_of_node_bitset_t](#ida_hexrays.array_of_node_bitset_t), post: [bool](https://docs.python.org/3/library/functions.html#bool) = False) → [None](https://docs.python.org/3/library/constants.html#None) #### compute_immediate_dominators(domin: [array_of_node_bitset_t](#ida_hexrays.array_of_node_bitset_t), idomin: [intvec_t](../ida_pro/index.md#ida_pro.intvec_t), post: [bool](https://docs.python.org/3/library/functions.html#bool) = False) → [None](https://docs.python.org/3/library/constants.html#None) #### depth_first_preorder(pre: [node_ordering_t](../ida_gdl/index.md#ida_gdl.node_ordering_t)) → [int](https://docs.python.org/3/library/functions.html#int) #### depth_first_postorder(post: [node_ordering_t](../ida_gdl/index.md#ida_gdl.node_ordering_t)) → [int](https://docs.python.org/3/library/functions.html#int) #### begin() → simple_graph_t::iterator #### end() → simple_graph_t::iterator #### front() → [int](https://docs.python.org/3/library/functions.html#int) #### inc(p: simple_graph_t::iterator &, n: int = 1) → [None](https://docs.python.org/3/library/constants.html#None) #### goup(node: [int](https://docs.python.org/3/library/functions.html#int)) → [int](https://docs.python.org/3/library/functions.html#int) ### *class* ida_hexrays.op_parent_info_t(\_mba: [mba_t](#ida_hexrays.mba_t) = None, \_blk: [mblock_t](#ida_hexrays.mblock_t) = None, \_topins: [minsn_t](#ida_hexrays.minsn_t) = None) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### mba *: mba_t \** #### blk *: mblock_t \** #### topins *: minsn_t \** #### curins *: minsn_t \** ### *class* ida_hexrays.minsn_visitor_t(\_mba: [mba_t](#ida_hexrays.mba_t) = None, \_blk: [mblock_t](#ida_hexrays.mblock_t) = None, \_topins: [minsn_t](#ida_hexrays.minsn_t) = None) Bases: [`op_parent_info_t`](#ida_hexrays.op_parent_info_t) #### thisown #### visit_minsn() → [int](https://docs.python.org/3/library/functions.html#int) ### *class* ida_hexrays.mop_visitor_t(\_mba: [mba_t](#ida_hexrays.mba_t) = None, \_blk: [mblock_t](#ida_hexrays.mblock_t) = None, \_topins: [minsn_t](#ida_hexrays.minsn_t) = None) Bases: [`op_parent_info_t`](#ida_hexrays.op_parent_info_t) #### thisown #### prune *: [bool](https://docs.python.org/3/library/functions.html#bool)* Should skip sub-operands of the current operand? visit_mop() may set ‘prune=true’ for that. #### visit_mop(op: [mop_t](#ida_hexrays.mop_t), type: [tinfo_t](../ida_typeinf/index.md#ida_typeinf.tinfo_t), is_target: [bool](https://docs.python.org/3/library/functions.html#bool)) → [int](https://docs.python.org/3/library/functions.html#int) ### *class* ida_hexrays.scif_visitor_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### visit_scif_mop(r: [mop_t](#ida_hexrays.mop_t), off: [int](https://docs.python.org/3/library/functions.html#int)) → [int](https://docs.python.org/3/library/functions.html#int) ### *class* ida_hexrays.mlist_mop_visitor_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### topins *: minsn_t \** #### curins *: minsn_t \** #### changed *: [bool](https://docs.python.org/3/library/functions.html#bool)* #### list *: mlist_t \** #### prune *: [bool](https://docs.python.org/3/library/functions.html#bool)* Should skip sub-operands of the current operand? visit_mop() may set ‘prune=true’ for that. #### visit_mop(op: [mop_t](#ida_hexrays.mop_t)) → [int](https://docs.python.org/3/library/functions.html#int) ### *class* ida_hexrays.lvar_ref_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### mba *: mba_t \*const* Pointer to the parent mba_t object. Since we need to access the ‘mba->vars’ array in order to retrieve the referenced variable, we keep a pointer to mba_t here. Note: this means this class and consequently mop_t, minsn_t, mblock_t are specific to a mba_t object and cannot migrate between them. fortunately this is not something we need to do. second, lvar_ref_t’s appear only after MMAT_LVARS. #### off *: [int](https://docs.python.org/3/library/functions.html#int)* offset from the beginning of the variable #### idx *: [int](https://docs.python.org/3/library/functions.html#int)* index into mba->vars #### compare(r: [lvar_ref_t](#ida_hexrays.lvar_ref_t)) → [int](https://docs.python.org/3/library/functions.html#int) #### swap(r: [lvar_ref_t](#ida_hexrays.lvar_ref_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### var() → lvar_t & Retrieve the referenced variable. ### ida_hexrays.mop_z none ### ida_hexrays.mop_r register (they exist until MMAT_LVARS) ### ida_hexrays.mop_n immediate number constant ### ida_hexrays.mop_str immediate string constant (user representation) ### ida_hexrays.mop_d result of another instruction ### ida_hexrays.mop_S local stack variable (they exist until MMAT_LVARS) ### ida_hexrays.mop_v global variable ### ida_hexrays.mop_b micro basic block (mblock_t) ### ida_hexrays.mop_f list of arguments ### ida_hexrays.mop_l local variable ### ida_hexrays.mop_a mop_addr_t: address of operand (mop_l, mop_v, mop_S, mop_r) ### ida_hexrays.mop_h helper function ### ida_hexrays.mop_c mcases ### ida_hexrays.mop_fn floating point constant ### ida_hexrays.mop_p operand pair ### ida_hexrays.mop_sc scattered ### ida_hexrays.NOSIZE wrong or unexisting operand size ### *class* ida_hexrays.stkvar_ref_t(m: [mba_t](#ida_hexrays.mba_t), o: [int](https://docs.python.org/3/library/functions.html#int)) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### mba *: mba_t \*const* Pointer to the parent mba_t object. We need it in order to retrieve the referenced stack variable. See notes for lvar_ref_t::mba. #### off *: [int](https://docs.python.org/3/library/functions.html#int)* Offset to the stack variable from the bottom of the stack frame. It is called ‘decompiler stkoff’ and it is different from IDA stkoff. See a note and a picture about ‘decompiler stkoff’ below. #### compare(r: [stkvar_ref_t](#ida_hexrays.stkvar_ref_t)) → [int](https://docs.python.org/3/library/functions.html#int) #### swap(r: [stkvar_ref_t](#ida_hexrays.stkvar_ref_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### get_stkvar(udm: udm_t = None, p_idaoff: uval_t \* = None) → ssize_t Retrieve the referenced stack variable. * **Parameters:** * **udm** – stkvar, may be nullptr * **p_idaoff** – if specified, will hold IDA stkoff after the call. * **Returns:** index of stkvar in the frame or -1 ### *class* ida_hexrays.scif_t(\*args) Bases: [`vdloc_t`](#ida_hexrays.vdloc_t) #### thisown #### mba *: mba_t \** Pointer to the parent mba_t object. Some operations may convert a scattered operand into something simpler, (a stack operand, for example). We will need to create stkvar_ref_t at that moment, this is why we need this pointer. See notes for lvar_ref_t::mba. #### name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* Usually scattered operands are created from a function prototype, which has the name information. We preserve it and use it to name the corresponding local variable. #### type *: [tinfo_t](../ida_typeinf/index.md#ida_typeinf.tinfo_t)* Scattered operands always have type info assigned to them because without it we won’t be able to manipulte them. ### *class* ida_hexrays.mnumber_t(\*args) Bases: [`operand_locator_t`](#ida_hexrays.operand_locator_t) #### thisown #### value *: uint64* #### org_value *: uint64* #### compare(r: [mnumber_t](#ida_hexrays.mnumber_t)) → [int](https://docs.python.org/3/library/functions.html#int) #### update_value(val64: uint64) → [None](https://docs.python.org/3/library/constants.html#None) ### *class* ida_hexrays.fnumber_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### fnum *: [fpvalue_t](../ida_ieee/index.md#ida_ieee.fpvalue_t)* Internal representation of the number. #### nbytes *: [int](https://docs.python.org/3/library/functions.html#int)* Original size of the constant in bytes. #### dereference_uint16() → uint16 \* #### dereference_const_uint16() → uint16 const \* #### compare(r: [fnumber_t](#ida_hexrays.fnumber_t)) → [int](https://docs.python.org/3/library/functions.html#int) #### calc_max_exp() → [int](https://docs.python.org/3/library/functions.html#int) #### is_nan() → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_hexrays.SHINS_NUMADDR display definition addresses for numbers ### ida_hexrays.SHINS_VALNUM display value numbers ### ida_hexrays.SHINS_SHORT do not display use-def chains and other attrs ### ida_hexrays.SHINS_LDXEA display address of ldx expressions (not used) ### ida_hexrays.SHINS_NOEA do not display the ea ### ida_hexrays.NO_SIDEFF change operand size but ignore side effects if you decide to keep the changed operand, handle_new_size() must be called ### ida_hexrays.WITH_SIDEFF change operand size and handle side effects ### ida_hexrays.ONLY_SIDEFF only handle side effects ### ida_hexrays.ANY_REGSIZE any register size is permitted ### ida_hexrays.ANY_FPSIZE any size of floating operand is permitted ### *class* ida_hexrays.mop_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### t *: mopt_t* Operand type. #### oprops *: uint8* Operand properties. #### valnum *: uint16* Value number. Zero means unknown. Operands with the same value number are equal. #### size *: [int](https://docs.python.org/3/library/functions.html#int)* Operand size. Usually it is 1,2,4,8 or NOSIZE but for UDTs other sizes are permitted #### set_impptr_done() → [None](https://docs.python.org/3/library/constants.html#None) #### set_udt() → [None](https://docs.python.org/3/library/constants.html#None) #### set_undef_val() → [None](https://docs.python.org/3/library/constants.html#None) #### set_lowaddr() → [None](https://docs.python.org/3/library/constants.html#None) #### set_for_abi() → [None](https://docs.python.org/3/library/constants.html#None) #### is_impptr_done() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_udt() → [bool](https://docs.python.org/3/library/functions.html#bool) #### probably_floating() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_undef_val() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_lowaddr() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_for_abi() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_ccflags() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_pcval() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_glbaddr_from_fixup() → [bool](https://docs.python.org/3/library/functions.html#bool) #### assign(rop: [mop_t](#ida_hexrays.mop_t)) → mop_t & #### zero() → [None](https://docs.python.org/3/library/constants.html#None) #### swap(rop: [mop_t](#ida_hexrays.mop_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### erase() → [None](https://docs.python.org/3/library/constants.html#None) #### erase_but_keep_size() → [None](https://docs.python.org/3/library/constants.html#None) #### dstr() → [str](https://docs.python.org/3/library/stdtypes.html#str) #### create_from_mlist(mba: [mba_t](#ida_hexrays.mba_t), lst: [mlist_t](#ida_hexrays.mlist_t), fullsize: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) Create operand from mlist_t. Example: if LST contains 4 bits for R0.4, our operand will be (t=mop_r, r=R0, size=4) * **Parameters:** * **mba** – pointer to microcode * **lst** – list of locations * **fullsize** – mba->fullsize * **Returns:** success #### create_from_ivlset(mba: [mba_t](#ida_hexrays.mba_t), ivs: [ivlset_t](#ida_hexrays.ivlset_t), fullsize: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) Create operand from ivlset_t. Example: if IVS contains [glbvar..glbvar+4), our operand will be (t=mop_v, g=&glbvar, size=4) * **Parameters:** * **mba** – pointer to microcode * **ivs** – set of memory intervals * **fullsize** – mba->fullsize * **Returns:** success #### create_from_vdloc(mba: [mba_t](#ida_hexrays.mba_t), loc: [vdloc_t](#ida_hexrays.vdloc_t), \_size: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) Create operand from vdloc_t. Example: if LOC contains (type=ALOC_REG1, r=R0), our operand will be (t=mop_r, r=R0, size=_SIZE) * **Parameters:** * **mba** – pointer to microcode * **loc** – location * **\_size** – operand size Note: this function cannot handle scattered locations. * **Returns:** success #### create_from_scattered_vdloc(mba: [mba_t](#ida_hexrays.mba_t), name: [str](https://docs.python.org/3/library/stdtypes.html#str), type: [tinfo_t](../ida_typeinf/index.md#ida_typeinf.tinfo_t), loc: [vdloc_t](#ida_hexrays.vdloc_t)) → [None](https://docs.python.org/3/library/constants.html#None) Create operand from scattered vdloc_t. Example: if LOC is (ALOC_DIST, {EAX.4, EDX.4}) and TYPE is \_LARGE_INTEGER, our operand will be (t=mop_sc, scif={EAX.4, EDX.4}) * **Parameters:** * **mba** – pointer to microcode * **name** – name of the operand, if available * **type** – type of the operand, must be present * **loc** – a scattered location * **Returns:** success #### create_from_insn(m: [minsn_t](#ida_hexrays.minsn_t)) → [None](https://docs.python.org/3/library/constants.html#None) Create operand from an instruction. This function creates a nested instruction that can be used as an operand. Example: if m=”add x,y,z”, our operand will be (t=mop_d,d=m). The destination operand of ‘add’ (z) is lost. * **Parameters:** **m** – instruction to embed into operand. may not be nullptr. #### make_number(\*args) → [None](https://docs.python.org/3/library/constants.html#None) Create an integer constant operand. * **Parameters:** * **\_value** – value to store in the operand * **\_size** – size of the value in bytes (1,2,4,8) * **\_ea** – address of the processor instruction that made the value * **opnum** – operand number of the processor instruction #### make_fpnum(bytes: void const \*) → [bool](https://docs.python.org/3/library/functions.html#bool) Create a floating point constant operand. * **Parameters:** **bytes** – pointer to the floating point value as used by the current processor (e.g. for x86 it must be in IEEE 754) * **Returns:** success #### make_reg(\*args) → [None](https://docs.python.org/3/library/constants.html#None) This function has the following signatures: > 1. make_reg(reg: mreg_t) -> None > 2. make_reg(reg: mreg_t, \_size: int) -> None # 0: make_reg(reg: mreg_t) -> None Create a register operand. # 1: make_reg(reg: mreg_t, \_size: int) -> None #### make_gvar(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) Create a global variable operand. #### make_stkvar(mba: [mba_t](#ida_hexrays.mba_t), off: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### make_reg_pair(loreg: [int](https://docs.python.org/3/library/functions.html#int), hireg: [int](https://docs.python.org/3/library/functions.html#int), halfsize: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) Create pair of registers. * **Parameters:** * **loreg** – register holding the low part of the value * **hireg** – register holding the high part of the value * **halfsize** – the size of each of loreg/hireg #### make_insn(ins: [minsn_t](#ida_hexrays.minsn_t)) → [None](https://docs.python.org/3/library/constants.html#None) Create a nested instruction. #### make_blkref(blknum: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) Create a global variable operand. #### make_helper(name: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [None](https://docs.python.org/3/library/constants.html#None) Create a helper operand. A helper operand usually keeps a built-in function name like “va_start” It is essentially just an arbitrary identifier without any additional info. #### empty() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_glbvar() → [bool](https://docs.python.org/3/library/functions.html#bool) Is a global variable? #### is_stkvar() → [bool](https://docs.python.org/3/library/functions.html#bool) Is a stack variable? #### is_reg(\*args) → [bool](https://docs.python.org/3/library/functions.html#bool) This function has the following signatures: > 1. is_reg() -> bool > 2. is_reg(_r: mreg_t) -> bool > 3. is_reg(_r: mreg_t, \_size: int) -> bool # 0: is_reg() -> bool Is a register operand? See also get_mreg_name() # 1: is_reg(_r: mreg_t) -> bool Is the specified register? # 2: is_reg(_r: mreg_t, \_size: int) -> bool Is the specified register of the specified size? #### is_arglist() → [bool](https://docs.python.org/3/library/functions.html#bool) Is a list of arguments? #### is_cc() → [bool](https://docs.python.org/3/library/functions.html#bool) Is a condition code? #### is_bit_reg(\*args) → [bool](https://docs.python.org/3/library/functions.html#bool) This function has the following signatures: > 1. is_bit_reg() -> bool > 2. is_bit_reg(reg: mreg_t) -> bool # 0: is_bit_reg() -> bool # 1: is_bit_reg(reg: mreg_t) -> bool Is a bit register? This includes condition codes and eventually other bit registers #### is_kreg() → [bool](https://docs.python.org/3/library/functions.html#bool) Is a kernel register? #### is_mblock(\*args) → [bool](https://docs.python.org/3/library/functions.html#bool) This function has the following signatures: > 1. is_mblock() -> bool > 2. is_mblock(serial: int) -> bool # 0: is_mblock() -> bool Is a block reference? # 1: is_mblock(serial: int) -> bool Is a block reference to the specified block? #### is_scattered() → [bool](https://docs.python.org/3/library/functions.html#bool) Is a scattered operand? #### is_glbaddr(\*args) → [bool](https://docs.python.org/3/library/functions.html#bool) This function has the following signatures: > 1. is_glbaddr() -> bool > 2. is_glbaddr(ea: ida_idaapi.ea_t) -> bool # 0: is_glbaddr() -> bool Is address of a global memory cell? # 1: is_glbaddr(ea: ida_idaapi.ea_t) -> bool Is address of the specified global memory cell? #### is_stkaddr() → [bool](https://docs.python.org/3/library/functions.html#bool) Is address of a stack variable? #### is_insn(\*args) → [bool](https://docs.python.org/3/library/functions.html#bool) This function has the following signatures: > 1. is_insn() -> bool > 2. is_insn(code: mcode_t) -> bool # 0: is_insn() -> bool Is a sub-instruction? # 1: is_insn(code: mcode_t) -> bool Is a sub-instruction with the specified opcode? #### has_side_effects(include_ldx_and_divs: [bool](https://docs.python.org/3/library/functions.html#bool) = False) → [bool](https://docs.python.org/3/library/functions.html#bool) Has any side effects? * **Parameters:** **include_ldx_and_divs** – consider ldx/div/mod as having side effects? #### may_use_aliased_memory() → [bool](https://docs.python.org/3/library/functions.html#bool) Is it possible for the operand to use aliased memory? #### is01() → [bool](https://docs.python.org/3/library/functions.html#bool) Are the possible values of the operand only 0 and 1? This function returns true for 0/1 constants, bit registers, the result of ‘set’ insns, etc. #### get_bitwidth(blk: [mblock_t](#ida_hexrays.mblock_t), top: [minsn_t](#ida_hexrays.minsn_t)) → [int](https://docs.python.org/3/library/functions.html#int) Get the effective bitwidth of the operand. Returns the number of significant bits needed to represent the value (0 for zero, size\*8 for unknown operands). For example, for a constant 7 returns 3, for xdu(x.1) returns 8. If BLK and TOP are specified, the method also looks up the defining instruction in this block. #### is_sign_extended_from(nbytes: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) Does the high part of the operand consist of the sign bytes? * **Parameters:** **nbytes** – number of bytes that were sign extended. the remaining size-nbytes high bytes must be sign bytes Example: is_sign_extended_from(xds.4(op.1), 1) -> true because the high 3 bytes are certainly sign bits #### is_zero_extended_from(nbytes: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) Does the high part of the operand consist of zero bytes? * **Parameters:** **nbytes** – number of bytes that were zero extended. the remaining size-nbytes high bytes must be zero Example: is_zero_extended_from(xdu.8(op.1), 2) -> true because the high 6 bytes are certainly zero #### is_extended_from(nbytes: [int](https://docs.python.org/3/library/functions.html#int), is_signed: [bool](https://docs.python.org/3/library/functions.html#bool)) → [bool](https://docs.python.org/3/library/functions.html#bool) Does the high part of the operand consist of zero or sign bytes? #### equal_mops(rop: [mop_t](#ida_hexrays.mop_t), eqflags: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) Compare operands. This is the main comparison function for operands. * **Parameters:** * **rop** – operand to compare with * **eqflags** – combination of comparison bits bits #### lexcompare(rop: [mop_t](#ida_hexrays.mop_t)) → [int](https://docs.python.org/3/library/functions.html#int) #### for_all_ops(mv: [mop_visitor_t](#ida_hexrays.mop_visitor_t), type: [tinfo_t](../ida_typeinf/index.md#ida_typeinf.tinfo_t) = None, is_target: [bool](https://docs.python.org/3/library/functions.html#bool) = False) → [int](https://docs.python.org/3/library/functions.html#int) Visit the operand and all its sub-operands. This function visits the current operand as well. * **Parameters:** * **mv** – visitor object * **type** – operand type * **is_target** – is a destination operand? #### for_all_scattered_submops(sv: [scif_visitor_t](#ida_hexrays.scif_visitor_t)) → [int](https://docs.python.org/3/library/functions.html#int) Visit all sub-operands of a scattered operand. This function does not visit the current operand, only its sub-operands. All sub-operands are synthetic and are destroyed after the visitor. This function works only with scattered operands. * **Parameters:** **sv** – visitor object #### value(is_signed: [bool](https://docs.python.org/3/library/functions.html#bool)) → uint64 Retrieve value of a constant integer operand. These functions can be called only for mop_n operands. See is_constant() that can be called on any operand. #### signed_value() → int64 #### unsigned_value() → uint64 #### update_numop_value(val: uint64) → [None](https://docs.python.org/3/library/constants.html#None) #### is_constant(is_signed: [bool](https://docs.python.org/3/library/functions.html#bool) = True) → [bool](https://docs.python.org/3/library/functions.html#bool) Retrieve value of a constant integer operand. * **Parameters:** **is_signed** – should treat the value as signed * **Returns:** true if the operand is mop_n #### is_equal_to(n: uint64, is_signed: [bool](https://docs.python.org/3/library/functions.html#bool) = True) → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_zero() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_one() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_positive_constant() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_negative_constant() → [bool](https://docs.python.org/3/library/functions.html#bool) #### get_stkvar(udm: udm_t = None, p_idaoff: uval_t \* = None) → ssize_t Retrieve the referenced stack variable. * **Parameters:** * **udm** – stkvar, may be nullptr * **p_idaoff** – if specified, will hold IDA stkoff after the call. * **Returns:** index of stkvar in the frame or -1 #### get_stkoff(p_vdoff: sval_t \*) → [bool](https://docs.python.org/3/library/functions.html#bool) Get the referenced stack offset. This function can also handle mop_sc if it is entirely mapped into a continuous stack region. * **Parameters:** **p_vdoff** – the output buffer * **Returns:** success #### get_insn(code: mcode_t) → minsn_t \* Get subinstruction of the operand. If the operand has a subinstruction with the specified opcode, return it. * **Parameters:** **code** – desired opcode * **Returns:** pointer to the instruction or nullptr #### make_low_half(width: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) Make the low part of the operand. This function takes into account the memory endianness (byte sex) * **Parameters:** **width** – the desired size of the operand part in bytes * **Returns:** success #### make_high_half(width: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) Make the high part of the operand. This function takes into account the memory endianness (byte sex) * **Parameters:** **width** – the desired size of the operand part in bytes * **Returns:** success #### make_first_half(width: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) Make the first part of the operand. This function does not care about the memory endianness * **Parameters:** **width** – the desired size of the operand part in bytes * **Returns:** success #### make_second_half(width: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) Make the second part of the operand. This function does not care about the memory endianness * **Parameters:** **width** – the desired size of the operand part in bytes * **Returns:** success #### shift_mop(offset: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) Shift the operand. This function shifts only the beginning of the operand. The operand size will be changed. Examples: shift_mop(AH.1, -1) -> AX.2 shift_mop(qword_00000008.8, 4) -> dword_0000000C.4 shift_mop(xdu.8(op.4), 4) -> #0.4 shift_mop(#0x12345678.4, 3) -> #12.1 * **Parameters:** **offset** – shift count (the number of bytes to shift) * **Returns:** success #### change_size(nsize: [int](https://docs.python.org/3/library/functions.html#int), sideff: side_effect_t = WITH_SIDEFF) → [bool](https://docs.python.org/3/library/functions.html#bool) Change the operand size. Examples: change_size(AL.1, 2) -> AX.2 change_size(qword_00000008.8, 4) -> dword_00000008.4 change_size(xdu.8(op.4), 4) -> op.4 change_size(#0x12345678.4, 1) -> #0x78.1 * **Parameters:** * **nsize** – new operand size * **sideff** – may modify the database because of the size change? * **Returns:** success #### double_size(sideff: side_effect_t = WITH_SIDEFF) → [bool](https://docs.python.org/3/library/functions.html#bool) #### preserve_side_effects(blk: mblock_t, top: minsn_t, moved_calls: bool \* = None) → [bool](https://docs.python.org/3/library/functions.html#bool) Move subinstructions with side effects out of the operand. If we decide to delete an instruction operand, it is a good idea to call this function. Alternatively we should skip such operands by calling mop_t::has_side_effects() For example, if we transform: jnz x, x, @blk => goto @blk then we must call this function before deleting the X operands. * **Parameters:** * **blk** – current block * **top** – top level instruction that contains our operand * **moved_calls** – pointer to the boolean that will track if all side effects get handled correctly. must be false initially. * **Returns:** false failed to preserve a side effect, it is not safe to delete the operand true no side effects or successfully preserved them #### apply_ld_mcode(mcode: mcode_t, ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), newsize: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) Apply a unary opcode to the operand. * **Parameters:** * **mcode** – opcode to apply. it must accept ‘l’ and ‘d’ operands but not ‘r’. examples: m_low/m_high/m_xds/m_xdu * **ea** – value of minsn_t::ea for the newly created insruction * **newsize** – new operand size Example: apply_ld_mcode(m_low) will convert op => low(op) #### apply_xdu(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), newsize: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### apply_xds(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), newsize: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### obj_id #### replace_by(o) #### meminfo #### *property* nnn #### *property* d #### *property* s #### *property* f #### *property* l #### *property* a #### *property* c #### *property* fpc #### *property* pair #### *property* scif #### *property* r #### *property* g #### *property* b #### *property* cstr #### *property* helper ### ida_hexrays.OPROP_IMPDONE imported operand (a pointer) has been dereferenced ### ida_hexrays.OPROP_UDT a struct or union ### ida_hexrays.OPROP_FLOAT possibly floating value ### ida_hexrays.OPROP_CCFLAGS mop_n: a pc-relative value mop_a: an address obtained from a relocation else: value of a condition code register (like mr_cc) ### ida_hexrays.OPROP_UDEFVAL uses undefined value ### ida_hexrays.OPROP_LOWADDR a low address offset ### ida_hexrays.OPROP_ABI is used to organize arg/retval of a call such operands should be combined more carefully than others at least on BE platforms ### ida_hexrays.lexcompare(a: [mop_t](#ida_hexrays.mop_t), b: [mop_t](#ida_hexrays.mop_t)) → [int](https://docs.python.org/3/library/functions.html#int) ### *class* ida_hexrays.mop_pair_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### lop *: [mop_t](#ida_hexrays.mop_t)* low operand #### hop *: [mop_t](#ida_hexrays.mop_t)* high operand ### *class* ida_hexrays.mop_addr_t(\*args) Bases: [`mop_t`](#ida_hexrays.mop_t) #### thisown #### insize *: [int](https://docs.python.org/3/library/functions.html#int)* #### outsize *: [int](https://docs.python.org/3/library/functions.html#int)* #### lexcompare(ra: [mop_addr_t](#ida_hexrays.mop_addr_t)) → [int](https://docs.python.org/3/library/functions.html#int) ### *class* ida_hexrays.mcallarg_t(\*args) Bases: [`mop_t`](#ida_hexrays.mop_t) #### thisown #### ea *: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)* address where the argument was initialized. BADADDR means unknown. #### type *: [tinfo_t](../ida_typeinf/index.md#ida_typeinf.tinfo_t)* formal argument type #### name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* formal argument name #### argloc *: [argloc_t](../ida_typeinf/index.md#ida_typeinf.argloc_t)* ida argloc #### flags *: [int](https://docs.python.org/3/library/functions.html#int)* ``` FAI_ ``` … #### copy_mop(op: [mop_t](#ida_hexrays.mop_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### dstr() → [str](https://docs.python.org/3/library/stdtypes.html#str) #### set_regarg(\*args) → [None](https://docs.python.org/3/library/constants.html#None) This function has the following signatures: > 1. set_regarg(mr: mreg_t, sz: int, tif: const tinfo_t &) -> None > 2. set_regarg(mr: mreg_t, tif: const tinfo_t &) -> None > 3. set_regarg(mr: mreg_t, dt: char, sign: type_sign_t=type_unsigned) -> None # 0: set_regarg(mr: mreg_t, sz: int, tif: const tinfo_t &) -> None # 1: set_regarg(mr: mreg_t, tif: const tinfo_t &) -> None # 2: set_regarg(mr: mreg_t, dt: char, sign: type_sign_t=type_unsigned) -> None #### make_int(val: [int](https://docs.python.org/3/library/functions.html#int), val_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), opno: [int](https://docs.python.org/3/library/functions.html#int) = 0) → [None](https://docs.python.org/3/library/constants.html#None) #### make_uint(val: [int](https://docs.python.org/3/library/functions.html#int), val_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), opno: [int](https://docs.python.org/3/library/functions.html#int) = 0) → [None](https://docs.python.org/3/library/constants.html#None) ### ida_hexrays.ROLE_UNK unknown function role ### ida_hexrays.ROLE_EMPTY empty, does not do anything (maybe spoils regs) ### ida_hexrays.ROLE_MEMSET memset(void ``` * ``` dst, uchar value, size_t count); ### ida_hexrays.ROLE_MEMSET32 memset32(void ``` * ``` dst, uint32 value, size_t count); ### ida_hexrays.ROLE_MEMSET64 memset64(void ``` * ``` dst, uint64 value, size_t count); ### ida_hexrays.ROLE_MEMCPY memcpy(void ``` * ``` dst, const void ``` * ``` src, size_t count); ### ida_hexrays.ROLE_STRCPY strcpy(char ``` * ``` dst, const char ``` * ``` src); ### ida_hexrays.ROLE_STRLEN strlen(const char ``` * ``` src); ### ida_hexrays.ROLE_STRCAT strcat(char ``` * ``` dst, const char ``` * ``` src); ### ida_hexrays.ROLE_TAIL char ``` * ``` tail(const char ``` * ``` str); ### ida_hexrays.ROLE_BUG BUG() helper macro: never returns, causes exception. ### ida_hexrays.ROLE_ALLOCA alloca() function ### ida_hexrays.ROLE_BSWAP bswap() function (any size) ### ida_hexrays.ROLE_PRESENT present() function (used in patterns) ### ida_hexrays.ROLE_CONTAINING_RECORD CONTAINING_RECORD() macro. ### ida_hexrays.ROLE_FASTFAIL \_\_fastfail() ### ida_hexrays.ROLE_READFLAGS \_\_readeflags, \_\_readcallersflags ### ida_hexrays.ROLE_IS_MUL_OK is_mul_ok ### ida_hexrays.ROLE_SATURATED_MUL saturated_mul ### ida_hexrays.ROLE_BITTEST [lock] bt ### ida_hexrays.ROLE_BITTESTANDSET [lock] bts ### ida_hexrays.ROLE_BITTESTANDRESET [lock] btr ### ida_hexrays.ROLE_BITTESTANDCOMPLEMENT [lock] btc ### ida_hexrays.ROLE_VA_ARG va_arg() macro ### ida_hexrays.ROLE_VA_COPY va_copy() function ### ida_hexrays.ROLE_VA_START va_start() function ### ida_hexrays.ROLE_VA_END va_end() function ### ida_hexrays.ROLE_ROL rotate left ### ida_hexrays.ROLE_ROR rotate right ### ida_hexrays.ROLE_CFSUB3 carry flag after subtract with carry ### ida_hexrays.ROLE_OFSUB3 overflow flag after subtract with carry ### ida_hexrays.ROLE_ABS integer absolute value ### ida_hexrays.ROLE_3WAYCMP0 3-way compare helper, returns -1/0/1 ### ida_hexrays.ROLE_3WAYCMP1 3-way compare helper, returns 0/1/2 ### ida_hexrays.ROLE_WMEMCPY wchar_t ``` * ``` wmemcpy(wchar_t ``` * ``` dst, const wchar_t ``` * ``` src, size_t n) ### ida_hexrays.ROLE_WMEMSET wchar_t ``` * ``` wmemset(wchar_t ``` * ``` dst, wchar_t wc, size_t n) ### ida_hexrays.ROLE_WCSCPY wchar_t ``` * ``` wcscpy(wchar_t ``` * ``` dst, const wchar_t ``` * ``` src); ### ida_hexrays.ROLE_WCSLEN size_t wcslen(const wchar_t ``` * ``` s) ### ida_hexrays.ROLE_WCSCAT wchar_t ``` * ``` wcscat(wchar_t ``` * ``` dst, const wchar_t ``` * ``` src) ### ida_hexrays.ROLE_SSE_CMP4 e.g. \_mm_cmpgt_ss ### ida_hexrays.ROLE_SSE_CMP8 e.g. \_mm_cmpgt_sd ### ida_hexrays.ROLE_EH_TRY \_\_eh_try() try block start ### ida_hexrays.ROLE_EH_WIND \_\_eh_wind() wind state (C++ destructors) ### ida_hexrays.ROLE_EH_CATCH \_\_eh_catch() catch block start ### ida_hexrays.ROLE_EH_CATCH_TYPE \_\_eh_catch_type() typed catch clause ### ida_hexrays.ROLE_EH_CATCH_ELLIPSIS \_\_eh_catch_ellipsis() catch-all ### ida_hexrays.ROLE_EH_UNWIND \_\_eh_unwind() destructor handler ### ida_hexrays.ROLE_EH_THROW \_\_eh_throw() throw statement ### ida_hexrays.ROLE_EH_TRY_CONTINUATION \_\_eh_try_continuation() internal ### ida_hexrays.ROLE_EH_SCOPE_STRUT \_\_eh_scope_strut() internal ### ida_hexrays.ROLE_EH_DEAD_END_TRY \_\_eh_dead_end_try() internal ### ida_hexrays.ROLE_EH_DEAD_END_WIND \_\_eh_dead_end_wind() internal ### ida_hexrays.ROLE_EH_PROPAGATE \_\_eh_propagate_exception_into_caller() ### ida_hexrays.ROLE_EH_CONTINUE_UNWINDING \_\_eh_continue_unwinding() ### ida_hexrays.ROLE_EH_ENTER_WIND_STATE \_\_eh_enter_wind_state() internal ### ida_hexrays.ROLE_EH_ENTER_TRY_STATE \_\_eh_enter_try_state() internal ### ida_hexrays.ROLE_EH_EXIT_WIND_STATE \_\_eh_exit_wind_state() internal ### ida_hexrays.ROLE_EH_EXIT_TRY_STATE \_\_eh_exit_try_state() internal ### ida_hexrays.ROLE_EH_NO_UNWIND_HANDLER \_\_eh_no_unwind_handler() internal ### ida_hexrays.ROLE_EH_CAUGHT_TYPE \_\_eh_caught_type() paired with catch_type ### ida_hexrays.ROLE_EH_CAUGHT_ELLIPSIS \_\_eh_caught_ellipsis() paired with catch_ellipsis ### ida_hexrays.ROLE_EH_CAUGHT \_\_eh_caught() internal ### ida_hexrays.ROLE_EH_RETHROW \_\_eh_rethrow_uncaught_exception() internal ### ida_hexrays.ROLE_EH_UNWIND_ABSENT \_\_eh_unwind_handler_absent() internal ### ida_hexrays.ROLE_EH_CATCH_ABSENT \_\_eh_catch_handler_absent() internal ### ida_hexrays.ROLE_NEW_OBJ allocate new object instance ### ida_hexrays.ROLE_NEW_ARRAY allocate new array ### ida_hexrays.ROLE_FILL_ARRAY allocate and fill new array ### ida_hexrays.ROLE_ARRLEN get array length ### ida_hexrays.ROLE_CHKCAST check and cast object type ### ida_hexrays.ROLE_INSTANCEOF test object type (returns 0/1) ### ida_hexrays.ROLE_LOCK acquire lock (monitor enter) ### ida_hexrays.ROLE_UNLOCK release lock (monitor exit) ### ida_hexrays.ROLE_IGET get instance field ### ida_hexrays.ROLE_IPUT set instance field ### ida_hexrays.ROLE_SGET get static field ### ida_hexrays.ROLE_SPUT set static field ### ida_hexrays.ROLE_AGET get array element ### ida_hexrays.ROLE_APUT set array element ### ida_hexrays.ROLE_FMOD floating-point remainder (fmod) ### ida_hexrays.ROLE_INVOKE_VIRTUAL instance method call (obj.method) ### ida_hexrays.ROLE_INVOKE_SUPER parent class method call (super.method) ### ida_hexrays.ROLE_INVOKE_INIT constructor call on new object (merged with new) ### ida_hexrays.ROLE_INVOKE_INIT_SUPER constructor chain to parent (super(args)) ### ida_hexrays.ROLE_INVOKE_INIT_THIS constructor chain to self (this(args)) ### ida_hexrays.ROLE_CATCH_EXCEPTION get caught exception object (Dalvik MOVE_EXCEPTION) ### ida_hexrays.ROLE_CONST_CLASS get class reference (Dalvik CONST_CLASS) ### ida_hexrays.ROLE_FILL_ARRAY_DATA fill existing array with constant data (Dalvik FILL_ARRAY_DATA, no allocation) ### ida_hexrays.is_eh_role(r: funcrole_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Is this an EH exception handling role? ### ida_hexrays.FUNC_NAME_MEMCPY ### ida_hexrays.FUNC_NAME_WMEMCPY ### ida_hexrays.FUNC_NAME_MEMSET ### ida_hexrays.FUNC_NAME_WMEMSET ### ida_hexrays.FUNC_NAME_MEMSET32 ### ida_hexrays.FUNC_NAME_MEMSET64 ### ida_hexrays.FUNC_NAME_STRCPY ### ida_hexrays.FUNC_NAME_WCSCPY ### ida_hexrays.FUNC_NAME_STRLEN ### ida_hexrays.FUNC_NAME_WCSLEN ### ida_hexrays.FUNC_NAME_STRCAT ### ida_hexrays.FUNC_NAME_WCSCAT ### ida_hexrays.FUNC_NAME_TAIL ### ida_hexrays.FUNC_NAME_VA_ARG ### ida_hexrays.FUNC_NAME_EMPTY ### ida_hexrays.FUNC_NAME_PRESENT ### ida_hexrays.FUNC_NAME_CONTAINING_RECORD ### ida_hexrays.FUNC_NAME_MORESTACK ### *class* ida_hexrays.mcallinfo_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### callee *: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)* address of the called function, if known #### solid_args *: [int](https://docs.python.org/3/library/functions.html#int)* number of solid args. there may be variadic args in addtion #### call_spd *: [int](https://docs.python.org/3/library/functions.html#int)* sp value at call insn #### stkargs_top *: [int](https://docs.python.org/3/library/functions.html#int)* first offset past stack arguments #### cc *: callcnv_t* calling convention #### args *: [mcallargs_t](#ida_hexrays.mcallargs_t)* call arguments #### retregs *: [mopvec_t](#ida_hexrays.mopvec_t)* return register(s) (e.g., AX, AX:DX, etc.) this vector is built from return_regs #### return_type *: [tinfo_t](../ida_typeinf/index.md#ida_typeinf.tinfo_t)* type of the returned value #### return_argloc *: [argloc_t](../ida_typeinf/index.md#ida_typeinf.argloc_t)* location of the returned value #### return_regs *: [mlist_t](#ida_hexrays.mlist_t)* list of values returned by the function #### spoiled *: [mlist_t](#ida_hexrays.mlist_t)* list of spoiled locations (includes RETURN_REGS) #### pass_regs *: [mlist_t](#ida_hexrays.mlist_t)* passthrough registers (subset of SPOILED) The called function only partially updates the register, preserving the previous values in other parts. For example, the bit set operation like PC’s \_bittestandset(). #### visible_memory *: [ivlset_t](#ida_hexrays.ivlset_t)* what memory is visible to the call? #### dead_regs *: [mlist_t](#ida_hexrays.mlist_t)* registers defined by the function but never used. upon propagation we do the following: \* dead_regs += return_regs \* retregs.clear() since the call is propagated #### flags *: [int](https://docs.python.org/3/library/functions.html#int)* combination of Call properties … bits #### role *: funcrole_t* function role #### fti_attrs *: [type_attrs_t](../ida_typeinf/index.md#ida_typeinf.type_attrs_t)* extended function attributes #### lexcompare(f: [mcallinfo_t](#ida_hexrays.mcallinfo_t)) → [int](https://docs.python.org/3/library/functions.html#int) #### set_type(type: [tinfo_t](../ida_typeinf/index.md#ida_typeinf.tinfo_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### get_type() → [tinfo_t](../ida_typeinf/index.md#ida_typeinf.tinfo_t) #### is_vararg() → [bool](https://docs.python.org/3/library/functions.html#bool) #### dstr() → [str](https://docs.python.org/3/library/stdtypes.html#str) ### ida_hexrays.FCI_PROP call has been propagated ### ida_hexrays.FCI_DEAD some return registers were determined dead ### ida_hexrays.FCI_FINAL call type is final, should not be changed ### ida_hexrays.FCI_NORET call does not return ### ida_hexrays.FCI_PURE pure function ### ida_hexrays.FCI_NOSIDE call does not have side effects ### ida_hexrays.FCI_SPLOK spoiled/visible_memory lists have been optimized. for some functions we can reduce them as soon as information about the arguments becomes available. in order not to try optimize them again we use this bit. ### ida_hexrays.FCI_HASCALL A function is an synthetic helper combined from several instructions and at least one of them was a call to a real functions ### ida_hexrays.FCI_HASFMT A variadic function with recognized printf- or scanf-style format string ### ida_hexrays.FCI_EXPLOCS all arglocs are specified explicitly ### *class* ida_hexrays.mcases_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### values *: [casevec_t](../ida_xref/index.md#ida_xref.casevec_t)* expression values for each target #### targets *: [intvec_t](../ida_pro/index.md#ida_pro.intvec_t)* target block numbers #### swap(r: [mcases_t](#ida_hexrays.mcases_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### compare(r: [mcases_t](#ida_hexrays.mcases_t)) → [int](https://docs.python.org/3/library/functions.html#int) #### empty() → [bool](https://docs.python.org/3/library/functions.html#bool) #### size() → [int](https://docs.python.org/3/library/functions.html#int) #### resize(s: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### dstr() → [str](https://docs.python.org/3/library/stdtypes.html#str) ### *class* ida_hexrays.voff_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### off *: [int](https://docs.python.org/3/library/functions.html#int)* register number or stack offset #### type *: mopt_t* mop_r - register, mop_S - stack, mop_z - undefined #### set(\_type: mopt_t, \_off: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### set_stkoff(stkoff: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### set_reg(mreg: mreg_t) → [None](https://docs.python.org/3/library/constants.html#None) #### undef() → [None](https://docs.python.org/3/library/constants.html#None) #### defined() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_reg() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_stkoff() → [bool](https://docs.python.org/3/library/functions.html#bool) #### get_reg() → mreg_t #### get_stkoff() → [int](https://docs.python.org/3/library/functions.html#int) #### inc(delta: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### add(width: [int](https://docs.python.org/3/library/functions.html#int)) → [voff_t](#ida_hexrays.voff_t) #### diff(r: [voff_t](#ida_hexrays.voff_t)) → [int](https://docs.python.org/3/library/functions.html#int) #### compare(r: [voff_t](#ida_hexrays.voff_t)) → [int](https://docs.python.org/3/library/functions.html#int) ### *class* ida_hexrays.vivl_t(\*args) Bases: [`voff_t`](#ida_hexrays.voff_t) #### thisown #### size *: [int](https://docs.python.org/3/library/functions.html#int)* Interval size in bytes. #### set(\*args) → [None](https://docs.python.org/3/library/constants.html#None) This function has the following signatures: > 1. set(_type: mopt_t, \_off: int, \_size: int=0) -> None > 2. set(voff: const voff_t &, \_size: int) -> None # 0: set(_type: mopt_t, \_off: int, \_size: int=0) -> None # 1: set(voff: const voff_t &, \_size: int) -> None #### set_stkoff(stkoff: [int](https://docs.python.org/3/library/functions.html#int), sz: [int](https://docs.python.org/3/library/functions.html#int) = 0) → [None](https://docs.python.org/3/library/constants.html#None) #### set_reg(mreg: mreg_t, sz: [int](https://docs.python.org/3/library/functions.html#int) = 0) → [None](https://docs.python.org/3/library/constants.html#None) #### extend_to_cover(r: [vivl_t](#ida_hexrays.vivl_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Extend a value interval using another value interval of the same type * **Returns:** success #### intersect(r: [vivl_t](#ida_hexrays.vivl_t)) → [int](https://docs.python.org/3/library/functions.html#int) Intersect value intervals the same type * **Returns:** size of the resulting intersection #### overlap(r: [vivl_t](#ida_hexrays.vivl_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Do two value intervals overlap? #### includes(r: [vivl_t](#ida_hexrays.vivl_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Does our value interval include another? #### contains(voff2: [voff_t](#ida_hexrays.voff_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Does our value interval contain the specified value offset? #### compare(r: [vivl_t](#ida_hexrays.vivl_t)) → [int](https://docs.python.org/3/library/functions.html#int) #### dstr() → [str](https://docs.python.org/3/library/stdtypes.html#str) ### *class* ida_hexrays.chain_t(\*args) Bases: [`ida_pro.intvec_t`](../ida_pro/index.md#ida_pro.intvec_t) #### thisown #### width *: [int](https://docs.python.org/3/library/functions.html#int)* size of the value in bytes #### varnum *: [int](https://docs.python.org/3/library/functions.html#int)* allocated variable index (-1 - not allocated yet) #### flags *: uchar* combination Chain properties bits #### set_value(r: [chain_t](#ida_hexrays.chain_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### key() → voff_t const & #### is_inited() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_reg() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_stkoff() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_replaced() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_overlapped() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_fake() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_passreg() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_term() → [bool](https://docs.python.org/3/library/functions.html#bool) #### set_inited(b: [bool](https://docs.python.org/3/library/functions.html#bool)) → [None](https://docs.python.org/3/library/constants.html#None) #### set_replaced(b: [bool](https://docs.python.org/3/library/functions.html#bool)) → [None](https://docs.python.org/3/library/constants.html#None) #### set_overlapped(b: [bool](https://docs.python.org/3/library/functions.html#bool)) → [None](https://docs.python.org/3/library/constants.html#None) #### set_term(b: [bool](https://docs.python.org/3/library/functions.html#bool)) → [None](https://docs.python.org/3/library/constants.html#None) #### get_reg() → mreg_t #### get_stkoff() → [int](https://docs.python.org/3/library/functions.html#int) #### overlap(r: [chain_t](#ida_hexrays.chain_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### includes(r: [chain_t](#ida_hexrays.chain_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### endoff() → voff_t const #### dstr() → [str](https://docs.python.org/3/library/stdtypes.html#str) #### append_list(mba: [mba_t](#ida_hexrays.mba_t), list: [mlist_t](#ida_hexrays.mlist_t)) → [None](https://docs.python.org/3/library/constants.html#None) Append the contents of the chain to the specified list of locations. #### clear_varnum() → [None](https://docs.python.org/3/library/constants.html#None) ### ida_hexrays.CHF_INITED is chain initialized? (valid only after lvar allocation) ### ida_hexrays.CHF_REPLACED chain operands have been replaced? ### ida_hexrays.CHF_OVER overlapped chain ### ida_hexrays.CHF_FAKE fake chain created by widen_chains() ### ida_hexrays.CHF_PASSTHRU pass-thru chain, must use the input variable to the block ### ida_hexrays.CHF_TERM terminating chain; the variable does not survive across the block ### *class* ida_hexrays.block_chains_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### get_reg_chain(reg: mreg_t, width: [int](https://docs.python.org/3/library/functions.html#int) = 1) → chain_t \* Get chain for the specified register * **Parameters:** * **reg** – register number * **width** – size of register in bytes #### get_stk_chain(off: [int](https://docs.python.org/3/library/functions.html#int), width: [int](https://docs.python.org/3/library/functions.html#int) = 1) → chain_t \* Get chain for the specified stack offset * **Parameters:** * **off** – stack offset * **width** – size of stack value in bytes #### get_chain(\*args) → chain_t \* This function has the following signatures: > 1. get_chain(k: const voff_t &, width: int=1) -> const chain_t \* > 2. get_chain(k: const voff_t &, width: int=1) -> chain_t \* > 3. get_chain(ch: const chain_t &) -> const chain_t \* > 4. get_chain(ch: const chain_t &) -> chain_t \* # 0: get_chain(k: const voff_t &, width: int=1) -> const chain_t \* Get chain for the specified value offset. # 1: get_chain(k: const voff_t &, width: int=1) -> chain_t \* # 2: get_chain(ch: const chain_t &) -> const chain_t \* Get chain similar to the specified chain # 3: get_chain(ch: const chain_t &) -> chain_t \* #### dstr() → [str](https://docs.python.org/3/library/stdtypes.html#str) ### *class* ida_hexrays.chain_visitor_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### parent *: block_chains_t \** parent of the current chain #### visit_chain(nblock: [int](https://docs.python.org/3/library/functions.html#int), ch: [chain_t](#ida_hexrays.chain_t)) → [int](https://docs.python.org/3/library/functions.html#int) ### *class* ida_hexrays.graph_chains_t Bases: [`block_chains_vec_t`](#ida_hexrays.block_chains_vec_t) #### thisown #### for_all_chains(cv: [chain_visitor_t](#ida_hexrays.chain_visitor_t), gca_flags: [int](https://docs.python.org/3/library/functions.html#int)) → [int](https://docs.python.org/3/library/functions.html#int) Visit all chains * **Parameters:** * **cv** – chain visitor * **gca_flags** – combination of ``` GCA_ ``` bits #### is_locked() → [bool](https://docs.python.org/3/library/functions.html#bool) Are the chains locked? It is a good idea to lock the chains before using them. This ensures that they won’t be recalculated and reallocated during the use. See the chain_keeper_t class for that. #### acquire() → [None](https://docs.python.org/3/library/constants.html#None) Lock the chains. #### release() → [None](https://docs.python.org/3/library/constants.html#None) Unlock the chains. #### swap(r: [graph_chains_t](#ida_hexrays.graph_chains_t)) → [None](https://docs.python.org/3/library/constants.html#None) ### ida_hexrays.GCA_EMPTY include empty chains ### ida_hexrays.GCA_SPEC include chains for special registers ### ida_hexrays.GCA_ALLOC enumerate only allocated chains ### ida_hexrays.GCA_NALLOC enumerate only non-allocated chains ### ida_hexrays.GCA_OFIRST consider only chains of the first block ### ida_hexrays.GCA_OLAST consider only chains of the last block ### *class* ida_hexrays.minsn_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### opcode *: mcode_t* instruction opcode #### iprops *: [int](https://docs.python.org/3/library/functions.html#int)* combination of instruction property bits bits #### next *: minsn_t \** next insn in doubly linked list. check also nexti() #### prev *: minsn_t \** prev insn in doubly linked list. check also previ() #### ea *: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)* instruction address #### l *: [mop_t](#ida_hexrays.mop_t)* left operand #### r *: [mop_t](#ida_hexrays.mop_t)* right operand #### d *: [mop_t](#ida_hexrays.mop_t)* destination operand #### is_optional() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_combined() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_farcall() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_cleaning_pop() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_extstx() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_tailcall() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_fpinsn() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_assert() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_persistent() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_wild_match() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_propagatable() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_ignlowsrc() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_inverted_jx() → [bool](https://docs.python.org/3/library/functions.html#bool) #### was_noret_icall() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_multimov() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_combinable() → [bool](https://docs.python.org/3/library/functions.html#bool) #### was_split() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_mbarrier() → [bool](https://docs.python.org/3/library/functions.html#bool) #### was_unmerged() → [bool](https://docs.python.org/3/library/functions.html#bool) #### was_unpaired() → [bool](https://docs.python.org/3/library/functions.html#bool) #### was_memfunc() → [bool](https://docs.python.org/3/library/functions.html#bool) #### set_optional() → [None](https://docs.python.org/3/library/constants.html#None) #### clr_combined() → [None](https://docs.python.org/3/library/constants.html#None) #### set_farcall() → [None](https://docs.python.org/3/library/constants.html#None) #### set_cleaning_pop() → [None](https://docs.python.org/3/library/constants.html#None) #### set_extstx() → [None](https://docs.python.org/3/library/constants.html#None) #### set_tailcall() → [None](https://docs.python.org/3/library/constants.html#None) #### clr_tailcall() → [None](https://docs.python.org/3/library/constants.html#None) #### set_fpinsn() → [None](https://docs.python.org/3/library/constants.html#None) #### clr_fpinsn() → [None](https://docs.python.org/3/library/constants.html#None) #### set_assert() → [None](https://docs.python.org/3/library/constants.html#None) #### clr_assert() → [None](https://docs.python.org/3/library/constants.html#None) #### set_persistent() → [None](https://docs.python.org/3/library/constants.html#None) #### set_wild_match() → [None](https://docs.python.org/3/library/constants.html#None) #### clr_propagatable() → [None](https://docs.python.org/3/library/constants.html#None) #### set_ignlowsrc() → [None](https://docs.python.org/3/library/constants.html#None) #### clr_ignlowsrc() → [None](https://docs.python.org/3/library/constants.html#None) #### set_inverted_jx() → [None](https://docs.python.org/3/library/constants.html#None) #### set_noret_icall() → [None](https://docs.python.org/3/library/constants.html#None) #### clr_noret_icall() → [None](https://docs.python.org/3/library/constants.html#None) #### set_multimov() → [None](https://docs.python.org/3/library/constants.html#None) #### clr_multimov() → [None](https://docs.python.org/3/library/constants.html#None) #### set_combinable() → [None](https://docs.python.org/3/library/constants.html#None) #### clr_combinable() → [None](https://docs.python.org/3/library/constants.html#None) #### set_mbarrier() → [None](https://docs.python.org/3/library/constants.html#None) #### set_unmerged() → [None](https://docs.python.org/3/library/constants.html#None) #### set_split_size(s: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### get_split_size() → [int](https://docs.python.org/3/library/functions.html#int) #### swap(m: [minsn_t](#ida_hexrays.minsn_t)) → [None](https://docs.python.org/3/library/constants.html#None) Swap two instructions. The prev/next fields are not modified by this function because it would corrupt the doubly linked list. #### dstr() → [str](https://docs.python.org/3/library/stdtypes.html#str) Get displayable text without tags in a static buffer. #### setaddr(new_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) Change the instruction address. This function modifies subinstructions as well. #### optimize_solo(optflags: [int](https://docs.python.org/3/library/functions.html#int) = 0) → [int](https://docs.python.org/3/library/functions.html#int) Optimize one instruction without context. This function does not have access to the instruction context (the previous and next instructions in the list, the block number, etc). It performs only basic optimizations that are available without this info. * **Parameters:** **optflags** – combination of optimization flags bits * **Returns:** number of changes, 0-unchanged See also mblock_t::optimize_insn() #### optimize_subtree(blk: mblock_t, top: minsn_t, parent: minsn_t, converted_call: ea_t \*, optflags: int = 2) → [int](https://docs.python.org/3/library/functions.html#int) Optimize instruction in its context. Do not use this function, use mblock_t::optimize() #### for_all_ops(mv: [mop_visitor_t](#ida_hexrays.mop_visitor_t)) → [int](https://docs.python.org/3/library/functions.html#int) Visit all instruction operands. This function visits subinstruction operands as well. * **Parameters:** **mv** – operand visitor * **Returns:** non-zero value returned by mv.visit_mop() or zero #### for_all_insns(mv: [minsn_visitor_t](#ida_hexrays.minsn_visitor_t)) → [int](https://docs.python.org/3/library/functions.html#int) Visit all instructions. This function visits the instruction itself and all its subinstructions. * **Parameters:** **mv** – instruction visitor * **Returns:** non-zero value returned by mv.visit_mop() or zero #### equal_insns(m: [minsn_t](#ida_hexrays.minsn_t), eqflags: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) Compare instructions. This is the main comparison function for instructions. * **Parameters:** * **m** – instruction to compare with * **eqflags** – combination of comparison bits bits #### lexcompare(ri: [minsn_t](#ida_hexrays.minsn_t)) → [int](https://docs.python.org/3/library/functions.html#int) #### is_noret_call(flags: [int](https://docs.python.org/3/library/functions.html#int) = 0) → [bool](https://docs.python.org/3/library/functions.html#bool) Is a non-returing call? * **Parameters:** **flags** – combination of ``` NORET_ ``` … bits #### is_unknown_call() → [bool](https://docs.python.org/3/library/functions.html#bool) Is an unknown call? Unknown calls are calls without the argument list (mcallinfo_t). Usually the argument lists are determined by mba_t::analyze_calls(). Unknown calls exist until the MMAT_CALLS maturity level. See also mblock_t::is_call_block #### is_helper(name: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [bool](https://docs.python.org/3/library/functions.html#bool) Is a helper call with the specified name? Helper calls usually have well-known function names (see Well known function names ) but they may have any other name. The decompiler does not assume any special meaning for non-well-known names. #### find_call(with_helpers: [bool](https://docs.python.org/3/library/functions.html#bool) = False) → minsn_t \* Find a call instruction. Check for the current instruction and its subinstructions. * **Parameters:** **with_helpers** – consider helper calls as well? #### contains_call(with_helpers: [bool](https://docs.python.org/3/library/functions.html#bool) = False) → [bool](https://docs.python.org/3/library/functions.html#bool) Does the instruction contain a call? #### has_side_effects(include_ldx_and_divs: [bool](https://docs.python.org/3/library/functions.html#bool) = False) → [bool](https://docs.python.org/3/library/functions.html#bool) Does the instruction have a side effect? * **Parameters:** **include_ldx_and_divs** – consider ldx/div/mod as having side effects? stx is always considered as having side effects. Apart from ldx/std only call may have side effects. #### get_role() → funcrole_t Get the function role of a call. #### is_memcpy() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_memset() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_alloca() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_bswap() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_readflags() → [bool](https://docs.python.org/3/library/functions.html#bool) #### contains_opcode(mcode: mcode_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Does the instruction have the specified opcode? This function searches subinstructions as well. * **Parameters:** **mcode** – opcode to search for. #### find_opcode(mcode: mcode_t) → minsn_t \* Find a (sub)insruction with the specified opcode. * **Parameters:** **mcode** – opcode to search for. #### find_ins_op(op: mcode_t = m_nop) → minsn_t \* Find an operand that is a subinstruction with the specified opcode. This function checks only the ‘l’ and ‘r’ operands of the current insn. It replaces the common pattern: : ( side = 0; side < 2; side++ )
> mop_t
> ``` > * > ```
> op = side == 0 ? &m->l > : ( op->is_insn(opcode) )
> { > : other = side == 0 ? &m->r : &m->l; > …
> } * **Parameters:** **op** – opcode to search for (m_nop matches any subinstruction) * **Returns:** pointer to the found subinstruction (l.d or r.d), or nullptr #### find_num_op() → mop_t \* Find a numeric operand of the current instruction (operand with t == mop_n). This function checks only the ‘l’ and ‘r’ operands of the current insn. It replaces the common pattern: : ( side = 0; side < 2; side++ )
> mop_t
> ``` > * > ```
> op = side == 0 ? &m->l > : ( op->t == mop_n )
> { > : other = side == 0 ? &m->r : &m->l; > …
> } * **Returns:** &l or &r, or nullptr if neither operand is numeric #### is_mov() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_like_move() → [bool](https://docs.python.org/3/library/functions.html#bool) #### modifies_d() → [bool](https://docs.python.org/3/library/functions.html#bool) Does the instruction modify its ‘d’ operand? Some instructions (e.g. m_stx) do not modify the ‘d’ operand. #### modifies_pair_mop() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_between(m1: [minsn_t](#ida_hexrays.minsn_t), m2: [minsn_t](#ida_hexrays.minsn_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Is the instruction in the specified range of instructions? * **Parameters:** * **m1** – beginning of the range in the doubly linked list * **m2** – end of the range in the doubly linked list (excluded, may be nullptr) This function assumes that m1 and m2 belong to the same basic block and they are top level instructions. #### is_after(m: [minsn_t](#ida_hexrays.minsn_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Is the instruction after the specified one? * **Parameters:** **m** – the instruction to compare against in the list #### may_use_aliased_memory() → [bool](https://docs.python.org/3/library/functions.html#bool) Is it possible for the instruction to use aliased memory? #### deserialize(bytes: uchar const \*, format_version: int) → [bool](https://docs.python.org/3/library/functions.html#bool) Deserialize an instruction * **Parameters:** * **bytes** – pointer to serialized data * **format_version** – serialization format version. this value is returned by minsn_t::serialize() * **Returns:** success #### serialize() → Tuple[[int](https://docs.python.org/3/library/functions.html#int), [bytes](https://docs.python.org/3/library/stdtypes.html#bytes)] Serialize an instruction * **Returns:** tuple(serialization format, serialized bytes) #### obj_id #### replace_by(o) #### meminfo ### ida_hexrays.IPROP_OPTIONAL optional instruction ### ida_hexrays.IPROP_PERSIST persistent insn; they are not destroyed ### ida_hexrays.IPROP_WILDMATCH match multiple insns ### ida_hexrays.IPROP_CLNPOP the purpose of the instruction is to clean stack (e.g. “pop ecx” is often used for that) ### ida_hexrays.IPROP_FPINSN floating point insn ### ida_hexrays.IPROP_FARCALL call of a far function using push cs/call sequence ### ida_hexrays.IPROP_TAILCALL tail call ### ida_hexrays.IPROP_ASSERT assertion: usually mov #val, op. assertions are used to help the optimizer. assertions are ignored when generating ctree ### ida_hexrays.IPROP_SPLIT the instruction has been split: ### ida_hexrays.IPROP_SPLIT1 into 1 byte ### ida_hexrays.IPROP_SPLIT2 into 2 bytes ### ida_hexrays.IPROP_SPLIT4 into 4 bytes ### ida_hexrays.IPROP_SPLIT8 into 8 bytes ### ida_hexrays.IPROP_COMBINED insn has been modified because of a partial reference ### ida_hexrays.IPROP_EXTSTX this is m_ext propagated into m_stx ### ida_hexrays.IPROP_IGNLOWSRC low part of the instruction source operand has been created artificially (this bit is used only for ‘and x, 80…’) ### ida_hexrays.IPROP_INV_JX inverted conditional jump ### ida_hexrays.IPROP_WAS_NORET was noret icall ### ida_hexrays.IPROP_MULTI_MOV bits that can be set by plugins: the minsn was generated as part of insn that moves multiple registers (example: STM on ARM may transfer multiple registers) ### ida_hexrays.IPROP_DONT_PROP may not propagate ### ida_hexrays.IPROP_DONT_COMB may not combine this instruction with others ### ida_hexrays.IPROP_MBARRIER this instruction acts as a memory barrier (instructions accessing memory may not be reordered past it) ### ida_hexrays.IPROP_UNMERGED ‘goto’ instruction was transformed info ‘call’ ### ida_hexrays.IPROP_UNPAIRED instruction is a result of del_dest_pairs() transformation ### ida_hexrays.IPROP_WAS_FUNC mov-instruction was initially a memcpy call ### ida_hexrays.OPTI_ADDREXPRS optimize all address expressions (&x+N; &x-&y) ### ida_hexrays.OPTI_MINSTKREF may update minstkref ### ida_hexrays.OPTI_COMBINSNS may combine insns (only for optimize_insn) ### ida_hexrays.OPTI_NO_LDXOPT the function is called after the propagation attempt, we do not optimize low/high(ldx) in this case ### ida_hexrays.OPTI_NO_VALRNG forbid using valranges ### ida_hexrays.EQ_IGNSIZE ignore source operand sizes ### ida_hexrays.EQ_IGNCODE ignore instruction opcodes ### ida_hexrays.EQ_CMPDEST compare instruction destinations ### ida_hexrays.EQ_OPTINSN optimize mop_d operands ### ida_hexrays.NORET_IGNORE_WAS_NORET_ICALL ### ida_hexrays.NORET_FORBID_ANALYSIS ### ida_hexrays.getf_reginsn(ins: [minsn_t](#ida_hexrays.minsn_t)) → minsn_t \* Skip assertions forward. ### ida_hexrays.getb_reginsn(ins: [minsn_t](#ida_hexrays.minsn_t)) → minsn_t \* Skip assertions backward. ### *class* ida_hexrays.intval64_t(v: uint64 = 0, \_s: [int](https://docs.python.org/3/library/functions.html#int) = 1) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### val *: uint64* #### size *: [int](https://docs.python.org/3/library/functions.html#int)* #### sval() → int64 #### uval() → uint64 #### sext(target_sz: [int](https://docs.python.org/3/library/functions.html#int)) → [intval64_t](#ida_hexrays.intval64_t) #### zext(target_sz: [int](https://docs.python.org/3/library/functions.html#int)) → [intval64_t](#ida_hexrays.intval64_t) #### low(target_sz: [int](https://docs.python.org/3/library/functions.html#int)) → [intval64_t](#ida_hexrays.intval64_t) #### high(target_sz: [int](https://docs.python.org/3/library/functions.html#int)) → [intval64_t](#ida_hexrays.intval64_t) #### sdiv(o: [intval64_t](#ida_hexrays.intval64_t)) → [intval64_t](#ida_hexrays.intval64_t) #### smod(o: [intval64_t](#ida_hexrays.intval64_t)) → [intval64_t](#ida_hexrays.intval64_t) #### sar(o: [intval64_t](#ida_hexrays.intval64_t)) → [intval64_t](#ida_hexrays.intval64_t) ### *class* ida_hexrays.int64_emulator_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### get_mop_value(mop: [mop_t](#ida_hexrays.mop_t)) → [intval64_t](#ida_hexrays.intval64_t) #### read_glbmem(arg0: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), arg1: [int](https://docs.python.org/3/library/functions.html#int)) → [intval64_t](#ida_hexrays.intval64_t) #### write_glbmem(arg0: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), arg1: [int](https://docs.python.org/3/library/functions.html#int), arg2: [intval64_t](#ida_hexrays.intval64_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### mop_value(mop: [mop_t](#ida_hexrays.mop_t)) → [intval64_t](#ida_hexrays.intval64_t) #### minsn_value(insn: [minsn_t](#ida_hexrays.minsn_t)) → [intval64_t](#ida_hexrays.intval64_t) ### ida_hexrays.BLT_NONE unknown block type ### ida_hexrays.BLT_STOP stops execution regularly (must be the last block) ### ida_hexrays.BLT_0WAY does not have successors (tail is a noret function) ### ida_hexrays.BLT_1WAY passes execution to one block (regular or goto block) ### ida_hexrays.BLT_2WAY passes execution to two blocks (conditional jump) ### ida_hexrays.BLT_NWAY passes execution to many blocks (switch idiom) ### ida_hexrays.BLT_XTRN external block (out of function address) ### *class* ida_hexrays.mblock_t(\*args, \*\*kwargs) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### nextb *: mblock_t \** next block in the doubly linked list #### prevb *: mblock_t \** previous block in the doubly linked list #### flags *: [int](https://docs.python.org/3/library/functions.html#int)* combination of Basic block properties bits #### start *: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)* start address #### end *: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)* end address note: we cannot rely on start/end addresses very much because instructions are propagated between blocks #### head *: minsn_t \** pointer to the first instruction of the block #### tail *: minsn_t \** pointer to the last instruction of the block #### mba *: mba_t \** the parent micro block array #### serial *: [int](https://docs.python.org/3/library/functions.html#int)* block number #### type *: mblock_type_t* block type (BLT_NONE - not computed yet) #### dead_at_start *: [mlist_t](#ida_hexrays.mlist_t)* data that is dead at the block entry #### mustbuse *: [mlist_t](#ida_hexrays.mlist_t)* data that must be used by the block #### maybuse *: [mlist_t](#ida_hexrays.mlist_t)* data that may be used by the block #### mustbdef *: [mlist_t](#ida_hexrays.mlist_t)* data that must be defined by the block #### maybdef *: [mlist_t](#ida_hexrays.mlist_t)* data that may be defined by the block #### dnu *: [mlist_t](#ida_hexrays.mlist_t)* data that is defined but not used in the block #### maxbsp *: [int](https://docs.python.org/3/library/functions.html#int)* maximal sp value in the block (0…stacksize) #### minbstkref *: [int](https://docs.python.org/3/library/functions.html#int)* lowest stack location accessible with indirect addressing (offset from the stack bottom) initially it is 0 (not computed) #### minbargref *: [int](https://docs.python.org/3/library/functions.html#int)* the same for arguments #### predset *: [intvec_t](../ida_pro/index.md#ida_pro.intvec_t)* control flow graph: list of our predecessors use npred() and pred() to access it #### succset *: [intvec_t](../ida_pro/index.md#ida_pro.intvec_t)* control flow graph: list of our successors use nsucc() and succ() to access it #### mark_lists_dirty() → [None](https://docs.python.org/3/library/constants.html#None) #### request_propagation() → [None](https://docs.python.org/3/library/constants.html#None) #### needs_propagation() → [bool](https://docs.python.org/3/library/functions.html#bool) #### request_demote64() → [None](https://docs.python.org/3/library/constants.html#None) #### lists_dirty() → [bool](https://docs.python.org/3/library/functions.html#bool) #### lists_ready() → [bool](https://docs.python.org/3/library/functions.html#bool) #### make_lists_ready() → [int](https://docs.python.org/3/library/functions.html#int) #### npred() → [int](https://docs.python.org/3/library/functions.html#int) Get number of block predecessors. #### nsucc() → [int](https://docs.python.org/3/library/functions.html#int) Get number of block successors. #### pred(n: [int](https://docs.python.org/3/library/functions.html#int)) → [int](https://docs.python.org/3/library/functions.html#int) #### succ(n: [int](https://docs.python.org/3/library/functions.html#int)) → [int](https://docs.python.org/3/library/functions.html#int) #### empty() → [bool](https://docs.python.org/3/library/functions.html#bool) #### dump() → [None](https://docs.python.org/3/library/constants.html#None) Dump block info. This function is useful for debugging, see mba_t::dump for info #### dump_block(title: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [None](https://docs.python.org/3/library/constants.html#None) #### verify_insn(m: [minsn_t](#ida_hexrays.minsn_t)) → [None](https://docs.python.org/3/library/constants.html#None) Verify an instruction. This function will generate an internal error if something is wrong with the instruction. #### insert_into_block(nm: [minsn_t](#ida_hexrays.minsn_t), om: [minsn_t](#ida_hexrays.minsn_t)) → minsn_t \* Insert instruction into the doubly linked list * **Parameters:** * **nm** – new instruction * **om** – existing instruction, part of the doubly linked list if nullptr, then the instruction will be inserted at the beginning of the list NM will be inserted immediately after OM * **Returns:** pointer to NM #### remove_from_block(m: [minsn_t](#ida_hexrays.minsn_t)) → minsn_t \* Remove instruction from the doubly linked list * **Parameters:** **m** – instruction to remove The removed instruction is not deleted, the caller gets its ownership * **Returns:** pointer to the next instruction #### for_all_insns(mv: [minsn_visitor_t](#ida_hexrays.minsn_visitor_t)) → [int](https://docs.python.org/3/library/functions.html#int) Visit all instructions. This function visits subinstructions too. * **Parameters:** **mv** – instruction visitor * **Returns:** zero or the value returned by mv.visit_insn() See also mba_t::for_all_topinsns() #### for_all_ops(mv: [mop_visitor_t](#ida_hexrays.mop_visitor_t)) → [int](https://docs.python.org/3/library/functions.html#int) Visit all operands. This function visit subinstruction operands too. * **Parameters:** **mv** – operand visitor * **Returns:** zero or the value returned by mv.visit_mop() #### for_all_uses(list: [mlist_t](#ida_hexrays.mlist_t), i1: [minsn_t](#ida_hexrays.minsn_t), i2: [minsn_t](#ida_hexrays.minsn_t), mmv: [mlist_mop_visitor_t](#ida_hexrays.mlist_mop_visitor_t)) → [int](https://docs.python.org/3/library/functions.html#int) Visit all operands that use LIST. * **Parameters:** * **list** – ptr to the list of locations. it may be modified: parts that get redefined by the instructions in [i1,i2) will be deleted. * **i1** – starting instruction. must be a top level insn. * **i2** – ending instruction (excluded). must be a top level insn. * **mmv** – operand visitor * **Returns:** zero or the value returned by mmv.visit_mop() #### optimize_insn(\*args) → [int](https://docs.python.org/3/library/functions.html#int) Optimize one instruction in the context of the block. * **Parameters:** * **m** – pointer to a top level instruction * **optflags** – combination of optimization flags bits * **Returns:** number of changes made to the block This function may change other instructions in the block too. However, it will not destroy top level instructions (it may convert them to nop’s). This function performs only intrablock modifications. See also minsn_t::optimize_solo() #### optimize_block() → [int](https://docs.python.org/3/library/functions.html#int) Optimize a basic block. Usually there is no need to call this function explicitly because the decompiler will call it itself if optinsn_t::func or optblock_t::func return non-zero. * **Returns:** number of changes made to the block #### build_lists(kill_deads: [bool](https://docs.python.org/3/library/functions.html#bool)) → [int](https://docs.python.org/3/library/functions.html#int) Build def-use lists and eliminate deads. * **Parameters:** **kill_deads** – do delete dead instructions? * **Returns:** the number of eliminated instructions Better mblock_t::call make_lists_ready() rather than this function. #### optimize_useless_jump() → [int](https://docs.python.org/3/library/functions.html#int) Remove a jump at the end of the block if it is useless. This function preserves any side effects when removing a useless jump. Both conditional and unconditional jumps are handled (and jtbl too). This function deletes useless jumps, not only replaces them with a nop. (please note that optimize_insn does not handle useless jumps). * **Returns:** number of changes made to the block #### append_use_list(\*args) → [None](https://docs.python.org/3/library/constants.html#None) Append use-list of an operand. This function calculates list of locations that may or must be used by the operand and appends it to LIST. * **Parameters:** * **list** – ptr to the output buffer. we will append to it. * **op** – operand to calculate the use list of * **maymust** – should we calculate ‘may-use’ or ‘must-use’ list? see maymust_t for more details. * **mask** – if only part of the operand should be considered, a bitmask can be used to specify which part. example: op=AX,mask=0xFF means that we will consider only AL. #### append_def_list(list: [mlist_t](#ida_hexrays.mlist_t), op: [mop_t](#ida_hexrays.mop_t), maymust: maymust_t) → [None](https://docs.python.org/3/library/constants.html#None) Append def-list of an operand. This function calculates list of locations that may or must be modified by the operand and appends it to LIST. * **Parameters:** * **list** – ptr to the output buffer. we will append to it. * **op** – operand to calculate the def list of * **maymust** – should we calculate ‘may-def’ or ‘must-def’ list? see maymust_t for more details. #### build_use_list(ins: [minsn_t](#ida_hexrays.minsn_t), maymust: maymust_t) → [mlist_t](#ida_hexrays.mlist_t) Build use-list of an instruction. This function calculates list of locations that may or must be used by the instruction. Examples: “ldx ds.2, eax.4, ebx.4”, may-list: all aliasable memory “ldx ds.2, eax.4, ebx.4”, must-list: empty Since LDX uses EAX for indirect access, it may access any aliasable memory. On the other hand, we cannot tell for sure which memory cells will be accessed, this is why the must-list is empty. * **Parameters:** * **ins** – instruction to calculate the use list of * **maymust** – should we calculate ‘may-use’ or ‘must-use’ list? see maymust_t for more details. * **Returns:** the calculated use-list #### build_def_list(ins: [minsn_t](#ida_hexrays.minsn_t), maymust: maymust_t) → [mlist_t](#ida_hexrays.mlist_t) Build def-list of an instruction. This function calculates list of locations that may or must be modified by the instruction. Examples: “stx ebx.4, ds.2, eax.4”, may-list: all aliasable memory “stx ebx.4, ds.2, eax.4”, must-list: empty Since STX uses EAX for indirect access, it may modify any aliasable memory. On the other hand, we cannot tell for sure which memory cells will be modified, this is why the must-list is empty. * **Parameters:** * **ins** – instruction to calculate the def list of * **maymust** – should we calculate ‘may-def’ or ‘must-def’ list? see maymust_t for more details. * **Returns:** the calculated def-list #### is_used(\*args) → [bool](https://docs.python.org/3/library/functions.html#bool) Is the list used by the specified instruction range? * **Parameters:** * **list** – list of locations. LIST may be modified by the function: redefined locations will be removed from it. * **i1** – starting instruction of the range (must be a top level insn) * **i2** – end instruction of the range (must be a top level insn) i2 is excluded from the range. it can be specified as nullptr. i1 and i2 must belong to the same block. * **maymust** – should we search in ‘may-access’ or ‘must-access’ mode? #### find_first_use(\*args) → minsn_t \* This function has the following signatures: > 1. find_first_use(list: mlist_t > ``` > * > ``` > , i1: const minsn_t > ``` > * > ``` > , i2: const minsn_t > ``` > * > ``` > , maymust: maymust_t=MAY_ACCESS) -> const minsn_t \* > 2. find_first_use(list: mlist_t > ``` > * > ``` > , i1: minsn_t > ``` > * > ``` > , i2: const minsn_t > ``` > * > ``` > , maymust: maymust_t=MAY_ACCESS) -> minsn_t \* # 0: find_first_use(list: mlist_t ``` * ``` , i1: const minsn_t ``` * ``` , i2: const minsn_t ``` * ``` , maymust: maymust_t=MAY_ACCESS) -> const minsn_t \* Find the first insn that uses the specified list in the insn range. * **Returns:** pointer to such instruction or nullptr. Upon return LIST will contain only locations not redefined by insns [i1..result] # 1: find_first_use(list: mlist_t ``` * ``` , i1: minsn_t ``` * ``` , i2: const minsn_t ``` * ``` , maymust: maymust_t=MAY_ACCESS) -> minsn_t \* #### is_redefined(\*args) → [bool](https://docs.python.org/3/library/functions.html#bool) Is the list redefined by the specified instructions? * **Parameters:** * **list** – list of locations to check. * **i1** – starting instruction of the range (must be a top level insn) * **i2** – end instruction of the range (must be a top level insn) i2 is excluded from the range. it can be specified as nullptr. i1 and i2 must belong to the same block. * **maymust** – should we search in ‘may-access’ or ‘must-access’ mode? #### find_redefinition(\*args) → minsn_t \* This function has the following signatures: > 1. find_redefinition(list: const mlist_t &, i1: const minsn_t > ``` > * > ``` > , i2: const minsn_t > ``` > * > ``` > , maymust: maymust_t=MAY_ACCESS) -> const minsn_t \* > 2. find_redefinition(list: const mlist_t &, i1: minsn_t > ``` > * > ``` > , i2: const minsn_t > ``` > * > ``` > , maymust: maymust_t=MAY_ACCESS) -> minsn_t \* # 0: find_redefinition(list: const mlist_t &, i1: const minsn_t ``` * ``` , i2: const minsn_t ``` * ``` , maymust: maymust_t=MAY_ACCESS) -> const minsn_t \* Find the first insn that redefines any part of the list in the insn range. * **Returns:** pointer to such instruction or nullptr. # 1: find_redefinition(list: const mlist_t &, i1: minsn_t ``` * ``` , i2: const minsn_t ``` * ``` , maymust: maymust_t=MAY_ACCESS) -> minsn_t \* #### is_rhs_redefined(ins: [minsn_t](#ida_hexrays.minsn_t), i1: [minsn_t](#ida_hexrays.minsn_t), i2: [minsn_t](#ida_hexrays.minsn_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Is the right hand side of the instruction redefined the insn range? “right hand side” corresponds to the source operands of the instruction. * **Parameters:** * **ins** – instruction to consider * **i1** – starting instruction of the range (must be a top level insn) * **i2** – end instruction of the range (must be a top level insn) i2 is excluded from the range. it can be specified as nullptr. i1 and i2 must belong to the same block. #### find_access(op: [mop_t](#ida_hexrays.mop_t), parent: [minsn_t](#ida_hexrays.minsn_t), mend: [minsn_t](#ida_hexrays.minsn_t), fdflags: [int](https://docs.python.org/3/library/functions.html#int)) → Tuple[[minsn_t](#ida_hexrays.minsn_t), [minsn_t](#ida_hexrays.minsn_t)] Find the instruction that accesses the specified operand. This function searches inside one block. * **Parameters:** * **op** – operand to search for * **parent** – top-level instruction denoting the beginning of the search range (must not be None). parent and mend must belong to the same block. * **mend** – end instruction of the range (must be a top level insn). mend is excluded from the range. None means search to the block boundary. * **fdflags** – combination of ``` FD_ ``` bits * **Returns:** (found, parent) tuple. found: the instruction that accesses the operand. This instruction may be a sub-instruction. None means ‘not found’. parent: the top-level instruction containing ‘found’. #### find_def(op: [mop_t](#ida_hexrays.mop_t), p_i1: [minsn_t](#ida_hexrays.minsn_t), i2: [minsn_t](#ida_hexrays.minsn_t), fdflags: [int](https://docs.python.org/3/library/functions.html#int)) → Tuple[[minsn_t](#ida_hexrays.minsn_t), [minsn_t](#ida_hexrays.minsn_t)] Find the instruction that defines the specified operand. Convenience wrapper around find_access() with FD_DEF. * **Parameters:** * **op** – operand to search for * **p_i1** – top-level instruction denoting the beginning of the search range (must not be None). p_i1 and i2 must belong to the same block. * **i2** – end instruction of the range (excluded). None means search to the block boundary. * **fdflags** – combination of ``` FD_ ``` bits (see find_access) * **Returns:** (found, parent) tuple. See find_access(). #### find_use(op: [mop_t](#ida_hexrays.mop_t), p_i1: [minsn_t](#ida_hexrays.minsn_t), i2: [minsn_t](#ida_hexrays.minsn_t), fdflags: [int](https://docs.python.org/3/library/functions.html#int)) → Tuple[[minsn_t](#ida_hexrays.minsn_t), [minsn_t](#ida_hexrays.minsn_t)] Find the instruction that uses the specified operand. Convenience wrapper around find_access() with FD_USE. * **Parameters:** * **op** – operand to search for * **p_i1** – top-level instruction denoting the beginning of the search range (must not be None). p_i1 and i2 must belong to the same block. * **i2** – end instruction of the range (excluded). None means search to the block boundary. * **fdflags** – combination of ``` FD_ ``` bits (see find_access) * **Returns:** (found, parent) tuple. See find_access(). #### get_valranges(\*args) → [bool](https://docs.python.org/3/library/functions.html#bool) This function has the following signatures: > 1. get_valranges(res: valrng_t > ``` > * > ``` > , vivl: const vivl_t &, vrflags: int) -> bool > 2. get_valranges(res: valrng_t > ``` > * > ``` > , vivl: const vivl_t &, m: const minsn_t > ``` > * > ``` > , vrflags: int) -> bool # 0: get_valranges(res: valrng_t ``` * ``` , vivl: const vivl_t &, vrflags: int) -> bool Find possible values for a block. # 1: get_valranges(res: valrng_t ``` * ``` , vivl: const vivl_t &, m: const minsn_t ``` * ``` , vrflags: int) -> bool Find possible values for an instruction. #### make_nop(m: [minsn_t](#ida_hexrays.minsn_t)) → [None](https://docs.python.org/3/library/constants.html#None) Erase the instruction (convert it to nop) and mark the lists dirty. This is the recommended function to use because it also marks the block use-def lists dirty. #### get_reginsn_qty() → [int](https://docs.python.org/3/library/functions.html#int) Calculate number of regular instructions in the block. Assertions are skipped by this function. * **Returns:** Number of non-assertion instructions in the block. #### is_call_block() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_unknown_call() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_nway() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_branch() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_simple_goto_block() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_simple_jcnd_block() → [bool](https://docs.python.org/3/library/functions.html#bool) #### undef_spoiled_regs(m: [minsn_t](#ida_hexrays.minsn_t)) → [None](https://docs.python.org/3/library/constants.html#None) Undefine registers spoiled by the instruction m (insert new ‘und’ instruction for them, after ‘m’). This is useful after replacing a call instruction with a different instruction. #### preds() #### succs() ### ida_hexrays.MBL_PRIV private block - no instructions except the specified are accepted (used in patterns) ### ida_hexrays.MBL_NONFAKE regular block ### ida_hexrays.MBL_FAKE fake block ### ida_hexrays.MBL_GOTO this block is a goto target ### ida_hexrays.MBL_TCAL aritifical call block for tail calls ### ida_hexrays.MBL_PUSH needs “convert push/pop instructions” ### ida_hexrays.MBL_DMT64 needs “demote 64bits” ### ida_hexrays.MBL_COMB needs “combine” pass ### ida_hexrays.MBL_PROP needs ‘propagation’ pass ### ida_hexrays.MBL_DEAD needs “eliminate deads” pass ### ida_hexrays.MBL_LIST use/def lists are ready (not dirty) ### ida_hexrays.MBL_INCONST inconsistent lists: we are building them ### ida_hexrays.MBL_CALL call information has been built ### ida_hexrays.MBL_BACKPROP performed backprop_cc ### ida_hexrays.MBL_NORET dead end block: doesn’t return execution control ### ida_hexrays.MBL_DSLOT block for delay slot ### ida_hexrays.MBL_VALRANGES should optimize using value ranges ### ida_hexrays.MBL_KEEP do not remove even if unreachable ### ida_hexrays.MBL_INLINED block was inlined, not originally part of mbr ### ida_hexrays.MBL_EXTFRAME an inlined block with an external frame ### ida_hexrays.FD_BACKWARD search direction ### ida_hexrays.FD_FORWARD search direction ### ida_hexrays.FD_USE look for use ### ida_hexrays.FD_DEF look for definition ### ida_hexrays.FD_DIRTY ignore possible implicit definitions by function calls and indirect memory access ### ida_hexrays.VR_AT_START get value ranges before the instruction or at the block start (if M is nullptr) ### ida_hexrays.VR_AT_END get value ranges after the instruction or at the block end, just after the last instruction (if M is nullptr) ### ida_hexrays.VR_EXACT find exact match. if not set, the returned valrng size will be >= vivl.size ### ida_hexrays.WARN_VARARG_REGS 0 cannot handle register arguments in vararg function, discarded them ### ida_hexrays.WARN_ILL_PURGED 1 odd caller purged bytes d, correcting ### ida_hexrays.WARN_ILL_FUNCTYPE 2 invalid function type ‘s’ has been ignored ### ida_hexrays.WARN_VARARG_TCAL 3 cannot handle tail call to vararg ### ida_hexrays.WARN_VARARG_NOSTK 4 call vararg without local stack ### ida_hexrays.WARN_VARARG_MANY 5 too many varargs, some ignored ### ida_hexrays.WARN_ADDR_OUTARGS 6 cannot handle address arithmetics in outgoing argument area of stack frame - unused ### ida_hexrays.WARN_DEP_UNK_CALLS 7 found interdependent unknown calls ### ida_hexrays.WARN_ILL_ELLIPSIS 8 erroneously detected ellipsis type has been ignored ### ida_hexrays.WARN_GUESSED_TYPE 9 using guessed type s; ### ida_hexrays.WARN_EXP_LINVAR 10 failed to expand a linear variable ### ida_hexrays.WARN_WIDEN_CHAINS 11 failed to widen chains ### ida_hexrays.WARN_BAD_PURGED 12 inconsistent function type and number of purged bytes ### ida_hexrays.WARN_CBUILD_LOOPS 13 too many cbuild loops ### ida_hexrays.WARN_NO_SAVE_REST 14 could not find valid save-restore pair for s ### ida_hexrays.WARN_ODD_INPUT_REG 15 odd input register s ### ida_hexrays.WARN_ODD_ADDR_USE 16 odd use of a variable address ### ida_hexrays.WARN_MUST_RET_FP 17 function return type is incorrect (must be floating point) ### ida_hexrays.WARN_ILL_FPU_STACK 18 inconsistent fpu stack ### ida_hexrays.WARN_SELFREF_PROP 19 self-referencing variable has been detected ### ida_hexrays.WARN_WOULD_OVERLAP 20 variables would overlap: s ### ida_hexrays.WARN_ARRAY_INARG 21 array has been used for an input argument ### ida_hexrays.WARN_MAX_ARGS 22 too many input arguments, some ignored ### ida_hexrays.WARN_BAD_FIELD_TYPE 23 incorrect structure member type for s::s, ignored ### ida_hexrays.WARN_WRITE_CONST 24 write access to const memory at a has been detected ### ida_hexrays.WARN_BAD_RETVAR 25 wrong return variable ### ida_hexrays.WARN_FRAG_LVAR 26 fragmented variable at s may be wrong ### ida_hexrays.WARN_HUGE_STKOFF 27 exceedingly huge offset into the stack frame ### ida_hexrays.WARN_UNINITED_REG 28 reference to an uninitialized register has been removed: s ### ida_hexrays.WARN_FIXED_INSN 29 fixed broken insn ### ida_hexrays.WARN_WRONG_VA_OFF 30 wrong offset of va_list variable ### ida_hexrays.WARN_CR_NOFIELD 31 CONTAINING_RECORD: no field ‘s’ in struct ‘s’ at d ### ida_hexrays.WARN_CR_BADOFF 32 CONTAINING_RECORD: too small offset d for struct ‘s’ ### ida_hexrays.WARN_BAD_STROFF 33 user specified stroff has not been processed: s ### ida_hexrays.WARN_BAD_VARSIZE 34 inconsistent variable size for ‘s’ ### ida_hexrays.WARN_UNSUPP_REG 35 unsupported processor register ‘s’ ### ida_hexrays.WARN_UNALIGNED_ARG 36 unaligned function argument ‘s’ ### ida_hexrays.WARN_BAD_STD_TYPE 37 corrupted or unexisting local type ‘s’ ### ida_hexrays.WARN_BAD_CALL_SP 38 bad sp value at call ### ida_hexrays.WARN_MISSED_SWITCH 39 wrong markup of switch jump, skipped it ### ida_hexrays.WARN_BAD_SP 40 positive sp value a has been found ### ida_hexrays.WARN_BAD_STKPNT 41 wrong sp change point ### ida_hexrays.WARN_UNDEF_LVAR 42 variable ‘s’ is possibly undefined ### ida_hexrays.WARN_JUMPOUT 43 control flows out of bounds ### ida_hexrays.WARN_BAD_VALRNG 44 values range analysis failed ### ida_hexrays.WARN_BAD_SHADOW 45 ignored the value written to the shadow area of the succeeding call ### ida_hexrays.WARN_OPT_VALRNG 46 conditional instruction was optimized away because s ### ida_hexrays.WARN_RET_LOCREF 47 returning address of temporary local variable ‘s’ ### ida_hexrays.WARN_BAD_MAPDST 48 too short map destination ‘s’ for variable ‘s’ ### ida_hexrays.WARN_BAD_INSN 49 bad instruction ### ida_hexrays.WARN_ODD_ABI 50 encountered odd instruction for the current ABI ### ida_hexrays.WARN_UNBALANCED_STACK 51 unbalanced stack, ignored a potential tail call ### ida_hexrays.WARN_OPT_VALRNG2 52 mask 0xX is shortened because s <= 0xX” ### ida_hexrays.WARN_OPT_VALRNG3 53 masking with 0XX was optimized away because s <= 0xX ### ida_hexrays.WARN_OPT_USELESS_JCND 54 simplified comparisons for ‘s’: s became s ### ida_hexrays.WARN_SUBFRAME_OVERFLOW 55 call arguments overflow the function chunk frame ### ida_hexrays.WARN_OPT_VALRNG4 56 the cases s were optimized away because s ### ida_hexrays.WARN_FRAME_ACCESS 57 illegal frame access ### ida_hexrays.WARN_BAD_EHINFO 58 inconsistent exception info ### ida_hexrays.WARN_INCOMPAT_TYPE 59 incompatible types for ‘s’: expected s but encountered s ### ida_hexrays.WARN_DALVIK_ENUM 60 could not fully analyze enum ; constant order or bodies may be incomplete ### ida_hexrays.WARN_MAX may be used in notes as a placeholder when the warning id is not available ### *class* ida_hexrays.hexwarn_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### ea *: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)* Address where the warning occurred. #### id *: warnid_t* Warning id. #### text *: [str](https://docs.python.org/3/library/stdtypes.html#str)* Fully formatted text of the warning. #### compare(r: [hexwarn_t](#ida_hexrays.hexwarn_t)) → [int](https://docs.python.org/3/library/functions.html#int) ### ida_hexrays.MMAT_ZERO microcode does not exist ### ida_hexrays.MMAT_GENERATED generated microcode ### ida_hexrays.MMAT_PREOPTIMIZED preoptimized pass is complete ### ida_hexrays.MMAT_LOCOPT local optimization of each basic block is complete. control flow graph is ready too. ### ida_hexrays.MMAT_CALLS detected call arguments. see also hxe_calls_done ### ida_hexrays.MMAT_GLBOPT1 performed the first pass of global optimization ### ida_hexrays.MMAT_GLBOPT2 most global optimization passes are done ### ida_hexrays.MMAT_GLBOPT3 completed all global optimization. microcode is fixed now. ### ida_hexrays.MMAT_LVARS allocated local variables ### *class* ida_hexrays.minsn_locator_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### ea *: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)* address of the minsn #### mcode *: mcode_t* opcode of the minsn #### serial *: [int](https://docs.python.org/3/library/functions.html#int)* serial number, in case the ea/mcode are ambiguous #### blknum *: [int](https://docs.python.org/3/library/functions.html#int)* block number of the minsn #### compare(r: [minsn_locator_t](#ida_hexrays.minsn_locator_t)) → [int](https://docs.python.org/3/library/functions.html#int) ### ida_hexrays.UMA_DEL delete the instruction ### ida_hexrays.UMA_INS insert the instruction before the current ### ida_hexrays.UMA_APP insert the instruction after the current ### ida_hexrays.UMA_MAX ### *class* ida_hexrays.user_minsn_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### loc *: [minsn_locator_t](#ida_hexrays.minsn_locator_t)* location of the target microinstruction #### ins *: [minsn_t](#ida_hexrays.minsn_t)* instruction to insert (for UMA_INS/UMA_APP) #### action *: user_minsn_action_t* action type #### marked_for_addition() → [bool](https://docs.python.org/3/library/functions.html#bool) Does this action add a new instruction? #### compare(r: [user_minsn_t](#ida_hexrays.user_minsn_t)) → [int](https://docs.python.org/3/library/functions.html#int) ### ida_hexrays.add_user_minsn(entry_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), uins: [user_minsn_t](#ida_hexrays.user_minsn_t), mmat: mba_maturity_t) → [None](https://docs.python.org/3/library/constants.html#None) Add a user-defined microinstruction action. This is a standalone version that loads user minsns from the database, adds the action, and saves back. Use it when an mba_t is not available. * **Parameters:** * **entry_ea** – entry address of the function * **uins** – user minsn to add (includes location, action, and instruction) * **mmat** – maturity level to add the action to ### ida_hexrays.del_user_minsn(entry_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), loc: [minsn_locator_t](#ida_hexrays.minsn_locator_t), action: user_minsn_action_t, mmat: mba_maturity_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Delete a user-defined microinstruction action. This is a standalone version that loads user minsns from the database, deletes the action, and saves back. Use it when an mba_t is not available. * **Parameters:** * **entry_ea** – entry address of the function * **loc** – location of the target microinstruction * **action** – action type to delete (UMA_DEL, UMA_INS, or UMA_APP) * **mmat** – maturity level to delete the action from * **Returns:** true if the action was found and deleted ### ida_hexrays.MMIDX_GLBLOW global memory: low part ### ida_hexrays.MMIDX_LVARS stack: local variables ### ida_hexrays.MMIDX_RETADDR stack: return address ### ida_hexrays.MMIDX_SHADOW stack: shadow arguments ### ida_hexrays.MMIDX_ARGS stack: regular stack arguments ### ida_hexrays.MMIDX_GLBHIGH global memory: high part ### *class* ida_hexrays.mba_ranges_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### pfn *: func_t \** function to decompile. if not null, then function mode. #### ranges *: [rangevec_t](../ida_range/index.md#ida_range.rangevec_t)* snippet mode: ranges to decompile. function mode: list of outlined ranges #### start() → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) #### empty() → [bool](https://docs.python.org/3/library/functions.html#bool) #### clear() → [None](https://docs.python.org/3/library/constants.html#None) #### is_snippet() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_fragmented() → [bool](https://docs.python.org/3/library/functions.html#bool) ### *class* ida_hexrays.decomp_ranges_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### func_ea *: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)* function to decompile. if not BADADDR, then function mode. #### ranges *: [rangevec_t](../ida_range/index.md#ida_range.rangevec_t)* snippet mode: ranges to decompile. function mode: list of outlined ranges #### start() → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) #### empty() → [bool](https://docs.python.org/3/library/functions.html#bool) #### clear() → [None](https://docs.python.org/3/library/constants.html#None) #### is_snippet() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_fragmented() → [bool](https://docs.python.org/3/library/functions.html#bool) ### *class* ida_hexrays.mba_range_iterator_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### rii *: range_chunk_iterator_t* #### fii *: func_tail_iterator_t* #### is_snippet() → [bool](https://docs.python.org/3/library/functions.html#bool) #### set(mbr: [mba_ranges_t](#ida_hexrays.mba_ranges_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### next() → [bool](https://docs.python.org/3/library/functions.html#bool) #### chunk() → range_t const & ### *class* ida_hexrays.decomp_range_iterator_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### rii *: range_chunk_iterator_t* #### fii *: [function_tail_iterator_t](../ida_funcs/index.md#ida_funcs.function_tail_iterator_t)* #### is_snippet() → [bool](https://docs.python.org/3/library/functions.html#bool) #### set(dcr: [decomp_ranges_t](#ida_hexrays.decomp_ranges_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### next() → [bool](https://docs.python.org/3/library/functions.html#bool) #### chunk(out: [range_t](../ida_range/index.md#ida_range.range_t)) → [None](https://docs.python.org/3/library/constants.html#None) ### *class* ida_hexrays.mba_t(\*args, \*\*kwargs) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### precise_defeas() → [bool](https://docs.python.org/3/library/functions.html#bool) #### optimized() → [bool](https://docs.python.org/3/library/functions.html#bool) #### short_display() → [bool](https://docs.python.org/3/library/functions.html#bool) #### show_reduction() → [bool](https://docs.python.org/3/library/functions.html#bool) #### graph_insns() → [bool](https://docs.python.org/3/library/functions.html#bool) #### loaded_gdl() → [bool](https://docs.python.org/3/library/functions.html#bool) #### should_beautify() → [bool](https://docs.python.org/3/library/functions.html#bool) #### rtype_refined() → [bool](https://docs.python.org/3/library/functions.html#bool) #### may_refine_rettype() → [bool](https://docs.python.org/3/library/functions.html#bool) #### display_numaddrs() → [bool](https://docs.python.org/3/library/functions.html#bool) #### display_valnums() → [bool](https://docs.python.org/3/library/functions.html#bool) #### display_ea() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_pattern() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_thunk() → [bool](https://docs.python.org/3/library/functions.html#bool) #### saverest_done() → [bool](https://docs.python.org/3/library/functions.html#bool) #### callinfo_built() → [bool](https://docs.python.org/3/library/functions.html#bool) #### really_alloc() → [bool](https://docs.python.org/3/library/functions.html#bool) #### lvars_allocated() → [bool](https://docs.python.org/3/library/functions.html#bool) #### chain_varnums_ok() → [bool](https://docs.python.org/3/library/functions.html#bool) #### returns_fpval() → [bool](https://docs.python.org/3/library/functions.html#bool) #### has_passregs() → [bool](https://docs.python.org/3/library/functions.html#bool) #### generated_asserts() → [bool](https://docs.python.org/3/library/functions.html#bool) #### propagated_asserts() → [bool](https://docs.python.org/3/library/functions.html#bool) #### deleted_pairs() → [bool](https://docs.python.org/3/library/functions.html#bool) #### common_stkvars_stkargs() → [bool](https://docs.python.org/3/library/functions.html#bool) #### lvar_names_ok() → [bool](https://docs.python.org/3/library/functions.html#bool) #### lvars_renamed() → [bool](https://docs.python.org/3/library/functions.html#bool) #### has_over_chains() → [bool](https://docs.python.org/3/library/functions.html#bool) #### valranges_done() → [bool](https://docs.python.org/3/library/functions.html#bool) #### argidx_ok() → [bool](https://docs.python.org/3/library/functions.html#bool) #### argidx_sorted() → [bool](https://docs.python.org/3/library/functions.html#bool) #### code16_bit_removed() → [bool](https://docs.python.org/3/library/functions.html#bool) #### has_stack_retval() → [bool](https://docs.python.org/3/library/functions.html#bool) #### has_outlines() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_ctr() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_dtr() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_cdtr() → [bool](https://docs.python.org/3/library/functions.html#bool) #### prop_complex() → [bool](https://docs.python.org/3/library/functions.html#bool) #### get_mba_flags() → [int](https://docs.python.org/3/library/functions.html#int) #### get_mba_flags2() → [int](https://docs.python.org/3/library/functions.html#int) #### set_mba_flags(f: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### clr_mba_flags(f: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### set_mba_flags2(f: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### clr_mba_flags2(f: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### clr_cdtr() → [None](https://docs.python.org/3/library/constants.html#None) #### calc_shins_flags() → [int](https://docs.python.org/3/library/functions.html#int) #### stkoff_vd2ida(off: [int](https://docs.python.org/3/library/functions.html#int)) → [int](https://docs.python.org/3/library/functions.html#int) #### stkoff_ida2vd(off: [int](https://docs.python.org/3/library/functions.html#int)) → [int](https://docs.python.org/3/library/functions.html#int) #### argbase() → [int](https://docs.python.org/3/library/functions.html#int) #### idaloc2vd(loc: [argloc_t](../ida_typeinf/index.md#ida_typeinf.argloc_t), width: [int](https://docs.python.org/3/library/functions.html#int)) → [vdloc_t](#ida_hexrays.vdloc_t) #### vd2idaloc(\*args) → [argloc_t](../ida_typeinf/index.md#ida_typeinf.argloc_t) This function has the following signatures: > 1. vd2idaloc(loc: const vdloc_t &, width: int) -> argloc_t > 2. vd2idaloc(loc: const vdloc_t &, width: int, spd: int) -> argloc_t # 0: vd2idaloc(loc: const vdloc_t &, width: int) -> argloc_t # 1: vd2idaloc(loc: const vdloc_t &, width: int, spd: int) -> argloc_t #### is_stkarg(v: [lvar_t](#ida_hexrays.lvar_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### get_ida_argloc(v: [lvar_t](#ida_hexrays.lvar_t)) → [argloc_t](../ida_typeinf/index.md#ida_typeinf.argloc_t) #### mbr *: [mba_ranges_t](#ida_hexrays.mba_ranges_t)* #### entry_ea *: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)* #### last_prolog_ea *: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)* #### first_epilog_ea *: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)* #### qty *: [int](https://docs.python.org/3/library/functions.html#int)* number of basic blocks #### npurged *: [int](https://docs.python.org/3/library/functions.html#int)* -1 - unknown #### cc *: callcnv_t* calling convention #### tmpstk_size *: [int](https://docs.python.org/3/library/functions.html#int)* size of the temporary stack part (which dynamically changes with push/pops) #### frsize *: [int](https://docs.python.org/3/library/functions.html#int)* size of local stkvars range in the stack frame #### frregs *: [int](https://docs.python.org/3/library/functions.html#int)* size of saved registers range in the stack frame #### fpd *: [int](https://docs.python.org/3/library/functions.html#int)* frame pointer delta #### pfn_flags *: [int](https://docs.python.org/3/library/functions.html#int)* copy of func_t::flags #### retsize *: [int](https://docs.python.org/3/library/functions.html#int)* size of return address in the stack frame #### shadow_args *: [int](https://docs.python.org/3/library/functions.html#int)* size of shadow argument area #### fullsize *: [int](https://docs.python.org/3/library/functions.html#int)* Full stack size including incoming args. #### stacksize *: [int](https://docs.python.org/3/library/functions.html#int)* The maximal size of the function stack including bytes allocated for outgoing call arguments (up to retaddr) #### inargoff *: [int](https://docs.python.org/3/library/functions.html#int)* offset of the first stack argument; after fix_scattered_movs() INARGOFF may be less than STACKSIZE #### minstkref *: [int](https://docs.python.org/3/library/functions.html#int)* The lowest stack location whose address was taken. #### minstkref_ea *: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)* address with lowest minstkref (for debugging) #### minargref *: [int](https://docs.python.org/3/library/functions.html#int)* The lowest stack argument location whose address was taken This location and locations above it can be aliased It controls locations >= inargoff-shadow_args #### spd_adjust *: [int](https://docs.python.org/3/library/functions.html#int)* If sp>0, the max positive sp value. #### gotoff_stkvars *: [ivlset_t](#ida_hexrays.ivlset_t)* stkvars that hold .got offsets. considered to be unaliasable #### restricted_memory *: [ivlset_t](#ida_hexrays.ivlset_t)* #### aliased_memory *: [ivlset_t](#ida_hexrays.ivlset_t)* aliased_memory+restricted_memory=ALLMEM #### nodel_memory *: [mlist_t](#ida_hexrays.mlist_t)* global dead elimination may not delete references to this area #### consumed_argregs *: [rlist_t](#ida_hexrays.rlist_t)* registers converted into stack arguments, should not be used as arguments #### maturity *: mba_maturity_t* current maturity level #### reqmat *: mba_maturity_t* required maturity level #### final_type *: [bool](https://docs.python.org/3/library/functions.html#bool)* is the function type final? (specified by the user) #### idb_type *: [tinfo_t](../ida_typeinf/index.md#ida_typeinf.tinfo_t)* function type as retrieved from the database #### idb_spoiled *: [reginfovec_t](../ida_typeinf/index.md#ida_typeinf.reginfovec_t)* MBA_SPLINFO && final_type: info in ida format. #### spoiled_list *: [mlist_t](#ida_hexrays.mlist_t)* MBA_SPLINFO && !final_type: info in vd format. #### fti_flags *: [int](https://docs.python.org/3/library/functions.html#int)* ``` FTI_ ``` … constants for the current function. #### label *: [str](https://docs.python.org/3/library/stdtypes.html#str)* name of the function or pattern (colored) #### vars *: [lvars_t](#ida_hexrays.lvars_t)* local variables #### argidx *: [intvec_t](../ida_pro/index.md#ida_pro.intvec_t)* input arguments (indexes into ‘vars’) #### retvaridx *: [int](https://docs.python.org/3/library/functions.html#int)* index of variable holding the return value -1 means none #### error_ea *: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)* during microcode generation holds ins.ea #### error_strarg *: [str](https://docs.python.org/3/library/stdtypes.html#str)* #### blocks *: mblock_t \** double linked list of blocks #### natural *: mblock_t \*\** natural order of blocks #### std_ivls *: [ivl_with_name_t](#ida_hexrays.ivl_with_name_t)[6]* we treat memory as consisting of 6 parts see memreg_index_t #### notes *: [hexwarns_t](#ida_hexrays.hexwarns_t)* #### occurred_warns *: uchar[32]* #### write_to_const_detected() → [bool](https://docs.python.org/3/library/functions.html#bool) #### bad_call_sp_detected() → [bool](https://docs.python.org/3/library/functions.html#bool) #### regargs_is_not_aligned() → [bool](https://docs.python.org/3/library/functions.html#bool) #### has_bad_sp() → [bool](https://docs.python.org/3/library/functions.html#bool) #### term() → [None](https://docs.python.org/3/library/constants.html#None) #### get_curfunc() → func_t \* #### get_decomp_ranges() → decomp_ranges_t const & #### use_frame() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_snippet() → [bool](https://docs.python.org/3/library/functions.html#bool) #### set_maturity(mat: mba_maturity_t) → merror_t Set maturity level. * **Parameters:** **mat** – new maturity level * **Returns:** error code Plugins may use this function to skip some parts of the analysis. The maturity level cannot be decreased. #### optimize_local(locopt_bits: [int](https://docs.python.org/3/library/functions.html#int)) → [int](https://docs.python.org/3/library/functions.html#int) Optimize each basic block locally * **Parameters:** **locopt_bits** – 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. #### build_graph() → merror_t Build control flow graph. 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 #### get_graph() → mbl_graph_t \* Get control graph. Call build_graph() if you need the graph before MMAT_LOCOPT. #### analyze_calls(acflags: [int](https://docs.python.org/3/library/functions.html#int)) → [int](https://docs.python.org/3/library/functions.html#int) Analyze calls and determine calling conventions. * **Parameters:** **acflags** – permitted actions that are necessary for successful detection of calling conventions. See Bits for analyze_calls() * **Returns:** number of calls. -1 means error. #### optimize_global() → merror_t Optimize microcode globally. This function applies various optimization methods until we reach the fixed point. After that it preallocates lvars unless reqmat forbids it. * **Returns:** error code #### alloc_lvars() → [None](https://docs.python.org/3/library/constants.html#None) Allocate local variables. 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. #### dump() → [None](https://docs.python.org/3/library/constants.html#None) Dump microcode to a file. 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(\_verify: [bool](https://docs.python.org/3/library/functions.html#bool), title: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [None](https://docs.python.org/3/library/constants.html#None) #### verify(always: [bool](https://docs.python.org/3/library/functions.html#bool)) → [None](https://docs.python.org/3/library/constants.html#None) Verify microcode consistency. * **Parameters:** **always** – 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. #### mark_chains_dirty() → [None](https://docs.python.org/3/library/constants.html#None) Mark the microcode use-def chains dirty. 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. #### get_mblock(n: uint) → mblock_t \* Get basic block by its serial number. #### insert_block(bblk: [int](https://docs.python.org/3/library/functions.html#int)) → mblock_t \* Insert a block in the middle of the mbl array. 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** – the new block will be inserted before BBLK * **Returns:** ptr to the new block #### split_block(blk: [mblock_t](#ida_hexrays.mblock_t), start_insn: [minsn_t](#ida_hexrays.minsn_t)) → mblock_t \* Split a block: insert a new one after the block, move some instructions to new block * **Parameters:** * **blk** – block to be split * **start_insn** – all instructions to be moved to new block: starting with this one up to the end * **Returns:** ptr to the new block #### remove_block(blk: [mblock_t](#ida_hexrays.mblock_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Delete a block. * **Parameters:** **blk** – block to delete * **Returns:** true if at least one of the other blocks became empty or unreachable #### remove_blocks(start_blk: [int](https://docs.python.org/3/library/functions.html#int), end_blk: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### copy_block(blk: [mblock_t](#ida_hexrays.mblock_t), new_serial: [int](https://docs.python.org/3/library/functions.html#int), cpblk_flags: [int](https://docs.python.org/3/library/functions.html#int) = 3) → mblock_t \* Make a copy of a block. 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** – block to copy * **new_serial** – position of the copied block * **cpblk_flags** – combination of Batch decompilation bits … bits * **Returns:** pointer to the new copy #### remove_empty_and_unreachable_blocks() → [bool](https://docs.python.org/3/library/functions.html#bool) Delete all empty and unreachable blocks. Blocks marked with MBL_KEEP won’t be deleted. #### merge_blocks() → [bool](https://docs.python.org/3/library/functions.html#bool) Merge blocks. This function merges blocks constituting linear flow. It calls remove_empty_and_unreachable_blocks() as well. * **Returns:** true if changed any blocks #### for_all_ops(mv: [mop_visitor_t](#ida_hexrays.mop_visitor_t)) → [int](https://docs.python.org/3/library/functions.html#int) Visit all operands of all instructions. * **Parameters:** **mv** – operand visitor * **Returns:** non-zero value returned by mv.visit_mop() or zero #### for_all_insns(mv: [minsn_visitor_t](#ida_hexrays.minsn_visitor_t)) → [int](https://docs.python.org/3/library/functions.html#int) Visit all instructions. This function visits all instruction and subinstructions. * **Parameters:** **mv** – instruction visitor * **Returns:** non-zero value returned by mv.visit_mop() or zero #### for_all_topinsns(mv: [minsn_visitor_t](#ida_hexrays.minsn_visitor_t)) → [int](https://docs.python.org/3/library/functions.html#int) Visit all top level instructions. * **Parameters:** **mv** – instruction visitor * **Returns:** non-zero value returned by mv.visit_mop() or zero #### find_mop(ctx: [op_parent_info_t](#ida_hexrays.op_parent_info_t), ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), is_dest: [bool](https://docs.python.org/3/library/functions.html#bool), list: [mlist_t](#ida_hexrays.mlist_t)) → mop_t \* Find an operand in the microcode. This function tries to find the operand that matches LIST. Any operand that overlaps with LIST is considered as a match. * **Parameters:** * **ctx** – context information for the result * **ea** – desired address of the operand. BADADDR means to accept any address. * **is_dest** – search for destination operand? this argument may be ignored if the exact match could not be found * **list** – list of locations the correspond to the operand * **Returns:** pointer to the operand or nullptr. #### create_helper_call(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), helper: [str](https://docs.python.org/3/library/stdtypes.html#str), rettype: [tinfo_t](../ida_typeinf/index.md#ida_typeinf.tinfo_t) = None, callargs: [mcallargs_t](#ida_hexrays.mcallargs_t) = None, out: [mop_t](#ida_hexrays.mop_t) = None) → minsn_t \* Create a call of a helper function. * **Parameters:** * **ea** – The desired address of the instruction * **helper** – The helper name * **rettype** – The return type (nullptr or empty type means ‘void’) * **callargs** – The helper arguments (nullptr-no arguments) * **out** – 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 #### get_func_output_lists(\*args) → [None](https://docs.python.org/3/library/constants.html#None) Prepare the lists of registers & memory that are defined/killed by a function * **Parameters:** * **return_regs** – defined regs to return (eax,edx) * **spoiled** – spoiled regs (flags,ecx,mem) * **type** – the function type * **call_ea** – the call insn address (if known) * **tail_call** – is it the tail call? #### arg(\*args) → lvar_t const & This function has the following signatures: > 1. arg(n: int) -> lvar_t & > 2. arg(n: int) -> const lvar_t & # 0: arg(n: int) -> lvar_t & Get input argument of the decompiled function. # 1: arg(n: int) -> const lvar_t & #### alloc_fict_ea(real_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) Allocate a fictional address. 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** – real instruction address (BADADDR is ok too) * **Returns:** a unique fictional address #### map_fict_ea(fict_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) Resolve a fictional address. This function provides a reverse of the mapping made by alloc_fict_ea(). * **Parameters:** **fict_ea** – fictional definition address * **Returns:** the real instruction address #### get_std_region(idx: memreg_index_t) → ivl_t const & Get information about various memory regions. We map the stack frame to the global memory, to some unused range. #### get_lvars_region() → ivl_t const & #### get_shadow_region() → ivl_t const & #### get_args_region() → ivl_t const & #### get_stack_region() → [ivl_t](#ida_hexrays.ivl_t) #### get_numform(nf: [number_format_t](#ida_hexrays.number_format_t), loc: [operand_locator_t](#ida_hexrays.operand_locator_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Get the user-defined number format for an operand. * **Parameters:** * **nf** – output: receives the number format if one is set * **loc** – operand locator (insn ea + opnum) * **Returns:** true if a format was set and was copied to nf #### set_numform(loc: [operand_locator_t](#ida_hexrays.operand_locator_t), nf: [number_format_t](#ida_hexrays.number_format_t)) → [None](https://docs.python.org/3/library/constants.html#None) Set the user-defined number format for an operand. * **Parameters:** * **loc** – operand locator * **nf** – new format #### clr_numform(loc: [operand_locator_t](#ida_hexrays.operand_locator_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Clear the user-defined number format for an operand. * **Parameters:** **loc** – operand locator * **Returns:** true if a format was present and removed #### serialize() → [None](https://docs.python.org/3/library/constants.html#None) Serialize mbl array into a sequence of bytes. #### *static* deserialize(bytes: uchar const \*) → mba_t \* Deserialize a byte sequence into mbl array. * **Parameters:** **bytes** – pointer to the beginning of the byte sequence. * **Returns:** new mbl array #### save_snapshot(description: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [None](https://docs.python.org/3/library/constants.html#None) Create and save microcode snapshot. #### alloc_kreg(size: [int](https://docs.python.org/3/library/functions.html#int), check_size: [bool](https://docs.python.org/3/library/functions.html#bool) = True) → mreg_t Allocate a kernel register. * **Parameters:** * **size** – size of the register in bytes * **check_size** – if true, only the sizes that correspond to a size of a basic type will be accepted. * **Returns:** allocated register. mr_none means failure. #### free_kreg(reg: mreg_t, size: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) Free a kernel register. If wrong arguments are passed, this function will generate an internal error. * **Parameters:** * **reg** – a previously allocated kernel register * **size** – size of the register in bytes #### inline_func(cdg: [codegen_t](#ida_hexrays.codegen_t), blknum: [int](https://docs.python.org/3/library/functions.html#int), ranges: [mba_ranges_t](#ida_hexrays.mba_ranges_t), decomp_flags: [int](https://docs.python.org/3/library/functions.html#int) = 0, inline_flags: [int](https://docs.python.org/3/library/functions.html#int) = 0) → merror_t Inline a range. * **Parameters:** * **cdg** – the codegenerator object * **blknum** – the block contaning the call/jump instruction to inline * **ranges** – the set of ranges to inline. in the case of multiple calls to inline_func(), ranges will be compared using their start addresses. if two ranges have the same address, they will be considered the same. * **decomp_flags** – combination of decompile() flags bits * **inline_flags** – combination of inline_func() flags bits * **Returns:** error code #### inline_function(cdg: [codegen_t](#ida_hexrays.codegen_t), blknum: [int](https://docs.python.org/3/library/functions.html#int), ranges: [decomp_ranges_t](#ida_hexrays.decomp_ranges_t), decomp_flags: [int](https://docs.python.org/3/library/functions.html#int) = 0, inline_flags: [int](https://docs.python.org/3/library/functions.html#int) = 0) → merror_t Inline a range (ea-based variant). Replaces the deprecated inline_func() which accepts the legacy mba_ranges_t. This function may be called only during the initial microcode generation phase. * **Parameters:** * **cdg** – the codegenerator object * **blknum** – the block contaning the call/jump instruction to inline * **ranges** – the set of ranges to inline. in the case of multiple calls to inline_function(), ranges will be compared using their start addresses. if two ranges have the same address, they will be considered the same. * **decomp_flags** – combination of decompile() flags bits * **inline_flags** – combination of inline_func() flags bits * **Returns:** error code #### locate_stkpnt(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → stkpnt_t const \* #### add_user_minsn(uins: [user_minsn_t](#ida_hexrays.user_minsn_t), mmat: mba_maturity_t) → [None](https://docs.python.org/3/library/constants.html#None) Add a user-defined microinstruction action. * **Parameters:** * **uins** – user minsn to add (includes location, action, and instruction) * **mmat** – maturity level #### del_user_minsn(loc: [minsn_locator_t](#ida_hexrays.minsn_locator_t), action: user_minsn_action_t, mmat: mba_maturity_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Delete a user-defined microinstruction action. * **Parameters:** * **loc** – location of the target microinstruction * **action** – action type to delete (UMA_DEL, UMA_INS, or UMA_APP) * **mmat** – maturity level; * **Returns:** true if the action was found and deleted #### set_lvar_name(v: [lvar_t](#ida_hexrays.lvar_t), name: [str](https://docs.python.org/3/library/stdtypes.html#str), flagbits: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### set_nice_lvar_name(v: [lvar_t](#ida_hexrays.lvar_t), name: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### set_user_lvar_name(v: [lvar_t](#ida_hexrays.lvar_t), name: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### idb_node #### release() Free the underlying mba_t immediately. The object must not be used afterwards. ### ida_hexrays.MBA_PRCDEFS use precise defeas for chain-allocated lvars ### ida_hexrays.MBA_NOFUNC function is not present, addresses might be wrong ### ida_hexrays.MBA_PATTERN microcode pattern, callinfo is present ### ida_hexrays.MBA_LOADED loaded gdl, no instructions (debugging) ### ida_hexrays.MBA_RETFP function returns floating point value ### ida_hexrays.MBA_SPLINFO (final_type ? idb_spoiled : spoiled_regs) is valid ### ida_hexrays.MBA_PASSREGS has mcallinfo_t::pass_regs ### ida_hexrays.MBA_THUNK thunk function ### ida_hexrays.MBA_CMNSTK stkvars+stkargs should be considered as one area ### ida_hexrays.MBA_PREOPT preoptimization stage complete ### ida_hexrays.MBA_CMBBLK request to combine blocks ### ida_hexrays.MBA_ASRTOK assertions have been generated ### ida_hexrays.MBA_CALLS callinfo has been built ### ida_hexrays.MBA_ASRPROP assertion have been propagated ### ida_hexrays.MBA_SAVRST save-restore analysis has been performed ### ida_hexrays.MBA_RETREF return type has been refined ### ida_hexrays.MBA_GLBOPT microcode has been optimized globally ### ida_hexrays.MBA_LVARS0 lvar pre-allocation has been performed ### ida_hexrays.MBA_LVARS1 lvar real allocation has been performed ### ida_hexrays.MBA_DELPAIRS pairs have been deleted once ### ida_hexrays.MBA_CHVARS can verify chain varnums ### ida_hexrays.MBA_SHORT use short display ### ida_hexrays.MBA_COLGDL display graph after each reduction ### ida_hexrays.MBA_INSGDL display instruction in graphs ### ida_hexrays.MBA_NICE apply transformations to c code ### ida_hexrays.MBA_REFINE may refine return value size ### ida_hexrays.MBA_WINGR32 use wingraph32 (deprecated, see hexrays_config_t::use_external_graph) ### ida_hexrays.MBA_NUMADDR display definition addresses for numbers ### ida_hexrays.MBA_VALNUM display value numbers ### ida_hexrays.MBA_SHOWEA display EA in line prefix ### ida_hexrays.MBA_INITIAL_FLAGS ### ida_hexrays.MBA2_LVARNAMES_OK may verify lvar_names? ### ida_hexrays.MBA2_LVARS_RENAMED accept empty names now? ### ida_hexrays.MBA2_OVER_CHAINS has overlapped chains? ### ida_hexrays.MBA2_VALRNG_DONE calculated valranges? ### ida_hexrays.MBA2_IS_CTR is constructor? ### ida_hexrays.MBA2_IS_DTR is destructor? ### ida_hexrays.MBA2_ARGIDX_OK may verify input argument list? ### ida_hexrays.MBA2_NO_DUP_CALLS forbid multiple calls with the same ea ### ida_hexrays.MBA2_NO_DUP_LVARS forbid multiple lvars with the same ea ### ida_hexrays.MBA2_UNDEF_RETVAR return value is undefined ### ida_hexrays.MBA2_ARGIDX_SORTED args finally sorted according to ABI (e.g. reverse stkarg order in Borland) ### ida_hexrays.MBA2_CODE16_BIT the code16 bit got removed ### ida_hexrays.MBA2_STACK_RETVAL the return value (or its part) is on the stack ### ida_hexrays.MBA2_HAS_OUTLINES calls to outlined code have been inlined ### ida_hexrays.MBA2_NO_FRAME do not use function frame info (only snippet mode) ### ida_hexrays.MBA2_PROP_COMPLEX allow propagation of more complex variable definitions ### ida_hexrays.MBA2_DONT_VERIFY Do not verify microcode. This flag is recomended to be set only when debugging decompiler plugins ### ida_hexrays.MBA2_INITIAL_FLAGS ### ida_hexrays.MBA2_ALL_FLAGS ### ida_hexrays.NALT_VD this index is not used by ida ### ida_hexrays.LOCOPT_ALL redo optimization for all blocks. if this bit is not set, only dirty blocks will be optimized ### ida_hexrays.LOCOPT_REFINE refine return type, ok to fail ### ida_hexrays.LOCOPT_REFINE2 refine return type, try harder ### ida_hexrays.ACFL_LOCOPT perform local propagation (requires ACFL_BLKOPT) ### ida_hexrays.ACFL_BLKOPT perform interblock transformations ### ida_hexrays.ACFL_GLBPROP perform global propagation ### ida_hexrays.ACFL_GLBDEL perform dead code eliminition ### ida_hexrays.ACFL_GUESS may guess calling conventions ### ida_hexrays.CPBLK_FAST do not update minbstkref and minbargref ### ida_hexrays.CPBLK_MINREF update minbstkref and minbargref ### ida_hexrays.CPBLK_OPTJMP del the jump insn at the end of the block if it becomes useless ### ida_hexrays.INLINE_EXTFRAME Inlined function has its own (external) frame. ### ida_hexrays.INLINE_DONTCOPY Do not reuse old inlined copy even if it exists. ### ida_hexrays.INLINE_NORETADDR The inlining call does not push/consume a return address (e.g. an exception funclet spliced into the CFG). Do not reserve a return slot in the external subframe. ### *class* ida_hexrays.chain_keeper_t(\_gc: [graph_chains_t](#ida_hexrays.graph_chains_t)) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### front() → block_chains_t & #### back() → block_chains_t & #### for_all_chains(cv: [chain_visitor_t](#ida_hexrays.chain_visitor_t), gca: [int](https://docs.python.org/3/library/functions.html#int)) → [int](https://docs.python.org/3/library/functions.html#int) ### ida_hexrays.GC_REGS_AND_STKVARS registers and stkvars (restricted memory only) ### ida_hexrays.GC_ASR all the above and assertions ### ida_hexrays.GC_XDSU only registers calculated with FULL_XDSU ### ida_hexrays.GC_END number of chain types ### ida_hexrays.GC_DIRTY_ALL bitmask to represent all chains ### *class* ida_hexrays.mbl_graph_t(\*args, \*\*kwargs) Bases: [`simple_graph_t`](#ida_hexrays.simple_graph_t) #### thisown #### is_ud_chain_dirty(gctype: gctype_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Is the use-def chain of the specified kind dirty? #### is_du_chain_dirty(gctype: gctype_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Is the def-use chain of the specified kind dirty? #### get_chain_stamp() → [int](https://docs.python.org/3/library/functions.html#int) #### get_ud(gctype: gctype_t) → graph_chains_t \* Get use-def chains. #### get_du(gctype: gctype_t) → graph_chains_t \* Get def-use chains. #### is_redefined_globally(\*args) → [bool](https://docs.python.org/3/library/functions.html#bool) Is LIST redefined in the graph? #### is_used_globally(\*args) → [bool](https://docs.python.org/3/library/functions.html#bool) Is LIST used in the graph? #### get_mblock(n: [int](https://docs.python.org/3/library/functions.html#int)) → mblock_t \* ### *class* ida_hexrays.cdg_insn_iterator_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### mba *: mba_t const \** #### ea *: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)* #### end *: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)* #### dslot *: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)* #### dslot_insn *: [insn_t](../ida_ua/index.md#ida_ua.insn_t)* #### severed_branch *: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)* #### is_likely_dslot *: [bool](https://docs.python.org/3/library/functions.html#bool)* #### ok() → [bool](https://docs.python.org/3/library/functions.html#bool) #### has_dslot() → [bool](https://docs.python.org/3/library/functions.html#bool) #### dslot_with_xrefs() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_severed_dslot() → [bool](https://docs.python.org/3/library/functions.html#bool) #### start(rng: [range_t](../ida_range/index.md#ida_range.range_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### next(ins: insn_t \*) → merror_t ### *class* ida_hexrays.codegen_t(\*args, \*\*kwargs) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### mba *: mba_t \** #### mb *: mblock_t \** #### insn *: [insn_t](../ida_ua/index.md#ida_ua.insn_t)* #### ignore_micro *: [int](https://docs.python.org/3/library/functions.html#int)* #### ii *: [cdg_insn_iterator_t](#ida_hexrays.cdg_insn_iterator_t)* #### clear() → [None](https://docs.python.org/3/library/constants.html#None) #### analyze_prolog(fc: [qflow_chart_ea_t](../ida_gdl/index.md#ida_gdl.qflow_chart_ea_t), reachable: [bitset_t](#ida_hexrays.bitset_t)) → merror_t Analyze prolog/epilog of the function to decompile. If prolog is found, allocate and fill ‘mba->pi’ structure. * **Parameters:** * **fc** – flow chart * **reachable** – bitmap of reachable blocks * **Returns:** error code #### gen_micro() → merror_t Generate microcode for one instruction. The instruction is in INSN * **Returns:** MERR_OK - all ok MERR_BLOCK - all ok, need to switch to new block MERR_BADBLK - delete current block and continue other error codes are fatal #### load_operand(opnum: [int](https://docs.python.org/3/library/functions.html#int), flags: [int](https://docs.python.org/3/library/functions.html#int) = 0) → mreg_t Generate microcode to load one operand. * **Parameters:** * **opnum** – number of INSN operand * **flags** – reserved for future use * **Returns:** register containing the operand. #### microgen_completed() → [None](https://docs.python.org/3/library/constants.html#None) This method is called when the microcode generation is done. #### prepare_gen_micro() → merror_t Setup internal data to handle new instruction. This method should be called before calling gen_micro(). Usually gen_micro() is called by the decompiler. You have to call this function explicitly only if you yourself call gen_micro(). The instruction is in INSN * **Returns:** MERR_OK - all ok other error codes are fatal #### load_effective_address(n: [int](https://docs.python.org/3/library/functions.html#int), flags: [int](https://docs.python.org/3/library/functions.html#int) = 0) → mreg_t Generate microcode to calculate the address of a memory operand. * **Parameters:** * **n** – - number of INSN operand * **flags** – - reserved for future use * **Returns:** register containing the operand address. mr_none - failed (not a memory operand) #### store_operand(n: [int](https://docs.python.org/3/library/functions.html#int), mop: [mop_t](#ida_hexrays.mop_t), flags: [int](https://docs.python.org/3/library/functions.html#int) = 0) → Tuple[[bool](https://docs.python.org/3/library/functions.html#bool), [minsn_t](#ida_hexrays.minsn_t)] Generate microcode to store an operand. In case of success an arbitrary number of instructions can be generated (and even no instruction if the source and target are the same). * **Parameters:** * **n** – number of target insn operand * **mop** – operand to be stored * **flags** – reserved for future use * **Returns:** (success, outins) tuple. outins: the last generated instruction (None if no instruction was generated). #### emit_micro_mvm(code: mcode_t, dtype: op_dtype_t, l: [int](https://docs.python.org/3/library/functions.html#int), r: [int](https://docs.python.org/3/library/functions.html#int), d: [int](https://docs.python.org/3/library/functions.html#int), offsize: [int](https://docs.python.org/3/library/functions.html#int)) → minsn_t \* Emit one microinstruction. This variant takes a data type not a size. #### emit(\*args) → minsn_t \* This function has the following signatures: > 1. emit(code: mcode_t, width: int, l: int, r: int, d: int, offsize: int) -> minsn_t \* > 2. emit(code: mcode_t, l: const mop_t > ``` > * > ``` > , r: const mop_t > ``` > * > ``` > , d: const mop_t > ``` > * > ``` > ) -> minsn_t \* # 0: emit(code: mcode_t, width: int, l: int, r: int, d: int, offsize: int) -> minsn_t \* Emit one microinstruction. The L, R, D arguments usually mean the register number. However, they depend on CODE. For example: \* for m_goto and m_jcnd L is the target address \* for m_ldc L is the constant value to load * **Returns:** created microinstruction. can be nullptr if the instruction got immediately optimized away. # 1: emit(code: mcode_t, l: const mop_t ``` * ``` , r: const mop_t ``` * ``` , d: const mop_t ``` * ``` ) -> minsn_t \* Emit one microinstruction. This variant accepts pointers to operands. It is more difficult to use but permits to create virtually any instruction. Operands may be nullptr when it makes sense. The ownership of the operands is not transferred to the decompiler, so it is ok to destroy them after this call. ### ida_hexrays.change_hexrays_config(directive: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [bool](https://docs.python.org/3/library/functions.html#bool) Parse DIRECTIVE and update the current configuration variables. For the syntax see hexrays.cfg ### ida_hexrays.get_hexrays_version() → [str](https://docs.python.org/3/library/stdtypes.html#str) Get decompiler version. The returned string is of the form ... * **Returns:** pointer to version string. For example: “2.0.0.140605” ### ida_hexrays.OPF_REUSE reuse existing window ### ida_hexrays.OPF_NEW_WINDOW open new window ### ida_hexrays.OPF_REUSE_ACTIVE reuse existing window, only if the currently active widget is a pseudocode view ### ida_hexrays.OPF_NO_WAIT do not display waitbox if decompilation happens ### ida_hexrays.OPF_WINDOW_MGMT_MASK ### ida_hexrays.open_pseudocode(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), flags: [int](https://docs.python.org/3/library/functions.html#int)) → vdui_t \* Open pseudocode window. The specified function is decompiled and the pseudocode window is opened. * **Parameters:** * **ea** – function to decompile * **flags** – a combination of ``` OPF_ ``` flags * **Returns:** false if failed ### ida_hexrays.close_pseudocode(f: TWidget \*) → [bool](https://docs.python.org/3/library/functions.html#bool) Close pseudocode window. * **Parameters:** **f** – pointer to window * **Returns:** false if failed ### ida_hexrays.VDRUN_NEWFILE Create a new file or overwrite existing file. ### ida_hexrays.VDRUN_APPEND Create a new file or append to existing file. ### ida_hexrays.VDRUN_ONLYNEW Fail if output file already exists. ### ida_hexrays.VDRUN_SILENT Silent decompilation. ### ida_hexrays.VDRUN_SENDIDB Send problematic databases to hex-rays.com. ### ida_hexrays.VDRUN_MAYSTOP The user can cancel decompilation. ### ida_hexrays.VDRUN_CMDLINE Called from ida’s command line. ### ida_hexrays.VDRUN_STATS Print statistics into vd_stats.txt. ### ida_hexrays.VDRUN_LUMINA Use lumina server. ### ida_hexrays.VDRUN_PERF Print performance stats to ida.log. ### ida_hexrays.decompile_many(outfile: [str](https://docs.python.org/3/library/stdtypes.html#str), funcaddrs: [uint64vec_t](../ida_pro/index.md#ida_pro.uint64vec_t), flags: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) Batch decompilation. Decompile all or the specified functions * **Parameters:** * **outfile** – name of the output file * **funcaddrs** – list of functions to decompile. If nullptr or empty, then decompile all nonlib functions * **flags** – Batch decompilation bits * **Returns:** true if no internal error occurred and the user has not cancelled decompilation ### ida_hexrays.send_database(err: [hexrays_failure_t](#ida_hexrays.hexrays_failure_t), silent: [bool](https://docs.python.org/3/library/functions.html#bool)) → [None](https://docs.python.org/3/library/constants.html#None) Send the database to Hex-Rays. This function sends the current database to the Hex-Rays server. The database is sent in the compressed form over an encrypted (SSL) connection. * **Parameters:** * **err** – failure description object. Empty hexrays_failure_t object can be used if error information is not available. * **silent** – if false, a dialog box will be displayed before sending the database. ### *class* ida_hexrays.gco_info_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* register or stkvar name #### stkoff *: [int](https://docs.python.org/3/library/functions.html#int)* if stkvar, stack offset #### regnum *: [int](https://docs.python.org/3/library/functions.html#int)* if register, the register id #### size *: [int](https://docs.python.org/3/library/functions.html#int)* operand size #### flags *: [int](https://docs.python.org/3/library/functions.html#int)* #### is_reg() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_use() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_def() → [bool](https://docs.python.org/3/library/functions.html#bool) #### append_to_list(list: [mlist_t](#ida_hexrays.mlist_t), mba: [mba_t](#ida_hexrays.mba_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Append operand info to LIST. This function converts IDA register number or stack offset to a decompiler list. * **Parameters:** * **list** – list to append to * **mba** – microcode object #### cvt_to_ivl() → [vivl_t](#ida_hexrays.vivl_t) Convert operand info to VIVL. The returned VIVL can be used, for example, in a call of get_valranges(). ### ida_hexrays.GCO_STK a stack variable ### ida_hexrays.GCO_REG is register? otherwise a stack variable ### ida_hexrays.GCO_USE is source operand? ### ida_hexrays.GCO_DEF is destination operand? ### ida_hexrays.get_current_operand(out: [gco_info_t](#ida_hexrays.gco_info_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Get the instruction operand under the cursor. This function determines the operand that is under the cursor in the active disassembly listing. If the operand refers to a register or stack variable, it returns true. ### ida_hexrays.remitem(e: [citem_t](#ida_hexrays.citem_t)) → [None](https://docs.python.org/3/library/constants.html#None) ### ida_hexrays.cot_empty ### ida_hexrays.cot_comma x, y ### ida_hexrays.cot_asg x = y ### ida_hexrays.cot_asgbor x ``` | ``` = y ### ida_hexrays.cot_asgxor x ^= y ### ida_hexrays.cot_asgband x &= y ### ida_hexrays.cot_asgadd x += y ### ida_hexrays.cot_asgsub x -= y ### ida_hexrays.cot_asgmul x ``` * ``` = y ### ida_hexrays.cot_asgsshr x >>= y signed ### ida_hexrays.cot_asgushr x >>= y unsigned ### ida_hexrays.cot_asgshl x <<= y ### ida_hexrays.cot_asgsdiv x /= y signed ### ida_hexrays.cot_asgudiv x /= y unsigned ### ida_hexrays.cot_asgsmod x %= y signed ### ida_hexrays.cot_asgumod x %= y unsigned ### ida_hexrays.cot_tern x ? y : z ### ida_hexrays.cot_lor x || y ### ida_hexrays.cot_land x && y ### ida_hexrays.cot_bor x | y ### ida_hexrays.cot_xor x ^ y ### ida_hexrays.cot_band x & y ### ida_hexrays.cot_eq x == y int or fpu (see EXFL_FPOP) ### ida_hexrays.cot_ne x != y int or fpu (see EXFL_FPOP) ### ida_hexrays.cot_sge x >= y signed or fpu (see EXFL_FPOP) ### ida_hexrays.cot_uge x >= y unsigned ### ida_hexrays.cot_sle x <= y signed or fpu (see EXFL_FPOP) ### ida_hexrays.cot_ule x <= y unsigned ### ida_hexrays.cot_sgt x > y signed or fpu (see EXFL_FPOP) ### ida_hexrays.cot_ugt x > y unsigned ### ida_hexrays.cot_slt x < y signed or fpu (see EXFL_FPOP) ### ida_hexrays.cot_ult x < y unsigned ### ida_hexrays.cot_sshr x >> y signed ### ida_hexrays.cot_ushr x >> y unsigned ### ida_hexrays.cot_shl x << y ### ida_hexrays.cot_add x + y ### ida_hexrays.cot_sub x - y ### ida_hexrays.cot_mul x \* y ### ida_hexrays.cot_sdiv x / y signed ### ida_hexrays.cot_udiv x / y unsigned ### ida_hexrays.cot_smod x % y signed ### ida_hexrays.cot_umod x % y unsigned ### ida_hexrays.cot_fadd x + y fp ### ida_hexrays.cot_fsub x - y fp ### ida_hexrays.cot_fmul x \* y fp ### ida_hexrays.cot_fdiv x / y fp ### ida_hexrays.cot_fneg -x fp ### ida_hexrays.cot_neg -x ### ida_hexrays.cot_cast (type)x ### ida_hexrays.cot_lnot !x ### ida_hexrays.cot_bnot ~x ### ida_hexrays.cot_ptr ``` * ``` x, access size in ‘ptrsize’ ### ida_hexrays.cot_ref &x ### ida_hexrays.cot_postinc x++ ### ida_hexrays.cot_postdec x- ### ida_hexrays.cot_preinc ++x ### ida_hexrays.cot_predec -x ### ida_hexrays.cot_call x(…) ### ida_hexrays.cot_idx x[y] ### ida_hexrays.cot_memref x.m ### ida_hexrays.cot_memptr x->m, access size in ‘ptrsize’ ### ida_hexrays.cot_num n ### ida_hexrays.cot_fnum fpc ### ida_hexrays.cot_str string constant (user representation) ### ida_hexrays.cot_obj obj_ea ### ida_hexrays.cot_var v ### ida_hexrays.cot_insn instruction in expression, internal representation only ### ida_hexrays.cot_sizeof sizeof(x) ### ida_hexrays.cot_helper arbitrary name ### ida_hexrays.cot_type arbitrary type ### ida_hexrays.cot_last ### ida_hexrays.cit_empty instruction types start here ### ida_hexrays.cit_block block-statement: { … } ### ida_hexrays.cit_expr expression-statement: expr; ### ida_hexrays.cit_if if-statement ### ida_hexrays.cit_for for-statement ### ida_hexrays.cit_while while-statement ### ida_hexrays.cit_do do-statement ### ida_hexrays.cit_switch switch-statement ### ida_hexrays.cit_break break-statement ### ida_hexrays.cit_continue continue-statement ### ida_hexrays.cit_return return-statement ### ida_hexrays.cit_goto goto-statement ### ida_hexrays.cit_asm asm-statement ### ida_hexrays.cit_try C++ try-statement. ### ida_hexrays.cit_throw C++ throw-statement. ### ida_hexrays.cit_end ### ida_hexrays.negated_relation(op: ctype_t) → ctype_t Negate a comparison operator. For example, cot_sge becomes cot_slt. ### ida_hexrays.swapped_relation(op: ctype_t) → ctype_t Swap a comparison operator. For example, cot_sge becomes cot_sle. ### ida_hexrays.get_op_signness(op: ctype_t) → type_sign_t Get operator sign. Meaningful for sign-dependent operators, like cot_sdiv. ### ida_hexrays.asgop(cop: ctype_t) → ctype_t Convert plain operator into assignment operator. For example, cot_add returns cot_asgadd. ### ida_hexrays.asgop_revert(cop: ctype_t) → ctype_t Convert assignment operator into plain operator. For example, cot_asgadd returns cot_add * **Returns:** cot_empty is the input operator is not an assignment operator. ### ida_hexrays.op_uses_x(op: ctype_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Does operator use the ‘x’ field of cexpr_t? ### ida_hexrays.op_uses_y(op: ctype_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Does operator use the ‘y’ field of cexpr_t? ### ida_hexrays.op_uses_z(op: ctype_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Does operator use the ‘z’ field of cexpr_t? ### ida_hexrays.is_binary(op: ctype_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Is binary operator? ### ida_hexrays.is_unary(op: ctype_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Is unary operator? ### ida_hexrays.is_relational(op: ctype_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Is comparison operator? ### ida_hexrays.is_assignment(op: ctype_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Is assignment operator? ### ida_hexrays.accepts_udts(op: ctype_t) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_hexrays.is_prepost(op: ctype_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Is pre/post increment/decrement operator? ### ida_hexrays.is_commutative(op: ctype_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Is commutative operator? ### ida_hexrays.is_additive(op: ctype_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Is additive operator? ### ida_hexrays.is_multiplicative(op: ctype_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Is multiplicative operator? ### ida_hexrays.is_bitop(op: ctype_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Is bit related operator? ### ida_hexrays.is_logical(op: ctype_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Is logical operator? ### ida_hexrays.is_loop(op: ctype_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Is loop statement code? ### ida_hexrays.is_break_consumer(op: ctype_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Does a break statement influence the specified statement code? ### ida_hexrays.is_lvalue(op: ctype_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Is Lvalue operator? ### ida_hexrays.accepts_small_udts(op: ctype_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Is the operator allowed on small structure or union? ### *class* ida_hexrays.cnumber_t(\_opnum: [int](https://docs.python.org/3/library/functions.html#int) = 0) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### nf *: [number_format_t](#ida_hexrays.number_format_t)* how to represent it #### value(type: [tinfo_t](../ida_typeinf/index.md#ida_typeinf.tinfo_t)) → uint64 Get value. This function will properly extend the number sign to 64bits depending on the type sign. #### assign(v: uint64, nbytes: [int](https://docs.python.org/3/library/functions.html#int), sign: type_sign_t) → [None](https://docs.python.org/3/library/constants.html#None) Assign new value * **Parameters:** * **v** – new value * **nbytes** – size of the new value in bytes * **sign** – sign of the value #### compare(r: [cnumber_t](#ida_hexrays.cnumber_t)) → [int](https://docs.python.org/3/library/functions.html#int) ### *class* ida_hexrays.var_ref_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### mba *: mba_t \** pointer to the underlying micro array #### idx *: [int](https://docs.python.org/3/library/functions.html#int)* index into lvars_t #### getv() → lvar_t & #### compare(r: [var_ref_t](#ida_hexrays.var_ref_t)) → [int](https://docs.python.org/3/library/functions.html#int) ### ida_hexrays.CMAT_ZERO does not exist ### ida_hexrays.CMAT_BUILT just generated ### ida_hexrays.CMAT_TRANS1 applied first wave of transformations ### ida_hexrays.CMAT_NICE nicefied expressions ### ida_hexrays.CMAT_TRANS2 applied second wave of transformations ### ida_hexrays.CMAT_CPA corrected pointer arithmetic ### ida_hexrays.CMAT_TRANS3 applied third wave of transformations ### ida_hexrays.CMAT_CASTED added necessary casts ### ida_hexrays.CMAT_FINAL ready-to-use ### ida_hexrays.ITP_EMPTY nothing ### ida_hexrays.ITP_ARG1 , (64 entries are reserved for 64 call arguments) ### ida_hexrays.ITP_ARG64 ### ida_hexrays.ITP_BRACE1 ### ida_hexrays.ITP_INNER_LAST ### ida_hexrays.ITP_ASM \_\_asm-line ### ida_hexrays.ITP_ELSE else-line ### ida_hexrays.ITP_DO do-line ### ida_hexrays.ITP_SEMI semicolon ### ida_hexrays.ITP_CURLY1 { ### ida_hexrays.ITP_CURLY2 } ### ida_hexrays.ITP_BRACE2 ) ### ida_hexrays.ITP_COLON : (label) ### ida_hexrays.ITP_BLOCK1 opening block comment. this comment is printed before the item (other comments are indented and printed after the item) ### ida_hexrays.ITP_BLOCK2 closing block comment. ### ida_hexrays.ITP_TRY C++ try statement. ### ida_hexrays.ITP_CASE bit for switch cases ### ida_hexrays.ITP_SIGN if this bit is set too, then we have a negative case value ### *class* ida_hexrays.treeloc_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### ea *: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)* #### itp *: item_preciser_t* ### ida_hexrays.RETRIEVE_ONCE Retrieve comment if it has not been used yet. ### ida_hexrays.RETRIEVE_ALWAYS Retrieve comment even if it has been used. ### *class* ida_hexrays.citem_cmt_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### used *: [bool](https://docs.python.org/3/library/functions.html#bool)* the comment has been retrieved? #### c_str() → [str](https://docs.python.org/3/library/stdtypes.html#str) ### *class* ida_hexrays.citem_locator_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### ea *: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)* citem address #### op *: ctype_t* citem operation #### compare(r: [citem_locator_t](#ida_hexrays.citem_locator_t)) → [int](https://docs.python.org/3/library/functions.html#int) ### *class* ida_hexrays.bit_bound_t(n: [int](https://docs.python.org/3/library/functions.html#int) = 0, s: [int](https://docs.python.org/3/library/functions.html#int) = 0) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### nbits *: int16* #### sbits *: int16* ### *class* ida_hexrays.citem_t(o: ctype_t = cot_empty) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### ea *: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)* address that corresponds to the item. may be BADADDR #### label_num *: [int](https://docs.python.org/3/library/functions.html#int)* label number. -1 means no label. items of the expression types ( ``` cot_ ``` …) should not have labels at the final maturity level, but at the intermediate levels any ctree item may have a label. Labels must be unique. Usually they correspond to the basic block numbers. #### index *: [int](https://docs.python.org/3/library/functions.html#int)* an index in cfunc_t::treeitems. meaningful only after print_func() #### swap(r: [citem_t](#ida_hexrays.citem_t)) → [None](https://docs.python.org/3/library/constants.html#None) Swap two citem_t. #### is_expr() → [bool](https://docs.python.org/3/library/functions.html#bool) Is an expression? #### contains_expr(e: [cexpr_t](#ida_hexrays.cexpr_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Does the item contain an expression? #### contains_label() → [bool](https://docs.python.org/3/library/functions.html#bool) Does the item contain a label? #### find_parent_of(item: [citem_t](#ida_hexrays.citem_t)) → citem_t \* Find parent of the specified item. * **Parameters:** **item** – Item to find the parent of. The search will be performed among the children of the item pointed by this. * **Returns:** nullptr if not found #### find_closest_addr(\_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → citem_t \* #### print1(func: [cfunc_t](#ida_hexrays.cfunc_t)) → [str](https://docs.python.org/3/library/stdtypes.html#str) Print item into one line. * **Parameters:** **func** – parent function. This argument is used to find out the referenced variable names. * **Returns:** length of the generated text. #### cinsn *: cinsn_t \*const* #### cexpr *: cexpr_t \*const* #### op item type #### obj_id #### replace_by(o) #### meminfo ### *class* ida_hexrays.cexpr_t(\*args) Bases: [`citem_t`](#ida_hexrays.citem_t) #### thisown #### type *: [tinfo_t](../ida_typeinf/index.md#ida_typeinf.tinfo_t)* expression type. must be carefully maintained #### exflags *: [int](https://docs.python.org/3/library/functions.html#int)* Expression attributes #### cpadone() → [bool](https://docs.python.org/3/library/functions.html#bool) Pointer arithmetic correction done for this expression? #### is_odd_lvalue() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_fpop() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_cstr() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_undef_val() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_jumpout() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_vftable() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_user_cast() → [bool](https://docs.python.org/3/library/functions.html#bool) #### set_cpadone() → [None](https://docs.python.org/3/library/constants.html#None) #### set_vftable() → [None](https://docs.python.org/3/library/constants.html#None) #### set_user_cast() → [None](https://docs.python.org/3/library/constants.html#None) #### swap(r: [cexpr_t](#ida_hexrays.cexpr_t)) → [None](https://docs.python.org/3/library/constants.html#None) Swap two citem_t. #### assign(r: [cexpr_t](#ida_hexrays.cexpr_t)) → cexpr_t & #### compare(r: [cexpr_t](#ida_hexrays.cexpr_t)) → [int](https://docs.python.org/3/library/functions.html#int) #### cleanup() → [None](https://docs.python.org/3/library/constants.html#None) Cleanup the expression. This function properly deletes all children and sets the item type to cot_empty. #### put_number(\*args) → [None](https://docs.python.org/3/library/constants.html#None) Assign a number to the expression. * **Parameters:** * **func** – current function * **value** – number value * **nbytes** – size of the number in bytes * **sign** – number sign #### print1(func: [cfunc_t](#ida_hexrays.cfunc_t)) → [str](https://docs.python.org/3/library/stdtypes.html#str) Print expression into one line. * **Parameters:** **func** – parent function. This argument is used to find out the referenced variable names. #### calc_type(recursive: [bool](https://docs.python.org/3/library/functions.html#bool)) → [None](https://docs.python.org/3/library/constants.html#None) Calculate the type of the expression. Use this function to calculate the expression type when a new expression is built * **Parameters:** **recursive** – if true, types of all children expression will be calculated before calculating our type #### equal_effect(r: [cexpr_t](#ida_hexrays.cexpr_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Compare two expressions. This function tries to compare two expressions in an ‘intelligent’ manner. For example, it knows about commutitive operators and can ignore useless casts. * **Parameters:** **r** – the expression to compare against the current expression * **Returns:** true expressions can be considered equal #### is_child_of(parent: [citem_t](#ida_hexrays.citem_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Verify if the specified item is our parent. * **Parameters:** **parent** – possible parent item * **Returns:** true if the specified item is our parent #### contains_operator(needed_op: ctype_t, times: [int](https://docs.python.org/3/library/functions.html#int) = 1) → [bool](https://docs.python.org/3/library/functions.html#bool) Check if the expression contains the specified operator. * **Parameters:** * **needed_op** – operator code to search for * **times** – how many times the operator code should be present * **Returns:** true if the expression has at least TIMES children with NEEDED_OP #### contains_comma(times: [int](https://docs.python.org/3/library/functions.html#int) = 1) → [bool](https://docs.python.org/3/library/functions.html#bool) Does the expression contain a comma operator? #### contains_insn(times: [int](https://docs.python.org/3/library/functions.html#int) = 1) → [bool](https://docs.python.org/3/library/functions.html#bool) Does the expression contain an embedded statement operator? #### contains_insn_or_label() → [bool](https://docs.python.org/3/library/functions.html#bool) Does the expression contain an embedded statement operator or a label? #### contains_comma_or_insn_or_label(maxcommas: [int](https://docs.python.org/3/library/functions.html#int) = 1) → [bool](https://docs.python.org/3/library/functions.html#bool) Does the expression contain a comma operator or an embedded statement operator or a label? #### is_nice_expr() → [bool](https://docs.python.org/3/library/functions.html#bool) Is nice expression? Nice expressions do not contain comma operators, embedded statements, or labels. #### is_nice_cond() → [bool](https://docs.python.org/3/library/functions.html#bool) Is nice condition?. Nice condition is a nice expression of the boolean type. #### is_call_object_of(parent: [citem_t](#ida_hexrays.citem_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Is call object? * **Returns:** true if our expression is the call object of the specified parent expression. #### is_call_arg_of(parent: [citem_t](#ida_hexrays.citem_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Is call argument? * **Returns:** true if our expression is a call argument of the specified parent expression. #### get_type_sign() → type_sign_t Get expression sign. #### is_type_unsigned() → [bool](https://docs.python.org/3/library/functions.html#bool) Is expression unsigned? #### is_type_signed() → [bool](https://docs.python.org/3/library/functions.html#bool) Is expression signed? #### get_high_nbit_bound() → [bit_bound_t](#ida_hexrays.bit_bound_t) Get max number of bits that can really be used by the expression. For example, x % 16 can yield only 4 non-zero bits, higher bits are zero #### get_low_nbit_bound() → [int](https://docs.python.org/3/library/functions.html#int) Get min number of bits that are certainly required to represent the expression. For example, constant 16 always uses 5 bits: 10000. #### requires_lvalue(child: [cexpr_t](#ida_hexrays.cexpr_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Check if the expression requires an lvalue. * **Parameters:** **child** – The function will check if this child of our expression must be an lvalue. * **Returns:** true if child must be an lvalue. #### has_side_effects() → [bool](https://docs.python.org/3/library/functions.html#bool) Check if the expression has side effects. Calls, pre/post inc/dec, and assignments have side effects. #### numval() → uint64 Get numeric value of the expression. This function can be called only on cot_num expressions! #### is_const_value(\_v: uint64) → [bool](https://docs.python.org/3/library/functions.html#bool) Check if the expression is a number with the specified value. #### is_negative_const() → [bool](https://docs.python.org/3/library/functions.html#bool) Check if the expression is a negative number. #### is_non_negative_const() → [bool](https://docs.python.org/3/library/functions.html#bool) Check if the expression is a non-negative number. #### is_non_zero_const() → [bool](https://docs.python.org/3/library/functions.html#bool) Check if the expression is a non-zero number. #### is_zero_const() → [bool](https://docs.python.org/3/library/functions.html#bool) Check if the expression is a zero. #### get_const_value() → [bool](https://docs.python.org/3/library/functions.html#bool) Get expression value. * **Returns:** true if the expression is a number. #### maybe_ptr() → [bool](https://docs.python.org/3/library/functions.html#bool) May the expression be a pointer? #### get_ptr_or_array() → cexpr_t \* Find pointer or array child. #### find_op(\_op: ctype_t) → cexpr_t \* Find the child with the specified operator. #### find_num_op() → cexpr_t \* Find the operand with a numeric value. #### theother(what: [cexpr_t](#ida_hexrays.cexpr_t)) → cexpr_t \* Get the other operand. This function returns the other operand (not the specified one) for binary expressions. #### get_1num_op(o1: cexpr_t \*\*, o2: cexpr_t \*\*) → [bool](https://docs.python.org/3/library/functions.html#bool) Get pointers to operands. at last one operand should be a number o1 will be pointer to the number #### dstr() → [str](https://docs.python.org/3/library/stdtypes.html#str) #### get_v() → var_ref_t \* #### set_v(v: [var_ref_t](#ida_hexrays.var_ref_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### v used for cot_var #### *property* n #### *property* fpc #### *property* x #### *property* y #### *property* z #### *property* a #### *property* insn #### *property* m #### *property* ptrsize #### *property* obj_ea #### *property* refwidth #### *property* helper #### *property* string ### ida_hexrays.EXFL_CPADONE pointer arithmetic correction done ### ida_hexrays.EXFL_LVALUE expression is lvalue even if it doesn’t look like it ### ida_hexrays.EXFL_FPOP floating point operation ### ida_hexrays.EXFL_ALONE standalone helper ### ida_hexrays.EXFL_CSTR string literal ### ida_hexrays.EXFL_PARTIAL type of the expression is considered partial ### ida_hexrays.EXFL_UNDEF expression uses undefined value ### ida_hexrays.EXFL_JUMPOUT jump out-of-function ### ida_hexrays.EXFL_VFTABLE is ptr to vftable (used for cot_memptr, cot_memref) ### ida_hexrays.EXFL_UCAST user-defined cast, not to be removed by CPA ### ida_hexrays.EXFL_ALL all currently defined bits ### *class* ida_hexrays.ceinsn_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### expr *: [cexpr_t](#ida_hexrays.cexpr_t)* Expression of the statement. ### ida_hexrays.CALC_CURLY_BRACES print curly braces if necessary ### ida_hexrays.NO_CURLY_BRACES don’t print curly braces ### ida_hexrays.USE_CURLY_BRACES print curly braces without any checks ### *class* ida_hexrays.cif_t(\*args) Bases: [`ceinsn_t`](#ida_hexrays.ceinsn_t) #### thisown #### assign(r: [cif_t](#ida_hexrays.cif_t)) → cif_t & #### compare(r: [cif_t](#ida_hexrays.cif_t)) → [int](https://docs.python.org/3/library/functions.html#int) #### cleanup() → [None](https://docs.python.org/3/library/constants.html#None) #### *property* ithen #### *property* ielse ### *class* ida_hexrays.cloop_t(\*args) Bases: [`ceinsn_t`](#ida_hexrays.ceinsn_t) #### thisown #### assign(r: [cloop_t](#ida_hexrays.cloop_t)) → cloop_t & #### cleanup() → [None](https://docs.python.org/3/library/constants.html#None) #### *property* body ### *class* ida_hexrays.cfor_t Bases: [`cloop_t`](#ida_hexrays.cloop_t) #### thisown #### init *: [cexpr_t](#ida_hexrays.cexpr_t)* Initialization expression. #### step *: [cexpr_t](#ida_hexrays.cexpr_t)* Step expression. #### compare(r: [cfor_t](#ida_hexrays.cfor_t)) → [int](https://docs.python.org/3/library/functions.html#int) ### *class* ida_hexrays.cwhile_t Bases: [`cloop_t`](#ida_hexrays.cloop_t) #### thisown #### compare(r: [cwhile_t](#ida_hexrays.cwhile_t)) → [int](https://docs.python.org/3/library/functions.html#int) ### *class* ida_hexrays.cdo_t Bases: [`cloop_t`](#ida_hexrays.cloop_t) #### thisown #### compare(r: [cdo_t](#ida_hexrays.cdo_t)) → [int](https://docs.python.org/3/library/functions.html#int) ### *class* ida_hexrays.creturn_t Bases: [`ceinsn_t`](#ida_hexrays.ceinsn_t) #### thisown #### compare(r: [creturn_t](#ida_hexrays.creturn_t)) → [int](https://docs.python.org/3/library/functions.html#int) ### *class* ida_hexrays.cgoto_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### label_num *: [int](https://docs.python.org/3/library/functions.html#int)* Target label number. #### compare(r: [cgoto_t](#ida_hexrays.cgoto_t)) → [int](https://docs.python.org/3/library/functions.html#int) ### *class* ida_hexrays.casm_t(\*args) Bases: [`ida_pro.eavec_t`](../ida_pro/index.md#ida_pro.eavec_t) #### thisown #### compare(r: [casm_t](#ida_hexrays.casm_t)) → [int](https://docs.python.org/3/library/functions.html#int) #### one_insn() → [bool](https://docs.python.org/3/library/functions.html#bool) ### *class* ida_hexrays.cinsn_t(\*args) Bases: [`citem_t`](#ida_hexrays.citem_t) #### thisown #### ctry *: ctry_t \** details of try-statement #### cthrow *: cthrow_t \** details of throw-statement #### swap(r: [cinsn_t](#ida_hexrays.cinsn_t)) → [None](https://docs.python.org/3/library/constants.html#None) Swap two citem_t. #### assign(r: [cinsn_t](#ida_hexrays.cinsn_t)) → cinsn_t & #### compare(r: [cinsn_t](#ida_hexrays.cinsn_t)) → [int](https://docs.python.org/3/library/functions.html#int) #### cleanup() → [None](https://docs.python.org/3/library/constants.html#None) Cleanup the statement. This function properly deletes all children and sets the item type to cit_empty. #### zero() → [None](https://docs.python.org/3/library/constants.html#None) Overwrite with zeroes without cleaning memory or deleting children. #### new_insn(insn_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → cinsn_t & Create a new statement. The current statement must be a block. The new statement will be appended to it. * **Parameters:** **insn_ea** – statement address #### create_if(cnd: [cexpr_t](#ida_hexrays.cexpr_t)) → cif_t & Create a new if-statement. The current statement must be a block. The new statement will be appended to it. * **Parameters:** **cnd** – if condition. It will be deleted after being copied. #### print1(func: [cfunc_t](#ida_hexrays.cfunc_t)) → [str](https://docs.python.org/3/library/stdtypes.html#str) Print the statement into one line. Currently this function is not available. * **Parameters:** **func** – parent function. This argument is used to find out the referenced variable names. #### is_ordinary_flow() → [bool](https://docs.python.org/3/library/functions.html#bool) Check if the statement passes execution to the next statement. * **Returns:** false if the statement breaks the control flow (like goto, return, etc) #### contains_insn(type: ctype_t, times: [int](https://docs.python.org/3/library/functions.html#int) = 1) → [bool](https://docs.python.org/3/library/functions.html#bool) Check if the statement contains a statement of the specified type. * **Parameters:** * **type** – statement opcode to look for * **times** – how many times TYPE should be present * **Returns:** true if the statement has at least TIMES children with opcode == TYPE #### collect_free_breaks(breaks: [cinsnptrvec_t](#ida_hexrays.cinsnptrvec_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Collect free break statements. This function finds all free break statements within the current statement. A break statement is free if it does not have a loop or switch parent that that is also within the current statement. * **Parameters:** **breaks** – pointer to the variable where the vector of all found free break statements is returned. This argument can be nullptr. * **Returns:** true if some free break statements have been found #### collect_free_continues(continues: [cinsnptrvec_t](#ida_hexrays.cinsnptrvec_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Collect free continue statements. This function finds all free continue statements within the current statement. A continue statement is free if it does not have a loop parent that that is also within the current statement. * **Parameters:** **continues** – pointer to the variable where the vector of all found free continue statements is returned. This argument can be nullptr. * **Returns:** true if some free continue statements have been found #### contains_free_break() → [bool](https://docs.python.org/3/library/functions.html#bool) Check if the statement has free break statements. #### contains_free_continue() → [bool](https://docs.python.org/3/library/functions.html#bool) Check if the statement has free continue statements. #### dstr() → [str](https://docs.python.org/3/library/stdtypes.html#str) #### *static* insn_is_epilog(insn: [cinsn_t](#ida_hexrays.cinsn_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_epilog() #### *property* cblock #### *property* cexpr #### *property* cif #### *property* cfor #### *property* cwhile #### *property* cdo #### *property* cswitch #### *property* creturn #### *property* cgoto #### *property* casm ### *class* ida_hexrays.cblock_t Bases: [`cinsn_list_t`](#ida_hexrays.cinsn_list_t) #### thisown #### compare(r: [cblock_t](#ida_hexrays.cblock_t)) → [int](https://docs.python.org/3/library/functions.html#int) #### is_ordinary_flow() → [bool](https://docs.python.org/3/library/functions.html#bool) ### *class* ida_hexrays.carg_t Bases: [`cexpr_t`](#ida_hexrays.cexpr_t) #### thisown #### is_vararg *: [bool](https://docs.python.org/3/library/functions.html#bool)* is a vararg (matches …) #### formal_type *: [tinfo_t](../ida_typeinf/index.md#ida_typeinf.tinfo_t)* formal parameter type (if known) #### consume_cexpr(e: [cexpr_t](#ida_hexrays.cexpr_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### compare(r: [carg_t](#ida_hexrays.carg_t)) → [int](https://docs.python.org/3/library/functions.html#int) ### *class* ida_hexrays.carglist_t(\*args) Bases: [`qvector_carg_t`](#ida_hexrays.qvector_carg_t) #### thisown #### functype *: [tinfo_t](../ida_typeinf/index.md#ida_typeinf.tinfo_t)* function object type #### flags *: [int](https://docs.python.org/3/library/functions.html#int)* call flags #### role *: funcrole_t* function role (propagated from microcode) #### compare(r: [carglist_t](#ida_hexrays.carglist_t)) → [int](https://docs.python.org/3/library/functions.html#int) ### ida_hexrays.CFL_FINAL call type is final, should not be changed ### ida_hexrays.CFL_HELPER created from a decompiler helper function ### ida_hexrays.CFL_NORET call does not return ### *class* ida_hexrays.ccase_t Bases: [`cinsn_t`](#ida_hexrays.cinsn_t) #### thisown #### values *: [uint64vec_t](../ida_pro/index.md#ida_pro.uint64vec_t)* List of case values. if empty, then ‘default’ case #### compare(r: [ccase_t](#ida_hexrays.ccase_t)) → [int](https://docs.python.org/3/library/functions.html#int) #### size() → [int](https://docs.python.org/3/library/functions.html#int) #### value(i: [int](https://docs.python.org/3/library/functions.html#int)) → uint64 const & ### *class* ida_hexrays.ccases_t Bases: [`qvector_ccase_t`](#ida_hexrays.qvector_ccase_t) #### thisown #### compare(r: [ccases_t](#ida_hexrays.ccases_t)) → [int](https://docs.python.org/3/library/functions.html#int) ### *class* ida_hexrays.cswitch_t Bases: [`ceinsn_t`](#ida_hexrays.ceinsn_t) #### thisown #### mvnf *: [cnumber_t](#ida_hexrays.cnumber_t)* Maximal switch value and number format. #### cases *: [ccases_t](#ida_hexrays.ccases_t)* Switch cases: values and instructions. #### compare(r: [cswitch_t](#ida_hexrays.cswitch_t)) → [int](https://docs.python.org/3/library/functions.html#int) ### *class* ida_hexrays.catchexpr_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### obj *: [cexpr_t](#ida_hexrays.cexpr_t)* the caught object. if obj.op==cot_empty, no object. ideally, obj.op==cot_var #### fake_type *: [str](https://docs.python.org/3/library/stdtypes.html#str)* if not empty, type of the caught object. ideally, obj.type should be enough. however, in some cases the detailed type info is not available. #### compare(r: [catchexpr_t](#ida_hexrays.catchexpr_t)) → [int](https://docs.python.org/3/library/functions.html#int) #### swap(r: [catchexpr_t](#ida_hexrays.catchexpr_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### is_finally() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_catch_all() → [bool](https://docs.python.org/3/library/functions.html#bool) #### convert_to_catch_all() → [None](https://docs.python.org/3/library/constants.html#None) #### convert_to_finally() → [None](https://docs.python.org/3/library/constants.html#None) ### *class* ida_hexrays.ccatch_t(\*args, \*\*kwargs) Bases: [`cblock_t`](#ida_hexrays.cblock_t) #### thisown #### exprs *: catchexprs_t* #### compare(r: [ccatch_t](#ida_hexrays.ccatch_t)) → [int](https://docs.python.org/3/library/functions.html#int) #### is_catch_all() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_finally() → [bool](https://docs.python.org/3/library/functions.html#bool) #### convert_to_catch_all() → [None](https://docs.python.org/3/library/constants.html#None) #### convert_to_finally() → [None](https://docs.python.org/3/library/constants.html#None) #### swap(r: [ccatch_t](#ida_hexrays.ccatch_t)) → [None](https://docs.python.org/3/library/constants.html#None) ### *class* ida_hexrays.ctry_t(\*args, \*\*kwargs) Bases: [`cblock_t`](#ida_hexrays.cblock_t) #### thisown #### catchs *: ccatchvec_t* “catch all” or “finally” if present, must be the last element. wind-statements must have “finally” and nothing else. #### old_state *: [int](https://docs.python.org/3/library/functions.html#int)* old state number (internal, MSVC related) #### new_state *: [int](https://docs.python.org/3/library/functions.html#int)* new state number (internal, MSVC related) #### flags *: [int](https://docs.python.org/3/library/functions.html#int)* #### is_synchronized_block() → [bool](https://docs.python.org/3/library/functions.html#bool) Is a synchronized block? Such a block matches this pattern: \_\_monitor_enter_\_(obj); try { … } finally { \_\_monitor_exit_\_(obj); } #### compare(r: [ctry_t](#ida_hexrays.ctry_t)) → [int](https://docs.python.org/3/library/functions.html#int) #### is_wind Is C++ wind statement? (not part of the C++ language) MSVC generates code like the following to keep track of constructed objects and destroy them upon an exception. Example: // an object is constructed at this point \_\_wind { > // some other code that may throw an exception } \_\_unwind { > // this code is executed only if there was an exception > // in the \_\_wind block. normally here we destroy the object > // after that the exception is passed to the > // exception handler, regular control flow is interrupted here. } // regular logic continues here, if there were no exceptions // also the object’s destructor is called ### ida_hexrays.CTRY_WIND ### ida_hexrays.CTRY_SYNC ### *class* ida_hexrays.cthrow_t Bases: [`ceinsn_t`](#ida_hexrays.ceinsn_t) #### thisown #### compare(r: [cthrow_t](#ida_hexrays.cthrow_t)) → [int](https://docs.python.org/3/library/functions.html#int) ### *class* ida_hexrays.cblock_pos_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### blk *: cblock_t \** #### p *: cblock_t::iterator* #### is_first_insn() → [bool](https://docs.python.org/3/library/functions.html#bool) #### insn() → cinsn_t \* #### prev_insn() → cinsn_t \* ### *class* ida_hexrays.ctree_visitor_t(\_flags: [int](https://docs.python.org/3/library/functions.html#int)) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### cv_flags *: [int](https://docs.python.org/3/library/functions.html#int)* Ctree visitor property bits #### maintain_parents() → [bool](https://docs.python.org/3/library/functions.html#bool) Should the parent information by maintained? #### must_prune() → [bool](https://docs.python.org/3/library/functions.html#bool) Should the traversal skip the children of the current item? #### must_restart() → [bool](https://docs.python.org/3/library/functions.html#bool) Should the traversal restart? #### is_postorder() → [bool](https://docs.python.org/3/library/functions.html#bool) Should the leave…() functions be called? #### only_insns() → [bool](https://docs.python.org/3/library/functions.html#bool) Should all expressions be automatically pruned? #### prune_now() → [None](https://docs.python.org/3/library/constants.html#None) Prune children. This function may be called by a visitor() to skip all children of the current item. #### clr_prune() → [None](https://docs.python.org/3/library/constants.html#None) Do not prune children. This is an internal function, no need to call it. #### set_restart() → [None](https://docs.python.org/3/library/constants.html#None) Restart the travesal. Meaningful only in apply_to_exprs(). #### clr_restart() → [None](https://docs.python.org/3/library/constants.html#None) Do not restart. This is an internal function, no need to call it. #### parents *: parents_t* Vector of parents of the current item. #### bposvec *: [cblock_posvec_t](#ida_hexrays.cblock_posvec_t)* Vector of block positions. Only cit_block and cit_try parents have the corresponding element in this vector. #### apply_to(item: [citem_t](#ida_hexrays.citem_t), parent: [citem_t](#ida_hexrays.citem_t)) → [int](https://docs.python.org/3/library/functions.html#int) Traverse ctree. The traversal will start at the specified item and continue until of one the ``` visit_ ``` …() functions return a non-zero value. * **Parameters:** * **item** – root of the ctree to traverse * **parent** – parent of the specified item. can be specified as nullptr. * **Returns:** 0 or a non-zero value returned by a ``` visit_ ``` …() function #### apply_to_exprs(item: [citem_t](#ida_hexrays.citem_t), parent: [citem_t](#ida_hexrays.citem_t)) → [int](https://docs.python.org/3/library/functions.html#int) Traverse only expressions. The traversal will start at the specified item and continue until of one the ``` visit_ ``` …() functions return a non-zero value. * **Parameters:** * **item** – root of the ctree to traverse * **parent** – parent of the specified item. can be specified as nullptr. * **Returns:** 0 or a non-zero value returned by a ``` visit_ ``` …() function #### parent_item() → citem_t \* Get parent of the current item as an item (statement or expression). #### parent_expr() → cexpr_t \* Get parent of the current item as an expression. #### parent_insn() → cinsn_t \* Get parent of the current item as a statement. #### visit_insn(arg0: [cinsn_t](#ida_hexrays.cinsn_t)) → [int](https://docs.python.org/3/library/functions.html#int) Visit a statement. This is a visitor function which should be overridden by a derived class to do some useful work. This visitor performs pre-order traserval, i.e. an item is visited before its children. * **Returns:** 0 to continue the traversal, nonzero to stop. #### visit_expr(arg0: [cexpr_t](#ida_hexrays.cexpr_t)) → [int](https://docs.python.org/3/library/functions.html#int) Visit an expression. This is a visitor function which should be overridden by a derived class to do some useful work. This visitor performs pre-order traserval, i.e. an item is visited before its children. * **Returns:** 0 to continue the traversal, nonzero to stop. #### leave_insn(arg0: [cinsn_t](#ida_hexrays.cinsn_t)) → [int](https://docs.python.org/3/library/functions.html#int) Visit a statement after having visited its children. This is a visitor function which should be overridden by a derived class to do some useful work. This visitor performs post-order traserval, i.e. an item is visited after its children. * **Returns:** 0 to continue the traversal, nonzero to stop. #### leave_expr(arg0: [cexpr_t](#ida_hexrays.cexpr_t)) → [int](https://docs.python.org/3/library/functions.html#int) Visit an expression after having visited its children. This is a visitor function which should be overridden by a derived class to do some useful work. This visitor performs post-order traserval, i.e. an item is visited after its children. * **Returns:** 0 to continue the traversal, nonzero to stop. ### ida_hexrays.CV_FAST do not maintain parent information ### ida_hexrays.CV_PRUNE this bit is set by visit…() to prune the walk ### ida_hexrays.CV_PARENTS maintain parent information ### ida_hexrays.CV_POST call the leave…() functions ### ida_hexrays.CV_RESTART restart enumeration at the top expr (apply_to_exprs) ### ida_hexrays.CV_INSNS visit only statements, prune all expressions do not use before the final ctree maturity because expressions may contain statements at intermediate stages (see cot_insn). Otherwise you risk missing statements embedded into expressions. ### *class* ida_hexrays.ctree_parentee_t(post: [bool](https://docs.python.org/3/library/functions.html#bool) = False) Bases: [`ctree_visitor_t`](#ida_hexrays.ctree_visitor_t) #### thisown #### recalc_parent_types() → [bool](https://docs.python.org/3/library/functions.html#bool) Recalculate type of parent nodes. If a node type has been changed, the visitor must recalculate all parent types, otherwise the ctree becomes inconsistent. If during this recalculation a parent node is added/deleted, this function returns true. In this case the traversal must be stopped because the information about parent nodes is stale. * **Returns:** false-ok to continue the traversal, true-must stop. ### *class* ida_hexrays.cfunc_parentee_t(f: [cfunc_t](#ida_hexrays.cfunc_t), post: [bool](https://docs.python.org/3/library/functions.html#bool) = False) Bases: [`ctree_parentee_t`](#ida_hexrays.ctree_parentee_t) #### thisown #### func *: cfunc_t \** Pointer to current function. #### calc_rvalue_type(target: [tinfo_t](../ida_typeinf/index.md#ida_typeinf.tinfo_t), e: [cexpr_t](#ida_hexrays.cexpr_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Calculate rvalue type. This function tries to determine the type of the specified item based on its context. For example, if the current expression is the right side of an assignment operator, the type of its left side will be returned. This function can be used to determine the ‘best’ type of the specified expression. * **Parameters:** * **target** – ‘best’ type of the expression will be returned here * **e** – expression to determine the desired type * **Returns:** false if failed ### *class* ida_hexrays.ctree_anchor_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### value *: [int](https://docs.python.org/3/library/functions.html#int)* #### get_index() → [int](https://docs.python.org/3/library/functions.html#int) #### get_itp() → item_preciser_t #### is_valid_anchor() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_citem_anchor() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_lvar_anchor() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_itp_anchor() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_blkcmt_anchor() → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_hexrays.ANCHOR_INDEX ### ida_hexrays.ANCHOR_MASK ### ida_hexrays.ANCHOR_CITEM c-tree item ### ida_hexrays.ANCHOR_LVAR declaration of local variable ### ida_hexrays.ANCHOR_ITP item type preciser ### ida_hexrays.ANCHOR_BLKCMT block comment (for ctree items) ### ida_hexrays.VDI_NONE undefined ### ida_hexrays.VDI_EXPR c-tree item ### ida_hexrays.VDI_LVAR declaration of local variable ### ida_hexrays.VDI_FUNC the function itself (the very first line with the function prototype) ### ida_hexrays.VDI_TAIL cursor is at (beyond) the line end (commentable line) ### *class* ida_hexrays.ctree_item_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### citype *: cursor_item_type_t* Item type. #### it *: citem_t \** #### e *: cexpr_t \** VDI_EXPR: Expression. #### i *: cinsn_t \** VDI_EXPR: Statement. #### l *: lvar_t \** VDI_LVAR: Local variable. #### f *: cfunc_t \** VDI_FUNC: Function. #### get_udm(udm: udm_t = None, parent: tinfo_t = None, p_offset: uint64 \* = None) → [int](https://docs.python.org/3/library/functions.html#int) Get type of a structure field. If the current item is a structure/union field, this function will return information about it. * **Parameters:** * **udm** – pointer to buffer for the udt member info. * **parent** – pointer to buffer for the struct/union type. * **p_offset** – pointer to the offset in bits inside udt. * **Returns:** member index or -1 if failed Both output parameters can be nullptr. #### get_edm(parent: [tinfo_t](../ida_typeinf/index.md#ida_typeinf.tinfo_t)) → [int](https://docs.python.org/3/library/functions.html#int) Get type of an enum member. If the current item is a symbolic constant, this function will return information about it. * **Parameters:** **parent** – pointer to buffer for the enum type. * **Returns:** member index or -1 if failed #### get_lvar() → lvar_t \* Get pointer to local variable. If the current item is a local variable, this function will return pointer to its definition. * **Returns:** nullptr if failed #### get_ea() → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) Get address of the current item. Each ctree item has an address. * **Returns:** BADADDR if failed #### get_label_num(gln_flags: [int](https://docs.python.org/3/library/functions.html#int)) → [int](https://docs.python.org/3/library/functions.html#int) Get label number of the current item. * **Parameters:** **gln_flags** – Combination of get_label_num control bits * **Returns:** -1 if failed or no label #### is_citem() → [bool](https://docs.python.org/3/library/functions.html#bool) Is the current item is a ctree item? #### dstr() → [str](https://docs.python.org/3/library/stdtypes.html#str) #### loc *: treeloc_t \*const* VDI_TAIL: Line tail. ### ida_hexrays.GLN_CURRENT get label of the current item ### ida_hexrays.GLN_GOTO_TARGET get goto target ### ida_hexrays.GLN_ALL get both ### ida_hexrays.FORBID_UNUSED_LABELS Unused labels cause interr. ### ida_hexrays.ALLOW_UNUSED_LABELS Unused labels are permitted. ### ida_hexrays.save_user_labels(func_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), user_labels: [user_labels_t](#ida_hexrays.user_labels_t), func: [cfunc_t](#ida_hexrays.cfunc_t) = None) → [None](https://docs.python.org/3/library/constants.html#None) Save user defined labels into the database. * **Parameters:** * **func_ea** – the entry address of the function, ignored if FUNC != nullptr * **user_labels** – collection of user defined labels * **func** – pointer to current function, if FUNC != nullptr, then save labels using a more stable method that preserves them even when the decompiler output drastically changes ### ida_hexrays.save_user_cmts(func_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), user_cmts: [user_cmts_t](#ida_hexrays.user_cmts_t)) → [None](https://docs.python.org/3/library/constants.html#None) Save user defined comments into the database. * **Parameters:** * **func_ea** – the entry address of the function * **user_cmts** – collection of user defined comments ### ida_hexrays.save_user_numforms(func_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), numforms: [user_numforms_t](#ida_hexrays.user_numforms_t)) → [None](https://docs.python.org/3/library/constants.html#None) Save user defined number formats into the database. * **Parameters:** * **func_ea** – the entry address of the function * **numforms** – collection of user defined comments ### ida_hexrays.save_user_iflags(func_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), iflags: [user_iflags_t](#ida_hexrays.user_iflags_t)) → [None](https://docs.python.org/3/library/constants.html#None) Save user defined citem iflags into the database. * **Parameters:** * **func_ea** – the entry address of the function * **iflags** – collection of user defined citem iflags ### ida_hexrays.save_user_unions(func_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), unions: [user_unions_t](#ida_hexrays.user_unions_t)) → [None](https://docs.python.org/3/library/constants.html#None) Save user defined union field selections into the database. * **Parameters:** * **func_ea** – the entry address of the function * **unions** – collection of union field selections ### ida_hexrays.save_user_casts(func_ea: ida_idaapi.ea_t, casts: user_casts_t const \*) → [None](https://docs.python.org/3/library/constants.html#None) Save user defined casts into the database. * **Parameters:** * **func_ea** – the entry address of the function * **casts** – collection of user defined casts ### ida_hexrays.restore_user_casts(func_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → user_casts_t \* Restore user defined casts from the database. * **Parameters:** **func_ea** – the entry address of the function * **Returns:** collection of user defined casts. The returned object must be deleted by the caller using delete ### ida_hexrays.restore_user_labels(func_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), func: [cfunc_t](#ida_hexrays.cfunc_t) = None) → user_labels_t \* Restore user defined labels from the database. * **Parameters:** * **func_ea** – the entry address of the function, ignored if FUNC != nullptr * **func** – pointer to current function * **Returns:** collection of user defined labels. The returned object must be deleted by the caller using delete_user_labels() ### ida_hexrays.restore_user_cmts(func_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → user_cmts_t \* Restore user defined comments from the database. * **Parameters:** **func_ea** – the entry address of the function * **Returns:** collection of user defined comments. The returned object must be deleted by the caller using delete_user_cmts() ### ida_hexrays.restore_user_numforms(func_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → user_numforms_t \* Restore user defined number formats from the database. * **Parameters:** **func_ea** – the entry address of the function * **Returns:** collection of user defined number formats. The returned object must be deleted by the caller using delete_user_numforms() ### ida_hexrays.restore_user_iflags(func_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → user_iflags_t \* Restore user defined citem iflags from the database. * **Parameters:** **func_ea** – the entry address of the function * **Returns:** collection of user defined iflags. The returned object must be deleted by the caller using delete_user_iflags() ### ida_hexrays.restore_user_unions(func_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → user_unions_t \* Restore user defined union field selections from the database. * **Parameters:** **func_ea** – the entry address of the function * **Returns:** collection of union field selections The returned object must be deleted by the caller using delete_user_unions() ### *class* ida_hexrays.cfunc_t(\*args, \*\*kwargs) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### entry_ea *: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)* function entry address #### mba *: mba_t \** underlying microcode #### body *: [cinsn_t](#ida_hexrays.cinsn_t)* function body, must be a block #### argidx *: intvec_t &* list of arguments (indexes into vars) #### maturity *: ctree_maturity_t* maturity level #### user_labels *: user_labels_t \** user-defined labels. #### user_cmts *: user_cmts_t \** user-defined comments. #### numforms *: user_numforms_t \** user-defined number formats. #### user_iflags *: user_iflags_t \** user-defined item flags ctree item iflags bits #### user_unions *: user_unions_t \** user-defined union field selections. #### refcnt *: [int](https://docs.python.org/3/library/functions.html#int)* reference count to this object. use cfuncptr_t #### statebits *: [int](https://docs.python.org/3/library/functions.html#int)* current cfunc_t state. see cfunc state bits #### hdrlines *: [int](https://docs.python.org/3/library/functions.html#int)* number of lines in the declaration area #### treeitems *: citem_pointers_t* vector of pointers to citem_t objects (nodes constituting the ctree) #### user_casts *: user_casts_t \** user-defined casts. #### release() → [None](https://docs.python.org/3/library/constants.html#None) #### build_c_tree() → [None](https://docs.python.org/3/library/constants.html#None) Generate the function body. This function (re)generates the function body from the underlying microcode. #### verify(aul: allow_unused_labels_t, even_without_debugger: [bool](https://docs.python.org/3/library/functions.html#bool)) → [None](https://docs.python.org/3/library/constants.html#None) Verify the ctree. This function verifies the ctree. If the ctree is malformed, an internal error is generated. Use it to verify the ctree after your modifications. * **Parameters:** * **aul** – Are unused labels acceptable? * **even_without_debugger** – if false and there is no debugger, the verification will be skipped #### print_dcl() → [str](https://docs.python.org/3/library/stdtypes.html#str) Print function prototype. #### print_func(vp: [vc_printer_t](#ida_hexrays.vc_printer_t)) → [None](https://docs.python.org/3/library/constants.html#None) Print function text. * **Parameters:** **vp** – printer helper class to receive the generated text. #### get_func_type(type: [tinfo_t](../ida_typeinf/index.md#ida_typeinf.tinfo_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Get the function type. * **Parameters:** **type** – variable where the function type is returned * **Returns:** false if failure #### get_lvars() → lvars_t \* Get vector of local variables. * **Returns:** pointer to the vector of local variables. If you modify this vector, the ctree must be regenerated in order to have correct cast operators. Use build_c_tree() for that. Removing lvars should be done carefully: all references in ctree and microcode must be corrected after that. #### get_stkoff_delta() → [int](https://docs.python.org/3/library/functions.html#int) Get stack offset delta. The local variable stack offsets retrieved by v.location.stkoff() should be adjusted before being used as stack frame offsets in IDA. * **Returns:** the delta to apply. example: ida_stkoff = v.location.stkoff() - f->get_stkoff_delta() #### find_label(label: [int](https://docs.python.org/3/library/functions.html#int)) → citem_t \* Find the label. * **Returns:** pointer to the ctree item with the specified label number. #### remove_unused_labels() → [None](https://docs.python.org/3/library/constants.html#None) Remove unused labels. This function checks what labels are really used by the function and removes the unused ones. You must call it after deleting a goto statement. #### redirect_gotos(frm: [int](https://docs.python.org/3/library/functions.html#int), to: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) Redirect all gotos targeting one label to another. This function walks the entire ctree and changes all goto statements that target from to target to instead. * **Parameters:** **to** – target label number #### get_user_cmt(loc: [treeloc_t](#ida_hexrays.treeloc_t), rt: cmt_retrieval_type_t) → [str](https://docs.python.org/3/library/stdtypes.html#str) Retrieve a user defined comment. * **Parameters:** * **loc** – ctree location * **rt** – should already retrieved comments retrieved again? * **Returns:** pointer to the comment string or nullptr #### set_user_cmt(loc: [treeloc_t](#ida_hexrays.treeloc_t), cmt: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [None](https://docs.python.org/3/library/constants.html#None) Set a user defined comment. This function stores the specified comment in the cfunc_t structure. The save_user_cmts() function must be called after it. * **Parameters:** * **loc** – ctree location * **cmt** – new comment. if empty or nullptr, then an existing comment is deleted. #### get_user_iflags(loc: [citem_locator_t](#ida_hexrays.citem_locator_t)) → [int](https://docs.python.org/3/library/functions.html#int) Retrieve citem iflags. * **Parameters:** **loc** – citem locator * **Returns:** ctree item iflags bits or 0 #### set_user_iflags(loc: [citem_locator_t](#ida_hexrays.citem_locator_t), iflags: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) Set citem iflags. * **Parameters:** * **loc** – citem locator * **iflags** – new iflags #### has_orphan_cmts() → [bool](https://docs.python.org/3/library/functions.html#bool) Check if there are orphan comments. #### del_orphan_cmts() → [int](https://docs.python.org/3/library/functions.html#int) Delete all orphan comments. The save_user_cmts() function must be called after this call. #### get_user_union_selection(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), path: [intvec_t](../ida_pro/index.md#ida_pro.intvec_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Retrieve a user defined union field selection. * **Parameters:** * **ea** – address * **path** – out: path describing the union selection. * **Returns:** pointer to the path or nullptr #### set_user_union_selection(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), path: [intvec_t](../ida_pro/index.md#ida_pro.intvec_t)) → [None](https://docs.python.org/3/library/constants.html#None) Set a union field selection. The save_user_unions() function must be called after calling this function. * **Parameters:** * **ea** – address * **path** – in: path describing the union selection. #### save_user_labels() → [None](https://docs.python.org/3/library/constants.html#None) Save user-defined labels into the database. #### save_user_cmts() → [None](https://docs.python.org/3/library/constants.html#None) Save user-defined comments into the database. #### save_user_numforms() → [None](https://docs.python.org/3/library/constants.html#None) Save user-defined number formats into the database. #### save_user_iflags() → [None](https://docs.python.org/3/library/constants.html#None) Save user-defined iflags into the database. #### save_user_unions() → [None](https://docs.python.org/3/library/constants.html#None) Save user-defined union field selections into the database. #### save_user_casts() → [None](https://docs.python.org/3/library/constants.html#None) Save user-defined casts into the database. #### get_user_cast(loc: [citem_locator_t](#ida_hexrays.citem_locator_t)) → [tinfo_t](../ida_typeinf/index.md#ida_typeinf.tinfo_t) Retrieve a user-defined cast. #### set_user_cast(loc: [citem_locator_t](#ida_hexrays.citem_locator_t), type: [tinfo_t](../ida_typeinf/index.md#ida_typeinf.tinfo_t)) → [None](https://docs.python.org/3/library/constants.html#None) Set a user-defined cast. #### get_line_item(line: [str](https://docs.python.org/3/library/stdtypes.html#str), x: [int](https://docs.python.org/3/library/functions.html#int), is_ctree_line: [bool](https://docs.python.org/3/library/functions.html#bool), phead: [ctree_item_t](#ida_hexrays.ctree_item_t), pitem: [ctree_item_t](#ida_hexrays.ctree_item_t), ptail: [ctree_item_t](#ida_hexrays.ctree_item_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Get ctree item for the specified cursor position. * **Parameters:** * **line** – line of decompilation text (element of sv) * **x** – x cursor coordinate in the line * **is_ctree_line** – does the line belong to statement area? (if not, it is assumed to belong to the declaration area) * **phead** – ptr to the first item on the line (used to attach block comments). May be nullptr * **pitem** – ptr to the current item. May be nullptr * **ptail** – ptr to the last item on the line (used to attach indented comments). May be nullptr * **Returns:** false if failed to get the current item #### get_warnings() → hexwarns_t & Get information about decompilation warnings. * **Returns:** reference to the vector of warnings #### get_eamap() → eamap_t & Get pointer to ea->insn map. This function initializes eamap if not done yet. #### get_boundaries() → boundaries_t & Get pointer to map of instruction boundaries. This function initializes the boundary map if not done yet. #### get_pseudocode() → strvec_t const & Get pointer to decompilation output: the pseudocode. This function generates pseudocode if not done yet. #### refresh_func_ctext() → [None](https://docs.python.org/3/library/constants.html#None) Refresh ctext after a ctree modification. This function informs the decompiler that ctree (body) have been modified and ctext (sv) does not correspond to it anymore. It also refreshes the pseudocode windows if there is any. #### recalc_item_addresses() → [None](https://docs.python.org/3/library/constants.html#None) Recalculate item adresses. This function may be required after shuffling ctree items. For example, when adding or removing statements of a block, or changing ‘if’ statements. #### find_addressable_item(i: [citem_t](#ida_hexrays.citem_t)) → citem_t const \* Find the closest addressable ancestor of an item. Try to locate the closest address to the citem_t i walking the tree and taking the most immediate parent with an address. * **Returns:** the closest addressable item, or i itself if none was found #### gather_derefs(ci: [ctree_item_t](#ida_hexrays.ctree_item_t), udm: [udt_type_data_t](../ida_typeinf/index.md#ida_typeinf.udt_type_data_t) = None) → [bool](https://docs.python.org/3/library/functions.html#bool) #### locked() → [bool](https://docs.python.org/3/library/functions.html#bool) #### serialize() → [bool](https://docs.python.org/3/library/functions.html#bool) Serialize cfunc into a sequence of bytes. #### *static* deserialize(mba: mba_t, bytes: uchar const \*) → cfunc_t \* Deserialize a byte sequence into cfunc_t * **Parameters:** * **mba** – the matching mba object * **bytes** – pointer to the beginning of the byte sequence. * **Returns:** new cfunc_t object #### find_item_coords(\*args) This method has the following signatures: > 1. find_item_coords(item: citem_t) -> Tuple[int, int] > 2. find_item_coords(item: citem_t, x: int_pointer, y: int_pointer) -> bool NOTE: The second form is retained for backward-compatibility, but we strongly recommend using the first. * **Parameters:** **item** – The item to find coordinates for in the pseudocode listing ### ida_hexrays.CIT_COLLAPSED display ctree item in collapsed form ### ida_hexrays.CIT_INVERTED if-statement condition is inverted (then/else swapped) ### ida_hexrays.CIT_THEN_COLLAPSED display then-branch in collapsed form ### ida_hexrays.CIT_ELSE_COLLAPSED display else-branch in collapsed form ### ida_hexrays.CFS_BOUNDS ‘eamap’ and ‘boundaries’ are ready ### ida_hexrays.CFS_TEXT ‘sv’ is ready (and hdrlines) ### ida_hexrays.CFS_LVARS_HIDDEN local variable definitions are collapsed ### ida_hexrays.CFS_LOCKED cfunc is temporarily locked ### ida_hexrays.DECOMP_NO_WAIT do not display waitbox ### ida_hexrays.DECOMP_NO_CACHE do not use decompilation cache (snippets are never cached) ### ida_hexrays.DECOMP_NO_FRAME do not use function frame info (only snippet mode) ### ida_hexrays.DECOMP_WARNINGS display warnings in the output window ### ida_hexrays.DECOMP_ALL_BLKS generate microcode for unreachable blocks ### ida_hexrays.DECOMP_NO_HIDE do not close display waitbox. see close_hexrays_waitbox() ### ida_hexrays.DECOMP_GXREFS_DEFLT the default behavior: do not update the global xrefs cache upon decompile() call, but when the pseudocode text is generated (e.g., through cfunc_t.get_pseudocode()) ### ida_hexrays.DECOMP_GXREFS_NOUPD do not update the global xrefs cache ### ida_hexrays.DECOMP_GXREFS_FORCE update the global xrefs cache immediately ### ida_hexrays.DECOMP_VOID_MBA return empty mba object (to be used with gen_microcode) ### ida_hexrays.DECOMP_OUTLINE generate code for an outline ### ida_hexrays.close_hexrays_waitbox() → [None](https://docs.python.org/3/library/constants.html#None) Close the waitbox displayed by the decompiler. Useful if DECOMP_NO_HIDE was used during decompilation. ### ida_hexrays.decompile(\*args) → [cfuncptr_t](#ida_hexrays.cfuncptr_t) This function has the following signatures: > 1. decompile(mbr: const mba_ranges_t &, hf: hexrays_failure_t > ``` > * > ``` > =nullptr, decomp_flags: int=0) -> DEPRECATED cfuncptr_t > 2. decompile(dcr: const decomp_ranges_t &, hf: hexrays_failure_t > ``` > * > ``` > =nullptr, decomp_flags: int=0) -> cfuncptr_t # 0: decompile(mbr: const mba_ranges_t &, hf: hexrays_failure_t ``` * ``` =nullptr, decomp_flags: int=0) -> DEPRECATED cfuncptr_t Decompile a snippet or a function. * **Returns:** pointer to the decompilation result (a reference counted pointer). nullptr if failed. # 1: decompile(dcr: const decomp_ranges_t &, hf: hexrays_failure_t ``` * ``` =nullptr, decomp_flags: int=0) -> cfuncptr_t Decompile a snippet or a function (ea-based variant). Replaces the deprecated decompile() which takes mba_ranges_t. * **Returns:** pointer to the decompilation result (a reference counted pointer). nullptr if failed. ### ida_hexrays.decompile_func(pfn: func_t \*, hf: hexrays_failure_t = None, decomp_flags: int = 0) → [cfuncptr_t](#ida_hexrays.cfuncptr_t) Decompile a function. Multiple decompilations of the same function return the same object. * **Parameters:** * **pfn** – pointer to function to decompile * **hf** – extended error information (if failed) * **decomp_flags** – bitwise combination of decompile() flags … bits * **Returns:** pointer to the decompilation result (a reference counted pointer). nullptr if failed. ### ida_hexrays.decompile_function(func_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), hf: [hexrays_failure_t](#ida_hexrays.hexrays_failure_t) = None, decomp_flags: [int](https://docs.python.org/3/library/functions.html#int) = 0) → [cfuncptr_t](#ida_hexrays.cfuncptr_t) Decompile a function (ea-based variant). Multiple decompilations of the same function return the same object. Replaces the deprecated decompile_func(func_t ``` * ``` ). * **Parameters:** * **func_ea** – start address of the function to decompile * **hf** – extended error information (if failed) * **decomp_flags** – bitwise combination of decompile() flags … bits * **Returns:** pointer to the decompilation result (a reference counted pointer). nullptr if failed. ### ida_hexrays.gen_microcode(\*args) → mba_t \* This function has the following signatures: > 1. gen_microcode(mbr: const mba_ranges_t &, hf: hexrays_failure_t > ``` > * > ``` > =nullptr, retlist: const mlist_t > ``` > * > ``` > =nullptr, decomp_flags: int=0, reqmat: mba_maturity_t=MMAT_GLBOPT3) -> DEPRECATED mba_t \* > 2. gen_microcode(dcr: const decomp_ranges_t &, hf: hexrays_failure_t > ``` > * > ``` > =nullptr, retlist: const mlist_t > ``` > * > ``` > =nullptr, decomp_flags: int=0, reqmat: mba_maturity_t=MMAT_GLBOPT3) -> mba_t \* # 0: gen_microcode(mbr: const mba_ranges_t &, hf: hexrays_failure_t ``` * ``` =nullptr, retlist: const mlist_t ``` * ``` =nullptr, decomp_flags: int=0, reqmat: mba_maturity_t=MMAT_GLBOPT3) -> DEPRECATED mba_t \* Generate microcode of an arbitrary code snippet * **Returns:** pointer to the microcode, nullptr if failed. # 1: gen_microcode(dcr: const decomp_ranges_t &, hf: hexrays_failure_t ``` * ``` =nullptr, retlist: const mlist_t ``` * ``` =nullptr, decomp_flags: int=0, reqmat: mba_maturity_t=MMAT_GLBOPT3) -> mba_t \* Generate microcode of an arbitrary code snippet (ea-based variant). Replaces the deprecated gen_microcode() which takes mba_ranges_t. * **Returns:** pointer to the microcode, nullptr if failed. ### ida_hexrays.create_empty_mba(\*args) → mba_t \* This function has the following signatures: > 1. create_empty_mba(mbr: const mba_ranges_t &, hf: hexrays_failure_t > ``` > * > ``` > =nullptr) -> DEPRECATED mba_t \* > 2. create_empty_mba(dcr: const decomp_ranges_t &, hf: hexrays_failure_t > ``` > * > ``` > =nullptr) -> mba_t \* # 0: create_empty_mba(mbr: const mba_ranges_t &, hf: hexrays_failure_t ``` * ``` =nullptr) -> DEPRECATED mba_t \* Create an empty microcode object # 1: create_empty_mba(dcr: const decomp_ranges_t &, hf: hexrays_failure_t ``` * ``` =nullptr) -> mba_t \* Create an empty microcode object (ea-based variant). Replaces the deprecated create_empty_mba() which takes mba_ranges_t. ### ida_hexrays.create_cfunc(mba: [mba_t](#ida_hexrays.mba_t)) → [cfuncptr_t](#ida_hexrays.cfuncptr_t) Create a new cfunc_t object. * **Parameters:** **mba** – microcode object. After creating the cfunc object it takes the ownership of MBA. ### ida_hexrays.mark_cfunc_dirty(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), close_views: [bool](https://docs.python.org/3/library/functions.html#bool) = False) → [bool](https://docs.python.org/3/library/functions.html#bool) Flush the cached decompilation results. Erases a cache entry for the specified function. * **Parameters:** * **ea** – function to erase from the cache * **close_views** – close pseudocode windows that show the function * **Returns:** if a cache entry existed. ### ida_hexrays.clear_cached_cfuncs() → [None](https://docs.python.org/3/library/constants.html#None) Flush all cached decompilation results. ### ida_hexrays.has_cached_cfunc(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Do we have a cached decompilation result for ‘ea’? ### ida_hexrays.get_cached_cfunc_eas(out: [uint64vec_t](../ida_pro/index.md#ida_pro.uint64vec_t)) → [None](https://docs.python.org/3/library/constants.html#None) Return the start EAs of all cached cfunc_t objects. * **Parameters:** **out** – receives one EA per cached cfunc_t ### ida_hexrays.get_ctype_name(op: ctype_t) → [str](https://docs.python.org/3/library/stdtypes.html#str) ### ida_hexrays.create_field_name(\*args) → [str](https://docs.python.org/3/library/stdtypes.html#str) ### ida_hexrays.hxe_flowchart Flowchart has been generated. ### ida_hexrays.hxe_stkpnts SP change points have been calculated. ### ida_hexrays.hxe_prolog Prolog analysis has been finished. ### ida_hexrays.hxe_microcode Microcode has been generated. ### ida_hexrays.hxe_preoptimized Microcode has been preoptimized. ### ida_hexrays.hxe_locopt Basic block level optimization has been finished. ### ida_hexrays.hxe_prealloc Local variables: preallocation step begins. ### ida_hexrays.hxe_glbopt Global optimization has been finished. If microcode is modified, MERR_LOOP must be returned. It will cause a complete restart of the optimization. ### ida_hexrays.hxe_pre_structural Structure analysis is starting. ### ida_hexrays.hxe_structural Structural analysis has been finished. ### ida_hexrays.hxe_maturity Ctree maturity level is being changed. ### ida_hexrays.hxe_interr Internal error has occurred. ### ida_hexrays.hxe_combine Trying to combine instructions of basic block. ### ida_hexrays.hxe_print_func Printing ctree and generating text. ### ida_hexrays.hxe_func_printed Function text has been generated. Plugins may modify the text in cfunc_t::sv. However, it is too late to modify the ctree or microcode. The text uses regular color codes (see lines.hpp) COLOR_ADDR is used to store pointers to ctree items. ### ida_hexrays.hxe_resolve_stkaddrs The optimizer is about to resolve stack addresses. ### ida_hexrays.hxe_build_callinfo Analyzing a call instruction. ### ida_hexrays.hxe_callinfo_built A call instruction has been anallyzed. ### ida_hexrays.hxe_calls_done All calls have been analyzed. ### ida_hexrays.hxe_begin_inlining Starting to inline outlined functions. ### ida_hexrays.hxe_inlining_func A set of ranges is going to be inlined. ### ida_hexrays.hxe_inlined_func A set of ranges got inlined. ### ida_hexrays.hxe_collect_warnings Collect warning messages from plugins. These warnings will be displayed at the function header, after the user-defined comments. ### ida_hexrays.hxe_flowchart_ea Flowchart has been generated (ea-based variant). Replaces the deprecated hxe_flowchart which passes a qflow_chart_t\* with a raw func_t\* inside. ### ida_hexrays.hxe_prolog_ea Prolog analysis has been finished (ea-based variant). Replaces the deprecated hxe_prolog which passes a qflow_chart_t\* with a raw func_t\* inside. ### ida_hexrays.hxe_inlining_function A set of ranges is going to be inlined (ea-based variant). Replaces the deprecated hxe_inlining_func which passes an mba_ranges_t\* with a raw func_t\* inside. ### ida_hexrays.hxe_inlined_function A set of ranges got inlined (ea-based variant). Replaces the deprecated hxe_inlined_func which passes an mba_ranges_t\* with a raw func_t\* inside. ### ida_hexrays.hxe_open_pseudocode New pseudocode view has been opened. ### ida_hexrays.hxe_switch_pseudocode Existing pseudocode view has been reloaded with a new function. Its text has not been refreshed yet, only cfunc and mba pointers are ready. ### ida_hexrays.hxe_refresh_pseudocode Existing pseudocode text has been refreshed. Adding/removing pseudocode lines is forbidden in this event. ### ida_hexrays.hxe_close_pseudocode Pseudocode view is being closed. ### ida_hexrays.hxe_keyboard Keyboard has been hit. ### ida_hexrays.hxe_right_click Mouse right click. Use hxe_populating_popup instead, in case you want to add items in the popup menu. ### ida_hexrays.hxe_double_click Mouse double click. ### ida_hexrays.hxe_curpos Current cursor position has been changed. (for example, by left-clicking or using keyboard) ### ida_hexrays.hxe_create_hint Create a hint for the current item. ### ida_hexrays.hxe_text_ready Decompiled text is ready. ### ida_hexrays.hxe_populating_popup Populating popup menu. We can add menu items now. ### ida_hexrays.lxe_lvar_name_changed Local variable got renamed. ### ida_hexrays.lxe_lvar_type_changed Local variable type got changed. ### ida_hexrays.lxe_lvar_cmt_changed Local variable comment got changed. ### ida_hexrays.lxe_lvar_mapping_changed Local variable mapping got changed. ### ida_hexrays.hxe_cmt_changed Comment got changed. ### ida_hexrays.hxe_mba_maturity Maturity level of an MBA was changed. ### ida_hexrays.USE_KEYBOARD Keyboard. ### ida_hexrays.USE_MOUSE Mouse. ### *class* ida_hexrays.ctext_position_t(\_lnnum: [int](https://docs.python.org/3/library/functions.html#int) = -1, \_x: [int](https://docs.python.org/3/library/functions.html#int) = 0, \_y: [int](https://docs.python.org/3/library/functions.html#int) = 0) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### lnnum *: [int](https://docs.python.org/3/library/functions.html#int)* Line number. #### x *: [int](https://docs.python.org/3/library/functions.html#int)* x coordinate of the cursor within the window #### y *: [int](https://docs.python.org/3/library/functions.html#int)* y coordinate of the cursor within the window #### in_ctree(hdrlines: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) Is the cursor in the variable/type declaration area? * **Parameters:** **hdrlines** – Number of lines of the declaration area #### compare(r: [ctext_position_t](#ida_hexrays.ctext_position_t)) → [int](https://docs.python.org/3/library/functions.html#int) ### ida_hexrays.HEXRAYS_API_MAGIC ### *class* ida_hexrays.history_item_t(\*args) Bases: [`ctext_position_t`](#ida_hexrays.ctext_position_t) #### thisown #### func_ea *: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)* The entry address of the decompiled function. #### curr_ea *: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)* Current address. #### end *: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)* BADADDR-decompile a function; otherwise end of the range. ### *class* ida_hexrays.vdui_t(\*args, \*\*kwargs) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### flags *: [int](https://docs.python.org/3/library/functions.html#int)* Properties of pseudocode window #### visible() → [bool](https://docs.python.org/3/library/functions.html#bool) Is the pseudocode window visible? if not, it might be invisible or destroyed #### valid() → [bool](https://docs.python.org/3/library/functions.html#bool) Does the pseudocode window contain valid code? It can become invalid if the function type gets changed in IDA. #### locked() → [bool](https://docs.python.org/3/library/functions.html#bool) Does the pseudocode window contain valid code? We lock windows before modifying them, to avoid recursion due to the events generated by the IDA kernel. * **Returns:** true: The window is locked and may have stale info #### set_visible(v: [bool](https://docs.python.org/3/library/functions.html#bool)) → [None](https://docs.python.org/3/library/constants.html#None) #### set_valid(v: [bool](https://docs.python.org/3/library/functions.html#bool)) → [None](https://docs.python.org/3/library/constants.html#None) #### set_locked(v: [bool](https://docs.python.org/3/library/functions.html#bool)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### view_idx *: [int](https://docs.python.org/3/library/functions.html#int)* pseudocode window index (0..) #### ct *: TWidget \** pseudocode view #### toplevel *: TWidget \** #### mba *: mba_t \** pointer to underlying microcode #### cfunc *: [cfuncptr_t](#ida_hexrays.cfuncptr_t)* pointer to function object #### last_code *: merror_t* result of the last user action. See Microcode error code #### cpos *: [ctext_position_t](#ida_hexrays.ctext_position_t)* Current ctext position. #### head *: [ctree_item_t](#ida_hexrays.ctree_item_t)* First ctree item on the current line (for block comments). #### item *: [ctree_item_t](#ida_hexrays.ctree_item_t)* Current ctree item. #### tail *: [ctree_item_t](#ida_hexrays.ctree_item_t)* Tail ctree item on the current line (for indented comments). #### refresh_view(redo_mba: [bool](https://docs.python.org/3/library/functions.html#bool)) → [None](https://docs.python.org/3/library/constants.html#None) Refresh pseudocode window. This is the highest level refresh function. It causes the most profound refresh possible and can lead to redecompilation of the current function. Please consider using refresh_ctext() if you need a more superficial refresh. * **Parameters:** **redo_mba** – true means to redecompile the current function false means to rebuild ctree without regenerating microcode #### refresh_ctext(activate: [bool](https://docs.python.org/3/library/functions.html#bool) = True) → [None](https://docs.python.org/3/library/constants.html#None) Refresh pseudocode window. This function refreshes the pseudocode window by regenerating its text from cfunc_t. Instead of this function use refresh_func_ctext(), which refreshes all pseudocode windows for the function. #### switch_to(f: [cfuncptr_t](#ida_hexrays.cfuncptr_t), activate: [bool](https://docs.python.org/3/library/functions.html#bool)) → [None](https://docs.python.org/3/library/constants.html#None) Display the specified pseudocode. This function replaces the pseudocode window contents with the specified cfunc_t. * **Parameters:** * **f** – pointer to the function to display. * **activate** – should the pseudocode window get focus? #### in_ctree() → [bool](https://docs.python.org/3/library/functions.html#bool) Is the current item a statement? * **Returns:** false if the cursor is in the local variable/type declaration area true if the cursor is in the statement area #### get_number() → cnumber_t \* Get current number. If the current item is a number, return pointer to it. * **Returns:** nullptr if the current item is not a number This function returns non-null for the cases of a ‘switch’ statement Also, if the current item is a casted number, then this function will succeed. #### get_current_label() → [int](https://docs.python.org/3/library/functions.html#int) Get current label. If there is a label under the cursor, return its number. * **Returns:** -1 if there is no label under the cursor. prereq: get_current_item() has been called #### clear() → [None](https://docs.python.org/3/library/constants.html#None) Clear the pseudocode window. It deletes the current function and microcode. #### refresh_cpos(idv: input_device_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Refresh the current position. This function refreshes the cpos field. * **Parameters:** **idv** – keyboard or mouse * **Returns:** false if failed #### get_current_item(idv: input_device_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Get current item. This function refreshes the cpos, item, tail fields. * **Parameters:** **idv** – keyboard or mouse * **Returns:** false if failed #### ui_rename_lvar(v: [lvar_t](#ida_hexrays.lvar_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Rename local variable. This function displays a dialog box and allows the user to rename a local variable. * **Parameters:** **v** – pointer to local variable * **Returns:** false if failed or cancelled #### rename_lvar(v: [lvar_t](#ida_hexrays.lvar_t), name: [str](https://docs.python.org/3/library/stdtypes.html#str), is_user_name: [bool](https://docs.python.org/3/library/functions.html#bool)) → [bool](https://docs.python.org/3/library/functions.html#bool) Rename local variable. This function permanently renames a local variable. * **Parameters:** * **v** – pointer to local variable * **name** – new variable name * **is_user_name** – use true to save the new name into the database. use false to delete the saved name. * **Returns:** false if failed #### ui_set_call_type(e: [cexpr_t](#ida_hexrays.cexpr_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Set type of a function call This function displays a dialog box and allows the user to change the type of a function call * **Parameters:** **e** – pointer to call expression * **Returns:** false if failed or cancelled #### ui_set_lvar_type(v: [lvar_t](#ida_hexrays.lvar_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Set local variable type. This function displays a dialog box and allows the user to change the type of a local variable. * **Parameters:** **v** – pointer to local variable * **Returns:** false if failed or cancelled #### set_lvar_type(v: [lvar_t](#ida_hexrays.lvar_t), type: [tinfo_t](../ida_typeinf/index.md#ida_typeinf.tinfo_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Set local variable type. This function permanently sets a local variable type and clears NOPTR flag if it was set before by function ‘set_noptr_lvar’ * **Parameters:** * **v** – pointer to local variable * **type** – new variable type * **Returns:** false if failed #### set_noptr_lvar(v: [lvar_t](#ida_hexrays.lvar_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Inform that local variable should have a non-pointer type This function permanently sets a corresponding variable flag (NOPTR) and removes type if it was set before by function ‘set_lvar_type’ * **Parameters:** **v** – pointer to local variable * **Returns:** false if failed #### ui_edit_lvar_cmt(v: [lvar_t](#ida_hexrays.lvar_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Set local variable comment. This function displays a dialog box and allows the user to edit the comment of a local variable. * **Parameters:** **v** – pointer to local variable * **Returns:** false if failed or cancelled #### set_lvar_cmt(v: [lvar_t](#ida_hexrays.lvar_t), cmt: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [bool](https://docs.python.org/3/library/functions.html#bool) Set local variable comment. This function permanently sets a variable comment. * **Parameters:** * **v** – pointer to local variable * **cmt** – new comment * **Returns:** false if failed #### ui_map_lvar(v: [lvar_t](#ida_hexrays.lvar_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Map a local variable to another. This function displays a variable list and allows the user to select mapping. * **Parameters:** **v** – pointer to local variable * **Returns:** false if failed or cancelled #### ui_unmap_lvar(v: [lvar_t](#ida_hexrays.lvar_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Unmap a local variable. This function displays list of variables mapped to the specified variable and allows the user to select a variable to unmap. * **Parameters:** **v** – pointer to local variable * **Returns:** false if failed or cancelled #### ui_add_cast(e: [cexpr_t](#ida_hexrays.cexpr_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Add a user-defined cast on the current expression. This function displays a dialog box and allows the user to enter a pointer type for the current expression. * **Returns:** false if failed or cancelled #### ui_noprop_lvar(v: [lvar_t](#ida_hexrays.lvar_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Forbid variable propagation. * **Parameters:** **v** – pointer to local variable * **Returns:** false if failed or cancelled #### map_lvar(frm: [lvar_t](#ida_hexrays.lvar_t), to: [lvar_t](#ida_hexrays.lvar_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Map a local variable to another. This function permanently maps one lvar to another. All occurrences of the mapped variable are replaced by the new variable * **Parameters:** **to** – the variable to map to. if nullptr, unmaps the variable * **Returns:** false if failed #### set_udm_type(udt_type: [tinfo_t](../ida_typeinf/index.md#ida_typeinf.tinfo_t), udm_idx: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) Set structure field type. This function displays a dialog box and allows the user to change the type of a structure field. * **Parameters:** * **udt_type** – structure/union type * **udm_idx** – index of the structure/union member * **Returns:** false if failed or cancelled #### rename_udm(udt_type: [tinfo_t](../ida_typeinf/index.md#ida_typeinf.tinfo_t), udm_idx: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) Rename structure field. This function displays a dialog box and allows the user to rename a structure field. * **Parameters:** * **udt_type** – structure/union type * **udm_idx** – index of the structure/union member * **Returns:** false if failed or cancelled #### set_global_type(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Set global item type. This function displays a dialog box and allows the user to change the type of a global item (data or function). * **Parameters:** **ea** – address of the global item * **Returns:** false if failed or cancelled #### rename_global(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Rename global item. This function displays a dialog box and allows the user to rename a global item (data or function). * **Parameters:** **ea** – address of the global item * **Returns:** false if failed or cancelled #### rename_label(label: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) Rename a label. This function displays a dialog box and allows the user to rename a statement label. * **Parameters:** **label** – label number * **Returns:** false if failed or cancelled #### jump_enter(idv: input_device_t, omflags: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) Process the Enter key. This function jumps to the definition of the item under the cursor. If the current item is a function, it will be decompiled. If the current item is a global data, its disassemly text will be displayed. * **Parameters:** * **idv** – what cursor must be used, the keyboard or the mouse * **omflags** – OM_NEWWIN: new pseudocode window will open, 0: reuse the existing window * **Returns:** false if failed #### ctree_to_disasm() → [bool](https://docs.python.org/3/library/functions.html#bool) Jump to disassembly. This function jumps to the address in the disassembly window which corresponds to the current item. The current item is determined based on the current keyboard cursor position. * **Returns:** false if failed #### calc_cmt_type(lnnum: [int](https://docs.python.org/3/library/functions.html#int), cmttype: cmt_type_t) → cmt_type_t Check if the specified line can have a comment. Due to the coordinate system for comments: ([[https://hex-rays.com/blog/coordinate-system-for-hex-rays](https://hex-rays.com/blog/coordinate-system-for-hex-rays](https://hex-rays.com/blog/coordinate-system-for-hex-rays](https://hex-rays.com/blog/coordinate-system-for-hex-rays))) some function lines cannot have comments. This function checks if a comment can be attached to the specified line. * **Parameters:** * **lnnum** – line number (0 based) * **cmttype** – comment types to check * **Returns:** possible comment types #### edit_cmt(loc: [treeloc_t](#ida_hexrays.treeloc_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Edit an indented comment. This function displays a dialog box and allows the user to edit the comment for the specified ctree location. * **Parameters:** **loc** – comment location * **Returns:** false if failed or cancelled #### edit_func_cmt() → [bool](https://docs.python.org/3/library/functions.html#bool) Edit a function comment. This function displays a dialog box and allows the user to edit the function comment. * **Returns:** false if failed or cancelled #### del_orphan_cmts() → [bool](https://docs.python.org/3/library/functions.html#bool) Delete all orphan comments. Delete all orphan comments and refresh the screen. * **Returns:** true #### set_num_radix(base: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) Change number base. This function changes the current number representation. * **Parameters:** **base** – number radix (10 or 16) 0 means a character constant * **Returns:** false if failed #### set_num_enum() → [bool](https://docs.python.org/3/library/functions.html#bool) Convert number to symbolic constant. This function displays a dialog box and allows the user to select a symbolic constant to represent the number. * **Returns:** false if failed or cancelled #### set_num_stroff() → [bool](https://docs.python.org/3/library/functions.html#bool) Convert number to structure field offset. Currently not implemented. * **Returns:** false if failed or cancelled #### invert_sign() → [bool](https://docs.python.org/3/library/functions.html#bool) Negate a number. This function negates the current number. * **Returns:** false if failed. #### invert_bits() → [bool](https://docs.python.org/3/library/functions.html#bool) Bitwise negate a number. This function inverts all bits of the current number. * **Returns:** false if failed. #### collapse_item(hide: [bool](https://docs.python.org/3/library/functions.html#bool)) → [bool](https://docs.python.org/3/library/functions.html#bool) Collapse/uncollapse item. This function collapses the current item. * **Returns:** false if failed. #### collapse_lvars(hide: [bool](https://docs.python.org/3/library/functions.html#bool)) → [bool](https://docs.python.org/3/library/functions.html#bool) Collapse/uncollapse local variable declarations. * **Returns:** false if failed. #### split_item(split: [bool](https://docs.python.org/3/library/functions.html#bool)) → [bool](https://docs.python.org/3/library/functions.html#bool) Split/unsplit item. This function splits the current assignment expression. * **Returns:** false if failed. ### ida_hexrays.CMT_NONE No comment is possible. ### ida_hexrays.CMT_TAIL Indented comment. ### ida_hexrays.CMT_BLOCK1 Anterioir block comment. ### ida_hexrays.CMT_BLOCK2 Posterior block comment. ### ida_hexrays.CMT_LVAR Local variable comment. ### ida_hexrays.CMT_FUNC Function comment. ### ida_hexrays.CMT_ALL All comments. ### ida_hexrays.VDUI_VISIBLE is visible? ### ida_hexrays.VDUI_VALID is valid? ### *class* ida_hexrays.ui_stroff_op_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### text *: [str](https://docs.python.org/3/library/stdtypes.html#str)* any text for the column “Operand” of widget #### offset *: [int](https://docs.python.org/3/library/functions.html#int)* operand offset, will be used when calculating the UDT path ### *class* ida_hexrays.ui_stroff_applicator_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### apply(opnum: [int](https://docs.python.org/3/library/functions.html#int), path: [intvec_t](../ida_pro/index.md#ida_pro.intvec_t), top_tif: [tinfo_t](../ida_typeinf/index.md#ida_typeinf.tinfo_t), spath: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [bool](https://docs.python.org/3/library/functions.html#bool) * **Parameters:** * **opnum** – operand ordinal number, see below * **path** – path describing the union selection, maybe empty * **top_tif** – tinfo_t of the selected toplevel UDT * **spath** – selected path ### ida_hexrays.select_udt_by_offset(udts: qvector< tinfo_t > const \*, ops: ui_stroff_ops_t, applicator: ui_stroff_applicator_t) → [int](https://docs.python.org/3/library/functions.html#int) Select UDT * **Parameters:** * **udts** – list of UDT tinfo_t for the selection, if nullptr or empty then UDTs from the “Local types” will be used * **ops** – operands * **applicator** – callback will be called to apply the selection for every operand ### ida_hexrays.hx_user_numforms_begin ### ida_hexrays.hx_user_numforms_end ### ida_hexrays.hx_user_numforms_next ### ida_hexrays.hx_user_numforms_prev ### ida_hexrays.hx_user_numforms_first ### ida_hexrays.hx_user_numforms_second ### ida_hexrays.hx_user_numforms_find ### ida_hexrays.hx_user_numforms_insert ### ida_hexrays.hx_user_numforms_erase ### ida_hexrays.hx_user_numforms_clear ### ida_hexrays.hx_user_numforms_size ### ida_hexrays.hx_user_numforms_free ### ida_hexrays.hx_user_numforms_new ### ida_hexrays.hx_lvar_mapping_begin ### ida_hexrays.hx_lvar_mapping_end ### ida_hexrays.hx_lvar_mapping_next ### ida_hexrays.hx_lvar_mapping_prev ### ida_hexrays.hx_lvar_mapping_first ### ida_hexrays.hx_lvar_mapping_second ### ida_hexrays.hx_lvar_mapping_find ### ida_hexrays.hx_lvar_mapping_insert ### ida_hexrays.hx_lvar_mapping_erase ### ida_hexrays.hx_lvar_mapping_clear ### ida_hexrays.hx_lvar_mapping_size ### ida_hexrays.hx_lvar_mapping_free ### ida_hexrays.hx_lvar_mapping_new ### ida_hexrays.hx_udcall_map_begin ### ida_hexrays.hx_udcall_map_end ### ida_hexrays.hx_udcall_map_next ### ida_hexrays.hx_udcall_map_prev ### ida_hexrays.hx_udcall_map_first ### ida_hexrays.hx_udcall_map_second ### ida_hexrays.hx_udcall_map_find ### ida_hexrays.hx_udcall_map_insert ### ida_hexrays.hx_udcall_map_erase ### ida_hexrays.hx_udcall_map_clear ### ida_hexrays.hx_udcall_map_size ### ida_hexrays.hx_udcall_map_free ### ida_hexrays.hx_udcall_map_new ### ida_hexrays.hx_user_cmts_begin ### ida_hexrays.hx_user_cmts_end ### ida_hexrays.hx_user_cmts_next ### ida_hexrays.hx_user_cmts_prev ### ida_hexrays.hx_user_cmts_first ### ida_hexrays.hx_user_cmts_second ### ida_hexrays.hx_user_cmts_find ### ida_hexrays.hx_user_cmts_insert ### ida_hexrays.hx_user_cmts_erase ### ida_hexrays.hx_user_cmts_clear ### ida_hexrays.hx_user_cmts_size ### ida_hexrays.hx_user_cmts_free ### ida_hexrays.hx_user_cmts_new ### ida_hexrays.hx_user_iflags_begin ### ida_hexrays.hx_user_iflags_end ### ida_hexrays.hx_user_iflags_next ### ida_hexrays.hx_user_iflags_prev ### ida_hexrays.hx_user_iflags_first ### ida_hexrays.hx_user_iflags_second ### ida_hexrays.hx_user_iflags_find ### ida_hexrays.hx_user_iflags_insert ### ida_hexrays.hx_user_iflags_erase ### ida_hexrays.hx_user_iflags_clear ### ida_hexrays.hx_user_iflags_size ### ida_hexrays.hx_user_iflags_free ### ida_hexrays.hx_user_iflags_new ### ida_hexrays.hx_user_unions_begin ### ida_hexrays.hx_user_unions_end ### ida_hexrays.hx_user_unions_next ### ida_hexrays.hx_user_unions_prev ### ida_hexrays.hx_user_unions_first ### ida_hexrays.hx_user_unions_second ### ida_hexrays.hx_user_unions_find ### ida_hexrays.hx_user_unions_insert ### ida_hexrays.hx_user_unions_erase ### ida_hexrays.hx_user_unions_clear ### ida_hexrays.hx_user_unions_size ### ida_hexrays.hx_user_unions_free ### ida_hexrays.hx_user_unions_new ### ida_hexrays.hx_user_labels_begin ### ida_hexrays.hx_user_labels_end ### ida_hexrays.hx_user_labels_next ### ida_hexrays.hx_user_labels_prev ### ida_hexrays.hx_user_labels_first ### ida_hexrays.hx_user_labels_second ### ida_hexrays.hx_user_labels_find ### ida_hexrays.hx_user_labels_insert ### ida_hexrays.hx_user_labels_erase ### ida_hexrays.hx_user_labels_clear ### ida_hexrays.hx_user_labels_size ### ida_hexrays.hx_user_labels_free ### ida_hexrays.hx_user_labels_new ### ida_hexrays.hx_eamap_begin ### ida_hexrays.hx_eamap_end ### ida_hexrays.hx_eamap_next ### ida_hexrays.hx_eamap_prev ### ida_hexrays.hx_eamap_first ### ida_hexrays.hx_eamap_second ### ida_hexrays.hx_eamap_find ### ida_hexrays.hx_eamap_insert ### ida_hexrays.hx_eamap_erase ### ida_hexrays.hx_eamap_clear ### ida_hexrays.hx_eamap_size ### ida_hexrays.hx_eamap_free ### ida_hexrays.hx_eamap_new ### ida_hexrays.hx_boundaries_begin ### ida_hexrays.hx_boundaries_end ### ida_hexrays.hx_boundaries_next ### ida_hexrays.hx_boundaries_prev ### ida_hexrays.hx_boundaries_first ### ida_hexrays.hx_boundaries_second ### ida_hexrays.hx_boundaries_find ### ida_hexrays.hx_boundaries_insert ### ida_hexrays.hx_boundaries_erase ### ida_hexrays.hx_boundaries_clear ### ida_hexrays.hx_boundaries_size ### ida_hexrays.hx_boundaries_free ### ida_hexrays.hx_boundaries_new ### ida_hexrays.hx_block_chains_begin ### ida_hexrays.hx_block_chains_end ### ida_hexrays.hx_block_chains_next ### ida_hexrays.hx_block_chains_prev ### ida_hexrays.hx_block_chains_get ### ida_hexrays.hx_block_chains_find ### ida_hexrays.hx_block_chains_insert ### ida_hexrays.hx_block_chains_erase ### ida_hexrays.hx_block_chains_clear ### ida_hexrays.hx_block_chains_size ### ida_hexrays.hx_block_chains_free ### ida_hexrays.hx_block_chains_new ### ida_hexrays.hx_hexrays_alloc ### ida_hexrays.hx_hexrays_free ### ida_hexrays.hx_valrng_t_clear ### ida_hexrays.hx_valrng_t_copy ### ida_hexrays.hx_valrng_t_assign ### ida_hexrays.hx_valrng_t_compare ### ida_hexrays.hx_valrng_t_set_eq ### ida_hexrays.hx_valrng_t_set_cmp ### ida_hexrays.hx_valrng_t_reduce_size ### ida_hexrays.hx_valrng_t_intersect_with ### ida_hexrays.hx_valrng_t_unite_with ### ida_hexrays.hx_valrng_t_inverse ### ida_hexrays.hx_valrng_t_has ### ida_hexrays.hx_valrng_t_print ### ida_hexrays.hx_valrng_t_dstr ### ida_hexrays.hx_valrng_t_cvt_to_single_value ### ida_hexrays.hx_valrng_t_cvt_to_cmp ### ida_hexrays.hx_get_merror_desc ### ida_hexrays.hx_must_mcode_close_block ### ida_hexrays.hx_is_mcode_propagatable ### ida_hexrays.hx_negate_mcode_relation ### ida_hexrays.hx_swap_mcode_relation ### ida_hexrays.hx_get_signed_mcode ### ida_hexrays.hx_get_unsigned_mcode ### ida_hexrays.hx_mcode_modifies_d ### ida_hexrays.hx_operand_locator_t_compare ### ida_hexrays.hx_vd_printer_t_print ### ida_hexrays.hx_file_printer_t_print ### ida_hexrays.hx_qstring_printer_t_print ### ida_hexrays.hx_dstr ### ida_hexrays.hx_is_type_correct ### ida_hexrays.hx_is_small_udt ### ida_hexrays.hx_is_nonbool_type ### ida_hexrays.hx_is_bool_type ### ida_hexrays.hx_partial_type_num ### ida_hexrays.hx_get_float_type ### ida_hexrays.hx_get_int_type_by_width_and_sign ### ida_hexrays.hx_get_unk_type ### ida_hexrays.hx_dummy_ptrtype ### ida_hexrays.hx_get_member_type ### ida_hexrays.hx_make_pointer ### ida_hexrays.hx_create_typedef ### ida_hexrays.hx_get_type ### ida_hexrays.hx_set_type ### ida_hexrays.hx_vdloc_t_dstr ### ida_hexrays.hx_vdloc_t_compare ### ida_hexrays.hx_vdloc_t_is_aliasable ### ida_hexrays.hx_print_vdloc ### ida_hexrays.hx_arglocs_overlap ### ida_hexrays.hx_lvar_locator_t_compare ### ida_hexrays.hx_lvar_locator_t_dstr ### ida_hexrays.hx_lvar_t_dstr ### ida_hexrays.hx_lvar_t_is_promoted_arg ### ida_hexrays.hx_lvar_t_accepts_type ### ida_hexrays.hx_lvar_t_set_lvar_type ### ida_hexrays.hx_lvar_t_set_width ### ida_hexrays.hx_lvar_t_append_list ### ida_hexrays.hx_lvar_t_append_list_ ### ida_hexrays.hx_lvars_t_find_stkvar ### ida_hexrays.hx_lvars_t_find ### ida_hexrays.hx_lvars_t_find_lvar ### ida_hexrays.hx_restore_user_lvar_settings ### ida_hexrays.hx_save_user_lvar_settings ### ida_hexrays.hx_modify_user_lvars ### ida_hexrays.hx_modify_user_lvar_info ### ida_hexrays.hx_locate_lvar ### ida_hexrays.hx_restore_user_defined_calls ### ida_hexrays.hx_save_user_defined_calls ### ida_hexrays.hx_parse_user_call ### ida_hexrays.hx_convert_to_user_call ### ida_hexrays.hx_install_microcode_filter ### ida_hexrays.hx_udc_filter_t_cleanup ### ida_hexrays.hx_udc_filter_t_init ### ida_hexrays.hx_udc_filter_t_apply ### ida_hexrays.hx_bitset_t_bitset_t ### ida_hexrays.hx_bitset_t_copy ### ida_hexrays.hx_bitset_t_add ### ida_hexrays.hx_bitset_t_add_ ### ida_hexrays.hx_bitset_t_add_\_ ### ida_hexrays.hx_bitset_t_sub ### ida_hexrays.hx_bitset_t_sub_ ### ida_hexrays.hx_bitset_t_sub_\_ ### ida_hexrays.hx_bitset_t_cut_at ### ida_hexrays.hx_bitset_t_shift_down ### ida_hexrays.hx_bitset_t_has ### ida_hexrays.hx_bitset_t_has_all ### ida_hexrays.hx_bitset_t_has_any ### ida_hexrays.hx_bitset_t_dstr ### ida_hexrays.hx_bitset_t_empty ### ida_hexrays.hx_bitset_t_count ### ida_hexrays.hx_bitset_t_count_ ### ida_hexrays.hx_bitset_t_last ### ida_hexrays.hx_bitset_t_fill_with_ones ### ida_hexrays.hx_bitset_t_fill_gaps ### ida_hexrays.hx_bitset_t_has_common ### ida_hexrays.hx_bitset_t_intersect ### ida_hexrays.hx_bitset_t_is_subset_of ### ida_hexrays.hx_bitset_t_compare ### ida_hexrays.hx_bitset_t_goup ### ida_hexrays.hx_ivl_t_dstr ### ida_hexrays.hx_ivl_t_compare ### ida_hexrays.hx_ivlset_t_add ### ida_hexrays.hx_ivlset_t_add_ ### ida_hexrays.hx_ivlset_t_addmasked ### ida_hexrays.hx_ivlset_t_sub ### ida_hexrays.hx_ivlset_t_sub_ ### ida_hexrays.hx_ivlset_t_has_common ### ida_hexrays.hx_ivlset_t_print ### ida_hexrays.hx_ivlset_t_dstr ### ida_hexrays.hx_ivlset_t_count ### ida_hexrays.hx_ivlset_t_has_common_ ### ida_hexrays.hx_ivlset_t_contains ### ida_hexrays.hx_ivlset_t_includes ### ida_hexrays.hx_ivlset_t_intersect ### ida_hexrays.hx_ivlset_t_compare ### ida_hexrays.hx_rlist_t_print ### ida_hexrays.hx_rlist_t_dstr ### ida_hexrays.hx_mlist_t_addmem ### ida_hexrays.hx_mlist_t_print ### ida_hexrays.hx_mlist_t_dstr ### ida_hexrays.hx_mlist_t_compare ### ida_hexrays.hx_get_temp_regs ### ida_hexrays.hx_is_kreg ### ida_hexrays.hx_reg2mreg ### ida_hexrays.hx_mreg2reg ### ida_hexrays.hx_get_mreg_name ### ida_hexrays.hx_install_optinsn_handler ### ida_hexrays.hx_remove_optinsn_handler ### ida_hexrays.hx_install_optblock_handler ### ida_hexrays.hx_remove_optblock_handler ### ida_hexrays.hx_simple_graph_t_compute_dominators ### ida_hexrays.hx_simple_graph_t_compute_immediate_dominators ### ida_hexrays.hx_simple_graph_t_depth_first_preorder ### ida_hexrays.hx_simple_graph_t_depth_first_postorder ### ida_hexrays.hx_simple_graph_t_goup ### ida_hexrays.hx_mutable_graph_t_resize ### ida_hexrays.hx_mutable_graph_t_goup ### ida_hexrays.hx_mutable_graph_t_del_edge ### ida_hexrays.hx_lvar_ref_t_compare ### ida_hexrays.hx_lvar_ref_t_var ### ida_hexrays.hx_stkvar_ref_t_compare ### ida_hexrays.hx_stkvar_ref_t_get_stkvar ### ida_hexrays.hx_fnumber_t_print ### ida_hexrays.hx_fnumber_t_dstr ### ida_hexrays.hx_mop_t_copy ### ida_hexrays.hx_mop_t_assign ### ida_hexrays.hx_mop_t_swap ### ida_hexrays.hx_mop_t_erase ### ida_hexrays.hx_mop_t_print ### ida_hexrays.hx_mop_t_dstr ### ida_hexrays.hx_mop_t_create_from_mlist ### ida_hexrays.hx_mop_t_create_from_ivlset ### ida_hexrays.hx_mop_t_create_from_vdloc ### ida_hexrays.hx_mop_t_create_from_scattered_vdloc ### ida_hexrays.hx_mop_t_create_from_insn ### ida_hexrays.hx_mop_t_make_number ### ida_hexrays.hx_mop_t_make_fpnum ### ida_hexrays.hx_mop_t_\_make_gvar ### ida_hexrays.hx_mop_t_make_gvar ### ida_hexrays.hx_mop_t_make_reg_pair ### ida_hexrays.hx_mop_t_make_helper ### ida_hexrays.hx_mop_t_is_bit_reg ### ida_hexrays.hx_mop_t_may_use_aliased_memory ### ida_hexrays.hx_mop_t_is01 ### ida_hexrays.hx_mop_t_is_sign_extended_from ### ida_hexrays.hx_mop_t_is_zero_extended_from ### ida_hexrays.hx_mop_t_equal_mops ### ida_hexrays.hx_mop_t_lexcompare ### ida_hexrays.hx_mop_t_for_all_ops ### ida_hexrays.hx_mop_t_for_all_scattered_submops ### ida_hexrays.hx_mop_t_is_constant ### ida_hexrays.hx_mop_t_get_stkoff ### ida_hexrays.hx_mop_t_make_low_half ### ida_hexrays.hx_mop_t_make_high_half ### ida_hexrays.hx_mop_t_make_first_half ### ida_hexrays.hx_mop_t_make_second_half ### ida_hexrays.hx_mop_t_shift_mop ### ida_hexrays.hx_mop_t_change_size ### ida_hexrays.hx_mop_t_preserve_side_effects ### ida_hexrays.hx_mop_t_apply_ld_mcode ### ida_hexrays.hx_mcallarg_t_print ### ida_hexrays.hx_mcallarg_t_dstr ### ida_hexrays.hx_mcallarg_t_set_regarg ### ida_hexrays.hx_mcallinfo_t_lexcompare ### ida_hexrays.hx_mcallinfo_t_set_type ### ida_hexrays.hx_mcallinfo_t_get_type ### ida_hexrays.hx_mcallinfo_t_print ### ida_hexrays.hx_mcallinfo_t_dstr ### ida_hexrays.hx_mcases_t_compare ### ida_hexrays.hx_mcases_t_print ### ida_hexrays.hx_mcases_t_dstr ### ida_hexrays.hx_vivl_t_extend_to_cover ### ida_hexrays.hx_vivl_t_intersect ### ida_hexrays.hx_vivl_t_print ### ida_hexrays.hx_vivl_t_dstr ### ida_hexrays.hx_chain_t_print ### ida_hexrays.hx_chain_t_dstr ### ida_hexrays.hx_chain_t_append_list ### ida_hexrays.hx_chain_t_append_list_ ### ida_hexrays.hx_block_chains_t_get_chain ### ida_hexrays.hx_block_chains_t_print ### ida_hexrays.hx_block_chains_t_dstr ### ida_hexrays.hx_graph_chains_t_for_all_chains ### ida_hexrays.hx_graph_chains_t_release ### ida_hexrays.hx_minsn_t_init ### ida_hexrays.hx_minsn_t_copy ### ida_hexrays.hx_minsn_t_set_combined ### ida_hexrays.hx_minsn_t_swap ### ida_hexrays.hx_minsn_t_print ### ida_hexrays.hx_minsn_t_dstr ### ida_hexrays.hx_minsn_t_setaddr ### ida_hexrays.hx_minsn_t_optimize_subtree ### ida_hexrays.hx_minsn_t_for_all_ops ### ida_hexrays.hx_minsn_t_for_all_insns ### ida_hexrays.hx_minsn_t_\_make_nop ### ida_hexrays.hx_minsn_t_equal_insns ### ida_hexrays.hx_minsn_t_lexcompare ### ida_hexrays.hx_minsn_t_is_noret_call ### ida_hexrays.hx_minsn_t_is_helper ### ida_hexrays.hx_minsn_t_find_call ### ida_hexrays.hx_minsn_t_has_side_effects ### ida_hexrays.hx_minsn_t_find_opcode ### ida_hexrays.hx_minsn_t_find_ins_op ### ida_hexrays.hx_minsn_t_find_num_op ### ida_hexrays.hx_minsn_t_modifies_d ### ida_hexrays.hx_minsn_t_is_between ### ida_hexrays.hx_minsn_t_may_use_aliased_memory ### ida_hexrays.hx_minsn_t_serialize ### ida_hexrays.hx_minsn_t_deserialize ### ida_hexrays.hx_getf_reginsn ### ida_hexrays.hx_getb_reginsn ### ida_hexrays.hx_mblock_t_init ### ida_hexrays.hx_mblock_t_print ### ida_hexrays.hx_mblock_t_dump ### ida_hexrays.hx_mblock_t_vdump_block ### ida_hexrays.hx_mblock_t_insert_into_block ### ida_hexrays.hx_mblock_t_remove_from_block ### ida_hexrays.hx_mblock_t_for_all_insns ### ida_hexrays.hx_mblock_t_for_all_ops ### ida_hexrays.hx_mblock_t_for_all_uses ### ida_hexrays.hx_mblock_t_optimize_insn ### ida_hexrays.hx_mblock_t_optimize_block ### ida_hexrays.hx_mblock_t_build_lists ### ida_hexrays.hx_mblock_t_optimize_useless_jump ### ida_hexrays.hx_mblock_t_append_use_list ### ida_hexrays.hx_mblock_t_append_def_list ### ida_hexrays.hx_mblock_t_build_use_list ### ida_hexrays.hx_mblock_t_build_def_list ### ida_hexrays.hx_mblock_t_find_first_use ### ida_hexrays.hx_mblock_t_find_redefinition ### ida_hexrays.hx_mblock_t_is_rhs_redefined ### ida_hexrays.hx_mblock_t_find_access ### ida_hexrays.hx_mblock_t_get_valranges ### ida_hexrays.hx_mblock_t_get_valranges_ ### ida_hexrays.hx_mblock_t_get_reginsn_qty ### ida_hexrays.hx_mba_ranges_t_range_contains ### ida_hexrays.hx_mba_t_stkoff_vd2ida ### ida_hexrays.hx_mba_t_stkoff_ida2vd ### ida_hexrays.hx_mba_t_idaloc2vd ### ida_hexrays.hx_mba_t_idaloc2vd_ ### ida_hexrays.hx_mba_t_vd2idaloc ### ida_hexrays.hx_mba_t_vd2idaloc_ ### ida_hexrays.hx_mba_t_term ### ida_hexrays.hx_mba_t_get_curfunc ### ida_hexrays.hx_mba_t_set_maturity ### ida_hexrays.hx_mba_t_optimize_local ### ida_hexrays.hx_mba_t_build_graph ### ida_hexrays.hx_mba_t_get_graph ### ida_hexrays.hx_mba_t_analyze_calls ### ida_hexrays.hx_mba_t_optimize_global ### ida_hexrays.hx_mba_t_alloc_lvars ### ida_hexrays.hx_mba_t_dump ### ida_hexrays.hx_mba_t_vdump_mba ### ida_hexrays.hx_mba_t_print ### ida_hexrays.hx_mba_t_verify ### ida_hexrays.hx_mba_t_mark_chains_dirty ### ida_hexrays.hx_mba_t_insert_block ### ida_hexrays.hx_mba_t_remove_block ### ida_hexrays.hx_mba_t_copy_block ### ida_hexrays.hx_mba_t_remove_empty_and_unreachable_blocks ### ida_hexrays.hx_mba_t_merge_blocks ### ida_hexrays.hx_mba_t_for_all_ops ### ida_hexrays.hx_mba_t_for_all_insns ### ida_hexrays.hx_mba_t_for_all_topinsns ### ida_hexrays.hx_mba_t_find_mop ### ida_hexrays.hx_mba_t_create_helper_call ### ida_hexrays.hx_mba_t_get_func_output_lists ### ida_hexrays.hx_mba_t_arg ### ida_hexrays.hx_mba_t_alloc_fict_ea ### ida_hexrays.hx_mba_t_map_fict_ea ### ida_hexrays.hx_mba_t_serialize ### ida_hexrays.hx_mba_t_deserialize ### ida_hexrays.hx_mba_t_save_snapshot ### ida_hexrays.hx_mba_t_alloc_kreg ### ida_hexrays.hx_mba_t_free_kreg ### ida_hexrays.hx_mba_t_inline_func ### ida_hexrays.hx_mba_t_locate_stkpnt ### ida_hexrays.hx_mba_t_set_lvar_name ### ida_hexrays.hx_mbl_graph_t_is_accessed_globally ### ida_hexrays.hx_mbl_graph_t_get_ud ### ida_hexrays.hx_mbl_graph_t_get_du ### ida_hexrays.hx_cdg_insn_iterator_t_next ### ida_hexrays.hx_codegen_t_clear ### ida_hexrays.hx_codegen_t_emit ### ida_hexrays.hx_codegen_t_emit_ ### ida_hexrays.hx_change_hexrays_config ### ida_hexrays.hx_get_hexrays_version ### ida_hexrays.hx_open_pseudocode ### ida_hexrays.hx_close_pseudocode ### ida_hexrays.hx_get_widget_vdui ### ida_hexrays.hx_decompile_many ### ida_hexrays.hx_hexrays_failure_t_desc ### ida_hexrays.hx_send_database ### ida_hexrays.hx_gco_info_t_append_to_list ### ida_hexrays.hx_get_current_operand ### ida_hexrays.hx_remitem ### ida_hexrays.hx_negated_relation ### ida_hexrays.hx_swapped_relation ### ida_hexrays.hx_get_op_signness ### ida_hexrays.hx_asgop ### ida_hexrays.hx_asgop_revert ### ida_hexrays.hx_cnumber_t_print ### ida_hexrays.hx_cnumber_t_value ### ida_hexrays.hx_cnumber_t_assign ### ida_hexrays.hx_cnumber_t_compare ### ida_hexrays.hx_var_ref_t_compare ### ida_hexrays.hx_ctree_visitor_t_apply_to ### ida_hexrays.hx_ctree_visitor_t_apply_to_exprs ### ida_hexrays.hx_ctree_parentee_t_recalc_parent_types ### ida_hexrays.hx_cfunc_parentee_t_calc_rvalue_type ### ida_hexrays.hx_citem_locator_t_compare ### ida_hexrays.hx_citem_t_contains_expr ### ida_hexrays.hx_citem_t_contains_label ### ida_hexrays.hx_citem_t_find_parent_of ### ida_hexrays.hx_citem_t_find_closest_addr ### ida_hexrays.hx_cexpr_t_assign ### ida_hexrays.hx_cexpr_t_compare ### ida_hexrays.hx_cexpr_t_replace_by ### ida_hexrays.hx_cexpr_t_cleanup ### ida_hexrays.hx_cexpr_t_put_number ### ida_hexrays.hx_cexpr_t_print1 ### ida_hexrays.hx_cexpr_t_calc_type ### ida_hexrays.hx_cexpr_t_equal_effect ### ida_hexrays.hx_cexpr_t_is_child_of ### ida_hexrays.hx_cexpr_t_contains_operator ### ida_hexrays.hx_cexpr_t_get_high_nbit_bound ### ida_hexrays.hx_cexpr_t_get_low_nbit_bound ### ida_hexrays.hx_cexpr_t_requires_lvalue ### ida_hexrays.hx_cexpr_t_has_side_effects ### ida_hexrays.hx_cexpr_t_maybe_ptr ### ida_hexrays.hx_cexpr_t_dstr ### ida_hexrays.hx_cif_t_assign ### ida_hexrays.hx_cif_t_compare ### ida_hexrays.hx_cloop_t_assign ### ida_hexrays.hx_cfor_t_compare ### ida_hexrays.hx_cwhile_t_compare ### ida_hexrays.hx_cdo_t_compare ### ida_hexrays.hx_creturn_t_compare ### ida_hexrays.hx_cthrow_t_compare ### ida_hexrays.hx_cgoto_t_compare ### ida_hexrays.hx_casm_t_compare ### ida_hexrays.hx_cinsn_t_assign ### ida_hexrays.hx_cinsn_t_compare ### ida_hexrays.hx_cinsn_t_replace_by ### ida_hexrays.hx_cinsn_t_cleanup ### ida_hexrays.hx_cinsn_t_new_insn ### ida_hexrays.hx_cinsn_t_create_if ### ida_hexrays.hx_cinsn_t_print ### ida_hexrays.hx_cinsn_t_print1 ### ida_hexrays.hx_cinsn_t_is_ordinary_flow ### ida_hexrays.hx_cinsn_t_contains_insn ### ida_hexrays.hx_cinsn_t_collect_free_breaks ### ida_hexrays.hx_cinsn_t_collect_free_continues ### ida_hexrays.hx_cinsn_t_dstr ### ida_hexrays.hx_cblock_t_compare ### ida_hexrays.hx_carglist_t_compare ### ida_hexrays.hx_ccase_t_compare ### ida_hexrays.hx_ccases_t_compare ### ida_hexrays.hx_cswitch_t_compare ### ida_hexrays.hx_ccatch_t_compare ### ida_hexrays.hx_ctry_t_compare ### ida_hexrays.hx_ctree_item_t_get_udm ### ida_hexrays.hx_ctree_item_t_get_edm ### ida_hexrays.hx_ctree_item_t_get_lvar ### ida_hexrays.hx_ctree_item_t_get_ea ### ida_hexrays.hx_ctree_item_t_get_label_num ### ida_hexrays.hx_ctree_item_t_print ### ida_hexrays.hx_ctree_item_t_dstr ### ida_hexrays.hx_lnot ### ida_hexrays.hx_new_block ### ida_hexrays.hx_vcreate_helper ### ida_hexrays.hx_vcall_helper ### ida_hexrays.hx_make_num ### ida_hexrays.hx_make_ref ### ida_hexrays.hx_dereference ### ida_hexrays.hx_save_user_labels ### ida_hexrays.hx_save_user_cmts ### ida_hexrays.hx_save_user_numforms ### ida_hexrays.hx_save_user_iflags ### ida_hexrays.hx_save_user_unions ### ida_hexrays.hx_restore_user_labels ### ida_hexrays.hx_restore_user_cmts ### ida_hexrays.hx_restore_user_numforms ### ida_hexrays.hx_restore_user_iflags ### ida_hexrays.hx_restore_user_unions ### ida_hexrays.hx_cfunc_t_build_c_tree ### ida_hexrays.hx_cfunc_t_verify ### ida_hexrays.hx_cfunc_t_print_dcl ### ida_hexrays.hx_cfunc_t_print_func ### ida_hexrays.hx_cfunc_t_get_func_type ### ida_hexrays.hx_cfunc_t_get_lvars ### ida_hexrays.hx_cfunc_t_get_stkoff_delta ### ida_hexrays.hx_cfunc_t_find_label ### ida_hexrays.hx_cfunc_t_remove_unused_labels ### ida_hexrays.hx_cfunc_t_get_user_cmt ### ida_hexrays.hx_cfunc_t_set_user_cmt ### ida_hexrays.hx_cfunc_t_get_user_iflags ### ida_hexrays.hx_cfunc_t_set_user_iflags ### ida_hexrays.hx_cfunc_t_has_orphan_cmts ### ida_hexrays.hx_cfunc_t_del_orphan_cmts ### ida_hexrays.hx_cfunc_t_get_user_union_selection ### ida_hexrays.hx_cfunc_t_set_user_union_selection ### ida_hexrays.hx_cfunc_t_save_user_labels ### ida_hexrays.hx_cfunc_t_save_user_cmts ### ida_hexrays.hx_cfunc_t_save_user_numforms ### ida_hexrays.hx_cfunc_t_save_user_iflags ### ida_hexrays.hx_cfunc_t_save_user_unions ### ida_hexrays.hx_cfunc_t_get_line_item ### ida_hexrays.hx_cfunc_t_get_warnings ### ida_hexrays.hx_cfunc_t_get_eamap ### ida_hexrays.hx_cfunc_t_get_boundaries ### ida_hexrays.hx_cfunc_t_get_pseudocode ### ida_hexrays.hx_cfunc_t_refresh_func_ctext ### ida_hexrays.hx_cfunc_t_gather_derefs ### ida_hexrays.hx_cfunc_t_find_item_coords ### ida_hexrays.hx_cfunc_t_cleanup ### ida_hexrays.hx_close_hexrays_waitbox ### ida_hexrays.hx_decompile ### ida_hexrays.hx_gen_microcode ### ida_hexrays.hx_create_cfunc ### ida_hexrays.hx_mark_cfunc_dirty ### ida_hexrays.hx_clear_cached_cfuncs ### ida_hexrays.hx_has_cached_cfunc ### ida_hexrays.hx_get_ctype_name ### ida_hexrays.hx_create_field_name ### ida_hexrays.hx_install_hexrays_callback ### ida_hexrays.hx_remove_hexrays_callback ### ida_hexrays.hx_vdui_t_set_locked ### ida_hexrays.hx_vdui_t_refresh_view ### ida_hexrays.hx_vdui_t_refresh_ctext ### ida_hexrays.hx_vdui_t_switch_to ### ida_hexrays.hx_vdui_t_get_number ### ida_hexrays.hx_vdui_t_get_current_label ### ida_hexrays.hx_vdui_t_clear ### ida_hexrays.hx_vdui_t_refresh_cpos ### ida_hexrays.hx_vdui_t_get_current_item ### ida_hexrays.hx_vdui_t_ui_rename_lvar ### ida_hexrays.hx_vdui_t_rename_lvar ### ida_hexrays.hx_vdui_t_ui_set_call_type ### ida_hexrays.hx_vdui_t_ui_set_lvar_type ### ida_hexrays.hx_vdui_t_set_lvar_type ### ida_hexrays.hx_vdui_t_set_noptr_lvar ### ida_hexrays.hx_vdui_t_ui_edit_lvar_cmt ### ida_hexrays.hx_vdui_t_set_lvar_cmt ### ida_hexrays.hx_vdui_t_ui_map_lvar ### ida_hexrays.hx_vdui_t_ui_unmap_lvar ### ida_hexrays.hx_vdui_t_map_lvar ### ida_hexrays.hx_vdui_t_set_udm_type ### ida_hexrays.hx_vdui_t_rename_udm ### ida_hexrays.hx_vdui_t_set_global_type ### ida_hexrays.hx_vdui_t_rename_global ### ida_hexrays.hx_vdui_t_rename_label ### ida_hexrays.hx_vdui_t_jump_enter ### ida_hexrays.hx_vdui_t_ctree_to_disasm ### ida_hexrays.hx_vdui_t_calc_cmt_type ### ida_hexrays.hx_vdui_t_edit_cmt ### ida_hexrays.hx_vdui_t_edit_func_cmt ### ida_hexrays.hx_vdui_t_del_orphan_cmts ### ida_hexrays.hx_vdui_t_set_num_radix ### ida_hexrays.hx_vdui_t_set_num_enum ### ida_hexrays.hx_vdui_t_set_num_stroff ### ida_hexrays.hx_vdui_t_invert_sign ### ida_hexrays.hx_vdui_t_invert_bits ### ida_hexrays.hx_vdui_t_collapse_item ### ida_hexrays.hx_vdui_t_collapse_lvars ### ida_hexrays.hx_vdui_t_split_item ### ida_hexrays.hx_select_udt_by_offset ### ida_hexrays.hx_catchexpr_t_compare ### ida_hexrays.hx_mba_t_split_block ### ida_hexrays.hx_mba_t_remove_blocks ### ida_hexrays.hx_cfunc_t_recalc_item_addresses ### ida_hexrays.hx_obsolete_int64_emulator_t_mop_value ### ida_hexrays.hx_obsolete_int64_emulator_t_minsn_value ### ida_hexrays.hx_int64_emulator_t_\_mop_value ### ida_hexrays.hx_int64_emulator_t_\_minsn_value ### ida_hexrays.hx_cfunc_t_serialize ### ida_hexrays.hx_cfunc_t_deserialize ### ida_hexrays.hx_mblock_t_verify_insn ### ida_hexrays.hx_vdui_t_ui_noprop_lvar ### ida_hexrays.hx_save_user_casts ### ida_hexrays.hx_restore_user_casts ### ida_hexrays.hx_user_casts_begin ### ida_hexrays.hx_user_casts_end ### ida_hexrays.hx_user_casts_next ### ida_hexrays.hx_user_casts_prev ### ida_hexrays.hx_user_casts_first ### ida_hexrays.hx_user_casts_second ### ida_hexrays.hx_user_casts_find ### ida_hexrays.hx_user_casts_insert ### ida_hexrays.hx_user_casts_erase ### ida_hexrays.hx_user_casts_clear ### ida_hexrays.hx_user_casts_size ### ida_hexrays.hx_user_casts_free ### ida_hexrays.hx_user_casts_new ### ida_hexrays.hx_cfunc_t_save_user_casts ### ida_hexrays.hx_cfunc_t_set_user_cast ### ida_hexrays.hx_cfunc_t_get_user_cast ### ida_hexrays.hx_vdui_t_ui_add_cast ### ida_hexrays.hx_cfunc_t_redirect_gotos ### ida_hexrays.hx_mba_t_add_user_minsn ### ida_hexrays.hx_mba_t_del_user_minsn ### ida_hexrays.hx_add_user_minsn ### ida_hexrays.hx_del_user_minsn ### ida_hexrays.hx_user_minsn_t_compare ### ida_hexrays.hx_decomp_ranges_t_range_contains ### ida_hexrays.hx_mba_t_get_decomp_ranges ### ida_hexrays.hx_mba_t_inline_function ### ida_hexrays.hx_decompile_ ### ida_hexrays.hx_gen_microcode_ ### ida_hexrays.hx_mop_t_get_bitwidth ### ida_hexrays.hx_mblock_t_undef_spoiled_regs ### ida_hexrays.hx_mba_t_get_numform ### ida_hexrays.hx_mba_t_set_numform ### ida_hexrays.hx_mba_t_clr_numform ### ida_hexrays.hx_get_cached_cfunc_eas ### ida_hexrays.hx_cfunc_t_find_addressable_item ### *class* ida_hexrays.user_numforms_iterator_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### x *: iterator_word* ### ida_hexrays.user_numforms_first(p: [user_numforms_iterator_t](#ida_hexrays.user_numforms_iterator_t)) → operand_locator_t const & Get reference to the current map key. ### ida_hexrays.user_numforms_second(p: [user_numforms_iterator_t](#ida_hexrays.user_numforms_iterator_t)) → number_format_t & Get reference to the current map value. ### ida_hexrays.user_numforms_find(map: [user_numforms_t](#ida_hexrays.user_numforms_t), key: [operand_locator_t](#ida_hexrays.operand_locator_t)) → [user_numforms_iterator_t](#ida_hexrays.user_numforms_iterator_t) Find the specified key in user_numforms_t. ### ida_hexrays.user_numforms_insert(map: [user_numforms_t](#ida_hexrays.user_numforms_t), key: [operand_locator_t](#ida_hexrays.operand_locator_t), val: [number_format_t](#ida_hexrays.number_format_t)) → [user_numforms_iterator_t](#ida_hexrays.user_numforms_iterator_t) Insert new (operand_locator_t, number_format_t) pair into user_numforms_t. ### ida_hexrays.user_numforms_begin(map: [user_numforms_t](#ida_hexrays.user_numforms_t)) → [user_numforms_iterator_t](#ida_hexrays.user_numforms_iterator_t) Get iterator pointing to the beginning of user_numforms_t. ### ida_hexrays.user_numforms_end(map: [user_numforms_t](#ida_hexrays.user_numforms_t)) → [user_numforms_iterator_t](#ida_hexrays.user_numforms_iterator_t) Get iterator pointing to the end of user_numforms_t. ### ida_hexrays.user_numforms_next(p: [user_numforms_iterator_t](#ida_hexrays.user_numforms_iterator_t)) → [user_numforms_iterator_t](#ida_hexrays.user_numforms_iterator_t) Move to the next element. ### ida_hexrays.user_numforms_prev(p: [user_numforms_iterator_t](#ida_hexrays.user_numforms_iterator_t)) → [user_numforms_iterator_t](#ida_hexrays.user_numforms_iterator_t) Move to the previous element. ### ida_hexrays.user_numforms_erase(map: [user_numforms_t](#ida_hexrays.user_numforms_t), p: [user_numforms_iterator_t](#ida_hexrays.user_numforms_iterator_t)) → [None](https://docs.python.org/3/library/constants.html#None) Erase current element from user_numforms_t. ### ida_hexrays.user_numforms_clear(map: [user_numforms_t](#ida_hexrays.user_numforms_t)) → [None](https://docs.python.org/3/library/constants.html#None) Clear user_numforms_t. ### ida_hexrays.user_numforms_size(map: [user_numforms_t](#ida_hexrays.user_numforms_t)) → [int](https://docs.python.org/3/library/functions.html#int) Get size of user_numforms_t. ### ida_hexrays.user_numforms_free(map: [user_numforms_t](#ida_hexrays.user_numforms_t)) → [None](https://docs.python.org/3/library/constants.html#None) Delete user_numforms_t instance. ### ida_hexrays.user_numforms_new() → user_numforms_t \* Create a new user_numforms_t instance. ### *class* ida_hexrays.lvar_mapping_iterator_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### x *: iterator_word* ### ida_hexrays.lvar_mapping_first(p: [lvar_mapping_iterator_t](#ida_hexrays.lvar_mapping_iterator_t)) → lvar_locator_t const & Get reference to the current map key. ### ida_hexrays.lvar_mapping_second(p: [lvar_mapping_iterator_t](#ida_hexrays.lvar_mapping_iterator_t)) → lvar_locator_t & Get reference to the current map value. ### ida_hexrays.lvar_mapping_find(map: [lvar_mapping_t](#ida_hexrays.lvar_mapping_t), key: [lvar_locator_t](#ida_hexrays.lvar_locator_t)) → [lvar_mapping_iterator_t](#ida_hexrays.lvar_mapping_iterator_t) Find the specified key in lvar_mapping_t. ### ida_hexrays.lvar_mapping_insert(map: [lvar_mapping_t](#ida_hexrays.lvar_mapping_t), key: [lvar_locator_t](#ida_hexrays.lvar_locator_t), val: [lvar_locator_t](#ida_hexrays.lvar_locator_t)) → [lvar_mapping_iterator_t](#ida_hexrays.lvar_mapping_iterator_t) Insert new (lvar_locator_t, lvar_locator_t) pair into lvar_mapping_t. ### ida_hexrays.lvar_mapping_begin(map: [lvar_mapping_t](#ida_hexrays.lvar_mapping_t)) → [lvar_mapping_iterator_t](#ida_hexrays.lvar_mapping_iterator_t) Get iterator pointing to the beginning of lvar_mapping_t. ### ida_hexrays.lvar_mapping_end(map: [lvar_mapping_t](#ida_hexrays.lvar_mapping_t)) → [lvar_mapping_iterator_t](#ida_hexrays.lvar_mapping_iterator_t) Get iterator pointing to the end of lvar_mapping_t. ### ida_hexrays.lvar_mapping_next(p: [lvar_mapping_iterator_t](#ida_hexrays.lvar_mapping_iterator_t)) → [lvar_mapping_iterator_t](#ida_hexrays.lvar_mapping_iterator_t) Move to the next element. ### ida_hexrays.lvar_mapping_prev(p: [lvar_mapping_iterator_t](#ida_hexrays.lvar_mapping_iterator_t)) → [lvar_mapping_iterator_t](#ida_hexrays.lvar_mapping_iterator_t) Move to the previous element. ### ida_hexrays.lvar_mapping_erase(map: [lvar_mapping_t](#ida_hexrays.lvar_mapping_t), p: [lvar_mapping_iterator_t](#ida_hexrays.lvar_mapping_iterator_t)) → [None](https://docs.python.org/3/library/constants.html#None) Erase current element from lvar_mapping_t. ### ida_hexrays.lvar_mapping_clear(map: [lvar_mapping_t](#ida_hexrays.lvar_mapping_t)) → [None](https://docs.python.org/3/library/constants.html#None) Clear lvar_mapping_t. ### ida_hexrays.lvar_mapping_size(map: [lvar_mapping_t](#ida_hexrays.lvar_mapping_t)) → [int](https://docs.python.org/3/library/functions.html#int) Get size of lvar_mapping_t. ### ida_hexrays.lvar_mapping_free(map: [lvar_mapping_t](#ida_hexrays.lvar_mapping_t)) → [None](https://docs.python.org/3/library/constants.html#None) Delete lvar_mapping_t instance. ### ida_hexrays.lvar_mapping_new() → lvar_mapping_t \* Create a new lvar_mapping_t instance. ### *class* ida_hexrays.udcall_map_iterator_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### x *: iterator_word* ### ida_hexrays.udcall_map_first(p: [udcall_map_iterator_t](#ida_hexrays.udcall_map_iterator_t)) → ea_t const & Get reference to the current map key. ### ida_hexrays.udcall_map_second(p: [udcall_map_iterator_t](#ida_hexrays.udcall_map_iterator_t)) → udcall_t & Get reference to the current map value. ### ida_hexrays.udcall_map_find(map: udcall_map_t const \*, key: ea_t const &) → [udcall_map_iterator_t](#ida_hexrays.udcall_map_iterator_t) Find the specified key in udcall_map_t. ### ida_hexrays.udcall_map_insert(map: udcall_map_t \*, key: ea_t const &, val: udcall_t) → [udcall_map_iterator_t](#ida_hexrays.udcall_map_iterator_t) Insert new (ea_t, udcall_t) pair into udcall_map_t. ### ida_hexrays.udcall_map_begin(map: udcall_map_t const \*) → [udcall_map_iterator_t](#ida_hexrays.udcall_map_iterator_t) Get iterator pointing to the beginning of udcall_map_t. ### ida_hexrays.udcall_map_end(map: udcall_map_t const \*) → [udcall_map_iterator_t](#ida_hexrays.udcall_map_iterator_t) Get iterator pointing to the end of udcall_map_t. ### ida_hexrays.udcall_map_next(p: [udcall_map_iterator_t](#ida_hexrays.udcall_map_iterator_t)) → [udcall_map_iterator_t](#ida_hexrays.udcall_map_iterator_t) Move to the next element. ### ida_hexrays.udcall_map_prev(p: [udcall_map_iterator_t](#ida_hexrays.udcall_map_iterator_t)) → [udcall_map_iterator_t](#ida_hexrays.udcall_map_iterator_t) Move to the previous element. ### ida_hexrays.udcall_map_erase(map: udcall_map_t \*, p: udcall_map_iterator_t) → [None](https://docs.python.org/3/library/constants.html#None) Erase current element from udcall_map_t. ### ida_hexrays.udcall_map_clear(map: udcall_map_t \*) → [None](https://docs.python.org/3/library/constants.html#None) Clear udcall_map_t. ### ida_hexrays.udcall_map_size(map: udcall_map_t \*) → [int](https://docs.python.org/3/library/functions.html#int) Get size of udcall_map_t. ### ida_hexrays.udcall_map_free(map: udcall_map_t \*) → [None](https://docs.python.org/3/library/constants.html#None) Delete udcall_map_t instance. ### ida_hexrays.udcall_map_new() → udcall_map_t \* Create a new udcall_map_t instance. ### *class* ida_hexrays.user_cmts_iterator_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### x *: iterator_word* ### ida_hexrays.user_cmts_first(p: [user_cmts_iterator_t](#ida_hexrays.user_cmts_iterator_t)) → treeloc_t const & Get reference to the current map key. ### ida_hexrays.user_cmts_second(p: [user_cmts_iterator_t](#ida_hexrays.user_cmts_iterator_t)) → citem_cmt_t & Get reference to the current map value. ### ida_hexrays.user_cmts_find(map: [user_cmts_t](#ida_hexrays.user_cmts_t), key: [treeloc_t](#ida_hexrays.treeloc_t)) → [user_cmts_iterator_t](#ida_hexrays.user_cmts_iterator_t) Find the specified key in user_cmts_t. ### ida_hexrays.user_cmts_insert(map: [user_cmts_t](#ida_hexrays.user_cmts_t), key: [treeloc_t](#ida_hexrays.treeloc_t), val: [citem_cmt_t](#ida_hexrays.citem_cmt_t)) → [user_cmts_iterator_t](#ida_hexrays.user_cmts_iterator_t) Insert new (treeloc_t, citem_cmt_t) pair into user_cmts_t. ### ida_hexrays.user_cmts_begin(map: [user_cmts_t](#ida_hexrays.user_cmts_t)) → [user_cmts_iterator_t](#ida_hexrays.user_cmts_iterator_t) Get iterator pointing to the beginning of user_cmts_t. ### ida_hexrays.user_cmts_end(map: [user_cmts_t](#ida_hexrays.user_cmts_t)) → [user_cmts_iterator_t](#ida_hexrays.user_cmts_iterator_t) Get iterator pointing to the end of user_cmts_t. ### ida_hexrays.user_cmts_next(p: [user_cmts_iterator_t](#ida_hexrays.user_cmts_iterator_t)) → [user_cmts_iterator_t](#ida_hexrays.user_cmts_iterator_t) Move to the next element. ### ida_hexrays.user_cmts_prev(p: [user_cmts_iterator_t](#ida_hexrays.user_cmts_iterator_t)) → [user_cmts_iterator_t](#ida_hexrays.user_cmts_iterator_t) Move to the previous element. ### ida_hexrays.user_cmts_erase(map: [user_cmts_t](#ida_hexrays.user_cmts_t), p: [user_cmts_iterator_t](#ida_hexrays.user_cmts_iterator_t)) → [None](https://docs.python.org/3/library/constants.html#None) Erase current element from user_cmts_t. ### ida_hexrays.user_cmts_clear(map: [user_cmts_t](#ida_hexrays.user_cmts_t)) → [None](https://docs.python.org/3/library/constants.html#None) Clear user_cmts_t. ### ida_hexrays.user_cmts_size(map: [user_cmts_t](#ida_hexrays.user_cmts_t)) → [int](https://docs.python.org/3/library/functions.html#int) Get size of user_cmts_t. ### ida_hexrays.user_cmts_free(map: [user_cmts_t](#ida_hexrays.user_cmts_t)) → [None](https://docs.python.org/3/library/constants.html#None) Delete user_cmts_t instance. ### ida_hexrays.user_cmts_new() → user_cmts_t \* Create a new user_cmts_t instance. ### *class* ida_hexrays.user_iflags_iterator_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### x *: iterator_word* ### ida_hexrays.user_iflags_first(p: [user_iflags_iterator_t](#ida_hexrays.user_iflags_iterator_t)) → citem_locator_t const & Get reference to the current map key. ### ida_hexrays.user_iflags_second(p: [user_iflags_iterator_t](#ida_hexrays.user_iflags_iterator_t)) → int32 & Get reference to the current map value. ### ida_hexrays.user_iflags_find(map: [user_iflags_t](#ida_hexrays.user_iflags_t), key: [citem_locator_t](#ida_hexrays.citem_locator_t)) → [user_iflags_iterator_t](#ida_hexrays.user_iflags_iterator_t) Find the specified key in user_iflags_t. ### ida_hexrays.user_iflags_insert(map: user_iflags_t, key: citem_locator_t, val: int32 const &) → [user_iflags_iterator_t](#ida_hexrays.user_iflags_iterator_t) Insert new (citem_locator_t, int32) pair into user_iflags_t. ### ida_hexrays.user_iflags_begin(map: [user_iflags_t](#ida_hexrays.user_iflags_t)) → [user_iflags_iterator_t](#ida_hexrays.user_iflags_iterator_t) Get iterator pointing to the beginning of user_iflags_t. ### ida_hexrays.user_iflags_end(map: [user_iflags_t](#ida_hexrays.user_iflags_t)) → [user_iflags_iterator_t](#ida_hexrays.user_iflags_iterator_t) Get iterator pointing to the end of user_iflags_t. ### ida_hexrays.user_iflags_next(p: [user_iflags_iterator_t](#ida_hexrays.user_iflags_iterator_t)) → [user_iflags_iterator_t](#ida_hexrays.user_iflags_iterator_t) Move to the next element. ### ida_hexrays.user_iflags_prev(p: [user_iflags_iterator_t](#ida_hexrays.user_iflags_iterator_t)) → [user_iflags_iterator_t](#ida_hexrays.user_iflags_iterator_t) Move to the previous element. ### ida_hexrays.user_iflags_erase(map: [user_iflags_t](#ida_hexrays.user_iflags_t), p: [user_iflags_iterator_t](#ida_hexrays.user_iflags_iterator_t)) → [None](https://docs.python.org/3/library/constants.html#None) Erase current element from user_iflags_t. ### ida_hexrays.user_iflags_clear(map: [user_iflags_t](#ida_hexrays.user_iflags_t)) → [None](https://docs.python.org/3/library/constants.html#None) Clear user_iflags_t. ### ida_hexrays.user_iflags_size(map: [user_iflags_t](#ida_hexrays.user_iflags_t)) → [int](https://docs.python.org/3/library/functions.html#int) Get size of user_iflags_t. ### ida_hexrays.user_iflags_free(map: [user_iflags_t](#ida_hexrays.user_iflags_t)) → [None](https://docs.python.org/3/library/constants.html#None) Delete user_iflags_t instance. ### ida_hexrays.user_iflags_new() → user_iflags_t \* Create a new user_iflags_t instance. ### *class* ida_hexrays.user_casts_iterator_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### x *: iterator_word* ### ida_hexrays.user_casts_first(p: [user_casts_iterator_t](#ida_hexrays.user_casts_iterator_t)) → citem_locator_t const & Get reference to the current map key. ### ida_hexrays.user_casts_second(p: [user_casts_iterator_t](#ida_hexrays.user_casts_iterator_t)) → tinfo_t & Get reference to the current map value. ### ida_hexrays.user_casts_find(map: user_casts_t const \*, key: citem_locator_t) → [user_casts_iterator_t](#ida_hexrays.user_casts_iterator_t) Find the specified key in user_casts_t. ### ida_hexrays.user_casts_insert(map: user_casts_t \*, key: citem_locator_t, val: tinfo_t) → [user_casts_iterator_t](#ida_hexrays.user_casts_iterator_t) Insert new (citem_locator_t, tinfo_t) pair into user_casts_t. ### ida_hexrays.user_casts_begin(map: user_casts_t const \*) → [user_casts_iterator_t](#ida_hexrays.user_casts_iterator_t) Get iterator pointing to the beginning of user_casts_t. ### ida_hexrays.user_casts_end(map: user_casts_t const \*) → [user_casts_iterator_t](#ida_hexrays.user_casts_iterator_t) Get iterator pointing to the end of user_casts_t. ### ida_hexrays.user_casts_next(p: [user_casts_iterator_t](#ida_hexrays.user_casts_iterator_t)) → [user_casts_iterator_t](#ida_hexrays.user_casts_iterator_t) Move to the next element. ### ida_hexrays.user_casts_prev(p: [user_casts_iterator_t](#ida_hexrays.user_casts_iterator_t)) → [user_casts_iterator_t](#ida_hexrays.user_casts_iterator_t) Move to the previous element. ### ida_hexrays.user_casts_erase(map: user_casts_t \*, p: user_casts_iterator_t) → [None](https://docs.python.org/3/library/constants.html#None) Erase current element from user_casts_t. ### ida_hexrays.user_casts_clear(map: user_casts_t \*) → [None](https://docs.python.org/3/library/constants.html#None) Clear user_casts_t. ### ida_hexrays.user_casts_size(map: user_casts_t \*) → [int](https://docs.python.org/3/library/functions.html#int) Get size of user_casts_t. ### ida_hexrays.user_casts_free(map: user_casts_t \*) → [None](https://docs.python.org/3/library/constants.html#None) Delete user_casts_t instance. ### ida_hexrays.user_casts_new() → user_casts_t \* Create a new user_casts_t instance. ### *class* ida_hexrays.user_unions_iterator_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### x *: iterator_word* ### ida_hexrays.user_unions_first(p: [user_unions_iterator_t](#ida_hexrays.user_unions_iterator_t)) → ea_t const & Get reference to the current map key. ### ida_hexrays.user_unions_second(p: [user_unions_iterator_t](#ida_hexrays.user_unions_iterator_t)) → intvec_t & Get reference to the current map value. ### ida_hexrays.user_unions_find(map: user_unions_t, key: ea_t const &) → [user_unions_iterator_t](#ida_hexrays.user_unions_iterator_t) Find the specified key in user_unions_t. ### ida_hexrays.user_unions_insert(map: user_unions_t, key: ea_t const &, val: intvec_t) → [user_unions_iterator_t](#ida_hexrays.user_unions_iterator_t) Insert new (ea_t, intvec_t) pair into user_unions_t. ### ida_hexrays.user_unions_begin(map: [user_unions_t](#ida_hexrays.user_unions_t)) → [user_unions_iterator_t](#ida_hexrays.user_unions_iterator_t) Get iterator pointing to the beginning of user_unions_t. ### ida_hexrays.user_unions_end(map: [user_unions_t](#ida_hexrays.user_unions_t)) → [user_unions_iterator_t](#ida_hexrays.user_unions_iterator_t) Get iterator pointing to the end of user_unions_t. ### ida_hexrays.user_unions_next(p: [user_unions_iterator_t](#ida_hexrays.user_unions_iterator_t)) → [user_unions_iterator_t](#ida_hexrays.user_unions_iterator_t) Move to the next element. ### ida_hexrays.user_unions_prev(p: [user_unions_iterator_t](#ida_hexrays.user_unions_iterator_t)) → [user_unions_iterator_t](#ida_hexrays.user_unions_iterator_t) Move to the previous element. ### ida_hexrays.user_unions_erase(map: [user_unions_t](#ida_hexrays.user_unions_t), p: [user_unions_iterator_t](#ida_hexrays.user_unions_iterator_t)) → [None](https://docs.python.org/3/library/constants.html#None) Erase current element from user_unions_t. ### ida_hexrays.user_unions_clear(map: [user_unions_t](#ida_hexrays.user_unions_t)) → [None](https://docs.python.org/3/library/constants.html#None) Clear user_unions_t. ### ida_hexrays.user_unions_size(map: [user_unions_t](#ida_hexrays.user_unions_t)) → [int](https://docs.python.org/3/library/functions.html#int) Get size of user_unions_t. ### ida_hexrays.user_unions_free(map: [user_unions_t](#ida_hexrays.user_unions_t)) → [None](https://docs.python.org/3/library/constants.html#None) Delete user_unions_t instance. ### ida_hexrays.user_unions_new() → user_unions_t \* Create a new user_unions_t instance. ### *class* ida_hexrays.user_labels_iterator_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### x *: iterator_word* ### ida_hexrays.user_labels_first(p: [user_labels_iterator_t](#ida_hexrays.user_labels_iterator_t)) → int const & Get reference to the current map key. ### ida_hexrays.user_labels_second(p: [user_labels_iterator_t](#ida_hexrays.user_labels_iterator_t)) → [str](https://docs.python.org/3/library/stdtypes.html#str) Get reference to the current map value. ### ida_hexrays.user_labels_find(map: user_labels_t, key: int const &) → [user_labels_iterator_t](#ida_hexrays.user_labels_iterator_t) Find the specified key in user_labels_t. ### ida_hexrays.user_labels_insert(map: user_labels_t, key: int const &, val: str) → [user_labels_iterator_t](#ida_hexrays.user_labels_iterator_t) Insert new (int, qstring) pair into user_labels_t. ### ida_hexrays.user_labels_begin(map: [user_labels_t](#ida_hexrays.user_labels_t)) → [user_labels_iterator_t](#ida_hexrays.user_labels_iterator_t) Get iterator pointing to the beginning of user_labels_t. ### ida_hexrays.user_labels_end(map: [user_labels_t](#ida_hexrays.user_labels_t)) → [user_labels_iterator_t](#ida_hexrays.user_labels_iterator_t) Get iterator pointing to the end of user_labels_t. ### ida_hexrays.user_labels_next(p: [user_labels_iterator_t](#ida_hexrays.user_labels_iterator_t)) → [user_labels_iterator_t](#ida_hexrays.user_labels_iterator_t) Move to the next element. ### ida_hexrays.user_labels_prev(p: [user_labels_iterator_t](#ida_hexrays.user_labels_iterator_t)) → [user_labels_iterator_t](#ida_hexrays.user_labels_iterator_t) Move to the previous element. ### ida_hexrays.user_labels_erase(map: [user_labels_t](#ida_hexrays.user_labels_t), p: [user_labels_iterator_t](#ida_hexrays.user_labels_iterator_t)) → [None](https://docs.python.org/3/library/constants.html#None) Erase current element from user_labels_t. ### ida_hexrays.user_labels_clear(map: [user_labels_t](#ida_hexrays.user_labels_t)) → [None](https://docs.python.org/3/library/constants.html#None) Clear user_labels_t. ### ida_hexrays.user_labels_size(map: [user_labels_t](#ida_hexrays.user_labels_t)) → [int](https://docs.python.org/3/library/functions.html#int) Get size of user_labels_t. ### ida_hexrays.user_labels_free(map: [user_labels_t](#ida_hexrays.user_labels_t)) → [None](https://docs.python.org/3/library/constants.html#None) Delete user_labels_t instance. ### ida_hexrays.user_labels_new() → user_labels_t \* Create a new user_labels_t instance. ### *class* ida_hexrays.eamap_iterator_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### x *: iterator_word* ### ida_hexrays.eamap_first(p: [eamap_iterator_t](#ida_hexrays.eamap_iterator_t)) → ea_t const & Get reference to the current map key. ### ida_hexrays.eamap_second(p: [eamap_iterator_t](#ida_hexrays.eamap_iterator_t)) → cinsnptrvec_t & Get reference to the current map value. ### ida_hexrays.eamap_find(map: eamap_t, key: ea_t const &) → [eamap_iterator_t](#ida_hexrays.eamap_iterator_t) Find the specified key in eamap_t. ### ida_hexrays.eamap_insert(map: eamap_t, key: ea_t const &, val: cinsnptrvec_t) → [eamap_iterator_t](#ida_hexrays.eamap_iterator_t) Insert new (ea_t, cinsnptrvec_t) pair into eamap_t. ### ida_hexrays.eamap_begin(map: [eamap_t](#ida_hexrays.eamap_t)) → [eamap_iterator_t](#ida_hexrays.eamap_iterator_t) Get iterator pointing to the beginning of eamap_t. ### ida_hexrays.eamap_end(map: [eamap_t](#ida_hexrays.eamap_t)) → [eamap_iterator_t](#ida_hexrays.eamap_iterator_t) Get iterator pointing to the end of eamap_t. ### ida_hexrays.eamap_next(p: [eamap_iterator_t](#ida_hexrays.eamap_iterator_t)) → [eamap_iterator_t](#ida_hexrays.eamap_iterator_t) Move to the next element. ### ida_hexrays.eamap_prev(p: [eamap_iterator_t](#ida_hexrays.eamap_iterator_t)) → [eamap_iterator_t](#ida_hexrays.eamap_iterator_t) Move to the previous element. ### ida_hexrays.eamap_erase(map: [eamap_t](#ida_hexrays.eamap_t), p: [eamap_iterator_t](#ida_hexrays.eamap_iterator_t)) → [None](https://docs.python.org/3/library/constants.html#None) Erase current element from eamap_t. ### ida_hexrays.eamap_clear(map: [eamap_t](#ida_hexrays.eamap_t)) → [None](https://docs.python.org/3/library/constants.html#None) Clear eamap_t. ### ida_hexrays.eamap_size(map: [eamap_t](#ida_hexrays.eamap_t)) → [int](https://docs.python.org/3/library/functions.html#int) Get size of eamap_t. ### ida_hexrays.eamap_free(map: [eamap_t](#ida_hexrays.eamap_t)) → [None](https://docs.python.org/3/library/constants.html#None) Delete eamap_t instance. ### ida_hexrays.eamap_new() → eamap_t \* Create a new eamap_t instance. ### *class* ida_hexrays.boundaries_iterator_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### x *: iterator_word* ### ida_hexrays.boundaries_first(p: [boundaries_iterator_t](#ida_hexrays.boundaries_iterator_t)) → cinsn_t \*const & Get reference to the current map key. ### ida_hexrays.boundaries_second(p: [boundaries_iterator_t](#ida_hexrays.boundaries_iterator_t)) → rangeset_t & Get reference to the current map value. ### ida_hexrays.boundaries_begin(map: [boundaries_t](#ida_hexrays.boundaries_t)) → [boundaries_iterator_t](#ida_hexrays.boundaries_iterator_t) Get iterator pointing to the beginning of boundaries_t. ### ida_hexrays.boundaries_end(map: [boundaries_t](#ida_hexrays.boundaries_t)) → [boundaries_iterator_t](#ida_hexrays.boundaries_iterator_t) Get iterator pointing to the end of boundaries_t. ### ida_hexrays.boundaries_next(p: [boundaries_iterator_t](#ida_hexrays.boundaries_iterator_t)) → [boundaries_iterator_t](#ida_hexrays.boundaries_iterator_t) Move to the next element. ### ida_hexrays.boundaries_prev(p: [boundaries_iterator_t](#ida_hexrays.boundaries_iterator_t)) → [boundaries_iterator_t](#ida_hexrays.boundaries_iterator_t) Move to the previous element. ### ida_hexrays.boundaries_erase(map: [boundaries_t](#ida_hexrays.boundaries_t), p: [boundaries_iterator_t](#ida_hexrays.boundaries_iterator_t)) → [None](https://docs.python.org/3/library/constants.html#None) Erase current element from boundaries_t. ### ida_hexrays.boundaries_clear(map: [boundaries_t](#ida_hexrays.boundaries_t)) → [None](https://docs.python.org/3/library/constants.html#None) Clear boundaries_t. ### ida_hexrays.boundaries_size(map: [boundaries_t](#ida_hexrays.boundaries_t)) → [int](https://docs.python.org/3/library/functions.html#int) Get size of boundaries_t. ### ida_hexrays.boundaries_free(map: [boundaries_t](#ida_hexrays.boundaries_t)) → [None](https://docs.python.org/3/library/constants.html#None) Delete boundaries_t instance. ### ida_hexrays.boundaries_new() → boundaries_t \* Create a new boundaries_t instance. ### *class* ida_hexrays.block_chains_iterator_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### x *: iterator_word* ### ida_hexrays.block_chains_get(p: [block_chains_iterator_t](#ida_hexrays.block_chains_iterator_t)) → chain_t & Get reference to the current set value. ### ida_hexrays.block_chains_find(set: [block_chains_t](#ida_hexrays.block_chains_t), val: [chain_t](#ida_hexrays.chain_t)) → [block_chains_iterator_t](#ida_hexrays.block_chains_iterator_t) Find the specified key in set block_chains_t. ### ida_hexrays.block_chains_insert(set: [block_chains_t](#ida_hexrays.block_chains_t), val: [chain_t](#ida_hexrays.chain_t)) → [block_chains_iterator_t](#ida_hexrays.block_chains_iterator_t) Insert new (chain_t) into set block_chains_t. ### ida_hexrays.block_chains_begin(set: [block_chains_t](#ida_hexrays.block_chains_t)) → [block_chains_iterator_t](#ida_hexrays.block_chains_iterator_t) Get iterator pointing to the beginning of block_chains_t. ### ida_hexrays.block_chains_end(set: [block_chains_t](#ida_hexrays.block_chains_t)) → [block_chains_iterator_t](#ida_hexrays.block_chains_iterator_t) Get iterator pointing to the end of block_chains_t. ### ida_hexrays.block_chains_next(p: [block_chains_iterator_t](#ida_hexrays.block_chains_iterator_t)) → [block_chains_iterator_t](#ida_hexrays.block_chains_iterator_t) Move to the next element. ### ida_hexrays.block_chains_prev(p: [block_chains_iterator_t](#ida_hexrays.block_chains_iterator_t)) → [block_chains_iterator_t](#ida_hexrays.block_chains_iterator_t) Move to the previous element. ### ida_hexrays.block_chains_erase(set: [block_chains_t](#ida_hexrays.block_chains_t), p: [block_chains_iterator_t](#ida_hexrays.block_chains_iterator_t)) → [None](https://docs.python.org/3/library/constants.html#None) Erase current element from block_chains_t. ### ida_hexrays.block_chains_clear(set: [block_chains_t](#ida_hexrays.block_chains_t)) → [None](https://docs.python.org/3/library/constants.html#None) Clear block_chains_t. ### ida_hexrays.block_chains_size(set: [block_chains_t](#ida_hexrays.block_chains_t)) → [int](https://docs.python.org/3/library/functions.html#int) Get size of block_chains_t. ### ida_hexrays.block_chains_free(set: [block_chains_t](#ida_hexrays.block_chains_t)) → [None](https://docs.python.org/3/library/constants.html#None) Delete block_chains_t instance. ### ida_hexrays.block_chains_new() → block_chains_t \* Create a new block_chains_t instance. ### *class* ida_hexrays.array_of_ivlsets(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### push_back(\*args) → ivlset_t & #### pop_back() → [None](https://docs.python.org/3/library/constants.html#None) #### size() → [int](https://docs.python.org/3/library/functions.html#int) #### empty() → [bool](https://docs.python.org/3/library/functions.html#bool) #### at(\_idx: [int](https://docs.python.org/3/library/functions.html#int)) → ivlset_t const & #### qclear() → [None](https://docs.python.org/3/library/constants.html#None) #### clear() → [None](https://docs.python.org/3/library/constants.html#None) #### resize(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### grow(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### capacity() → [int](https://docs.python.org/3/library/functions.html#int) #### reserve(cnt: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### truncate() → [None](https://docs.python.org/3/library/constants.html#None) #### swap(r: [array_of_ivlsets](#ida_hexrays.array_of_ivlsets)) → [None](https://docs.python.org/3/library/constants.html#None) #### extract() → ivlset_t \* #### inject(s: [ivlset_t](#ida_hexrays.ivlset_t), len: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### begin(\*args) → qvector< ivlset_t >::const_iterator #### end(\*args) → qvector< ivlset_t >::const_iterator #### insert(it: [ivlset_t](#ida_hexrays.ivlset_t), x: [ivlset_t](#ida_hexrays.ivlset_t)) → qvector< ivlset_t >::iterator #### erase(\*args) → qvector< ivlset_t >::iterator #### find(\*args) → qvector< ivlset_t >::const_iterator #### has(x: [ivlset_t](#ida_hexrays.ivlset_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### add_unique(x: [ivlset_t](#ida_hexrays.ivlset_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### append(x: [ivlset_t](#ida_hexrays.ivlset_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extend(x: [array_of_ivlsets](#ida_hexrays.array_of_ivlsets)) → [None](https://docs.python.org/3/library/constants.html#None) #### front #### back ### ida_hexrays.is_small_struni ### ida_hexrays.mbl_array_t ### ida_hexrays.is_allowed_on_small_struni ### *exception* ida_hexrays.DecompilationFailure Bases: [`Exception`](https://docs.python.org/3/library/exceptions.html#Exception) Common base class for all non-exit exceptions. ### ida_hexrays.decompile(ea, hf=None, flags=0) Decompile a snippet or a function. * **Parameters:** **hf** – extended error information (if failed) * **Returns:** pointer to the decompilation result (a reference counted pointer). nullptr if failed. ### ida_hexrays.citem_to_specific_type(self) cast the citem_t object to its more specific type, either cexpr_t or cinsn_t. ### ida_hexrays.property_op_to_typename(self) ### ida_hexrays.cexpr_operands(self) return a dictionary with the operands of a cexpr_t. ### ida_hexrays.cinsn_details(self) return the details pointer for the cinsn_t object depending on the value of its op member. this is one of the cblock_t, cif_t, etc. objects. ### ida_hexrays.cfunc_type(self) Get the function’s return type tinfo_t object. ### ida_hexrays.lnot(e) Logically negate the specified expression. The specified expression will be logically negated. For example, “x == y” is converted into “x != y” by this function. * **Parameters:** **e** – expression to negate. After the call, e must not be used anymore because it can be changed by the function. The function return value must be used to refer to the expression. * **Returns:** logically negated expression. ### ida_hexrays.make_ref(e) Create a reference. This function performs the following conversion: “obj” => “&obj”. It can handle casts, annihilate “&\*”, and process other special cases. ### ida_hexrays.dereference(e, ptrsize, is_float=False) Dereference a pointer. This function dereferences a pointer expression. It performs the following conversion: “ptr” => “ ``` * ``` ptr” It can handle discrepancies in the pointer type and the access size. * **Parameters:** * **e** – expression to deference * **ptrsize** – access size * **Returns:** dereferenced expression ### ida_hexrays.call_helper(rettype, args, \*rest) Create a helper call. ### ida_hexrays.new_block() Create a new block-statement. ### ida_hexrays.make_num(\*args) Create a number expression * **Parameters:** * **n** – value * **func** – current function * **ea** – definition address of the number * **opnum** – operand number of the number (in the disassembly listing) * **sign** – number sign * **size** – size of number in bytes Please note that the type of the resulting expression can be anything because it can be inherited from the disassembly listing or taken from the user specified number representation in the pseudocode view. ### ida_hexrays.create_helper(\*args) Create a helper object.. ### ida_hexrays.install_hexrays_callback(callback) Install handler for decompiler events. * **Parameters:** **callback** – handler to install * **Returns:** false if failed ### ida_hexrays.remove_hexrays_callback(callback) Uninstall handler for decompiler events. * **Parameters:** **callback** – handler to uninstall * **Returns:** number of uninstalled handlers. ### ida_hexrays.decompile_func ### ida_hexrays.gen_microcode ### ida_hexrays.create_empty_mba # index.html.md # ida_funcs Routines for working with functions within the disassembled program. This file also contains routines for working with library signatures (e.g. FLIRT). Each function consists of function chunks. At least one function chunk must be present in the function definition - the function entry chunk. Other chunks are called function tails. There may be several of them for a function. A function tail is a continuous range of addresses. It can be used in the definition of one or more functions. One function using the tail is singled out and called the tail owner. This function is considered as ‘possessing’ the tail. get_func() on a tail address will return the function possessing the tail. You can enumerate the functions using the tail by using func_parent_iterator_t. Each function chunk in the disassembly is represented as an “range” (a range of addresses, see range.hpp for details) with characteristics. A function entry must start with an instruction (code) byte. ## Attributes | [`FUNC_NORET`](#ida_funcs.FUNC_NORET) | Function doesn't return. | |-------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [`FUNC_FAR`](#ida_funcs.FUNC_FAR) | Far function. | | [`FUNC_LIB`](#ida_funcs.FUNC_LIB) | Library function. | | [`FUNC_STATICDEF`](#ida_funcs.FUNC_STATICDEF) | Static function. | | [`FUNC_FRAME`](#ida_funcs.FUNC_FRAME) | Function uses frame pointer (BP). | | [`FUNC_USERFAR`](#ida_funcs.FUNC_USERFAR) | User has specified far-ness of the function | | [`FUNC_HIDDEN`](#ida_funcs.FUNC_HIDDEN) | A hidden function chunk. | | [`FUNC_THUNK`](#ida_funcs.FUNC_THUNK) | Thunk (jump) function. | | [`FUNC_BOTTOMBP`](#ida_funcs.FUNC_BOTTOMBP) | BP points to the bottom of the stack frame. | | [`FUNC_NORET_PENDING`](#ida_funcs.FUNC_NORET_PENDING) | Function 'non-return' analysis must be performed. This flag is verified upon func_does_return() | | [`FUNC_SP_READY`](#ida_funcs.FUNC_SP_READY) | SP-analysis has been performed. If this flag is on, the stack change points should not be not modified anymore. Currently this analysis is performed only for PC | | [`FUNC_FUZZY_SP`](#ida_funcs.FUNC_FUZZY_SP) | Function changes SP in untraceable way, for example: and esp, 0FFFFFFF0h | | [`FUNC_PROLOG_OK`](#ida_funcs.FUNC_PROLOG_OK) | Prolog analysis has been performed by last SP-analysis | | [`FUNC_PURGED_OK`](#ida_funcs.FUNC_PURGED_OK) | 'argsize' field has been validated. If this bit is clear and 'argsize' is 0, then we do not known the real number of bytes removed from the stack. This bit is handled by the processor module. | | [`FUNC_TAIL`](#ida_funcs.FUNC_TAIL) | This is a function tail. Other bits must be clear (except FUNC_HIDDEN). | | [`FUNC_LUMINA`](#ida_funcs.FUNC_LUMINA) | Function info is provided by Lumina. | | [`FUNC_OUTLINE`](#ida_funcs.FUNC_OUTLINE) | Outlined code, not a real function. | | [`FUNC_REANALYZE`](#ida_funcs.FUNC_REANALYZE) | Function frame changed, request to reanalyze the function after the last insn is analyzed. | | [`FUNC_UNWIND`](#ida_funcs.FUNC_UNWIND) | function is an exception unwind handler | | [`FUNC_CATCH`](#ida_funcs.FUNC_CATCH) | function is an exception catch handler | | [`MOVE_FUNC_OK`](#ida_funcs.MOVE_FUNC_OK) | ok | | [`MOVE_FUNC_NOCODE`](#ida_funcs.MOVE_FUNC_NOCODE) | no instruction at 'newstart' | | [`MOVE_FUNC_BADSTART`](#ida_funcs.MOVE_FUNC_BADSTART) | bad new start address | | [`MOVE_FUNC_NOFUNC`](#ida_funcs.MOVE_FUNC_NOFUNC) | no function at 'ea' | | [`MOVE_FUNC_REFUSED`](#ida_funcs.MOVE_FUNC_REFUSED) | a plugin refused the action | | [`FIND_FUNC_NORMAL`](#ida_funcs.FIND_FUNC_NORMAL) | stop processing if undefined byte is encountered | | [`FIND_FUNC_DEFINE`](#ida_funcs.FIND_FUNC_DEFINE) | create instruction if undefined byte is encountered | | [`FIND_FUNC_IGNOREFN`](#ida_funcs.FIND_FUNC_IGNOREFN) | ignore existing function boundaries. by default the function returns function boundaries if ea belongs to a function. | | [`FIND_FUNC_KEEPBD`](#ida_funcs.FIND_FUNC_KEEPBD) | do not modify incoming function boundaries, just create instructions inside the boundaries. | | [`FIND_FUNC_UNDEF`](#ida_funcs.FIND_FUNC_UNDEF) | function has instructions that pass execution flow to unexplored bytes. nfn->end_ea will have the address of the unexplored byte. | | [`FIND_FUNC_OK`](#ida_funcs.FIND_FUNC_OK) | ok, 'nfn' is ready for add_func() | | [`FIND_FUNC_EXIST`](#ida_funcs.FIND_FUNC_EXIST) | function exists already. its bounds are returned in 'nfn'. | | [`IDASGN_OK`](#ida_funcs.IDASGN_OK) | ok | | [`IDASGN_BADARG`](#ida_funcs.IDASGN_BADARG) | bad number of signature | | [`IDASGN_APPLIED`](#ida_funcs.IDASGN_APPLIED) | signature is already applied | | [`IDASGN_CURRENT`](#ida_funcs.IDASGN_CURRENT) | signature is currently being applied | | [`IDASGN_PLANNED`](#ida_funcs.IDASGN_PLANNED) | signature is planned to be applied | | [`LIBFUNC_FOUND`](#ida_funcs.LIBFUNC_FOUND) | ok, library function is found | | [`LIBFUNC_NONE`](#ida_funcs.LIBFUNC_NONE) | no, this is not a library function | | [`LIBFUNC_DELAY`](#ida_funcs.LIBFUNC_DELAY) | no decision because of lack of information | | [`GFI_NAME`](#ida_funcs.GFI_NAME) | Populate the function name. | | [`GFI_CMT`](#ida_funcs.GFI_CMT) | Populate the regular comment. | | [`GFI_CMT_RPT`](#ida_funcs.GFI_CMT_RPT) | Populate the repeatable comment. | | [`GFI_COMMENTS`](#ida_funcs.GFI_COMMENTS) | Populate both comments. | | [`GFI_ALL`](#ida_funcs.GFI_ALL) | Populate all optional fields. | | [`is_func_entry`](#id2) | | | [`is_func_tail`](#id3) | | | [`lock_func_range`](#id4) | | | [`is_func_locked`](#id5) | | | [`get_func`](#id6) | | | [`get_func_chunknum`](#id7) | | | [`getn_func`](#id8) | | | [`get_prev_func`](#id9) | | | [`get_next_func`](#id10) | | | [`get_func_ranges`](#id11) | | | [`get_func_cmt`](#id12) | | | [`set_func_cmt`](#id13) | | | [`update_func`](#id14) | | | [`add_func_ex`](#id15) | | | [`reanalyze_function`](#id16) | | | [`find_func_bounds`](#id17) | | | [`calc_func_size`](#id18) | | | [`get_func_bitness`](#id19) | | | [`set_visible_func`](#id20) | | | [`set_func_name_if_jumpfunc`](#id21) | | | [`calc_thunk_func_target`](#id22) | | | [`get_fchunk`](#id23) | | | [`getn_fchunk`](#id24) | | | [`get_prev_fchunk`](#id25) | | | [`get_next_fchunk`](#id26) | | | [`append_func_tail`](#id27) | | | [`remove_func_tail`](#id28) | | | [`set_tail_owner`](#id29) | | | [`add_regarg`](#id30) | | | [`func_contains`](#id31) | | | [`get_prev_func_addr`](#id32) | | | [`get_next_func_addr`](#id33) | | | [`get_func_bits`](#id34) | | | [`get_func_bytes`](#id35) | | | [`is_visible_func`](#id36) | | | [`is_finally_visible_func`](#id37) | | | [`lock_func`](#id38) | | | [`func_tail_iterator_t`](#id39) | | | [`func_item_iterator_t`](#id40) | | | [`func_parent_iterator_t`](#id41) | | ## Classes | [`regargs_t`](#ida_funcs.regargs_t) | | |-----------------------------------------------------------------------|----| | [`dyn_stkpnt_array`](#ida_funcs.dyn_stkpnt_array) | | | [`dyn_regvar_array`](#ida_funcs.dyn_regvar_array) | | | [`dyn_range_array`](#ida_funcs.dyn_range_array) | | | [`dyn_ea_array`](#ida_funcs.dyn_ea_array) | | | [`dyn_regarg_array`](#ida_funcs.dyn_regarg_array) | | | [`regarg_t`](#ida_funcs.regarg_t) | | | [`func_t`](#ida_funcs.func_t) | | | [`lock_func_ea`](#ida_funcs.lock_func_ea) | | | [`lock_func`](#id38) | | | [`lock_func_with_tails_t`](#ida_funcs.lock_func_with_tails_t) | | | [`func_tail_iterator_t`](#id39) | | | [`func_item_iterator_t`](#id40) | | | [`func_parent_iterator_t`](#id41) | | | [`fchunk_info_t`](#ida_funcs.fchunk_info_t) | | | [`func_entry_info_t`](#ida_funcs.func_entry_info_t) | | | [`func_tail_info_t`](#ida_funcs.func_tail_info_t) | | | [`function_tail_iterator_t`](#ida_funcs.function_tail_iterator_t) | | | [`function_parent_iterator_t`](#ida_funcs.function_parent_iterator_t) | | | [`function_item_iterator_t`](#ida_funcs.function_item_iterator_t) | | ## Functions | [`free_regarg`](#ida_funcs.free_regarg)(→ None) | | |-------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [`regarg_t__compare`](#ida_funcs.regarg_t__compare)(→ int) | | | [`is_func_entry`](#id2) | | | [`is_func_tail`](#id3) | | | [`lock_func_range`](#id4) | | | [`is_func_locked`](#id5) | | | [`get_func`](#id6) | | | [`get_func_chunknum`](#id7) | | | [`getn_func`](#id8) | | | [`get_func_qty`](#ida_funcs.get_func_qty)(→ int) | Get total number of functions in the program. | | [`get_func_num`](#ida_funcs.get_func_num)(→ int) | Get ordinal number of a function. | | [`get_prev_func`](#id9) | | | [`get_next_func`](#id10) | | | [`get_func_ranges`](#id11) | | | [`get_func_cmt`](#id12) | | | [`set_func_cmt`](#id13) | | | [`update_func`](#id14) | | | [`add_func_ex`](#id15) | | | [`del_func`](#ida_funcs.del_func)(→ bool) | Delete a function. | | [`set_func_start`](#ida_funcs.set_func_start)(→ int) | Move function chunk start address. | | [`set_func_end`](#ida_funcs.set_func_end)(→ bool) | Move function chunk end address. | | [`reanalyze_function`](#id16) | | | [`find_func_bounds`](#id17) | | | [`get_func_name`](#ida_funcs.get_func_name)(→ Union[str, None]) | Get function name. | | [`calc_func_size`](#id18) | | | [`get_func_bitness`](#id19) | | | [`set_visible_func`](#id20) | | | [`set_func_name_if_jumpfunc`](#id21) | | | [`calc_thunk_func_target`](#id22) | | | [`func_does_return`](#ida_funcs.func_does_return)(→ bool) | Does the function return? To calculate the answer, FUNC_NORET flag and is_noret() are consulted The latter is required for imported functions in the .idata section. Since in .idata we have only function pointers but not functions, we have to introduce a special flag for them. | | [`reanalyze_noret_flag`](#ida_funcs.reanalyze_noret_flag)(→ bool) | Plan to reanalyze noret flag. This function does not remove FUNC_NORET if it is already present. It just plans to reanalysis. | | [`set_noret_insn`](#ida_funcs.set_noret_insn)(→ bool) | Signal a non-returning instruction. This function can be used by the processor module to tell the kernel about non-returning instructions (like call exit). The kernel will perform the global function analysis and find out if the function returns at all. This analysis will be done at the first call to func_does_return() | | [`get_fchunk`](#id23) | | | [`getn_fchunk`](#id24) | | | [`get_fchunk_qty`](#ida_funcs.get_fchunk_qty)(→ int) | Get total number of function chunks in the program. | | [`get_fchunk_num`](#ida_funcs.get_fchunk_num)(→ int) | Get ordinal number of a function chunk in the global list of function chunks. | | [`get_prev_fchunk`](#id25) | | | [`get_next_fchunk`](#id26) | | | [`append_func_tail`](#id27) | | | [`remove_func_tail`](#id28) | | | [`set_tail_owner`](#id29) | | | [`read_regargs`](#ida_funcs.read_regargs)(→ None) | | | [`add_regarg`](#id30) | | | [`plan_to_apply_idasgn`](#ida_funcs.plan_to_apply_idasgn)(→ int) | Add a signature file to the list of planned signature files. | | [`apply_idasgn_to`](#ida_funcs.apply_idasgn_to)(→ int) | Apply a signature file to the specified address. | | [`get_idasgn_qty`](#ida_funcs.get_idasgn_qty)(→ int) | Get number of signatures in the list of planned and applied signatures. | | [`get_current_idasgn`](#ida_funcs.get_current_idasgn)(→ int) | Get number of the current signature. | | [`calc_idasgn_state`](#ida_funcs.calc_idasgn_state)(→ int) | Get state of a signature in the list of planned signatures | | [`del_idasgn`](#ida_funcs.del_idasgn)(→ int) | Remove signature from the list of planned signatures. | | [`get_idasgn_title`](#ida_funcs.get_idasgn_title)(→ Union[str, None]) | Get full description of the signature by its short name. | | [`apply_startup_sig`](#ida_funcs.apply_startup_sig)(→ bool) | Apply a startup signature file to the specified address. | | [`try_to_add_libfunc`](#ida_funcs.try_to_add_libfunc)(→ int) | Apply the currently loaded signature file to the specified address. If a library function is found, then create a function and name it accordingly. | | [`get_func_start`](#ida_funcs.get_func_start)(→ ida_idaapi.ea_t) | | | [`get_prev_func_ea`](#ida_funcs.get_prev_func_ea)(→ ida_idaapi.ea_t) | | | [`get_next_func_ea`](#ida_funcs.get_next_func_ea)(→ ida_idaapi.ea_t) | | | [`get_fchunk_start`](#ida_funcs.get_fchunk_start)(→ ida_idaapi.ea_t) | | | [`get_prev_fchunk_ea`](#ida_funcs.get_prev_fchunk_ea)(→ ida_idaapi.ea_t) | | | [`get_next_fchunk_ea`](#ida_funcs.get_next_fchunk_ea)(→ ida_idaapi.ea_t) | | | [`get_func_ea_by_num`](#ida_funcs.get_func_ea_by_num)(→ ida_idaapi.ea_t) | | | [`get_fchunk_ea_by_num`](#ida_funcs.get_fchunk_ea_by_num)(→ ida_idaapi.ea_t) | | | [`get_func_flags`](#ida_funcs.get_func_flags)(→ uint64) | | | [`is_visible_func`](#id36) | | | [`is_finally_visible_func`](#id37) | | | [`set_func_flags`](#ida_funcs.set_func_flags)(→ bool) | | | [`set_func_flag`](#ida_funcs.set_func_flag)(→ bool) | | | [`is_function_entry`](#ida_funcs.is_function_entry)(→ bool) | | | [`is_function_tail`](#ida_funcs.is_function_tail)(→ bool) | | | [`get_tail_owner`](#ida_funcs.get_tail_owner)(→ ida_idaapi.ea_t) | | | [`get_func_cmt_ea`](#ida_funcs.get_func_cmt_ea)(→ Union[str, None]) | | | [`set_func_cmt_ea`](#ida_funcs.set_func_cmt_ea)(→ bool) | | | [`get_func_bitness_ea`](#ida_funcs.get_func_bitness_ea)(→ int) | | | [`get_func_bits_ea`](#ida_funcs.get_func_bits_ea)(→ int) | | | [`get_func_bytes_ea`](#ida_funcs.get_func_bytes_ea)(→ int) | | | [`get_func_bits`](#id34) | | | [`get_func_bytes`](#id35) | | | [`calc_func_size_ea`](#ida_funcs.calc_func_size_ea)(→ asize_t) | | | [`get_func_ranges_ea`](#ida_funcs.get_func_ranges_ea)(→ ida_idaapi.ea_t) | | | [`set_visible_func_ea`](#ida_funcs.set_visible_func_ea)(→ None) | | | [`set_function_name_if_jumpfunc`](#ida_funcs.set_function_name_if_jumpfunc)(→ bool) | | | [`reanalyze_function_ea`](#ida_funcs.reanalyze_function_ea)(→ None) | | | [`add_func_regarg`](#ida_funcs.add_func_regarg)(→ None) | | | [`get_func_regarg_qty`](#ida_funcs.get_func_regarg_qty)(→ int) | | | [`get_func_regarg`](#ida_funcs.get_func_regarg)(→ bool) | | | [`get_func_regargs`](#ida_funcs.get_func_regargs)(→ bool) | | | [`append_func_tail_ea`](#ida_funcs.append_func_tail_ea)(→ bool) | | | [`remove_func_tail_ea`](#ida_funcs.remove_func_tail_ea)(→ bool) | | | [`set_tail_owner_ea`](#ida_funcs.set_tail_owner_ea)(→ bool) | | | [`get_func_chunknum_ea`](#ida_funcs.get_func_chunknum_ea)(→ int) | | | [`get_func_tail_qty`](#ida_funcs.get_func_tail_qty)(→ int) | | | [`get_func_tails`](#ida_funcs.get_func_tails)(→ bool) | | | [`function_contains`](#ida_funcs.function_contains)(→ bool) | | | [`is_same_func`](#ida_funcs.is_same_func)(→ bool) | | | [`is_same_fchunk`](#ida_funcs.is_same_fchunk)(→ bool) | | | [`func_contains`](#id31) | | | [`iterate_func_chunks_ea`](#ida_funcs.iterate_func_chunks_ea)(→ None) | | | [`get_prev_function_addr`](#ida_funcs.get_prev_function_addr)(→ ida_idaapi.ea_t) | | | [`get_next_function_addr`](#ida_funcs.get_next_function_addr)(→ ida_idaapi.ea_t) | | | [`lock_func_range_ea`](#ida_funcs.lock_func_range_ea)(→ None) | | | [`is_func_locked_ea`](#ida_funcs.is_func_locked_ea)(→ bool) | | | [`func_tail_iterator_set`](#ida_funcs.func_tail_iterator_set)(→ bool) | | | [`func_tail_iterator_set_ea`](#ida_funcs.func_tail_iterator_set_ea)(→ bool) | | | [`func_parent_iterator_set`](#ida_funcs.func_parent_iterator_set)(→ bool) | | | [`function_tail_iterator_set`](#ida_funcs.function_tail_iterator_set)(→ bool) | | | [`function_tail_iterator_set_ea`](#ida_funcs.function_tail_iterator_set_ea)(→ bool) | | | [`function_tail_iterator_set_range`](#ida_funcs.function_tail_iterator_set_range)(→ bool) | | | [`function_tail_iterator_chunk`](#ida_funcs.function_tail_iterator_chunk)(→ None) | | | [`function_tail_iterator_first`](#ida_funcs.function_tail_iterator_first)(→ bool) | | | [`function_tail_iterator_last`](#ida_funcs.function_tail_iterator_last)(→ bool) | | | [`function_tail_iterator_next`](#ida_funcs.function_tail_iterator_next)(→ bool) | | | [`function_tail_iterator_prev`](#ida_funcs.function_tail_iterator_prev)(→ bool) | | | [`function_tail_iterator_main`](#ida_funcs.function_tail_iterator_main)(→ bool) | | | [`function_parent_iterator_set`](#ida_funcs.function_parent_iterator_set)(→ bool) | | | [`function_parent_iterator_parent`](#ida_funcs.function_parent_iterator_parent)(→ ida_idaapi.ea_t) | | | [`function_parent_iterator_first`](#ida_funcs.function_parent_iterator_first)(→ bool) | | | [`function_parent_iterator_last`](#ida_funcs.function_parent_iterator_last)(→ bool) | | | [`function_parent_iterator_next`](#ida_funcs.function_parent_iterator_next)(→ bool) | | | [`function_parent_iterator_prev`](#ida_funcs.function_parent_iterator_prev)(→ bool) | | | [`function_item_iterator_next`](#ida_funcs.function_item_iterator_next)(→ bool) | | | [`function_item_iterator_prev`](#ida_funcs.function_item_iterator_prev)(→ bool) | | | [`function_item_iterator_succ`](#ida_funcs.function_item_iterator_succ)(→ bool) | | | [`function_item_iterator_decode_prev_insn`](#ida_funcs.function_item_iterator_decode_prev_insn)(→ bool) | | | [`function_item_iterator_decode_preceding_insn`](#ida_funcs.function_item_iterator_decode_preceding_insn)(→ bool) | | | [`f_any`](#ida_funcs.f_any)(→ bool) | Helper function to accept any address. | | [`get_prev_func_addr`](#id32) | | | [`get_next_func_addr`](#id33) | | | [`get_fchunk_info`](#ida_funcs.get_fchunk_info)(→ bool) | Get the range of the function chunk (entry or tail) containing 'ea'. | | [`get_prev_fchunk_info`](#ida_funcs.get_prev_fchunk_info)(→ bool) | Get the previous function chunk before the one containing 'ea'. | | [`get_next_fchunk_info`](#ida_funcs.get_next_fchunk_info)(→ bool) | Get the next function chunk after the one containing 'ea'. | | [`get_func_entry_info`](#ida_funcs.get_func_entry_info)(→ bool) | Get function entry info by address. | | [`get_func_entry_info_by_num`](#ida_funcs.get_func_entry_info_by_num)(→ bool) | Get function entry info by ordinal number. | | [`set_func_entry_info`](#ida_funcs.set_func_entry_info)(→ bool) | Update function entry info in the database. You cannot use this function to change the range boundaries. Uses start_ea to identify the function, applies only modified fields. | | [`add_function_ex`](#ida_funcs.add_function_ex)(→ bool) | Add a new function using func_entry_info_t. If fi->end_ea is BADADDR, then IDA will try to determine the function bounds by calling find_func_bounds(..., FIND_FUNC_DEFINE). Uses fi->start_ea, fi->end_ea, and fi->get_flags(). On success, fi is updated with the resulting function properties. | | [`add_func`](#ida_funcs.add_func)(→ bool) | Add a new function. If the function end address is BADADDR, then IDA will try to determine the function bounds by calling find_func_bounds(..., FIND_FUNC_DEFINE). | | [`find_function_bounds`](#ida_funcs.find_function_bounds)(→ int) | Determine the boundaries of a new function. This function tries to find the start and end addresses of a new function. It calls the module with processor_t::func_bounds in order to fine tune the function boundaries. | | [`calc_thunk_function_target`](#id1)(\*args) | Calculate thunk function target. | | [`get_func_tail_info`](#ida_funcs.get_func_tail_info)(→ bool) | Get function tail info by address. | | [`get_tail_referer_qty`](#ida_funcs.get_tail_referer_qty)(→ int) | Get the number of referers (parent functions) for a tail chunk. | | [`get_tail_referer`](#ida_funcs.get_tail_referer)(→ ida_idaapi.ea_t) | Get a tail chunk referer by index. | | [`get_tail_referers`](#ida_funcs.get_tail_referers)(→ bool) | Get all referers (parent functions) for a tail chunk. | | [`get_fchunk_referer`](#ida_funcs.get_fchunk_referer)(ea, idx) | | | [`get_idasgn_desc`](#ida_funcs.get_idasgn_desc)(n) | Get information about a signature in the list. | | [`get_idasgn_desc_with_matches`](#ida_funcs.get_idasgn_desc_with_matches)(n) | Get information about a signature in the list. | | [`func_t__from_ptrval__`](#ida_funcs.func_t__from_ptrval__)(→ func_t \*) | | | [`calc_thunk_func_target`](#id22) | | | [`calc_thunk_function_target`](#id1)(\*args) | Calculate thunk function target. | ## Module Contents ### *class* ida_funcs.regargs_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### push_back(\*args) → regarg_t & #### pop_back() → [None](https://docs.python.org/3/library/constants.html#None) #### size() → [int](https://docs.python.org/3/library/functions.html#int) #### empty() → [bool](https://docs.python.org/3/library/functions.html#bool) #### at(\_idx: [int](https://docs.python.org/3/library/functions.html#int)) → regarg_t const & #### qclear() → [None](https://docs.python.org/3/library/constants.html#None) #### clear() → [None](https://docs.python.org/3/library/constants.html#None) #### resize(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### grow(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### capacity() → [int](https://docs.python.org/3/library/functions.html#int) #### reserve(cnt: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### truncate() → [None](https://docs.python.org/3/library/constants.html#None) #### swap(r: [regargs_t](#ida_funcs.regargs_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extract() → regarg_t \* #### inject(s: [regarg_t](#ida_funcs.regarg_t), len: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### begin(\*args) → qvector< regarg_t >::const_iterator #### end(\*args) → qvector< regarg_t >::const_iterator #### insert(it: [regarg_t](#ida_funcs.regarg_t), x: [regarg_t](#ida_funcs.regarg_t)) → qvector< regarg_t >::iterator #### erase(\*args) → qvector< regarg_t >::iterator #### find(\*args) → qvector< regarg_t >::const_iterator #### has(x: [regarg_t](#ida_funcs.regarg_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### add_unique(x: [regarg_t](#ida_funcs.regarg_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### append(x: [regarg_t](#ida_funcs.regarg_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extend(x: [regargs_t](#ida_funcs.regargs_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### front #### back ### *class* ida_funcs.dyn_stkpnt_array(\_data: stkpnt_t \*, \_count: int) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### data *: stkpnt_t \** #### count *: [int](https://docs.python.org/3/library/functions.html#int)* ### *class* ida_funcs.dyn_regvar_array(\_data: regvar_t \*, \_count: int) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### data *: regvar_t \** #### count *: [int](https://docs.python.org/3/library/functions.html#int)* ### *class* ida_funcs.dyn_range_array(\_data: [range_t](../ida_range/index.md#ida_range.range_t), \_count: [int](https://docs.python.org/3/library/functions.html#int)) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### data *: range_t \** #### count *: [int](https://docs.python.org/3/library/functions.html#int)* ### *class* ida_funcs.dyn_ea_array(\_data: unsigned long long \*, \_count: int) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### data *: unsigned long long \** #### count *: [int](https://docs.python.org/3/library/functions.html#int)* ### *class* ida_funcs.dyn_regarg_array(\_data: [regarg_t](#ida_funcs.regarg_t), \_count: [int](https://docs.python.org/3/library/functions.html#int)) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### data *: regarg_t \** #### count *: [int](https://docs.python.org/3/library/functions.html#int)* ### ida_funcs.free_regarg(v: [regarg_t](#ida_funcs.regarg_t)) → [None](https://docs.python.org/3/library/constants.html#None) ### ida_funcs.regarg_t_\_compare(l: [regarg_t](#ida_funcs.regarg_t), r: [regarg_t](#ida_funcs.regarg_t)) → [int](https://docs.python.org/3/library/functions.html#int) ### *class* ida_funcs.regarg_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### reg *: [int](https://docs.python.org/3/library/functions.html#int)* #### type *: type_t \** #### name *: char \** #### swap(r: [regarg_t](#ida_funcs.regarg_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### compare(r: [regarg_t](#ida_funcs.regarg_t)) → [int](https://docs.python.org/3/library/functions.html#int) #### serialize(out: bytevec_t \*) → [None](https://docs.python.org/3/library/constants.html#None) #### deserialize(mmdsr: memory_deserializer_t &) → [bool](https://docs.python.org/3/library/functions.html#bool) ### *class* ida_funcs.func_t(start: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) = 0, end: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) = 0, f: flags64_t = 0) Bases: [`ida_range.range_t`](../ida_range/index.md#ida_range.range_t) #### thisown #### flags *: uint64* Function flags #### is_far() → [bool](https://docs.python.org/3/library/functions.html#bool) Is a far function? #### does_return() → [bool](https://docs.python.org/3/library/functions.html#bool) Does function return? #### analyzed_sp() → [bool](https://docs.python.org/3/library/functions.html#bool) Has SP-analysis been performed? #### need_prolog_analysis() → [bool](https://docs.python.org/3/library/functions.html#bool) Needs prolog analysis? #### frame *: [int](https://docs.python.org/3/library/functions.html#int)* netnode id of frame structure - see frame.hpp #### frsize *: asize_t* size of local variables part of frame in bytes. If FUNC_FRAME is set and fpd==0, the frame pointer (EBP) is assumed to point to the top of the local variables range. #### frregs *: ushort* size of saved registers in frame. This range is immediately above the local variables range. #### argsize *: asize_t* number of bytes purged from the stack upon returning #### fpd *: asize_t* frame pointer delta. (usually 0, i.e. realBP==typicalBP) use update_fpd() to modify it. #### color *: bgcolor_t* user defined function color #### pntqty *: [int](https://docs.python.org/3/library/functions.html#int)* number of SP change points #### points *: stkpnt_t \** array of SP change points. use …stkpnt…() functions to access this array. #### regvarqty *: [int](https://docs.python.org/3/library/functions.html#int)* number of register variables (-1-not read in yet) use find_regvar() to read register variables #### regvars *: regvar_t \** array of register variables. this array is sorted by: start_ea. use …regvar…() functions to access this array. #### regargqty *: [int](https://docs.python.org/3/library/functions.html#int)* number of register arguments. During analysis IDA tries to guess the register arguments. It stores store the guessing outcome in this field. As soon as it determines the final function prototype, regargqty is set to zero. #### regargs *: regarg_t \** unsorted array of register arguments. use …regarg…() functions to access this array. regargs are destroyed when the full function type is determined. #### tailqty *: [int](https://docs.python.org/3/library/functions.html#int)* number of function tails #### tails *: range_t \** array of tails, sorted by ea. use func_tail_iterator_t to access function tails. #### owner *: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)* the address of the main function possessing this tail #### refqty *: [int](https://docs.python.org/3/library/functions.html#int)* number of referers #### referers *: ea_t \** array of referers (function start addresses). use func_parent_iterator_t to access the referers. #### addresses() Alias for func_item_iterator_t(self).addresses() #### code_items() Alias for func_item_iterator_t(self).code_items() #### data_items() Alias for func_item_iterator_t(self).data_items() #### head_items() Alias for func_item_iterator_t(self).head_items() #### not_tails() Alias for func_item_iterator_t(self).not_tails() #### get_frame_object() Retrieve the function frame, in the form of a structure where frame offsets that are accessed by the program, as well as areas for “saved registers” and “return address”, are represented by structure members. If the function has no associated frame, return None * **Returns:** a ida_typeinf.tinfo_t object representing the frame, or None #### get_name() Get the function name * **Returns:** the function name #### get_prototype() Retrieve the function prototype. Once you have obtained the prototype, you can: * retrieve the return type through ida_typeinf.tinfo_t.get_rettype() * iterate on the arguments using ida_typeinf.tinfo_t.iter_func() If the function has no associated prototype, return None * **Returns:** a ida_typeinf.tinfo_t object representing the prototype, or None #### frame_object #### name #### prototype ### ida_funcs.FUNC_NORET Function doesn’t return. ### ida_funcs.FUNC_FAR Far function. ### ida_funcs.FUNC_LIB Library function. ### ida_funcs.FUNC_STATICDEF Static function. ### ida_funcs.FUNC_FRAME Function uses frame pointer (BP). ### ida_funcs.FUNC_USERFAR User has specified far-ness of the function ### ida_funcs.FUNC_HIDDEN A hidden function chunk. ### ida_funcs.FUNC_THUNK Thunk (jump) function. ### ida_funcs.FUNC_BOTTOMBP BP points to the bottom of the stack frame. ### ida_funcs.FUNC_NORET_PENDING Function ‘non-return’ analysis must be performed. This flag is verified upon func_does_return() ### ida_funcs.FUNC_SP_READY SP-analysis has been performed. If this flag is on, the stack change points should not be not modified anymore. Currently this analysis is performed only for PC ### ida_funcs.FUNC_FUZZY_SP Function changes SP in untraceable way, for example: and esp, 0FFFFFFF0h ### ida_funcs.FUNC_PROLOG_OK Prolog analysis has been performed by last SP-analysis ### ida_funcs.FUNC_PURGED_OK ‘argsize’ field has been validated. If this bit is clear and ‘argsize’ is 0, then we do not known the real number of bytes removed from the stack. This bit is handled by the processor module. ### ida_funcs.FUNC_TAIL This is a function tail. Other bits must be clear (except FUNC_HIDDEN). ### ida_funcs.FUNC_LUMINA Function info is provided by Lumina. ### ida_funcs.FUNC_OUTLINE Outlined code, not a real function. ### ida_funcs.FUNC_REANALYZE Function frame changed, request to reanalyze the function after the last insn is analyzed. ### ida_funcs.FUNC_UNWIND function is an exception unwind handler ### ida_funcs.FUNC_CATCH function is an exception catch handler ### ida_funcs.is_func_entry(pfn: [func_t](#ida_funcs.func_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Does function describe a function entry chunk? ### ida_funcs.is_func_tail(pfn: [func_t](#ida_funcs.func_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Does function describe a function tail chunk? ### ida_funcs.lock_func_range(pfn: [func_t](#ida_funcs.func_t), lock: [bool](https://docs.python.org/3/library/functions.html#bool)) → [None](https://docs.python.org/3/library/constants.html#None) Lock function pointer Locked pointers are guaranteed to remain valid until they are unlocked. Ranges with locked pointers cannot be deleted or moved. ### ida_funcs.is_func_locked(pfn: [func_t](#ida_funcs.func_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Is the function pointer locked? ### ida_funcs.get_func(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → func_t \* Get pointer to function structure by address. * **Parameters:** **ea** – any address in a function * **Returns:** ptr to a function or nullptr. This function returns a function entry chunk. ### ida_funcs.get_func_chunknum(pfn: [func_t](#ida_funcs.func_t), ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [int](https://docs.python.org/3/library/functions.html#int) Get the containing tail chunk of ‘ea’. * **Returns:** -1: means ‘does not contain ea’ * **Returns:** 0: means the ‘pfn’ itself contains ea * **Returns:** >0: the number of the containing function tail chunk ### ida_funcs.getn_func(n: [int](https://docs.python.org/3/library/functions.html#int)) → func_t \* Get pointer to function structure by number. * **Parameters:** **n** – number of function, is in range 0..get_func_qty()-1 * **Returns:** ptr to a function or nullptr. This function returns a function entry chunk. ### ida_funcs.get_func_qty() → [int](https://docs.python.org/3/library/functions.html#int) Get total number of functions in the program. ### ida_funcs.get_func_num(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [int](https://docs.python.org/3/library/functions.html#int) Get ordinal number of a function. * **Parameters:** **ea** – any address in the function * **Returns:** number of function (0..get_func_qty()-1). -1 means ‘no function at the specified address’. ### ida_funcs.get_prev_func(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → func_t \* Get pointer to the previous function. * **Parameters:** **ea** – any address in the program * **Returns:** ptr to function or nullptr if previous function doesn’t exist ### ida_funcs.get_next_func(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → func_t \* Get pointer to the next function. * **Parameters:** **ea** – any address in the program * **Returns:** ptr to function or nullptr if next function doesn’t exist ### ida_funcs.get_func_ranges(ranges: [rangeset_t](../ida_range/index.md#ida_range.rangeset_t), pfn: [func_t](#ida_funcs.func_t)) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) Get function ranges. * **Parameters:** * **ranges** – buffer to receive the range info * **pfn** – ptr to function structure * **Returns:** end address of the last function range (BADADDR-error) ### ida_funcs.get_func_cmt(pfn: [func_t](#ida_funcs.func_t), repeatable: [bool](https://docs.python.org/3/library/functions.html#bool)) → [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None) Get function comment. * **Parameters:** * **pfn** – ptr to function structure * **repeatable** – get repeatable comment? * **Returns:** size of comment or -1 In fact this function works with function chunks too. ### ida_funcs.set_func_cmt(pfn: [func_t](#ida_funcs.func_t), cmt: [str](https://docs.python.org/3/library/stdtypes.html#str), repeatable: [bool](https://docs.python.org/3/library/functions.html#bool)) → [bool](https://docs.python.org/3/library/functions.html#bool) Set function comment. This function works with function chunks too. * **Parameters:** * **pfn** – ptr to function structure * **cmt** – comment string, may be multiline (with ‘ ‘). Use empty str (“”) to delete comment :param repeatable: set repeatable comment? ### ida_funcs.update_func(pfn: [func_t](#ida_funcs.func_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Update information about a function in the database (func_t). You must not change the function start and end addresses using this function. Use set_func_start() and set_func_end() for it. * **Parameters:** **pfn** – ptr to function structure * **Returns:** success ### ida_funcs.add_func_ex(pfn: [func_t](#ida_funcs.func_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Add a new function. * **Parameters:** **pfn** – ptr to filled function structure * **Returns:** success ### ida_funcs.del_func(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Delete a function. * **Parameters:** **ea** – any address in the function entry chunk * **Returns:** success ### ida_funcs.set_func_start(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), newstart: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [int](https://docs.python.org/3/library/functions.html#int) Move function chunk start address. * **Parameters:** * **ea** – any address in the function * **newstart** – new end address of the function * **Returns:** Function move result codes ### ida_funcs.MOVE_FUNC_OK ok ### ida_funcs.MOVE_FUNC_NOCODE no instruction at ‘newstart’ ### ida_funcs.MOVE_FUNC_BADSTART bad new start address ### ida_funcs.MOVE_FUNC_NOFUNC no function at ‘ea’ ### ida_funcs.MOVE_FUNC_REFUSED a plugin refused the action ### ida_funcs.set_func_end(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), newend: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Move function chunk end address. * **Parameters:** * **ea** – any address in the function * **newend** – new end address of the function * **Returns:** success ### ida_funcs.reanalyze_function(\*args) → [None](https://docs.python.org/3/library/constants.html#None) Reanalyze a function. This function plans to analyzes all chunks of the given function. Optional parameters (ea1, ea2) may be used to narrow the analyzed range. * **Parameters:** * **pfn** – pointer to a function * **ea1** – start of the range to analyze * **ea2** – end of range to analyze * **analyze_parents** – meaningful only if pfn points to a function tail. if true, all tail parents will be reanalyzed. if false, only the given tail will be reanalyzed. ### ida_funcs.find_func_bounds(nfn: [func_t](#ida_funcs.func_t), flags: [int](https://docs.python.org/3/library/functions.html#int)) → [int](https://docs.python.org/3/library/functions.html#int) Determine the boundaries of a new function. * **Parameters:** * **nfn** – structure to fill with information nfn->start_ea points to the start address of the new function. * **flags** – Find function bounds flags * **Returns:** Find function bounds result codes ### ida_funcs.FIND_FUNC_NORMAL stop processing if undefined byte is encountered ### ida_funcs.FIND_FUNC_DEFINE create instruction if undefined byte is encountered ### ida_funcs.FIND_FUNC_IGNOREFN ignore existing function boundaries. by default the function returns function boundaries if ea belongs to a function. ### ida_funcs.FIND_FUNC_KEEPBD do not modify incoming function boundaries, just create instructions inside the boundaries. ### ida_funcs.FIND_FUNC_UNDEF function has instructions that pass execution flow to unexplored bytes. nfn->end_ea will have the address of the unexplored byte. ### ida_funcs.FIND_FUNC_OK ok, ‘nfn’ is ready for add_func() ### ida_funcs.FIND_FUNC_EXIST function exists already. its bounds are returned in ‘nfn’. ### ida_funcs.get_func_name(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None) Get function name. * **Parameters:** **ea** – any address in the function * **Returns:** length of the function name ### ida_funcs.calc_func_size(pfn: [func_t](#ida_funcs.func_t)) → asize_t Calculate function size. This function takes into account all fragments of the function. * **Parameters:** **pfn** – ptr to function structure ### ida_funcs.get_func_bitness(pfn: [func_t](#ida_funcs.func_t)) → [int](https://docs.python.org/3/library/functions.html#int) Get function bitness (which is equal to the function segment bitness). pfn==nullptr => returns 0 * **Returns:** 0: 16 * **Returns:** 1: 32 * **Returns:** 2: 64 ### ida_funcs.set_visible_func(pfn: [func_t](#ida_funcs.func_t), visible: [bool](https://docs.python.org/3/library/functions.html#bool)) → [None](https://docs.python.org/3/library/constants.html#None) Set visibility of function ### ida_funcs.set_func_name_if_jumpfunc(pfn: [func_t](#ida_funcs.func_t), oldname: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [int](https://docs.python.org/3/library/functions.html#int) Give a meaningful name to function if it consists of only ‘jump’ instruction. * **Parameters:** * **pfn** – pointer to function (may be nullptr) * **oldname** – old name of function. if old name was in “ ``` j_ ``` …” form, then we may discard it and set a new name. if oldname is not known, you may pass nullptr. * **Returns:** success ### ida_funcs.calc_thunk_func_target(pfn: [func_t](#ida_funcs.func_t)) → ea_t \* Calculate target of a thunk function. * **Parameters:** **pfn** – pointer to function (may not be nullptr) * **Returns:** the target function or BADADDR ### ida_funcs.func_does_return(callee: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Does the function return? To calculate the answer, FUNC_NORET flag and is_noret() are consulted The latter is required for imported functions in the .idata section. Since in .idata we have only function pointers but not functions, we have to introduce a special flag for them. ### ida_funcs.reanalyze_noret_flag(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Plan to reanalyze noret flag. This function does not remove FUNC_NORET if it is already present. It just plans to reanalysis. ### ida_funcs.set_noret_insn(insn_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), noret: [bool](https://docs.python.org/3/library/functions.html#bool)) → [bool](https://docs.python.org/3/library/functions.html#bool) Signal a non-returning instruction. This function can be used by the processor module to tell the kernel about non-returning instructions (like call exit). The kernel will perform the global function analysis and find out if the function returns at all. This analysis will be done at the first call to func_does_return() * **Returns:** true if the instruction ‘noret’ flag has been changed ### ida_funcs.get_fchunk(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → func_t \* Get pointer to function chunk structure by address. * **Parameters:** **ea** – any address in a function chunk * **Returns:** ptr to a function chunk or nullptr. This function may return a function entry as well as a function tail. ### ida_funcs.getn_fchunk(n: [int](https://docs.python.org/3/library/functions.html#int)) → func_t \* Get pointer to function chunk structure by number. * **Parameters:** **n** – number of function chunk, is in range 0..get_fchunk_qty()-1 * **Returns:** ptr to a function chunk or nullptr. This function may return a function entry as well as a function tail. ### ida_funcs.get_fchunk_qty() → [int](https://docs.python.org/3/library/functions.html#int) Get total number of function chunks in the program. ### ida_funcs.get_fchunk_num(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [int](https://docs.python.org/3/library/functions.html#int) Get ordinal number of a function chunk in the global list of function chunks. * **Parameters:** **ea** – any address in the function chunk * **Returns:** number of function chunk (0..get_fchunk_qty()-1). -1 means ‘no function chunk at the specified address’. ### ida_funcs.get_prev_fchunk(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → func_t \* Get pointer to the previous function chunk in the global list. * **Parameters:** **ea** – any address in the program * **Returns:** ptr to function chunk or nullptr if previous function chunk doesn’t exist ### ida_funcs.get_next_fchunk(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → func_t \* Get pointer to the next function chunk in the global list. * **Parameters:** **ea** – any address in the program * **Returns:** ptr to function chunk or nullptr if next function chunk doesn’t exist ### ida_funcs.append_func_tail(pfn: [func_t](#ida_funcs.func_t), ea1: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), ea2: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Append a new tail chunk to the function definition. If the tail already exists, then it will simply be added to the function tail list Otherwise a new tail will be created and its owner will be set to be our function If a new tail cannot be created, then this function will fail. * **Parameters:** * **pfn** – pointer to the function * **ea1** – start of the tail. If a tail already exists at the specified address it must start at ‘ea1’ * **ea2** – end of the tail. If a tail already exists at the specified address it must end at ‘ea2’. If specified as BADADDR, IDA will determine the end address itself. ### ida_funcs.remove_func_tail(pfn: [func_t](#ida_funcs.func_t), tail_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Remove a function tail. If the tail belongs only to one function, it will be completely removed. Otherwise if the function was the tail owner, the first function using this tail becomes the owner of the tail. * **Parameters:** * **pfn** – pointer to the function * **tail_ea** – any address inside the tail to remove ### ida_funcs.set_tail_owner(fnt: [func_t](#ida_funcs.func_t), new_owner: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Set a new owner of a function tail. The new owner function must be already referring to the tail (after append_func_tail). * **Parameters:** * **fnt** – pointer to the function tail * **new_owner** – the entry point of the new owner function ### ida_funcs.read_regargs(pfn: [func_t](#ida_funcs.func_t)) → [None](https://docs.python.org/3/library/constants.html#None) ### ida_funcs.add_regarg(pfn: [func_t](#ida_funcs.func_t), reg: [int](https://docs.python.org/3/library/functions.html#int), tif: [tinfo_t](../ida_typeinf/index.md#ida_typeinf.tinfo_t), name: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [None](https://docs.python.org/3/library/constants.html#None) ### ida_funcs.IDASGN_OK ok ### ida_funcs.IDASGN_BADARG bad number of signature ### ida_funcs.IDASGN_APPLIED signature is already applied ### ida_funcs.IDASGN_CURRENT signature is currently being applied ### ida_funcs.IDASGN_PLANNED signature is planned to be applied ### ida_funcs.plan_to_apply_idasgn(fname: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [int](https://docs.python.org/3/library/functions.html#int) Add a signature file to the list of planned signature files. * **Parameters:** **fname** – file name. should not contain directory part. * **Returns:** 0 if failed, otherwise number of planned (and applied) signatures ### ida_funcs.apply_idasgn_to(signame: [str](https://docs.python.org/3/library/stdtypes.html#str), ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), is_startup: [bool](https://docs.python.org/3/library/functions.html#bool)) → [int](https://docs.python.org/3/library/functions.html#int) Apply a signature file to the specified address. * **Parameters:** * **signame** – short name of signature file (the file name without path) * **ea** – address to apply the signature * **is_startup** – if set, then the signature is treated as a startup one for startup signature ida doesn’t rename the first function of the applied module. * **Returns:** Library function codes ### ida_funcs.get_idasgn_qty() → [int](https://docs.python.org/3/library/functions.html#int) Get number of signatures in the list of planned and applied signatures. * **Returns:** 0..n ### ida_funcs.get_current_idasgn() → [int](https://docs.python.org/3/library/functions.html#int) Get number of the current signature. * **Returns:** 0..n-1 ### ida_funcs.calc_idasgn_state(n: [int](https://docs.python.org/3/library/functions.html#int)) → [int](https://docs.python.org/3/library/functions.html#int) Get state of a signature in the list of planned signatures * **Parameters:** **n** – number of signature in the list (0..get_idasgn_qty()-1) * **Returns:** state of signature or IDASGN_BADARG ### ida_funcs.del_idasgn(n: [int](https://docs.python.org/3/library/functions.html#int)) → [int](https://docs.python.org/3/library/functions.html#int) Remove signature from the list of planned signatures. * **Parameters:** **n** – number of signature in the list (0..get_idasgn_qty()-1) * **Returns:** IDASGN_OK, IDASGN_BADARG, IDASGN_APPLIED ### ida_funcs.get_idasgn_title(name: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None) Get full description of the signature by its short name. * **Parameters:** **name** – short name of a signature * **Returns:** size of signature description or -1 ### ida_funcs.apply_startup_sig(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), startup: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [bool](https://docs.python.org/3/library/functions.html#bool) Apply a startup signature file to the specified address. * **Parameters:** * **ea** – address to apply the signature to; usually idainfo::start_ea * **startup** – the name of the signature file without path and extension * **Returns:** true if successfully applied the signature ### ida_funcs.try_to_add_libfunc(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [int](https://docs.python.org/3/library/functions.html#int) Apply the currently loaded signature file to the specified address. If a library function is found, then create a function and name it accordingly. * **Parameters:** **ea** – any address in the program * **Returns:** Library function codes ### ida_funcs.LIBFUNC_FOUND ok, library function is found ### ida_funcs.LIBFUNC_NONE no, this is not a library function ### ida_funcs.LIBFUNC_DELAY no decision because of lack of information ### ida_funcs.get_func_start(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) ### ida_funcs.get_prev_func_ea(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) ### ida_funcs.get_next_func_ea(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) ### ida_funcs.get_fchunk_start(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) ### ida_funcs.get_prev_fchunk_ea(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) ### ida_funcs.get_next_fchunk_ea(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) ### ida_funcs.get_func_ea_by_num(n: [int](https://docs.python.org/3/library/functions.html#int)) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) ### ida_funcs.get_fchunk_ea_by_num(n: [int](https://docs.python.org/3/library/functions.html#int)) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) ### ida_funcs.get_func_flags(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → uint64 ### ida_funcs.is_visible_func(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_funcs.is_finally_visible_func(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_funcs.set_func_flags(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), flags: uint64) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_funcs.set_func_flag(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), flag: uint64, on_off: [bool](https://docs.python.org/3/library/functions.html#bool) = True) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_funcs.is_function_entry(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_funcs.is_function_tail(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_funcs.get_tail_owner(tail_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) ### ida_funcs.get_func_cmt_ea(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), repeatable: [bool](https://docs.python.org/3/library/functions.html#bool)) → [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None) ### ida_funcs.set_func_cmt_ea(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), cmt: [str](https://docs.python.org/3/library/stdtypes.html#str), repeatable: [bool](https://docs.python.org/3/library/functions.html#bool)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_funcs.get_func_bitness_ea(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [int](https://docs.python.org/3/library/functions.html#int) ### ida_funcs.get_func_bits_ea(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [int](https://docs.python.org/3/library/functions.html#int) ### ida_funcs.get_func_bytes_ea(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [int](https://docs.python.org/3/library/functions.html#int) ### ida_funcs.get_func_bits(pfn: [func_t](#ida_funcs.func_t)) → [int](https://docs.python.org/3/library/functions.html#int) ### ida_funcs.get_func_bytes(pfn: [func_t](#ida_funcs.func_t)) → [int](https://docs.python.org/3/library/functions.html#int) ### ida_funcs.calc_func_size_ea(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → asize_t ### ida_funcs.get_func_ranges_ea(ranges: [rangeset_t](../ida_range/index.md#ida_range.rangeset_t), ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) ### ida_funcs.set_visible_func_ea(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), visible: [bool](https://docs.python.org/3/library/functions.html#bool)) → [None](https://docs.python.org/3/library/constants.html#None) ### ida_funcs.set_function_name_if_jumpfunc(func_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), oldname: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_funcs.reanalyze_function_ea(\*args) → [None](https://docs.python.org/3/library/constants.html#None) ### ida_funcs.add_func_regarg(func_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), reg: [int](https://docs.python.org/3/library/functions.html#int), tif: [tinfo_t](../ida_typeinf/index.md#ida_typeinf.tinfo_t), name: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [None](https://docs.python.org/3/library/constants.html#None) ### ida_funcs.get_func_regarg_qty(func_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [int](https://docs.python.org/3/library/functions.html#int) ### ida_funcs.get_func_regarg(out: [regarg_t](#ida_funcs.regarg_t), func_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), n: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_funcs.get_func_regargs(out: [regargs_t](#ida_funcs.regargs_t), func_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_funcs.append_func_tail_ea(func_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), ea1: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), ea2: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_funcs.remove_func_tail_ea(func_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), tail_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_funcs.set_tail_owner_ea(tail_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), new_owner: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_funcs.get_func_chunknum_ea(func_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [int](https://docs.python.org/3/library/functions.html#int) ### ida_funcs.get_func_tail_qty(func_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [int](https://docs.python.org/3/library/functions.html#int) ### ida_funcs.get_func_tails(out: [rangevec_t](../ida_range/index.md#ida_range.rangevec_t), func_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_funcs.function_contains(func_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_funcs.is_same_func(ea1: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), ea2: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_funcs.is_same_fchunk(ea1: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), ea2: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_funcs.func_contains(pfn: [func_t](#ida_funcs.func_t), ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_funcs.iterate_func_chunks_ea(fchunk_ea: ida_idaapi.ea_t, visitor: func_chunk_visitor_t const &, include_parents: bool = False) → [None](https://docs.python.org/3/library/constants.html#None) ### ida_funcs.get_prev_function_addr(func_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) ### ida_funcs.get_next_function_addr(func_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) ### ida_funcs.lock_func_range_ea(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), lock: [bool](https://docs.python.org/3/library/functions.html#bool)) → [None](https://docs.python.org/3/library/constants.html#None) ### ida_funcs.is_func_locked_ea(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### *class* ida_funcs.lock_func_ea(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown ### *class* ida_funcs.lock_func(pfn: [func_t](#ida_funcs.func_t)) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown ### *class* ida_funcs.lock_func_with_tails_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown ### ida_funcs.func_tail_iterator_set(fti: func_tail_iterator_t, pfn: [func_t](#ida_funcs.func_t), ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_funcs.func_tail_iterator_set_ea(fti: func_tail_iterator_t, ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_funcs.func_parent_iterator_set(fpi: func_parent_iterator_t, pfn: [func_t](#ida_funcs.func_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_funcs.function_tail_iterator_set(fti: [function_tail_iterator_t](#ida_funcs.function_tail_iterator_t), func_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_funcs.function_tail_iterator_set_ea(fti: [function_tail_iterator_t](#ida_funcs.function_tail_iterator_t), ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_funcs.function_tail_iterator_set_range(fti: [function_tail_iterator_t](#ida_funcs.function_tail_iterator_t), ea1: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), ea2: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_funcs.function_tail_iterator_chunk(out: [range_t](../ida_range/index.md#ida_range.range_t), fti: [function_tail_iterator_t](#ida_funcs.function_tail_iterator_t)) → [None](https://docs.python.org/3/library/constants.html#None) ### ida_funcs.function_tail_iterator_first(fti: [function_tail_iterator_t](#ida_funcs.function_tail_iterator_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_funcs.function_tail_iterator_last(fti: [function_tail_iterator_t](#ida_funcs.function_tail_iterator_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_funcs.function_tail_iterator_next(fti: [function_tail_iterator_t](#ida_funcs.function_tail_iterator_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_funcs.function_tail_iterator_prev(fti: [function_tail_iterator_t](#ida_funcs.function_tail_iterator_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_funcs.function_tail_iterator_main(fti: [function_tail_iterator_t](#ida_funcs.function_tail_iterator_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_funcs.function_parent_iterator_set(fpi: [function_parent_iterator_t](#ida_funcs.function_parent_iterator_t), tail_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_funcs.function_parent_iterator_parent(fpi: [function_parent_iterator_t](#ida_funcs.function_parent_iterator_t)) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) ### ida_funcs.function_parent_iterator_first(fpi: [function_parent_iterator_t](#ida_funcs.function_parent_iterator_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_funcs.function_parent_iterator_last(fpi: [function_parent_iterator_t](#ida_funcs.function_parent_iterator_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_funcs.function_parent_iterator_next(fpi: [function_parent_iterator_t](#ida_funcs.function_parent_iterator_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_funcs.function_parent_iterator_prev(fpi: [function_parent_iterator_t](#ida_funcs.function_parent_iterator_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_funcs.function_item_iterator_next(fii: function_item_iterator_t, testf: testf_t \*, ud: void \*) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_funcs.function_item_iterator_prev(fii: function_item_iterator_t, testf: testf_t \*, ud: void \*) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_funcs.function_item_iterator_succ(fii: function_item_iterator_t, testf: testf_t \*, ud: void \*) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_funcs.function_item_iterator_decode_prev_insn(fii: function_item_iterator_t, out: insn_t \*) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_funcs.function_item_iterator_decode_preceding_insn(fii: function_item_iterator_t, visited: eavec_t \*, p_farref: bool \*, out: insn_t \*) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_funcs.f_any(arg1: flags64_t, arg2: void \*) → [bool](https://docs.python.org/3/library/functions.html#bool) Helper function to accept any address. ### *class* ida_funcs.func_tail_iterator_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### set(\*args) → [bool](https://docs.python.org/3/library/functions.html#bool) #### set_ea(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### set_range(ea1: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), ea2: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### chunk() → range_t const & #### first() → [bool](https://docs.python.org/3/library/functions.html#bool) #### last() → [bool](https://docs.python.org/3/library/functions.html#bool) #### prev() → [bool](https://docs.python.org/3/library/functions.html#bool) #### main() → [bool](https://docs.python.org/3/library/functions.html#bool) #### next ### *class* ida_funcs.func_item_iterator_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### set(\*args) → [bool](https://docs.python.org/3/library/functions.html#bool) Set a function range. if pfn == nullptr then a segment range will be set. #### set_range(ea1: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), ea2: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Set an arbitrary range. #### first() → [bool](https://docs.python.org/3/library/functions.html#bool) #### last() → [bool](https://docs.python.org/3/library/functions.html#bool) #### current() → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) #### set_ea(\_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### chunk() → range_t const & #### prev(func: testf_t \*) → [bool](https://docs.python.org/3/library/functions.html#bool) #### next_addr() → [bool](https://docs.python.org/3/library/functions.html#bool) #### next_head() → [bool](https://docs.python.org/3/library/functions.html#bool) #### next_code() → [bool](https://docs.python.org/3/library/functions.html#bool) #### next_data() → [bool](https://docs.python.org/3/library/functions.html#bool) #### next_not_tail() → [bool](https://docs.python.org/3/library/functions.html#bool) #### prev_addr() → [bool](https://docs.python.org/3/library/functions.html#bool) #### prev_head() → [bool](https://docs.python.org/3/library/functions.html#bool) #### prev_code() → [bool](https://docs.python.org/3/library/functions.html#bool) #### prev_data() → [bool](https://docs.python.org/3/library/functions.html#bool) #### prev_not_tail() → [bool](https://docs.python.org/3/library/functions.html#bool) #### decode_prev_insn(out: insn_t \*) → [bool](https://docs.python.org/3/library/functions.html#bool) #### decode_preceding_insn(visited: eavec_t \*, p_farref: bool \*, out: insn_t \*) → [bool](https://docs.python.org/3/library/functions.html#bool) #### succ(func: testf_t \*) → [bool](https://docs.python.org/3/library/functions.html#bool) Similar to next(), but succ() iterates the chunks from low to high addresses, while next() iterates through chunks starting at the function entry chunk #### succ_code() → [bool](https://docs.python.org/3/library/functions.html#bool) #### next #### addresses() Provide an iterator on addresses contained within the function #### code_items() Provide an iterator on code items contained within the function #### data_items() Provide an iterator on data items contained within the function #### head_items() Provide an iterator on item heads contained within the function #### not_tails() Provide an iterator on non-tail addresses contained within the function ### *class* ida_funcs.func_parent_iterator_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### set(\_fnt: [func_t](#ida_funcs.func_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### parent() → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) #### first() → [bool](https://docs.python.org/3/library/functions.html#bool) #### last() → [bool](https://docs.python.org/3/library/functions.html#bool) #### prev() → [bool](https://docs.python.org/3/library/functions.html#bool) #### reset_fnt(\_fnt: [func_t](#ida_funcs.func_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### next ### ida_funcs.get_prev_func_addr(pfn: [func_t](#ida_funcs.func_t), ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) ### ida_funcs.get_next_func_addr(pfn: [func_t](#ida_funcs.func_t), ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) ### ida_funcs.GFI_NAME Populate the function name. ### ida_funcs.GFI_CMT Populate the regular comment. ### ida_funcs.GFI_CMT_RPT Populate the repeatable comment. ### ida_funcs.GFI_COMMENTS Populate both comments. ### ida_funcs.GFI_ALL Populate all optional fields. ### *class* ida_funcs.fchunk_info_t(start: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) = 0, end: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) = 0) Bases: [`ida_range.range_t`](../ida_range/index.md#ida_range.range_t) #### thisown #### is_valid() → [bool](https://docs.python.org/3/library/functions.html#bool) Is the function chunk info valid? #### is_tail() → [bool](https://docs.python.org/3/library/functions.html#bool) Is this a tail chunk? #### is_entry() → [bool](https://docs.python.org/3/library/functions.html#bool) Is this an entry chunk? #### get_flags() → uint64 Function chunk flags Function flags. #### set_flags(v: uint64) → [None](https://docs.python.org/3/library/constants.html#None) #### is_far() → [bool](https://docs.python.org/3/library/functions.html#bool) Is a far function? #### does_return() → [bool](https://docs.python.org/3/library/functions.html#bool) Does function return? #### analyzed_sp() → [bool](https://docs.python.org/3/library/functions.html#bool) Has SP-analysis been performed? #### need_prolog_analysis() → [bool](https://docs.python.org/3/library/functions.html#bool) Needs prolog analysis? ### ida_funcs.get_fchunk_info(out: [fchunk_info_t](#ida_funcs.fchunk_info_t), ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Get the range of the function chunk (entry or tail) containing ‘ea’. * **Parameters:** * **out** – pointer to output buffer, may be nullptr * **ea** – any address in a function chunk * **Returns:** true if a chunk was found at ea ### ida_funcs.get_prev_fchunk_info(out: [fchunk_info_t](#ida_funcs.fchunk_info_t), ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Get the previous function chunk before the one containing ‘ea’. * **Parameters:** * **out** – pointer to output buffer, may be nullptr * **ea** – any address in the program * **Returns:** true if a previous chunk was found ### ida_funcs.get_next_fchunk_info(out: [fchunk_info_t](#ida_funcs.fchunk_info_t), ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Get the next function chunk after the one containing ‘ea’. * **Parameters:** * **out** – pointer to output buffer, may be nullptr * **ea** – any address in the program * **Returns:** true if a next chunk was found ### *class* ida_funcs.func_entry_info_t(start: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) = 0, end: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) = 0) Bases: [`fchunk_info_t`](#ida_funcs.fchunk_info_t) #### thisown #### has(gfi_flags: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) Check if a string field was populated by get_func_entry_info(). * **Parameters:** **gfi_flags** – combination of Flags for get_func_entry_info() flags to check * **Returns:** true if all specified fields are available #### set_flags(v: uint64) → [None](https://docs.python.org/3/library/constants.html#None) Function flags Function flags. #### set_flag(v: uint64, cnd: [bool](https://docs.python.org/3/library/functions.html#bool) = True) → [None](https://docs.python.org/3/library/constants.html#None) Set or clear function flag Function flags. #### get_frame_id() → [int](https://docs.python.org/3/library/functions.html#int) Netnode id of frame structure. #### get_frsize() → asize_t Size of local variables part of frame in bytes. #### set_frsize(v: asize_t) → [None](https://docs.python.org/3/library/constants.html#None) #### get_frregs() → ushort Size of saved registers in frame. #### set_frregs(v: ushort) → [None](https://docs.python.org/3/library/constants.html#None) #### get_argsize() → asize_t Number of bytes purged from the stack upon returning. #### set_argsize(v: asize_t) → [None](https://docs.python.org/3/library/constants.html#None) #### get_fpd() → asize_t Frame pointer delta. #### set_fpd(v: asize_t) → [None](https://docs.python.org/3/library/constants.html#None) #### get_color() → bgcolor_t User defined function color. #### set_color(v: bgcolor_t) → [None](https://docs.python.org/3/library/constants.html#None) #### get_name() → [str](https://docs.python.org/3/library/stdtypes.html#str) Function name (requires GFI_NAME flag). #### get_cmt() → [str](https://docs.python.org/3/library/stdtypes.html#str) Function comment (requires GFI_CMT flag). #### get_cmt_rpt() → [str](https://docs.python.org/3/library/stdtypes.html#str) Repeatable function comment (requires GFI_CMT_RPT flag). ### ida_funcs.get_func_entry_info(out: [func_entry_info_t](#ida_funcs.func_entry_info_t), ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), flags: [int](https://docs.python.org/3/library/functions.html#int) = 0) → [bool](https://docs.python.org/3/library/functions.html#bool) Get function entry info by address. * **Parameters:** * **out** – pointer to output buffer, may be nullptr * **ea** – any address in a function * **flags** – combination of Flags for get_func_entry_info() flags to control which optional string fields to populate * **Returns:** true if a function entry was found at the given address ### ida_funcs.get_func_entry_info_by_num(out: [func_entry_info_t](#ida_funcs.func_entry_info_t), n: [int](https://docs.python.org/3/library/functions.html#int), flags: [int](https://docs.python.org/3/library/functions.html#int) = 0) → [bool](https://docs.python.org/3/library/functions.html#bool) Get function entry info by ordinal number. * **Parameters:** * **out** – pointer to output buffer, may be nullptr * **n** – number of function, is in range 0..get_func_qty()-1 * **flags** – combination of Flags for get_func_entry_info() flags * **Returns:** true if a function with the given number exists ### ida_funcs.set_func_entry_info(fi: [func_entry_info_t](#ida_funcs.func_entry_info_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Update function entry info in the database. You cannot use this function to change the range boundaries. Uses start_ea to identify the function, applies only modified fields. * **Parameters:** **fi** – entry info to update * **Returns:** success ### ida_funcs.add_function_ex(fi: [func_entry_info_t](#ida_funcs.func_entry_info_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Add a new function using func_entry_info_t. If fi->end_ea is BADADDR, then IDA will try to determine the function bounds by calling find_func_bounds(…, FIND_FUNC_DEFINE). Uses fi->start_ea, fi->end_ea, and fi->get_flags(). On success, fi is updated with the resulting function properties. * **Parameters:** **fi** – entry info describing the function to create * **Returns:** success ### ida_funcs.add_func(\*args) → [bool](https://docs.python.org/3/library/functions.html#bool) Add a new function. If the function end address is BADADDR, then IDA will try to determine the function bounds by calling find_func_bounds(…, FIND_FUNC_DEFINE). * **Parameters:** * **ea1** – start address * **ea2** – end address * **Returns:** success ### ida_funcs.find_function_bounds(fi: [func_entry_info_t](#ida_funcs.func_entry_info_t), flags: [int](https://docs.python.org/3/library/functions.html#int)) → [int](https://docs.python.org/3/library/functions.html#int) Determine the boundaries of a new function. This function tries to find the start and end addresses of a new function. It calls the module with processor_t::func_bounds in order to fine tune the function boundaries. * **Parameters:** * **fi** – entry info to fill with information. fi->start_ea points to the start address of the new function. * **flags** – Find function bounds flags * **Returns:** Find function bounds result codes. On success, fi is updated with the resulting function properties. ### ida_funcs.calc_thunk_function_target(fi: [func_entry_info_t](#ida_funcs.func_entry_info_t)) → ea_t \* Calculate thunk function target. * **Parameters:** **fi** – function entry info * **Returns:** the target function or BADADDR ### *class* ida_funcs.func_tail_info_t(start: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) = 0, end: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) = 0) Bases: [`fchunk_info_t`](#ida_funcs.fchunk_info_t) #### thisown #### get_owner() → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) Primary owner function start_ea. #### get_refqty() → [int](https://docs.python.org/3/library/functions.html#int) Number of refering functions (for quick checks without iterating). ### ida_funcs.get_func_tail_info(out: [func_tail_info_t](#ida_funcs.func_tail_info_t), ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Get function tail info by address. * **Parameters:** * **out** – pointer to output buffer, may be nullptr * **ea** – any address in a function tail chunk * **Returns:** true if a tail chunk was found at the given address ### ida_funcs.get_tail_referer_qty(tail_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [int](https://docs.python.org/3/library/functions.html#int) Get the number of referers (parent functions) for a tail chunk. * **Parameters:** **tail_ea** – any address in a function tail chunk * **Returns:** number of referers, or 0 ### ida_funcs.get_tail_referer(tail_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), n: [int](https://docs.python.org/3/library/functions.html#int)) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) Get a tail chunk referer by index. * **Parameters:** * **tail_ea** – any address in a function tail chunk * **n** – 0-based index * **Returns:** referer (function start address), or BADADDR ### ida_funcs.get_tail_referers(out: eavec_t \*, tail_ea: ida_idaapi.ea_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Get all referers (parent functions) for a tail chunk. * **Parameters:** * **out** – output vector of ea_t (function start addresses) * **tail_ea** – any address in a function tail chunk * **Returns:** success ### *class* ida_funcs.function_tail_iterator_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### set(\*args) → [bool](https://docs.python.org/3/library/functions.html#bool) #### set_ea(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### set_range(ea1: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), ea2: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### chunk(out: [range_t](../ida_range/index.md#ida_range.range_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### first() → [bool](https://docs.python.org/3/library/functions.html#bool) #### last() → [bool](https://docs.python.org/3/library/functions.html#bool) #### prev() → [bool](https://docs.python.org/3/library/functions.html#bool) #### main() → [bool](https://docs.python.org/3/library/functions.html#bool) ### *class* ida_funcs.function_parent_iterator_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### set(tail_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### parent() → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) #### first() → [bool](https://docs.python.org/3/library/functions.html#bool) #### last() → [bool](https://docs.python.org/3/library/functions.html#bool) #### prev() → [bool](https://docs.python.org/3/library/functions.html#bool) ### *class* ida_funcs.function_item_iterator_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### set(\*args) → [bool](https://docs.python.org/3/library/functions.html#bool) Set a function range. if func_ea == BADADDR then a segment range will be set. #### set_range(ea1: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), ea2: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Set an arbitrary range. #### first() → [bool](https://docs.python.org/3/library/functions.html#bool) #### last() → [bool](https://docs.python.org/3/library/functions.html#bool) #### current() → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) #### set_ea(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### chunk(out: [range_t](../ida_range/index.md#ida_range.range_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### prev(func: testf_t \*) → [bool](https://docs.python.org/3/library/functions.html#bool) #### next_addr() → [bool](https://docs.python.org/3/library/functions.html#bool) #### next_head() → [bool](https://docs.python.org/3/library/functions.html#bool) #### next_code() → [bool](https://docs.python.org/3/library/functions.html#bool) #### next_data() → [bool](https://docs.python.org/3/library/functions.html#bool) #### next_not_tail() → [bool](https://docs.python.org/3/library/functions.html#bool) #### prev_addr() → [bool](https://docs.python.org/3/library/functions.html#bool) #### prev_head() → [bool](https://docs.python.org/3/library/functions.html#bool) #### prev_code() → [bool](https://docs.python.org/3/library/functions.html#bool) #### prev_data() → [bool](https://docs.python.org/3/library/functions.html#bool) #### prev_not_tail() → [bool](https://docs.python.org/3/library/functions.html#bool) #### decode_prev_insn(out: insn_t \*) → [bool](https://docs.python.org/3/library/functions.html#bool) #### decode_preceding_insn(visited: eavec_t \*, p_farref: bool \*, out: insn_t \*) → [bool](https://docs.python.org/3/library/functions.html#bool) #### succ(func: testf_t \*) → [bool](https://docs.python.org/3/library/functions.html#bool) Similar to next(), but succ() iterates the chunks from low to high addresses, while next() iterates through chunks starting at the function entry chunk #### succ_code() → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_funcs.get_fchunk_referer(ea: [int](https://docs.python.org/3/library/functions.html#int), idx) ### ida_funcs.get_idasgn_desc(n) Get information about a signature in the list. It returns: (name of signature, names of optional libraries) See also: get_idasgn_desc_with_matches * **Parameters:** **n** – number of signature in the list (0..get_idasgn_qty()-1) * **Returns:** None on failure or tuple(signame, optlibs) ### ida_funcs.get_idasgn_desc_with_matches(n) Get information about a signature in the list. It returns: (name of signature, names of optional libraries, number of matches) * **Parameters:** **n** – number of signature in the list (0..get_idasgn_qty()-1) * **Returns:** None on failure or tuple(signame, optlibs, nmatches) ### ida_funcs.func_t_\_from_ptrval_\_(ptrval: [int](https://docs.python.org/3/library/functions.html#int)) → func_t \* ### ida_funcs.calc_thunk_func_target(\*args) Calculate target of a thunk function. * **Parameters:** * **pfn** – pointer to function (may not be nullptr) * **fptr** – out: will hold address of a function pointer (if indirect jump) * **Returns:** the target function or BADADDR ### ida_funcs.calc_thunk_function_target(\*args) Calculate thunk function target. * **Parameters:** * **fi** – function entry info * **fptr** – out: will hold address of a function pointer (if indirect jump) * **Returns:** the target function or BADADDR ### ida_funcs.is_func_entry ### ida_funcs.is_func_tail ### ida_funcs.lock_func_range ### ida_funcs.is_func_locked ### ida_funcs.get_func ### ida_funcs.get_func_chunknum ### ida_funcs.getn_func ### ida_funcs.get_prev_func ### ida_funcs.get_next_func ### ida_funcs.get_func_ranges ### ida_funcs.get_func_cmt ### ida_funcs.set_func_cmt ### ida_funcs.update_func ### ida_funcs.add_func_ex ### ida_funcs.reanalyze_function ### ida_funcs.find_func_bounds ### ida_funcs.calc_func_size ### ida_funcs.get_func_bitness ### ida_funcs.set_visible_func ### ida_funcs.set_func_name_if_jumpfunc ### ida_funcs.calc_thunk_func_target ### ida_funcs.get_fchunk ### ida_funcs.getn_fchunk ### ida_funcs.get_prev_fchunk ### ida_funcs.get_next_fchunk ### ida_funcs.append_func_tail ### ida_funcs.remove_func_tail ### ida_funcs.set_tail_owner ### ida_funcs.add_regarg ### ida_funcs.func_contains ### ida_funcs.get_prev_func_addr ### ida_funcs.get_next_func_addr ### ida_funcs.get_func_bits ### ida_funcs.get_func_bytes ### ida_funcs.is_visible_func ### ida_funcs.is_finally_visible_func ### ida_funcs.lock_func ### ida_funcs.func_tail_iterator_t ### ida_funcs.func_item_iterator_t ### ida_funcs.func_parent_iterator_t # index.html.md # paint_over_navbar summary: paint on top of the navigation band description: : Using an “event filter”, we will intercept paint events targeted at the navigation band widget, let it paint itself, and then add our own markers on top. level: intermediate ## Attributes | [`painter`](#paint_over_navbar.painter) | | |-------------------------------------------|----| ## Classes | [`painter_t`](#paint_over_navbar.painter_t) | | |-----------------------------------------------|----| ## Module Contents ### *class* paint_over_navbar.painter_t Bases: `PySide6.QtCore.QObject` #### target #### items *= []* #### painting *= False* #### add_item(ea, radius, color) #### add_random_item() #### eventFilter(receiver, event) ### paint_over_navbar.painter # index.html.md # add_hotkey summary: assign a shortcut to a custom function description: : ida_kernwin.add_hotkey is a simpler, but much less flexible alternative to ida_kernwin.register_action (though it does use the same mechanism under the hood.)
It’s particularly useful during prototyping, but note that the actions that are created cannot be inserted in menus, toolbars or cannot provide a custom ida_kernwin.action_handler_t.update callback. keywords: actions see_also: actions level: beginner ## Attributes | [`hotkey_ctx`](#add_hotkey.hotkey_ctx) | | |------------------------------------------|----| ## Functions | [`hotkey_pressed`](#add_hotkey.hotkey_pressed)() | | |----------------------------------------------------|----| ## Module Contents ### add_hotkey.hotkey_pressed() ### add_hotkey.hotkey_ctx # index.html.md # dump_flowchart_ea summary: dump function flowchart, new API description: : Dumps the current function’s flowchart, using 2 methods:
> * the low-level ida_gdl.qflow_chart_ea_t type level: beginner ## Attributes | [`ea`](#dump_flowchart_ea.ea) | | |---------------------------------|----| ## Functions | [`out`](#dump_flowchart_ea.out)(p, msg) | | |--------------------------------------------------------------------------------|----| | [`out_succ`](#dump_flowchart_ea.out_succ)(p, start_ea, end_ea) | | | [`out_pred`](#dump_flowchart_ea.out_pred)(p, start_ea, end_ea) | | | [`using_qflow_chart_ea_t`](#dump_flowchart_ea.using_qflow_chart_ea_t)(ea[, p]) | | ## Module Contents ### dump_flowchart_ea.out(p, msg) ### dump_flowchart_ea.out_succ(p, start_ea, end_ea) ### dump_flowchart_ea.out_pred(p, start_ea, end_ea) ### dump_flowchart_ea.using_qflow_chart_ea_t(ea, p=True) ### dump_flowchart_ea.ea # index.html.md # ana_emu_out summary: rewrite the representation of some instructions description: : Implements disassembly of BUG_INSTR used in Linux kernel BUG() macro, which is architecturally undefined and is not disassembled by IDA’s ARM module
See Linux/arch/arm/include/asm/bug.h for more info level: intermediate ## Attributes | [`ITYPE_BUGINSN`](#ana_emu_out.ITYPE_BUGINSN) | | |-------------------------------------------------|----| | [`MNEM_WIDTH`](#ana_emu_out.MNEM_WIDTH) | | | [`bahooks`](#ana_emu_out.bahooks) | | ## Classes | [`MyHooks`](#ana_emu_out.MyHooks) | | |-------------------------------------|----| ## Module Contents ### ana_emu_out.ITYPE_BUGINSN ### ana_emu_out.MNEM_WIDTH *= 16* ### *class* ana_emu_out.MyHooks Bases: [`ida_idp.IDP_Hooks`](../ida_idp/index.md#ida_idp.IDP_Hooks) #### reported *= []* #### ev_ana_insn(insn) Analyze one instruction and fill ‘out’ structure. This function shouldn’t change the database, flags or anything else. All these actions should be performed only by emu_insn() function. insn_t::ea contains address of instruction to analyze. * **Parameters:** **out** – (insn_t ``` * ``` ) * **Returns:** length of the instruction in bytes, 0 if instruction can’t be decoded. * **Returns:** 0: if instruction can’t be decoded. #### ev_emu_insn(insn) 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. * **Parameters:** **insn** – (const insn_t ``` * ``` ) * **Returns:** 1: ok * **Returns:** -1: the kernel will delete the instruction #### ev_out_mnem(outctx) Generate instruction mnemonics. This callback should append the colored mnemonics to ctx.outbuf Optional notification, if absent, out_mnem will be called. * **Parameters:** **outctx** – (outctx_t ``` * ``` ) * **Returns:** 1: if appended the mnemonics * **Returns:** 0: not implemented ### ana_emu_out.bahooks # index.html.md # dump_extra_comments summary: retrieve comments surrounding instructions description: : Use the ida_lines.get_extra_cmt API to retrieve anterior and posterior extra comments.
This script registers two actions, that can be used to dump the previous and next extra comments. level: intermediate ## Attributes | [`widget_title`](#dump_extra_comments.widget_title) | | |-----------------------------------------------------------|----| | [`ida_view`](#dump_extra_comments.ida_view) | | | [`action_variants`](#dump_extra_comments.action_variants) | | | [`actname`](#dump_extra_comments.actname) | | ## Classes | [`dump_at_point_handler_t`](#dump_extra_comments.dump_at_point_handler_t) | | |-------------------------------------------------------------------------------|----| | [`action_previous_handler_t`](#dump_extra_comments.action_previous_handler_t) | | | [`action_next_handler_t`](#dump_extra_comments.action_next_handler_t) | | ## Module Contents ### *class* dump_extra_comments.dump_at_point_handler_t(anchor) Bases: [`ida_kernwin.action_handler_t`](../ida_kernwin/index.md#ida_kernwin.action_handler_t) #### anchor #### activate(ctx) Activate an action. This function implements the core behavior of an action. It is called when the action is triggered, from a menu, from a popup menu, from the toolbar, or programmatically. * **Returns:** non-zero: all IDA windows will be refreshed #### update(ctx) Update an action. This is called when the context of the UI changed, and we need to let the action update some of its properties if needed (label, icon, …) In addition, this lets IDA know whether the action is enabled, and when it should be queried for availability again. Note: This callback is not meant to change anything in the application’s state, except by calling one (or many) of the “update_action_\*()” functions on this very action. #### *static* compose_action_name(v) ### *class* dump_extra_comments.action_previous_handler_t Bases: [`dump_at_point_handler_t`](#dump_extra_comments.dump_at_point_handler_t) #### ACTION_LABEL *= 'previous'* #### ACTION_SHORTCUT *= 'Ctrl+Shift+Y'* ### *class* dump_extra_comments.action_next_handler_t Bases: [`dump_at_point_handler_t`](#dump_extra_comments.dump_at_point_handler_t) #### ACTION_LABEL *= 'next'* #### ACTION_SHORTCUT *= 'Ctrl+Shift+Z'* ### dump_extra_comments.widget_title *= 'IDA View-A'* ### dump_extra_comments.ida_view ### dump_extra_comments.action_variants ### dump_extra_comments.actname *= 'dump_extra_comments:previous'* # index.html.md # serialize_minsn summary: serialize and deserialize a microcode instruction (minsn_t) description: : Generates microcode for the current function, takes its first instruction, serializes it to a byte string, and then deserializes those bytes back into a fresh minsn_t. equal_insns() is used to confirm the round trip preserves the structure.
Note: minsn_t::deserialize is an instance method (returns bool), not a static factory like mba_t::deserialize / cfunc_t::deserialize. We construct an empty minsn_t with minsn_t(ea) and deserialize into it.
This is the minsn_t-level counterpart to serialize.py, which round-trips a whole mba_t / cfunc_t pair. level: beginner ## Functions | [`first_insn`](#serialize_minsn.first_insn)(mba) | | |----------------------------------------------------|----| | [`main`](#serialize_minsn.main)() | | ## Module Contents ### serialize_minsn.first_insn(mba) ### serialize_minsn.main() # index.html.md # dbg_trace summary: react to trace notifications description: : This script demonstrates using the low-level tracing hook (ida_dbg.DBG_Hooks.dbg_trace). It can be run like so:
> ida.exe -B -Sdbg_trace.py -Ltrace.log file.exe level: advanced ## Attributes | [`under_test`](#dbg_trace.under_test) | | |-----------------------------------------|----| ## Classes | [`TraceHook`](#dbg_trace.TraceHook) | | |---------------------------------------|----| ## Functions | [`do_trace`](#dbg_trace.do_trace)([then_quit_ida]) | | |------------------------------------------------------|----| ## Module Contents ### dbg_trace.under_test ### *class* dbg_trace.TraceHook Bases: [`ida_dbg.DBG_Hooks`](../ida_dbg/index.md#ida_dbg.DBG_Hooks) #### traces *= 0* #### epReached *= False* #### dbg_trace(tid, ea) A step occurred (one instruction was executed). This event notification is only generated if step tracing is enabled. * **Parameters:** * **tid** – (thid_t) thread ID * **ip** – (ea_t) current instruction pointer. usually points after the executed instruction * **Returns:** 1: do not log this trace event * **Returns:** 0: log it #### dbg_run_to(pid, tid=0, ea=0) #### dbg_process_exit(pid, tid, ea, code) ### dbg_trace.do_trace(then_quit_ida=True) # index.html.md # operand_to_field_path summary: turn an instruction operand into a structure-field reference by name description: : Demonstrates how to use ida_typeinf.resolve_field_path() to convert a user-friendly dotted field path (e.g. “_IO_STACK_LOCATION.Parameters.DeviceIoControl.IoControlCode”) into the path[] inputs that ida_bytes.op_stroff() expects.
resolve_field_path() is needed when the chain crosses anonymous types – unnamed types are stored with synthetic “::$HASH” names, so the friendly dotted form the user writes does not match the canonical names directly. resolve_field_path() walks the chain segment by segment and produces a ready-to-use op_stroff() path.
Companion to operand_to_struct_member.py, which does the same thing interactively (the user picks the top struct and any union members through a chooser dialog). This one is for scripts that already know exactly where in the type tree the operand should point. level: intermediate ## Attributes | [`FIELD_PATH`](#operand_to_field_path.FIELD_PATH) | | |-----------------------------------------------------|----| | [`OPNUM`](#operand_to_field_path.OPNUM) | | | [`result`](#operand_to_field_path.result) | | ## Functions | [`retype_as_field_path`](#operand_to_field_path.retype_as_field_path)(ea, opnum, field_path) | Annotate operand opnum of the instruction at ea as field_path. | |------------------------------------------------------------------------------------------------|------------------------------------------------------------------| ## Module Contents ### operand_to_field_path.FIELD_PATH *= '_IO_STACK_LOCATION.Parameters.DeviceIoControl.IoControlCode'* ### operand_to_field_path.OPNUM *= 1* ### operand_to_field_path.retype_as_field_path(ea, opnum, field_path) Annotate operand opnum of the instruction at ea as field_path. field_path: a dotted name like “MyStruct.field1.field2.leaf”. Returns the ida_typeinf.field_path_t produced by resolve_field_path() on success or None on failure. ### operand_to_field_path.result *= None* # index.html.md # func_ti_changed_listener summary: print notifications about function prototype changes description: : The goal of this script is to demonstrate some usage of the type API. In this script, we will create an IDB hook that intercepts ti_changed IDB events, and if it is a function prototype that changed, print it. level: intermediate ## Attributes | [`idbhook`](#func_ti_changed_listener.idbhook) | | |--------------------------------------------------|----| ## Classes | [`ti_changed_t`](#func_ti_changed_listener.ti_changed_t) | | |------------------------------------------------------------|----| ## Module Contents ### *class* func_ti_changed_listener.ti_changed_t(\_flags: [int](https://docs.python.org/3/library/functions.html#int) = 0, \_hkcb_flags: [int](https://docs.python.org/3/library/functions.html#int) = 1) Bases: [`ida_idp.IDB_Hooks`](../ida_idp/index.md#ida_idp.IDB_Hooks) #### print_details(tif, ea) #### ti_changed(ea, types, fields) An item typestring (c/c++ prototype) has been changed. * **Parameters:** * **ea** – (ea_t) * **type** – (const type_t ``` * ``` ) * **fnames** – (const p_list ``` * ``` ) ### func_ti_changed_listener.idbhook # index.html.md # print_call_stack summary: print call stack description: > Print the return addresses from the call stack at a breakpoint, > when debugging a Linux binary. > (and also print the module and the debug name from debugger) > To use this example: > > * run ida on test program simple_appcall_linux64, or > > ida on test program simple_appcall_linux32, and wait for > > auto-analysis to finish > > * put a breakpoint where you want to see the call stack > > * select the ‘linux debugger’ (either local, or remote) > > * start debugging > > * Press Shift+C at the breakpoint level: intermediate ## Attributes | [`ACTION_NAME`](#print_call_stack.ACTION_NAME) | | |--------------------------------------------------------|----| | [`ACTION_LABEL`](#print_call_stack.ACTION_LABEL) | | | [`ACTION_SHORTCUT`](#print_call_stack.ACTION_SHORTCUT) | | | [`ACTION_HELP`](#print_call_stack.ACTION_HELP) | | ## Classes | [`print_call_stack_ah_t`](#print_call_stack.print_call_stack_ah_t) | | |----------------------------------------------------------------------|----| ## Functions | [`log`](#print_call_stack.log)(msg) | | |---------------------------------------|----| ## Module Contents ### print_call_stack.log(msg) ### *class* print_call_stack.print_call_stack_ah_t #### activate(ctx) #### update(ctx) ### print_call_stack.ACTION_NAME *= 'example:print_call_stack'* ### print_call_stack.ACTION_LABEL *= 'Print call stack'* ### print_call_stack.ACTION_SHORTCUT *= 'Shift+C'* ### print_call_stack.ACTION_HELP *= 'Press Shift+C to dump the call stack'* # index.html.md # visit_tinfo summary: recursively visit a type and its members description: : In this script, we show an example of tinfo_visitor_t to list a user define type members, recursively.
This scripts skips array & pointer members (by calling tinfo_visitor_t.prune_now()) level: intermediate ## Attributes | [`til`](#visit_tinfo.til) | | |---------------------------------|----| | [`idh_id`](#visit_tinfo.idh_id) | | | [`tif`](#visit_tinfo.tif) | | ## Classes | [`tinfo_visitor`](#visit_tinfo.tinfo_visitor) | | |-------------------------------------------------|----| ## Module Contents ### *class* visit_tinfo.tinfo_visitor Bases: [`ida_typeinf.tinfo_visitor_t`](../ida_typeinf/index.md#ida_typeinf.tinfo_visitor_t) #### visit_type(out, tif, name, cmt) Visit a subtype. this function must be implemented in the derived class. it may optionally fill out with the new type info. this can be used to modify types (in this case the ‘out’ argument of apply_to() may not be nullptr) return 0 to continue the traversal. return !=0 to stop the traversal. ### visit_tinfo.til ### visit_tinfo.idh_id ### visit_tinfo.tif # index.html.md # vds5 summary: dump C-tree graph description: : Registers an action that can be used to show the graph of the ctree. The current item will be highlighted in the graph.
The command shortcut is Ctrl+Shift+G, and is also added to the context menu.
To display the graph, we produce a .gdl file, and request that ida displays that using ida_gdl.display_gdl. level: advanced ## Attributes | [`ACTION_NAME`](#vds5.ACTION_NAME) | | |--------------------------------------------|----| | [`ACTION_SHORTCUT`](#vds5.ACTION_SHORTCUT) | | | [`CL_WHITE`](#vds5.CL_WHITE) | | | [`CL_BLUE`](#vds5.CL_BLUE) | | | [`CL_RED`](#vds5.CL_RED) | | | [`CL_GREEN`](#vds5.CL_GREEN) | | | [`CL_YELLOW`](#vds5.CL_YELLOW) | | | [`CL_MAGENTA`](#vds5.CL_MAGENTA) | | | [`CL_CYAN`](#vds5.CL_CYAN) | | | [`CL_DARKGREY`](#vds5.CL_DARKGREY) | | | [`CL_DARKBLUE`](#vds5.CL_DARKBLUE) | | | [`CL_DARKRED`](#vds5.CL_DARKRED) | | | [`CL_DARKGREEN`](#vds5.CL_DARKGREEN) | | | [`CL_DARKYELLOW`](#vds5.CL_DARKYELLOW) | | | [`CL_DARKMAGENTA`](#vds5.CL_DARKMAGENTA) | | | [`CL_DARKCYAN`](#vds5.CL_DARKCYAN) | | | [`CL_GOLD`](#vds5.CL_GOLD) | | | [`CL_LIGHTGREY`](#vds5.CL_LIGHTGREY) | | | [`CL_LIGHTBLUE`](#vds5.CL_LIGHTBLUE) | | | [`CL_LIGHTRED`](#vds5.CL_LIGHTRED) | | | [`CL_LIGHTGREEN`](#vds5.CL_LIGHTGREEN) | | | [`CL_LIGHTYELLOW`](#vds5.CL_LIGHTYELLOW) | | | [`CL_LIGHTMAGENTA`](#vds5.CL_LIGHTMAGENTA) | | | [`CL_LIGHTCYAN`](#vds5.CL_LIGHTCYAN) | | | [`CL_LILAC`](#vds5.CL_LILAC) | | | [`CL_TURQUOISE`](#vds5.CL_TURQUOISE) | | | [`CL_AQUAMARINE`](#vds5.CL_AQUAMARINE) | | | [`CL_KHAKI`](#vds5.CL_KHAKI) | | | [`CL_PURPLE`](#vds5.CL_PURPLE) | | | [`CL_YELLOWGREEN`](#vds5.CL_YELLOWGREEN) | | | [`CL_PINK`](#vds5.CL_PINK) | | | [`CL_ORANGE`](#vds5.CL_ORANGE) | | | [`CL_ORCHID`](#vds5.CL_ORCHID) | | | [`CL_BLACK`](#vds5.CL_BLACK) | | | [`COLORS_LUT`](#vds5.COLORS_LUT) | | ## Classes | [`cfunc_graph_t`](#vds5.cfunc_graph_t) | | |--------------------------------------------------|--------------------------------------| | [`graph_builder_t`](#vds5.graph_builder_t) | | | [`display_graph_ah_t`](#vds5.display_graph_ah_t) | | | [`vds5_hooks_t`](#vds5.vds5_hooks_t) | | | [`my_plugin_t`](#vds5.my_plugin_t) | Base class for all scripted plugins. | ## Functions | [`get_color_name`](#vds5.get_color_name)(c) | | |-----------------------------------------------|----| | [`PLUGIN_ENTRY`](#vds5.PLUGIN_ENTRY)() | | ## Module Contents ### vds5.ACTION_NAME *= 'vds5.py:displaygraph'* ### vds5.ACTION_SHORTCUT *= 'Ctrl+Shift+G'* ### vds5.CL_WHITE *= 16777215* ### vds5.CL_BLUE *= 16711680* ### vds5.CL_RED *= 255* ### vds5.CL_GREEN *= 65280* ### vds5.CL_YELLOW *= 65535* ### vds5.CL_MAGENTA *= 16711935* ### vds5.CL_CYAN *= 16776960* ### vds5.CL_DARKGREY *= 5592405* ### vds5.CL_DARKBLUE *= 8388608* ### vds5.CL_DARKRED *= 128* ### vds5.CL_DARKGREEN *= 32768* ### vds5.CL_DARKYELLOW *= 32896* ### vds5.CL_DARKMAGENTA *= 8388736* ### vds5.CL_DARKCYAN *= 8421376* ### vds5.CL_GOLD *= 55295* ### vds5.CL_LIGHTGREY *= 11184810* ### vds5.CL_LIGHTBLUE *= 16744576* ### vds5.CL_LIGHTRED *= 8421631* ### vds5.CL_LIGHTGREEN *= 8454016* ### vds5.CL_LIGHTYELLOW *= 8454143* ### vds5.CL_LIGHTMAGENTA *= 16744703* ### vds5.CL_LIGHTCYAN *= 16777088* ### vds5.CL_LILAC *= 15631086* ### vds5.CL_TURQUOISE *= 13688896* ### vds5.CL_AQUAMARINE *= 13959039* ### vds5.CL_KHAKI *= 9234160* ### vds5.CL_PURPLE *= 15736992* ### vds5.CL_YELLOWGREEN *= 3329434* ### vds5.CL_PINK *= 13353215* ### vds5.CL_ORANGE *= 42495* ### vds5.CL_ORCHID *= 14053594* ### vds5.CL_BLACK *= 0* ### vds5.COLORS_LUT ### vds5.get_color_name(c) ### *class* vds5.cfunc_graph_t(highlight) #### items *= []* #### highlight #### succs *= []* #### preds *= []* #### nsucc(n) #### npred(n) #### succ(n, i) #### pred(n, i) #### size() #### add_node() #### add_edge(x, y) #### get_expr_name(expr) #### get_node_label(n) #### get_node_color(n) #### gen_gdl(fname) #### dump() ### *class* vds5.graph_builder_t(cg) Bases: [`ida_hexrays.ctree_parentee_t`](../ida_hexrays/index.md#ida_hexrays.ctree_parentee_t) #### cg #### reverse *= []* #### add_node(i) #### process(i) #### visit_insn(i) Visit a statement. This is a visitor function which should be overridden by a derived class to do some useful work. This visitor performs pre-order traserval, i.e. an item is visited before its children. * **Returns:** 0 to continue the traversal, nonzero to stop. #### visit_expr(e) Visit an expression. This is a visitor function which should be overridden by a derived class to do some useful work. This visitor performs pre-order traserval, i.e. an item is visited before its children. * **Returns:** 0 to continue the traversal, nonzero to stop. ### *class* vds5.display_graph_ah_t Bases: [`ida_kernwin.action_handler_t`](../ida_kernwin/index.md#ida_kernwin.action_handler_t) #### activate(ctx) Activate an action. This function implements the core behavior of an action. It is called when the action is triggered, from a menu, from a popup menu, from the toolbar, or programmatically. * **Returns:** non-zero: all IDA windows will be refreshed #### update(ctx) Update an action. This is called when the context of the UI changed, and we need to let the action update some of its properties if needed (label, icon, …) In addition, this lets IDA know whether the action is enabled, and when it should be queried for availability again. Note: This callback is not meant to change anything in the application’s state, except by calling one (or many) of the “update_action_\*()” functions on this very action. ### *class* vds5.vds5_hooks_t(\_flags: [int](https://docs.python.org/3/library/functions.html#int) = 0, \_hkcb_flags: [int](https://docs.python.org/3/library/functions.html#int) = 1) Bases: [`ida_hexrays.Hexrays_Hooks`](../ida_hexrays/index.md#ida_hexrays.Hexrays_Hooks) #### populating_popup(widget, handle, vu) Populating popup menu. We can add menu items now. * **Parameters:** * **widget** – (TWidget ``` * ``` ) * **popup_handle** – (TPopupMenu ``` * ``` ) * **vu** – (vdui_t ``` * ``` ) ### *class* vds5.my_plugin_t Bases: [`ida_idaapi.plugin_t`](../ida_idaapi/index.md#ida_idaapi.plugin_t) Base class for all scripted plugins. #### flags *= 16* #### wanted_name *= 'Hex-Rays show C graph (IDAPython)'* #### wanted_hotkey *= ''* #### comment *= 'Sample plugin5 for Hex-Rays decompiler'* #### help *= ''* #### init() #### term() #### run(arg) ### vds5.PLUGIN_ENTRY() # index.html.md # list_problems summary: enumerate known problems description: : Using the API to list all problems that IDA encountered during analysis. level: beginner ## Attributes | [`plistdesc`](#list_problems.plistdesc) | | |-------------------------------------------|----| ## Module Contents ### list_problems.plistdesc # index.html.md # change_stkvar_type summary: change the type & name of a function stack frame variable description: : The goal of this script is to demonstrate some usage of the type API.
In this script, we show a way to change the type and the name of a stack variable. In this case we will take advantage of the fact that RtlImageNtHeader calls RtlImageNtHeaderEx which takes a pointer to PIMAGE_NT_HEADERS as its fourth parameter and, for this, uses a stack variable of its caller.
* Get the function object for RtlImageNtHeader. * Iterate through the function item to localize the load of the stack variable address before the call to RtlImageNtHeaderEx. We > keep this information. * Localize the call and take advantage of the previoulsy stored instruction to get the stack variable index in the frame. * Set the type and rename the stack variable. level: advanced ## Attributes | [`new_name`](#change_stkvar_type.new_name) | | |--------------------------------------------------|----| | [`caller_name`](#change_stkvar_type.caller_name) | | | [`callee_name`](#change_stkvar_type.callee_name) | | | [`type_name`](#change_stkvar_type.type_name) | | | [`lea_insn`](#change_stkvar_type.lea_insn) | | ## Functions | [`main`](#change_stkvar_type.main)() | | |----------------------------------------|----| ## Module Contents ### change_stkvar_type.new_name *= 'pNtHeaders'* ### change_stkvar_type.caller_name *= 'RtlImageNtHeader'* ### change_stkvar_type.callee_name *= 'RtlImageNtHeaderEx'* ### change_stkvar_type.type_name *= '_IMAGE_NT_HEADERS64'* ### change_stkvar_type.lea_insn *= None* ### change_stkvar_type.main() # index.html.md # simple_appcall_linux summary: execute code into the application being debugged (on Linux) description: : Using the ida_idd.Appcall utility to execute code in the process being debugged.
This example will run the test program and stop wherever the cursor currently is, and then perform an appcall to execute the ref4 and ref8 functions.
To use this example:
> * run ida64 on test program simple_appcall_linux64, or > ida on test program simple_appcall_linux32, and wait for > auto-analysis to finish > * select the ‘linux debugger’ (either local, or remote) > * run this script
Note: the real body of code is in simple_appcall_common.py. level: advanced ## Attributes | [`appcall_hooks`](#simple_appcall_linux.appcall_hooks) | | |----------------------------------------------------------|----| ## Module Contents ### simple_appcall_linux.appcall_hooks # index.html.md # list_strings summary: dump the strings that are present in the file description: : This uses idautils.Strings to iterate over the string literals that are present in the IDB. Contrary to @show_selected_strings, this will not require that the “Strings” window is opened & available. see_also: show_selected_strings level: beginner ## Attributes | [`s`](#list_strings.s) | | |--------------------------|----| ## Module Contents ### list_strings.s # index.html.md # list_struct_accesses summary: list operands representing a “path” to a (possibly nested) structure member description: : It is possible to assign, to instruction operands, the notion of “structure offset”, which really is a pointer to a specific offset in a type, leading to a possible N-deep path within types.
E.g., assuming the following types
> struct c > {
> > int foo; > > int bar; > > int baz; > > int quux; > > int trail;
> };
> struct b > {
> > int gap; > > c c_instance;
> };
> struct a > {
> > int count; > > b b_instance;
> };
and assuming an instruction that initially looks like this:
> mov eax, 10h
by pressing t, the user will be able set the “structure offset” to either:
> * c.trail > * b.c_instance.quux > * a.b_inscance.c_instance.baz
Here’s why IDA offers a.b_inscance.c_instance.baz:
> 0000 struct a > : {
> 0000 int count; > 0004 struct b
> > {
> 0004 int gap; > 0008 struct c
> > {
> 0008 int foo; > 000C int bar; > 0010 int baz; > 0014 int quux; > 0018 int trail;
> > > > };
> > > };
> > };
This sample shows how to programmatically retrieve information about that “structure member path” that an operand was made pointing to. keywords: bookmarks level: advanced ## Functions | [`get_struct_paths`](#list_struct_accesses.get_struct_paths)(→ List[str]) | | |-----------------------------------------------------------------------------|----| ## Module Contents ### list_struct_accesses.get_struct_paths(ea: [int](https://docs.python.org/3/library/functions.html#int), opnum: [int](https://docs.python.org/3/library/functions.html#int)) → List[[str](https://docs.python.org/3/library/stdtypes.html#str)] # index.html.md # actions summary: custom actions, with icons & tooltips description: : How to create user actions, that once created can be inserted in menus, toolbars, context menus, …
Those actions, when triggered, will be passed a ‘context’ that contains some of the most frequently needed bits of information.
In addition, custom actions can determine when they want to be available (through their ida_kernwin.action_handler_t.update callback) keywords: actions see_also: add_hotkey level: intermediate ## Attributes | [`icon_data`](#actions.icon_data) | | |-------------------------------------|----| | [`act_icon`](#actions.act_icon) | | | [`hooks`](#actions.hooks) | | | [`act_name`](#actions.act_name) | | ## Classes | [`SayHi`](#actions.SayHi) | | |-----------------------------|----| | [`Hooks`](#actions.Hooks) | | ## Module Contents ### *class* actions.SayHi(message) Bases: [`ida_kernwin.action_handler_t`](../ida_kernwin/index.md#ida_kernwin.action_handler_t) #### message #### activate(ctx) Activate an action. This function implements the core behavior of an action. It is called when the action is triggered, from a menu, from a popup menu, from the toolbar, or programmatically. * **Returns:** non-zero: all IDA windows will be refreshed #### update(ctx) Update an action. This is called when the context of the UI changed, and we need to let the action update some of its properties if needed (label, icon, …) In addition, this lets IDA know whether the action is enabled, and when it should be queried for availability again. Note: This callback is not meant to change anything in the application’s state, except by calling one (or many) of the “update_action_\*()” functions on this very action. ### actions.icon_data *= b''* ### actions.act_icon ### actions.hooks *= None* ### actions.act_name *= 'example:add_action'* ### *class* actions.Hooks(\_flags: [int](https://docs.python.org/3/library/functions.html#int) = 0, \_hkcb_flags: [int](https://docs.python.org/3/library/functions.html#int) = 1) Bases: [`ida_kernwin.UI_Hooks`](../ida_kernwin/index.md#ida_kernwin.UI_Hooks) #### finish_populating_widget_popup(widget, popup) IDA is about to be done populating the context menu for a widget. This is your chance to attach_action_to_popup(). * **Parameters:** * **widget** – (TWidget ``` * ``` ) * **popup_handle** – (TPopupMenu ``` * ``` ) * **ctx** – (const action_activation_ctx_t ``` * ``` ) * **Returns:** void # index.html.md # idapythonrc summary: code to be run right after IDAPython initialization description: : The idapythonrc.py file:
> * %APPDATA%Hex-RaysIDA Proidapythonrc.py (on Windows) > * ~/.idapro/idapythonrc.py (on Linux & Mac)
can contain any IDAPython code that will be run as soon as IDAPython is done successfully initializing. level: beginner # index.html.md # ida_search Middle-level search functions. They all are controlled by Search flags ## Attributes | [`SEARCH_UP`](#ida_search.SEARCH_UP) | search towards lower addresses | |----------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [`SEARCH_DOWN`](#ida_search.SEARCH_DOWN) | search towards higher addresses | | [`SEARCH_NEXT`](#ida_search.SEARCH_NEXT) | skip the starting address when searching. this bit is useful only for search(), bin_search(), find_reg_access().

```
find_
```

.. functions skip the starting address automatically. | | [`SEARCH_CASE`](#ida_search.SEARCH_CASE) | case-sensitive search (case-insensitive otherwise) | | [`SEARCH_REGEX`](#ida_search.SEARCH_REGEX) | regular expressions in search string (supported only for the text search) | | [`SEARCH_NOBRK`](#ida_search.SEARCH_NOBRK) | do not test if the user clicked cancel to interrupt the search | | [`SEARCH_NOSHOW`](#ida_search.SEARCH_NOSHOW) | do not display the search progress/refresh screen | | [`SEARCH_IDENT`](#ida_search.SEARCH_IDENT) | search for an identifier (text search). it means that the characters before and after the match cannot be is_visible_char(). | | [`SEARCH_BRK`](#ida_search.SEARCH_BRK) | return BADADDR if the search was cancelled. | | [`SEARCH_USE`](#ida_search.SEARCH_USE) | find_reg_access: search for a use (read access) | | [`SEARCH_DEF`](#ida_search.SEARCH_DEF) | find_reg_access: search for a definition (write access) | | [`SEARCH_USESEL`](#ida_search.SEARCH_USESEL) | query the UI for a possible current selection to limit the search to | ## Functions | [`search_down`](#ida_search.search_down)(→ bool) | Is the SEARCH_DOWN bit set? | |---------------------------------------------------------------------|-------------------------------| | [`find_error`](#ida_search.find_error)(→ int \*) | | | [`find_notype`](#ida_search.find_notype)(→ int \*) | | | [`find_unknown`](#ida_search.find_unknown)(→ ida_idaapi.ea_t) | | | [`find_defined`](#ida_search.find_defined)(→ ida_idaapi.ea_t) | | | [`find_suspop`](#ida_search.find_suspop)(→ int \*) | | | [`find_data`](#ida_search.find_data)(→ ida_idaapi.ea_t) | | | [`find_code`](#ida_search.find_code)(→ ida_idaapi.ea_t) | | | [`find_not_func`](#ida_search.find_not_func)(→ ida_idaapi.ea_t) | | | [`find_imm`](#ida_search.find_imm)(→ int \*) | | | [`find_text`](#ida_search.find_text)(→ ida_idaapi.ea_t) | | | [`find_reg_access`](#ida_search.find_reg_access)(→ ida_idaapi.ea_t) | | ## Module Contents ### ida_search.SEARCH_UP search towards lower addresses ### ida_search.SEARCH_DOWN search towards higher addresses ### ida_search.SEARCH_NEXT skip the starting address when searching. this bit is useful only for search(), bin_search(), find_reg_access(). ``` find_ ``` .. functions skip the starting address automatically. ### ida_search.SEARCH_CASE case-sensitive search (case-insensitive otherwise) ### ida_search.SEARCH_REGEX regular expressions in search string (supported only for the text search) ### ida_search.SEARCH_NOBRK do not test if the user clicked cancel to interrupt the search ### ida_search.SEARCH_NOSHOW do not display the search progress/refresh screen ### ida_search.SEARCH_IDENT search for an identifier (text search). it means that the characters before and after the match cannot be is_visible_char(). ### ida_search.SEARCH_BRK return BADADDR if the search was cancelled. ### ida_search.SEARCH_USE find_reg_access: search for a use (read access) ### ida_search.SEARCH_DEF find_reg_access: search for a definition (write access) ### ida_search.SEARCH_USESEL query the UI for a possible current selection to limit the search to ### ida_search.search_down(sflag: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) Is the SEARCH_DOWN bit set? ### ida_search.find_error(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), sflag: [int](https://docs.python.org/3/library/functions.html#int)) → int \* ### ida_search.find_notype(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), sflag: [int](https://docs.python.org/3/library/functions.html#int)) → int \* ### ida_search.find_unknown(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), sflag: [int](https://docs.python.org/3/library/functions.html#int)) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) ### ida_search.find_defined(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), sflag: [int](https://docs.python.org/3/library/functions.html#int)) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) ### ida_search.find_suspop(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), sflag: [int](https://docs.python.org/3/library/functions.html#int)) → int \* ### ida_search.find_data(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), sflag: [int](https://docs.python.org/3/library/functions.html#int)) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) ### ida_search.find_code(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), sflag: [int](https://docs.python.org/3/library/functions.html#int)) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) ### ida_search.find_not_func(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), sflag: [int](https://docs.python.org/3/library/functions.html#int)) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) ### ida_search.find_imm(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), sflag: [int](https://docs.python.org/3/library/functions.html#int), search_value: [int](https://docs.python.org/3/library/functions.html#int)) → int \* ### ida_search.find_text(start_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), y: [int](https://docs.python.org/3/library/functions.html#int), x: [int](https://docs.python.org/3/library/functions.html#int), ustr: [str](https://docs.python.org/3/library/stdtypes.html#str), sflag: [int](https://docs.python.org/3/library/functions.html#int)) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) ### ida_search.find_reg_access(out: [reg_access_t](../ida_idp/index.md#ida_idp.reg_access_t), start_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), end_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), regname: [str](https://docs.python.org/3/library/stdtypes.html#str), sflag: [int](https://docs.python.org/3/library/functions.html#int)) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) # index.html.md # ida_offset Functions that deal with offsets. “Being an offset” is a characteristic of an operand. This means that operand or its part represent offset from some address in the program. This linear address is called “offset base”. Some operands may have 2 offsets simultaneously. Generally, IDA doesn’t handle this except for Motorola outer offsets. Thus there may be two offset values in an operand: simple offset and outer offset. Outer offsets are handled by specifying special operand number: it should be ORed with OPND_OUTER value. See bytes.hpp for further explanation of operand numbers. ## Functions | [`get_default_reftype`](#ida_offset.get_default_reftype)(→ reftype_t) | Get default reference type depending on the segment. | |---------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [`op_offset_ex`](#ida_offset.op_offset_ex)(→ bool) | Convert operand to a reference. To delete an offset, use clr_op_type() function. | | [`op_offset`](#ida_offset.op_offset)(→ bool) | See op_offset_ex(). | | [`op_plain_offset`](#ida_offset.op_plain_offset)(→ bool) | Convert operand to a reference with the default reference type. | | [`get_offbase`](#ida_offset.get_offbase)(→ ida_idaapi.ea_t) | Get offset base value | | [`get_offset_expression`](#ida_offset.get_offset_expression)(→ str) | Get offset expression (in the form "offset name+displ"). This function uses offset translation function ( processor_t::translate) if your IDP module has such a function. Translation function is used to map linear addresses in the program (only for offsets). | | [`get_offset_expr`](#ida_offset.get_offset_expr)(→ str) | See get_offset_expression(). | | [`can_be_off32`](#ida_offset.can_be_off32)(→ ida_idaapi.ea_t) | Does the specified address contain a valid OFF32 value?. For symbols in special segments the displacement is not taken into account. If yes, then the target address of OFF32 will be returned. If not, then BADADDR is returned. | | [`calc_offset_base`](#ida_offset.calc_offset_base)(→ ida_idaapi.ea_t) | Try to calculate the offset base This function takes into account the fixup information, current ds and cs values. | | [`calc_probable_base_by_value`](#ida_offset.calc_probable_base_by_value)(→ ida_idaapi.ea_t) | Try to calculate the offset base. 2 bases are checked: current ds and cs. If fails, return BADADDR | | [`calc_reference_data`](#ida_offset.calc_reference_data)(→ bool) | Calculate the target and base addresses of an offset expression. The calculated target and base addresses are returned in the locations pointed by 'base' and 'target'. In case 'ri.base' is BADADDR, the function calculates the offset base address from the referencing instruction/data address. The target address is copied from ri.target. If ri.target is BADADDR then the target is calculated using the base address and 'opval'. This function also checks if 'opval' matches the full value of the reference and takes in account the memory-mapping. | | [`add_refinfo_dref`](#ida_offset.add_refinfo_dref)(→ ida_idaapi.ea_t) | Add xrefs for a reference from the given instruction ( insn_t::ea). This function creates a cross references to the target and the base. insn_t::add_off_drefs() calls this function to create xrefs for 'offset' operand. | | [`calc_target`](#ida_offset.calc_target)(→ ida_idaapi.ea_t) | This function has the following signatures: | | [`calc_basevalue`](#ida_offset.calc_basevalue)(→ ida_idaapi.ea_t) | Calculate the value of the reference base. | ## Module Contents ### ida_offset.get_default_reftype(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → reftype_t Get default reference type depending on the segment. * **Returns:** one of REF_OFF8, REF_OFF16, REF_OFF32, REF_OFF64 ### ida_offset.op_offset_ex(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), n: [int](https://docs.python.org/3/library/functions.html#int), ri: [refinfo_t](../ida_nalt/index.md#ida_nalt.refinfo_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Convert operand to a reference. To delete an offset, use clr_op_type() function. * **Parameters:** **ea** – linear address. if ‘ea’ has unexplored bytes, try to convert them to * no segment: fail * 16bit segment: to 16bit word data * 32bit segment: to dword * **Parameters:** **n** – operand number (may be ORed with OPND_OUTER) * 0: first * 1: second * … * 7: eighth operand * OPND_MASK: all operands * **Parameters:** **ri** – reference information * **Returns:** success ### ida_offset.op_offset(\*args) → [bool](https://docs.python.org/3/library/functions.html#bool) See op_offset_ex(). ### ida_offset.op_plain_offset(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), n: [int](https://docs.python.org/3/library/functions.html#int), base: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Convert operand to a reference with the default reference type. ### ida_offset.get_offbase(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), n: [int](https://docs.python.org/3/library/functions.html#int)) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) Get offset base value * **Parameters:** * **ea** – linear address * **n** – 0..#UA_MAXOP-1 operand number * **Returns:** offset base or BADADDR ### ida_offset.get_offset_expression(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), n: [int](https://docs.python.org/3/library/functions.html#int), \_from: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), offset: adiff_t, getn_flags: [int](https://docs.python.org/3/library/functions.html#int) = 0) → [str](https://docs.python.org/3/library/stdtypes.html#str) Get offset expression (in the form “offset name+displ”). This function uses offset translation function ( processor_t::translate) if your IDP module has such a function. Translation function is used to map linear addresses in the program (only for offsets). Example: suppose we have instruction at linear address 0x00011000: ``` ` ``` mov ax, [bx+7422h] \` and at ds:7422h: ``` ` ``` array dw … \` We want to represent the second operand with an offset expression, so then we call: ``` ` ``` /// get_offset_expresion(0x001100, 1, 0x001102, 0x7422, buf); /// | | | | | /// | | | | +output buffer /// | | | +value of offset expression /// | | +address offset value in the instruction /// | +the second operand /// +address of instruction /// \` and the function will return a colored string: ``` ` ``` offset array \` * **Parameters:** * **ea** – start of instruction or data with the offset expression * **n** – operand number (may be ORed with OPND_OUTER) * 0: first operand * 1: second operand * … * 7: eighth operand * **Parameters:** * **offset** – value of operand or its part. The function will return text representation of this value as offset expression. * **getn_flags** – combination of: * GETN_APPZERO: meaningful only if the name refers to a structure. appends the struct field name if the field offset is zero * GETN_NODUMMY: do not generate dummy names for the expression but pretend they already exist (useful to verify that the offset expression can be represented) * **Returns:** 0: can’t convert to offset expression * **Returns:** 1: ok, a simple offset expression * **Returns:** 2: ok, a complex offset expression ### ida_offset.get_offset_expr(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), n: [int](https://docs.python.org/3/library/functions.html#int), ri: [refinfo_t](../ida_nalt/index.md#ida_nalt.refinfo_t), \_from: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), offset: adiff_t, getn_flags: [int](https://docs.python.org/3/library/functions.html#int) = 0) → [str](https://docs.python.org/3/library/stdtypes.html#str) See get_offset_expression(). ### ida_offset.can_be_off32(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) Does the specified address contain a valid OFF32 value?. For symbols in special segments the displacement is not taken into account. If yes, then the target address of OFF32 will be returned. If not, then BADADDR is returned. ### ida_offset.calc_offset_base(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), n: [int](https://docs.python.org/3/library/functions.html#int)) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) Try to calculate the offset base This function takes into account the fixup information, current ds and cs values. * **Parameters:** * **ea** – the referencing instruction/data address * **n** – operand number * 0: first operand * 1: second operand * … * 7: eighth operand * **Returns:** output base address or BADADDR ### ida_offset.calc_probable_base_by_value(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), off: [int](https://docs.python.org/3/library/functions.html#int)) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) Try to calculate the offset base. 2 bases are checked: current ds and cs. If fails, return BADADDR ### ida_offset.calc_reference_data(target: ea_t \*, base: ea_t \*, \_from: ida_idaapi.ea_t, ri: refinfo_t, opval: adiff_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Calculate the target and base addresses of an offset expression. The calculated target and base addresses are returned in the locations pointed by ‘base’ and ‘target’. In case ‘ri.base’ is BADADDR, the function calculates the offset base address from the referencing instruction/data address. The target address is copied from ri.target. If ri.target is BADADDR then the target is calculated using the base address and ‘opval’. This function also checks if ‘opval’ matches the full value of the reference and takes in account the memory-mapping. * **Parameters:** * **target** – output target address * **base** – output base address * **ri** – reference info block from the database * **opval** – operand value (usually op_t::value or op_t::addr) * **Returns:** success ### ida_offset.add_refinfo_dref(insn: insn_t const &, \_from: ida_idaapi.ea_t, ri: refinfo_t, opval: adiff_t, type: dref_t, opoff: int) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) Add xrefs for a reference from the given instruction ( insn_t::ea). This function creates a cross references to the target and the base. insn_t::add_off_drefs() calls this function to create xrefs for ‘offset’ operand. * **Parameters:** * **insn** – the referencing instruction * **ri** – reference info block from the database * **opval** – operand value (usually op_t::value or op_t::addr) * **type** – type of xref * **opoff** – offset of the operand from the start of instruction * **Returns:** the target address of the reference ### ida_offset.calc_target(\*args) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) This function has the following signatures: > 1. calc_target(from: ida_idaapi.ea_t, opval: adiff_t, ri: const refinfo_t &) -> ida_idaapi.ea_t > 2. calc_target(from: ida_idaapi.ea_t, ea: ida_idaapi.ea_t, n: int, opval: adiff_t) -> ida_idaapi.ea_t # 0: calc_target(from: ida_idaapi.ea_t, opval: adiff_t, ri: const refinfo_t &) -> ida_idaapi.ea_t Calculate the target using the provided refinfo_t. # 1: calc_target(from: ida_idaapi.ea_t, ea: ida_idaapi.ea_t, n: int, opval: adiff_t) -> ida_idaapi.ea_t Retrieve refinfo_t structure and calculate the target. ### ida_offset.calc_basevalue(target: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), base: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) Calculate the value of the reference base. # index.html.md # func_chooser summary: implement an alternative “Functions” window description: : Partially re-implements the “Functions” widget present in IDA, with a custom widget. keywords: chooser, functions see_also: choose, choose_multi level: intermediate ## Classes | [`my_funcs_t`](#func_chooser.my_funcs_t) | Chooser wrapper class. | |--------------------------------------------|--------------------------| ## Functions | [`show_my_funcs_t`](#func_chooser.show_my_funcs_t)([modal]) | | |---------------------------------------------------------------|----| ## Module Contents ### *class* func_chooser.my_funcs_t(title) Bases: [`ida_kernwin.Choose`](../ida_kernwin/index.md#ida_kernwin.Choose) Chooser wrapper class. Some constants are defined in this class. Please refer to kernwin.hpp for more information. #### items *= []* #### icon #### OnInit() Initialize the chooser and populate it. This callback is optional #### OnGetSize() Get the number of elements in the chooser. This callback is mandatory * **Returns:** the number of elements #### OnGetLine(n) Get data for an element This callback is mandatory * **Parameters:** **n** – the index to fetch data for * **Returns:** a list of strings #### OnDeleteLine(n) User deleted an element * **Parameters:** **sel** – the current selection * **Returns:** a tuple (changed, selection) #### OnGetEA(n) Get the address of an element When this function returns valid addresses: : * If any column has the CHCOL_FNAME flag, rows will be colored according to the attributes of the functions who own those addresses (extern, library function, Lumina, … - similar to what the “Functions” widget does) * When a selection is present and the user presses ( if the chooser is modal), IDA will jump to that address (through jumpto()) * **Parameters:** **n** – element number (0-based) * **Returns:** the effective address, ida_idaapi.BADADDR if the element has no address #### OnRefresh(n) The chooser needs to be refreshed. It returns the new positions of the selected items. * **Parameters:** **sel** – the current selection * **Returns:** a tuple (changed, selection) #### OnClose() The chooser window is closed. ### func_chooser.show_my_funcs_t(modal=False) # index.html.md # vds4 summary: dump user-defined information for a function description: : Prints user-defined information to the “Output” window. Namely:
> * user defined label names > * user defined indented comments > * user defined number formats > * user defined local variable names, types, comments
This script loads information from the database without decompiling anything. author: ``` EiNSTeiN_ ``` ([einstein@g3nius.org](mailto:einstein@g3nius.org)) level: intermediate ## Functions | [`run`](#vds4.run)() | | |------------------------|----| ## Module Contents ### vds4.run() # index.html.md # ida_indexer Indexer API: search functions, names, local types, segments and function comments. The indexer maintains a data structure optimized for substring matching, allowing queries to be answered quickly regardless of database size. Substring matching is further accelerated using multiple threads. ## Attributes | [`INVALID_SUBIDX_ID`](#ida_indexer.INVALID_SUBIDX_ID) | Invalid / unset value. | |-------------------------------------------------------------------------------------------|------------------------------------------------------| | [`SUBIDX_FUNCTIONS`](#ida_indexer.SUBIDX_FUNCTIONS) | Functions (mangled and demangled names). | | [`SUBIDX_LTYPES`](#ida_indexer.SUBIDX_LTYPES) | Local types defined in the IDB. | | [`SUBIDX_NAMES`](#ida_indexer.SUBIDX_NAMES) | Names in the name list (both mangled and demangled). | | [`SUBIDX_SEGMENTS`](#ida_indexer.SUBIDX_SEGMENTS) | Segment names. | | [`SUBIDX_FUNCTION_COMMENTS`](#ida_indexer.SUBIDX_FUNCTION_COMMENTS) | Non-repeatable function comments. | | [`SUBIDX_REPEATABLE_FUNCTION_COMMENTS`](#ida_indexer.SUBIDX_REPEATABLE_FUNCTION_COMMENTS) | Repeatable function comments. | | [`STR_MATCH`](#ida_indexer.STR_MATCH) | Substring match (default). Fast and exact. | | [`FUZZY`](#ida_indexer.FUZZY) | Fuzzy match. Tolerates typos and abbreviations. | ## Classes | [`match_range_t`](#ida_indexer.match_range_t) | | |-------------------------------------------------------------|----| | [`match_config_t`](#ida_indexer.match_config_t) | | | [`search_result_data_t`](#ida_indexer.search_result_data_t) | | ## Functions | [`indexer_is_enabled`](#ida_indexer.indexer_is_enabled)(→ bool) | Returns true if the indexer is enabled for the current database. The indexer is controlled by the ENABLE_INDEXER configuration option and requires the database to have been opened with indexing support. | |----------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [`indexer_match_all`](#ida_indexer.indexer_match_all)(→ search_result_data_t \*) | Search all sub-indexes for query using config. | | [`indexer_match`](#ida_indexer.indexer_match)(→ search_result_data_t \*) | Search a single sub-index identified by subindex_id for query. | ## Module Contents ### ida_indexer.INVALID_SUBIDX_ID Invalid / unset value. ### ida_indexer.SUBIDX_FUNCTIONS Functions (mangled and demangled names). ### ida_indexer.SUBIDX_LTYPES Local types defined in the IDB. ### ida_indexer.SUBIDX_NAMES Names in the name list (both mangled and demangled). ### ida_indexer.SUBIDX_SEGMENTS Segment names. ### ida_indexer.SUBIDX_FUNCTION_COMMENTS Non-repeatable function comments. ### ida_indexer.SUBIDX_REPEATABLE_FUNCTION_COMMENTS Repeatable function comments. ### *class* ida_indexer.match_range_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### start *: [int](https://docs.python.org/3/library/functions.html#int)* Index of the first matched character. #### end *: [int](https://docs.python.org/3/library/functions.html#int)* One past the last matched character. ### ida_indexer.STR_MATCH Substring match (default). Fast and exact. ### ida_indexer.FUZZY Fuzzy match. Tolerates typos and abbreviations. ### *class* ida_indexer.match_config_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### cb *: [int](https://docs.python.org/3/library/functions.html#int)* Size of this structure. Used for forward compatibility. #### mode *: match_mode_t* Matching algorithm to use. #### score_cutoff *: [int](https://docs.python.org/3/library/functions.html#int)* Minimum score, in percent (fuzzy mode only). Results below this threshold are discarded. #### max_results *: [int](https://docs.python.org/3/library/functions.html#int)* Maximum number of results to return. ### *class* ida_indexer.search_result_data_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### size() → [int](https://docs.python.org/3/library/functions.html#int) Number of results. #### get_name(index: [int](https://docs.python.org/3/library/functions.html#int)) → std::string_view Name of result at index. #### get_score(index: [int](https://docs.python.org/3/library/functions.html#int)) → [int](https://docs.python.org/3/library/functions.html#int) Match score of result at index, in percent [0, 100]. #### get_ea(index: [int](https://docs.python.org/3/library/functions.html#int)) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) Effective address of result at index, or BADADDR for local types. #### get_netnode_idx(index: [int](https://docs.python.org/3/library/functions.html#int)) → nodeidx_t Netnode index of result at index. #### get_ltype_ordinal(index: [int](https://docs.python.org/3/library/functions.html#int)) → [int](https://docs.python.org/3/library/functions.html#int) Local type ordinal of result at index, or 0 if not a local type. #### get_ltype_type(index: [int](https://docs.python.org/3/library/functions.html#int)) → type_t BT_\* type code of the local type at index (valid when get_ltype_ordinal() != 0). #### get_subindex(index: [int](https://docs.python.org/3/library/functions.html#int)) → subindex_typeid_t Sub-index that produced result at index (e.g. SUBIDX_FUNCTIONS). #### get_match_ranges_count(index: [int](https://docs.python.org/3/library/functions.html#int)) → [int](https://docs.python.org/3/library/functions.html#int) Number of matched character ranges for result at index. #### get_match_range(index: [int](https://docs.python.org/3/library/functions.html#int), range_idx: [int](https://docs.python.org/3/library/functions.html#int)) → [match_range_t](#ida_indexer.match_range_t) Returns the range_idx’th matched range for result at index. #### get_match_line_range(index: [int](https://docs.python.org/3/library/functions.html#int)) → [match_range_t](#ida_indexer.match_range_t) For function-comment results, the range within get_name_str() that holds the matched comment line. Returns {0, 0} for all other result types. #### empty() → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_indexer.indexer_is_enabled() → [bool](https://docs.python.org/3/library/functions.html#bool) Returns true if the indexer is enabled for the current database. The indexer is controlled by the ENABLE_INDEXER configuration option and requires the database to have been opened with indexing support. ### ida_indexer.indexer_match_all(query: [str](https://docs.python.org/3/library/stdtypes.html#str), config: [match_config_t](#ida_indexer.match_config_t)) → search_result_data_t \* Search all sub-indexes for query using config. * **Returns:** a heap-allocated result set; the caller must delete it. Returns nullptr if the indexer is not enabled. ### ida_indexer.indexer_match(subindex_id: subindex_typeid_t, query: [str](https://docs.python.org/3/library/stdtypes.html#str), config: [match_config_t](#ida_indexer.match_config_t)) → search_result_data_t \* Search a single sub-index identified by subindex_id for query. * **Returns:** a heap-allocated result set; the caller must delete it. Returns nullptr if the indexer is not enabled or subindex_id is invalid. # index.html.md # vds3 summary: invert if/else blocks in decompilation description: : Registers an action that can be used to invert the if and else blocks of a ida_hexrays.cif_t.
For example, a statement like
> if ( cond ) > {
> > statements1;
> } > else > {
> > statements2;
> }
will be displayed as
> if ( !cond ) > {
> > statements2;
> } > else > {
> > statements1;
> }
The modifications are persistent: the user can quit & restart IDA, and the changes will be present. author: ``` EiNSTeiN_ ``` ([einstein@g3nius.org](mailto:einstein@g3nius.org)) level: advanced ## Attributes | [`NETNODE_NAME`](#vds3.NETNODE_NAME) | | |----------------------------------------------|----| | [`inverter_actname`](#vds3.inverter_actname) | | ## Classes | [`invert_action_handler_t`](#vds3.invert_action_handler_t) | | |--------------------------------------------------------------|--------------------------------------| | [`hexrays_callback_info`](#vds3.hexrays_callback_info) | | | [`vds3_hooks_t`](#vds3.vds3_hooks_t) | | | [`idp_hooks_t`](#vds3.idp_hooks_t) | | | [`my_plugin_t`](#vds3.my_plugin_t) | Base class for all scripted plugins. | ## Functions | [`PLUGIN_ENTRY`](#vds3.PLUGIN_ENTRY)() | | |------------------------------------------|----| ## Module Contents ### vds3.NETNODE_NAME *= '$ hexrays-inverted-if'* ### vds3.inverter_actname *= 'vds3:invert'* ### *class* vds3.invert_action_handler_t(inverter) Bases: [`ida_kernwin.action_handler_t`](../ida_kernwin/index.md#ida_kernwin.action_handler_t) #### inverter #### activate(ctx) Activate an action. This function implements the core behavior of an action. It is called when the action is triggered, from a menu, from a popup menu, from the toolbar, or programmatically. * **Returns:** non-zero: all IDA windows will be refreshed #### update(ctx) Update an action. This is called when the context of the UI changed, and we need to let the action update some of its properties if needed (label, icon, …) In addition, this lets IDA know whether the action is enabled, and when it should be queried for availability again. Note: This callback is not meant to change anything in the application’s state, except by calling one (or many) of the “update_action_\*()” functions on this very action. ### *class* vds3.hexrays_callback_info Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### vu *= None* #### node #### load() #### save() #### invert_if(insn) #### add_location(ea) #### find_if_statement(vu) #### invert_if_event(vu) #### restore(cfunc) ### *class* vds3.vds3_hooks_t(i) Bases: [`ida_hexrays.Hexrays_Hooks`](../ida_hexrays/index.md#ida_hexrays.Hexrays_Hooks) #### i #### populating_popup(widget, phandle, vu) Populating popup menu. We can add menu items now. * **Parameters:** * **widget** – (TWidget ``` * ``` ) * **popup_handle** – (TPopupMenu ``` * ``` ) * **vu** – (vdui_t ``` * ``` ) #### maturity(cfunc, maturity) Ctree maturity level is being changed. * **Parameters:** * **cfunc** – (cfunc_t ``` * ``` ) * **new_maturity** – (ctree_maturity_t) ### *class* vds3.idp_hooks_t(i) Bases: [`ida_idp.IDP_Hooks`](../ida_idp/index.md#ida_idp.IDP_Hooks) #### i #### ev_privrange_changed(old_privrange, delta) Privrange interval has been moved to a new location. Most common actions to be done by module in this case: fix indices of netnodes used by module * **Parameters:** * **old_privrange** – (const range_t ``` * ``` ) - old privrange interval * **delta** – (adiff_t) * **Returns:** 0: Ok * **Returns:** -1: error (and message in errbuf) ### *class* vds3.my_plugin_t Bases: [`ida_idaapi.plugin_t`](../ida_idaapi/index.md#ida_idaapi.plugin_t) Base class for all scripted plugins. #### flags *= 16* #### wanted_name *= 'Hex-Rays if-inverter (IDAPython)'* #### wanted_hotkey *= ''* #### comment *= 'Sample plugin3 for Hex-Rays decompiler'* #### help *= ''* #### init() #### term() #### run(arg) ### vds3.PLUGIN_ENTRY() # index.html.md # list_imports summary: enumerate file imports description: : Using the API to enumerate file imports. level: beginner ## Attributes | [`nimps`](#list_imports.nimps) | | |----------------------------------|----| | [`name`](#list_imports.name) | | ## Module Contents ### list_imports.nimps ### list_imports.name # index.html.md # wrap_idaview summary: programmatically manipulate disassembly and graph widgets description: : This is an example illustrating how to manipulate an existing IDA-provided view (and thus possibly its graph), in Python. keywords: idaview, graph see_also: custom_graph_with_actions, sync_two_graphs level: advanced ## Attributes | [`viewName`](#wrap_idaview.viewName) | | |----------------------------------------|----| | [`w`](#wrap_idaview.w) | | | [`worker`](#wrap_idaview.worker) | | ## Classes | [`Worker`](#wrap_idaview.Worker) | A class that represents a thread of control. | |------------------------------------------------------|------------------------------------------------| | [`MyIDAViewWrapper`](#wrap_idaview.MyIDAViewWrapper) | Deprecated. Use View_Hooks instead. | ## Module Contents ### *class* wrap_idaview.Worker(w) Bases: [`threading.Thread`](https://docs.python.org/3/library/threading.html#threading.Thread) A class that represents a thread of control. This class can be safely subclassed in a limited fashion. There are two ways to specify the activity: by passing a callable object to the constructor, or by overriding the run() method in a subclass. #### w #### log(msg) #### req_SetCurrentRendererType(switch_to) #### req_SetNodeInfo(node, info, flags) #### req_DelNodesInfos(\*nodes) #### run() Method representing the thread’s activity. You may override this method in a subclass. The standard run() method invokes the callable object passed to the object’s constructor as the target argument, if any, with sequential and keyword arguments taken from the args and kwargs arguments, respectively. ### *class* wrap_idaview.MyIDAViewWrapper(viewName) Bases: [`ida_kernwin.IDAViewWrapper`](../ida_kernwin/index.md#ida_kernwin.IDAViewWrapper) Deprecated. Use View_Hooks instead. Because the lifecycle of an IDAView is not trivial to track (e.g., a user might close, then re-open the same disassembly view), this wrapper doesn’t bring anything superior to the View_Hooks: quite the contrary, as the latter is much more generic (and better maps IDA’s internal model.) #### printPrevFrame() #### OnViewKeydown(key, state) #### OnViewClick(x, y, state) #### OnViewDblclick(x, y, state) #### OnViewSwitched(rt) #### OnViewMouseOver(x, y, state, over_type, over_data) ### wrap_idaview.viewName *= 'IDA View-A'* ### wrap_idaview.w ### wrap_idaview.worker # index.html.md # simple_appcall_win summary: execute code into the application being debugged (on Windows) description: : Using the ida_idd.Appcall utility to execute code in the process being debugged.
This example will run the test program and stop wherever the cursor currently is, and then perform an appcall to execute the ref4 and ref8 functions.
To use this example:
> * run ida on test program simple_appcall_win64.exe, or > ida on test program simple_appcall_win32.exe, and wait for > auto-analysis to finish > * select the ‘windows debugger’ (either local, or remote) > * run this script
Note: the real body of code is in simple_appcall_common.py. level: advanced ## Attributes | [`ref4_ea`](#simple_appcall_win.ref4_ea) | | |------------------------------------------------------|----| | [`appcall_hooks`](#simple_appcall_win.appcall_hooks) | | ## Module Contents ### simple_appcall_win.ref4_ea *= 5368713216* ### simple_appcall_win.appcall_hooks # index.html.md # create_array summary: create an array type description: : The goal of this script is to demonstrate some usage of the type API. In this script, we create an array using both versions of create_array tinfo_t method. level: intermediate ## Attributes | [`tif`](#id0) | | |----------------------------|----| | [`atd`](#create_array.atd) | | | [`tif`](#id0) | | ## Module Contents ### create_array.tif ### create_array.atd ### create_array.tif # index.html.md # ida_srclang Third-party compiler support. ## Attributes | [`SRCLANG_C`](#ida_srclang.SRCLANG_C) | | |-------------------------------------------------|-----------------------------| | [`SRCLANG_CPP`](#ida_srclang.SRCLANG_CPP) | C++. | | [`SRCLANG_OBJC`](#ida_srclang.SRCLANG_OBJC) | Objective-C. | | [`SRCLANG_SWIFT`](#ida_srclang.SRCLANG_SWIFT) | Swift (not supported yet). | | [`SRCLANG_GO`](#ida_srclang.SRCLANG_GO) | Golang (not supported yet). | | [`SRCLANG_OBJCPP`](#ida_srclang.SRCLANG_OBJCPP) | Objective-C++. | ## Functions | [`select_parser_by_name`](#ida_srclang.select_parser_by_name)(→ bool) | Set the parser with the given name as the current parser. Pass nullptr or an empty string to select the default parser. | |-----------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------| | [`select_parser_by_srclang`](#ida_srclang.select_parser_by_srclang)(→ bool) | Set the parser that supports the given language(s) as the current parser. The selected parser must support all languages specified by the given srclang_t. | | [`get_selected_parser_name`](#ida_srclang.get_selected_parser_name)(→ Union[str, None]) | Get current parser name. | | [`set_parser_argv`](#ida_srclang.set_parser_argv)(→ int) | Set the command-line args to use for invocations of the parser with the given name | | [`parse_decls_for_srclang`](#ida_srclang.parse_decls_for_srclang)(→ int) | Parse type declarations in the specified language | | [`parse_decls_with_parser_ext`](#ida_srclang.parse_decls_with_parser_ext)(→ int) | Parse type declarations using the parser with the specified name | | [`get_parser_option`](#ida_srclang.get_parser_option)(→ Union[str, None]) | Get option for the parser with the specified name | | [`set_parser_option`](#ida_srclang.set_parser_option)(→ bool) | Set option for the parser with the specified name | | [`parse_decls_with_parser`](#ida_srclang.parse_decls_with_parser)(→ int) | Parse type declarations using the parser with the specified name | ## Module Contents ### ida_srclang.SRCLANG_C ### ida_srclang.SRCLANG_CPP C++. ### ida_srclang.SRCLANG_OBJC Objective-C. ### ida_srclang.SRCLANG_SWIFT Swift (not supported yet). ### ida_srclang.SRCLANG_GO Golang (not supported yet). ### ida_srclang.SRCLANG_OBJCPP Objective-C++. ### ida_srclang.select_parser_by_name(name: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [bool](https://docs.python.org/3/library/functions.html#bool) Set the parser with the given name as the current parser. Pass nullptr or an empty string to select the default parser. * **Returns:** false if no parser was found with the given name ### ida_srclang.select_parser_by_srclang(lang: srclang_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Set the parser that supports the given language(s) as the current parser. The selected parser must support all languages specified by the given srclang_t. * **Returns:** false if no such parser was found ### ida_srclang.get_selected_parser_name() → [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None) Get current parser name. * **Returns:** success ### ida_srclang.set_parser_argv(parser_name: [str](https://docs.python.org/3/library/stdtypes.html#str), argv: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [int](https://docs.python.org/3/library/functions.html#int) Set the command-line args to use for invocations of the parser with the given name * **Parameters:** * **parser_name** – name of the target parser * **argv** – argument list * **Returns:** -1: no parser was found with the given name * **Returns:** -2: the operation is not supported by the given parser * **Returns:** 0: success ### ida_srclang.parse_decls_for_srclang(lang: srclang_t, til: [til_t](../ida_typeinf/index.md#ida_typeinf.til_t), input: [str](https://docs.python.org/3/library/stdtypes.html#str), is_path: [bool](https://docs.python.org/3/library/functions.html#bool)) → [int](https://docs.python.org/3/library/functions.html#int) Parse type declarations in the specified language * **Parameters:** * **lang** – the source language(s) expected in the input * **til** – type library to store the types * **input** – input source. can be a file path or decl string * **is_path** – true if input parameter is a path to a source file, false if the input is an in-memory source snippet * **Returns:** -1: no parser was found that supports the given source language(s) * **Returns:** else: the number of errors encountered in the input source ### ida_srclang.parse_decls_with_parser_ext(parser_name: [str](https://docs.python.org/3/library/stdtypes.html#str), til: [til_t](../ida_typeinf/index.md#ida_typeinf.til_t), input: [str](https://docs.python.org/3/library/stdtypes.html#str), hti_flags: [int](https://docs.python.org/3/library/functions.html#int)) → [int](https://docs.python.org/3/library/functions.html#int) Parse type declarations using the parser with the specified name * **Parameters:** * **parser_name** – name of the target parser * **til** – type library to store the types * **input** – input source. can be a file path or decl string * **hti_flags** – combination of Type formatting flags * **Returns:** -1: no parser was found with the given name * **Returns:** else: the number of errors encountered in the input source ### ida_srclang.get_parser_option(parser_name: [str](https://docs.python.org/3/library/stdtypes.html#str), option_name: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None) Get option for the parser with the specified name * **Parameters:** * **parser_name** – name of the target parser * **option_name** – parser option name * **Returns:** success ### ida_srclang.set_parser_option(parser_name: [str](https://docs.python.org/3/library/stdtypes.html#str), option_name: [str](https://docs.python.org/3/library/stdtypes.html#str), option_value: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [bool](https://docs.python.org/3/library/functions.html#bool) Set option for the parser with the specified name * **Parameters:** * **parser_name** – name of the target parser * **option_name** – parser option name * **option_value** – parser option value * **Returns:** success ### ida_srclang.parse_decls_with_parser(parser_name: [str](https://docs.python.org/3/library/stdtypes.html#str), til: [til_t](../ida_typeinf/index.md#ida_typeinf.til_t), input: [str](https://docs.python.org/3/library/stdtypes.html#str), is_path: [bool](https://docs.python.org/3/library/functions.html#bool)) → [int](https://docs.python.org/3/library/functions.html#int) Parse type declarations using the parser with the specified name * **Parameters:** * **parser_name** – name of the target parser * **til** – type library to store the types * **input** – input source. can be a file path or decl string * **is_path** – true if input parameter is a path to a source file, false if the input is an in-memory source snippet * **Returns:** -1: no parser was found with the given name * **Returns:** else: the number of errors encountered in the input source # index.html.md # list_function_items summary: showcase (some of) the iterators available on a function description: : This demonstrates how to use some of the iterators available on the func_t type.
This example will focus on:
> * func_t[._\_iter_\_]: the default iterator; iterates on instructions > * func_t.data_items: iterate on data items contained within a function > * func_t.head_items: iterate on ‘heads’ (i.e., addresses containing > : the start of an instruction, or a data item. > * func_t.addresses: iterate on all addresses within function (code > : and data, beginning of an item or not)
Type help(ida_funcs.func_t) for a full list of iterators.
In addition, one can use:
> * func_tail_iterator_t: iterate on all the chunks (including > : the main one) of the function > * func_parent_iterator_t: iterate on all the parent functions, > : that include this chunk keywords: funcs iterator level: intermediate ## Classes | [`logger_t`](#list_function_items.logger_t) | | |-----------------------------------------------|----| ## Functions | [`main`](#list_function_items.main)() | | |-----------------------------------------|----| ## Module Contents ### *class* list_function_items.logger_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### *class* section_t(logger, header) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### logger #### indent *= 0* #### log(\*args) #### log_ea(ea) ### list_function_items.main() # index.html.md # ida_lines High level functions that deal with the generation of the disassembled text lines. This file also contains definitions for the syntax highlighting. Finally there are functions that deal with anterior/posterior user-defined lines. ## Attributes | [`COLOR_ON`](#ida_lines.COLOR_ON) | Escape character (ON). Followed by a color code (color_t). | |-------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [`COLOR_OFF`](#ida_lines.COLOR_OFF) | Escape character (OFF). Followed by a color code (color_t). | | [`COLOR_ESC`](#ida_lines.COLOR_ESC) | Escape character (Quote next character). This is needed to output '1' and '2' characters. | | [`COLOR_INV`](#ida_lines.COLOR_INV) | Escape character (Inverse foreground and background colors). This escape character has no corresponding COLOR_OFF. Its action continues until the next COLOR_INV or end of line. | | [`SCOLOR_ON`](#ida_lines.SCOLOR_ON) | Escape character (ON). | | [`SCOLOR_OFF`](#ida_lines.SCOLOR_OFF) | Escape character (OFF). | | [`SCOLOR_ESC`](#ida_lines.SCOLOR_ESC) | Escape character (Quote next character). | | [`SCOLOR_INV`](#ida_lines.SCOLOR_INV) | Escape character (Inverse colors). | | [`SCOLOR_DEFAULT`](#ida_lines.SCOLOR_DEFAULT) | Default. | | [`SCOLOR_REGCMT`](#ida_lines.SCOLOR_REGCMT) | Regular comment. | | [`SCOLOR_RPTCMT`](#ida_lines.SCOLOR_RPTCMT) | Repeatable comment (defined not here). | | [`SCOLOR_AUTOCMT`](#ida_lines.SCOLOR_AUTOCMT) | Automatic comment. | | [`SCOLOR_INSN`](#ida_lines.SCOLOR_INSN) | Instruction. | | [`SCOLOR_DATNAME`](#ida_lines.SCOLOR_DATNAME) | Dummy Data Name. | | [`SCOLOR_DNAME`](#ida_lines.SCOLOR_DNAME) | Regular Data Name. | | [`SCOLOR_DEMNAME`](#ida_lines.SCOLOR_DEMNAME) | Demangled Name. | | [`SCOLOR_SYMBOL`](#ida_lines.SCOLOR_SYMBOL) | Punctuation. | | [`SCOLOR_CHAR`](#ida_lines.SCOLOR_CHAR) | Char constant in instruction. | | [`SCOLOR_STRING`](#ida_lines.SCOLOR_STRING) | String constant in instruction. | | [`SCOLOR_NUMBER`](#ida_lines.SCOLOR_NUMBER) | Numeric constant in instruction. | | [`SCOLOR_VOIDOP`](#ida_lines.SCOLOR_VOIDOP) | Void operand. | | [`SCOLOR_CREF`](#ida_lines.SCOLOR_CREF) | Code reference. | | [`SCOLOR_DREF`](#ida_lines.SCOLOR_DREF) | Data reference. | | [`SCOLOR_CREFTAIL`](#ida_lines.SCOLOR_CREFTAIL) | Code reference to tail byte. | | [`SCOLOR_DREFTAIL`](#ida_lines.SCOLOR_DREFTAIL) | Data reference to tail byte. | | [`SCOLOR_ERROR`](#ida_lines.SCOLOR_ERROR) | Error or problem. | | [`SCOLOR_PREFIX`](#ida_lines.SCOLOR_PREFIX) | Line prefix. | | [`SCOLOR_BINPREF`](#ida_lines.SCOLOR_BINPREF) | Binary line prefix bytes. | | [`SCOLOR_EXTRA`](#ida_lines.SCOLOR_EXTRA) | Extra line. | | [`SCOLOR_ALTOP`](#ida_lines.SCOLOR_ALTOP) | Alternative operand. | | [`SCOLOR_HIDNAME`](#ida_lines.SCOLOR_HIDNAME) | Hidden name. | | [`SCOLOR_LIBNAME`](#ida_lines.SCOLOR_LIBNAME) | Library function name. | | [`SCOLOR_LOCNAME`](#ida_lines.SCOLOR_LOCNAME) | Local variable name. | | [`SCOLOR_CODNAME`](#ida_lines.SCOLOR_CODNAME) | Dummy code name. | | [`SCOLOR_ASMDIR`](#ida_lines.SCOLOR_ASMDIR) | Assembler directive. | | [`SCOLOR_MACRO`](#ida_lines.SCOLOR_MACRO) | Macro. | | [`SCOLOR_DSTR`](#ida_lines.SCOLOR_DSTR) | String constant in data directive. | | [`SCOLOR_DCHAR`](#ida_lines.SCOLOR_DCHAR) | Char constant in data directive. | | [`SCOLOR_DNUM`](#ida_lines.SCOLOR_DNUM) | Numeric constant in data directive. | | [`SCOLOR_KEYWORD`](#ida_lines.SCOLOR_KEYWORD) | Keywords. | | [`SCOLOR_REG`](#ida_lines.SCOLOR_REG) | Register name. | | [`SCOLOR_IMPNAME`](#ida_lines.SCOLOR_IMPNAME) | Imported name. | | [`SCOLOR_SEGNAME`](#ida_lines.SCOLOR_SEGNAME) | Segment name. | | [`SCOLOR_UNKNAME`](#ida_lines.SCOLOR_UNKNAME) | Dummy unknown name. | | [`SCOLOR_CNAME`](#ida_lines.SCOLOR_CNAME) | Regular code name. | | [`SCOLOR_UNAME`](#ida_lines.SCOLOR_UNAME) | Regular unknown name. | | [`SCOLOR_COLLAPSED`](#ida_lines.SCOLOR_COLLAPSED) | Collapsed line. | | [`SCOLOR_ADDR`](#ida_lines.SCOLOR_ADDR) | Hidden address mark. | | [`COLOR_SELECTED`](#ida_lines.COLOR_SELECTED) | Selected. | | [`COLOR_LIBFUNC`](#ida_lines.COLOR_LIBFUNC) | Library function. | | [`COLOR_REGFUNC`](#ida_lines.COLOR_REGFUNC) | Regular function. | | [`COLOR_CODE`](#ida_lines.COLOR_CODE) | Single instruction. | | [`COLOR_DATA`](#ida_lines.COLOR_DATA) | Data bytes. | | [`COLOR_UNKNOWN`](#ida_lines.COLOR_UNKNOWN) | Unexplored byte. | | [`COLOR_EXTERN`](#ida_lines.COLOR_EXTERN) | External name definition segment. | | [`COLOR_CURITEM`](#ida_lines.COLOR_CURITEM) | Current item. | | [`COLOR_CURLINE`](#ida_lines.COLOR_CURLINE) | Current line. | | [`COLOR_HIDLINE`](#ida_lines.COLOR_HIDLINE) | Hidden line. | | [`COLOR_LUMFUNC`](#ida_lines.COLOR_LUMFUNC) | Lumina function. | | [`COLOR_BG_MAX`](#ida_lines.COLOR_BG_MAX) | Max color number. | | [`SCOLOR_NAME`](#ida_lines.SCOLOR_NAME) | | | [`SCOLOR_TYPE`](#ida_lines.SCOLOR_TYPE) | | | [`SCOLOR_ATTR`](#ida_lines.SCOLOR_ATTR) | | | [`SCOLOR_TNUM`](#ida_lines.SCOLOR_TNUM) | | | [`SCOLOR_CMT`](#ida_lines.SCOLOR_CMT) | | | [`SCOLOR_ARGLOC`](#ida_lines.SCOLOR_ARGLOC) | | | [`SCOLOR_ARGNAME`](#ida_lines.SCOLOR_ARGNAME) | | | [`SCOLOR_PRAGMA`](#ida_lines.SCOLOR_PRAGMA) | | | [`cvar`](#id0) | | | [`COLOR_DEFAULT`](#ida_lines.COLOR_DEFAULT) | Default. | | [`COLOR_REGCMT`](#ida_lines.COLOR_REGCMT) | Regular comment. | | [`COLOR_RPTCMT`](#ida_lines.COLOR_RPTCMT) | Repeatable comment (comment defined somewhere else). | | [`COLOR_AUTOCMT`](#ida_lines.COLOR_AUTOCMT) | Automatic comment. | | [`COLOR_INSN`](#ida_lines.COLOR_INSN) | Instruction. | | [`COLOR_DATNAME`](#ida_lines.COLOR_DATNAME) | Dummy Data Name. | | [`COLOR_DNAME`](#ida_lines.COLOR_DNAME) | Regular Data Name. | | [`COLOR_DEMNAME`](#ida_lines.COLOR_DEMNAME) | Demangled Name. | | [`COLOR_SYMBOL`](#ida_lines.COLOR_SYMBOL) | Punctuation. | | [`COLOR_CHAR`](#ida_lines.COLOR_CHAR) | Char constant in instruction. | | [`COLOR_STRING`](#ida_lines.COLOR_STRING) | String constant in instruction. | | [`COLOR_NUMBER`](#ida_lines.COLOR_NUMBER) | Numeric constant in instruction. | | [`COLOR_VOIDOP`](#ida_lines.COLOR_VOIDOP) | Void operand. | | [`COLOR_CREF`](#ida_lines.COLOR_CREF) | Code reference. | | [`COLOR_DREF`](#ida_lines.COLOR_DREF) | Data reference. | | [`COLOR_CREFTAIL`](#ida_lines.COLOR_CREFTAIL) | Code reference to tail byte. | | [`COLOR_DREFTAIL`](#ida_lines.COLOR_DREFTAIL) | Data reference to tail byte. | | [`COLOR_ERROR`](#ida_lines.COLOR_ERROR) | Error or problem. | | [`COLOR_PREFIX`](#ida_lines.COLOR_PREFIX) | Line prefix. | | [`COLOR_BINPREF`](#ida_lines.COLOR_BINPREF) | Binary line prefix bytes. | | [`COLOR_EXTRA`](#ida_lines.COLOR_EXTRA) | Extra line. | | [`COLOR_ALTOP`](#ida_lines.COLOR_ALTOP) | Alternative operand. | | [`COLOR_HIDNAME`](#ida_lines.COLOR_HIDNAME) | Hidden name. | | [`COLOR_LIBNAME`](#ida_lines.COLOR_LIBNAME) | Library function name. | | [`COLOR_LOCNAME`](#ida_lines.COLOR_LOCNAME) | Local variable name. | | [`COLOR_CODNAME`](#ida_lines.COLOR_CODNAME) | Dummy code name. | | [`COLOR_ASMDIR`](#ida_lines.COLOR_ASMDIR) | Assembler directive. | | [`COLOR_MACRO`](#ida_lines.COLOR_MACRO) | Macro. | | [`COLOR_DSTR`](#ida_lines.COLOR_DSTR) | String constant in data directive. | | [`COLOR_DCHAR`](#ida_lines.COLOR_DCHAR) | Char constant in data directive. | | [`COLOR_DNUM`](#ida_lines.COLOR_DNUM) | Numeric constant in data directive. | | [`COLOR_KEYWORD`](#ida_lines.COLOR_KEYWORD) | Keywords. | | [`COLOR_REG`](#ida_lines.COLOR_REG) | Register name. | | [`COLOR_IMPNAME`](#ida_lines.COLOR_IMPNAME) | Imported name. | | [`COLOR_SEGNAME`](#ida_lines.COLOR_SEGNAME) | Segment name. | | [`COLOR_UNKNAME`](#ida_lines.COLOR_UNKNAME) | Dummy unknown name. | | [`COLOR_CNAME`](#ida_lines.COLOR_CNAME) | Regular code name. | | [`COLOR_UNAME`](#ida_lines.COLOR_UNAME) | Regular unknown name. | | [`COLOR_COLLAPSED`](#ida_lines.COLOR_COLLAPSED) | Collapsed line. | | [`COLOR_FG_MAX`](#ida_lines.COLOR_FG_MAX) | Max color number. | | [`COLOR_ADDR`](#ida_lines.COLOR_ADDR) | Hidden address marks. the address is represented as 16-digit hex number: 01234567ABCDEF00. it doesn't have the COLOR_OFF pair. | | [`COLOR_OPND1`](#ida_lines.COLOR_OPND1) | Instruction operand 1. | | [`COLOR_OPND2`](#ida_lines.COLOR_OPND2) | Instruction operand 2. | | [`COLOR_OPND3`](#ida_lines.COLOR_OPND3) | Instruction operand 3. | | [`COLOR_OPND4`](#ida_lines.COLOR_OPND4) | Instruction operand 4. | | [`COLOR_OPND5`](#ida_lines.COLOR_OPND5) | Instruction operand 5. | | [`COLOR_OPND6`](#ida_lines.COLOR_OPND6) | Instruction operand 6. | | [`COLOR_OPND7`](#ida_lines.COLOR_OPND7) | Instruction operand 7. | | [`COLOR_OPND8`](#ida_lines.COLOR_OPND8) | Instruction operand 8. | | [`COLOR_RESERVED1`](#ida_lines.COLOR_RESERVED1) | This tag is reserved for internal IDA use. | | [`COLOR_LUMINA`](#ida_lines.COLOR_LUMINA) | Lumina-related, only for the navigation band. | | [`COLOR_ADDR_EXPR`](#ida_lines.COLOR_ADDR_EXPR) | Wraps an "address expression" - possibly composed of sub-expressions. | | [`COLOR_GROUP`](#ida_lines.COLOR_GROUP) | Groups together a run of tagged text so it can be looked up as a single span (like COLOR_ADDR_EXPR), but without influencing rendering: no associated style color key (

```
sck_
```

) exists. | | [`COLOR_NAME`](#ida_lines.COLOR_NAME) | names - blue | | [`COLOR_TYPE`](#ida_lines.COLOR_TYPE) | type names - gray | | [`COLOR_ATTR`](#ida_lines.COLOR_ATTR) | type attrs - gray | | [`COLOR_TNUM`](#ida_lines.COLOR_TNUM) | numbers - light blue | | [`COLOR_CMT`](#ida_lines.COLOR_CMT) | comments - green | | [`COLOR_ARGLOC`](#ida_lines.COLOR_ARGLOC) | arglocs - red | | [`COLOR_ARGNAME`](#ida_lines.COLOR_ARGNAME) | argnames - dark blue | | [`COLOR_PRAGMA`](#ida_lines.COLOR_PRAGMA) | pragmas - purple | | [`VEL_POST`](#ida_lines.VEL_POST) | append posterior line | | [`VEL_CMT`](#ida_lines.VEL_CMT) | append comment line | | [`GDISMF_AS_STACK`](#ida_lines.GDISMF_AS_STACK) | | | [`GDISMF_ADDR_TAG`](#ida_lines.GDISMF_ADDR_TAG) | | | [`GDISMF_REMOVE_TAGS`](#ida_lines.GDISMF_REMOVE_TAGS) | | | [`GDISMF_UNHIDE`](#ida_lines.GDISMF_UNHIDE) | | | [`GENDSM_FORCE_CODE`](#ida_lines.GENDSM_FORCE_CODE) | | | [`GENDSM_MULTI_LINE`](#ida_lines.GENDSM_MULTI_LINE) | | | [`GENDSM_REMOVE_TAGS`](#ida_lines.GENDSM_REMOVE_TAGS) | | | [`GENDSM_UNHIDE`](#ida_lines.GENDSM_UNHIDE) | | | [`COLOR_ADDR_SIZE`](#ida_lines.COLOR_ADDR_SIZE) | Size of a tagged address (see COLOR_ADDR). | | [`SCOLOR_FG_MAX`](#ida_lines.SCOLOR_FG_MAX) | | | [`cvar`](#id0) | | | [`SCOLOR_OPND1`](#ida_lines.SCOLOR_OPND1) | | | [`SCOLOR_OPND2`](#ida_lines.SCOLOR_OPND2) | | | [`SCOLOR_OPND3`](#ida_lines.SCOLOR_OPND3) | | | [`SCOLOR_OPND4`](#ida_lines.SCOLOR_OPND4) | | | [`SCOLOR_OPND5`](#ida_lines.SCOLOR_OPND5) | | | [`SCOLOR_OPND6`](#ida_lines.SCOLOR_OPND6) | | | [`SCOLOR_UTF8`](#ida_lines.SCOLOR_UTF8) | | | [`PALETTE_SIZE`](#ida_lines.PALETTE_SIZE) | | | [`get_sourcefile`](#id1) | | | [`E_PREV`](#ida_lines.E_PREV) | | | [`E_NEXT`](#ida_lines.E_NEXT) | | ## Classes | [`sourcefilevec_t`](#ida_lines.sourcefilevec_t) | | |-------------------------------------------------------------|----| | [`sourcefile_info_t`](#ida_lines.sourcefile_info_t) | | | [`sourcefile_t`](#ida_lines.sourcefile_t) | | | [`user_defined_prefix_t`](#ida_lines.user_defined_prefix_t) | | ## Functions | [`tag_get_addr`](#ida_lines.tag_get_addr)(→ ida_idaapi.ea_t) | Decode an address from an address mark. | |--------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [`tag_strlen`](#ida_lines.tag_strlen)(→ ssize_t) | Calculate length of a colored string This function computes the length in unicode codepoints of a line | | [`calc_prefix_color`](#ida_lines.calc_prefix_color)(→ color_t) | Get prefix color for line at 'ea' | | [`calc_bg_color`](#ida_lines.calc_bg_color)(→ bgcolor_t) | Get background color for line at 'ea' | | [`add_sourcefile`](#ida_lines.add_sourcefile)(→ bool) | | | [`get_sourcefile`](#id1) | | | [`get_sourcefile_by_ea`](#ida_lines.get_sourcefile_by_ea)(→ str) | | | [`del_sourcefile`](#ida_lines.del_sourcefile)(→ bool) | | | [`get_sourcefiles_qty`](#ida_lines.get_sourcefiles_qty)(→ int) | | | [`getn_sourcefile`](#ida_lines.getn_sourcefile)(→ bool) | | | [`add_sourcefiles`](#ida_lines.add_sourcefiles)(→ bool) | | | [`install_user_defined_prefix`](#ida_lines.install_user_defined_prefix)(→ bool) | | | [`add_extra_line`](#ida_lines.add_extra_line)(→ bool) | | | [`add_extra_cmt`](#ida_lines.add_extra_cmt)(→ bool) | | | [`add_pgm_cmt`](#ida_lines.add_pgm_cmt)(→ bool) | | | [`generate_disasm_line`](#ida_lines.generate_disasm_line)(→ str) | | | [`get_first_free_extra_cmtidx`](#ida_lines.get_first_free_extra_cmtidx)(→ int) | | | [`update_extra_cmt`](#ida_lines.update_extra_cmt)(→ bool) | | | [`del_extra_cmt`](#ida_lines.del_extra_cmt)(→ bool) | | | [`get_extra_cmt`](#ida_lines.get_extra_cmt)(→ int) | | | [`delete_extra_cmts`](#ida_lines.delete_extra_cmts)(→ None) | | | [`create_encoding_helper`](#ida_lines.create_encoding_helper)(→ encoder_t \*) | | | [`tag_remove`](#ida_lines.tag_remove)(→ str) | Remove color escape sequences from a string. | | [`tag_addr`](#ida_lines.tag_addr)(→ str) | Insert an address mark into a string. | | [`tag_skipcode`](#ida_lines.tag_skipcode)(→ int) | Skip one color code. This function should be used if you are interested in color codes and want to analyze all of them. Otherwise tag_skipcodes() function is better since it will skip all colors at once. This function will skip the current color code if there is one. If the current symbol is not a color code, it will return the input. | | [`tag_skipcodes`](#ida_lines.tag_skipcodes)(→ int) | Move the pointer past all color codes. | | [`tag_advance`](#ida_lines.tag_advance)(→ int) | Move pointer to a 'line' to 'cnt' positions right. Take into account escape sequences. | | [`generate_disassembly`](#ida_lines.generate_disassembly)(ea, max_lines, as_stack, notag[, ...]) | Generate disassembly lines (many lines) and put them into a buffer | | [`requires_color_esc`](#ida_lines.requires_color_esc)(c) | Is the given char a color escape character? | | [`COLSTR`](#ida_lines.COLSTR)(str, tag) | Utility function to create a colored line | ## Module Contents ### *class* ida_lines.sourcefilevec_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### push_back(\*args) → sourcefile_t & #### pop_back() → [None](https://docs.python.org/3/library/constants.html#None) #### size() → [int](https://docs.python.org/3/library/functions.html#int) #### empty() → [bool](https://docs.python.org/3/library/functions.html#bool) #### at(\_idx: [int](https://docs.python.org/3/library/functions.html#int)) → sourcefile_t const & #### qclear() → [None](https://docs.python.org/3/library/constants.html#None) #### clear() → [None](https://docs.python.org/3/library/constants.html#None) #### resize(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### grow(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### capacity() → [int](https://docs.python.org/3/library/functions.html#int) #### reserve(cnt: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### truncate() → [None](https://docs.python.org/3/library/constants.html#None) #### swap(r: [sourcefilevec_t](#ida_lines.sourcefilevec_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extract() → sourcefile_t \* #### inject(s: [sourcefile_t](#ida_lines.sourcefile_t), len: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### begin(\*args) → qvector< sourcefile_t >::const_iterator #### end(\*args) → qvector< sourcefile_t >::const_iterator #### insert(it: [sourcefile_t](#ida_lines.sourcefile_t), x: [sourcefile_t](#ida_lines.sourcefile_t)) → qvector< sourcefile_t >::iterator #### erase(\*args) → qvector< sourcefile_t >::iterator #### find(\*args) → qvector< sourcefile_t >::const_iterator #### has(x: [sourcefile_t](#ida_lines.sourcefile_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### add_unique(x: [sourcefile_t](#ida_lines.sourcefile_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### append(x: [sourcefile_t](#ida_lines.sourcefile_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extend(x: [sourcefilevec_t](#ida_lines.sourcefilevec_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### front #### back ### ida_lines.COLOR_ON Escape character (ON). Followed by a color code (color_t). ### ida_lines.COLOR_OFF Escape character (OFF). Followed by a color code (color_t). ### ida_lines.COLOR_ESC Escape character (Quote next character). This is needed to output ‘1’ and ‘2’ characters. ### ida_lines.COLOR_INV Escape character (Inverse foreground and background colors). This escape character has no corresponding COLOR_OFF. Its action continues until the next COLOR_INV or end of line. ### ida_lines.SCOLOR_ON Escape character (ON). ### ida_lines.SCOLOR_OFF Escape character (OFF). ### ida_lines.SCOLOR_ESC Escape character (Quote next character). ### ida_lines.SCOLOR_INV Escape character (Inverse colors). ### ida_lines.SCOLOR_DEFAULT Default. ### ida_lines.SCOLOR_REGCMT Regular comment. ### ida_lines.SCOLOR_RPTCMT Repeatable comment (defined not here). ### ida_lines.SCOLOR_AUTOCMT Automatic comment. ### ida_lines.SCOLOR_INSN Instruction. ### ida_lines.SCOLOR_DATNAME Dummy Data Name. ### ida_lines.SCOLOR_DNAME Regular Data Name. ### ida_lines.SCOLOR_DEMNAME Demangled Name. ### ida_lines.SCOLOR_SYMBOL Punctuation. ### ida_lines.SCOLOR_CHAR Char constant in instruction. ### ida_lines.SCOLOR_STRING String constant in instruction. ### ida_lines.SCOLOR_NUMBER Numeric constant in instruction. ### ida_lines.SCOLOR_VOIDOP Void operand. ### ida_lines.SCOLOR_CREF Code reference. ### ida_lines.SCOLOR_DREF Data reference. ### ida_lines.SCOLOR_CREFTAIL Code reference to tail byte. ### ida_lines.SCOLOR_DREFTAIL Data reference to tail byte. ### ida_lines.SCOLOR_ERROR Error or problem. ### ida_lines.SCOLOR_PREFIX Line prefix. ### ida_lines.SCOLOR_BINPREF Binary line prefix bytes. ### ida_lines.SCOLOR_EXTRA Extra line. ### ida_lines.SCOLOR_ALTOP Alternative operand. ### ida_lines.SCOLOR_HIDNAME Hidden name. ### ida_lines.SCOLOR_LIBNAME Library function name. ### ida_lines.SCOLOR_LOCNAME Local variable name. ### ida_lines.SCOLOR_CODNAME Dummy code name. ### ida_lines.SCOLOR_ASMDIR Assembler directive. ### ida_lines.SCOLOR_MACRO Macro. ### ida_lines.SCOLOR_DSTR String constant in data directive. ### ida_lines.SCOLOR_DCHAR Char constant in data directive. ### ida_lines.SCOLOR_DNUM Numeric constant in data directive. ### ida_lines.SCOLOR_KEYWORD Keywords. ### ida_lines.SCOLOR_REG Register name. ### ida_lines.SCOLOR_IMPNAME Imported name. ### ida_lines.SCOLOR_SEGNAME Segment name. ### ida_lines.SCOLOR_UNKNAME Dummy unknown name. ### ida_lines.SCOLOR_CNAME Regular code name. ### ida_lines.SCOLOR_UNAME Regular unknown name. ### ida_lines.SCOLOR_COLLAPSED Collapsed line. ### ida_lines.SCOLOR_ADDR Hidden address mark. ### ida_lines.COLOR_SELECTED Selected. ### ida_lines.COLOR_LIBFUNC Library function. ### ida_lines.COLOR_REGFUNC Regular function. ### ida_lines.COLOR_CODE Single instruction. ### ida_lines.COLOR_DATA Data bytes. ### ida_lines.COLOR_UNKNOWN Unexplored byte. ### ida_lines.COLOR_EXTERN External name definition segment. ### ida_lines.COLOR_CURITEM Current item. ### ida_lines.COLOR_CURLINE Current line. ### ida_lines.COLOR_HIDLINE Hidden line. ### ida_lines.COLOR_LUMFUNC Lumina function. ### ida_lines.COLOR_BG_MAX Max color number. ### ida_lines.SCOLOR_NAME ### ida_lines.SCOLOR_TYPE ### ida_lines.SCOLOR_ATTR ### ida_lines.SCOLOR_TNUM ### ida_lines.SCOLOR_CMT ### ida_lines.SCOLOR_ARGLOC ### ida_lines.SCOLOR_ARGNAME ### ida_lines.SCOLOR_PRAGMA ### ida_lines.tag_get_addr(line: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) Decode an address from an address mark. * **Parameters:** **line** – points to sequence: COLOR_ON COLOR_ADDR ADDRESS * **Returns:** the decoded address, or BADADDR on malformed input ### ida_lines.tag_strlen(line: [str](https://docs.python.org/3/library/stdtypes.html#str)) → ssize_t Calculate length of a colored string This function computes the length in unicode codepoints of a line * **Returns:** the number of codepoints in the line, or -1 on error ### ida_lines.calc_prefix_color(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → color_t Get prefix color for line at ‘ea’ * **Returns:** Line prefix colors ### ida_lines.calc_bg_color(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → bgcolor_t Get background color for line at ‘ea’ * **Returns:** RGB color ### ida_lines.add_sourcefile(ea1: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), ea2: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), filename: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_lines.get_sourcefile(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), bounds: [range_t](../ida_range/index.md#ida_range.range_t) = None) → [str](https://docs.python.org/3/library/stdtypes.html#str) ### ida_lines.get_sourcefile_by_ea(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), bounds: [range_t](../ida_range/index.md#ida_range.range_t) = None) → [str](https://docs.python.org/3/library/stdtypes.html#str) ### ida_lines.del_sourcefile(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_lines.get_sourcefiles_qty() → [int](https://docs.python.org/3/library/functions.html#int) ### *class* ida_lines.sourcefile_info_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### range *: [range_t](../ida_range/index.md#ida_range.range_t)* address range of the source file #### filename *: [str](https://docs.python.org/3/library/stdtypes.html#str)* owned copy of the source file name ### ida_lines.cvar ### ida_lines.COLOR_DEFAULT Default. ### ida_lines.COLOR_REGCMT Regular comment. ### ida_lines.COLOR_RPTCMT Repeatable comment (comment defined somewhere else). ### ida_lines.COLOR_AUTOCMT Automatic comment. ### ida_lines.COLOR_INSN Instruction. ### ida_lines.COLOR_DATNAME Dummy Data Name. ### ida_lines.COLOR_DNAME Regular Data Name. ### ida_lines.COLOR_DEMNAME Demangled Name. ### ida_lines.COLOR_SYMBOL Punctuation. ### ida_lines.COLOR_CHAR Char constant in instruction. ### ida_lines.COLOR_STRING String constant in instruction. ### ida_lines.COLOR_NUMBER Numeric constant in instruction. ### ida_lines.COLOR_VOIDOP Void operand. ### ida_lines.COLOR_CREF Code reference. ### ida_lines.COLOR_DREF Data reference. ### ida_lines.COLOR_CREFTAIL Code reference to tail byte. ### ida_lines.COLOR_DREFTAIL Data reference to tail byte. ### ida_lines.COLOR_ERROR Error or problem. ### ida_lines.COLOR_PREFIX Line prefix. ### ida_lines.COLOR_BINPREF Binary line prefix bytes. ### ida_lines.COLOR_EXTRA Extra line. ### ida_lines.COLOR_ALTOP Alternative operand. ### ida_lines.COLOR_HIDNAME Hidden name. ### ida_lines.COLOR_LIBNAME Library function name. ### ida_lines.COLOR_LOCNAME Local variable name. ### ida_lines.COLOR_CODNAME Dummy code name. ### ida_lines.COLOR_ASMDIR Assembler directive. ### ida_lines.COLOR_MACRO Macro. ### ida_lines.COLOR_DSTR String constant in data directive. ### ida_lines.COLOR_DCHAR Char constant in data directive. ### ida_lines.COLOR_DNUM Numeric constant in data directive. ### ida_lines.COLOR_KEYWORD Keywords. ### ida_lines.COLOR_REG Register name. ### ida_lines.COLOR_IMPNAME Imported name. ### ida_lines.COLOR_SEGNAME Segment name. ### ida_lines.COLOR_UNKNAME Dummy unknown name. ### ida_lines.COLOR_CNAME Regular code name. ### ida_lines.COLOR_UNAME Regular unknown name. ### ida_lines.COLOR_COLLAPSED Collapsed line. ### ida_lines.COLOR_FG_MAX Max color number. ### ida_lines.COLOR_ADDR Hidden address marks. the address is represented as 16-digit hex number: 01234567ABCDEF00. it doesn’t have the COLOR_OFF pair. ### ida_lines.COLOR_OPND1 Instruction operand 1. ### ida_lines.COLOR_OPND2 Instruction operand 2. ### ida_lines.COLOR_OPND3 Instruction operand 3. ### ida_lines.COLOR_OPND4 Instruction operand 4. ### ida_lines.COLOR_OPND5 Instruction operand 5. ### ida_lines.COLOR_OPND6 Instruction operand 6. ### ida_lines.COLOR_OPND7 Instruction operand 7. ### ida_lines.COLOR_OPND8 Instruction operand 8. ### ida_lines.COLOR_RESERVED1 This tag is reserved for internal IDA use. ### ida_lines.COLOR_LUMINA Lumina-related, only for the navigation band. ### ida_lines.COLOR_ADDR_EXPR Wraps an “address expression” - possibly composed of sub-expressions. ### ida_lines.COLOR_GROUP Groups together a run of tagged text so it can be looked up as a single span (like COLOR_ADDR_EXPR), but without influencing rendering: no associated style color key ( ``` sck_ ``` ) exists. ### ida_lines.COLOR_NAME names - blue ### ida_lines.COLOR_TYPE type names - gray ### ida_lines.COLOR_ATTR type attrs - gray ### ida_lines.COLOR_TNUM numbers - light blue ### ida_lines.COLOR_CMT comments - green ### ida_lines.COLOR_ARGLOC arglocs - red ### ida_lines.COLOR_ARGNAME argnames - dark blue ### ida_lines.COLOR_PRAGMA pragmas - purple ### ida_lines.getn_sourcefile(out: [sourcefile_info_t](#ida_lines.sourcefile_info_t), n: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### *class* ida_lines.sourcefile_t Bases: [`ida_range.range_t`](../ida_range/index.md#ida_range.range_t) #### thisown #### filename *: [str](https://docs.python.org/3/library/stdtypes.html#str)* ### ida_lines.add_sourcefiles(items: [sourcefilevec_t](#ida_lines.sourcefilevec_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_lines.install_user_defined_prefix(\*args) → [bool](https://docs.python.org/3/library/functions.html#bool) ### *class* ida_lines.user_defined_prefix_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### get_user_defined_prefix(ea: ida_idaapi.ea_t, insn: insn_t const &, lnnum: int, indent: int, line: str) → [str](https://docs.python.org/3/library/stdtypes.html#str) This callback must be overridden by the derived class. * **Parameters:** * **ea** – the current address * **insn** – the current instruction. if the current item is not an instruction, then insn.itype is zero. * **lnnum** – number of the current line (each address may have several listing lines for it). 0 means the very first line for the current address. * **indent** – see explanations for gen_printf() * **line** – the line to be generated. the line usually contains color tags. this argument can be examined to decide whether to generate the prefix. ### ida_lines.VEL_POST append posterior line ### ida_lines.VEL_CMT append comment line ### ida_lines.add_extra_line(\*args) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_lines.add_extra_cmt(\*args) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_lines.add_pgm_cmt(\*args) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_lines.GDISMF_AS_STACK ### ida_lines.GDISMF_ADDR_TAG ### ida_lines.GDISMF_REMOVE_TAGS ### ida_lines.GDISMF_UNHIDE ### ida_lines.generate_disasm_line(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), flags: [int](https://docs.python.org/3/library/functions.html#int) = 0) → [str](https://docs.python.org/3/library/stdtypes.html#str) ### ida_lines.GENDSM_FORCE_CODE ### ida_lines.GENDSM_MULTI_LINE ### ida_lines.GENDSM_REMOVE_TAGS ### ida_lines.GENDSM_UNHIDE ### ida_lines.get_first_free_extra_cmtidx(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), start: [int](https://docs.python.org/3/library/functions.html#int)) → [int](https://docs.python.org/3/library/functions.html#int) ### ida_lines.update_extra_cmt(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), what: [int](https://docs.python.org/3/library/functions.html#int), str: update_extra_cmt.str) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_lines.del_extra_cmt(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), what: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_lines.get_extra_cmt(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), what: [int](https://docs.python.org/3/library/functions.html#int)) → [int](https://docs.python.org/3/library/functions.html#int) ### ida_lines.delete_extra_cmts(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), what: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) ### ida_lines.create_encoding_helper(\*args) → encoder_t \* ### ida_lines.tag_remove(nonnul_instr: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [str](https://docs.python.org/3/library/stdtypes.html#str) Remove color escape sequences from a string. * **Returns:** length of resulting string, -1 if error ### ida_lines.tag_addr(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [str](https://docs.python.org/3/library/stdtypes.html#str) Insert an address mark into a string. * **Parameters:** **ea** – address to include ### ida_lines.tag_skipcode(line: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [int](https://docs.python.org/3/library/functions.html#int) Skip one color code. This function should be used if you are interested in color codes and want to analyze all of them. Otherwise tag_skipcodes() function is better since it will skip all colors at once. This function will skip the current color code if there is one. If the current symbol is not a color code, it will return the input. * **Returns:** moved pointer ### ida_lines.tag_skipcodes(line: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [int](https://docs.python.org/3/library/functions.html#int) Move the pointer past all color codes. * **Parameters:** **line** – can’t be nullptr * **Returns:** moved pointer, can’t be nullptr ### ida_lines.tag_advance(line: [str](https://docs.python.org/3/library/stdtypes.html#str), cnt: [int](https://docs.python.org/3/library/functions.html#int)) → [int](https://docs.python.org/3/library/functions.html#int) Move pointer to a ‘line’ to ‘cnt’ positions right. Take into account escape sequences. * **Parameters:** * **line** – pointer to string * **cnt** – number of positions to move right * **Returns:** moved pointer ### ida_lines.generate_disassembly(ea, max_lines, as_stack, notag, include_hidden: Boolean = False) Generate disassembly lines (many lines) and put them into a buffer * **Parameters:** * **ea** – address to generate disassembly for * **max_lines** – how many lines max to generate * **as_stack** – Display undefined items as 2/4/8 bytes * **notag** – remove color tags * **include_hidden** – automatically unhide hidden objects * **Returns:** tuple(most_important_line_number, list(lines)) : Returns a tuple containing the most important line number and a list of generated lines * **Returns:** None on failure ### ida_lines.COLOR_ADDR_SIZE *= 16* Size of a tagged address (see COLOR_ADDR). ### ida_lines.SCOLOR_FG_MAX *= '('* ### ida_lines.cvar ### ida_lines.SCOLOR_OPND1 ### ida_lines.SCOLOR_OPND2 ### ida_lines.SCOLOR_OPND3 ### ida_lines.SCOLOR_OPND4 ### ida_lines.SCOLOR_OPND5 ### ida_lines.SCOLOR_OPND6 ### ida_lines.SCOLOR_UTF8 ### ida_lines.PALETTE_SIZE ### ida_lines.requires_color_esc(c) Is the given char a color escape character? ### ida_lines.COLSTR(str, tag) Utility function to create a colored line :param str: The string :param tag: Color tag constant. One of SCOLOR_XXXX ### ida_lines.get_sourcefile ### ida_lines.E_PREV ### ida_lines.E_NEXT # index.html.md # populate_pluginform_with_pyqt_widgets summary: create a dockable container, and populate it with Qt widgets description: : Using ida_kernwin.PluginForm.FormToPyQtWidget, this script converts IDA’s own dockable widget into a type that is recognized by PySide6, which then enables populating it with regular Qt widgets. level: beginner ## Attributes | [`plg`](#populate_pluginform_with_pyqt_widgets.plg) | | |-------------------------------------------------------|----| ## Classes | [`MyPluginFormClass`](#populate_pluginform_with_pyqt_widgets.MyPluginFormClass) | | |-----------------------------------------------------------------------------------|----| ## Module Contents ### *class* populate_pluginform_with_pyqt_widgets.MyPluginFormClass Bases: [`ida_kernwin.PluginForm`](../ida_kernwin/index.md#ida_kernwin.PluginForm) #### OnCreate(form) Called when the widget is created #### PopulateForm() #### OnClose(form) Called when the widget is closed ### populate_pluginform_with_pyqt_widgets.plg # index.html.md # vds_modify_user_lvars summary: modifying function local variables description: : Use a ida_hexrays.user_lvar_modifier_t to modify names, comments and/or types of local variables. level: intermediate ## Classes | [`my_modifier_t`](#vds_modify_user_lvars.my_modifier_t) | | |-----------------------------------------------------------|----| ## Functions | [`modify_function_lvars`](#vds_modify_user_lvars.modify_function_lvars)([name_prefix, cmt_prefix, new_types]) | | |-----------------------------------------------------------------------------------------------------------------|----| ## Module Contents ### *class* vds_modify_user_lvars.my_modifier_t(name_prefix='', cmt_prefix='', new_types={}) Bases: [`ida_hexrays.user_lvar_modifier_t`](../ida_hexrays/index.md#ida_hexrays.user_lvar_modifier_t) #### name_prefix *= ''* #### cmt_prefix *= ''* #### new_types #### modify_lvars(lvars) Modify lvar settings. Returns: true-modified ### vds_modify_user_lvars.modify_function_lvars(name_prefix='patched_', cmt_prefix='(patched) ', new_types={}) # index.html.md # py_mex3 summary: implement merging functionality for custom plugins description: : IDA Teams uses a chooser to display the merge conflicts. To fill the chooser columns IDA Teams uses the following methods from diff_source_t type:
> * print_diffpos_name() > * print_diffpos_details()
and UI hints from merge_handler_params_t type:
> * ui_has_details() > * ui_complex_details() > * ui_complex_name()
In general, chooser columns are filled as following:
> columns.clear() > NAME = print_diffpos_name() > if ui_complex_name() > then
> > columns.add(split NAME by ui_split_char())
> else > : columns[0] = NAME
> if not ui_complex_details() > then
> > columns.add(print_diffpos_details())
Also, see SDK/plugins/mex3 example level: advanced ## Attributes | [`MEX_NODE_NAME`](#py_mex3.MEX_NODE_NAME) | | |---------------------------------------------------------|----| | [`MEX_OPTION_FLAGS_IDX`](#py_mex3.MEX_OPTION_FLAGS_IDX) | | | [`MEX_OPTION_IDENT_IDX`](#py_mex3.MEX_OPTION_IDENT_IDX) | | | [`MEX_EA_TAG`](#py_mex3.MEX_EA_TAG) | | | [`MEX_FLAGS_0`](#py_mex3.MEX_FLAGS_0) | | | [`MEX_FLAGS_1`](#py_mex3.MEX_FLAGS_1) | | ## Classes | [`idp_listener_t`](#py_mex3.idp_listener_t) | we need an event listener to catch processor_t::ev_create_merge_handlers | |-----------------------------------------------|----------------------------------------------------------------------------| | [`mex_ctx_t`](#py_mex3.mex_ctx_t) | Regular plugin implementation below. | | [`mex3_plugin_t`](#py_mex3.mex3_plugin_t) | Base class for all scripted plugins. | ## Functions | [`PLUGIN_ENTRY`](#py_mex3.PLUGIN_ENTRY)() | | |---------------------------------------------|----| ## Module Contents ### py_mex3.MEX_NODE_NAME *= '$ idapython mex3'* ### py_mex3.MEX_OPTION_FLAGS_IDX ### py_mex3.MEX_OPTION_IDENT_IDX ### py_mex3.MEX_EA_TAG *= 'm'* ### py_mex3.MEX_FLAGS_0 *= 1* ### py_mex3.MEX_FLAGS_1 *= 2* ### *class* py_mex3.idp_listener_t(ctx) Bases: [`ida_idp.IDP_Hooks`](../ida_idp/index.md#ida_idp.IDP_Hooks) we need an event listener to catch processor_t::ev_create_merge_handlers #### ctx #### ev_ending_undo() A well behaving plugin should restore its state from the database upon ev_ending_undo. Otherwise its state may be conflicting with the database. #### ev_create_merge_handlers(md) This event occurs when IDA is performing a 3-way merge (for IDA Teams) Our plugins should create and register merge handler(s) for its data. #### ev_cvt64_supval(node, tag, idx, data) Converter to i64 database ### *class* py_mex3.mex_ctx_t Bases: [`ida_idaapi.plugmod_t`](../ida_idaapi/index.md#ida_idaapi.plugmod_t) Regular plugin implementation below. For example, in our case the plugin asks for 2 bit values and a string value. Then the plugin stores this data in the database. And mark the start address of the current function. These data will be merged later. #### flags *= 0* #### ident *= ''* #### idp_listener #### modmerger_helper *= None* #### idpopts_info *= None* #### node_helper *= None* #### merge_node_info *= None* #### save_to_idb() Save the plugin state to the idb. #### restore_from_idb() Restore plugin variables from the idb. #### run(\_) Ask user for the data and save them to database. Add mark for current EA. #### create_merge_handlers(md) Create merge handlers for plugin ### *class* py_mex3.mex3_plugin_t Bases: [`ida_idaapi.plugin_t`](../ida_idaapi/index.md#ida_idaapi.plugin_t) Base class for all scripted plugins. #### flags *= 257* #### wanted_name *= 'IDAPython: Merge example 3'* #### comment *= 'IDAPython: An example 1 how to implement IDA merge functionality'* #### wanted_hotkey *= ''* #### help *= ''* #### init() #### term() #### run(arg) ### py_mex3.PLUGIN_ENTRY() # index.html.md # custom_graph_with_actions summary: draw custom graphs description: : Showing custom graphs, using ida_graph.GraphViewer. In addition, show how to write actions that can be performed on those. keywords: graph, actions level: advanced ## Attributes | [`g`](#custom_graph_with_actions.g) | | |---------------------------------------|----| ## Classes | [`GraphCloser`](#custom_graph_with_actions.GraphCloser) | | |-------------------------------------------------------------------|----| | [`ColorChanger`](#custom_graph_with_actions.ColorChanger) | | | [`SelectionPrinter`](#custom_graph_with_actions.SelectionPrinter) | | | [`MyGraph`](#custom_graph_with_actions.MyGraph) | | ## Functions | [`show_graph`](#custom_graph_with_actions.show_graph)() | | |-----------------------------------------------------------|----| ## Module Contents ### *class* custom_graph_with_actions.GraphCloser(graph) Bases: `_base_graph_action_handler_t` #### activate(ctx) Activate an action. This function implements the core behavior of an action. It is called when the action is triggered, from a menu, from a popup menu, from the toolbar, or programmatically. * **Returns:** non-zero: all IDA windows will be refreshed ### *class* custom_graph_with_actions.ColorChanger(graph) Bases: `_base_graph_action_handler_t` #### activate(ctx) Activate an action. This function implements the core behavior of an action. It is called when the action is triggered, from a menu, from a popup menu, from the toolbar, or programmatically. * **Returns:** non-zero: all IDA windows will be refreshed ### *class* custom_graph_with_actions.SelectionPrinter(graph) Bases: `_base_graph_action_handler_t` #### activate(ctx) Activate an action. This function implements the core behavior of an action. It is called when the action is triggered, from a menu, from a popup menu, from the toolbar, or programmatically. * **Returns:** non-zero: all IDA windows will be refreshed ### *class* custom_graph_with_actions.MyGraph(funcname, result) Bases: [`ida_graph.GraphViewer`](../ida_graph/index.md#ida_graph.GraphViewer) #### title #### funcname #### result #### color *= 16711935* #### my_view_hooks #### OnRefresh() Event called when the graph is refreshed or first created. From this event you are supposed to create nodes and edges. This callback is mandatory. NOTE: **\*It is important to clear previous nodes before adding nodes.\*** * **Returns:** Returning True tells the graph viewer to use the items. Otherwise old items will be used. #### OnGetText(node_id) #### OnPopup(widget, popup_handle) ### custom_graph_with_actions.show_graph() ### custom_graph_with_actions.g *= None* # index.html.md # log_idb_events summary: react to database events/notifications description: : these hooks will be notified about IDB events, and dump their information to the “Output” window level: intermediate ## Attributes | [`idb_hooks`](#log_idb_events.idb_hooks) | | |--------------------------------------------|----| ## Classes | [`idb_logger_hooks_t`](#log_idb_events.idb_logger_hooks_t) | | |--------------------------------------------------------------|----| ## Module Contents ### *class* log_idb_events.idb_logger_hooks_t Bases: [`ida_idp.IDB_Hooks`](../ida_idp/index.md#ida_idp.IDB_Hooks) #### inhibit_log *= 0* #### adding_segm(segment) A segment is being created. * **Parameters:** **s** – (segment_t ``` * ``` ) #### allsegs_moved(info) Program rebasing is complete. This event is generated after series of segm_moved events * **Parameters:** **info** – (segm_move_infos_t ``` * ``` ) #### auto_empty() Info: all analysis queues are empty. This callback is called once when the initial analysis is finished. If the queue is not empty upon the return from this callback, it will be called later again. #### auto_empty_finally() Info: all analysis queues are empty definitively. This callback is called only once. #### bookmark_changed(index, pos, desc, op) Bookmarked position changed. * **Parameters:** * **index** – (uint32) * **pos** – (::const lochist_entry_t ``` * ``` ) * **desc** – (::const char ``` * ``` ) * **operation** – (int) 0-added, 1-updated, 2-deleted if desc==nullptr, then the bookmark was deleted. #### byte_patched(ea, old_value) A byte has been patched. * **Parameters:** * **ea** – (ea_t) * **old_value** – (uint32) #### callee_addr_changed(ea, callee) Callee address has been updated by the user. * **Parameters:** * **ea** – (ea_t) * **callee** – (ea_t) #### changing_cmt(ea, is_repeatable, new_comment) An item comment is to be changed. * **Parameters:** * **ea** – (ea_t) * **repeatable_cmt** – (bool) * **newcmt** – (const char ``` * ``` ) #### changing_op_ti(ea, n, new_type, new_fnames) An operand typestring (c/c++ prototype) is to be changed. * **Parameters:** * **ea** – (ea_t) * **n** – (int) * **new_type** – (const type_t ``` * ``` ) * **new_fnames** – (const p_list ``` * ``` ) #### changing_op_type(ea, n, opinfo) An operand type (offset, hex, etc…) is to be changed. * **Parameters:** * **ea** – (ea_t) * **n** – (int) eventually or’ed with OPND_OUTER or OPND_ALL * **opinfo** – (const opinfo_t ``` * ``` ) additional operand info #### changing_range_cmt(kind, \_range, comment, is_repeatable) Range comment is to be changed. * **Parameters:** * **kind** – (range_kind_t) * **a** – (const range_t ``` * ``` ) * **cmt** – (const char ``` * ``` ) * **repeatable** – (bool) #### changing_segm_class(segment) Segment class is being changed. * **Parameters:** **s** – (segment_t ``` * ``` ) #### changing_segment_class(seg_start_ea) Segment class is being changed. * **Parameters:** **seg_start_ea** – (ea_t) #### changing_segm_end(segment, new_end, flags) Segment end address is to be changed. * **Parameters:** * **s** – (segment_t ``` * ``` ) * **new_end** – (ea_t) * **segmod_flags** – (int) #### changing_segment_end(seg_start_ea, new_end, segmod_flags) Segment end address is to be changed. * **Parameters:** * **seg_start_ea** – (ea_t) * **new_end** – (ea_t) * **segmod_flags** – (int) #### changing_segm_name(segment, old_name) Segment name is being changed. * **Parameters:** * **s** – (segment_t ``` * ``` ) * **oldname** – (const char ``` * ``` ) #### changing_segment_name(seg_start_ea, oldname) Segment name is being changed. * **Parameters:** * **seg_start_ea** – (ea_t) * **oldname** – (const char ``` * ``` ) #### changing_segm_start(segment, new_start, flags) Segment start address is to be changed. * **Parameters:** * **s** – (segment_t ``` * ``` ) * **new_start** – (ea_t) * **segmod_flags** – (int) #### changing_segment_start(seg_start_ea, new_start, segmod_flags) Segment start address is to be changed. * **Parameters:** * **seg_start_ea** – (ea_t) * **new_start** – (ea_t) * **segmod_flags** – (int) #### changing_struc_cmt(tid, is_repeatable, comment) #### changing_struc_member(sptr, mptr, flags, ti, nbytes) #### changing_ti(ea, new_type, new_fnames) An item typestring (c/c++ prototype) is to be changed. * **Parameters:** * **ea** – (ea_t) * **new_type** – (const type_t ``` * ``` ) * **new_fnames** – (const p_list ``` * ``` ) #### closebase() The database will be closed now. #### cmt_changed(ea, is_repeatable) An item comment has been changed. * **Parameters:** * **ea** – (ea_t) * **repeatable_cmt** – (bool) #### compiler_changed(may_adjust_inf_fields) The kernel has changed the compiler information. ( idainfo::cc structure; get_abi_name) * **Parameters:** **adjust_inf_fields** – (::bool) may change inf fields? #### deleting_func(pfn) The kernel is about to delete a function. * **Parameters:** **pfn** – (func_t ``` * ``` ) #### deleting_function(func_ea) The kernel is about to delete a function. * **Parameters:** **func_ea** – (ea_t) function entry start address #### deleting_func_tail(pfn, tail) A function tail chunk is to be removed. * **Parameters:** * **pfn** – (func_t ``` * ``` ) * **tail** – (const range_t ``` * ``` ) #### deleting_function_tail(func_ea, tail) A function tail chunk is to be removed. * **Parameters:** * **func_ea** – (ea_t) function entry start address * **tail** – (const range_t ``` * ``` ) #### deleting_segm(start_ea) A segment is to be deleted. * **Parameters:** **start_ea** – (ea_t) #### deleting_tryblks(\_range) About to delete tryblk information in given range * **Parameters:** **range** – (const range_t ``` * ``` ) #### destroyed_items(ea1, ea2, will_disable_range) Instructions/data have been destroyed in [ea1,ea2). * **Parameters:** * **ea1** – (ea_t) * **ea2** – (ea_t) * **will_disable_range** – (bool) #### determined_main(main) The main() function has been determined. * **Parameters:** **main** – (ea_t) address of the main() function #### dirtree_link(dt, path, is_link) Dirtree: an item has been linked/unlinked. * **Parameters:** * **dt** – (dirtree_t ``` * ``` ) * **path** – (::const char ``` * ``` ) * **link** – (::bool) #### dirtree_mkdir(dt, path) Dirtree: a directory has been created. * **Parameters:** * **dt** – (dirtree_t ``` * ``` ) * **path** – (::const char ``` * ``` ) #### dirtree_move(dt, \_from, to) Dirtree: a directory or item has been moved. * **Parameters:** * **dt** – (dirtree_t ``` * ``` ) * **to** – (::const char ``` * ``` ) #### dirtree_rank(dt, path, rank) Dirtree: a directory or item rank has been changed. * **Parameters:** * **dt** – (dirtree_t ``` * ``` ) * **path** – (::const char ``` * ``` ) * **rank** – (::size_t) #### dirtree_rmdir(dt, path) Dirtree: a directory has been deleted. * **Parameters:** * **dt** – (dirtree_t ``` * ``` ) * **path** – (::const char ``` * ``` ) #### dirtree_rminode(dt, inode) Dirtree: an inode became unavailable. * **Parameters:** * **dt** – (dirtree_t ``` * ``` ) * **inode** – (inode_t) #### dirtree_segm_moved(dt) Dirtree: inodes were changed due to a segment movement or a program rebasing * **Parameters:** **dt** – (dirtree_t ``` * ``` ) #### dirtree_ordering_changed(dt, diridx, natural) Dirtree: a directory’s “natural” ordering changed * **Parameters:** * **dt** – (dirtree_t ``` * ``` ) * **diridx** – (diridx_t) * **natural** – (::bool) #### dirtree_bulk_move(dt, sources, moved_items, dstdir, dstrank) Dirtree: many items have been moved. * **Parameters:** * **dt** – (dirtree_t ``` * ``` ) * **sources** – (dirtree_bulk_results_t ``` * ``` ) * **moved_items** – (dirtree_cursor_vec_t ``` * ``` ) * **dstdir** – (::const char ``` * ``` ) * **dstrank** – (ssize_t) SOURCES and MOVED_ITEMS correspond to each other #### extlang_changed(kind, el, idx) The list of extlangs or the default extlang was changed. * **Parameters:** * **kind** – (int) 0: extlang installed 1: extlang removed 2: default extlang changed * **el** – (extlang_t ``` * ``` ) pointer to the extlang affected * **idx** – (int) extlang index #### extra_cmt_changed(ea, line_idx, comment) An extra comment has been changed. * **Parameters:** * **ea** – (ea_t) * **line_idx** – (int) * **cmt** – (const char ``` * ``` ) #### flow_chart_created(fc) Gui has retrieved a function flow chart. Plugins may modify the flow chart in this callback. * **Parameters:** **fc** – (qflow_chart_t ``` * ``` ) #### frame_deleted(pfn) The kernel has deleted a function frame. * **Parameters:** **pfn** – (func_t ``` * ``` ) idb_event::frame_created #### function_frame_deleted(func_ea) The kernel has deleted a function frame. * **Parameters:** **func_ea** – (ea_t) function entry start address #### func_added(pfn) The kernel has added a function. * **Parameters:** **pfn** – (func_t ``` * ``` ) #### function_added(func_ea) The kernel has added a function. * **Parameters:** **func_ea** – (ea_t) function entry start address #### func_deleted(func_ea) A function has been deleted. * **Parameters:** **func_ea** – (ea_t) #### func_noret_changed(pfn) FUNC_NORET bit has been changed. * **Parameters:** **pfn** – (func_t ``` * ``` ) #### function_noret_changed(func_ea) FUNC_NORET bit has been changed. * **Parameters:** **func_ea** – (ea_t) function entry start address #### func_tail_appended(pfn, tail) A function tail chunk has been appended. * **Parameters:** * **pfn** – (func_t ``` * ``` ) * **tail** – (func_t ``` * ``` ) #### function_tail_appended(func_ea, tail) A function tail chunk has been appended. * **Parameters:** * **func_ea** – (ea_t) function entry start address * **tail** – (func_tail_info_t ``` * ``` ) #### func_tail_deleted(pfn, tail_ea) A function tail chunk has been removed. * **Parameters:** * **pfn** – (func_t ``` * ``` ) * **tail_ea** – (ea_t) #### function_tail_deleted(func_ea, tail_ea) A function tail chunk has been removed. * **Parameters:** * **func_ea** – (ea_t) function entry start address * **tail_ea** – (ea_t) #### func_updated(pfn) The kernel has updated a function. * **Parameters:** **pfn** – (func_t ``` * ``` ) #### function_updated(fchunk_ea) The kernel has updated a function. * **Parameters:** **fchunk_ea** – (ea_t) function entry or tail start address #### idasgn_loaded(sig_name) FLIRT signature has been loaded for normal processing (not for recognition of startup sequences). * **Parameters:** **short_sig_name** – (const char ``` * ``` ) #### idasgn_matched_ea(ea, name, lib) A FLIRT match has been found * **Parameters:** * **ea** – (ea_t) the matching address * **name** – (::const char ``` * ``` ) the matched name * **lib_name** – (::const char ``` * ``` ) library name extracted from signature file #### item_color_changed(ea, color) An item color has been changed. * **Parameters:** * **ea** – (ea_t) * **color** – (bgcolor_t) if color==DEFCOLOR, the color is deleted. #### kernel_config_loaded(pass_number) This event is issued when ida.cfg is parsed. * **Parameters:** **pass_number** – (int) #### loader_finished(li, neflags, filetypename) External file loader finished its work. Use this event to augment the existing loader functionality. * **Parameters:** * **li** – (linput_t ``` * ``` ) * **neflags** – (uint16) Load file flags * **filetypename** – (const char ``` * ``` ) #### local_types_changed(ltc, ordinal, name) Local types have been changed * **Parameters:** * **ltc** – (local_type_change_t) * **ordinal** – (uint32) 0 means ordinal is unknown * **name** – (const char ``` * ``` ) nullptr means name is unknown #### local_type_renamed(ordinal, oldname, newname) Local type has been renamed * **Parameters:** * **ordinal** – (uint32) 0 means ordinal is unknown * **oldname** – (const char ``` * ``` ) nullptr means name is unknown * **newname** – (const char ``` * ``` ) nullptr means name is unknown #### make_code(insn) An instruction is being created. * **Parameters:** **insn** – (const insn_t\*) #### make_data(ea, flags, tid, \_len) A data item is being created. * **Parameters:** * **ea** – (ea_t) * **flags** – (flags64_t) * **tid** – (tid_t) * **len** – (asize_t) #### op_ti_changed(ea, n, \_type, fnames) An operand typestring (c/c++ prototype) has been changed. * **Parameters:** * **ea** – (ea_t) * **n** – (int) * **type** – (const type_t ``` * ``` ) * **fnames** – (const p_list ``` * ``` ) #### op_type_changed(ea, n) An operand type (offset, hex, etc…) has been set or deleted. * **Parameters:** * **ea** – (ea_t) * **n** – (int) eventually or’ed with OPND_OUTER or OPND_ALL #### range_cmt_changed(kind, \_range, comment, is_repeatable) Range comment has been changed. * **Parameters:** * **kind** – (range_kind_t) * **a** – (const range_t ``` * ``` ) * **cmt** – (const char ``` * ``` ) * **repeatable** – (bool) #### renamed(ea, new_name, is_local_name, old_name) The kernel has renamed a byte. See also the rename event * **Parameters:** * **ea** – (ea_t) * **new_name** – (const char ``` * ``` ) can be nullptr * **local_name** – (bool) * **old_name** – (const char ``` * ``` ) can be nullptr #### savebase() The database is being saved. #### segm_added(segment) A new segment has been created. * **Parameters:** **s** – (segment_t ``` * ``` ) See also adding_segm #### segment_added(seg_start_ea) A new segment has been created. * **Parameters:** **seg_start_ea** – (ea_t) #### segm_attrs_updated(segment) Segment attributes has been changed. * **Parameters:** **s** – (segment_t ``` * ``` ) This event is generated for secondary segment attributes (examples: color, permissions, etc) #### segment_attrs_updated(seg_start_ea) Segment attributes has been changed. * **Parameters:** **seg_start_ea** – (ea_t) This event is generated for secondary segment attributes (examples: color, permissions, etc) #### segm_class_changed(segment, sclass) Segment class has been changed. * **Parameters:** * **s** – (segment_t ``` * ``` ) * **sclass** – (const char ``` * ``` ) #### segment_class_changed(seg_start_ea, sclass) Segment class has been changed. * **Parameters:** * **seg_start_ea** – (ea_t) * **sclass** – (const char ``` * ``` ) #### segm_deleted(start_ea, end_ea, flags) A segment has been deleted. * **Parameters:** * **start_ea** – (ea_t) * **end_ea** – (ea_t) * **flags** – (int) #### segm_end_changed(segment, old_end) Segment end address has been changed. * **Parameters:** * **s** – (segment_t ``` * ``` ) * **oldend** – (ea_t) #### segment_end_changed(seg_start_ea, oldend) Segment end address has been changed. * **Parameters:** * **seg_start_ea** – (ea_t) * **oldend** – (ea_t) #### segm_moved(\_from, to, size, changed_netmap) Segment has been moved. * **Parameters:** * **to** – (ea_t) * **size** – (asize_t) * **changed_netmap** – (bool) See also idb_event::allsegs_moved #### segm_name_changed(segment, name) Segment name has been changed. * **Parameters:** * **s** – (segment_t ``` * ``` ) * **name** – (const char ``` * ``` ) #### segment_name_changed(seg_start_ea, name) Segment name has been changed. * **Parameters:** * **seg_start_ea** – (ea_t) * **name** – (const char ``` * ``` ) #### segm_start_changed(segment, old_start) Segment start address has been changed. * **Parameters:** * **s** – (segment_t ``` * ``` ) * **oldstart** – (ea_t) #### segment_start_changed(seg_start_ea, oldstart) Segment start address has been changed. * **Parameters:** * **seg_start_ea** – (ea_t) * **oldstart** – (ea_t) #### set_func_end(pfn, new_end) Function chunk end address will be changed. * **Parameters:** * **pfn** – (func_t ``` * ``` ) * **new_end** – (ea_t) #### set_function_end(fchunk, new_end) Function chunk end address will be changed. * **Parameters:** * **fchunk** – (fchunk_info_t ``` * ``` ) * **new_end** – (ea_t) #### set_func_start(pfn, new_start) Function chunk start address will be changed. * **Parameters:** * **pfn** – (func_t ``` * ``` ) * **new_start** – (ea_t) #### set_function_start(fchunk, new_start) Function chunk start address will be changed. * **Parameters:** * **fchunk** – (fchunk_info_t ``` * ``` ) * **new_start** – (ea_t) #### sgr_changed(start_ea, end_ea, regnum, value, old_value, tag) The kernel has changed a segment register value. * **Parameters:** * **start_ea** – (ea_t) * **end_ea** – (ea_t) * **regnum** – (int) * **value** – (sel_t) * **old_value** – (sel_t) * **tag** – (uchar) Segment register range tags #### sgr_deleted(start_ea, end_ea, regnum) The kernel has deleted a segment register value. * **Parameters:** * **start_ea** – (ea_t) * **end_ea** – (ea_t) * **regnum** – (int) #### stkpnts_changed(pfn) Stack change points have been modified. * **Parameters:** **pfn** – (func_t ``` * ``` ) #### function_stkpnts_changed(func_ea) Stack change points have been modified. * **Parameters:** **func_ea** – (ea_t) function entry start address #### struc_member_changed(sptr, mptr) #### tail_owner_changed(tail, owner_func, old_owner) A tail chunk owner has been changed. * **Parameters:** * **tail** – (func_t ``` * ``` ) * **owner_func** – (ea_t) * **old_owner** – (ea_t) #### function_tail_owner_changed(tail, owner_func_ea, old_owner_ea) A tail chunk owner has been changed. * **Parameters:** * **tail** – (func_tail_info_t ``` * ``` ) * **owner_func** – (ea_t) * **old_owner** – (ea_t) #### thunk_func_created(pfn) A thunk bit has been set for a function. * **Parameters:** **pfn** – (func_t ``` * ``` ) #### thunk_function_created(func_ea) A thunk bit has been set for a function. * **Parameters:** **func_ea** – (ea_t) function entry start address #### ti_changed(ea, \_type, fnames) An item typestring (c/c++ prototype) has been changed. * **Parameters:** * **ea** – (ea_t) * **type** – (const type_t ``` * ``` ) * **fnames** – (const p_list ``` * ``` ) #### tryblks_updated(tbv) Updated tryblk information * **Parameters:** **tbv** – (const tryblks_t ``` * ``` ) #### updating_tryblks(tbv) About to update tryblk information * **Parameters:** **tbv** – (const tryblks_t ``` * ``` ) #### upgraded(\_from) The database has been upgraded and the receiver can upgrade its info as well #### lt_udm_created(udt_name, udm) local type udt member has been added * **Parameters:** * **udtname** – (::const char ``` * ``` ) * **udm** – (::const udm_t ``` * ``` ) #### lt_udm_deleted(udt_name, udm_tid, udm) local type udt member has been deleted * **Parameters:** * **udtname** – (::const char ``` * ``` ) * **udm_tid** – (tid_t) * **udm** – (::const udm_t ``` * ``` ) #### lt_udm_renamed(udt_name, udm, oldname) local type udt member has been renamed * **Parameters:** * **udtname** – (::const char ``` * ``` ) * **udm** – (::const udm_t ``` * ``` ) * **oldname** – (::const char ``` * ``` ) #### lt_udm_changed(udt_name, tid, old, new) local type udt member has been changed * **Parameters:** * **udtname** – (::const char ``` * ``` ) * **udm_tid** – (tid_t) * **udmold** – (::const udm_t ``` * ``` ) * **udmnew** – (::const udm_t ``` * ``` ) #### lt_udt_expanded(udt_name, udm_tid, delta) A structure type has been expanded/shrank. * **Parameters:** * **udtname** – (::const char ``` * ``` ) * **udm_tid** – (tid_t) the gap was added/removed before this member * **delta** – (adiff_t) number of added/removed bytes #### frame_created(func_ea) A function frame has been created. * **Parameters:** **func_ea** – (ea_t) idb_event::frame_deleted #### frame_udm_created(func_ea, udm) Frame member has been added. * **Parameters:** * **func_ea** – (ea_t) * **udm** – (::const udm_t ``` * ``` ) #### frame_udm_deleted(func_ea, udm_tid, udm) Frame member has been deleted. * **Parameters:** * **func_ea** – (ea_t) * **udm_tid** – (tid_t) * **udm** – (::const udm_t ``` * ``` ) #### frame_udm_renamed(func_ea, udm, oldname) Frame member has been renamed. * **Parameters:** * **func_ea** – (ea_t) * **udm** – (::const udm_t ``` * ``` ) * **oldname** – (::const char ``` * ``` ) #### frame_udm_changed(func_ea, udm_tid, udm_old, udm_new) Frame member has been changed. * **Parameters:** * **func_ea** – (ea_t) * **udm_tid** – (tid_t) * **udmold** – (::const udm_t ``` * ``` ) * **udmnew** – (::const udm_t ``` * ``` ) #### frame_expanded(func_ea, udm_tid, delta) A frame type has been expanded/shrank. * **Parameters:** * **func_ea** – (ea_t) * **udm_tid** – (tid_t) the gap was added/removed before this member * **delta** – (adiff_t) number of added/removed bytes #### lt_edm_created(enumname, edm) local type enum member has been added * **Parameters:** * **enumname** – (::const char ``` * ``` ) * **edm** – (::const edm_t ``` * ``` ) #### lt_edm_deleted(enumname, tid, edm) local type enum member has been deleted * **Parameters:** * **enumname** – (::const char ``` * ``` ) * **edm_tid** – (tid_t) * **edm** – (::const edm_t ``` * ``` ) #### lt_edm_renamed(enumname, edm, oldname) local type enum member has been renamed * **Parameters:** * **enumname** – (::const char ``` * ``` ) * **edm** – (::const edm_t ``` * ``` ) * **oldname** – (::const char ``` * ``` ) #### lt_edm_changed(enumname, tid, edmold, edmnew) local type enum member has been changed * **Parameters:** * **enumname** – (::const char ``` * ``` ) * **edm_tid** – (tid_t) * **edmold** – (::const edm_t ``` * ``` ) * **edmnew** – (::const edm_t ``` * ``` ) #### moving_range_cmt(kind, oldea, newea, is_repeatable) Range comment is to be moved. * **Parameters:** * **kind** – (range_kind_t) * **oldea** – (ea_t) * **newea** – (ea_t) * **repeatable** – (bool) ### log_idb_events.idb_hooks # index.html.md # create_struct_by_member summary: create a structure programmatically description: : The goal of this script is to demonstrate some usage of the type API. In this script, we create a structure by building it member by member. level: intermediate ## Attributes | [`field_list`](#create_struct_by_member.field_list) | | |-------------------------------------------------------|----| | [`udt`](#id0) | | | [`udm`](#create_struct_by_member.udm) | | | [`last`](#create_struct_by_member.last) | | | [`tif`](#create_struct_by_member.tif) | | | [`udt`](#id0) | | ## Module Contents ### create_struct_by_member.field_list ### create_struct_by_member.udt ### create_struct_by_member.udm ### create_struct_by_member.last ### create_struct_by_member.tif ### create_struct_by_member.udt # index.html.md # replay_prototypes_changes summary: record and replay changes in function prototypes description: : This is a sample script, that will record (in memory) all changes in functions prototypes, in order to re-apply them later.
To use this script: : - open an IDB (say, “test.idb”) - modify some functions prototypes (e.g., by triggering the ‘Y’ shortcut when the cursor is placed on the first address of a function) - reload that IDB, *without saving it first* - call rpc.replay(), to re-apply the modifications.
Note: ‘ti_changed’ is also called for changes to the function frames, but we’ll only record function prototypes changes. level: intermediate ## Attributes | [`rpc`](#replay_prototypes_changes.rpc) | | |-------------------------------------------|----| ## Classes | [`replay_prototypes_changes_t`](#replay_prototypes_changes.replay_prototypes_changes_t) | | |-------------------------------------------------------------------------------------------|----| ## Module Contents ### *class* replay_prototypes_changes.replay_prototypes_changes_t Bases: [`ida_idp.IDB_Hooks`](../ida_idp/index.md#ida_idp.IDB_Hooks) #### memo *= []* #### replaying *= False* #### ti_changed(ea, typ, fields) An item typestring (c/c++ prototype) has been changed. * **Parameters:** * **ea** – (ea_t) * **type** – (const type_t ``` * ``` ) * **fnames** – (const p_list ``` * ``` ) #### replay() ### replay_prototypes_changes.rpc # index.html.md # install_user_defined_prefix summary: insert information into listing prefixes description: : By default, disassembly line prefixes contain segment + address information (e.g., ‘.text:08047718’), but it is possible to “inject” other bits of information in there, thanks to the ida_lines.user_defined_prefix_t helper type. level: beginner ## Attributes | [`PREFIX`](#install_user_defined_prefix.PREFIX) | | |---------------------------------------------------|----| ## Classes | [`my_user_prefix_t`](#install_user_defined_prefix.my_user_prefix_t) | | |-----------------------------------------------------------------------|--------------------------------------| | [`prefix_plugin_t`](#install_user_defined_prefix.prefix_plugin_t) | Base class for all scripted plugins. | ## Functions | [`PLUGIN_ENTRY`](#install_user_defined_prefix.PLUGIN_ENTRY)() | | |-----------------------------------------------------------------|----| ## Module Contents ### install_user_defined_prefix.PREFIX ### *class* install_user_defined_prefix.my_user_prefix_t(\*args) Bases: [`ida_lines.user_defined_prefix_t`](../ida_lines/index.md#ida_lines.user_defined_prefix_t) #### get_user_defined_prefix(ea, insn, lnnum, indent, line) This callback must be overridden by the derived class. * **Parameters:** * **ea** – the current address * **insn** – the current instruction. if the current item is not an instruction, then insn.itype is zero. * **lnnum** – number of the current line (each address may have several listing lines for it). 0 means the very first line for the current address. * **indent** – see explanations for gen_printf() * **line** – the line to be generated. the line usually contains color tags. this argument can be examined to decide whether to generate the prefix. ### *class* install_user_defined_prefix.prefix_plugin_t Bases: [`ida_idaapi.plugin_t`](../ida_idaapi/index.md#ida_idaapi.plugin_t) Base class for all scripted plugins. #### flags *= 0* #### comment *= 'This is a user defined prefix sample plugin'* #### help *= 'This is help'* #### wanted_name *= 'user defined prefix'* #### wanted_hotkey *= ''* #### prefix *= None* #### init() #### run(arg) #### term() ### install_user_defined_prefix.PLUGIN_ENTRY() # index.html.md # ida_typeinf Type information in IDA. In IDA, types are represented by and manipulated through tinfo_t objects. A tinfo_t can represent a simple type (e.g., int, float), a complex type (a structure, enum, union, typedef), or even an array, or a function prototype. The key types in this file are: * til_t - a type info library. Holds type information in serialized form. * tinfo_t - information about a type (simple, complex, …) ## Glossary All throughout this file, there are certain terms that will keep appearing: * udt: “user-defined type”: a structure or union - but not enums. See udt_type_data_t * udm: “udt member”: i.e., a structure or union member. See udm_t * edm: “enum member”: i.e., an enumeration member - i.e., an enumerator. See edm_t ## Under the hood The tinfo_t type provides a lot of useful methods already, but it’s possible to achieve even more by retrieving its contents into the container classes: * udt_type_data_t - for structures & unions. See tinfo_t::get_udt_details. Essentially, a vector of udm_t * enum_type_data_t - for enumerations. See tinfo_t::get_enum_details. Essentially, a vector of edm_t * ptr_type_data_t - for pointers. See tinfo_t::get_ptr_details * array_type_data_t - for arrays. See tinfo_t::get_array_details * func_type_data_t - for function prototypes. See tinfo_t::get_func_details * bitfield_type_data_t - for bitfields. See tinfo_t::get_bitfield_details ## Attached & detached tinfo_t objects tinfo_t objects can be attached to a til_t library, or can be created without using any til_t. Here is an example, assigning a function prototype: ```default func_type_data_t func_info; funcarg_t argc; argc.name = "argc"; argc.type = tinfo_t(BT_INT); func_info.push_back(argc); funcarg_t argv; argc.name = "argv"; argc.type = tinfo_t("const char **"); func_info.push_back(argv) tinfo_t tif; if ( tif.create_func(func_info) ) { ea_t ea = // get address of "main" apply_tinfo(ea, tif, TINFO_DEFINITE); } ``` This code manipulates a “detached” tinfo_t object, which does not depend on any til_t file. However, any complex type will require a til_t file. In IDA, there is always a default til_t file for each idb file. This til_t file can be specified by nullptr. On the other hand, the following code manipulates an “attached” tinfo_t object, and any operation that modifies it, will also modify it in the hosting til_t: ```default tinfo_t tif; # Load type from the "Local Types" til_t. # Note: we could have used `get_idati()` instead of nullptr if ( tif.get_named_type(nullptr, "my_struct_t") ) tif.add_udm("extra_field", "unsigned long long"); ``` You can check if a tinfo_t instance is attached to a type in a til_t file by calling tinfo_t::is_typeref. ## Attributes | [`DEFMASK64`](#ida_typeinf.DEFMASK64) | default bitmask 64bits | |---------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [`RESERVED_BYTE`](#ida_typeinf.RESERVED_BYTE) | multifunctional purpose | | [`TAH_BYTE`](#ida_typeinf.TAH_BYTE) | type attribute header byte | | [`FAH_BYTE`](#ida_typeinf.FAH_BYTE) | function argument attribute header byte | | [`MAX_DECL_ALIGN`](#ida_typeinf.MAX_DECL_ALIGN) | | | [`TAH_HASATTRS`](#ida_typeinf.TAH_HASATTRS) | has extended attributes | | [`TAUDT_UNALIGNED`](#ida_typeinf.TAUDT_UNALIGNED) | struct: unaligned struct | | [`TAUDT_MSSTRUCT`](#ida_typeinf.TAUDT_MSSTRUCT) | struct: gcc msstruct attribute | | [`TAUDT_CPPOBJ`](#ida_typeinf.TAUDT_CPPOBJ) | struct: a C++ object, not simple pod type | | [`TAUDT_VFTABLE`](#ida_typeinf.TAUDT_VFTABLE) | struct: is virtual function table | | [`TAUDT_FIXED`](#ida_typeinf.TAUDT_FIXED) | struct: fixed field offsets, stored in serialized form; cannot be set for unions | | [`TAUDT_TUPLE`](#ida_typeinf.TAUDT_TUPLE) | tuple: tuples are like structs but are returned differently from functions | | [`TAUDT_IFACE`](#ida_typeinf.TAUDT_IFACE) | interface: objc | | [`TAFLD_BASECLASS`](#ida_typeinf.TAFLD_BASECLASS) | field: do not include but inherit from the current field | | [`TAFLD_UNALIGNED`](#ida_typeinf.TAFLD_UNALIGNED) | field: unaligned field | | [`TAFLD_VIRTBASE`](#ida_typeinf.TAFLD_VIRTBASE) | field: virtual base (not supported yet) | | [`TAFLD_VFTABLE`](#ida_typeinf.TAFLD_VFTABLE) | field: ptr to virtual function table | | [`TAFLD_METHOD`](#ida_typeinf.TAFLD_METHOD) | denotes a udt member function | | [`TAFLD_GAP`](#ida_typeinf.TAFLD_GAP) | field: gap member (displayed as padding in type details) | | [`TAFLD_REGCMT`](#ida_typeinf.TAFLD_REGCMT) | field: the comment is regular (if not set, it is repeatable) | | [`TAFLD_FRAME_R`](#ida_typeinf.TAFLD_FRAME_R) | frame: function return address frame slot | | [`TAFLD_FRAME_S`](#ida_typeinf.TAFLD_FRAME_S) | frame: function saved registers frame slot | | [`TAFLD_BYTIL`](#ida_typeinf.TAFLD_BYTIL) | field: was the member created due to the type system | | [`TAPTR_PTR32`](#ida_typeinf.TAPTR_PTR32) | ptr: \_\_ptr32 | | [`TAPTR_PTR64`](#ida_typeinf.TAPTR_PTR64) | ptr: \_\_ptr64 | | [`TAPTR_RESTRICT`](#ida_typeinf.TAPTR_RESTRICT) | ptr: \_\_restrict | | [`TAPTR_SHIFTED`](#ida_typeinf.TAPTR_SHIFTED) | ptr: \_\_shifted(parent_struct, delta) | | [`TAENUM_64BIT`](#ida_typeinf.TAENUM_64BIT) | enum: store 64-bit values | | [`TAENUM_UNSIGNED`](#ida_typeinf.TAENUM_UNSIGNED) | enum: unsigned | | [`TAENUM_SIGNED`](#ida_typeinf.TAENUM_SIGNED) | enum: signed | | [`TAENUM_OCT`](#ida_typeinf.TAENUM_OCT) | enum: octal representation, if BTE_HEX | | [`TAENUM_BIN`](#ida_typeinf.TAENUM_BIN) | enum: binary representation, if BTE_HEX only one of OCT/BIN bits can be set. they are meaningful only if BTE_HEX is used. | | [`TAENUM_NUMSIGN`](#ida_typeinf.TAENUM_NUMSIGN) | enum: signed representation, if BTE_HEX | | [`TAENUM_LZERO`](#ida_typeinf.TAENUM_LZERO) | enum: print numbers with leading zeros (only for HEX/OCT/BIN) | | [`TAH_ALL`](#ida_typeinf.TAH_ALL) | all defined bits | | [`cvar`](#id0) | | | [`TYPE_BASE_MASK`](#ida_typeinf.TYPE_BASE_MASK) | the low 4 bits define the basic type | | [`TYPE_FLAGS_MASK`](#ida_typeinf.TYPE_FLAGS_MASK) | type flags - they have different meaning depending on the basic type | | [`TYPE_MODIF_MASK`](#ida_typeinf.TYPE_MODIF_MASK) | modifiers. | | [`TYPE_FULL_MASK`](#ida_typeinf.TYPE_FULL_MASK) | basic type with type flags | | [`BT_UNK`](#ida_typeinf.BT_UNK) | unknown | | [`BT_VOID`](#ida_typeinf.BT_VOID) | void | | [`BTMT_SIZE0`](#ida_typeinf.BTMT_SIZE0) | BT_VOID - normal void; BT_UNK - don't use | | [`BTMT_SIZE12`](#ida_typeinf.BTMT_SIZE12) | size = 1 byte if BT_VOID; 2 if BT_UNK | | [`BTMT_SIZE48`](#ida_typeinf.BTMT_SIZE48) | size = 4 bytes if BT_VOID; 8 if BT_UNK | | [`BTMT_SIZE128`](#ida_typeinf.BTMT_SIZE128) | size = 16 bytes if BT_VOID; unknown if BT_UNK (IN struct alignment - see below) | | [`BT_INT8`](#ida_typeinf.BT_INT8) | \_\_int8 | | [`BT_INT16`](#ida_typeinf.BT_INT16) | \_\_int16 | | [`BT_INT32`](#ida_typeinf.BT_INT32) | \_\_int32 | | [`BT_INT64`](#ida_typeinf.BT_INT64) | \_\_int64 | | [`BT_INT128`](#ida_typeinf.BT_INT128) | \_\_int128 (for alpha & future use) | | [`BT_INT`](#ida_typeinf.BT_INT) | natural int. (size provided by idp module) | | [`BTMT_UNKSIGN`](#ida_typeinf.BTMT_UNKSIGN) | unknown signedness | | [`BTMT_SIGNED`](#ida_typeinf.BTMT_SIGNED) | signed | | [`BTMT_USIGNED`](#ida_typeinf.BTMT_USIGNED) | unsigned | | [`BTMT_UNSIGNED`](#ida_typeinf.BTMT_UNSIGNED) | | | [`BTMT_CHAR`](#ida_typeinf.BTMT_CHAR) | specify char or segment register | | [`BT_BOOL`](#ida_typeinf.BT_BOOL) | bool | | [`BTMT_DEFBOOL`](#ida_typeinf.BTMT_DEFBOOL) | size is model specific or unknown(?) | | [`BTMT_BOOL1`](#ida_typeinf.BTMT_BOOL1) | size 1 byte | | [`BTMT_BOOL2`](#ida_typeinf.BTMT_BOOL2) | size 2 bytes - !inf_is_64bit() | | [`BTMT_BOOL8`](#ida_typeinf.BTMT_BOOL8) | size 8 bytes - inf_is_64bit() | | [`BTMT_BOOL4`](#ida_typeinf.BTMT_BOOL4) | size 4 bytes | | [`BT_FLOAT`](#ida_typeinf.BT_FLOAT) | float | | [`BTMT_FLOAT`](#ida_typeinf.BTMT_FLOAT) | float (4 bytes) | | [`BTMT_DOUBLE`](#ida_typeinf.BTMT_DOUBLE) | double (8 bytes) | | [`BTMT_LNGDBL`](#ida_typeinf.BTMT_LNGDBL) | long double (compiler specific) | | [`BTMT_SPECFLT`](#ida_typeinf.BTMT_SPECFLT) | float (variable size). if processor_t::use_tbyte() then use processor_t::tbyte_size, otherwise 2 bytes | | [`BT_PTR`](#ida_typeinf.BT_PTR) | pointer. has the following format: [db sizeof(ptr)]; [tah-typeattrs]; type_t... | | [`BTMT_DEFPTR`](#ida_typeinf.BTMT_DEFPTR) | default for model | | [`BTMT_NEAR`](#ida_typeinf.BTMT_NEAR) | near | | [`BTMT_FAR`](#ida_typeinf.BTMT_FAR) | far | | [`BTMT_CLOSURE`](#ida_typeinf.BTMT_CLOSURE) | closure. | | [`BT_ARRAY`](#ida_typeinf.BT_ARRAY) | array | | [`BTMT_NONBASED`](#ida_typeinf.BTMT_NONBASED) | set | | [`BTMT_ARRESERV`](#ida_typeinf.BTMT_ARRESERV) | reserved bit | | [`BT_FUNC`](#ida_typeinf.BT_FUNC) | function. format: | | [`BTMT_DEFCALL`](#ida_typeinf.BTMT_DEFCALL) | call method - default for model or unknown | | [`BTMT_NEARCALL`](#ida_typeinf.BTMT_NEARCALL) | function returns by retn | | [`BTMT_FARCALL`](#ida_typeinf.BTMT_FARCALL) | function returns by retf | | [`BTMT_INTCALL`](#ida_typeinf.BTMT_INTCALL) | function returns by iret in this case cc MUST be 'unknown' | | [`BT_COMPLEX`](#ida_typeinf.BT_COMPLEX) | struct/union/enum/typedef. format: | | [`BTMT_STRUCT`](#ida_typeinf.BTMT_STRUCT) | struct: MCNT records: type_t; [sdacl-typeattrs]; | | [`BTMT_UNION`](#ida_typeinf.BTMT_UNION) | union: MCNT records: type_t... | | [`BTMT_ENUM`](#ida_typeinf.BTMT_ENUM) | enum: next byte bte_t (see below) N records: de delta(s) OR blocks (see below) | | [`BTMT_TYPEDEF`](#ida_typeinf.BTMT_TYPEDEF) | named reference always p_string name | | [`BT_BITFIELD`](#ida_typeinf.BT_BITFIELD) | bitfield (only in struct) ['bitmasked' enum see below] next byte is dt ((size in bits << 1) | (unsigned ? 1 : 0)) | | [`BTMT_BFLDI8`](#ida_typeinf.BTMT_BFLDI8) | \_\_int8 | | [`BTMT_BFLDI16`](#ida_typeinf.BTMT_BFLDI16) | \_\_int16 | | [`BTMT_BFLDI32`](#ida_typeinf.BTMT_BFLDI32) | \_\_int32 | | [`BTMT_BFLDI64`](#ida_typeinf.BTMT_BFLDI64) | \_\_int64 | | [`BT_RESERVED`](#ida_typeinf.BT_RESERVED) | RESERVED. | | [`BTM_CONST`](#ida_typeinf.BTM_CONST) | const | | [`BTM_VOLATILE`](#ida_typeinf.BTM_VOLATILE) | volatile | | [`BTE_SIZE_MASK`](#ida_typeinf.BTE_SIZE_MASK) | storage size. | | [`BTE_RESERVED`](#ida_typeinf.BTE_RESERVED) | must be 0, in order to distinguish from a tah-byte | | [`BTE_BITMASK`](#ida_typeinf.BTE_BITMASK) | 'subarrays'. In this case ANY record has the following format: | | [`BTE_OUT_MASK`](#ida_typeinf.BTE_OUT_MASK) | output style mask | | [`BTE_HEX`](#ida_typeinf.BTE_HEX) | hex | | [`BTE_CHAR`](#ida_typeinf.BTE_CHAR) | char or hex | | [`BTE_SDEC`](#ida_typeinf.BTE_SDEC) | signed decimal | | [`BTE_UDEC`](#ida_typeinf.BTE_UDEC) | unsigned decimal | | [`BTE_ALWAYS`](#ida_typeinf.BTE_ALWAYS) | this bit MUST be present | | [`BT_SEGREG`](#ida_typeinf.BT_SEGREG) | segment register | | [`BT_UNK_BYTE`](#ida_typeinf.BT_UNK_BYTE) | 1 byte | | [`BT_UNK_WORD`](#ida_typeinf.BT_UNK_WORD) | 2 bytes | | [`BT_UNK_DWORD`](#ida_typeinf.BT_UNK_DWORD) | 4 bytes | | [`BT_UNK_QWORD`](#ida_typeinf.BT_UNK_QWORD) | 8 bytes | | [`BT_UNK_OWORD`](#ida_typeinf.BT_UNK_OWORD) | 16 bytes | | [`BT_UNKNOWN`](#ida_typeinf.BT_UNKNOWN) | unknown size - for parameters | | [`BTF_BYTE`](#ida_typeinf.BTF_BYTE) | byte | | [`BTF_UNK`](#ida_typeinf.BTF_UNK) | unknown | | [`BTF_VOID`](#ida_typeinf.BTF_VOID) | void | | [`BTF_INT8`](#ida_typeinf.BTF_INT8) | signed byte | | [`BTF_CHAR`](#ida_typeinf.BTF_CHAR) | signed char | | [`BTF_UCHAR`](#ida_typeinf.BTF_UCHAR) | unsigned char | | [`BTF_UINT8`](#ida_typeinf.BTF_UINT8) | unsigned byte | | [`BTF_INT16`](#ida_typeinf.BTF_INT16) | signed short | | [`BTF_UINT16`](#ida_typeinf.BTF_UINT16) | unsigned short | | [`BTF_INT32`](#ida_typeinf.BTF_INT32) | signed int | | [`BTF_UINT32`](#ida_typeinf.BTF_UINT32) | unsigned int | | [`BTF_INT64`](#ida_typeinf.BTF_INT64) | signed long | | [`BTF_UINT64`](#ida_typeinf.BTF_UINT64) | unsigned long | | [`BTF_INT128`](#ida_typeinf.BTF_INT128) | signed 128-bit value | | [`BTF_UINT128`](#ida_typeinf.BTF_UINT128) | unsigned 128-bit value | | [`BTF_INT`](#ida_typeinf.BTF_INT) | int, unknown signedness | | [`BTF_UINT`](#ida_typeinf.BTF_UINT) | unsigned int | | [`BTF_SINT`](#ida_typeinf.BTF_SINT) | signed int | | [`BTF_BOOL`](#ida_typeinf.BTF_BOOL) | boolean | | [`BTF_FLOAT`](#ida_typeinf.BTF_FLOAT) | float | | [`BTF_DOUBLE`](#ida_typeinf.BTF_DOUBLE) | double | | [`BTF_LDOUBLE`](#ida_typeinf.BTF_LDOUBLE) | long double | | [`BTF_TBYTE`](#ida_typeinf.BTF_TBYTE) | see BTMT_SPECFLT | | [`BTF_STRUCT`](#ida_typeinf.BTF_STRUCT) | struct | | [`BTF_UNION`](#ida_typeinf.BTF_UNION) | union | | [`BTF_ENUM`](#ida_typeinf.BTF_ENUM) | enum | | [`BTF_TYPEDEF`](#ida_typeinf.BTF_TYPEDEF) | typedef | | [`TA_ORG_TYPEDEF`](#ida_typeinf.TA_ORG_TYPEDEF) | the original typedef name (simple string) | | [`TA_ORG_ARRDIM`](#ida_typeinf.TA_ORG_ARRDIM) | the original array dimension (pack_dd) | | [`TA_FORMAT`](#ida_typeinf.TA_FORMAT) | info about the 'format' argument. 3 times pack_dd: format_functype_t, argument number of 'format', argument number of '...' | | [`TA_VALUE_REPR`](#ida_typeinf.TA_VALUE_REPR) | serialized value_repr_t (used for scalars and arrays) | | [`no_sign`](#ida_typeinf.no_sign) | no sign, or unknown | | [`type_signed`](#ida_typeinf.type_signed) | signed type | | [`type_unsigned`](#ida_typeinf.type_unsigned) | unsigned type | | [`TIL_ZIP`](#ida_typeinf.TIL_ZIP) | pack buckets using zip | | [`TIL_MAC`](#ida_typeinf.TIL_MAC) | til has macro table | | [`TIL_ESI`](#ida_typeinf.TIL_ESI) | extended sizeof info (short, long, longlong) | | [`TIL_UNI`](#ida_typeinf.TIL_UNI) | universal til for any compiler | | [`TIL_ORD`](#ida_typeinf.TIL_ORD) | type ordinal numbers are present | | [`TIL_ALI`](#ida_typeinf.TIL_ALI) | type aliases are present (this bit is used only on the disk) | | [`TIL_MOD`](#ida_typeinf.TIL_MOD) | til has been modified, should be saved | | [`TIL_STM`](#ida_typeinf.TIL_STM) | til has extra streams | | [`TIL_SLD`](#ida_typeinf.TIL_SLD) | sizeof(long double) | | [`TIL_ECC`](#ida_typeinf.TIL_ECC) | extended callcnv_t | | [`TIL_ADD_FAILED`](#ida_typeinf.TIL_ADD_FAILED) | see errbuf | | [`TIL_ADD_OK`](#ida_typeinf.TIL_ADD_OK) | some tils were added | | [`TIL_ADD_ALREADY`](#ida_typeinf.TIL_ADD_ALREADY) | the base til was already added | | [`CM_MASK`](#ida_typeinf.CM_MASK) | | | [`CM_UNKNOWN`](#ida_typeinf.CM_UNKNOWN) | unknown | | [`CM_N8_F16`](#ida_typeinf.CM_N8_F16) | if sizeof(int)<=2: near 1 byte, far 2 bytes | | [`CM_N64`](#ida_typeinf.CM_N64) | if sizeof(int)>2: near 8 bytes, far 8 bytes | | [`CM_N16_F32`](#ida_typeinf.CM_N16_F32) | near 2 bytes, far 4 bytes | | [`CM_N32_F48`](#ida_typeinf.CM_N32_F48) | near 4 bytes, far 6 bytes | | [`CM_M_MASK`](#ida_typeinf.CM_M_MASK) | | | [`CM_M_NN`](#ida_typeinf.CM_M_NN) | small: code=near, data=near (or unknown if CM_UNKNOWN) | | [`CM_M_FF`](#ida_typeinf.CM_M_FF) | large: code=far, data=far | | [`CM_M_NF`](#ida_typeinf.CM_M_NF) | compact: code=near, data=far | | [`CM_M_FN`](#ida_typeinf.CM_M_FN) | medium: code=far, data=near | | [`CM_CC_MASK`](#ida_typeinf.CM_CC_MASK) | | | [`CM_CC_INVALID`](#ida_typeinf.CM_CC_INVALID) | this value is invalid | | [`CM_CC_UNKNOWN`](#ida_typeinf.CM_CC_UNKNOWN) | unknown calling convention | | [`CM_CC_VOIDARG`](#ida_typeinf.CM_CC_VOIDARG) | function without arguments if has other cc and argnum == 0, represent as f() - unknown list | | [`CM_CC_CDECL`](#ida_typeinf.CM_CC_CDECL) | stack | | [`CM_CC_ELLIPSIS`](#ida_typeinf.CM_CC_ELLIPSIS) | cdecl + ellipsis | | [`CM_CC_STDCALL`](#ida_typeinf.CM_CC_STDCALL) | stack, purged | | [`CM_CC_PASCAL`](#ida_typeinf.CM_CC_PASCAL) | stack, purged, reverse order of args | | [`CM_CC_FASTCALL`](#ida_typeinf.CM_CC_FASTCALL) | stack, purged (x86), first args are in regs (compiler-dependent) | | [`CM_CC_THISCALL`](#ida_typeinf.CM_CC_THISCALL) | stack, purged (x86), first arg is in reg (compiler-dependent) | | [`CM_CC_SWIFT`](#ida_typeinf.CM_CC_SWIFT) | (Swift) arguments and return values in registers (compiler-dependent) | | [`CM_CC_SPOILED`](#ida_typeinf.CM_CC_SPOILED) | This is NOT a cc! Mark of \_\_spoil record the low nibble is count and after n {spoilreg_t} present real cm_t byte. if n == BFA_FUNC_MARKER, the next byte is the function attribute byte. | | [`CM_CC_GOLANG`](#ida_typeinf.CM_CC_GOLANG) | (Go) arguments and return value reg/stack depending on version | | [`CM_CC_RESERVE3`](#ida_typeinf.CM_CC_RESERVE3) | reserved; used for internal needs | | [`CM_CC_SPECIALE`](#ida_typeinf.CM_CC_SPECIALE) | CM_CC_SPECIAL with ellipsis | | [`CM_CC_SPECIALP`](#ida_typeinf.CM_CC_SPECIALP) | Equal to CM_CC_SPECIAL, but with purged stack. | | [`CM_CC_SPECIAL`](#ida_typeinf.CM_CC_SPECIAL) | usercall: locations of all arguments and the return value are explicitly specified | | [`CM_CC_LAST_USERCALL`](#ida_typeinf.CM_CC_LAST_USERCALL) | | | [`CM_CC_GOSTK`](#ida_typeinf.CM_CC_GOSTK) | (Go) arguments and return value in stack | | [`CM_CC_RUST`](#ida_typeinf.CM_CC_RUST) | (Rust) arguments and return value follow the Rust ABI | | [`CM_CC_FIRST_PLAIN_CUSTOM`](#ida_typeinf.CM_CC_FIRST_PLAIN_CUSTOM) | | | [`BFA_NORET`](#ida_typeinf.BFA_NORET) | \_\_noreturn | | [`BFA_PURE`](#ida_typeinf.BFA_PURE) | \_\_pure | | [`BFA_HIGH`](#ida_typeinf.BFA_HIGH) | high level prototype (with possibly hidden args) | | [`BFA_STATIC`](#ida_typeinf.BFA_STATIC) | static | | [`BFA_VIRTUAL`](#ida_typeinf.BFA_VIRTUAL) | virtual | | [`BFA_FUNC_MARKER`](#ida_typeinf.BFA_FUNC_MARKER) | This is NOT a cc! (used internally as a marker). | | [`BFA_FUNC_EXT_FORMAT`](#ida_typeinf.BFA_FUNC_EXT_FORMAT) | This is NOT a real attribute (used internally as marker for extended format). | | [`ALOC_NONE`](#ida_typeinf.ALOC_NONE) | none | | [`ALOC_STACK`](#ida_typeinf.ALOC_STACK) | stack offset | | [`ALOC_DIST`](#ida_typeinf.ALOC_DIST) | distributed (scattered) | | [`ALOC_REG1`](#ida_typeinf.ALOC_REG1) | one register (and offset within it) | | [`ALOC_REG2`](#ida_typeinf.ALOC_REG2) | register pair | | [`ALOC_RREL`](#ida_typeinf.ALOC_RREL) | register relative | | [`ALOC_STATIC`](#ida_typeinf.ALOC_STATIC) | global address | | [`ALOC_CUSTOM`](#ida_typeinf.ALOC_CUSTOM) | custom argloc (7 or higher) | | [`PRALOC_VERIFY`](#ida_typeinf.PRALOC_VERIFY) | interr if illegal argloc | | [`PRALOC_STKOFF`](#ida_typeinf.PRALOC_STKOFF) | print stack offsets | | [`C_PC_TINY`](#ida_typeinf.C_PC_TINY) | | | [`C_PC_SMALL`](#ida_typeinf.C_PC_SMALL) | | | [`C_PC_COMPACT`](#ida_typeinf.C_PC_COMPACT) | | | [`C_PC_MEDIUM`](#ida_typeinf.C_PC_MEDIUM) | | | [`C_PC_LARGE`](#ida_typeinf.C_PC_LARGE) | | | [`C_PC_HUGE`](#ida_typeinf.C_PC_HUGE) | | | [`C_PC_FLAT`](#ida_typeinf.C_PC_FLAT) | | | [`CCI_VARARG`](#ida_typeinf.CCI_VARARG) | is variadic? | | [`CCI_PURGE`](#ida_typeinf.CCI_PURGE) | purges arguments? | | [`CCI_USER`](#ida_typeinf.CCI_USER) | is usercall? not tested | | [`ARGREGS_POLICY_UNDEFINED`](#ida_typeinf.ARGREGS_POLICY_UNDEFINED) | | | [`ARGREGS_GP_ONLY`](#ida_typeinf.ARGREGS_GP_ONLY) | GP registers used for all arguments. | | [`ARGREGS_INDEPENDENT`](#ida_typeinf.ARGREGS_INDEPENDENT) | FP/GP registers used separately (like gcc64). | | [`ARGREGS_BY_SLOTS`](#ida_typeinf.ARGREGS_BY_SLOTS) | fixed FP/GP register per each slot (like vc64) | | [`ARGREGS_FP_MASKS_GP`](#ida_typeinf.ARGREGS_FP_MASKS_GP) | FP register also consumes one or more GP regs but not vice versa (aix ppc ABI). | | [`ARGREGS_MIPS_O32`](#ida_typeinf.ARGREGS_MIPS_O32) | MIPS ABI o32. | | [`ARGREGS_RISCV`](#ida_typeinf.ARGREGS_RISCV) | Risc-V API FP arguments are passed in GP registers if FP registers are exhausted and GP ones are not. Wide FP arguments are passed in GP registers. Variadic FP arguments are passed in GP registers. | | [`SETCOMP_OVERRIDE`](#ida_typeinf.SETCOMP_OVERRIDE) | may override old compiler info | | [`SETCOMP_ONLY_ID`](#ida_typeinf.SETCOMP_ONLY_ID) | cc has only 'id' field; the rest will be set to defaults corresponding to the program bitness | | [`SETCOMP_ONLY_ABI`](#ida_typeinf.SETCOMP_ONLY_ABI) | ignore cc field complete, use only abiname | | [`SETCOMP_BY_USER`](#ida_typeinf.SETCOMP_BY_USER) | invoked by user, cannot be replaced by module/loader | | [`MAX_FUNC_ARGS`](#ida_typeinf.MAX_FUNC_ARGS) | max number of function arguments | | [`MAX_ARRAY_NELEMS`](#ida_typeinf.MAX_ARRAY_NELEMS) | max number of array elements | | [`ABS_UNK`](#ida_typeinf.ABS_UNK) | | | [`ABS_NO`](#ida_typeinf.ABS_NO) | | | [`ABS_YES`](#ida_typeinf.ABS_YES) | | | [`SC_UNK`](#ida_typeinf.SC_UNK) | unknown | | [`SC_TYPE`](#ida_typeinf.SC_TYPE) | typedef | | [`SC_EXT`](#ida_typeinf.SC_EXT) | extern | | [`SC_STAT`](#ida_typeinf.SC_STAT) | static | | [`SC_REG`](#ida_typeinf.SC_REG) | register | | [`SC_AUTO`](#ida_typeinf.SC_AUTO) | auto | | [`SC_FRIEND`](#ida_typeinf.SC_FRIEND) | friend | | [`SC_VIRT`](#ida_typeinf.SC_VIRT) | virtual | | [`HTI_CPP`](#ida_typeinf.HTI_CPP) | C++ mode (not implemented). | | [`HTI_INT`](#ida_typeinf.HTI_INT) | debug: print internal representation of types | | [`HTI_EXT`](#ida_typeinf.HTI_EXT) | debug: print external representation of types | | [`HTI_LEX`](#ida_typeinf.HTI_LEX) | debug: print tokens | | [`HTI_UNP`](#ida_typeinf.HTI_UNP) | debug: check the result by unpacking it | | [`HTI_TST`](#ida_typeinf.HTI_TST) | test mode: discard the result | | [`HTI_FIL`](#ida_typeinf.HTI_FIL) | "input" is file name, otherwise "input" contains a C declaration | | [`HTI_MAC`](#ida_typeinf.HTI_MAC) | define macros from the base tils | | [`HTI_NWR`](#ida_typeinf.HTI_NWR) | no warning messages | | [`HTI_NER`](#ida_typeinf.HTI_NER) | ignore all errors but display them | | [`HTI_DCL`](#ida_typeinf.HTI_DCL) | don't complain about redeclarations | | [`HTI_NDC`](#ida_typeinf.HTI_NDC) | don't decorate names | | [`HTI_PAK`](#ida_typeinf.HTI_PAK) | explicit structure pack value (#pragma pack) | | [`HTI_PAK_SHIFT`](#ida_typeinf.HTI_PAK_SHIFT) | shift for HTI_PAK. This field should be used if you want to remember an explicit pack value for each structure/union type. See HTI_PAK... definitions | | [`HTI_PAKDEF`](#ida_typeinf.HTI_PAKDEF) | default pack value | | [`HTI_PAK1`](#ida_typeinf.HTI_PAK1) | #pragma pack(1) | | [`HTI_PAK2`](#ida_typeinf.HTI_PAK2) | #pragma pack(2) | | [`HTI_PAK4`](#ida_typeinf.HTI_PAK4) | #pragma pack(4) | | [`HTI_PAK8`](#ida_typeinf.HTI_PAK8) | #pragma pack(8) | | [`HTI_PAK16`](#ida_typeinf.HTI_PAK16) | #pragma pack(16) | | [`HTI_HIGH`](#ida_typeinf.HTI_HIGH) | assume high level prototypes (with hidden args, etc) | | [`HTI_LOWER`](#ida_typeinf.HTI_LOWER) | lower the function prototypes | | [`HTI_RAWARGS`](#ida_typeinf.HTI_RAWARGS) | leave argument names unchanged (do not remove underscores) | | [`HTI_RELAXED`](#ida_typeinf.HTI_RELAXED) | accept references to unknown namespaces | | [`HTI_NOBASE`](#ida_typeinf.HTI_NOBASE) | do not inspect base tils | | [`HTI_SEMICOLON`](#ida_typeinf.HTI_SEMICOLON) | do not complain if the terminating semicolon is absent | | [`HTI_STANDALONE`](#ida_typeinf.HTI_STANDALONE) | should parse standalone declaration, it may contain qualified name and type names, strictly speaking it is not a valid C++ code, IDA Pro specific | | [`HTI_VOID_OK`](#ida_typeinf.HTI_VOID_OK) | accept void as a standalone type | | [`HTI_NO_MANGLE`](#ida_typeinf.HTI_NO_MANGLE) | don't mangle name (see HTI_NDC) | | [`PT_SIL`](#ida_typeinf.PT_SIL) | silent, no messages | | [`PT_NDC`](#ida_typeinf.PT_NDC) | don't decorate names | | [`PT_TYP`](#ida_typeinf.PT_TYP) | return declared type information | | [`PT_VAR`](#ida_typeinf.PT_VAR) | return declared object information | | [`PT_PACKMASK`](#ida_typeinf.PT_PACKMASK) | mask for pack alignment values | | [`PT_HIGH`](#ida_typeinf.PT_HIGH) | assume high level prototypes (with hidden args, etc) | | [`PT_LOWER`](#ida_typeinf.PT_LOWER) | lower the function prototypes | | [`PT_REPLACE`](#ida_typeinf.PT_REPLACE) | replace the old type (used in idc) | | [`PT_RAWARGS`](#ida_typeinf.PT_RAWARGS) | leave argument names unchanged (do not remove underscores) | | [`PT_RELAXED`](#ida_typeinf.PT_RELAXED) | accept references to unknown namespaces | | [`PT_EMPTY`](#ida_typeinf.PT_EMPTY) | accept empty decl | | [`PT_SEMICOLON`](#ida_typeinf.PT_SEMICOLON) | append the terminating semicolon | | [`PT_SYMBOL`](#ida_typeinf.PT_SYMBOL) | accept a symbol name and return its type. e.g. "LoadLibrary" will return its prototype | | [`PT_VOID_OK`](#ida_typeinf.PT_VOID_OK) | accept void as a standalone type | | [`PT_NO_MANGLE`](#ida_typeinf.PT_NO_MANGLE) | don't mangle name (see PT_NDC) | | [`PRTYPE_1LINE`](#ida_typeinf.PRTYPE_1LINE) | print to one line | | [`PRTYPE_MULTI`](#ida_typeinf.PRTYPE_MULTI) | print to many lines | | [`PRTYPE_TYPE`](#ida_typeinf.PRTYPE_TYPE) | print type declaration (not variable declaration) | | [`PRTYPE_PRAGMA`](#ida_typeinf.PRTYPE_PRAGMA) | print pragmas for alignment | | [`PRTYPE_SEMI`](#ida_typeinf.PRTYPE_SEMI) | append ; to the end | | [`PRTYPE_CPP`](#ida_typeinf.PRTYPE_CPP) | use c++ name (only for print_type()) | | [`PRTYPE_DEF`](#ida_typeinf.PRTYPE_DEF) | tinfo_t: print definition, if available | | [`PRTYPE_NOARGS`](#ida_typeinf.PRTYPE_NOARGS) | tinfo_t: do not print function argument names | | [`PRTYPE_NOARRS`](#ida_typeinf.PRTYPE_NOARRS) | tinfo_t: print arguments with FAI_ARRAY as pointers | | [`PRTYPE_NORES`](#ida_typeinf.PRTYPE_NORES) | tinfo_t: never resolve types (meaningful with PRTYPE_DEF) | | [`PRTYPE_RESTORE`](#ida_typeinf.PRTYPE_RESTORE) | tinfo_t: print restored types for FAI_ARRAY and FAI_STRUCT | | [`PRTYPE_NOREGEX`](#ida_typeinf.PRTYPE_NOREGEX) | do not apply regular expressions to beautify name | | [`PRTYPE_COLORED`](#ida_typeinf.PRTYPE_COLORED) | add color tag COLOR_SYMBOL for any parentheses, commas and colons | | [`PRTYPE_METHODS`](#ida_typeinf.PRTYPE_METHODS) | tinfo_t: print udt methods | | [`PRTYPE_1LINCMT`](#ida_typeinf.PRTYPE_1LINCMT) | print comments even in the one line mode | | [`PRTYPE_HEADER`](#ida_typeinf.PRTYPE_HEADER) | print only type header (only for definitions) | | [`PRTYPE_OFFSETS`](#ida_typeinf.PRTYPE_OFFSETS) | print udt member offsets | | [`PRTYPE_MAXSTR`](#ida_typeinf.PRTYPE_MAXSTR) | limit the output length to 1024 bytes (the output may be slightly longer) | | [`PRTYPE_TAIL`](#ida_typeinf.PRTYPE_TAIL) | print only the definition tail (only for definitions, exclusive with PRTYPE_HEADER) | | [`PRTYPE_ARGLOCS`](#ida_typeinf.PRTYPE_ARGLOCS) | print function arglocs (not only for usercall) | | [`NTF_TYPE`](#ida_typeinf.NTF_TYPE) | type name | | [`NTF_SYMU`](#ida_typeinf.NTF_SYMU) | symbol, name is unmangled ('func') | | [`NTF_SYMM`](#ida_typeinf.NTF_SYMM) | symbol, name is mangled ('_func'); only one of NTF_TYPE and NTF_SYMU, NTF_SYMM can be used | | [`NTF_NOBASE`](#ida_typeinf.NTF_NOBASE) | don't inspect base tils (for get_named_type) | | [`NTF_REPLACE`](#ida_typeinf.NTF_REPLACE) | replace original type (for set_named_type) | | [`NTF_UMANGLED`](#ida_typeinf.NTF_UMANGLED) | name is unmangled (don't use this flag) | | [`NTF_NOCUR`](#ida_typeinf.NTF_NOCUR) | don't inspect current til file (for get_named_type) | | [`NTF_64BIT`](#ida_typeinf.NTF_64BIT) | value is 64-bit | | [`NTF_FIXNAME`](#ida_typeinf.NTF_FIXNAME) | force-validate the name of the type when setting (set_named_type, set_numbered_type only) | | [`NTF_IDBENC`](#ida_typeinf.NTF_IDBENC) | the name is given in the IDB encoding; non-ASCII bytes will be decoded accordingly (set_named_type, set_numbered_type only) | | [`NTF_CHKSYNC`](#ida_typeinf.NTF_CHKSYNC) | check that synchronization to IDB passed OK (set_numbered_type, set_named_type) | | [`NTF_NO_NAMECHK`](#ida_typeinf.NTF_NO_NAMECHK) | do not validate type name (set_numbered_type, set_named_type) | | [`NTF_COPY`](#ida_typeinf.NTF_COPY) | save a new type definition, not a typeref (tinfo_t::set_numbered_type, tinfo_t::set_named_type) | | [`TPOS_REGCMT`](#ida_typeinf.TPOS_REGCMT) | | | [`TERR_OK`](#ida_typeinf.TERR_OK) | ok | | [`TERR_SAVE_ERROR`](#ida_typeinf.TERR_SAVE_ERROR) | failed to save | | [`TERR_SERIALIZE`](#ida_typeinf.TERR_SERIALIZE) | failed to serialize | | [`TERR_BAD_NAME`](#ida_typeinf.TERR_BAD_NAME) | name s is not acceptable | | [`TERR_BAD_ARG`](#ida_typeinf.TERR_BAD_ARG) | bad argument | | [`TERR_BAD_TYPE`](#ida_typeinf.TERR_BAD_TYPE) | bad type | | [`TERR_BAD_SIZE`](#ida_typeinf.TERR_BAD_SIZE) | bad size d | | [`TERR_BAD_INDEX`](#ida_typeinf.TERR_BAD_INDEX) | bad index d | | [`TERR_BAD_ARRAY`](#ida_typeinf.TERR_BAD_ARRAY) | arrays are forbidden as function arguments | | [`TERR_BAD_BF`](#ida_typeinf.TERR_BAD_BF) | bitfields are forbidden as function arguments | | [`TERR_BAD_OFFSET`](#ida_typeinf.TERR_BAD_OFFSET) | bad member offset s | | [`TERR_BAD_UNIVAR`](#ida_typeinf.TERR_BAD_UNIVAR) | unions cannot have variable sized members | | [`TERR_BAD_VARLAST`](#ida_typeinf.TERR_BAD_VARLAST) | variable sized member must be the last member in the structure | | [`TERR_OVERLAP`](#ida_typeinf.TERR_OVERLAP) | the member overlaps with other members that cannot be deleted | | [`TERR_BAD_SUBTYPE`](#ida_typeinf.TERR_BAD_SUBTYPE) | recursive structure nesting is forbidden | | [`TERR_BAD_VALUE`](#ida_typeinf.TERR_BAD_VALUE) | value 0xI64X is not acceptable | | [`TERR_NO_BMASK`](#ida_typeinf.TERR_NO_BMASK) | bitmask 0xI64X is not found | | [`TERR_BAD_BMASK`](#ida_typeinf.TERR_BAD_BMASK) | Bad enum member mask 0xI64X. The specified mask should not intersect with any existing mask in the enum. Zero masks are prohibited too. | | [`TERR_BAD_MSKVAL`](#ida_typeinf.TERR_BAD_MSKVAL) | bad bmask and value combination (value=0xI64X; bitmask 0xI64X) | | [`TERR_BAD_REPR`](#ida_typeinf.TERR_BAD_REPR) | bad or incompatible field representation | | [`TERR_GRP_NOEMPTY`](#ida_typeinf.TERR_GRP_NOEMPTY) | could not delete group mask for not empty group 0xI64X | | [`TERR_DUPNAME`](#ida_typeinf.TERR_DUPNAME) | duplicate name s | | [`TERR_UNION_BF`](#ida_typeinf.TERR_UNION_BF) | unions cannot have bitfields | | [`TERR_BAD_TAH`](#ida_typeinf.TERR_BAD_TAH) | bad bits in the type attributes (TAH bits) | | [`TERR_BAD_BASE`](#ida_typeinf.TERR_BAD_BASE) | bad base class | | [`TERR_BAD_GAP`](#ida_typeinf.TERR_BAD_GAP) | bad gap | | [`TERR_NESTED`](#ida_typeinf.TERR_NESTED) | recursive structure nesting is forbidden | | [`TERR_NOT_COMPAT`](#ida_typeinf.TERR_NOT_COMPAT) | the new type is not compatible with the old type | | [`TERR_BAD_LAYOUT`](#ida_typeinf.TERR_BAD_LAYOUT) | failed to calculate the structure/union layout | | [`TERR_BAD_GROUPS`](#ida_typeinf.TERR_BAD_GROUPS) | bad group sizes for bitmask enum | | [`TERR_BAD_SERIAL`](#ida_typeinf.TERR_BAD_SERIAL) | enum value has too many serials | | [`TERR_ALIEN_NAME`](#ida_typeinf.TERR_ALIEN_NAME) | enum member name is used in another enum | | [`TERR_STOCK`](#ida_typeinf.TERR_STOCK) | stock type info cannot be modified | | [`TERR_ENUM_SIZE`](#ida_typeinf.TERR_ENUM_SIZE) | bad enum size | | [`TERR_NOT_IMPL`](#ida_typeinf.TERR_NOT_IMPL) | not implemented | | [`TERR_TYPE_WORSE`](#ida_typeinf.TERR_TYPE_WORSE) | the new type is worse than the old type | | [`TERR_BAD_FX_SIZE`](#ida_typeinf.TERR_BAD_FX_SIZE) | cannot extend struct beyond fixed size | | [`TERR_STRUCT_SIZE`](#ida_typeinf.TERR_STRUCT_SIZE) | bad fixed structure size | | [`TERR_NOT_FOUND`](#ida_typeinf.TERR_NOT_FOUND) | member not found | | [`TERR_COUNT`](#ida_typeinf.TERR_COUNT) | | | [`CCN_C`](#ida_typeinf.CCN_C) | | | [`CCN_CPP`](#ida_typeinf.CCN_CPP) | | | [`ADDTIL_DEFAULT`](#ida_typeinf.ADDTIL_DEFAULT) | default behavior | | [`ADDTIL_INCOMP`](#ida_typeinf.ADDTIL_INCOMP) | load incompatible tils | | [`ADDTIL_SILENT`](#ida_typeinf.ADDTIL_SILENT) | do not ask any questions | | [`ADDTIL_FAILED`](#ida_typeinf.ADDTIL_FAILED) | something bad, the warning is displayed | | [`ADDTIL_OK`](#ida_typeinf.ADDTIL_OK) | ok, til is loaded | | [`ADDTIL_COMP`](#ida_typeinf.ADDTIL_COMP) | ok, but til is not compatible with the current compiler | | [`ADDTIL_ABORTED`](#ida_typeinf.ADDTIL_ABORTED) | til was not loaded (incompatible til rejected by user) | | [`TINFO_GUESSED`](#ida_typeinf.TINFO_GUESSED) | this is a guessed type | | [`TINFO_DEFINITE`](#ida_typeinf.TINFO_DEFINITE) | this is a definite type | | [`TINFO_DELAYFUNC`](#ida_typeinf.TINFO_DELAYFUNC) | if type is a function and no function exists at ea, schedule its creation and argument renaming to auto-analysis, otherwise try to create it immediately | | [`TINFO_STRICT`](#ida_typeinf.TINFO_STRICT) | never convert given type to another one before applying | | [`GUESS_FUNC_FAILED`](#ida_typeinf.GUESS_FUNC_FAILED) | couldn't guess the function type | | [`GUESS_FUNC_TRIVIAL`](#ida_typeinf.GUESS_FUNC_TRIVIAL) | the function type doesn't have interesting info | | [`GUESS_FUNC_OK`](#ida_typeinf.GUESS_FUNC_OK) | ok, some non-trivial information is gathered | | [`STI_PCHAR`](#ida_typeinf.STI_PCHAR) | char \* | | [`STI_PUCHAR`](#ida_typeinf.STI_PUCHAR) | uint8 \* | | [`STI_PCCHAR`](#ida_typeinf.STI_PCCHAR) | const char \* | | [`STI_PCUCHAR`](#ida_typeinf.STI_PCUCHAR) | const uint8 \* | | [`STI_PBYTE`](#ida_typeinf.STI_PBYTE) | \_BYTE \* | | [`STI_PINT`](#ida_typeinf.STI_PINT) | int \* | | [`STI_PUINT`](#ida_typeinf.STI_PUINT) | unsigned int \* | | [`STI_PVOID`](#ida_typeinf.STI_PVOID) | void \* | | [`STI_PPVOID`](#ida_typeinf.STI_PPVOID) | void \*\* | | [`STI_PCVOID`](#ida_typeinf.STI_PCVOID) | const void \* | | [`STI_ACHAR`](#ida_typeinf.STI_ACHAR) | char[] | | [`STI_AUCHAR`](#ida_typeinf.STI_AUCHAR) | uint8[] | | [`STI_ACCHAR`](#ida_typeinf.STI_ACCHAR) | const char[] | | [`STI_ACUCHAR`](#ida_typeinf.STI_ACUCHAR) | const uint8[] | | [`STI_FPURGING`](#ida_typeinf.STI_FPURGING) | void \_\_userpurge(int) | | [`STI_FDELOP`](#ida_typeinf.STI_FDELOP) | void \_\_cdecl(void

```
*
```

) | | [`STI_MSGSEND`](#ida_typeinf.STI_MSGSEND) | void

```
*
```

(void

```
*
```

, const char

```
*
```

, ...) | | [`STI_AEABI_LCMP`](#ida_typeinf.STI_AEABI_LCMP) | int \_\_fastcall \_\_pure(int64 x, int64 y) | | [`STI_AEABI_ULCMP`](#ida_typeinf.STI_AEABI_ULCMP) | int \_\_fastcall \_\_pure(uint64 x, uint64 y) | | [`STI_DONT_USE`](#ida_typeinf.STI_DONT_USE) | unused stock type id; should not be used | | [`STI_SIZE_T`](#ida_typeinf.STI_SIZE_T) | size_t | | [`STI_SSIZE_T`](#ida_typeinf.STI_SSIZE_T) | ssize_t | | [`STI_AEABI_MEMCPY`](#ida_typeinf.STI_AEABI_MEMCPY) | void \_\_fastcall(void

```
*
```

, const void

```
*
```

, size_t) | | [`STI_AEABI_MEMSET`](#ida_typeinf.STI_AEABI_MEMSET) | void \_\_fastcall(void

```
*
```

, size_t, int) | | [`STI_AEABI_MEMCLR`](#ida_typeinf.STI_AEABI_MEMCLR) | void \_\_fastcall(void

```
*
```

, size_t) | | [`STI_RTC_CHECK_2`](#ida_typeinf.STI_RTC_CHECK_2) | int16 \_\_fastcall(int16 x) | | [`STI_RTC_CHECK_4`](#ida_typeinf.STI_RTC_CHECK_4) | int32 \_\_fastcall(int32 x) | | [`STI_RTC_CHECK_8`](#ida_typeinf.STI_RTC_CHECK_8) | int64 \_\_fastcall(int64 x) | | [`STI_COMPLEX64`](#ida_typeinf.STI_COMPLEX64) | struct complex64_t { float real, imag; } | | [`STI_COMPLEX128`](#ida_typeinf.STI_COMPLEX128) | struct complex128_t { double real, imag; } | | [`STI_PUNKNOWN`](#ida_typeinf.STI_PUNKNOWN) | \_UNKNOWN \* | | [`STI_LAST`](#ida_typeinf.STI_LAST) | | | [`ETF_NO_SAVE`](#ida_typeinf.ETF_NO_SAVE) | don't save to til (normally typerefs are saved to til) A call with ETF_NO_SAVE must be followed by a call without it. Otherwise there may be inconsistencies between the memory and the type library. | | [`ETF_NO_LAYOUT`](#ida_typeinf.ETF_NO_LAYOUT) | don't calc type layout before editing | | [`ETF_MAY_DESTROY`](#ida_typeinf.ETF_MAY_DESTROY) | may destroy other members | | [`ETF_COMPATIBLE`](#ida_typeinf.ETF_COMPATIBLE) | new type must be compatible with the old | | [`ETF_FUNCARG`](#ida_typeinf.ETF_FUNCARG) | udm - member is a function argument (cannot create arrays) | | [`ETF_FORCENAME`](#ida_typeinf.ETF_FORCENAME) | anyway use name, see below for more usage description | | [`ETF_AUTONAME`](#ida_typeinf.ETF_AUTONAME) | udm - generate a member name if was not specified (add_udm, set_udm_type) | | [`ETF_BYTIL`](#ida_typeinf.ETF_BYTIL) | udm - new type was created by the type subsystem | | [`ETF_NO_ARRAY`](#ida_typeinf.ETF_NO_ARRAY) | add_udm, set_udm_type - do not convert type to an array on the size mismatch | | [`GTD_CALC_LAYOUT`](#ida_typeinf.GTD_CALC_LAYOUT) | calculate udt layout | | [`GTD_NO_LAYOUT`](#ida_typeinf.GTD_NO_LAYOUT) | don't calculate udt layout please note that udt layout may have been calculated earlier | | [`GTD_DEL_BITFLDS`](#ida_typeinf.GTD_DEL_BITFLDS) | delete udt bitfields | | [`GTD_CALC_ARGLOCS`](#ida_typeinf.GTD_CALC_ARGLOCS) | calculate func arg locations | | [`GTD_NO_ARGLOCS`](#ida_typeinf.GTD_NO_ARGLOCS) | don't calculate func arg locations please note that the locations may have been calculated earlier | | [`GTS_NESTED`](#ida_typeinf.GTS_NESTED) | nested type (embedded into a udt) | | [`GTS_BASECLASS`](#ida_typeinf.GTS_BASECLASS) | is baseclass of a udt | | [`SUDT_SORT`](#ida_typeinf.SUDT_SORT) | fields are not sorted by offset, sort them first | | [`SUDT_ALIGN`](#ida_typeinf.SUDT_ALIGN) | recalculate field alignments, struct packing, etc to match the offsets and size info | | [`SUDT_GAPS`](#ida_typeinf.SUDT_GAPS) | allow to fill gaps with additional members (_BYTE[]) | | [`SUDT_UNEX`](#ida_typeinf.SUDT_UNEX) | references to nonexistent member types are acceptable; in this case it is better to set the corresponding udm_t::fda field to the type alignment. If this field is not set, ida will try to guess the alignment. | | [`SUDT_FAST`](#ida_typeinf.SUDT_FAST) | serialize without verifying offsets and alignments | | [`SUDT_CONST`](#ida_typeinf.SUDT_CONST) | only for serialize_udt: make type const | | [`SUDT_VOLATILE`](#ida_typeinf.SUDT_VOLATILE) | only for serialize_udt: make type volatile | | [`SUDT_TRUNC`](#ida_typeinf.SUDT_TRUNC) | serialize: truncate useless strings from fields, fldcmts | | [`SUDT_SERDEF`](#ida_typeinf.SUDT_SERDEF) | serialize: if a typeref, serialize its definition | | [`COMP_MASK`](#ida_typeinf.COMP_MASK) | | | [`COMP_UNK`](#ida_typeinf.COMP_UNK) | Unknown. | | [`COMP_MS`](#ida_typeinf.COMP_MS) | Visual C++. | | [`COMP_BC`](#ida_typeinf.COMP_BC) | Borland C++. | | [`COMP_WATCOM`](#ida_typeinf.COMP_WATCOM) | Watcom C++. | | [`COMP_GNU`](#ida_typeinf.COMP_GNU) | GNU C++. | | [`COMP_VISAGE`](#ida_typeinf.COMP_VISAGE) | Visual Age C++. | | [`COMP_BP`](#ida_typeinf.COMP_BP) | Delphi. | | [`COMP_UNSURE`](#ida_typeinf.COMP_UNSURE) | uncertain compiler id | | [`BADSIZE`](#ida_typeinf.BADSIZE) | bad type size | | [`FIRST_NONTRIVIAL_TYPID`](#ida_typeinf.FIRST_NONTRIVIAL_TYPID) | Denotes the first bit describing a nontrivial type. | | [`TYPID_ISREF`](#ida_typeinf.TYPID_ISREF) | Identifies that a type that is a typeref. | | [`TYPID_SHIFT`](#ida_typeinf.TYPID_SHIFT) | First type detail bit. | | [`STRMEM_MASK`](#ida_typeinf.STRMEM_MASK) | | | [`STRMEM_OFFSET`](#ida_typeinf.STRMEM_OFFSET) | get member by offset | | [`STRMEM_INDEX`](#ida_typeinf.STRMEM_INDEX) | get member by number | | [`STRMEM_AUTO`](#ida_typeinf.STRMEM_AUTO) | get member by offset if struct, or get member by index if union | | [`STRMEM_NAME`](#ida_typeinf.STRMEM_NAME) | get member by name | | [`STRMEM_TYPE`](#ida_typeinf.STRMEM_TYPE) | get member by type. | | [`STRMEM_SIZE`](#ida_typeinf.STRMEM_SIZE) | get member by size. | | [`STRMEM_MINS`](#ida_typeinf.STRMEM_MINS) | get smallest member by size. | | [`STRMEM_MAXS`](#ida_typeinf.STRMEM_MAXS) | get biggest member by size. | | [`STRMEM_LOWBND`](#ida_typeinf.STRMEM_LOWBND) | get member by offset or the next member (lower bound) | | [`STRMEM_NEXT`](#ida_typeinf.STRMEM_NEXT) | get next member after the offset | | [`STRMEM_VFTABLE`](#ida_typeinf.STRMEM_VFTABLE) | can be combined with STRMEM_OFFSET, STRMEM_AUTO get vftable instead of the base class | | [`STRMEM_SKIP_EMPTY`](#ida_typeinf.STRMEM_SKIP_EMPTY) | can be combined with STRMEM_OFFSET, STRMEM_AUTO skip empty members (i.e. having zero size) only last empty member can be returned | | [`STRMEM_CASTABLE_TO`](#ida_typeinf.STRMEM_CASTABLE_TO) | can be combined with STRMEM_TYPE: member type must be castable to the specified type | | [`STRMEM_ANON`](#ida_typeinf.STRMEM_ANON) | can be combined with STRMEM_NAME: look inside anonymous members too. | | [`STRMEM_SKIP_GAPS`](#ida_typeinf.STRMEM_SKIP_GAPS) | can be combined with STRMEM_OFFSET, STRMEM_LOWBND skip gap members | | [`TCMP_EQUAL`](#ida_typeinf.TCMP_EQUAL) | are types equal? | | [`TCMP_IGNMODS`](#ida_typeinf.TCMP_IGNMODS) | ignore const/volatile modifiers | | [`TCMP_AUTOCAST`](#ida_typeinf.TCMP_AUTOCAST) | can t1 be cast into t2 automatically? | | [`TCMP_MANCAST`](#ida_typeinf.TCMP_MANCAST) | can t1 be cast into t2 manually? | | [`TCMP_CALL`](#ida_typeinf.TCMP_CALL) | can t1 be called with t2 type? | | [`TCMP_DELPTR`](#ida_typeinf.TCMP_DELPTR) | remove pointer from types before comparing | | [`TCMP_DECL`](#ida_typeinf.TCMP_DECL) | compare declarations without resolving them | | [`TCMP_ANYBASE`](#ida_typeinf.TCMP_ANYBASE) | accept any base class when casting | | [`TCMP_SKIPTHIS`](#ida_typeinf.TCMP_SKIPTHIS) | skip the first function argument in comparison | | [`TCMP_DEEP_UDT`](#ida_typeinf.TCMP_DEEP_UDT) | compare udt by member/attributes | | [`FAI_HIDDEN`](#ida_typeinf.FAI_HIDDEN) | hidden argument | | [`FAI_RETPTR`](#ida_typeinf.FAI_RETPTR) | pointer to return value. implies hidden | | [`FAI_STRUCT`](#ida_typeinf.FAI_STRUCT) | was initially a structure | | [`FAI_ARRAY`](#ida_typeinf.FAI_ARRAY) | was initially an array; see "_\_org_typedef" or "_\_org_arrdim" type attributes to determine the original type | | [`FAI_UNUSED`](#ida_typeinf.FAI_UNUSED) | argument is not used by the function | | [`FAI_SWIFTSELF`](#ida_typeinf.FAI_SWIFTSELF) | implicit Swift self arg, bound to the SwiftSelf register (X20/R13). At most one funcarg per function. Source: \_\_swiftself. | | [`FTI_SPOILED`](#ida_typeinf.FTI_SPOILED) | information about spoiled registers is present | | [`FTI_NORET`](#ida_typeinf.FTI_NORET) | noreturn | | [`FTI_PURE`](#ida_typeinf.FTI_PURE) | \_\_pure | | [`FTI_HIGH`](#ida_typeinf.FTI_HIGH) | high level prototype (with possibly hidden args) | | [`FTI_STATIC`](#ida_typeinf.FTI_STATIC) | static | | [`FTI_VIRTUAL`](#ida_typeinf.FTI_VIRTUAL) | virtual | | [`FTI_CALLTYPE`](#ida_typeinf.FTI_CALLTYPE) | mask for FTI_\*CALL | | [`FTI_DEFCALL`](#ida_typeinf.FTI_DEFCALL) | default call | | [`FTI_NEARCALL`](#ida_typeinf.FTI_NEARCALL) | near call | | [`FTI_FARCALL`](#ida_typeinf.FTI_FARCALL) | far call | | [`FTI_INTCALL`](#ida_typeinf.FTI_INTCALL) | interrupt call | | [`FTI_ARGLOCS`](#ida_typeinf.FTI_ARGLOCS) | info about argument locations has been calculated (stkargs and retloc too) | | [`FTI_EXPLOCS`](#ida_typeinf.FTI_EXPLOCS) | all arglocs are specified explicitly | | [`FTI_CONST`](#ida_typeinf.FTI_CONST) | const member function | | [`FTI_CTOR`](#ida_typeinf.FTI_CTOR) | constructor | | [`FTI_DTOR`](#ida_typeinf.FTI_DTOR) | destructor | | [`FTI_SYNCHRONIZED`](#ida_typeinf.FTI_SYNCHRONIZED) | synchronized (Java) | | [`FTI_SWIFTASYNC`](#ida_typeinf.FTI_SWIFTASYNC) | Swift async function: implicit AsyncContext pointer in the swiftasync register (X22/R14). See vdswift.cpp for the ::_\_swift_get_async_context() surfacing. | | [`FTI_SWIFTTHROWS`](#ida_typeinf.FTI_SWIFTTHROWS) | Swift throws function: errors propagate via the SwiftError register (X21/R12). See vdswift.cpp for the ::_\_swift_get_error / ::_\_swift_set_error surfacing. | | [`FTI_ALL`](#ida_typeinf.FTI_ALL) | all defined bits | | [`CC_CDECL_OK`](#ida_typeinf.CC_CDECL_OK) | can use \_\_cdecl calling convention? | | [`CC_ALLOW_ARGPERM`](#ida_typeinf.CC_ALLOW_ARGPERM) | disregard argument order? | | [`CC_ALLOW_REGHOLES`](#ida_typeinf.CC_ALLOW_REGHOLES) | allow holes in register argument list? | | [`CC_HAS_ELLIPSIS`](#ida_typeinf.CC_HAS_ELLIPSIS) | function has a variable list of arguments? | | [`CC_GOLANG_OK`](#ida_typeinf.CC_GOLANG_OK) | can use \_\_golang calling convention | | [`CC_RUST_OK`](#ida_typeinf.CC_RUST_OK) | can use \_\_rust calling convention | | [`FMTFUNC_PRINTF`](#ida_typeinf.FMTFUNC_PRINTF) | | | [`FMTFUNC_SCANF`](#ida_typeinf.FMTFUNC_SCANF) | | | [`FMTFUNC_STRFTIME`](#ida_typeinf.FMTFUNC_STRFTIME) | | | [`FMTFUNC_STRFMON`](#ida_typeinf.FMTFUNC_STRFMON) | | | [`MAX_ENUM_SERIAL`](#ida_typeinf.MAX_ENUM_SERIAL) | Max number of identical constants allowed for one enum type. | | [`FRB_MASK`](#ida_typeinf.FRB_MASK) | Mask for the value type (\* means requires additional info): | | [`FRB_UNK`](#ida_typeinf.FRB_UNK) | Unknown. | | [`FRB_NUMB`](#ida_typeinf.FRB_NUMB) | Binary number. | | [`FRB_NUMO`](#ida_typeinf.FRB_NUMO) | Octal number. | | [`FRB_NUMH`](#ida_typeinf.FRB_NUMH) | Hexadecimal number. | | [`FRB_NUMD`](#ida_typeinf.FRB_NUMD) | Decimal number. | | [`FRB_FLOAT`](#ida_typeinf.FRB_FLOAT) | Floating point number (for interpreting an integer type as a floating value) | | [`FRB_CHAR`](#ida_typeinf.FRB_CHAR) | Char. | | [`FRB_SEG`](#ida_typeinf.FRB_SEG) | Segment. | | [`FRB_ENUM`](#ida_typeinf.FRB_ENUM) | ```
*
```

Enumeration | | [`FRB_OFFSET`](#ida_typeinf.FRB_OFFSET) | ```
*
```

Offset | | [`FRB_STRLIT`](#ida_typeinf.FRB_STRLIT) | ```
*
```

String literal (used for arrays) | | [`FRB_STROFF`](#ida_typeinf.FRB_STROFF) | ```
*
```

Struct offset | | [`FRB_CUSTOM`](#ida_typeinf.FRB_CUSTOM) | ```
*
```

Custom data type | | [`FRB_INVSIGN`](#ida_typeinf.FRB_INVSIGN) | Invert sign (0x01 is represented as -0xFF). | | [`FRB_INVBITS`](#ida_typeinf.FRB_INVBITS) | Invert bits (0x01 is represented as ~0xFE). | | [`FRB_SIGNED`](#ida_typeinf.FRB_SIGNED) | Force signed representation. | | [`FRB_LZERO`](#ida_typeinf.FRB_LZERO) | Toggle leading zeros (used for integers). | | [`FRB_TABFORM`](#ida_typeinf.FRB_TABFORM) | has additional tabular parameters | | [`STRUC_SEPARATOR`](#ida_typeinf.STRUC_SEPARATOR) | structname.fieldname | | [`VTBL_SUFFIX`](#ida_typeinf.VTBL_SUFFIX) | | | [`VTBL_LAYOUT_SUFFIX`](#ida_typeinf.VTBL_LAYOUT_SUFFIX) | | | [`VTBL_MEMNAME`](#ida_typeinf.VTBL_MEMNAME) | | | [`TVIS_TYPE`](#ida_typeinf.TVIS_TYPE) | new type info is present | | [`TVIS_NAME`](#ida_typeinf.TVIS_NAME) | new name is present (only for funcargs and udt members) | | [`TVIS_CMT`](#ida_typeinf.TVIS_CMT) | new comment is present (only for udt members) | | [`TVIS_RPTCMT`](#ida_typeinf.TVIS_RPTCMT) | the new comment is repeatable | | [`TVST_PRUNE`](#ida_typeinf.TVST_PRUNE) | don't visit children of current type | | [`TVST_DEF`](#ida_typeinf.TVST_DEF) | visit type definition (meaningful for typerefs) | | [`TVST_LEVEL`](#ida_typeinf.TVST_LEVEL) | | | [`PIO_NOATTR_FAIL`](#ida_typeinf.PIO_NOATTR_FAIL) | missing attributes are not ok | | [`PIO_IGNORE_PTRS`](#ida_typeinf.PIO_IGNORE_PTRS) | do not follow pointers | | [`UTP_ENUM`](#ida_typeinf.UTP_ENUM) | | | [`UTP_STRUCT`](#ida_typeinf.UTP_STRUCT) | | | [`VALSTR_OPEN`](#ida_typeinf.VALSTR_OPEN) | printed opening curly brace '{' | | [`PDF_INCL_DEPS`](#ida_typeinf.PDF_INCL_DEPS) | Include all type dependencies. | | [`PDF_DEF_FWD`](#ida_typeinf.PDF_DEF_FWD) | Allow forward declarations. | | [`PDF_DEF_BASE`](#ida_typeinf.PDF_DEF_BASE) | Include base types: \_\_int8, \_\_int16, etc.. | | [`PDF_HEADER_CMT`](#ida_typeinf.PDF_HEADER_CMT) | Prepend output with a descriptive comment. | | [`PDF_NO_ANON_NAME`](#ida_typeinf.PDF_NO_ANON_NAME) | Ignore types with anonymous name. | | [`PT_FILE`](#ida_typeinf.PT_FILE) | | | [`PT_STANDALONE`](#ida_typeinf.PT_STANDALONE) | | | [`cvar`](#id0) | | | [`sc_auto`](#ida_typeinf.sc_auto) | | | [`sc_ext`](#ida_typeinf.sc_ext) | | | [`sc_friend`](#ida_typeinf.sc_friend) | | | [`sc_reg`](#ida_typeinf.sc_reg) | | | [`sc_stat`](#ida_typeinf.sc_stat) | | | [`sc_type`](#ida_typeinf.sc_type) | | | [`sc_unk`](#ida_typeinf.sc_unk) | | | [`sc_virt`](#ida_typeinf.sc_virt) | | | [`TERR_SAVE`](#ida_typeinf.TERR_SAVE) | | | [`TERR_WRONGNAME`](#ida_typeinf.TERR_WRONGNAME) | | | [`BADORD`](#ida_typeinf.BADORD) | | | [`enum_member_vec_t`](#ida_typeinf.enum_member_vec_t) | | | [`enum_member_t`](#ida_typeinf.enum_member_t) | | | [`udt_member_t`](#ida_typeinf.udt_member_t) | | | [`resolve_typedef`](#id111) | | ## Classes | [`funcargvec_t`](#ida_typeinf.funcargvec_t) | | |-------------------------------------------------------------------|----| | [`reginfovec_t`](#ida_typeinf.reginfovec_t) | | | [`edmvec_t`](#ida_typeinf.edmvec_t) | | | [`argpartvec_t`](#ida_typeinf.argpartvec_t) | | | [`valstrvec_t`](#ida_typeinf.valstrvec_t) | | | [`regobjvec_t`](#ida_typeinf.regobjvec_t) | | | [`type_attrs_t`](#ida_typeinf.type_attrs_t) | | | [`udtmembervec_template_t`](#ida_typeinf.udtmembervec_template_t) | | | [`qvector_simd_info_vec_t`](#ida_typeinf.qvector_simd_info_vec_t) | | | [`type_attr_t`](#ida_typeinf.type_attr_t) | | | [`til_t`](#ida_typeinf.til_t) | | | [`rrel_t`](#ida_typeinf.rrel_t) | | | [`argloc_t`](#ida_typeinf.argloc_t) | | | [`argpart_t`](#ida_typeinf.argpart_t) | | | [`scattered_aloc_t`](#ida_typeinf.scattered_aloc_t) | | | [`aloc_visitor_t`](#ida_typeinf.aloc_visitor_t) | | | [`const_aloc_visitor_t`](#ida_typeinf.const_aloc_visitor_t) | | | [`stkarg_area_info_t`](#ida_typeinf.stkarg_area_info_t) | | | [`custom_callcnv_t`](#ida_typeinf.custom_callcnv_t) | | | [`callregs_t`](#ida_typeinf.callregs_t) | | | [`tinfo_t`](#ida_typeinf.tinfo_t) | | | [`simd_info_t`](#ida_typeinf.simd_info_t) | | | [`simd_info_vec_t`](#ida_typeinf.simd_info_vec_t) | | | [`ptr_type_data_t`](#ida_typeinf.ptr_type_data_t) | | | [`array_type_data_t`](#ida_typeinf.array_type_data_t) | | | [`funcarg_t`](#ida_typeinf.funcarg_t) | | | [`func_type_data_t`](#ida_typeinf.func_type_data_t) | | | [`edm_t`](#ida_typeinf.edm_t) | | | [`enum_type_data_t`](#ida_typeinf.enum_type_data_t) | | | [`typedef_type_data_t`](#ida_typeinf.typedef_type_data_t) | | | [`custom_data_type_info_t`](#ida_typeinf.custom_data_type_info_t) | | | [`value_repr_t`](#ida_typeinf.value_repr_t) | | | [`udm_t`](#ida_typeinf.udm_t) | | | [`udtmembervec_t`](#ida_typeinf.udtmembervec_t) | | | [`udt_type_data_t`](#ida_typeinf.udt_type_data_t) | | | [`udm_visitor_t`](#ida_typeinf.udm_visitor_t) | | | [`bitfield_type_data_t`](#ida_typeinf.bitfield_type_data_t) | | | [`type_mods_t`](#ida_typeinf.type_mods_t) | | | [`tinfo_visitor_t`](#ida_typeinf.tinfo_visitor_t) | | | [`regobj_t`](#ida_typeinf.regobj_t) | | | [`regobjs_t`](#ida_typeinf.regobjs_t) | | | [`stkarg_part_t`](#ida_typeinf.stkarg_part_t) | | | [`argtinfo_helper_t`](#ida_typeinf.argtinfo_helper_t) | | | [`lowertype_helper_t`](#ida_typeinf.lowertype_helper_t) | | | [`ida_lowertype_helper_t`](#ida_typeinf.ida_lowertype_helper_t) | | | [`field_path_t`](#ida_typeinf.field_path_t) | | | [`valstr_t`](#ida_typeinf.valstr_t) | | | [`valstrs_t`](#ida_typeinf.valstrs_t) | | | [`text_sink_t`](#ida_typeinf.text_sink_t) | | | [`til_symbol_t`](#ida_typeinf.til_symbol_t) | | | [`predicate_t`](#ida_typeinf.predicate_t) | | | [`til_type_ref_t`](#ida_typeinf.til_type_ref_t) | | ## Functions | [`deserialize_tinfo`](#ida_typeinf.deserialize_tinfo)(→ bool) | | |--------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [`is_type_const`](#ida_typeinf.is_type_const)(→ bool) | See BTM_CONST. | | [`is_type_volatile`](#ida_typeinf.is_type_volatile)(→ bool) | See BTM_VOLATILE. | | [`get_base_type`](#ida_typeinf.get_base_type)(→ type_t) | Get basic type bits (TYPE_BASE_MASK). | | [`get_type_flags`](#ida_typeinf.get_type_flags)(→ type_t) | Get type flags (TYPE_FLAGS_MASK). | | [`get_full_type`](#ida_typeinf.get_full_type)(→ type_t) | Get basic type bits + type flags (TYPE_FULL_MASK). | | [`is_typeid_last`](#ida_typeinf.is_typeid_last)(→ bool) | Is the type_t the last byte of type declaration? (there are no additional bytes after a basic type, see \_BT_LAST_BASIC) | | [`is_type_partial`](#ida_typeinf.is_type_partial)(→ bool) | Identifies an unknown or void type with a known size (see Basic type: unknown & void). | | [`is_type_void`](#ida_typeinf.is_type_void)(→ bool) | See BTF_VOID. | | [`is_type_unknown`](#ida_typeinf.is_type_unknown)(→ bool) | See BT_UNKNOWN. | | [`is_type_ptr`](#ida_typeinf.is_type_ptr)(→ bool) | See BT_PTR. | | [`is_type_complex`](#ida_typeinf.is_type_complex)(→ bool) | See BT_COMPLEX. | | [`is_type_func`](#ida_typeinf.is_type_func)(→ bool) | See BT_FUNC. | | [`is_type_array`](#ida_typeinf.is_type_array)(→ bool) | See BT_ARRAY. | | [`is_type_typedef`](#ida_typeinf.is_type_typedef)(→ bool) | See BTF_TYPEDEF. | | [`is_type_sue`](#ida_typeinf.is_type_sue)(→ bool) | Is the type a struct/union/enum? | | [`is_type_struct`](#ida_typeinf.is_type_struct)(→ bool) | See BTF_STRUCT. | | [`is_type_union`](#ida_typeinf.is_type_union)(→ bool) | See BTF_UNION. | | [`is_type_struni`](#ida_typeinf.is_type_struni)(→ bool) | Is the type a struct or union? | | [`is_type_enum`](#ida_typeinf.is_type_enum)(→ bool) | See BTF_ENUM. | | [`is_type_bitfld`](#ida_typeinf.is_type_bitfld)(→ bool) | See BT_BITFIELD. | | [`is_type_int`](#ida_typeinf.is_type_int)(→ bool) | Does the type_t specify one of the basic types in Basic type: integer ? | | [`is_type_int128`](#ida_typeinf.is_type_int128)(→ bool) | Does the type specify a 128-bit value? (signed or unsigned, see Basic type: integer ). | | [`is_type_int64`](#ida_typeinf.is_type_int64)(→ bool) | Does the type specify a 64-bit value? (signed or unsigned, see Basic type: integer ). | | [`is_type_int32`](#ida_typeinf.is_type_int32)(→ bool) | Does the type specify a 32-bit value? (signed or unsigned, see Basic type: integer ). | | [`is_type_int16`](#ida_typeinf.is_type_int16)(→ bool) | Does the type specify a 16-bit value? (signed or unsigned, see Basic type: integer ). | | [`is_type_char`](#ida_typeinf.is_type_char)(→ bool) | Does the type specify a char value? (signed or unsigned, see Basic type: integer ). | | [`is_type_paf`](#ida_typeinf.is_type_paf)(→ bool) | Is the type a pointer, array, or function type? | | [`is_type_ptr_or_array`](#ida_typeinf.is_type_ptr_or_array)(→ bool) | Is the type a pointer or array type? | | [`is_type_floating`](#ida_typeinf.is_type_floating)(→ bool) | Is the type a floating point type? | | [`is_type_integral`](#ida_typeinf.is_type_integral)(→ bool) | Is the type an integral type (char/short/int/long/bool)? | | [`is_type_ext_integral`](#ida_typeinf.is_type_ext_integral)(→ bool) | Is the type an extended integral type? (integral or enum). | | [`is_type_arithmetic`](#ida_typeinf.is_type_arithmetic)(→ bool) | Is the type an arithmetic type? (floating or integral). | | [`is_type_ext_arithmetic`](#ida_typeinf.is_type_ext_arithmetic)(→ bool) | Is the type an extended arithmetic type? (arithmetic or enum). | | [`is_type_uint`](#ida_typeinf.is_type_uint)(→ bool) | See BTF_UINT. | | [`is_type_uchar`](#ida_typeinf.is_type_uchar)(→ bool) | See BTF_UCHAR. | | [`is_type_uint16`](#ida_typeinf.is_type_uint16)(→ bool) | See BTF_UINT16. | | [`is_type_uint32`](#ida_typeinf.is_type_uint32)(→ bool) | See BTF_UINT32. | | [`is_type_uint64`](#ida_typeinf.is_type_uint64)(→ bool) | See BTF_UINT64. | | [`is_type_uint128`](#ida_typeinf.is_type_uint128)(→ bool) | See BTF_UINT128. | | [`is_type_ldouble`](#ida_typeinf.is_type_ldouble)(→ bool) | See BTF_LDOUBLE. | | [`is_type_double`](#ida_typeinf.is_type_double)(→ bool) | See BTF_DOUBLE. | | [`is_type_float`](#ida_typeinf.is_type_float)(→ bool) | See BTF_FLOAT. | | [`is_type_tbyte`](#ida_typeinf.is_type_tbyte)(→ bool) | See BTF_FLOAT. | | [`is_type_bool`](#ida_typeinf.is_type_bool)(→ bool) | See BTF_BOOL. | | [`is_tah_byte`](#ida_typeinf.is_tah_byte)(→ bool) | The TAH byte (type attribute header byte) denotes the start of type attributes. (see "tah-typeattrs" in the type bit definitions) | | [`is_sdacl_byte`](#ida_typeinf.is_sdacl_byte)(→ bool) | Identify an sdacl byte. The first sdacl byte has the following format: 11xx000x. The sdacl bytes are appended to udt fields. They indicate the start of type attributes (as the tah-bytes do). The sdacl bytes are used in the udt headers instead of the tah-byte. This is done for compatibility with old databases, they were already using sdacl bytes in udt headers and as udt field postfixes. (see "sdacl-typeattrs" in the type bit definitions) | | [`append_argloc`](#ida_typeinf.append_argloc)(→ bool) | Serialize argument location | | [`extract_argloc`](#ida_typeinf.extract_argloc)(→ bool) | Deserialize an argument location. Argument FORBID_STKOFF checks location type. It can be used, for example, to check the return location of a function that cannot return a value in the stack | | [`resolve_typedef`](#id111) | | | [`get_realtype`](#ida_typeinf.get_realtype)(→ type_t) | Get the resolved base type. | | [`is_restype_void`](#ida_typeinf.is_restype_void)(→ bool) | | | [`is_restype_enum`](#ida_typeinf.is_restype_enum)(→ bool) | | | [`is_restype_struni`](#ida_typeinf.is_restype_struni)(→ bool) | | | [`is_restype_struct`](#ida_typeinf.is_restype_struct)(→ bool) | | | [`get_scalar_bt`](#ida_typeinf.get_scalar_bt)(→ type_t) | | | [`new_til`](#ida_typeinf.new_til)(→ til_t \*) | Initialize a til. | | [`load_til`](#ida_typeinf.load_til)(→ str) | Load til from a file without adding it to the database list (see also add_til). Failure to load base tils are reported into 'errbuf'. They do not prevent loading of the main til. | | [`compact_til`](#ida_typeinf.compact_til)(→ bool) | Collect garbage in til. Must be called before storing the til. | | [`store_til`](#ida_typeinf.store_til)(→ bool) | Store til to a file. If the til contains garbage, it will be collected before storing the til. Your plugin should call compact_til() before calling store_til(). | | [`free_til`](#ida_typeinf.free_til)(→ None) | Free memory allocated by til. | | [`load_til_header`](#ida_typeinf.load_til_header)(→ str) | Get human-readable til description. | | [`is_code_far`](#ida_typeinf.is_code_far)(→ bool) | Does the given model specify far code? | | [`is_data_far`](#ida_typeinf.is_data_far)(→ bool) | Does the given model specify far data? | | [`verify_argloc`](#ida_typeinf.verify_argloc)(→ int) | Verify argloc_t. | | [`optimize_argloc`](#ida_typeinf.optimize_argloc)(→ bool) | Verify and optimize scattered argloc into simple form. All new arglocs must be processed by this function. | | [`print_argloc`](#ida_typeinf.print_argloc)(→ int) | Convert an argloc to human readable form. | | [`for_all_arglocs`](#ida_typeinf.for_all_arglocs)(→ int) | Compress larger argloc types and initiate the aloc visitor. | | [`for_all_const_arglocs`](#ida_typeinf.for_all_const_arglocs)(→ int) | See for_all_arglocs(). | | [`is_user_cc`](#ida_typeinf.is_user_cc)(→ bool) | Does the calling convention specify argument locations explicitly? | | [`is_vararg_cc`](#ida_typeinf.is_vararg_cc)(→ bool) | Does the calling convention use ellipsis? | | [`is_purging_cc`](#ida_typeinf.is_purging_cc)(→ bool) | Does the calling convention clean the stack arguments upon return? | | [`is_golang_cc`](#ida_typeinf.is_golang_cc)(→ bool) | GO language calling convention (return value in stack)? | | [`is_rust_cc`](#ida_typeinf.is_rust_cc)(→ bool) | Rust language calling convention? | | [`is_custom_callcnv`](#ida_typeinf.is_custom_callcnv)(→ bool) | Is custom calling convention? | | [`is_swift_cc`](#ida_typeinf.is_swift_cc)(→ bool) | Swift calling convention (arguments and return values in registers)? | | [`get_stkarg_area_info`](#ida_typeinf.get_stkarg_area_info)(→ bool) | Some calling conventions foresee special areas on the stack for call arguments. This structure lists their sizes. | | [`get_custom_callcnv`](#ida_typeinf.get_custom_callcnv)(→ custom_callcnv_t const \*) | Retrieve custom calling convention details. | | [`find_custom_callcnv`](#ida_typeinf.find_custom_callcnv)(→ callcnv_t) | Find a calling convention by its name | | [`get_custom_callcnvs`](#ida_typeinf.get_custom_callcnvs)(→ int) | Get all custom calling conventions | | [`get_comp`](#ida_typeinf.get_comp)(→ comp_t) | Get compiler bits. | | [`get_compiler_name`](#ida_typeinf.get_compiler_name)(→ str) | Get full compiler name. | | [`get_compiler_abbr`](#ida_typeinf.get_compiler_abbr)(→ str) | Get abbreviated compiler name. | | [`get_compilers`](#ida_typeinf.get_compilers)(→ None) | Get names of all built-in compilers. | | [`is_comp_unsure`](#ida_typeinf.is_comp_unsure)(→ comp_t) | See COMP_UNSURE. | | [`default_compiler`](#ida_typeinf.default_compiler)(→ comp_t) | Get compiler specified by inf.cc. | | [`is_gcc`](#ida_typeinf.is_gcc)(→ bool) | Is the target compiler COMP_GNU? | | [`is_gcc32`](#ida_typeinf.is_gcc32)(→ bool) | Is the target compiler 32 bit gcc? | | [`is_gcc64`](#ida_typeinf.is_gcc64)(→ bool) | Is the target compiler 64 bit gcc? | | [`gcc_layout`](#ida_typeinf.gcc_layout)(→ bool) | Should use the struct/union layout as done by gcc? | | [`set_compiler`](#ida_typeinf.set_compiler)(→ bool) | Change current compiler. | | [`set_compiler_id`](#ida_typeinf.set_compiler_id)(→ bool) | Set the compiler id (see Compiler IDs ). | | [`set_abi_name`](#ida_typeinf.set_abi_name)(→ bool) | Set abi name (see Compiler IDs ). | | [`get_abi_name`](#ida_typeinf.get_abi_name)(→ Union[str, None]) | Get the current ABI name. | | [`append_abi_opts`](#ida_typeinf.append_abi_opts)(→ bool) | Add/remove/check ABI option General form of full abi name: abiname-opt1-opt2-... or -opt1-opt2-... | | [`remove_abi_opts`](#ida_typeinf.remove_abi_opts)(→ bool) | | | [`set_compiler_string`](#ida_typeinf.set_compiler_string)(→ bool) | | | [`use_golang_cc`](#ida_typeinf.use_golang_cc)(→ bool) | is GOLANG calling convention used by default? | | [`switch_to_golang`](#ida_typeinf.switch_to_golang)(→ None) | switch to GOLANG calling convention (to be used as default CC) | | [`use_rust_cc`](#ida_typeinf.use_rust_cc)(→ bool) | is RUST calling convention used by default? | | [`switch_to_rust`](#ida_typeinf.switch_to_rust)(→ None) | switch to RUST calling convention (to be used as default CC) | | [`convert_pt_flags_to_hti`](#ida_typeinf.convert_pt_flags_to_hti)(→ int) | Convert Type parsing flags to Type formatting flags . Type parsing flags lesser than 0x10 don't have stable meaning and will be ignored (more on these flags can be seen in idc.idc) | | [`parse_decl`](#ida_typeinf.parse_decl)(→ Union[str, None]) | Parse ONE declaration. | | [`parse_decls`](#ida_typeinf.parse_decls)(→ int) | Parse many declarations and store them in a til. If there are any errors, they will be printed using 'printer'. This function uses default include path and predefined macros from the database settings. It always uses the HTI_DCL bit. | | [`print_type`](#ida_typeinf.print_type)(→ Union[str, None]) | Get the type declaration for the specified address. | | [`tinfo_errstr`](#ida_typeinf.tinfo_errstr)(→ str) | Helper function to convert an error code into a printable string. Additional arguments are handled using the functions from err.h | | [`del_named_type`](#ida_typeinf.del_named_type)(→ bool) | Delete information about a symbol. | | [`first_named_type`](#ida_typeinf.first_named_type)(→ str) | Enumerate types. | | [`next_named_type`](#ida_typeinf.next_named_type)(→ str) | Enumerate types. | | [`copy_named_type`](#ida_typeinf.copy_named_type)(→ int) | Copy a named type from one til to another. This function will copy the specified type and all dependent types from the source type library to the destination library. | | [`decorate_name`](#ida_typeinf.decorate_name)(→ Union[str, None]) | Decorate/undecorate a C symbol name. | | [`gen_decorate_name`](#ida_typeinf.gen_decorate_name)(→ Union[str, None]) | Generic function for decorate_name() (may be used in IDP modules). | | [`calc_c_cpp_name`](#ida_typeinf.calc_c_cpp_name)(→ Union[str, None]) | Get C or C++ form of the name. | | [`enable_numbered_types`](#ida_typeinf.enable_numbered_types)(→ bool) | Enable the use of numbered types in til. Currently it is impossible to disable numbered types once they are enabled | | [`alloc_type_ordinals`](#ida_typeinf.alloc_type_ordinals)(→ int) | Allocate a range of ordinal numbers for new types. | | [`alloc_type_ordinal`](#ida_typeinf.alloc_type_ordinal)(→ int) | alloc_type_ordinals(ti, 1) | | [`get_ordinal_limit`](#ida_typeinf.get_ordinal_limit)(→ int) | Get number of allocated ordinals + 1. If there are no allocated ordinals, return 0. To enumerate all ordinals, use: for ( uint32 i = 1; i < limit; ++i ) | | [`get_ordinal_count`](#ida_typeinf.get_ordinal_count)(→ int) | Get number of allocated ordinals. | | [`del_numbered_type`](#ida_typeinf.del_numbered_type)(→ bool) | Delete a numbered type. | | [`set_type_alias`](#ida_typeinf.set_type_alias)(→ bool) | Create a type alias. Redirects all references to source type to the destination type. This is equivalent to instantaneous replacement all references to srctype by dsttype. | | [`get_alias_target`](#ida_typeinf.get_alias_target)(→ int) | Find the final alias destination. If the ordinal has not been aliased, return the specified ordinal itself If failed, returns 0. | | [`get_type_ordinal`](#ida_typeinf.get_type_ordinal)(→ int) | Get type ordinal by its name. | | [`get_numbered_type_name`](#ida_typeinf.get_numbered_type_name)(→ str) | Get type name (if exists) by its ordinal. If the type is anonymous, returns "". If failed, returns nullptr | | [`create_numbered_type_name`](#ida_typeinf.create_numbered_type_name)(→ Union[str, None]) | Create anonymous name for a numbered type. | | [`is_ordinal_name`](#ida_typeinf.is_ordinal_name)(→ bool) | Check if the name is an ordinal name. Ordinal names have the following format: '#' + set_de(ord) | | [`is_type_choosable`](#ida_typeinf.is_type_choosable)(→ bool) | Check if a struct/union type is choosable | | [`set_type_choosable`](#ida_typeinf.set_type_choosable)(→ None) | Enable/disable 'choosability' flag for a struct/union type | | [`get_vftable_ea`](#ida_typeinf.get_vftable_ea)(→ ida_idaapi.ea_t) | Get address of a virtual function table. | | [`get_vftable_ordinal`](#ida_typeinf.get_vftable_ordinal)(→ int) | Get ordinal number of the virtual function table. | | [`set_vftable_ea`](#ida_typeinf.set_vftable_ea)(→ bool) | Set the address of a vftable instance for a vftable type. | | [`del_vftable_ea`](#ida_typeinf.del_vftable_ea)(→ bool) | Delete the address of a vftable instance for a vftable type. | | [`deref_ptr`](#ida_typeinf.deref_ptr)(→ bool) | Dereference a pointer. | | [`add_til`](#ida_typeinf.add_til)(→ int) | Load a til file and add it the database type libraries list. IDA will also apply function prototypes for matching function names. | | [`del_til`](#ida_typeinf.del_til)(→ bool) | Unload a til file. | | [`apply_named_type`](#ida_typeinf.apply_named_type)(→ bool) | Apply the specified named type to the address. | | [`apply_tinfo`](#ida_typeinf.apply_tinfo)(→ bool) | Apply the specified type to the specified address. This function sets the type and tries to convert the item at the specified address to conform the type. | | [`apply_cdecl`](#ida_typeinf.apply_cdecl)(→ bool) | Apply the specified type to the address. This function parses the declaration and calls apply_tinfo() | | [`apply_callee_tinfo`](#ida_typeinf.apply_callee_tinfo)(→ bool) | Apply the type of the called function to the calling instruction. This function will append parameter comments and rename the local variables of the calling function. It also stores information about the instructions that initialize call arguments in the database. Use get_arg_addrs() to retrieve it if necessary. Alternatively it is possible to hook to processor_t::arg_addrs_ready event. | | [`apply_once_tinfo_and_name`](#ida_typeinf.apply_once_tinfo_and_name)(→ bool) | Apply the specified type and name to the address. This function checks if the address already has a type. If the old type | | [`guess_tinfo`](#ida_typeinf.guess_tinfo)(→ int) | Generate a type information about the id from the disassembly. id can be a structure/union/enum id or an address. | | [`set_c_header_path`](#ida_typeinf.set_c_header_path)(→ None) | Set include directory path the target compiler. | | [`get_c_header_path`](#ida_typeinf.get_c_header_path)(→ Union[str, None]) | Get the include directory path of the target compiler. | | [`set_c_macros`](#ida_typeinf.set_c_macros)(→ None) | Set predefined macros for the target compiler. | | [`get_c_macros`](#ida_typeinf.get_c_macros)(→ Union[str, None]) | Get predefined macros for the target compiler. | | [`get_idati`](#ida_typeinf.get_idati)(→ til_t \*) | Pointer to the local type library - this til is private for each IDB file Functions that accept til_t\* default to idati when is nullptr provided. | | [`get_idainfo_by_type`](#ida_typeinf.get_idainfo_by_type)(→ size_t \*, flags64_t \*, ...) | Extract information from a tinfo_t. | | [`get_tinfo_by_flags`](#ida_typeinf.get_tinfo_by_flags)(→ bool) | Get tinfo object that corresponds to data flags | | [`copy_tinfo_t`](#ida_typeinf.copy_tinfo_t)(→ None) | | | [`detach_tinfo_t`](#ida_typeinf.detach_tinfo_t)(→ bool) | | | [`clear_tinfo_t`](#ida_typeinf.clear_tinfo_t)(→ None) | | | [`create_tinfo`](#ida_typeinf.create_tinfo)(→ bool) | | | [`verify_tinfo`](#ida_typeinf.verify_tinfo)(→ int) | | | [`get_tinfo_details`](#ida_typeinf.get_tinfo_details)(→ bool) | | | [`get_tinfo_size`](#ida_typeinf.get_tinfo_size)(→ int) | | | [`get_tinfo_pdata`](#ida_typeinf.get_tinfo_pdata)(→ int) | | | [`get_tinfo_property`](#ida_typeinf.get_tinfo_property)(→ int) | | | [`get_tinfo_property4`](#ida_typeinf.get_tinfo_property4)(→ int) | | | [`set_tinfo_property`](#ida_typeinf.set_tinfo_property)(→ int) | | | [`set_tinfo_property4`](#ida_typeinf.set_tinfo_property4)(→ int) | | | [`serialize_tinfo`](#ida_typeinf.serialize_tinfo)(→ bool) | | | [`find_tinfo_udt_member`](#ida_typeinf.find_tinfo_udt_member)(→ int) | | | [`print_tinfo`](#ida_typeinf.print_tinfo)(→ Union[str, None]) | | | [`dstr_tinfo`](#ida_typeinf.dstr_tinfo)(→ str) | | | [`visit_subtypes`](#ida_typeinf.visit_subtypes)(→ int) | | | [`compare_tinfo`](#ida_typeinf.compare_tinfo)(→ bool) | | | [`lexcompare_tinfo`](#ida_typeinf.lexcompare_tinfo)(→ int) | | | [`get_stock_tinfo`](#ida_typeinf.get_stock_tinfo)(→ bool) | | | [`read_tinfo_bitfield_value`](#ida_typeinf.read_tinfo_bitfield_value)(→ uint64) | | | [`write_tinfo_bitfield_value`](#ida_typeinf.write_tinfo_bitfield_value)(→ uint64) | | | [`get_tinfo_attr`](#ida_typeinf.get_tinfo_attr)(→ bool) | | | [`set_tinfo_attr`](#ida_typeinf.set_tinfo_attr)(→ bool) | | | [`del_tinfo_attr`](#ida_typeinf.del_tinfo_attr)(→ bool) | | | [`get_tinfo_attrs`](#ida_typeinf.get_tinfo_attrs)(→ bool) | | | [`set_tinfo_attrs`](#ida_typeinf.set_tinfo_attrs)(→ bool) | | | [`score_tinfo`](#ida_typeinf.score_tinfo)(→ int) | | | [`save_tinfo`](#ida_typeinf.save_tinfo)(→ tinfo_code_t) | | | [`append_tinfo_covered`](#ida_typeinf.append_tinfo_covered)(→ bool) | | | [`calc_tinfo_gaps`](#ida_typeinf.calc_tinfo_gaps)(→ bool) | | | [`value_repr_t__from_opinfo`](#ida_typeinf.value_repr_t__from_opinfo)(→ bool) | | | [`value_repr_t__print_`](#ida_typeinf.value_repr_t__print_)(→ Union[str, None]) | | | [`udt_type_data_t__find_member`](#ida_typeinf.udt_type_data_t__find_member)(→ ssize_t) | | | [`udt_type_data_t__get_best_fit_member`](#ida_typeinf.udt_type_data_t__get_best_fit_member)(→ ssize_t) | | | [`udt_type_data_t__deduplicate_members`](#ida_typeinf.udt_type_data_t__deduplicate_members)(→ bool) | | | [`get_tinfo_by_edm_name`](#ida_typeinf.get_tinfo_by_edm_name)(→ ssize_t) | | | [`remove_pointer`](#ida_typeinf.remove_pointer)(→ tinfo_t) | BT_PTR: If the current type is a pointer, return the pointed object. If the current type is not a pointer, return the current type. See also get_ptrarr_object() and get_pointed_object() | | [`guess_func_cc`](#ida_typeinf.guess_func_cc)(→ callcnv_t) | Use func_type_data_t::guess_cc(). | | [`dump_func_type_data`](#ida_typeinf.dump_func_type_data)(→ Union[str, None]) | Use func_type_data_t::dump(). | | [`calc_arglocs`](#ida_typeinf.calc_arglocs)(→ bool) | | | [`calc_varglocs`](#ida_typeinf.calc_varglocs)(→ bool) | | | [`stroff_as_size`](#ida_typeinf.stroff_as_size)(→ bool) | Should display a structure offset expression as the structure size? | | [`visit_stroff_udms`](#ida_typeinf.visit_stroff_udms)(→ adiff_t \*) | Visit structure fields in a stroff expression or in a reference to a struct data variable. This function can be used to enumerate all components of an expression like 'a.b.c'. | | [`is_one_bit_mask`](#ida_typeinf.is_one_bit_mask)(→ bool) | Is bitmask one bit? | | [`inf_pack_stkargs`](#ida_typeinf.inf_pack_stkargs)(→ bool) | | | [`inf_big_arg_align`](#ida_typeinf.inf_big_arg_align)(→ bool) | | | [`inf_huge_arg_align`](#ida_typeinf.inf_huge_arg_align)(→ bool) | | | [`unpack_idcobj_from_idb`](#ida_typeinf.unpack_idcobj_from_idb)(→ error_t) | Collection of register objects. | | [`unpack_idcobj_from_bv`](#ida_typeinf.unpack_idcobj_from_bv)(→ error_t) | Read a typed idc object from the byte vector. | | [`pack_idcobj_to_idb`](#ida_typeinf.pack_idcobj_to_idb)(→ error_t) | Write a typed idc object to the database. | | [`pack_idcobj_to_bv`](#ida_typeinf.pack_idcobj_to_bv)(→ error_t) | Write a typed idc object to the byte vector. Byte vector may be non-empty, this function will append data to it | | [`apply_tinfo_to_stkarg`](#ida_typeinf.apply_tinfo_to_stkarg)(→ bool) | Helper function for the processor modules. to be called from processor_t::use_stkarg_type | | [`gen_use_arg_tinfos`](#ida_typeinf.gen_use_arg_tinfos)(→ None) | Do not call this function directly, use argtinfo_helper_t. | | [`func_has_stkframe_hole`](#ida_typeinf.func_has_stkframe_hole)(→ bool) | Looks for a hole at the beginning of the stack arguments. Will make use of the IDB's func_t function at that place (if present) to help determine the presence of such a hole. | | [`lower_type`](#ida_typeinf.lower_type)(→ int) | Lower type. Inspect the type and lower all function subtypes using lower_func_type(). | | [`replace_ordinal_typerefs`](#ida_typeinf.replace_ordinal_typerefs)(→ int) | Replace references to ordinal types by name references. This function 'unties' the type from the current local type library and makes it easier to export it. | | [`begin_type_updating`](#ida_typeinf.begin_type_updating)(→ None) | Mark the beginning of a large update operation on the types. Can be used with add_enum_member(), add_struc_member, etc... Also see end_type_updating() | | [`end_type_updating`](#ida_typeinf.end_type_updating)(→ None) | Mark the end of a large update operation on the types (see begin_type_updating()). | | [`resolve_field_path`](#ida_typeinf.resolve_field_path)(→ bool) | Resolve a dotted field path like "Top.Field1.Field2.Leaf". | | [`get_named_type_tid`](#ida_typeinf.get_named_type_tid)(→ tid_t) | Get named local type TID | | [`get_tid_name`](#ida_typeinf.get_tid_name)(→ Union[str, None]) | Get a type name for the specified TID | | [`get_tid_ordinal`](#ida_typeinf.get_tid_ordinal)(→ int) | Get type ordinal number for TID | | [`get_udm_by_fullname`](#ida_typeinf.get_udm_by_fullname)(→ ssize_t) | Get udt member by full name | | [`get_idainfo_by_udm`](#ida_typeinf.get_idainfo_by_udm)(→ bool) | Calculate IDA info from udt member | | [`create_enum_type`](#ida_typeinf.create_enum_type)(→ tid_t) | Create type enum | | [`calc_number_of_children`](#ida_typeinf.calc_number_of_children)(→ int) | Calculate max number of lines of a formatted c data, when expanded (PTV_EXPAND). | | [`get_enum_member_expr`](#ida_typeinf.get_enum_member_expr)(→ Union[str, None]) | Return a C expression that can be used to represent an enum member. If the value does not correspond to any single enum member, this function tries to find a bitwise combination of enum members that correspond to it. If more than half of value bits do not match any enum members, it fails. | | [`choose_named_type`](#ida_typeinf.choose_named_type)(→ bool) | Choose a type from a type library. | | [`calc_retloc`](#ida_typeinf.calc_retloc)(→ bool) | This function has the following signatures: | | [`choose_local_tinfo`](#ida_typeinf.choose_local_tinfo)(→ int) | | | [`choose_local_tinfo_and_delta`](#ida_typeinf.choose_local_tinfo_and_delta)(→ int) | | | [`register_custom_callcnv`](#ida_typeinf.register_custom_callcnv)(→ custom_callcnv_t \*) | Register a calling convention | | [`unregister_custom_callcnv`](#ida_typeinf.unregister_custom_callcnv)(→ custom_callcnv_t \*) | Unregister a calling convention | | [`idc_parse_decl`](#ida_typeinf.idc_parse_decl)(→ Union[Tuple[str, bytes, bytes], None]) | | | [`calc_type_size`](#ida_typeinf.calc_type_size)(til, type) | Returns the size of a type | | [`apply_type`](#ida_typeinf.apply_type)(→ bool) | Apply the specified type to the address | | [`get_arg_addrs`](#ida_typeinf.get_arg_addrs)(caller) | Retrieve addresses of argument initialization instructions | | [`unpack_object_from_idb`](#ida_typeinf.unpack_object_from_idb)(til, type, fields, ea[, pio_flags]) | Unpacks from the database at 'ea' to an object. | | [`unpack_object_from_bv`](#ida_typeinf.unpack_object_from_bv)(til, type, fields, bytes[, ...]) | Unpacks a buffer into an object. | | [`pack_object_to_idb`](#ida_typeinf.pack_object_to_idb)(obj, til, type, fields, ea[, pio_flags]) | Write a typed object to the database. | | [`pack_object_to_bv`](#ida_typeinf.pack_object_to_bv)(obj, til, type, fields, base_ea[, ...]) | Packs a typed object to a string | | [`idc_parse_types`](#ida_typeinf.idc_parse_types)(→ int) | | | [`idc_get_type_raw`](#ida_typeinf.idc_get_type_raw)(→ PyObject \*) | | | [`idc_get_local_type_raw`](#ida_typeinf.idc_get_local_type_raw)(→ Union[Tuple[bytes, bytes], None]) | | | [`idc_guess_type`](#ida_typeinf.idc_guess_type)(→ Union[str, None]) | | | [`idc_get_type`](#ida_typeinf.idc_get_type)(→ Union[str, None]) | | | [`idc_set_local_type`](#ida_typeinf.idc_set_local_type)(→ int) | | | [`idc_get_local_type`](#ida_typeinf.idc_get_local_type)(→ Union[str, None]) | | | [`idc_print_type`](#ida_typeinf.idc_print_type)(→ Union[str, None]) | | | [`idc_get_local_type_name`](#ida_typeinf.idc_get_local_type_name)(→ Union[str, None]) | | | [`get_named_type`](#ida_typeinf.get_named_type)(til, name, ntf_flags) | Get a type data by its name. | | [`get_named_type64`](#ida_typeinf.get_named_type64)(→ Union[Tuple[int, bytes, bytes, str, ...) | Get a named type from a type library. | | [`print_decls`](#ida_typeinf.print_decls)(→ int) | Print types (and possibly their dependencies) in a format suitable for using in | | [`remove_tinfo_pointer`](#ida_typeinf.remove_tinfo_pointer)(→ Tuple[bool, str]) | Remove pointer of a type. (i.e. convert "char

```
*
```

" into "char"). Optionally remove | | [`get_numbered_type`](#ida_typeinf.get_numbered_type)(→ Union[Tuple[bytes, bytes, str, ...) | Get a type from a type library, by its ordinal | | [`set_numbered_type`](#ida_typeinf.set_numbered_type)(→ tinfo_code_t) | | ## Module Contents ### ida_typeinf.DEFMASK64 default bitmask 64bits ### ida_typeinf.deserialize_tinfo(tif: tinfo_t, til: til_t, ptype: type_t const \*\*, pfields: p_list const \*\*, pfldcmts: p_list const \*\*, cmt: str = None) → [bool](https://docs.python.org/3/library/functions.html#bool) ### *class* ida_typeinf.funcargvec_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### push_back(\*args) → funcarg_t & #### pop_back() → [None](https://docs.python.org/3/library/constants.html#None) #### size() → [int](https://docs.python.org/3/library/functions.html#int) #### empty() → [bool](https://docs.python.org/3/library/functions.html#bool) #### at(\_idx: [int](https://docs.python.org/3/library/functions.html#int)) → funcarg_t const & #### qclear() → [None](https://docs.python.org/3/library/constants.html#None) #### clear() → [None](https://docs.python.org/3/library/constants.html#None) #### resize(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### grow(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### capacity() → [int](https://docs.python.org/3/library/functions.html#int) #### reserve(cnt: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### truncate() → [None](https://docs.python.org/3/library/constants.html#None) #### swap(r: [funcargvec_t](#ida_typeinf.funcargvec_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extract() → funcarg_t \* #### inject(s: [funcarg_t](#ida_typeinf.funcarg_t), len: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### begin(\*args) → qvector< funcarg_t >::const_iterator #### end(\*args) → qvector< funcarg_t >::const_iterator #### insert(it: [funcarg_t](#ida_typeinf.funcarg_t), x: [funcarg_t](#ida_typeinf.funcarg_t)) → qvector< funcarg_t >::iterator #### erase(\*args) → qvector< funcarg_t >::iterator #### find(\*args) → qvector< funcarg_t >::const_iterator #### has(x: [funcarg_t](#ida_typeinf.funcarg_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### add_unique(x: [funcarg_t](#ida_typeinf.funcarg_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### append(x: [funcarg_t](#ida_typeinf.funcarg_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extend(x: [funcargvec_t](#ida_typeinf.funcargvec_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### front #### back ### *class* ida_typeinf.reginfovec_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### push_back(\*args) → reg_info_t & #### pop_back() → [None](https://docs.python.org/3/library/constants.html#None) #### size() → [int](https://docs.python.org/3/library/functions.html#int) #### empty() → [bool](https://docs.python.org/3/library/functions.html#bool) #### at(\_idx: [int](https://docs.python.org/3/library/functions.html#int)) → reg_info_t const & #### qclear() → [None](https://docs.python.org/3/library/constants.html#None) #### clear() → [None](https://docs.python.org/3/library/constants.html#None) #### resize(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### grow(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### capacity() → [int](https://docs.python.org/3/library/functions.html#int) #### reserve(cnt: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### truncate() → [None](https://docs.python.org/3/library/constants.html#None) #### swap(r: [reginfovec_t](#ida_typeinf.reginfovec_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extract() → reg_info_t \* #### inject(s: [reg_info_t](../ida_idp/index.md#ida_idp.reg_info_t), len: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### begin(\*args) → qvector< reg_info_t >::const_iterator #### end(\*args) → qvector< reg_info_t >::const_iterator #### insert(it: [reg_info_t](../ida_idp/index.md#ida_idp.reg_info_t), x: [reg_info_t](../ida_idp/index.md#ida_idp.reg_info_t)) → qvector< reg_info_t >::iterator #### erase(\*args) → qvector< reg_info_t >::iterator #### find(\*args) → qvector< reg_info_t >::const_iterator #### has(x: [reg_info_t](../ida_idp/index.md#ida_idp.reg_info_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### add_unique(x: [reg_info_t](../ida_idp/index.md#ida_idp.reg_info_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### append(x: [reg_info_t](../ida_idp/index.md#ida_idp.reg_info_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extend(x: [reginfovec_t](#ida_typeinf.reginfovec_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### front #### back ### *class* ida_typeinf.edmvec_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### push_back(\*args) → edm_t & #### pop_back() → [None](https://docs.python.org/3/library/constants.html#None) #### size() → [int](https://docs.python.org/3/library/functions.html#int) #### empty() → [bool](https://docs.python.org/3/library/functions.html#bool) #### at(\_idx: [int](https://docs.python.org/3/library/functions.html#int)) → edm_t const & #### qclear() → [None](https://docs.python.org/3/library/constants.html#None) #### clear() → [None](https://docs.python.org/3/library/constants.html#None) #### resize(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### grow(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### capacity() → [int](https://docs.python.org/3/library/functions.html#int) #### reserve(cnt: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### truncate() → [None](https://docs.python.org/3/library/constants.html#None) #### swap(r: [edmvec_t](#ida_typeinf.edmvec_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extract() → edm_t \* #### inject(s: [edm_t](#ida_typeinf.edm_t), len: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### begin(\*args) → qvector< edm_t >::const_iterator #### end(\*args) → qvector< edm_t >::const_iterator #### insert(it: [edm_t](#ida_typeinf.edm_t), x: [edm_t](#ida_typeinf.edm_t)) → qvector< edm_t >::iterator #### erase(\*args) → qvector< edm_t >::iterator #### find(\*args) → qvector< edm_t >::const_iterator #### has(x: [edm_t](#ida_typeinf.edm_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### add_unique(x: [edm_t](#ida_typeinf.edm_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### append(x: [edm_t](#ida_typeinf.edm_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extend(x: [edmvec_t](#ida_typeinf.edmvec_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### front #### back ### *class* ida_typeinf.argpartvec_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### push_back(\*args) → argpart_t & #### pop_back() → [None](https://docs.python.org/3/library/constants.html#None) #### size() → [int](https://docs.python.org/3/library/functions.html#int) #### empty() → [bool](https://docs.python.org/3/library/functions.html#bool) #### at(\_idx: [int](https://docs.python.org/3/library/functions.html#int)) → argpart_t const & #### qclear() → [None](https://docs.python.org/3/library/constants.html#None) #### clear() → [None](https://docs.python.org/3/library/constants.html#None) #### resize(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### grow(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### capacity() → [int](https://docs.python.org/3/library/functions.html#int) #### reserve(cnt: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### truncate() → [None](https://docs.python.org/3/library/constants.html#None) #### swap(r: [argpartvec_t](#ida_typeinf.argpartvec_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extract() → argpart_t \* #### inject(s: [argpart_t](#ida_typeinf.argpart_t), len: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### begin(\*args) → qvector< argpart_t >::const_iterator #### end(\*args) → qvector< argpart_t >::const_iterator #### insert(it: [argpart_t](#ida_typeinf.argpart_t), x: [argpart_t](#ida_typeinf.argpart_t)) → qvector< argpart_t >::iterator #### erase(\*args) → qvector< argpart_t >::iterator #### find(\*args) → qvector< argpart_t >::const_iterator #### has(x: [argpart_t](#ida_typeinf.argpart_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### add_unique(x: [argpart_t](#ida_typeinf.argpart_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### append(x: [argpart_t](#ida_typeinf.argpart_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extend(x: [argpartvec_t](#ida_typeinf.argpartvec_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### front #### back ### *class* ida_typeinf.valstrvec_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### push_back(\*args) → valstr_t & #### pop_back() → [None](https://docs.python.org/3/library/constants.html#None) #### size() → [int](https://docs.python.org/3/library/functions.html#int) #### empty() → [bool](https://docs.python.org/3/library/functions.html#bool) #### at(\_idx: [int](https://docs.python.org/3/library/functions.html#int)) → valstr_t const & #### qclear() → [None](https://docs.python.org/3/library/constants.html#None) #### clear() → [None](https://docs.python.org/3/library/constants.html#None) #### resize(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### grow(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### capacity() → [int](https://docs.python.org/3/library/functions.html#int) #### reserve(cnt: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### truncate() → [None](https://docs.python.org/3/library/constants.html#None) #### swap(r: [valstrvec_t](#ida_typeinf.valstrvec_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extract() → valstr_t \* #### inject(s: [valstr_t](#ida_typeinf.valstr_t), len: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### begin(\*args) → qvector< valstr_t >::const_iterator #### end(\*args) → qvector< valstr_t >::const_iterator #### insert(it: [valstr_t](#ida_typeinf.valstr_t), x: [valstr_t](#ida_typeinf.valstr_t)) → qvector< valstr_t >::iterator #### erase(\*args) → qvector< valstr_t >::iterator #### append(x: [valstr_t](#ida_typeinf.valstr_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extend(x: [valstrvec_t](#ida_typeinf.valstrvec_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### front #### back ### *class* ida_typeinf.regobjvec_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### push_back(\*args) → regobj_t & #### pop_back() → [None](https://docs.python.org/3/library/constants.html#None) #### size() → [int](https://docs.python.org/3/library/functions.html#int) #### empty() → [bool](https://docs.python.org/3/library/functions.html#bool) #### at(\_idx: [int](https://docs.python.org/3/library/functions.html#int)) → regobj_t const & #### qclear() → [None](https://docs.python.org/3/library/constants.html#None) #### clear() → [None](https://docs.python.org/3/library/constants.html#None) #### resize(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### grow(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### capacity() → [int](https://docs.python.org/3/library/functions.html#int) #### reserve(cnt: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### truncate() → [None](https://docs.python.org/3/library/constants.html#None) #### swap(r: [regobjvec_t](#ida_typeinf.regobjvec_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extract() → regobj_t \* #### inject(s: [regobj_t](#ida_typeinf.regobj_t), len: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### begin(\*args) → qvector< regobj_t >::const_iterator #### end(\*args) → qvector< regobj_t >::const_iterator #### insert(it: [regobj_t](#ida_typeinf.regobj_t), x: [regobj_t](#ida_typeinf.regobj_t)) → qvector< regobj_t >::iterator #### erase(\*args) → qvector< regobj_t >::iterator #### append(x: [regobj_t](#ida_typeinf.regobj_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extend(x: [regobjvec_t](#ida_typeinf.regobjvec_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### front #### back ### *class* ida_typeinf.type_attrs_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### push_back(\*args) → type_attr_t & #### pop_back() → [None](https://docs.python.org/3/library/constants.html#None) #### size() → [int](https://docs.python.org/3/library/functions.html#int) #### empty() → [bool](https://docs.python.org/3/library/functions.html#bool) #### at(\_idx: [int](https://docs.python.org/3/library/functions.html#int)) → type_attr_t const & #### qclear() → [None](https://docs.python.org/3/library/constants.html#None) #### clear() → [None](https://docs.python.org/3/library/constants.html#None) #### resize(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### grow(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### capacity() → [int](https://docs.python.org/3/library/functions.html#int) #### reserve(cnt: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### truncate() → [None](https://docs.python.org/3/library/constants.html#None) #### swap(r: [type_attrs_t](#ida_typeinf.type_attrs_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extract() → type_attr_t \* #### inject(s: [type_attr_t](#ida_typeinf.type_attr_t), len: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### begin(\*args) → qvector< type_attr_t >::const_iterator #### end(\*args) → qvector< type_attr_t >::const_iterator #### insert(it: [type_attr_t](#ida_typeinf.type_attr_t), x: [type_attr_t](#ida_typeinf.type_attr_t)) → qvector< type_attr_t >::iterator #### erase(\*args) → qvector< type_attr_t >::iterator #### append(x: [type_attr_t](#ida_typeinf.type_attr_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extend(x: [type_attrs_t](#ida_typeinf.type_attrs_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### front #### back ### *class* ida_typeinf.udtmembervec_template_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### push_back(\*args) → udm_t & #### pop_back() → [None](https://docs.python.org/3/library/constants.html#None) #### size() → [int](https://docs.python.org/3/library/functions.html#int) #### empty() → [bool](https://docs.python.org/3/library/functions.html#bool) #### at(\_idx: [int](https://docs.python.org/3/library/functions.html#int)) → udm_t const & #### qclear() → [None](https://docs.python.org/3/library/constants.html#None) #### clear() → [None](https://docs.python.org/3/library/constants.html#None) #### resize(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### grow(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### capacity() → [int](https://docs.python.org/3/library/functions.html#int) #### reserve(cnt: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### truncate() → [None](https://docs.python.org/3/library/constants.html#None) #### swap(r: [udtmembervec_template_t](#ida_typeinf.udtmembervec_template_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extract() → udm_t \* #### inject(s: [udm_t](#ida_typeinf.udm_t), len: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### begin(\*args) → qvector< udm_t >::const_iterator #### end(\*args) → qvector< udm_t >::const_iterator #### insert(it: [udm_t](#ida_typeinf.udm_t), x: [udm_t](#ida_typeinf.udm_t)) → qvector< udm_t >::iterator #### erase(\*args) → qvector< udm_t >::iterator #### find(\*args) → qvector< udm_t >::const_iterator #### has(x: [udm_t](#ida_typeinf.udm_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### add_unique(x: [udm_t](#ida_typeinf.udm_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### append(x: [udm_t](#ida_typeinf.udm_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extend(x: [udtmembervec_template_t](#ida_typeinf.udtmembervec_template_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### front #### back ### *class* ida_typeinf.qvector_simd_info_vec_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### push_back(\*args) → simd_info_t & #### pop_back() → [None](https://docs.python.org/3/library/constants.html#None) #### size() → [int](https://docs.python.org/3/library/functions.html#int) #### empty() → [bool](https://docs.python.org/3/library/functions.html#bool) #### at(\_idx: [int](https://docs.python.org/3/library/functions.html#int)) → simd_info_t const & #### qclear() → [None](https://docs.python.org/3/library/constants.html#None) #### clear() → [None](https://docs.python.org/3/library/constants.html#None) #### resize(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### grow(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### capacity() → [int](https://docs.python.org/3/library/functions.html#int) #### reserve(cnt: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### truncate() → [None](https://docs.python.org/3/library/constants.html#None) #### swap(r: [qvector_simd_info_vec_t](#ida_typeinf.qvector_simd_info_vec_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extract() → simd_info_t \* #### inject(s: [simd_info_t](#ida_typeinf.simd_info_t), len: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### begin(\*args) → qvector< simd_info_t >::const_iterator #### end(\*args) → qvector< simd_info_t >::const_iterator #### insert(it: [simd_info_t](#ida_typeinf.simd_info_t), x: [simd_info_t](#ida_typeinf.simd_info_t)) → qvector< simd_info_t >::iterator #### erase(\*args) → qvector< simd_info_t >::iterator #### find(\*args) → qvector< simd_info_t >::const_iterator #### has(x: [simd_info_t](#ida_typeinf.simd_info_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### add_unique(x: [simd_info_t](#ida_typeinf.simd_info_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### append(x: [simd_info_t](#ida_typeinf.simd_info_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extend(x: [qvector_simd_info_vec_t](#ida_typeinf.qvector_simd_info_vec_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### front #### back ### ida_typeinf.RESERVED_BYTE multifunctional purpose ### ida_typeinf.is_type_const(t: type_t) → [bool](https://docs.python.org/3/library/functions.html#bool) See BTM_CONST. ### ida_typeinf.is_type_volatile(t: type_t) → [bool](https://docs.python.org/3/library/functions.html#bool) See BTM_VOLATILE. ### ida_typeinf.get_base_type(t: type_t) → type_t Get basic type bits (TYPE_BASE_MASK). ### ida_typeinf.get_type_flags(t: type_t) → type_t Get type flags (TYPE_FLAGS_MASK). ### ida_typeinf.get_full_type(t: type_t) → type_t Get basic type bits + type flags (TYPE_FULL_MASK). ### ida_typeinf.is_typeid_last(t: type_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Is the type_t the last byte of type declaration? (there are no additional bytes after a basic type, see \_BT_LAST_BASIC) ### ida_typeinf.is_type_partial(t: type_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Identifies an unknown or void type with a known size (see Basic type: unknown & void). ### ida_typeinf.is_type_void(t: type_t) → [bool](https://docs.python.org/3/library/functions.html#bool) See BTF_VOID. ### ida_typeinf.is_type_unknown(t: type_t) → [bool](https://docs.python.org/3/library/functions.html#bool) See BT_UNKNOWN. ### ida_typeinf.is_type_ptr(t: type_t) → [bool](https://docs.python.org/3/library/functions.html#bool) See BT_PTR. ### ida_typeinf.is_type_complex(t: type_t) → [bool](https://docs.python.org/3/library/functions.html#bool) See BT_COMPLEX. ### ida_typeinf.is_type_func(t: type_t) → [bool](https://docs.python.org/3/library/functions.html#bool) See BT_FUNC. ### ida_typeinf.is_type_array(t: type_t) → [bool](https://docs.python.org/3/library/functions.html#bool) See BT_ARRAY. ### ida_typeinf.is_type_typedef(t: type_t) → [bool](https://docs.python.org/3/library/functions.html#bool) See BTF_TYPEDEF. ### ida_typeinf.is_type_sue(t: type_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Is the type a struct/union/enum? ### ida_typeinf.is_type_struct(t: type_t) → [bool](https://docs.python.org/3/library/functions.html#bool) See BTF_STRUCT. ### ida_typeinf.is_type_union(t: type_t) → [bool](https://docs.python.org/3/library/functions.html#bool) See BTF_UNION. ### ida_typeinf.is_type_struni(t: type_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Is the type a struct or union? ### ida_typeinf.is_type_enum(t: type_t) → [bool](https://docs.python.org/3/library/functions.html#bool) See BTF_ENUM. ### ida_typeinf.is_type_bitfld(t: type_t) → [bool](https://docs.python.org/3/library/functions.html#bool) See BT_BITFIELD. ### ida_typeinf.is_type_int(bt: type_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Does the type_t specify one of the basic types in Basic type: integer ? ### ida_typeinf.is_type_int128(t: type_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Does the type specify a 128-bit value? (signed or unsigned, see Basic type: integer ). ### ida_typeinf.is_type_int64(t: type_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Does the type specify a 64-bit value? (signed or unsigned, see Basic type: integer ). ### ida_typeinf.is_type_int32(t: type_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Does the type specify a 32-bit value? (signed or unsigned, see Basic type: integer ). ### ida_typeinf.is_type_int16(t: type_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Does the type specify a 16-bit value? (signed or unsigned, see Basic type: integer ). ### ida_typeinf.is_type_char(t: type_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Does the type specify a char value? (signed or unsigned, see Basic type: integer ). ### ida_typeinf.is_type_paf(t: type_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Is the type a pointer, array, or function type? ### ida_typeinf.is_type_ptr_or_array(t: type_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Is the type a pointer or array type? ### ida_typeinf.is_type_floating(t: type_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Is the type a floating point type? ### ida_typeinf.is_type_integral(t: type_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Is the type an integral type (char/short/int/long/bool)? ### ida_typeinf.is_type_ext_integral(t: type_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Is the type an extended integral type? (integral or enum). ### ida_typeinf.is_type_arithmetic(t: type_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Is the type an arithmetic type? (floating or integral). ### ida_typeinf.is_type_ext_arithmetic(t: type_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Is the type an extended arithmetic type? (arithmetic or enum). ### ida_typeinf.is_type_uint(t: type_t) → [bool](https://docs.python.org/3/library/functions.html#bool) See BTF_UINT. ### ida_typeinf.is_type_uchar(t: type_t) → [bool](https://docs.python.org/3/library/functions.html#bool) See BTF_UCHAR. ### ida_typeinf.is_type_uint16(t: type_t) → [bool](https://docs.python.org/3/library/functions.html#bool) See BTF_UINT16. ### ida_typeinf.is_type_uint32(t: type_t) → [bool](https://docs.python.org/3/library/functions.html#bool) See BTF_UINT32. ### ida_typeinf.is_type_uint64(t: type_t) → [bool](https://docs.python.org/3/library/functions.html#bool) See BTF_UINT64. ### ida_typeinf.is_type_uint128(t: type_t) → [bool](https://docs.python.org/3/library/functions.html#bool) See BTF_UINT128. ### ida_typeinf.is_type_ldouble(t: type_t) → [bool](https://docs.python.org/3/library/functions.html#bool) See BTF_LDOUBLE. ### ida_typeinf.is_type_double(t: type_t) → [bool](https://docs.python.org/3/library/functions.html#bool) See BTF_DOUBLE. ### ida_typeinf.is_type_float(t: type_t) → [bool](https://docs.python.org/3/library/functions.html#bool) See BTF_FLOAT. ### ida_typeinf.is_type_tbyte(t: type_t) → [bool](https://docs.python.org/3/library/functions.html#bool) See BTF_FLOAT. ### ida_typeinf.is_type_bool(t: type_t) → [bool](https://docs.python.org/3/library/functions.html#bool) See BTF_BOOL. ### ida_typeinf.TAH_BYTE type attribute header byte ### ida_typeinf.FAH_BYTE function argument attribute header byte ### ida_typeinf.MAX_DECL_ALIGN ### ida_typeinf.TAH_HASATTRS has extended attributes ### ida_typeinf.TAUDT_UNALIGNED struct: unaligned struct ### ida_typeinf.TAUDT_MSSTRUCT struct: gcc msstruct attribute ### ida_typeinf.TAUDT_CPPOBJ struct: a C++ object, not simple pod type ### ida_typeinf.TAUDT_VFTABLE struct: is virtual function table ### ida_typeinf.TAUDT_FIXED struct: fixed field offsets, stored in serialized form; cannot be set for unions ### ida_typeinf.TAUDT_TUPLE tuple: tuples are like structs but are returned differently from functions ### ida_typeinf.TAUDT_IFACE interface: objc ### ida_typeinf.TAFLD_BASECLASS field: do not include but inherit from the current field ### ida_typeinf.TAFLD_UNALIGNED field: unaligned field ### ida_typeinf.TAFLD_VIRTBASE field: virtual base (not supported yet) ### ida_typeinf.TAFLD_VFTABLE field: ptr to virtual function table ### ida_typeinf.TAFLD_METHOD denotes a udt member function ### ida_typeinf.TAFLD_GAP field: gap member (displayed as padding in type details) ### ida_typeinf.TAFLD_REGCMT field: the comment is regular (if not set, it is repeatable) ### ida_typeinf.TAFLD_FRAME_R frame: function return address frame slot ### ida_typeinf.TAFLD_FRAME_S frame: function saved registers frame slot ### ida_typeinf.TAFLD_BYTIL field: was the member created due to the type system ### ida_typeinf.TAPTR_PTR32 ptr: \_\_ptr32 ### ida_typeinf.TAPTR_PTR64 ptr: \_\_ptr64 ### ida_typeinf.TAPTR_RESTRICT ptr: \_\_restrict ### ida_typeinf.TAPTR_SHIFTED ptr: \_\_shifted(parent_struct, delta) ### ida_typeinf.TAENUM_64BIT enum: store 64-bit values ### ida_typeinf.TAENUM_UNSIGNED enum: unsigned ### ida_typeinf.TAENUM_SIGNED enum: signed ### ida_typeinf.TAENUM_OCT enum: octal representation, if BTE_HEX ### ida_typeinf.TAENUM_BIN enum: binary representation, if BTE_HEX only one of OCT/BIN bits can be set. they are meaningful only if BTE_HEX is used. ### ida_typeinf.TAENUM_NUMSIGN enum: signed representation, if BTE_HEX ### ida_typeinf.TAENUM_LZERO enum: print numbers with leading zeros (only for HEX/OCT/BIN) ### ida_typeinf.TAH_ALL all defined bits ### ida_typeinf.is_tah_byte(t: type_t) → [bool](https://docs.python.org/3/library/functions.html#bool) The TAH byte (type attribute header byte) denotes the start of type attributes. (see “tah-typeattrs” in the type bit definitions) ### ida_typeinf.is_sdacl_byte(t: type_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Identify an sdacl byte. The first sdacl byte has the following format: 11xx000x. The sdacl bytes are appended to udt fields. They indicate the start of type attributes (as the tah-bytes do). The sdacl bytes are used in the udt headers instead of the tah-byte. This is done for compatibility with old databases, they were already using sdacl bytes in udt headers and as udt field postfixes. (see “sdacl-typeattrs” in the type bit definitions) ### *class* ida_typeinf.type_attr_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### key *: [str](https://docs.python.org/3/library/stdtypes.html#str)* one-symbol keys are reserved to be used by the kernel the ones starting with an underscore are reserved too #### value *: bytevec_t* attribute bytes ### ida_typeinf.cvar ### ida_typeinf.TYPE_BASE_MASK the low 4 bits define the basic type ### ida_typeinf.TYPE_FLAGS_MASK type flags - they have different meaning depending on the basic type ### ida_typeinf.TYPE_MODIF_MASK modifiers. \* for BT_ARRAY see Derived type: array \* BT_VOID can have them ONLY in ‘void ``` * ``` ’ ### ida_typeinf.TYPE_FULL_MASK basic type with type flags ### ida_typeinf.BT_UNK unknown ### ida_typeinf.BT_VOID void ### ida_typeinf.BTMT_SIZE0 BT_VOID - normal void; BT_UNK - don’t use ### ida_typeinf.BTMT_SIZE12 size = 1 byte if BT_VOID; 2 if BT_UNK ### ida_typeinf.BTMT_SIZE48 size = 4 bytes if BT_VOID; 8 if BT_UNK ### ida_typeinf.BTMT_SIZE128 size = 16 bytes if BT_VOID; unknown if BT_UNK (IN struct alignment - see below) ### ida_typeinf.BT_INT8 \_\_int8 ### ida_typeinf.BT_INT16 \_\_int16 ### ida_typeinf.BT_INT32 \_\_int32 ### ida_typeinf.BT_INT64 \_\_int64 ### ida_typeinf.BT_INT128 \_\_int128 (for alpha & future use) ### ida_typeinf.BT_INT natural int. (size provided by idp module) ### ida_typeinf.BTMT_UNKSIGN unknown signedness ### ida_typeinf.BTMT_SIGNED signed ### ida_typeinf.BTMT_USIGNED unsigned ### ida_typeinf.BTMT_UNSIGNED ### ida_typeinf.BTMT_CHAR specify char or segment register \* BT_INT8 - char \* BT_INT - segment register \* other BT_INT… - don’t use ### ida_typeinf.BT_BOOL bool ### ida_typeinf.BTMT_DEFBOOL size is model specific or unknown(?) ### ida_typeinf.BTMT_BOOL1 size 1 byte ### ida_typeinf.BTMT_BOOL2 size 2 bytes - !inf_is_64bit() ### ida_typeinf.BTMT_BOOL8 size 8 bytes - inf_is_64bit() ### ida_typeinf.BTMT_BOOL4 size 4 bytes ### ida_typeinf.BT_FLOAT float ### ida_typeinf.BTMT_FLOAT float (4 bytes) ### ida_typeinf.BTMT_DOUBLE double (8 bytes) ### ida_typeinf.BTMT_LNGDBL long double (compiler specific) ### ida_typeinf.BTMT_SPECFLT float (variable size). if processor_t::use_tbyte() then use processor_t::tbyte_size, otherwise 2 bytes ### ida_typeinf.BT_PTR pointer. has the following format: [db sizeof(ptr)]; [tah-typeattrs]; type_t… ### ida_typeinf.BTMT_DEFPTR default for model ### ida_typeinf.BTMT_NEAR near ### ida_typeinf.BTMT_FAR far ### ida_typeinf.BTMT_CLOSURE closure. \* if ptr to BT_FUNC - \_\_closure. in this case next byte MUST be RESERVED_BYTE, and after it BT_FUNC \* else the next byte contains sizeof(ptr) allowed values are 1 - ph.max_ptr_size \* if value is bigger than ph.max_ptr_size, based_ptr_name_and_size() is called to find out the typeinfo ### ida_typeinf.BT_ARRAY array ### ida_typeinf.BTMT_NONBASED set : array base==0 format: dt num_elem; [tah-typeattrs]; type_t… if num_elem==0 then the array size is unknown
format: da num_elem, base; [tah-typeattrs]; type_t… ### ida_typeinf.BTMT_ARRESERV reserved bit ### ida_typeinf.BT_FUNC function. format: optional: CM_CC_SPOILED | num_of_spoiled_regs > if num_of_spoiled_reg == BFA_FUNC_MARKER: > : ::bfa_byte > if (bfa_byte & BFA_FUNC_EXT_FORMAT) != 0 >
> > ::fti_bits (only low bits: FTI_SPOILED,…,FTI_VIRTUAL) > > num_of_spoiled_reg times: spoiled reg info (see extract_spoiledreg) >
> else > : bfa_byte is function attribute byte (see Function attribute byte…) > else: > : num_of_spoiled_reg times: spoiled reg info (see extract_spoiledreg) cm_t … calling convention and memory model [tah-typeattrs]; type_t … return type; [serialized argloc_t of returned value (if CM_CC_SPECIAL{PE} && !return void); if !CM_CC_VOIDARG: > dt N (N=number of parameters) > if ( N == 0 ) > if CM_CC_ELLIPSIS or CM_CC_SPECIALE > > > func(…) > > else > > : parameters are unknown > else > : N records: > : type_t … (i.e. type of each parameter) > [serialized argloc_t (if CM_CC_SPECIAL{PE})] (i.e. place of each parameter) > [FAH_BYTE + de( funcarg_t::flags )] ### ida_typeinf.BTMT_DEFCALL call method - default for model or unknown ### ida_typeinf.BTMT_NEARCALL function returns by retn ### ida_typeinf.BTMT_FARCALL function returns by retf ### ida_typeinf.BTMT_INTCALL function returns by iret in this case cc MUST be ‘unknown’ ### ida_typeinf.BT_COMPLEX struct/union/enum/typedef. format: [dt N (N=field count) if !BTMT_TYPEDEF] if N == 0: > p_string name (unnamed types have names “ > ``` > anon_ > ``` > …”) > [sdacl-typeattrs]; else, for struct & union: : if N == 0x7FFE // Support for high (i.e., > 4095) members count : N = deserialize_de()
ALPOW = N & 0x7 MCNT = N >> 3 if MCNT == 0
> empty struct
if ALPOW == 0 : ALIGN = get_default_align()
else : ALIGN = (1 << (ALPOW - 1))
[sdacl-typeattrs]; else, for enums: : if N == 0x7FFE // Support for high enum entries count. : N = deserialize_de()
[tah-typeattrs]; ### ida_typeinf.BTMT_STRUCT struct: MCNT records: type_t; [sdacl-typeattrs]; ### ida_typeinf.BTMT_UNION union: MCNT records: type_t… ### ida_typeinf.BTMT_ENUM enum: next byte bte_t (see below) N records: de delta(s) OR blocks (see below) ### ida_typeinf.BTMT_TYPEDEF named reference always p_string name ### ida_typeinf.BT_BITFIELD bitfield (only in struct) [‘bitmasked’ enum see below] next byte is dt ((size in bits << 1) | (unsigned ? 1 : 0)) ### ida_typeinf.BTMT_BFLDI8 \_\_int8 ### ida_typeinf.BTMT_BFLDI16 \_\_int16 ### ida_typeinf.BTMT_BFLDI32 \_\_int32 ### ida_typeinf.BTMT_BFLDI64 \_\_int64 ### ida_typeinf.BT_RESERVED RESERVED. ### ida_typeinf.BTM_CONST const ### ida_typeinf.BTM_VOLATILE volatile ### ida_typeinf.BTE_SIZE_MASK storage size. \* if == 0 then inf_get_cc_size_e() \* else 1 << (n -1) = 1,2,4,8 \* n == 5,6,7 are reserved ### ida_typeinf.BTE_RESERVED must be 0, in order to distinguish from a tah-byte ### ida_typeinf.BTE_BITMASK ‘subarrays’. In this case ANY record has the following format: \* ‘de’ mask (has name) \* ‘dt’ cnt \* cnt records of ‘de’ values (cnt CAN be 0) ### ida_typeinf.BTE_OUT_MASK output style mask ### ida_typeinf.BTE_HEX hex ### ida_typeinf.BTE_CHAR char or hex ### ida_typeinf.BTE_SDEC signed decimal ### ida_typeinf.BTE_UDEC unsigned decimal ### ida_typeinf.BTE_ALWAYS this bit MUST be present ### ida_typeinf.BT_SEGREG segment register ### ida_typeinf.BT_UNK_BYTE 1 byte ### ida_typeinf.BT_UNK_WORD 2 bytes ### ida_typeinf.BT_UNK_DWORD 4 bytes ### ida_typeinf.BT_UNK_QWORD 8 bytes ### ida_typeinf.BT_UNK_OWORD 16 bytes ### ida_typeinf.BT_UNKNOWN unknown size - for parameters ### ida_typeinf.BTF_BYTE byte ### ida_typeinf.BTF_UNK unknown ### ida_typeinf.BTF_VOID void ### ida_typeinf.BTF_INT8 signed byte ### ida_typeinf.BTF_CHAR signed char ### ida_typeinf.BTF_UCHAR unsigned char ### ida_typeinf.BTF_UINT8 unsigned byte ### ida_typeinf.BTF_INT16 signed short ### ida_typeinf.BTF_UINT16 unsigned short ### ida_typeinf.BTF_INT32 signed int ### ida_typeinf.BTF_UINT32 unsigned int ### ida_typeinf.BTF_INT64 signed long ### ida_typeinf.BTF_UINT64 unsigned long ### ida_typeinf.BTF_INT128 signed 128-bit value ### ida_typeinf.BTF_UINT128 unsigned 128-bit value ### ida_typeinf.BTF_INT int, unknown signedness ### ida_typeinf.BTF_UINT unsigned int ### ida_typeinf.BTF_SINT signed int ### ida_typeinf.BTF_BOOL boolean ### ida_typeinf.BTF_FLOAT float ### ida_typeinf.BTF_DOUBLE double ### ida_typeinf.BTF_LDOUBLE long double ### ida_typeinf.BTF_TBYTE see BTMT_SPECFLT ### ida_typeinf.BTF_STRUCT struct ### ida_typeinf.BTF_UNION union ### ida_typeinf.BTF_ENUM enum ### ida_typeinf.BTF_TYPEDEF typedef ### ida_typeinf.TA_ORG_TYPEDEF the original typedef name (simple string) ### ida_typeinf.TA_ORG_ARRDIM the original array dimension (pack_dd) ### ida_typeinf.TA_FORMAT info about the ‘format’ argument. 3 times pack_dd: format_functype_t, argument number of ‘format’, argument number of ‘…’ ### ida_typeinf.TA_VALUE_REPR serialized value_repr_t (used for scalars and arrays) ### ida_typeinf.append_argloc(out: qtype \*, vloc: argloc_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Serialize argument location ### ida_typeinf.extract_argloc(vloc: argloc_t, ptype: type_t const \*\*, forbid_stkoff: bool) → [bool](https://docs.python.org/3/library/functions.html#bool) Deserialize an argument location. Argument FORBID_STKOFF checks location type. It can be used, for example, to check the return location of a function that cannot return a value in the stack ### ida_typeinf.resolve_typedef(til: til_t, type: type_t const \*) → type_t const \* ### ida_typeinf.get_realtype(til: til_t, type: type_t const \*) → type_t Get the resolved base type. * **Parameters:** * **til** – type information library or nullptr * **type** – type string * **Returns:** resolved base type ### ida_typeinf.is_restype_void(til: til_t, type: type_t const \*) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_typeinf.is_restype_enum(til: til_t, type: type_t const \*) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_typeinf.is_restype_struni(til: til_t, type: type_t const \*) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_typeinf.is_restype_struct(til: til_t, type: type_t const \*) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_typeinf.get_scalar_bt(size: [int](https://docs.python.org/3/library/functions.html#int)) → type_t ### *class* ida_typeinf.til_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### name *: char \** short file name (without path and extension) #### desc *: char \** human readable til description #### nbases *: [int](https://docs.python.org/3/library/functions.html#int)* number of base tils #### flags *: [int](https://docs.python.org/3/library/functions.html#int)* Type info library property bits #### is_dirty() → [bool](https://docs.python.org/3/library/functions.html#bool) Has the til been modified? (TIL_MOD). #### set_dirty() → [None](https://docs.python.org/3/library/constants.html#None) Mark the til as modified (TIL_MOD). #### find_base(n: [str](https://docs.python.org/3/library/stdtypes.html#str)) → til_t \* Find the base til with the provided name * **Parameters:** **n** – the base til name * **Returns:** the found til_t, or nullptr #### cc *: [compiler_info_t](../ida_ida/index.md#ida_ida.compiler_info_t)* information about the target compiler #### nrefs *: [int](https://docs.python.org/3/library/functions.html#int)* number of references to the til #### nstreams *: [int](https://docs.python.org/3/library/functions.html#int)* number of extra streams #### streams *: til_stream_t \*\** symbol stream storage #### base(n: [int](https://docs.python.org/3/library/functions.html#int)) → til_t \* #### import_type(src) Import a type (and all its dependencies) into this type info library. * **Parameters:** **src** – The type to import * **Returns:** the imported copy, or None #### named_types() Returns a generator over the named types contained in this type library. Every iteration returns a fresh new tinfo_t object * **Returns:** a tinfo_t-producing generator #### numbered_types() Returns a generator over the numbered types contained in this type library. Every iteration returns a fresh new tinfo_t object * **Returns:** a tinfo_t-producing generator #### get_named_type(name) Retrieves a tinfo_t representing the named type in this type library. * **Parameters:** **name** – a type name * **Returns:** a new tinfo_t object, or None if not found #### get_numbered_type(ordinal) Retrieves a tinfo_t representing the numbered type in this type library. * **Parameters:** **ordinal** – a type ordinal * **Returns:** a new tinfo_t object, or None if not found #### get_type_names() #### type_names ### ida_typeinf.no_sign no sign, or unknown ### ida_typeinf.type_signed signed type ### ida_typeinf.type_unsigned unsigned type ### ida_typeinf.TIL_ZIP pack buckets using zip ### ida_typeinf.TIL_MAC til has macro table ### ida_typeinf.TIL_ESI extended sizeof info (short, long, longlong) ### ida_typeinf.TIL_UNI universal til for any compiler ### ida_typeinf.TIL_ORD type ordinal numbers are present ### ida_typeinf.TIL_ALI type aliases are present (this bit is used only on the disk) ### ida_typeinf.TIL_MOD til has been modified, should be saved ### ida_typeinf.TIL_STM til has extra streams ### ida_typeinf.TIL_SLD sizeof(long double) ### ida_typeinf.TIL_ECC extended callcnv_t ### ida_typeinf.new_til(name: [str](https://docs.python.org/3/library/stdtypes.html#str), desc: [str](https://docs.python.org/3/library/stdtypes.html#str)) → til_t \* Initialize a til. ### ida_typeinf.TIL_ADD_FAILED see errbuf ### ida_typeinf.TIL_ADD_OK some tils were added ### ida_typeinf.TIL_ADD_ALREADY the base til was already added ### ida_typeinf.load_til(name: [str](https://docs.python.org/3/library/stdtypes.html#str), tildir: [str](https://docs.python.org/3/library/stdtypes.html#str) = None) → [str](https://docs.python.org/3/library/stdtypes.html#str) Load til from a file without adding it to the database list (see also add_til). Failure to load base tils are reported into ‘errbuf’. They do not prevent loading of the main til. * **Parameters:** **name** – filename of the til. If it’s an absolute path, tildir is ignored. * NB: the file extension is forced to .til * **Parameters:** **tildir** – directory where to load the til from. nullptr means default til subdirectories. * **Returns:** pointer to resulting til, nullptr if failed and error message is in errbuf ### ida_typeinf.compact_til(ti: [til_t](#ida_typeinf.til_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Collect garbage in til. Must be called before storing the til. * **Returns:** true if any memory was freed ### ida_typeinf.store_til(ti: [til_t](#ida_typeinf.til_t), tildir: [str](https://docs.python.org/3/library/stdtypes.html#str), name: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [bool](https://docs.python.org/3/library/functions.html#bool) Store til to a file. If the til contains garbage, it will be collected before storing the til. Your plugin should call compact_til() before calling store_til(). * **Parameters:** * **ti** – type library to store * **tildir** – directory where to store the til. nullptr means current directory. * **name** – filename of the til. If it’s an absolute path, tildir is ignored. * NB: the file extension is forced to .til * **Returns:** success ### ida_typeinf.free_til(ti: [til_t](#ida_typeinf.til_t)) → [None](https://docs.python.org/3/library/constants.html#None) Free memory allocated by til. ### ida_typeinf.load_til_header(tildir: [str](https://docs.python.org/3/library/stdtypes.html#str), name: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [str](https://docs.python.org/3/library/stdtypes.html#str) Get human-readable til description. ### ida_typeinf.is_code_far(cm: cm_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Does the given model specify far code? ### ida_typeinf.is_data_far(cm: cm_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Does the given model specify far data? ### *class* ida_typeinf.rrel_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### off *: [int](https://docs.python.org/3/library/functions.html#int)* displacement from the address pointed by the register #### reg *: [int](https://docs.python.org/3/library/functions.html#int)* register index (into ph.reg_names) ### ida_typeinf.CM_MASK ### ida_typeinf.CM_UNKNOWN unknown ### ida_typeinf.CM_N8_F16 if sizeof(int)<=2: near 1 byte, far 2 bytes ### ida_typeinf.CM_N64 if sizeof(int)>2: near 8 bytes, far 8 bytes ### ida_typeinf.CM_N16_F32 near 2 bytes, far 4 bytes ### ida_typeinf.CM_N32_F48 near 4 bytes, far 6 bytes ### ida_typeinf.CM_M_MASK ### ida_typeinf.CM_M_NN small: code=near, data=near (or unknown if CM_UNKNOWN) ### ida_typeinf.CM_M_FF large: code=far, data=far ### ida_typeinf.CM_M_NF compact: code=near, data=far ### ida_typeinf.CM_M_FN medium: code=far, data=near ### ida_typeinf.CM_CC_MASK ### ida_typeinf.CM_CC_INVALID this value is invalid ### ida_typeinf.CM_CC_UNKNOWN unknown calling convention ### ida_typeinf.CM_CC_VOIDARG function without arguments if has other cc and argnum == 0, represent as f() - unknown list ### ida_typeinf.CM_CC_CDECL stack ### ida_typeinf.CM_CC_ELLIPSIS cdecl + ellipsis ### ida_typeinf.CM_CC_STDCALL stack, purged ### ida_typeinf.CM_CC_PASCAL stack, purged, reverse order of args ### ida_typeinf.CM_CC_FASTCALL stack, purged (x86), first args are in regs (compiler-dependent) ### ida_typeinf.CM_CC_THISCALL stack, purged (x86), first arg is in reg (compiler-dependent) ### ida_typeinf.CM_CC_SWIFT (Swift) arguments and return values in registers (compiler-dependent) ### ida_typeinf.CM_CC_SPOILED This is NOT a cc! Mark of \_\_spoil record the low nibble is count and after n {spoilreg_t} present real cm_t byte. if n == BFA_FUNC_MARKER, the next byte is the function attribute byte. ### ida_typeinf.CM_CC_GOLANG (Go) arguments and return value reg/stack depending on version ### ida_typeinf.CM_CC_RESERVE3 reserved; used for internal needs ### ida_typeinf.CM_CC_SPECIALE CM_CC_SPECIAL with ellipsis ### ida_typeinf.CM_CC_SPECIALP Equal to CM_CC_SPECIAL, but with purged stack. ### ida_typeinf.CM_CC_SPECIAL usercall: locations of all arguments and the return value are explicitly specified ### ida_typeinf.CM_CC_LAST_USERCALL ### ida_typeinf.CM_CC_GOSTK (Go) arguments and return value in stack ### ida_typeinf.CM_CC_RUST (Rust) arguments and return value follow the Rust ABI ### ida_typeinf.CM_CC_FIRST_PLAIN_CUSTOM ### ida_typeinf.BFA_NORET \_\_noreturn ### ida_typeinf.BFA_PURE \_\_pure ### ida_typeinf.BFA_HIGH high level prototype (with possibly hidden args) ### ida_typeinf.BFA_STATIC static ### ida_typeinf.BFA_VIRTUAL virtual ### ida_typeinf.BFA_FUNC_MARKER This is NOT a cc! (used internally as a marker). ### ida_typeinf.BFA_FUNC_EXT_FORMAT This is NOT a real attribute (used internally as marker for extended format). ### ida_typeinf.ALOC_NONE none ### ida_typeinf.ALOC_STACK stack offset ### ida_typeinf.ALOC_DIST distributed (scattered) ### ida_typeinf.ALOC_REG1 one register (and offset within it) ### ida_typeinf.ALOC_REG2 register pair ### ida_typeinf.ALOC_RREL register relative ### ida_typeinf.ALOC_STATIC global address ### ida_typeinf.ALOC_CUSTOM custom argloc (7 or higher) ### *class* ida_typeinf.argloc_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### swap(r: [argloc_t](#ida_typeinf.argloc_t)) → [None](https://docs.python.org/3/library/constants.html#None) Assign this == r and r == this. #### atype() → argloc_type_t Get type (Argument location types ). #### is_reg1() → [bool](https://docs.python.org/3/library/functions.html#bool) See ALOC_REG1. #### is_reg2() → [bool](https://docs.python.org/3/library/functions.html#bool) See ALOC_REG2. #### is_reg() → [bool](https://docs.python.org/3/library/functions.html#bool) is_reg1() || is_reg2() #### is_rrel() → [bool](https://docs.python.org/3/library/functions.html#bool) See ALOC_RREL. #### is_ea() → [bool](https://docs.python.org/3/library/functions.html#bool) See ALOC_STATIC. #### is_stkoff() → [bool](https://docs.python.org/3/library/functions.html#bool) See ALOC_STACK. #### is_scattered() → [bool](https://docs.python.org/3/library/functions.html#bool) See ALOC_DIST. #### has_reg() → [bool](https://docs.python.org/3/library/functions.html#bool) TRUE if argloc has a register part. #### has_stkoff() → [bool](https://docs.python.org/3/library/functions.html#bool) TRUE if argloc has a stack part. #### is_mixed_scattered() → [bool](https://docs.python.org/3/library/functions.html#bool) mixed scattered: consists of register and stack parts #### in_stack() → [bool](https://docs.python.org/3/library/functions.html#bool) TRUE if argloc is in stack entirely. #### is_fragmented() → [bool](https://docs.python.org/3/library/functions.html#bool) is_scattered() || is_reg2() #### is_custom() → [bool](https://docs.python.org/3/library/functions.html#bool) See ALOC_CUSTOM. #### is_badloc() → [bool](https://docs.python.org/3/library/functions.html#bool) See ALOC_NONE. #### reg1() → [int](https://docs.python.org/3/library/functions.html#int) Get the register info. Use when atype() == ALOC_REG1 or ALOC_REG2 #### regoff() → [int](https://docs.python.org/3/library/functions.html#int) Get offset from the beginning of the register in bytes. Use when atype() == ALOC_REG1 #### reg2() → [int](https://docs.python.org/3/library/functions.html#int) Get info for the second register. Use when atype() == ALOC_REG2 #### get_reginfo() → [int](https://docs.python.org/3/library/functions.html#int) Get all register info. Use when atype() == ALOC_REG1 or ALOC_REG2 #### stkoff() → [int](https://docs.python.org/3/library/functions.html#int) Get the stack offset. Use if atype() == ALOC_STACK #### get_ea() → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) Get the global address. Use when atype() == ALOC_STATIC #### scattered() → scattered_aloc_t & Get scattered argument info. Use when atype() == ALOC_DIST #### get_rrel() → rrel_t & Get register-relative info. Use when atype() == ALOC_RREL #### get_custom() → void \* Get custom argloc info. Use if atype() == ALOC_CUSTOM #### get_biggest() → argloc_t::biggest_t Get largest element in internal union. #### set_reg1(reg: [int](https://docs.python.org/3/library/functions.html#int), off: [int](https://docs.python.org/3/library/functions.html#int) = 0) → [None](https://docs.python.org/3/library/constants.html#None) Set register location. #### set_reg2(\_reg1: [int](https://docs.python.org/3/library/functions.html#int), \_reg2: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) Set secondary register location. #### set_stkoff(off: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) Set stack offset location. #### set_ea(\_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) Set static ea location. #### consume_rrel(p: [rrel_t](#ida_typeinf.rrel_t)) → [None](https://docs.python.org/3/library/constants.html#None) Set register-relative location - can’t be nullptr. #### set_badloc() → [None](https://docs.python.org/3/library/constants.html#None) Set to invalid location. #### calc_offset() → [int](https://docs.python.org/3/library/functions.html#int) Calculate offset that can be used to compare 2 similar arglocs. #### advance(delta: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) Move the location to point ‘delta’ bytes further. #### align_reg_high(size: [int](https://docs.python.org/3/library/functions.html#int), \_slotsize: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) Set register offset to align it to the upper part of \_SLOTSIZE. #### align_stkoff_high(size: [int](https://docs.python.org/3/library/functions.html#int), \_slotsize: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) Set stack offset to align to the upper part of \_SLOTSIZE. #### compare(r: [argloc_t](#ida_typeinf.argloc_t)) → [int](https://docs.python.org/3/library/functions.html#int) #### consume_scattered(p: [scattered_aloc_t](#ida_typeinf.scattered_aloc_t)) → [None](https://docs.python.org/3/library/constants.html#None) Set distributed argument location. ### *class* ida_typeinf.argpart_t(\*args) Bases: [`argloc_t`](#ida_typeinf.argloc_t) #### thisown #### off *: ushort* offset from the beginning of the argument #### size *: ushort* the number of bytes #### bad_offset() → [bool](https://docs.python.org/3/library/functions.html#bool) Does this argpart have a valid offset? #### bad_size() → [bool](https://docs.python.org/3/library/functions.html#bool) Does this argpart have a valid size? #### swap(r: [argpart_t](#ida_typeinf.argpart_t)) → [None](https://docs.python.org/3/library/constants.html#None) Assign this = r and r = this. ### *class* ida_typeinf.scattered_aloc_t Bases: [`argpartvec_t`](#ida_typeinf.argpartvec_t) #### thisown ### ida_typeinf.verify_argloc(vloc: [argloc_t](#ida_typeinf.argloc_t), size: [int](https://docs.python.org/3/library/functions.html#int), gaps: [rangeset_t](../ida_range/index.md#ida_range.rangeset_t)) → [int](https://docs.python.org/3/library/functions.html#int) Verify argloc_t. * **Parameters:** * **vloc** – argloc to verify * **size** – total size of the variable * **gaps** – if not nullptr, specifies gaps in structure definition. these gaps should not map to any argloc, but everything else must be covered * **Returns:** 0 if ok, otherwise an interr code. ### ida_typeinf.optimize_argloc(vloc: [argloc_t](#ida_typeinf.argloc_t), size: [int](https://docs.python.org/3/library/functions.html#int), gaps: [rangeset_t](../ida_range/index.md#ida_range.rangeset_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Verify and optimize scattered argloc into simple form. All new arglocs must be processed by this function. * **Returns:** true: success * **Returns:** false: the input argloc was illegal ### ida_typeinf.print_argloc(vloc: [argloc_t](#ida_typeinf.argloc_t), size: [int](https://docs.python.org/3/library/functions.html#int) = 0, vflags: [int](https://docs.python.org/3/library/functions.html#int) = 0) → [int](https://docs.python.org/3/library/functions.html#int) Convert an argloc to human readable form. ### ida_typeinf.PRALOC_VERIFY interr if illegal argloc ### ida_typeinf.PRALOC_STKOFF print stack offsets ### *class* ida_typeinf.aloc_visitor_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### visit_location(v: [argloc_t](#ida_typeinf.argloc_t), off: [int](https://docs.python.org/3/library/functions.html#int), size: [int](https://docs.python.org/3/library/functions.html#int)) → [int](https://docs.python.org/3/library/functions.html#int) ### ida_typeinf.for_all_arglocs(vv: [aloc_visitor_t](#ida_typeinf.aloc_visitor_t), vloc: [argloc_t](#ida_typeinf.argloc_t), size: [int](https://docs.python.org/3/library/functions.html#int), off: [int](https://docs.python.org/3/library/functions.html#int) = 0) → [int](https://docs.python.org/3/library/functions.html#int) Compress larger argloc types and initiate the aloc visitor. ### *class* ida_typeinf.const_aloc_visitor_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### visit_location(v: [argloc_t](#ida_typeinf.argloc_t), off: [int](https://docs.python.org/3/library/functions.html#int), size: [int](https://docs.python.org/3/library/functions.html#int)) → [int](https://docs.python.org/3/library/functions.html#int) ### ida_typeinf.for_all_const_arglocs(vv: [const_aloc_visitor_t](#ida_typeinf.const_aloc_visitor_t), vloc: [argloc_t](#ida_typeinf.argloc_t), size: [int](https://docs.python.org/3/library/functions.html#int), off: [int](https://docs.python.org/3/library/functions.html#int) = 0) → [int](https://docs.python.org/3/library/functions.html#int) See for_all_arglocs(). ### ida_typeinf.is_user_cc(cc: callcnv_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Does the calling convention specify argument locations explicitly? ### ida_typeinf.is_vararg_cc(cc: callcnv_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Does the calling convention use ellipsis? ### ida_typeinf.is_purging_cc(cc: callcnv_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Does the calling convention clean the stack arguments upon return? ### ida_typeinf.is_golang_cc(cc: callcnv_t) → [bool](https://docs.python.org/3/library/functions.html#bool) GO language calling convention (return value in stack)? ### ida_typeinf.is_rust_cc(cc: callcnv_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Rust language calling convention? ### ida_typeinf.is_custom_callcnv(cc: callcnv_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Is custom calling convention? ### ida_typeinf.is_swift_cc(cc: callcnv_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Swift calling convention (arguments and return values in registers)? ### ida_typeinf.get_stkarg_area_info(out: [stkarg_area_info_t](#ida_typeinf.stkarg_area_info_t), cc: callcnv_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Some calling conventions foresee special areas on the stack for call arguments. This structure lists their sizes. ### *class* ida_typeinf.stkarg_area_info_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### cb *: [int](https://docs.python.org/3/library/functions.html#int)* #### stkarg_offset *: [int](https://docs.python.org/3/library/functions.html#int)* Offset from the SP to the first stack argument (can include linkage area) examples: pc: 0, hppa: -0x34, ppc aix: 0x18 #### shadow_size *: [int](https://docs.python.org/3/library/functions.html#int)* Size of the shadow area. explanations at: [[https://stackoverflow.com/questions/30190132/what-is-the-shadow-space-in-x64-assembly](https://stackoverflow.com/questions/30190132/what-is-the-shadow-space-in-x64-assembly](https://stackoverflow.com/questions/30190132/what-is-the-shadow-space-in-x64-assembly](https://stackoverflow.com/questions/30190132/what-is-the-shadow-space-in-x64-assembly)) examples: x64 Visual Studio C++: 0x20, x64 gcc: 0, ppc aix: 0x20 #### linkage_area *: [int](https://docs.python.org/3/library/functions.html#int)* Size of the linkage area. explanations at: [[https://www.ibm.com/docs/en/xl-fortran-aix/16.1.0?topic=conventions-linkage-area](https://www.ibm.com/docs/en/xl-fortran-aix/16.1.0](https://www.ibm.com/docs/en/xl-fortran-aix/16.1.0?topic=conventions-linkage-area](https://www.ibm.com/docs/en/xl-fortran-aix/16.1.0)?topic=conventions-linkage-area) examples: pc: 0, hppa: 0, ppc aix: 0x18 (equal to stkarg_offset) ### ida_typeinf.C_PC_TINY ### ida_typeinf.C_PC_SMALL ### ida_typeinf.C_PC_COMPACT ### ida_typeinf.C_PC_MEDIUM ### ida_typeinf.C_PC_LARGE ### ida_typeinf.C_PC_HUGE ### ida_typeinf.C_PC_FLAT ### *class* ida_typeinf.custom_callcnv_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### flags *: uint64* #### name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* the name is used as a keyword in the function prototype #### abibits *: [int](https://docs.python.org/3/library/functions.html#int)* abibits to be used for the calling convention #### is_vararg() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_purging() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_usercall() → [bool](https://docs.python.org/3/library/functions.html#bool) #### validate_func(fti: [func_type_data_t](#ida_typeinf.func_type_data_t), reterr: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [bool](https://docs.python.org/3/library/functions.html#bool) Validate a function prototype. This function is used during parsing or deserializing a function prototype to verify semantic limitations of the prototype (for example, returning arrays is forbidden in C) * **Parameters:** * **fti** – function prototype * **reterr** – buffer for error message #### calc_retloc(fti: [func_type_data_t](#ida_typeinf.func_type_data_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Calculate the location of the return value. This function must fill fti->retloc. * **Parameters:** **fti** – function prototype * **Returns:** success #### calc_arglocs(fti: [func_type_data_t](#ida_typeinf.func_type_data_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Calculate the argument locations. This function must fill all fti->at(i).argloc instances. It may be called for variadic functions too, in calc_varglocs fails. * **Parameters:** **fti** – function prototype * **Returns:** success #### find_varargs(fti: func_type_data_t, call_ea: ida_idaapi.ea_t, blk: mblock_t \*) → ssize_t Discover variadic arguments. This function is called only for variadic functions. It is currently used by the decompiler. * **Parameters:** * **fti** – function prototype. find_varargs() should append the discovered variadic arguments to it. * **call_ea** – address of the call instruction * **blk** – microcode block with the call instruction * **Returns:** >0 - total number of arguments after the call <0 - failure ==0 - means to use the standard algorithm to discover variadic args #### calc_varglocs(fti: [func_type_data_t](#ida_typeinf.func_type_data_t), regs: [regobjs_t](#ida_typeinf.regobjs_t), stkargs: relobj_t, nfixed: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) Calculate the argument locations for a variadic function. This function must fill all fti->at(i).argloc instances and provide more detailed info about registers and stkargs. * **Parameters:** * **fti** – function prototype * **regs** – buffer for hidden register arguments, may be nullptr * **stkargs** – buffer for hidden stack arguments, may be nullptr * **nfixed** – number of fixed arguments * **Returns:** success #### get_cc_regs(out: [callregs_t](#ida_typeinf.callregs_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Retrieve generic information about call registers. #### get_stkarg_area_info(out: [stkarg_area_info_t](#ida_typeinf.stkarg_area_info_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Retrieve generic information about stack arguments. #### calc_purged_bytes(\*args) → [int](https://docs.python.org/3/library/functions.html#int) Calculate the number of purged bytes * **Parameters:** * **fti** – function prototype * **call_ea** – address of the call instruction (not used yet) #### decorate_name(name: [str](https://docs.python.org/3/library/stdtypes.html#str), should_decorate: [bool](https://docs.python.org/3/library/functions.html#bool), cc: callcnv_t, type: [tinfo_t](#ida_typeinf.tinfo_t)) → [str](https://docs.python.org/3/library/stdtypes.html#str) Function to be overloaded for custom calling conventions. Decorate a function name. Some compilers decorate names depending on the calling convention. This function provides the means to handle it for custom callcnvs. Please note that this is about name decoration (C), not name mangling (C++). #### lower_func_type(fti: [func_type_data_t](#ida_typeinf.func_type_data_t)) → [int](https://docs.python.org/3/library/functions.html#int) Lower a function type. See lower_type() for more explanations. * **Parameters:** **fti** – function prototype * **Returns:** <0-failure, >=0-ok, 2-made substantial changes ### ida_typeinf.CCI_VARARG is variadic? ### ida_typeinf.CCI_PURGE purges arguments? ### ida_typeinf.CCI_USER is usercall? not tested ### ida_typeinf.get_custom_callcnv(callcnv: callcnv_t) → custom_callcnv_t const \* Retrieve custom calling convention details. ### ida_typeinf.find_custom_callcnv(name: [str](https://docs.python.org/3/library/stdtypes.html#str)) → callcnv_t Find a calling convention by its name * **Returns:** CM_CC_INVALID is not found ### ida_typeinf.get_custom_callcnvs(names: qstrvec_t \*, codes: callcnvs_t \*) → [int](https://docs.python.org/3/library/functions.html#int) Get all custom calling conventions * **Parameters:** * **names** – output buffer for the convention names * **codes** – output buffer for the convention codes The two output buffers correspond to each other. * **Returns:** number of the calling conventions added to the output buffers ### ida_typeinf.ARGREGS_POLICY_UNDEFINED ### ida_typeinf.ARGREGS_GP_ONLY GP registers used for all arguments. ### ida_typeinf.ARGREGS_INDEPENDENT FP/GP registers used separately (like gcc64). ### ida_typeinf.ARGREGS_BY_SLOTS fixed FP/GP register per each slot (like vc64) ### ida_typeinf.ARGREGS_FP_MASKS_GP FP register also consumes one or more GP regs but not vice versa (aix ppc ABI). ### ida_typeinf.ARGREGS_MIPS_O32 MIPS ABI o32. ### ida_typeinf.ARGREGS_RISCV Risc-V API FP arguments are passed in GP registers if FP registers are exhausted and GP ones are not. Wide FP arguments are passed in GP registers. Variadic FP arguments are passed in GP registers. ### *class* ida_typeinf.callregs_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### policy *: argreg_policy_t* argument policy #### nregs *: [int](https://docs.python.org/3/library/functions.html#int)* max number of registers that can be used in a call #### gpregs *: [intvec_t](../ida_pro/index.md#ida_pro.intvec_t)* array of gp registers (general purpose) #### fpregs *: [intvec_t](../ida_pro/index.md#ida_pro.intvec_t)* array of fp registers (floating point) #### swap(r: [callregs_t](#ida_typeinf.callregs_t)) → [None](https://docs.python.org/3/library/constants.html#None) swap two instances #### init_regs(cc: callcnv_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Init policy & registers for given CC. #### by_slots() → [bool](https://docs.python.org/3/library/functions.html#bool) #### set(\_policy: argreg_policy_t, gprs: int const \*, fprs: int const \*) → [None](https://docs.python.org/3/library/constants.html#None) Init policy & registers (arrays are -1-terminated). #### GPREGS #### FPREGS #### append_registers(kind: callregs_t::reg_kind_t, first_reg: int, last_reg: int) → [None](https://docs.python.org/3/library/constants.html#None) #### set_registers(kind: callregs_t::reg_kind_t, first_reg: int, last_reg: int) → [None](https://docs.python.org/3/library/constants.html#None) #### reset() → [None](https://docs.python.org/3/library/constants.html#None) Set policy and registers to invalid values. #### *static* regcount(cc: callcnv_t) → [int](https://docs.python.org/3/library/functions.html#int) Get max number of registers may be used in a function call. #### reginds(gp_ind: int \*, fp_ind: int \*, r: int) → [bool](https://docs.python.org/3/library/functions.html#bool) Get register indexes within GP/FP arrays. (-1 -> is not present in the corresponding array) ### ida_typeinf.get_comp(comp: comp_t) → comp_t Get compiler bits. ### ida_typeinf.get_compiler_name(id: comp_t) → [str](https://docs.python.org/3/library/stdtypes.html#str) Get full compiler name. ### ida_typeinf.get_compiler_abbr(id: comp_t) → [str](https://docs.python.org/3/library/stdtypes.html#str) Get abbreviated compiler name. ### ida_typeinf.get_compilers(ids: compvec_t \*, names: qstrvec_t \*, abbrs: qstrvec_t \*) → [None](https://docs.python.org/3/library/constants.html#None) Get names of all built-in compilers. ### ida_typeinf.is_comp_unsure(comp: comp_t) → comp_t See COMP_UNSURE. ### ida_typeinf.default_compiler() → comp_t Get compiler specified by inf.cc. ### ida_typeinf.is_gcc() → [bool](https://docs.python.org/3/library/functions.html#bool) Is the target compiler COMP_GNU? ### ida_typeinf.is_gcc32() → [bool](https://docs.python.org/3/library/functions.html#bool) Is the target compiler 32 bit gcc? ### ida_typeinf.is_gcc64() → [bool](https://docs.python.org/3/library/functions.html#bool) Is the target compiler 64 bit gcc? ### ida_typeinf.gcc_layout() → [bool](https://docs.python.org/3/library/functions.html#bool) Should use the struct/union layout as done by gcc? ### ida_typeinf.set_compiler(cc: [compiler_info_t](../ida_ida/index.md#ida_ida.compiler_info_t), flags: [int](https://docs.python.org/3/library/functions.html#int), abiname: [str](https://docs.python.org/3/library/stdtypes.html#str) = None) → [bool](https://docs.python.org/3/library/functions.html#bool) Change current compiler. * **Parameters:** * **cc** – compiler to switch to * **flags** – Set compiler flags * **abiname** – ABI name * **Returns:** success ### ida_typeinf.SETCOMP_OVERRIDE may override old compiler info ### ida_typeinf.SETCOMP_ONLY_ID cc has only ‘id’ field; the rest will be set to defaults corresponding to the program bitness ### ida_typeinf.SETCOMP_ONLY_ABI ignore cc field complete, use only abiname ### ida_typeinf.SETCOMP_BY_USER invoked by user, cannot be replaced by module/loader ### ida_typeinf.set_compiler_id(id: comp_t, abiname: [str](https://docs.python.org/3/library/stdtypes.html#str) = None) → [bool](https://docs.python.org/3/library/functions.html#bool) Set the compiler id (see Compiler IDs ). ### ida_typeinf.set_abi_name(abiname: [str](https://docs.python.org/3/library/stdtypes.html#str), user_level: [bool](https://docs.python.org/3/library/functions.html#bool) = False) → [bool](https://docs.python.org/3/library/functions.html#bool) Set abi name (see Compiler IDs ). ### ida_typeinf.get_abi_name() → [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None) Get the current ABI name. * **Returns:** the ABI name, or None if no ABI is set. ### ida_typeinf.append_abi_opts(abi_opts: [str](https://docs.python.org/3/library/stdtypes.html#str), user_level: [bool](https://docs.python.org/3/library/functions.html#bool) = False) → [bool](https://docs.python.org/3/library/functions.html#bool) Add/remove/check ABI option General form of full abi name: abiname-opt1-opt2-… or -opt1-opt2-… * **Parameters:** * **abi_opts** – - ABI options to add/remove in form opt1-opt2-… * **user_level** – - initiated by user if TRUE (==SETCOMP_BY_USER) * **Returns:** success ### ida_typeinf.remove_abi_opts(abi_opts: [str](https://docs.python.org/3/library/stdtypes.html#str), user_level: [bool](https://docs.python.org/3/library/functions.html#bool) = False) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_typeinf.set_compiler_string(compstr: [str](https://docs.python.org/3/library/stdtypes.html#str), user_level: [bool](https://docs.python.org/3/library/functions.html#bool)) → [bool](https://docs.python.org/3/library/functions.html#bool) * **Parameters:** * **compstr** – - compiler description in form : * **user_level** – - initiated by user if TRUE * **Returns:** success ### ida_typeinf.use_golang_cc() → [bool](https://docs.python.org/3/library/functions.html#bool) is GOLANG calling convention used by default? ### ida_typeinf.switch_to_golang() → [None](https://docs.python.org/3/library/constants.html#None) switch to GOLANG calling convention (to be used as default CC) ### ida_typeinf.use_rust_cc() → [bool](https://docs.python.org/3/library/functions.html#bool) is RUST calling convention used by default? ### ida_typeinf.switch_to_rust() → [None](https://docs.python.org/3/library/constants.html#None) switch to RUST calling convention (to be used as default CC) ### ida_typeinf.MAX_FUNC_ARGS max number of function arguments ### ida_typeinf.MAX_ARRAY_NELEMS max number of array elements ### ida_typeinf.ABS_UNK ### ida_typeinf.ABS_NO ### ida_typeinf.ABS_YES ### ida_typeinf.SC_UNK unknown ### ida_typeinf.SC_TYPE typedef ### ida_typeinf.SC_EXT extern ### ida_typeinf.SC_STAT static ### ida_typeinf.SC_REG register ### ida_typeinf.SC_AUTO auto ### ida_typeinf.SC_FRIEND friend ### ida_typeinf.SC_VIRT virtual ### ida_typeinf.HTI_CPP C++ mode (not implemented). ### ida_typeinf.HTI_INT debug: print internal representation of types ### ida_typeinf.HTI_EXT debug: print external representation of types ### ida_typeinf.HTI_LEX debug: print tokens ### ida_typeinf.HTI_UNP debug: check the result by unpacking it ### ida_typeinf.HTI_TST test mode: discard the result ### ida_typeinf.HTI_FIL “input” is file name, otherwise “input” contains a C declaration ### ida_typeinf.HTI_MAC define macros from the base tils ### ida_typeinf.HTI_NWR no warning messages ### ida_typeinf.HTI_NER ignore all errors but display them ### ida_typeinf.HTI_DCL don’t complain about redeclarations ### ida_typeinf.HTI_NDC don’t decorate names ### ida_typeinf.HTI_PAK explicit structure pack value (#pragma pack) ### ida_typeinf.HTI_PAK_SHIFT shift for HTI_PAK. This field should be used if you want to remember an explicit pack value for each structure/union type. See HTI_PAK… definitions ### ida_typeinf.HTI_PAKDEF default pack value ### ida_typeinf.HTI_PAK1 #pragma pack(1) ### ida_typeinf.HTI_PAK2 #pragma pack(2) ### ida_typeinf.HTI_PAK4 #pragma pack(4) ### ida_typeinf.HTI_PAK8 #pragma pack(8) ### ida_typeinf.HTI_PAK16 #pragma pack(16) ### ida_typeinf.HTI_HIGH assume high level prototypes (with hidden args, etc) ### ida_typeinf.HTI_LOWER lower the function prototypes ### ida_typeinf.HTI_RAWARGS leave argument names unchanged (do not remove underscores) ### ida_typeinf.HTI_RELAXED accept references to unknown namespaces ### ida_typeinf.HTI_NOBASE do not inspect base tils ### ida_typeinf.HTI_SEMICOLON do not complain if the terminating semicolon is absent ### ida_typeinf.HTI_STANDALONE should parse standalone declaration, it may contain qualified name and type names, strictly speaking it is not a valid C++ code, IDA Pro specific ### ida_typeinf.HTI_VOID_OK accept void as a standalone type ### ida_typeinf.HTI_NO_MANGLE don’t mangle name (see HTI_NDC) ### ida_typeinf.convert_pt_flags_to_hti(pt_flags: [int](https://docs.python.org/3/library/functions.html#int)) → [int](https://docs.python.org/3/library/functions.html#int) Convert Type parsing flags to Type formatting flags . Type parsing flags lesser than 0x10 don’t have stable meaning and will be ignored (more on these flags can be seen in idc.idc) ### ida_typeinf.parse_decl(out_tif: [tinfo_t](#ida_typeinf.tinfo_t), til: [til_t](#ida_typeinf.til_t), decl: [str](https://docs.python.org/3/library/stdtypes.html#str), pt_flags: [int](https://docs.python.org/3/library/functions.html#int)) → [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None) Parse ONE declaration. If the input string contains more than one declaration, the first complete type declaration (PT_TYP) or the last variable declaration (PT_VAR) will be used. * **Parameters:** * **out_tif** – (output) receives the parsed type info * **til** – type library to use. May be None * **decl** – C declaration to parse * **pt_flags** – combination of ``` PT_ ``` … bits * **Returns:** the declared name on success (may be empty), or None if the declaration is bad. On failure, an error message is displayed unless PT_SIL is set. ### ida_typeinf.PT_SIL silent, no messages ### ida_typeinf.PT_NDC don’t decorate names ### ida_typeinf.PT_TYP return declared type information ### ida_typeinf.PT_VAR return declared object information ### ida_typeinf.PT_PACKMASK mask for pack alignment values ### ida_typeinf.PT_HIGH assume high level prototypes (with hidden args, etc) ### ida_typeinf.PT_LOWER lower the function prototypes ### ida_typeinf.PT_REPLACE replace the old type (used in idc) ### ida_typeinf.PT_RAWARGS leave argument names unchanged (do not remove underscores) ### ida_typeinf.PT_RELAXED accept references to unknown namespaces ### ida_typeinf.PT_EMPTY accept empty decl ### ida_typeinf.PT_SEMICOLON append the terminating semicolon ### ida_typeinf.PT_SYMBOL accept a symbol name and return its type. e.g. “LoadLibrary” will return its prototype ### ida_typeinf.PT_VOID_OK accept void as a standalone type ### ida_typeinf.PT_NO_MANGLE don’t mangle name (see PT_NDC) ### ida_typeinf.parse_decls(til: til_t, input: str, printer: printer_t \*, hti_flags: int) → [int](https://docs.python.org/3/library/functions.html#int) Parse many declarations and store them in a til. If there are any errors, they will be printed using ‘printer’. This function uses default include path and predefined macros from the database settings. It always uses the HTI_DCL bit. * **Parameters:** * **til** – type library to store the result * **input** – input string or file name (see hti_flags) * **printer** – function to output error messages (use msg or nullptr or your own callback) * **hti_flags** – combination of Type formatting flags * **Returns:** number of errors, 0 means ok. ### ida_typeinf.print_type(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), prtype_flags: [int](https://docs.python.org/3/library/functions.html#int)) → [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None) Get the type declaration for the specified address. * **Parameters:** * **ea** – address * **prtype_flags** – combination of ``` PRTYPE_ ``` … flags * **Returns:** the type declaration, or None if the address has no type. ### ida_typeinf.PRTYPE_1LINE print to one line ### ida_typeinf.PRTYPE_MULTI print to many lines ### ida_typeinf.PRTYPE_TYPE print type declaration (not variable declaration) ### ida_typeinf.PRTYPE_PRAGMA print pragmas for alignment ### ida_typeinf.PRTYPE_SEMI append ; to the end ### ida_typeinf.PRTYPE_CPP use c++ name (only for print_type()) ### ida_typeinf.PRTYPE_DEF tinfo_t: print definition, if available ### ida_typeinf.PRTYPE_NOARGS tinfo_t: do not print function argument names ### ida_typeinf.PRTYPE_NOARRS tinfo_t: print arguments with FAI_ARRAY as pointers ### ida_typeinf.PRTYPE_NORES tinfo_t: never resolve types (meaningful with PRTYPE_DEF) ### ida_typeinf.PRTYPE_RESTORE tinfo_t: print restored types for FAI_ARRAY and FAI_STRUCT ### ida_typeinf.PRTYPE_NOREGEX do not apply regular expressions to beautify name ### ida_typeinf.PRTYPE_COLORED add color tag COLOR_SYMBOL for any parentheses, commas and colons ### ida_typeinf.PRTYPE_METHODS tinfo_t: print udt methods ### ida_typeinf.PRTYPE_1LINCMT print comments even in the one line mode ### ida_typeinf.PRTYPE_HEADER print only type header (only for definitions) ### ida_typeinf.PRTYPE_OFFSETS print udt member offsets ### ida_typeinf.PRTYPE_MAXSTR limit the output length to 1024 bytes (the output may be slightly longer) ### ida_typeinf.PRTYPE_TAIL print only the definition tail (only for definitions, exclusive with PRTYPE_HEADER) ### ida_typeinf.PRTYPE_ARGLOCS print function arglocs (not only for usercall) ### ida_typeinf.NTF_TYPE type name ### ida_typeinf.NTF_SYMU symbol, name is unmangled (‘func’) ### ida_typeinf.NTF_SYMM symbol, name is mangled (‘_func’); only one of NTF_TYPE and NTF_SYMU, NTF_SYMM can be used ### ida_typeinf.NTF_NOBASE don’t inspect base tils (for get_named_type) ### ida_typeinf.NTF_REPLACE replace original type (for set_named_type) ### ida_typeinf.NTF_UMANGLED name is unmangled (don’t use this flag) ### ida_typeinf.NTF_NOCUR don’t inspect current til file (for get_named_type) ### ida_typeinf.NTF_64BIT value is 64-bit ### ida_typeinf.NTF_FIXNAME force-validate the name of the type when setting (set_named_type, set_numbered_type only) ### ida_typeinf.NTF_IDBENC the name is given in the IDB encoding; non-ASCII bytes will be decoded accordingly (set_named_type, set_numbered_type only) ### ida_typeinf.NTF_CHKSYNC check that synchronization to IDB passed OK (set_numbered_type, set_named_type) ### ida_typeinf.NTF_NO_NAMECHK do not validate type name (set_numbered_type, set_named_type) ### ida_typeinf.NTF_COPY save a new type definition, not a typeref (tinfo_t::set_numbered_type, tinfo_t::set_named_type) ### ida_typeinf.TPOS_REGCMT ### ida_typeinf.TERR_OK ok ### ida_typeinf.TERR_SAVE_ERROR failed to save ### ida_typeinf.TERR_SERIALIZE failed to serialize ### ida_typeinf.TERR_BAD_NAME name s is not acceptable ### ida_typeinf.TERR_BAD_ARG bad argument ### ida_typeinf.TERR_BAD_TYPE bad type ### ida_typeinf.TERR_BAD_SIZE bad size d ### ida_typeinf.TERR_BAD_INDEX bad index d ### ida_typeinf.TERR_BAD_ARRAY arrays are forbidden as function arguments ### ida_typeinf.TERR_BAD_BF bitfields are forbidden as function arguments ### ida_typeinf.TERR_BAD_OFFSET bad member offset s ### ida_typeinf.TERR_BAD_UNIVAR unions cannot have variable sized members ### ida_typeinf.TERR_BAD_VARLAST variable sized member must be the last member in the structure ### ida_typeinf.TERR_OVERLAP the member overlaps with other members that cannot be deleted ### ida_typeinf.TERR_BAD_SUBTYPE recursive structure nesting is forbidden ### ida_typeinf.TERR_BAD_VALUE value 0xI64X is not acceptable ### ida_typeinf.TERR_NO_BMASK bitmask 0xI64X is not found ### ida_typeinf.TERR_BAD_BMASK Bad enum member mask 0xI64X. The specified mask should not intersect with any existing mask in the enum. Zero masks are prohibited too. ### ida_typeinf.TERR_BAD_MSKVAL bad bmask and value combination (value=0xI64X; bitmask 0xI64X) ### ida_typeinf.TERR_BAD_REPR bad or incompatible field representation ### ida_typeinf.TERR_GRP_NOEMPTY could not delete group mask for not empty group 0xI64X ### ida_typeinf.TERR_DUPNAME duplicate name s ### ida_typeinf.TERR_UNION_BF unions cannot have bitfields ### ida_typeinf.TERR_BAD_TAH bad bits in the type attributes (TAH bits) ### ida_typeinf.TERR_BAD_BASE bad base class ### ida_typeinf.TERR_BAD_GAP bad gap ### ida_typeinf.TERR_NESTED recursive structure nesting is forbidden ### ida_typeinf.TERR_NOT_COMPAT the new type is not compatible with the old type ### ida_typeinf.TERR_BAD_LAYOUT failed to calculate the structure/union layout ### ida_typeinf.TERR_BAD_GROUPS bad group sizes for bitmask enum ### ida_typeinf.TERR_BAD_SERIAL enum value has too many serials ### ida_typeinf.TERR_ALIEN_NAME enum member name is used in another enum ### ida_typeinf.TERR_STOCK stock type info cannot be modified ### ida_typeinf.TERR_ENUM_SIZE bad enum size ### ida_typeinf.TERR_NOT_IMPL not implemented ### ida_typeinf.TERR_TYPE_WORSE the new type is worse than the old type ### ida_typeinf.TERR_BAD_FX_SIZE cannot extend struct beyond fixed size ### ida_typeinf.TERR_STRUCT_SIZE bad fixed structure size ### ida_typeinf.TERR_NOT_FOUND member not found ### ida_typeinf.TERR_COUNT ### ida_typeinf.tinfo_errstr(code: tinfo_code_t) → [str](https://docs.python.org/3/library/stdtypes.html#str) Helper function to convert an error code into a printable string. Additional arguments are handled using the functions from err.h ### ida_typeinf.del_named_type(ti: [til_t](#ida_typeinf.til_t), name: [str](https://docs.python.org/3/library/stdtypes.html#str), ntf_flags: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) Delete information about a symbol. * **Parameters:** * **ti** – type library * **name** – name of symbol * **ntf_flags** – combination of Flags for named types * **Returns:** success ### ida_typeinf.first_named_type(ti: [til_t](#ida_typeinf.til_t), ntf_flags: [int](https://docs.python.org/3/library/functions.html#int)) → [str](https://docs.python.org/3/library/stdtypes.html#str) Enumerate types. * **Parameters:** * **ti** – type library. nullptr means the local type library for the current database. * **ntf_flags** – combination of Flags for named types * **Returns:** Type or symbol names, depending of ntf_flags. Returns mangled names. Never returns anonymous types. To include them, enumerate types by ordinals. ### ida_typeinf.next_named_type(ti: [til_t](#ida_typeinf.til_t), name: [str](https://docs.python.org/3/library/stdtypes.html#str), ntf_flags: [int](https://docs.python.org/3/library/functions.html#int)) → [str](https://docs.python.org/3/library/stdtypes.html#str) Enumerate types. * **Parameters:** * **ti** – type library. nullptr means the local type library for the current database. * **name** – the current name. the name that follows this one will be returned. * **ntf_flags** – combination of Flags for named types * **Returns:** Type or symbol names, depending of ntf_flags. Returns mangled names. Never returns anonymous types. To include them, enumerate types by ordinals. ### ida_typeinf.copy_named_type(dsttil: [til_t](#ida_typeinf.til_t), srctil: [til_t](#ida_typeinf.til_t), name: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [int](https://docs.python.org/3/library/functions.html#int) Copy a named type from one til to another. This function will copy the specified type and all dependent types from the source type library to the destination library. * **Parameters:** * **dsttil** – Destination til. It must have ordinal types enabled * **srctil** – Source til. * **name** – name of the type to copy, can not be an ordinal name is_ordinal_name() * **Returns:** ordinal number of the copied type. 0 means error ### ida_typeinf.decorate_name(\*args) → [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None) Decorate/undecorate a C symbol name. This function has the following signatures: > 1. decorate_name(name: str, should_decorate: bool) -> Union[str, None] > 2. decorate_name(name: str, should_decorate: bool, cc: int, > : type: tinfo_t = None) -> Union[str, None] * **Parameters:** * **name** – name of symbol * **should_decorate** – True to decorate, False to undecorate * **cc** – calling convention (form 2) * **type** – type info (form 2, may be None) * **Returns:** the (un)decorated name, or None on failure. ### ida_typeinf.gen_decorate_name(name: [str](https://docs.python.org/3/library/stdtypes.html#str), should_decorate: [bool](https://docs.python.org/3/library/functions.html#bool), cc: callcnv_t, type: [tinfo_t](#ida_typeinf.tinfo_t)) → [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None) Generic function for decorate_name() (may be used in IDP modules). ### ida_typeinf.calc_c_cpp_name(name: [str](https://docs.python.org/3/library/stdtypes.html#str), type: [tinfo_t](#ida_typeinf.tinfo_t), ccn_flags: [int](https://docs.python.org/3/library/functions.html#int)) → [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None) Get C or C++ form of the name. * **Parameters:** * **name** – original (mangled or decorated) name * **type** – name type if known, otherwise nullptr * **ccn_flags** – one of C/C++ naming flags ### ida_typeinf.CCN_C ### ida_typeinf.CCN_CPP ### ida_typeinf.enable_numbered_types(ti: [til_t](#ida_typeinf.til_t), enable: [bool](https://docs.python.org/3/library/functions.html#bool)) → [bool](https://docs.python.org/3/library/functions.html#bool) Enable the use of numbered types in til. Currently it is impossible to disable numbered types once they are enabled ### ida_typeinf.alloc_type_ordinals(ti: [til_t](#ida_typeinf.til_t), qty: [int](https://docs.python.org/3/library/functions.html#int)) → [int](https://docs.python.org/3/library/functions.html#int) Allocate a range of ordinal numbers for new types. * **Parameters:** * **ti** – type library * **qty** – number of ordinals to allocate * **Returns:** the first ordinal. 0 means failure. ### ida_typeinf.alloc_type_ordinal(ti: [til_t](#ida_typeinf.til_t)) → [int](https://docs.python.org/3/library/functions.html#int) alloc_type_ordinals(ti, 1) ### ida_typeinf.get_ordinal_limit(ti: [til_t](#ida_typeinf.til_t) = None) → [int](https://docs.python.org/3/library/functions.html#int) Get number of allocated ordinals + 1. If there are no allocated ordinals, return 0. To enumerate all ordinals, use: for ( uint32 i = 1; i < limit; ++i ) * **Parameters:** **ti** – type library; nullptr means the local types for the current database. * **Returns:** uint32(-1) if ordinals have not been enabled for the til. For local types (idati), ordinals are always enabled. ### ida_typeinf.get_ordinal_count(ti: [til_t](#ida_typeinf.til_t) = None) → [int](https://docs.python.org/3/library/functions.html#int) Get number of allocated ordinals. * **Parameters:** **ti** – type library; nullptr means the local types for the current database. * **Returns:** 0 if ordinals have not been enabled for the til. ### ida_typeinf.del_numbered_type(ti: [til_t](#ida_typeinf.til_t), ordinal: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) Delete a numbered type. ### ida_typeinf.set_type_alias(ti: [til_t](#ida_typeinf.til_t), src_ordinal: [int](https://docs.python.org/3/library/functions.html#int), dst_ordinal: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) Create a type alias. Redirects all references to source type to the destination type. This is equivalent to instantaneous replacement all references to srctype by dsttype. ### ida_typeinf.get_alias_target(ti: [til_t](#ida_typeinf.til_t), ordinal: [int](https://docs.python.org/3/library/functions.html#int)) → [int](https://docs.python.org/3/library/functions.html#int) Find the final alias destination. If the ordinal has not been aliased, return the specified ordinal itself If failed, returns 0. ### ida_typeinf.get_type_ordinal(ti: [til_t](#ida_typeinf.til_t), name: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [int](https://docs.python.org/3/library/functions.html#int) Get type ordinal by its name. ### ida_typeinf.get_numbered_type_name(ti: [til_t](#ida_typeinf.til_t), ordinal: [int](https://docs.python.org/3/library/functions.html#int)) → [str](https://docs.python.org/3/library/stdtypes.html#str) Get type name (if exists) by its ordinal. If the type is anonymous, returns “”. If failed, returns nullptr ### ida_typeinf.create_numbered_type_name(ord: [int](https://docs.python.org/3/library/functions.html#int)) → [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None) Create anonymous name for a numbered type. This name can be used to reference a numbered type by its ordinal. Ordinal names have the format `'#' + set_de(ord)`. * **Parameters:** **ord** – the ordinal * **Returns:** the ordinal name, or None on error. ### ida_typeinf.is_ordinal_name(name: str, ord: uint32 \* = None) → [bool](https://docs.python.org/3/library/functions.html#bool) Check if the name is an ordinal name. Ordinal names have the following format: ‘#’ + set_de(ord) ### ida_typeinf.is_type_choosable(ti: [til_t](#ida_typeinf.til_t), ordinal: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) Check if a struct/union type is choosable * **Parameters:** * **ti** – type library * **ordinal** – ordinal number of a UDT type ### ida_typeinf.set_type_choosable(ti: [til_t](#ida_typeinf.til_t), ordinal: [int](https://docs.python.org/3/library/functions.html#int), value: [bool](https://docs.python.org/3/library/functions.html#bool)) → [None](https://docs.python.org/3/library/constants.html#None) Enable/disable ‘choosability’ flag for a struct/union type * **Parameters:** * **ti** – type library * **ordinal** – ordinal number of a UDT type * **value** – flag value ### ida_typeinf.get_vftable_ea(ordinal: [int](https://docs.python.org/3/library/functions.html#int)) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) Get address of a virtual function table. * **Parameters:** **ordinal** – ordinal number of a vftable type. * **Returns:** address of the corresponding virtual function table in the current database. ### ida_typeinf.get_vftable_ordinal(vftable_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [int](https://docs.python.org/3/library/functions.html#int) Get ordinal number of the virtual function table. * **Parameters:** **vftable_ea** – address of a virtual function table. * **Returns:** ordinal number of the corresponding vftable type. 0 - failure. ### ida_typeinf.set_vftable_ea(ordinal: [int](https://docs.python.org/3/library/functions.html#int), vftable_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Set the address of a vftable instance for a vftable type. * **Parameters:** * **ordinal** – ordinal number of the corresponding vftable type. * **vftable_ea** – address of a virtual function table. * **Returns:** success ### ida_typeinf.del_vftable_ea(ordinal: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) Delete the address of a vftable instance for a vftable type. * **Parameters:** **ordinal** – ordinal number of a vftable type. * **Returns:** success ### ida_typeinf.deref_ptr(ptr_ea: ea_t \*, tif: tinfo_t, closure_obj: ea_t \* = None) → [bool](https://docs.python.org/3/library/functions.html#bool) Dereference a pointer. * **Parameters:** **ptr_ea** – in/out parameter * in: address of the pointer * out: the pointed address * **Parameters:** * **tif** – type of the pointer * **closure_obj** – closure object (not used yet) * **Returns:** success ### ida_typeinf.add_til(name: [str](https://docs.python.org/3/library/stdtypes.html#str), flags: [int](https://docs.python.org/3/library/functions.html#int)) → [int](https://docs.python.org/3/library/functions.html#int) Load a til file and add it the database type libraries list. IDA will also apply function prototypes for matching function names. * **Parameters:** * **name** – til name * **flags** – combination of Load TIL flags * **Returns:** one of Load TIL result codes ### ida_typeinf.ADDTIL_DEFAULT default behavior ### ida_typeinf.ADDTIL_INCOMP load incompatible tils ### ida_typeinf.ADDTIL_SILENT do not ask any questions ### ida_typeinf.ADDTIL_FAILED something bad, the warning is displayed ### ida_typeinf.ADDTIL_OK ok, til is loaded ### ida_typeinf.ADDTIL_COMP ok, but til is not compatible with the current compiler ### ida_typeinf.ADDTIL_ABORTED til was not loaded (incompatible til rejected by user) ### ida_typeinf.del_til(name: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [bool](https://docs.python.org/3/library/functions.html#bool) Unload a til file. ### ida_typeinf.apply_named_type(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), name: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [bool](https://docs.python.org/3/library/functions.html#bool) Apply the specified named type to the address. * **Parameters:** * **ea** – linear address * **name** – the type name, e.g. “FILE” * **Returns:** success ### ida_typeinf.apply_tinfo(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), tif: [tinfo_t](#ida_typeinf.tinfo_t), flags: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) Apply the specified type to the specified address. This function sets the type and tries to convert the item at the specified address to conform the type. * **Parameters:** * **ea** – linear address * **tif** – new type * **flags** – combination of Apply tinfo flags * **Returns:** success ### ida_typeinf.TINFO_GUESSED this is a guessed type ### ida_typeinf.TINFO_DEFINITE this is a definite type ### ida_typeinf.TINFO_DELAYFUNC if type is a function and no function exists at ea, schedule its creation and argument renaming to auto-analysis, otherwise try to create it immediately ### ida_typeinf.TINFO_STRICT never convert given type to another one before applying ### ida_typeinf.apply_cdecl(til: [til_t](#ida_typeinf.til_t), ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), decl: [str](https://docs.python.org/3/library/stdtypes.html#str), flags: [int](https://docs.python.org/3/library/functions.html#int) = 0) → [bool](https://docs.python.org/3/library/functions.html#bool) Apply the specified type to the address. This function parses the declaration and calls apply_tinfo() * **Parameters:** * **til** – type library * **ea** – linear address * **decl** – type declaration in C form * **flags** – flags to pass to apply_tinfo (TINFO_DEFINITE is always passed) * **Returns:** success ### ida_typeinf.apply_callee_tinfo(caller: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), tif: [tinfo_t](#ida_typeinf.tinfo_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Apply the type of the called function to the calling instruction. This function will append parameter comments and rename the local variables of the calling function. It also stores information about the instructions that initialize call arguments in the database. Use get_arg_addrs() to retrieve it if necessary. Alternatively it is possible to hook to processor_t::arg_addrs_ready event. * **Parameters:** * **caller** – linear address of the calling instruction. must belong to a function. * **tif** – type info * **Returns:** success ### ida_typeinf.apply_once_tinfo_and_name(dea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), tif: [tinfo_t](#ida_typeinf.tinfo_t), name: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [bool](https://docs.python.org/3/library/functions.html#bool) Apply the specified type and name to the address. This function checks if the address already has a type. If the old type does not exist or the new type is ‘better’ than the old type, then the new type will be applied. A type is considered better if it has more information (e.g. BTMT_STRUCT is better than BT_INT). The same logic is with the name: if the address already have a meaningful name, it will be preserved. Only if the old name does not exist or it is a dummy name like byte_123, it will be replaced by the new name. * **Parameters:** * **dea** – linear address * **tif** – new type * **name** – new name for the address * **Returns:** success ### ida_typeinf.guess_tinfo(out: [tinfo_t](#ida_typeinf.tinfo_t), id: tid_t) → [int](https://docs.python.org/3/library/functions.html#int) Generate a type information about the id from the disassembly. id can be a structure/union/enum id or an address. * **Returns:** one of Guess tinfo codes ### ida_typeinf.GUESS_FUNC_FAILED couldn’t guess the function type ### ida_typeinf.GUESS_FUNC_TRIVIAL the function type doesn’t have interesting info ### ida_typeinf.GUESS_FUNC_OK ok, some non-trivial information is gathered ### ida_typeinf.set_c_header_path(incdir: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [None](https://docs.python.org/3/library/constants.html#None) Set include directory path the target compiler. ### ida_typeinf.get_c_header_path() → [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None) Get the include directory path of the target compiler. ### ida_typeinf.set_c_macros(macros: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [None](https://docs.python.org/3/library/constants.html#None) Set predefined macros for the target compiler. ### ida_typeinf.get_c_macros() → [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None) Get predefined macros for the target compiler. ### ida_typeinf.get_idati() → til_t \* Pointer to the local type library - this til is private for each IDB file Functions that accept til_t\* default to idati when is nullptr provided. ### ida_typeinf.get_idainfo_by_type(tif: [tinfo_t](#ida_typeinf.tinfo_t)) → size_t \*, flags64_t \*, opinfo_t \*, size_t \* Extract information from a tinfo_t. * **Parameters:** **tif** – the type to inspect ### ida_typeinf.get_tinfo_by_flags(out: [tinfo_t](#ida_typeinf.tinfo_t), flags: flags64_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Get tinfo object that corresponds to data flags * **Parameters:** * **out** – type info * **flags** – simple flags (byte, word, …, zword) ### ida_typeinf.STI_PCHAR char \* ### ida_typeinf.STI_PUCHAR uint8 \* ### ida_typeinf.STI_PCCHAR const char \* ### ida_typeinf.STI_PCUCHAR const uint8 \* ### ida_typeinf.STI_PBYTE \_BYTE \* ### ida_typeinf.STI_PINT int \* ### ida_typeinf.STI_PUINT unsigned int \* ### ida_typeinf.STI_PVOID void \* ### ida_typeinf.STI_PPVOID void \*\* ### ida_typeinf.STI_PCVOID const void \* ### ida_typeinf.STI_ACHAR char[] ### ida_typeinf.STI_AUCHAR uint8[] ### ida_typeinf.STI_ACCHAR const char[] ### ida_typeinf.STI_ACUCHAR const uint8[] ### ida_typeinf.STI_FPURGING void \_\_userpurge(int) ### ida_typeinf.STI_FDELOP void \_\_cdecl(void ``` * ``` ) ### ida_typeinf.STI_MSGSEND void ``` * ``` (void ``` * ``` , const char ``` * ``` , …) ### ida_typeinf.STI_AEABI_LCMP int \_\_fastcall \_\_pure(int64 x, int64 y) ### ida_typeinf.STI_AEABI_ULCMP int \_\_fastcall \_\_pure(uint64 x, uint64 y) ### ida_typeinf.STI_DONT_USE unused stock type id; should not be used ### ida_typeinf.STI_SIZE_T size_t ### ida_typeinf.STI_SSIZE_T ssize_t ### ida_typeinf.STI_AEABI_MEMCPY void \_\_fastcall(void ``` * ``` , const void ``` * ``` , size_t) ### ida_typeinf.STI_AEABI_MEMSET void \_\_fastcall(void ``` * ``` , size_t, int) ### ida_typeinf.STI_AEABI_MEMCLR void \_\_fastcall(void ``` * ``` , size_t) ### ida_typeinf.STI_RTC_CHECK_2 int16 \_\_fastcall(int16 x) ### ida_typeinf.STI_RTC_CHECK_4 int32 \_\_fastcall(int32 x) ### ida_typeinf.STI_RTC_CHECK_8 int64 \_\_fastcall(int64 x) ### ida_typeinf.STI_COMPLEX64 struct complex64_t { float real, imag; } ### ida_typeinf.STI_COMPLEX128 struct complex128_t { double real, imag; } ### ida_typeinf.STI_PUNKNOWN \_UNKNOWN \* ### ida_typeinf.STI_LAST ### ida_typeinf.ETF_NO_SAVE don’t save to til (normally typerefs are saved to til) A call with ETF_NO_SAVE must be followed by a call without it. Otherwise there may be inconsistencies between the memory and the type library. ### ida_typeinf.ETF_NO_LAYOUT don’t calc type layout before editing ### ida_typeinf.ETF_MAY_DESTROY may destroy other members ### ida_typeinf.ETF_COMPATIBLE new type must be compatible with the old ### ida_typeinf.ETF_FUNCARG udm - member is a function argument (cannot create arrays) ### ida_typeinf.ETF_FORCENAME anyway use name, see below for more usage description ### ida_typeinf.ETF_AUTONAME udm - generate a member name if was not specified (add_udm, set_udm_type) ### ida_typeinf.ETF_BYTIL udm - new type was created by the type subsystem ### ida_typeinf.ETF_NO_ARRAY add_udm, set_udm_type - do not convert type to an array on the size mismatch ### ida_typeinf.GTD_CALC_LAYOUT calculate udt layout ### ida_typeinf.GTD_NO_LAYOUT don’t calculate udt layout please note that udt layout may have been calculated earlier ### ida_typeinf.GTD_DEL_BITFLDS delete udt bitfields ### ida_typeinf.GTD_CALC_ARGLOCS calculate func arg locations ### ida_typeinf.GTD_NO_ARGLOCS don’t calculate func arg locations please note that the locations may have been calculated earlier ### ida_typeinf.GTS_NESTED nested type (embedded into a udt) ### ida_typeinf.GTS_BASECLASS is baseclass of a udt ### ida_typeinf.SUDT_SORT fields are not sorted by offset, sort them first ### ida_typeinf.SUDT_ALIGN recalculate field alignments, struct packing, etc to match the offsets and size info ### ida_typeinf.SUDT_GAPS allow to fill gaps with additional members (_BYTE[]) ### ida_typeinf.SUDT_UNEX references to nonexistent member types are acceptable; in this case it is better to set the corresponding udm_t::fda field to the type alignment. If this field is not set, ida will try to guess the alignment. ### ida_typeinf.SUDT_FAST serialize without verifying offsets and alignments ### ida_typeinf.SUDT_CONST only for serialize_udt: make type const ### ida_typeinf.SUDT_VOLATILE only for serialize_udt: make type volatile ### ida_typeinf.SUDT_TRUNC serialize: truncate useless strings from fields, fldcmts ### ida_typeinf.SUDT_SERDEF serialize: if a typeref, serialize its definition ### ida_typeinf.copy_tinfo_t(\_this: [tinfo_t](#ida_typeinf.tinfo_t), r: [tinfo_t](#ida_typeinf.tinfo_t)) → [None](https://docs.python.org/3/library/constants.html#None) ### ida_typeinf.detach_tinfo_t(\_this: [tinfo_t](#ida_typeinf.tinfo_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_typeinf.clear_tinfo_t(\_this: [tinfo_t](#ida_typeinf.tinfo_t)) → [None](https://docs.python.org/3/library/constants.html#None) ### ida_typeinf.create_tinfo(\_this: tinfo_t, bt: type_t, bt2: type_t, ptr: void \*) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_typeinf.verify_tinfo(typid: typid_t) → [int](https://docs.python.org/3/library/functions.html#int) ### ida_typeinf.get_tinfo_details(typid: typid_t, bt2: type_t, buf: void \*) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_typeinf.get_tinfo_size(p_effalign: uint32 \*, typid: typid_t, gts_code: int) → [int](https://docs.python.org/3/library/functions.html#int) ### ida_typeinf.get_tinfo_pdata(outptr: void \*, typid: typid_t, what: int) → [int](https://docs.python.org/3/library/functions.html#int) ### ida_typeinf.get_tinfo_property(typid: typid_t, gta_prop: [int](https://docs.python.org/3/library/functions.html#int)) → [int](https://docs.python.org/3/library/functions.html#int) ### ida_typeinf.get_tinfo_property4(typid: typid_t, gta_prop: [int](https://docs.python.org/3/library/functions.html#int), p1: [int](https://docs.python.org/3/library/functions.html#int), p2: [int](https://docs.python.org/3/library/functions.html#int), p3: [int](https://docs.python.org/3/library/functions.html#int), p4: [int](https://docs.python.org/3/library/functions.html#int)) → [int](https://docs.python.org/3/library/functions.html#int) ### ida_typeinf.set_tinfo_property(tif: [tinfo_t](#ida_typeinf.tinfo_t), sta_prop: [int](https://docs.python.org/3/library/functions.html#int), x: [int](https://docs.python.org/3/library/functions.html#int)) → [int](https://docs.python.org/3/library/functions.html#int) ### ida_typeinf.set_tinfo_property4(tif: [tinfo_t](#ida_typeinf.tinfo_t), sta_prop: [int](https://docs.python.org/3/library/functions.html#int), p1: [int](https://docs.python.org/3/library/functions.html#int), p2: [int](https://docs.python.org/3/library/functions.html#int), p3: [int](https://docs.python.org/3/library/functions.html#int), p4: [int](https://docs.python.org/3/library/functions.html#int)) → [int](https://docs.python.org/3/library/functions.html#int) ### ida_typeinf.serialize_tinfo(type: qtype \*, fields: qtype \*, fldcmts: qtype \*, tif: tinfo_t, sudt_flags: int) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_typeinf.find_tinfo_udt_member(udm: [udm_t](#ida_typeinf.udm_t), typid: typid_t, strmem_flags: [int](https://docs.python.org/3/library/functions.html#int)) → [int](https://docs.python.org/3/library/functions.html#int) ### ida_typeinf.print_tinfo(prefix: [str](https://docs.python.org/3/library/stdtypes.html#str), indent: [int](https://docs.python.org/3/library/functions.html#int), cmtindent: [int](https://docs.python.org/3/library/functions.html#int), flags: [int](https://docs.python.org/3/library/functions.html#int), tif: [tinfo_t](#ida_typeinf.tinfo_t), name: [str](https://docs.python.org/3/library/stdtypes.html#str), cmt: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None) ### ida_typeinf.dstr_tinfo(tif: [tinfo_t](#ida_typeinf.tinfo_t)) → [str](https://docs.python.org/3/library/stdtypes.html#str) ### ida_typeinf.visit_subtypes(visitor: [tinfo_visitor_t](#ida_typeinf.tinfo_visitor_t), out: [type_mods_t](#ida_typeinf.type_mods_t), tif: [tinfo_t](#ida_typeinf.tinfo_t), name: [str](https://docs.python.org/3/library/stdtypes.html#str), cmt: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [int](https://docs.python.org/3/library/functions.html#int) ### ida_typeinf.compare_tinfo(t1: typid_t, t2: typid_t, tcflags: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_typeinf.lexcompare_tinfo(t1: typid_t, t2: typid_t, arg3: [int](https://docs.python.org/3/library/functions.html#int)) → [int](https://docs.python.org/3/library/functions.html#int) ### ida_typeinf.get_stock_tinfo(tif: [tinfo_t](#ida_typeinf.tinfo_t), id: stock_type_id_t) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_typeinf.read_tinfo_bitfield_value(typid: typid_t, v: uint64, bitoff: [int](https://docs.python.org/3/library/functions.html#int)) → uint64 ### ida_typeinf.write_tinfo_bitfield_value(typid: typid_t, dst: uint64, v: uint64, bitoff: [int](https://docs.python.org/3/library/functions.html#int)) → uint64 ### ida_typeinf.get_tinfo_attr(typid: typid_t, key: str, bv: bytevec_t \*, all_attrs: bool) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_typeinf.set_tinfo_attr(tif: [tinfo_t](#ida_typeinf.tinfo_t), ta: [type_attr_t](#ida_typeinf.type_attr_t), may_overwrite: [bool](https://docs.python.org/3/library/functions.html#bool)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_typeinf.del_tinfo_attr(tif: [tinfo_t](#ida_typeinf.tinfo_t), key: [str](https://docs.python.org/3/library/stdtypes.html#str), make_copy: [bool](https://docs.python.org/3/library/functions.html#bool)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_typeinf.get_tinfo_attrs(typid: typid_t, tav: [type_attrs_t](#ida_typeinf.type_attrs_t), include_ref_attrs: [bool](https://docs.python.org/3/library/functions.html#bool)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_typeinf.set_tinfo_attrs(tif: [tinfo_t](#ida_typeinf.tinfo_t), ta: [type_attrs_t](#ida_typeinf.type_attrs_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_typeinf.score_tinfo(tif: [tinfo_t](#ida_typeinf.tinfo_t)) → [int](https://docs.python.org/3/library/functions.html#int) ### ida_typeinf.save_tinfo(tif: [tinfo_t](#ida_typeinf.tinfo_t), til: [til_t](#ida_typeinf.til_t), ord: [int](https://docs.python.org/3/library/functions.html#int), name: [str](https://docs.python.org/3/library/stdtypes.html#str), ntf_flags: [int](https://docs.python.org/3/library/functions.html#int)) → tinfo_code_t ### ida_typeinf.append_tinfo_covered(out: [rangeset_t](../ida_range/index.md#ida_range.rangeset_t), typid: typid_t, offset: uint64) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_typeinf.calc_tinfo_gaps(out: [rangeset_t](../ida_range/index.md#ida_range.rangeset_t), typid: typid_t) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_typeinf.value_repr_t_\_from_opinfo(\_this: [value_repr_t](#ida_typeinf.value_repr_t), flags: flags64_t, afl: aflags_t, opinfo: [opinfo_t](../ida_nalt/index.md#ida_nalt.opinfo_t), ap: [array_parameters_t](../ida_nalt/index.md#ida_nalt.array_parameters_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_typeinf.value_repr_t_\_print_(\_this: [value_repr_t](#ida_typeinf.value_repr_t), colored: [bool](https://docs.python.org/3/library/functions.html#bool)) → [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None) ### ida_typeinf.udt_type_data_t_\_find_member(\_this: [udt_type_data_t](#ida_typeinf.udt_type_data_t), udm: [udm_t](#ida_typeinf.udm_t), strmem_flags: [int](https://docs.python.org/3/library/functions.html#int)) → ssize_t ### ida_typeinf.udt_type_data_t_\_get_best_fit_member(\_this: [udt_type_data_t](#ida_typeinf.udt_type_data_t), disp: asize_t) → ssize_t ### ida_typeinf.udt_type_data_t_\_deduplicate_members(\_this: [udt_type_data_t](#ida_typeinf.udt_type_data_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_typeinf.get_tinfo_by_edm_name(tif: [tinfo_t](#ida_typeinf.tinfo_t), til: [til_t](#ida_typeinf.til_t), mname: [str](https://docs.python.org/3/library/stdtypes.html#str)) → ssize_t ### *class* ida_typeinf.tinfo_t(\*args, ordinal=None, name=None, tid=None, til=None) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### clear() → [None](https://docs.python.org/3/library/constants.html#None) Clear contents of this tinfo, and remove from the type system. #### swap(r: [tinfo_t](#ida_typeinf.tinfo_t)) → [None](https://docs.python.org/3/library/constants.html#None) Assign this = r and r = this. #### get_named_type(\*args) → [bool](https://docs.python.org/3/library/functions.html#bool) This function has the following signatures: > 1. get_named_type(til: const til_t > ``` > * > ``` > , name: str, decl_type: type_t=BTF_TYPEDEF, resolve: bool=true, try_ordinal: bool=true) -> bool > 2. get_named_type(name: str, decl_type: type_t=BTF_TYPEDEF, resolve: bool=true, try_ordinal: bool=true) -> bool # 0: get_named_type(til: const til_t ``` * ``` , name: str, decl_type: type_t=BTF_TYPEDEF, resolve: bool=true, try_ordinal: bool=true) -> bool Create a tinfo_t object for an existing named type. # 1: get_named_type(name: str, decl_type: type_t=BTF_TYPEDEF, resolve: bool=true, try_ordinal: bool=true) -> bool #### get_numbered_type(\*args) → [bool](https://docs.python.org/3/library/functions.html#bool) This function has the following signatures: > 1. get_numbered_type(til: const til_t > ``` > * > ``` > , ordinal: int, decl_type: type_t=BTF_TYPEDEF, resolve: bool=true) -> bool > 2. get_numbered_type(ordinal: int, decl_type: type_t=BTF_TYPEDEF, resolve: bool=true) -> bool # 0: get_numbered_type(til: const til_t ``` * ``` , ordinal: int, decl_type: type_t=BTF_TYPEDEF, resolve: bool=true) -> bool Create a tinfo_t object for an existing ordinal type. # 1: get_numbered_type(ordinal: int, decl_type: type_t=BTF_TYPEDEF, resolve: bool=true) -> bool #### detach() → [bool](https://docs.python.org/3/library/functions.html#bool) Detach tinfo_t from the underlying type. After calling this finction, tinfo_t will lose its link to the underlying named or numbered type (if any) and will become a reference to a unique type. After that, any modifications to tinfo_t will affect only its type. #### is_correct() → [bool](https://docs.python.org/3/library/functions.html#bool) Is the type object correct? It is possible to create incorrect types. For example, we can define a function that returns an enum and then delete the enum type. If this function returns false, the type should not be used in disassembly. Please note that this function does not verify all involved types: for example, pointers to undefined types are permitted. #### get_realtype(full: [bool](https://docs.python.org/3/library/functions.html#bool) = False) → type_t Get the resolved base type. Deserialization options: \* if full=true, the referenced type will be deserialized fully, this may not always be desirable (slows down things) \* if full=false, we just return the base type, the referenced type will be resolved again later if necessary (this may lead to multiple resolvings of the same type) imho full=false is a better approach because it does not perform unnecessary actions just in case. however, in some cases the caller knows that it is very likely that full type info will be required. in those cases full=true makes sense #### get_decltype() → type_t Get declared type (without resolving type references; they are returned as is). Obviously this is a very fast function and should be used instead of get_realtype() if possible. Please note that for typerefs this function will return BTF_TYPEDEF. To determine if a typeref is a typedef, use is_typedef() #### empty() → [bool](https://docs.python.org/3/library/functions.html#bool) Was tinfo_t initialized with some type info or not? #### present() → [bool](https://docs.python.org/3/library/functions.html#bool) Is the type really present? (not a reference to a missing type, for example). #### get_size(p_effalign: uint32 \* = None, gts_code: int = 0) → [int](https://docs.python.org/3/library/functions.html#int) Get the type size in bytes. * **Parameters:** * **p_effalign** – buffer for the alignment value * **gts_code** – combination of ``` GTS_ ``` … constants * **Returns:** BADSIZE in case of problems #### get_unpadded_size() → [int](https://docs.python.org/3/library/functions.html#int) Get the type size in bytes without the final padding, in bytes. For some UDTs get_unpadded_size() != get_size() #### get_alignment() → [int](https://docs.python.org/3/library/functions.html#int) Get type alignment This function returns the effective type alignment. Zero means error. #### get_sign() → type_sign_t Get type sign. #### is_signed() → [bool](https://docs.python.org/3/library/functions.html#bool) Is this a signed type? #### is_unsigned() → [bool](https://docs.python.org/3/library/functions.html#bool) Is this an unsigned type? #### get_declalign() → uchar Get declared alignment of the type. #### is_typeref() → [bool](https://docs.python.org/3/library/functions.html#bool) Is this type a type reference? #### has_details() → [bool](https://docs.python.org/3/library/functions.html#bool) Does this type refer to a nontrivial type? #### get_type_name() → [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None) Does a type refer to a name? If yes, fill the provided buffer with the type name and return true. Names are returned for numbered types too: either a user-defined nice name or, if a user-provided name does not exist, an ordinal name (like #xx, see create_numbered_type_name()). #### get_nice_type_name() → [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None) Get the beautified type name. Get the referenced name and apply regular expressions from goodname.cfg to beautify the name #### build_anon_type_name() → [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None) Generate a name like $hex_numbers based on the field types and names. #### rename_type(name: [str](https://docs.python.org/3/library/stdtypes.html#str), ntf_flags: [int](https://docs.python.org/3/library/functions.html#int) = 0) → tinfo_code_t Rename a type * **Parameters:** * **name** – new type name * **ntf_flags** – Flags for named types #### get_final_type_name() → [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None) Use in the case of typedef chain (TYPE1 -> TYPE2 -> TYPE3…TYPEn). * **Returns:** the name of the last type in the chain (TYPEn). if there is no chain, returns TYPE1 #### get_next_type_name() → [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None) In the case of a typedef chain (TYPE1 -> TYPE2 -> TYPE3 … TYPEn), return the name of the next type in the chain (TYPE2). * **Returns:** the next type name in the chain, or None if there is no chain. #### get_tid() → tid_t Get the type tid Each type in the local type library has a so-called tid associated with it. The tid is used to collect xrefs to the type. The tid is created when the type is created in the local type library and does not change afterwards. It can be passed to xref-related functions instead of the address. * **Returns:** tid or BADADDR #### force_tid() → tid_t Get the type tid. Create if it does not exist yet. If the type comes from a base til, the type will be copied to the local til and a new tid will be created for it. (if the type comes from a base til, it does not have a tid yet). If the type comes from the local til, this function is equivalent to get_tid() * **Returns:** tid or BADADDR #### get_ordinal() → [int](https://docs.python.org/3/library/functions.html#int) Get type ordinal (only if the type was created as a numbered type, 0 if none). #### get_final_ordinal() → [int](https://docs.python.org/3/library/functions.html#int) Get final type ordinal (0 if none). #### get_til() → til_t \* Get the type library for tinfo_t. #### is_from_subtil() → [bool](https://docs.python.org/3/library/functions.html#bool) Was the named type found in some base type library (not the top level type library)? If yes, it usually means that the type comes from some loaded type library, not the local type library for the database #### is_forward_decl() → [bool](https://docs.python.org/3/library/functions.html#bool) Is this a forward declaration? Forward declarations are placeholders: the type definition does not exist #### get_forward_type() → type_t Get type of a forward declaration. For a forward declaration this function returns its base type. In other cases it returns BT_UNK #### is_forward_struct() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_forward_union() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_forward_enum() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_typedef() → [bool](https://docs.python.org/3/library/functions.html#bool) Is this a typedef? This function will return true for a reference to a local type that is declared as a typedef. #### get_type_cmt() → [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None) Get the type comment. * **Returns:** the regular or repeatable comment, or None if there is no comment. #### get_type_rptcmt() → [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None) Get type comment only if it is repeatable. #### is_decl_const() → [bool](https://docs.python.org/3/library/functions.html#bool) is_type_const(get_decltype()) #### is_decl_volatile() → [bool](https://docs.python.org/3/library/functions.html#bool) is_type_volatile(get_decltype()) #### is_decl_void() → [bool](https://docs.python.org/3/library/functions.html#bool) is_type_void(get_decltype()) #### is_decl_partial() → [bool](https://docs.python.org/3/library/functions.html#bool) is_type_partial(get_decltype()) #### is_decl_unknown() → [bool](https://docs.python.org/3/library/functions.html#bool) is_type_unknown(get_decltype()) #### is_decl_last() → [bool](https://docs.python.org/3/library/functions.html#bool) is_typeid_last(get_decltype()) #### is_decl_ptr() → [bool](https://docs.python.org/3/library/functions.html#bool) is_type_ptr(get_decltype()) #### is_decl_array() → [bool](https://docs.python.org/3/library/functions.html#bool) is_type_array(get_decltype()) #### is_decl_func() → [bool](https://docs.python.org/3/library/functions.html#bool) is_type_func(get_decltype()) #### is_decl_complex() → [bool](https://docs.python.org/3/library/functions.html#bool) is_type_complex(get_decltype()) #### is_decl_typedef() → [bool](https://docs.python.org/3/library/functions.html#bool) is_type_typedef(get_decltype()) #### is_decl_sue() → [bool](https://docs.python.org/3/library/functions.html#bool) is_type_sue(get_decltype()) #### is_decl_struct() → [bool](https://docs.python.org/3/library/functions.html#bool) is_type_struct(get_decltype()) #### is_decl_union() → [bool](https://docs.python.org/3/library/functions.html#bool) is_type_union(get_decltype()) #### is_decl_udt() → [bool](https://docs.python.org/3/library/functions.html#bool) is_type_struni(get_decltype()) #### is_decl_enum() → [bool](https://docs.python.org/3/library/functions.html#bool) is_type_enum(get_decltype()) #### is_decl_bitfield() → [bool](https://docs.python.org/3/library/functions.html#bool) is_type_bitfld(get_decltype()) #### is_decl_int128() → [bool](https://docs.python.org/3/library/functions.html#bool) is_type_int128(get_decltype()) #### is_decl_int64() → [bool](https://docs.python.org/3/library/functions.html#bool) is_type_int64(get_decltype()) #### is_decl_int32() → [bool](https://docs.python.org/3/library/functions.html#bool) is_type_int32(get_decltype()) #### is_decl_int16() → [bool](https://docs.python.org/3/library/functions.html#bool) is_type_int16(get_decltype()) #### is_decl_int() → [bool](https://docs.python.org/3/library/functions.html#bool) is_type_int(get_decltype()) #### is_decl_char() → [bool](https://docs.python.org/3/library/functions.html#bool) is_type_char(get_decltype()) #### is_decl_uint() → [bool](https://docs.python.org/3/library/functions.html#bool) is_type_uint(get_decltype()) #### is_decl_uchar() → [bool](https://docs.python.org/3/library/functions.html#bool) is_type_uchar(get_decltype()) #### is_decl_uint16() → [bool](https://docs.python.org/3/library/functions.html#bool) is_type_uint16(get_decltype()) #### is_decl_uint32() → [bool](https://docs.python.org/3/library/functions.html#bool) is_type_uint32(get_decltype()) #### is_decl_uint64() → [bool](https://docs.python.org/3/library/functions.html#bool) is_type_uint64(get_decltype()) #### is_decl_uint128() → [bool](https://docs.python.org/3/library/functions.html#bool) is_type_uint128(get_decltype()) #### is_decl_ldouble() → [bool](https://docs.python.org/3/library/functions.html#bool) is_type_ldouble(get_decltype()) #### is_decl_double() → [bool](https://docs.python.org/3/library/functions.html#bool) is_type_double(get_decltype()) #### is_decl_float() → [bool](https://docs.python.org/3/library/functions.html#bool) is_type_float(get_decltype()) #### is_decl_tbyte() → [bool](https://docs.python.org/3/library/functions.html#bool) is_type_tbyte(get_decltype()) #### is_decl_floating() → [bool](https://docs.python.org/3/library/functions.html#bool) is_type_floating(get_decltype()) #### is_decl_bool() → [bool](https://docs.python.org/3/library/functions.html#bool) is_type_bool(get_decltype()) #### is_decl_paf() → [bool](https://docs.python.org/3/library/functions.html#bool) is_type_paf(get_decltype()) #### is_well_defined() → [bool](https://docs.python.org/3/library/functions.html#bool) !(empty()) && !(is_decl_partial()) && !(is_punknown()) #### is_const() → [bool](https://docs.python.org/3/library/functions.html#bool) is_type_const(get_realtype()) #### is_volatile() → [bool](https://docs.python.org/3/library/functions.html#bool) is_type_volatile(get_realtype()) #### is_void() → [bool](https://docs.python.org/3/library/functions.html#bool) is_type_void(get_realtype()) #### is_partial() → [bool](https://docs.python.org/3/library/functions.html#bool) is_type_partial(get_realtype()) #### is_unknown() → [bool](https://docs.python.org/3/library/functions.html#bool) is_type_unknown(get_realtype()) #### is_ptr() → [bool](https://docs.python.org/3/library/functions.html#bool) is_type_ptr(get_realtype()) #### is_array() → [bool](https://docs.python.org/3/library/functions.html#bool) is_type_array(get_realtype()) #### is_func() → [bool](https://docs.python.org/3/library/functions.html#bool) is_type_func(get_realtype()) #### is_complex() → [bool](https://docs.python.org/3/library/functions.html#bool) is_type_complex(get_realtype()) #### is_struct() → [bool](https://docs.python.org/3/library/functions.html#bool) is_type_struct(get_realtype()) #### is_union() → [bool](https://docs.python.org/3/library/functions.html#bool) is_type_union(get_realtype()) #### is_udt() → [bool](https://docs.python.org/3/library/functions.html#bool) is_type_struni(get_realtype()) #### is_enum() → [bool](https://docs.python.org/3/library/functions.html#bool) is_type_enum(get_realtype()) #### is_sue() → [bool](https://docs.python.org/3/library/functions.html#bool) is_type_sue(get_realtype()) #### is_bitfield() → [bool](https://docs.python.org/3/library/functions.html#bool) is_type_bitfld(get_realtype()) #### is_int128() → [bool](https://docs.python.org/3/library/functions.html#bool) is_type_int128(get_realtype()) #### is_int64() → [bool](https://docs.python.org/3/library/functions.html#bool) is_type_int64(get_realtype()) #### is_int32() → [bool](https://docs.python.org/3/library/functions.html#bool) is_type_int32(get_realtype()) #### is_int16() → [bool](https://docs.python.org/3/library/functions.html#bool) is_type_int16(get_realtype()) #### is_int() → [bool](https://docs.python.org/3/library/functions.html#bool) is_type_int(get_realtype()) #### is_char() → [bool](https://docs.python.org/3/library/functions.html#bool) is_type_char(get_realtype()) #### is_uint() → [bool](https://docs.python.org/3/library/functions.html#bool) is_type_uint(get_realtype()) #### is_uchar() → [bool](https://docs.python.org/3/library/functions.html#bool) is_type_uchar(get_realtype()) #### is_uint16() → [bool](https://docs.python.org/3/library/functions.html#bool) is_type_uint16(get_realtype()) #### is_uint32() → [bool](https://docs.python.org/3/library/functions.html#bool) is_type_uint32(get_realtype()) #### is_uint64() → [bool](https://docs.python.org/3/library/functions.html#bool) is_type_uint64(get_realtype()) #### is_uint128() → [bool](https://docs.python.org/3/library/functions.html#bool) is_type_uint128(get_realtype()) #### is_ldouble() → [bool](https://docs.python.org/3/library/functions.html#bool) is_type_ldouble(get_realtype()) #### is_double() → [bool](https://docs.python.org/3/library/functions.html#bool) is_type_double(get_realtype()) #### is_float() → [bool](https://docs.python.org/3/library/functions.html#bool) is_type_float(get_realtype()) #### is_tbyte() → [bool](https://docs.python.org/3/library/functions.html#bool) is_type_tbyte(get_realtype()) #### is_bool() → [bool](https://docs.python.org/3/library/functions.html#bool) is_type_bool(get_realtype()) #### is_paf() → [bool](https://docs.python.org/3/library/functions.html#bool) is_type_paf(get_realtype()) #### is_ptr_or_array() → [bool](https://docs.python.org/3/library/functions.html#bool) is_type_ptr_or_array(get_realtype()) #### is_integral() → [bool](https://docs.python.org/3/library/functions.html#bool) is_type_integral(get_realtype()) #### is_ext_integral() → [bool](https://docs.python.org/3/library/functions.html#bool) is_type_ext_integral(get_realtype()) #### is_floating() → [bool](https://docs.python.org/3/library/functions.html#bool) is_type_floating(get_realtype()) #### is_arithmetic() → [bool](https://docs.python.org/3/library/functions.html#bool) is_type_arithmetic(get_realtype()) #### is_ext_arithmetic() → [bool](https://docs.python.org/3/library/functions.html#bool) is_type_ext_arithmetic(get_realtype()) #### is_scalar() → [bool](https://docs.python.org/3/library/functions.html#bool) Does the type represent a single number? #### get_ptr_details(pi: [ptr_type_data_t](#ida_typeinf.ptr_type_data_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Get the pointer info. #### get_array_details(ai: [array_type_data_t](#ida_typeinf.array_type_data_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Get the array specific info. #### get_enum_details(ei: [enum_type_data_t](#ida_typeinf.enum_type_data_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Get the enum specific info. #### get_bitfield_details(bi: [bitfield_type_data_t](#ida_typeinf.bitfield_type_data_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Get the bitfield specific info. #### get_udt_details(udt: [udt_type_data_t](#ida_typeinf.udt_type_data_t), gtd: gtd_udt_t = GTD_CALC_LAYOUT) → [bool](https://docs.python.org/3/library/functions.html#bool) Get the udt specific info. #### get_func_details(fi: [func_type_data_t](#ida_typeinf.func_type_data_t), gtd: gtd_func_t = GTD_CALC_ARGLOCS) → [bool](https://docs.python.org/3/library/functions.html#bool) Get only the function specific info for this tinfo_t. #### is_funcptr() → [bool](https://docs.python.org/3/library/functions.html#bool) Is this pointer to a function? #### is_shifted_ptr() → [bool](https://docs.python.org/3/library/functions.html#bool) Is a shifted pointer? #### is_varstruct() → [bool](https://docs.python.org/3/library/functions.html#bool) Is a variable-size structure? #### is_varmember() → [bool](https://docs.python.org/3/library/functions.html#bool) Can the type be of a variable struct member? This function checks for: is_array() && array.nelems==0 Such a member can be only the very last member of a structure #### get_ptrarr_objsize() → [int](https://docs.python.org/3/library/functions.html#int) BT_PTR & BT_ARRAY: get size of pointed object or array element. On error returns -1 #### get_ptrarr_object() → [tinfo_t](#ida_typeinf.tinfo_t) BT_PTR & BT_ARRAY: get the pointed object or array element. If the current type is not a pointer or array, return empty type info. #### get_pointed_object() → [tinfo_t](#ida_typeinf.tinfo_t) BT_PTR: get type of pointed object. If the current type is not a pointer, return empty type info. See also get_ptrarr_object() and remove_pointer() #### is_pvoid() → [bool](https://docs.python.org/3/library/functions.html#bool) Is “void ``` * ``` ”? This function does not check the pointer attributes and type modifiers #### is_punknown() → [bool](https://docs.python.org/3/library/functions.html#bool) Is “_UNKNOWN ``` * ``` ”? This function does not check the pointer attributes and type modifiers #### get_array_element() → [tinfo_t](#ida_typeinf.tinfo_t) BT_ARRAY: get type of array element. See also get_ptrarr_object() #### get_final_element() → [tinfo_t](#ida_typeinf.tinfo_t) repeat recursively: if an array, return the type of its element; else return the type itself. #### get_array_nelems() → [int](https://docs.python.org/3/library/functions.html#int) BT_ARRAY: get number of elements (-1 means error) #### get_nth_arg(n: [int](https://docs.python.org/3/library/functions.html#int)) → [tinfo_t](#ida_typeinf.tinfo_t) BT_FUNC or BT_PTR BT_FUNC: Get type of n-th arg (-1 means return type, see get_rettype()) #### get_rettype() → [tinfo_t](#ida_typeinf.tinfo_t) BT_FUNC or BT_PTR BT_FUNC: Get the function’s return type #### get_nargs() → [int](https://docs.python.org/3/library/functions.html#int) BT_FUNC or BT_PTR BT_FUNC: Calculate number of arguments (-1 - error) #### get_cc() → callcnv_t BT_FUNC or BT_PTR BT_FUNC: Get calling convention #### is_user_cc() → [bool](https://docs.python.org/3/library/functions.html#bool) is_user_cc(get_cc()) #### is_vararg_cc() → [bool](https://docs.python.org/3/library/functions.html#bool) is_vararg_cc(get_cc()) #### is_purging_cc() → [bool](https://docs.python.org/3/library/functions.html#bool) is_purging_cc(get_cc()) #### calc_purged_bytes() → [int](https://docs.python.org/3/library/functions.html#int) BT_FUNC: Calculate number of purged bytes #### is_high_func() → [bool](https://docs.python.org/3/library/functions.html#bool) BT_FUNC: Is high level type? #### get_methods(methods: [udtmembervec_t](#ida_typeinf.udtmembervec_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) BT_COMPLEX: get a list of member functions declared in this udt. * **Returns:** false if no member functions exist #### get_bit_buckets(buckets: range64vec_t) → [bool](https://docs.python.org/3/library/functions.html#bool) ::BT_STRUCT: get bit buckets Bit buckets are used to layout bitfields * **Returns:** false if wrong type was passed #### find_udm(\*args) → [int](https://docs.python.org/3/library/functions.html#int) This function has the following signatures: > 1. find_udm(udm: udm_t > ``` > * > ``` > , strmem_flags: int) -> int > 2. find_udm(offset: uint64, strmem_flags: int=0) -> int > 3. find_udm(name: str, strmem_flags: int=0) -> int # 0: find_udm(udm: udm_t ``` * ``` , strmem_flags: int) -> int BTF_STRUCT,BTF_UNION: Find a udt member. \* at the specified offset (STRMEM_OFFSET) \* with the specified index (STRMEM_INDEX) \* with the specified type (STRMEM_TYPE) \* with the specified name (STRMEM_NAME) * **Returns:** the index of the found member or -1 # 1: find_udm(offset: uint64, strmem_flags: int=0) -> int BTF_STRUCT,BTF_UNION: Find an udt member at the specified offset * **Returns:** the index of the found member or -1 # 2: find_udm(name: str, strmem_flags: int=0) -> int BTF_STRUCT,BTF_UNION: Find an udt member by name * **Returns:** the index of the found member or -1 #### get_udm(\*args) → Tuple[[int](https://docs.python.org/3/library/functions.html#int), [udm_t](#ida_typeinf.udm_t)] | Tuple[[None](https://docs.python.org/3/library/constants.html#None), [None](https://docs.python.org/3/library/constants.html#None)] Retrieve a structure/union member with either the specified name or the specified index, in the specified tinfo_t object. This function has the following signatures: > 1. get_udm(index: int) > 2. get_udm(name: str) * **Parameters:** * **index** – a member index (1st form) * **name** – a member name (2nd form) * **Returns:** a tuple (int, udm_t), or (-1, None) if member not found #### get_udm_by_offset(offset: [int](https://docs.python.org/3/library/functions.html#int)) Retrieve a structure/union member with the specified offset, in the specified tinfo_t object. * **Parameters:** **offset** – the member offset * **Returns:** a tuple (int, udm_t), or (-1, None) if member not found #### get_udt_nmembers() → [int](https://docs.python.org/3/library/functions.html#int) Get number of udt members. -1-error. #### is_empty_udt() → [bool](https://docs.python.org/3/library/functions.html#bool) Is an empty struct/union? (has no fields). #### is_small_udt() → [bool](https://docs.python.org/3/library/functions.html#bool) Is a small udt? (can fit a register or a pair of registers). #### get_udt_taudt_bits() → [int](https://docs.python.org/3/library/functions.html#int) Get udt_type_data_t::taudt_bits. #### is_unaligned_struct() → [bool](https://docs.python.org/3/library/functions.html#bool) Is an unaligned struct. #### is_msstruct() → [bool](https://docs.python.org/3/library/functions.html#bool) Is gcc msstruct attribute applied. #### is_cpp_struct() → [bool](https://docs.python.org/3/library/functions.html#bool) Is a c++ object, not simple pod type. #### is_vftable() → [bool](https://docs.python.org/3/library/functions.html#bool) Is a vftable type? #### is_fixed_struct() → [bool](https://docs.python.org/3/library/functions.html#bool) Is a structure with fixed offsets? #### is_tuple() → [bool](https://docs.python.org/3/library/functions.html#bool) Is a tuple? #### is_iface() → [bool](https://docs.python.org/3/library/functions.html#bool) Is an interface? #### requires_qualifier(name: [str](https://docs.python.org/3/library/stdtypes.html#str), offset: [int](https://docs.python.org/3/library/functions.html#int)) → [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None) Check whether a field name requires a full qualifier because it is not unique within the type. * **Parameters:** * **name** – field name * **offset** – field offset in bits * **Returns:** a qualifier string (possibly empty) if the name is not unique, or None if the name is already unique. #### append_covered(out: [rangeset_t](../ida_range/index.md#ida_range.rangeset_t), offset: uint64 = 0) → [bool](https://docs.python.org/3/library/functions.html#bool) Calculate set of covered bytes for the type * **Parameters:** * **out** – pointer to the output buffer. covered bytes will be appended to it. * **offset** – delta in bytes to add to all calculations. used internally during recursion. #### calc_gaps(out: [rangeset_t](../ida_range/index.md#ida_range.rangeset_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Calculate set of padding bytes for the type * **Parameters:** **out** – pointer to the output buffer; old buffer contents will be lost. #### is_one_fpval() → [bool](https://docs.python.org/3/library/functions.html#bool) Floating value or an object consisting of one floating member entirely. #### is_sse_type() → [bool](https://docs.python.org/3/library/functions.html#bool) Is a SSE vector type? #### is_anonymous_udt() → [bool](https://docs.python.org/3/library/functions.html#bool) Is an anonymous struct/union? We assume that types with names are anonymous if the name starts with $ #### is_anonymous_type_name() → [bool](https://docs.python.org/3/library/functions.html#bool) Is an anonymous type? #### has_vftable() → [bool](https://docs.python.org/3/library/functions.html#bool) Has a vftable? #### has_union() → [bool](https://docs.python.org/3/library/functions.html#bool) Has a member of type “union”? #### get_enum_nmembers() → [int](https://docs.python.org/3/library/functions.html#int) Get number of enum members. * **Returns:** BADSIZE if error #### is_empty_enum() → [bool](https://docs.python.org/3/library/functions.html#bool) Is an empty enum? (has no constants). #### get_enum_base_type() → type_t Get enum base type (convert enum to integer type) Returns BT_UNK if failed to convert #### is_bitmask_enum() → [bool](https://docs.python.org/3/library/functions.html#bool) Is bitmask enum? * **Returns:** true for bitmask enum and false in other cases enum_type_data_t::is_bf() #### get_enum_radix() → [int](https://docs.python.org/3/library/functions.html#int) Get enum constant radix * **Returns:** radix or 1 for BTE_CHAR enum_type_data_t::get_enum_radix() #### get_enum_repr(repr: [value_repr_t](#ida_typeinf.value_repr_t)) → tinfo_code_t Set the representation of enum members. * **Parameters:** **repr** – value_repr_t #### get_enum_width() → [int](https://docs.python.org/3/library/functions.html#int) Get enum width * **Returns:** width of enum base type in bytes, 0 - unspecified, or -1 enum_type_data_t::calc_nbytes() #### calc_enum_mask() → uint64 #### get_edm_by_value(value: [int](https://docs.python.org/3/library/functions.html#int), bmask: [int](https://docs.python.org/3/library/functions.html#int) = DEFMASK64, serial: [int](https://docs.python.org/3/library/functions.html#int) = 0) → Tuple[[int](https://docs.python.org/3/library/functions.html#int), [edm_t](#ida_typeinf.edm_t)] Retrieve an enumerator with the specified value, in the specified tinfo_t object. * **Parameters:** **value** – the enumerator value * **Returns:** a tuple (int, edm_t), or (-1, None) if member not found #### get_edm_tid(idx: [int](https://docs.python.org/3/library/functions.html#int)) → tid_t Get enum member TID * **Parameters:** **idx** – enum member index * **Returns:** tid or BADADDR The tid is used to collect xrefs to the member, it can be passed to xref-related functions instead of the address. #### get_onemember_type() → [tinfo_t](#ida_typeinf.tinfo_t) For objects consisting of one member entirely: return type of the member. #### get_innermost_udm(bitoffset: uint64) → [tinfo_t](#ida_typeinf.tinfo_t) Get the innermost member at the given offset * **Parameters:** **bitoffset** – bit offset into the structure * **Returns:** udt: with the innermost member * **Returns:** empty: type if it is not a struct type or OFFSET could not be found #### get_innermost_member_type(bitoffset: uint64) → [tinfo_t](#ida_typeinf.tinfo_t) Get the innermost member type at the given offset * **Parameters:** **bitoffset** – bit offset into the structure * **Returns:** the: innermost member type #### calc_score() → [int](https://docs.python.org/3/library/functions.html#int) Calculate the type score (the higher - the nicer is the type). #### dstr() → [str](https://docs.python.org/3/library/stdtypes.html#str) Function to facilitate debugging. #### get_attrs(tav: [type_attrs_t](#ida_typeinf.type_attrs_t), all_attrs: [bool](https://docs.python.org/3/library/functions.html#bool) = False) → [bool](https://docs.python.org/3/library/functions.html#bool) Get type attributes (all_attrs: include attributes of referenced types, if any). #### set_attrs(tav: [type_attrs_t](#ida_typeinf.type_attrs_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Set type attributes. If necessary, a new typid will be created. this function modifies tav! (returns old attributes, if any) * **Returns:** false: bad attributes #### set_attr(ta: [type_attr_t](#ida_typeinf.type_attr_t), may_overwrite: [bool](https://docs.python.org/3/library/functions.html#bool) = True) → [bool](https://docs.python.org/3/library/functions.html#bool) Set a type attribute. If necessary, a new typid will be created. #### del_attrs() → [None](https://docs.python.org/3/library/constants.html#None) Del all type attributes. typerefs cannot be modified by this function. #### del_attr(key: [str](https://docs.python.org/3/library/stdtypes.html#str), make_copy: [bool](https://docs.python.org/3/library/functions.html#bool) = True) → [bool](https://docs.python.org/3/library/functions.html#bool) Del a type attribute. typerefs cannot be modified by this function. #### create_simple_type(decl_type: type_t) → [bool](https://docs.python.org/3/library/functions.html#bool) #### create_ptr(\*args) → [bool](https://docs.python.org/3/library/functions.html#bool) #### create_array(\*args) → [bool](https://docs.python.org/3/library/functions.html#bool) #### create_typedef(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### create_bitfield(\*args) → [bool](https://docs.python.org/3/library/functions.html#bool) #### parse(decl: [str](https://docs.python.org/3/library/stdtypes.html#str), til: [til_t](#ida_typeinf.til_t) = None, pt_flags: [int](https://docs.python.org/3/library/functions.html#int) = 0) → [bool](https://docs.python.org/3/library/functions.html#bool) Convenience function to parse a string with a type declaration * **Parameters:** * **decl** – a type declaration * **til** – type library to use * **pt_flags** – combination of Type parsing flags bits #### create_udt(\*args) → [bool](https://docs.python.org/3/library/functions.html#bool) Create an empty structure/union. #### create_enum(\*args) → [bool](https://docs.python.org/3/library/functions.html#bool) Create an empty enum. #### create_func(\*args) → [bool](https://docs.python.org/3/library/functions.html#bool) #### get_udm_by_tid(udm: [udm_t](#ida_typeinf.udm_t), tid: tid_t) → ssize_t #### get_edm_by_tid(edm: [edm_t](#ida_typeinf.edm_t), tid: tid_t) → ssize_t #### get_type_by_tid(tid: tid_t) → [bool](https://docs.python.org/3/library/functions.html#bool) #### get_by_edm_name(mname: [str](https://docs.python.org/3/library/stdtypes.html#str), til: [til_t](#ida_typeinf.til_t) = None) → ssize_t Retrieve enum tinfo using enum member name * **Parameters:** * **mname** – enum type member name * **til** – type library * **Returns:** member index, otherwise returns -1. If the function fails, THIS object becomes empty. #### set_named_type(til: [til_t](#ida_typeinf.til_t), name: [str](https://docs.python.org/3/library/stdtypes.html#str), ntf_flags: [int](https://docs.python.org/3/library/functions.html#int) = 0) → tinfo_code_t #### set_symbol_type(til: [til_t](#ida_typeinf.til_t), name: [str](https://docs.python.org/3/library/stdtypes.html#str), ntf_flags: [int](https://docs.python.org/3/library/functions.html#int) = 0) → tinfo_code_t #### set_numbered_type(til: [til_t](#ida_typeinf.til_t), ord: [int](https://docs.python.org/3/library/functions.html#int), ntf_flags: [int](https://docs.python.org/3/library/functions.html#int) = 0, name: [str](https://docs.python.org/3/library/stdtypes.html#str) = None) → tinfo_code_t #### save_type(\*args) → tinfo_code_t #### copy_type(\*args) → tinfo_code_t #### create_forward_decl(til: [til_t](#ida_typeinf.til_t), decl_type: type_t, name: [str](https://docs.python.org/3/library/stdtypes.html#str), ntf_flags: [int](https://docs.python.org/3/library/functions.html#int) = 0) → tinfo_code_t Create a forward declaration. decl_type: BTF_STRUCT, BTF_UNION, or BTF_ENUM #### *static* get_stock(id: stock_type_id_t) → [tinfo_t](#ida_typeinf.tinfo_t) Get stock type information. This function can be used to get tinfo_t for some common types. The same tinfo_t will be returned for the same id, thus saving memory and increasing the speed Please note that retrieving the STI_SIZE_T or STI_SSIZE_T stock type, will also have the side-effect of adding that type to the ‘idati’ TIL, under the well-known name ‘size_t’ or ‘ssize_t’ (respectively). The same is valid for STI_COMPLEX64 and STI_COMPLEX64 stock types with names ‘complex64_t’ and ‘complex128_t’ (respectively). #### convert_array_to_ptr() → [bool](https://docs.python.org/3/library/functions.html#bool) Convert an array into a pointer. type[] => type \* #### remove_ptr_or_array() → [bool](https://docs.python.org/3/library/functions.html#bool) Replace the current type with the ptr obj or array element. This function performs one of the following conversions: \* type[] => type \* type\* => type If the conversion is performed successfully, return true #### read_bitfield_value(v: uint64, bitoff: [int](https://docs.python.org/3/library/functions.html#int)) → uint64 #### write_bitfield_value(dst: uint64, v: uint64, bitoff: [int](https://docs.python.org/3/library/functions.html#int)) → uint64 #### get_modifiers() → type_t #### set_modifiers(mod: type_t) → [None](https://docs.python.org/3/library/constants.html#None) #### set_const() → [None](https://docs.python.org/3/library/constants.html#None) #### set_volatile() → [None](https://docs.python.org/3/library/constants.html#None) #### clr_decl_const_volatile() → [None](https://docs.python.org/3/library/constants.html#None) #### clr_const() → [bool](https://docs.python.org/3/library/functions.html#bool) #### clr_volatile() → [bool](https://docs.python.org/3/library/functions.html#bool) #### clr_const_volatile() → [bool](https://docs.python.org/3/library/functions.html#bool) #### set_type_alignment(declalign: uchar, etf_flags: uint = 0) → tinfo_code_t Set type alignment. #### set_declalign(declalign: uchar) → [bool](https://docs.python.org/3/library/functions.html#bool) #### change_sign(sign: type_sign_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Change the type sign. Works only for the types that may have sign. #### calc_udt_aligns(sudt_flags: [int](https://docs.python.org/3/library/functions.html#int) = 4) → [bool](https://docs.python.org/3/library/functions.html#bool) Calculate the udt alignments using the field offsets/sizes and the total udt size This function does not work on typerefs #### set_methods(methods: [udtmembervec_t](#ida_typeinf.udtmembervec_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) BT_COMPLEX: set the list of member functions. This function consumes ‘methods’ (makes it empty). * **Returns:** false if this type is not a udt, or if the given list is empty #### set_type_cmt(cmt: [str](https://docs.python.org/3/library/stdtypes.html#str), is_regcmt: [bool](https://docs.python.org/3/library/functions.html#bool) = False, etf_flags: uint = 0) → tinfo_code_t Set type comment This function works only for non-trivial types #### get_alias_target() → [int](https://docs.python.org/3/library/functions.html#int) Get type alias If the type has no alias, return 0. #### is_aliased() → [bool](https://docs.python.org/3/library/functions.html#bool) #### set_type_alias(dest_ord: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) Set type alias Redirects all references to source type to the destination type. This is equivalent to instantaneous replacement all references to srctype by dsttype. #### set_udt_alignment(sda: [int](https://docs.python.org/3/library/functions.html#int), etf_flags: uint = 0) → tinfo_code_t Set declared structure alignment (sda) This alignment supersedes the alignment returned by get_declalign() and is really used when calculating the struct layout. However, the effective structure alignment may differ from sda because of packing. The type editing functions (they accept etf_flags) may overwrite this attribute. #### set_udt_pack(pack: [int](https://docs.python.org/3/library/functions.html#int), etf_flags: uint = 0) → tinfo_code_t Set structure packing. The value controls how little a structure member alignment can be. Example: if pack=1, then it is possible to align a double to a byte. \_\_attribute_\_((aligned(1))) double x; However, if pack=3, a double will be aligned to 8 (2\*\*3) even if requested to be aligned to a byte. pack==0 will have the same effect. The type editing functions (they accept etf_flags) may overwrite this attribute. #### get_udm_tid(idx: [int](https://docs.python.org/3/library/functions.html#int)) → tid_t Get udt member TID * **Parameters:** **idx** – the index of udt the member * **Returns:** tid or BADADDR The tid is used to collect xrefs to the member, it can be passed to xref-related functions instead of the address. #### add_udm(\*args) Add a member to the current structure/union. When creating a new structure/union from scratch, you might want to first call create_udt() This method has the following signatures: > 1. add_udm(udm: udm_t, etf_flags: int = 0, times: int = 1, idx: int = -1) > 2. add_udm(name: str, type: type_t | tinfo_t | str, offset: int = 0, etf_flags: int = 0, times: int = 1, idx: int = -1) In the 2nd form, the ‘type’ descriptor, can be one of: * type_t: if the type is simple (integral/floating/bool). E.g., BTF_INT * tinfo_t: can handle more complex types (structures, pointers, arrays, …) * str: a C type declaration If an input argument is incorrect, the constructor may raise an exception * **Parameters:** * **udm** – The member, fully initialized (1st form) * **name** – Member name - must not be empty * **type** – Member type * **offset** – the member offset in bits. It is the caller’s responsibility to specify correct offsets. * **etf_flags** – an OR’ed combination of ``` ETF_ ``` flags * **times** – how many times to add the new member * **idx** – the index in the udm array where the new udm should be placed. If the specified index cannot be honored because it would spoil the udm sorting order, it is silently ignored. #### del_udm(index: [int](https://docs.python.org/3/library/functions.html#int), etf_flags: uint = 0) → tinfo_code_t Delete a structure/union member. #### del_udms(idx1: [int](https://docs.python.org/3/library/functions.html#int), idx2: [int](https://docs.python.org/3/library/functions.html#int), etf_flags: uint = 0) → tinfo_code_t Delete structure/union members in the range [idx1, idx2). #### rename_udm(index: [int](https://docs.python.org/3/library/functions.html#int), name: [str](https://docs.python.org/3/library/stdtypes.html#str), etf_flags: uint = 0) → tinfo_code_t Rename a structure/union member. The new name must be unique. #### set_udm_type(index: [int](https://docs.python.org/3/library/functions.html#int), tif: [tinfo_t](#ida_typeinf.tinfo_t), etf_flags: uint = 0, repr: [value_repr_t](#ida_typeinf.value_repr_t) = None) → tinfo_code_t Set type of a structure/union member. * **Parameters:** * **index** – member index in the udm array * **tif** – new type for the member * **etf_flags** – etf_flag_t * **repr** – new representation for the member (optional) * **Returns:** tinfo_code_t #### set_udm_cmt(index: [int](https://docs.python.org/3/library/functions.html#int), cmt: [str](https://docs.python.org/3/library/stdtypes.html#str), is_regcmt: [bool](https://docs.python.org/3/library/functions.html#bool) = False, etf_flags: uint = 0) → tinfo_code_t Set a comment for a structure/union member. A member may have just one comment, and it is either repeatable or regular. #### set_udm_repr(index: [int](https://docs.python.org/3/library/functions.html#int), repr: [value_repr_t](#ida_typeinf.value_repr_t), etf_flags: uint = 0) → tinfo_code_t Set the representation of a structure/union member. #### is_udm_by_til(idx: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) Was the member created due to the type system * **Parameters:** **idx** – index of the member #### set_udm_by_til(idx: [int](https://docs.python.org/3/library/functions.html#int), on: [bool](https://docs.python.org/3/library/functions.html#bool) = True, etf_flags: uint = 0) → tinfo_code_t The member is created due to the type system * **Parameters:** * **idx** – index of the member * **etf_flags** – etf_flag_t #### set_fixed_struct(on: [bool](https://docs.python.org/3/library/functions.html#bool) = True) → tinfo_code_t Declare struct member offsets as fixed. For such structures, IDA will not recalculate the member offsets. If a member does not fit into its place anymore, it will be deleted. This function works only with structures (not unions). #### set_struct_size(new_size: [int](https://docs.python.org/3/library/functions.html#int)) → tinfo_code_t Explicitly specify the struct size. This function works only with fixed structures. The new struct size can be equal or higher the unpadded struct size (IOW, all existing members should fit into the specified size). * **Parameters:** **new_size** – new structure size in bytes #### expand_udt(idx: [int](https://docs.python.org/3/library/functions.html#int), delta: adiff_t, etf_flags: uint = 0) → tinfo_code_t Expand/shrink a structure by adding/removing a gap before the specified member. For regular structures, either the gap can be accommodated by aligning the next member with an alignment directive, or an explicit “gap” member will be inserted. Also note that it is impossible to add a gap at the end of a regular structure. When it comes to fixed-layout structures, there is no need to either add new “gap” members or align existing members, since all members have a fixed offset. It is possible to add a gap at the end of a fixed-layout structure, by passing -1 as index. * **Parameters:** * **idx** – index of the member * **delta** – number of bytes to add or remove * **etf_flags** – etf_flag_t #### set_tuple(on: [bool](https://docs.python.org/3/library/functions.html#bool) = True) → tinfo_code_t Declare struct as a tuple. Currently, tuples in IDA behave the same way as structures but they are returned in a different manner from functions. Also, 2 different tuples having the same members are considered to be equal. This function works only with structures (not unions). #### set_iface(on: [bool](https://docs.python.org/3/library/functions.html#bool) = True) → tinfo_code_t Declare struct as an interface. This function works only with structures (not unions). #### get_func_frame(pfn: func_t const \*) → [bool](https://docs.python.org/3/library/functions.html#bool) Create a tinfo_t object for the function frame * **Parameters:** **pfn** – function #### get_function_frame(func_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Create a tinfo_t object for the function frame * **Parameters:** **func_ea** – any address inside function #### is_frame() → [bool](https://docs.python.org/3/library/functions.html#bool) Is a function frame? #### get_frame_func() → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) Get function address for the frame. #### set_enum_width(nbytes: [int](https://docs.python.org/3/library/functions.html#int), etf_flags: uint = 0) → tinfo_code_t Set the width of enum base type * **Parameters:** * **nbytes** – width of enum base type, allowed values: 0 (unspecified),1,2,4,8,16,32,64 * **etf_flags** – etf_flag_t #### set_enum_sign(sign: type_sign_t, etf_flags: uint = 0) → tinfo_code_t Set enum sign * **Parameters:** * **sign** – type_sign_t * **etf_flags** – etf_flag_t #### ENUMBM_OFF convert to ordinal enum #### ENUMBM_ON convert to bitmask enum #### ENUMBM_AUTO convert to bitmask if the outcome is nice and useful #### set_enum_is_bitmask(\*args) → tinfo_code_t #### set_enum_repr(repr: [value_repr_t](#ida_typeinf.value_repr_t), etf_flags: uint = 0) → tinfo_code_t Set the representation of enum members. * **Parameters:** * **repr** – value_repr_t * **etf_flags** – etf_flag_t #### set_enum_radix(radix: [int](https://docs.python.org/3/library/functions.html#int), sign: [bool](https://docs.python.org/3/library/functions.html#bool), etf_flags: uint = 0) → tinfo_code_t Set enum radix to display constants * **Parameters:** * **radix** – radix 2, 4, 8, 16, with the special case 1 to display as character * **sign** – display as signed or unsigned * **etf_flags** – etf_flag_t #### add_edm(\*args) Add an enumerator to the current enumeration. When creating a new enumeration from scratch, you might want to first call create_enum() This method has the following signatures: > 1. add_edm(edm: edm_t, bmask: int = -1, etf_flags: int = 0, idx: int = -1) > 2. add_edm(name: str, value: int, bmask: int = -1, etf_flags: int = 0, idx: int = -1) If an input argument is incorrect, the constructor may raise an exception * **Parameters:** * **edm** – The member, fully initialized (1st form) * **name** – Enumerator name - must not be empty * **value** – Enumerator value * **bmask** – A bitmask to which the enumerator belongs * **etf_flags** – an OR’ed combination of ``` ETF_ ``` flags * **idx** – the index in the edm array where the new udm should be placed. If the specified index cannot be honored because it would spoil the edm sorting order, it is silently ignored. #### del_edms(idx1: [int](https://docs.python.org/3/library/functions.html#int), idx2: [int](https://docs.python.org/3/library/functions.html#int), etf_flags: uint = 0) → tinfo_code_t Delete enum members * **Parameters:** * **idx1** – index in edmvec_t * **idx2** – index in edmvec_t or size_t(-1) * **etf_flags** – etf_flag_t Delete enum members in [idx1, idx2) #### del_edm(\*args) Delete an enumerator with the specified name or the specified index, in the specified tinfo_t object. This method has the following signatures: > 1. del_edm(name: str) -> int > 2. del_edm(index: int) -> int * **Parameters:** * **name** – an enumerator name (1st form) * **index** – an enumerator index (2nd form) * **Returns:** TERR_OK in case of success, or another TERR_\* value in case of error #### del_edm_by_value(value: [int](https://docs.python.org/3/library/functions.html#int), etf_flags: [int](https://docs.python.org/3/library/functions.html#int) = 0, bmask: [int](https://docs.python.org/3/library/functions.html#int) = DEFMASK64, serial: [int](https://docs.python.org/3/library/functions.html#int) = 0) Delete an enumerator with the specified value, in the specified tinfo_t object. * **Parameters:** **value** – the enumerator value * **Returns:** TERR_OK in case of success, or another TERR_\* value in case of error #### rename_edm(idx: [int](https://docs.python.org/3/library/functions.html#int), name: [str](https://docs.python.org/3/library/stdtypes.html#str), etf_flags: uint = 0) → tinfo_code_t Rename a enum member * **Parameters:** * **idx** – index in edmvec_t * **name** – new name * **etf_flags** – etf_flag_t ETF_FORCENAME may be used in case of TERR_ALIEN_NAME #### set_edm_cmt(idx: [int](https://docs.python.org/3/library/functions.html#int), cmt: [str](https://docs.python.org/3/library/stdtypes.html#str), etf_flags: uint = 0) → tinfo_code_t Set a comment for an enum member. Such comments are always considered as repeatable. * **Parameters:** * **idx** – index in edmvec_t * **cmt** – comment * **etf_flags** – etf_flag_t #### edit_edm(\*args) → tinfo_code_t Change constant value and/or bitmask * **Parameters:** * **idx** – index in edmvec_t * **value** – old or new value * **bmask** – old or new bitmask * **etf_flags** – etf_flag_t #### rename_funcarg(index: [int](https://docs.python.org/3/library/functions.html#int), name: [str](https://docs.python.org/3/library/stdtypes.html#str), etf_flags: uint = 0) → tinfo_code_t Rename a function argument. The new name must be unique. * **Parameters:** * **index** – argument index in the function array * **name** – new name * **etf_flags** – etf_flag_t #### set_funcarg_type(index: [int](https://docs.python.org/3/library/functions.html#int), tif: [tinfo_t](#ida_typeinf.tinfo_t), etf_flags: uint = 0) → tinfo_code_t Set type of a function argument. * **Parameters:** * **index** – argument index in the function array * **tif** – new type for the argument * **etf_flags** – etf_flag_t * **Returns:** tinfo_code_t #### set_func_rettype(tif: [tinfo_t](#ida_typeinf.tinfo_t), etf_flags: uint = 0) → tinfo_code_t Set function return type . * **Parameters:** * **tif** – new type for the return type * **etf_flags** – etf_flag_t * **Returns:** tinfo_code_t #### del_funcargs(idx1: [int](https://docs.python.org/3/library/functions.html#int), idx2: [int](https://docs.python.org/3/library/functions.html#int), etf_flags: uint = 0) → tinfo_code_t Delete function arguments * **Parameters:** * **idx1** – index in funcargvec_t * **idx2** – index in funcargvec_t or size_t(-1) * **etf_flags** – etf_flag_t Delete function arguments in [idx1, idx2) #### del_funcarg(idx: [int](https://docs.python.org/3/library/functions.html#int), etf_flags: uint = 0) → tinfo_code_t #### add_funcarg(farg: [funcarg_t](#ida_typeinf.funcarg_t), etf_flags: uint = 0, idx: ssize_t = -1) → tinfo_code_t Add a function argument. * **Parameters:** * **farg** – argument to add * **etf_flags** – type changing flags flags * **idx** – the index in the funcarg array where the new funcarg should be placed. if the specified index cannot be honored because it would spoil the funcarg sorting order, it is silently ignored. #### set_func_cc(cc: callcnv_t, etf_flags: uint = 0) → tinfo_code_t Set function calling convention. #### set_funcarg_loc(index: [int](https://docs.python.org/3/library/functions.html#int), argloc: [argloc_t](#ida_typeinf.argloc_t), etf_flags: uint = 0) → tinfo_code_t Set location of a function argument. * **Parameters:** * **index** – argument index in the function array * **argloc** – new location for the argument * **etf_flags** – etf_flag_t * **Returns:** tinfo_code_t #### set_func_retloc(argloc: [argloc_t](#ida_typeinf.argloc_t), etf_flags: uint = 0) → tinfo_code_t Set location of function return value. * **Parameters:** * **argloc** – new location for the return value * **etf_flags** – etf_flag_t * **Returns:** tinfo_code_t #### compare(r: [tinfo_t](#ida_typeinf.tinfo_t)) → [int](https://docs.python.org/3/library/functions.html#int) #### compare_with(r: [tinfo_t](#ida_typeinf.tinfo_t), tcflags: [int](https://docs.python.org/3/library/functions.html#int) = 0) → [bool](https://docs.python.org/3/library/functions.html#bool) Compare two types, based on given flags (see tinfo_t comparison flags). #### equals_to(r: [tinfo_t](#ida_typeinf.tinfo_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_castable_to(target: [tinfo_t](#ida_typeinf.tinfo_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_manually_castable_to(target: [tinfo_t](#ida_typeinf.tinfo_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### serialize(\*args) → PyObject \* Serialize tinfo_t object into a type string. #### deserialize(\*args) → [bool](https://docs.python.org/3/library/functions.html#bool) This function has the following signatures: > 1. deserialize(til: const til_t *, ptype: const type_t \**, pfields: const p_list > ``` > ** > ``` > =nullptr, pfldcmts: const p_list > ``` > ** > ``` > =nullptr, cmt: str=nullptr) -> bool > 2. deserialize(til: const til_t > ``` > * > ``` > , ptype: const qtype > ``` > * > ``` > , pfields: const qtype > ``` > * > ``` > =nullptr, pfldcmts: const qtype > ``` > * > ``` > =nullptr, cmt: str=nullptr) -> bool # 0: deserialize(til: const til_t *, ptype: const type_t \**, pfields: const p_list ``` ** ``` =nullptr, pfldcmts: const p_list ``` ** ``` =nullptr, cmt: str=nullptr) -> bool Deserialize a type string into a tinfo_t object. # 1: deserialize(til: const til_t ``` * ``` , ptype: const qtype ``` * ``` , pfields: const qtype ``` * ``` =nullptr, pfldcmts: const qtype ``` * ``` =nullptr, cmt: str=nullptr) -> bool Deserialize a type string into a tinfo_t object. #### get_stkvar(insn: insn_t const &, x: op_t const, v: int) → ssize_t Retrieve frame tinfo for a stack variable * **Parameters:** * **insn** – the instruction * **x** – reference to instruction operand, may be nullptr * **v** – immediate value in the operand (usually x.addr) * **Returns:** returns the member index, otherwise returns -1. if the function fails, THIS object becomes empty. #### copy() → [tinfo_t](#ida_typeinf.tinfo_t) #### get_attr(key: [str](https://docs.python.org/3/library/stdtypes.html#str), all_attrs: [bool](https://docs.python.org/3/library/functions.html#bool) = True) → PyObject \* Get a type attribute. #### get_edm(\*args) → Tuple[[int](https://docs.python.org/3/library/functions.html#int), [edm_t](#ida_typeinf.edm_t)] Retrieve an enumerator with either the specified name or the specified index, in the specified tinfo_t object. This function has the following signatures: > 1. get_edm(index: int) > 2. get_edm(name: str) * **Parameters:** * **index** – an enumerator index (1st form). * **name** – an enumerator name (2nd form). * **Returns:** a tuple (int, edm_t), or (-1, None) if member not found #### find_edm(\*args) → ssize_t #### iter_struct() Iterate on the members composing this structure. Example: > til = ida_typeinf.get_idati() > tif = til.get_named_type(“my_struc”) > for udm in tif.iter_struct(): > > print(f”{udm.name} at bit offset {udm.offset}”) Will raise an exception if this type is not a structure. * **Returns:** a udm_t-producing generator #### iter_union() Iterate on the members composing this union. Example: > til = ida_typeinf.get_idati() > tif = til.get_named_type(“my_union”) > for udm in tif.iter_union(): > > print(f”{udm.name}, with type {udm.type}”) Will raise an exception if this type is not a union. * **Returns:** a udm_t-producing generator #### iter_udt() Iterate on the members composing this structure, or union. Example: > til = ida_typeinf.get_idati() > tif = til.get_named_type(“my_type”) > for udm in tif.iter_udt(): > > print(f”{udm.name} at bit offset {udm.offset} with type {udm.type}”) Will raise an exception if this type is not a structure, or union * **Returns:** a udm_t-producing generator #### iter_enum() Iterate on the members composing this enumeration. Example: > til = ida_typeinf.get_idati() > tif = til.get_named_type(“my_enum”) > for edm in tif.iter_enum(): > > print(f”{edm.name} = {edm.value}”) Will raise an exception if this type is not an enumeration * **Returns:** a edm_t-producing generator #### iter_func() Iterate on the arguments contained in this function prototype Example: > address = … > func = ida_funcs.get_func(address) > func_type = func.prototype > for arg in func_type.iter_func(): > > print(f”{arg.name}, of type {arg.type}”) Will raise an exception if this type is not a function * **Returns:** a funcarg_t-producing generator #### get_edm_by_name ### ida_typeinf.COMP_MASK ### ida_typeinf.COMP_UNK Unknown. ### ida_typeinf.COMP_MS Visual C++. ### ida_typeinf.COMP_BC Borland C++. ### ida_typeinf.COMP_WATCOM Watcom C++. ### ida_typeinf.COMP_GNU GNU C++. ### ida_typeinf.COMP_VISAGE Visual Age C++. ### ida_typeinf.COMP_BP Delphi. ### ida_typeinf.COMP_UNSURE uncertain compiler id ### ida_typeinf.BADSIZE bad type size ### ida_typeinf.FIRST_NONTRIVIAL_TYPID Denotes the first bit describing a nontrivial type. ### ida_typeinf.TYPID_ISREF Identifies that a type that is a typeref. ### ida_typeinf.TYPID_SHIFT First type detail bit. ### ida_typeinf.remove_pointer(tif: [tinfo_t](#ida_typeinf.tinfo_t)) → [tinfo_t](#ida_typeinf.tinfo_t) BT_PTR: If the current type is a pointer, return the pointed object. If the current type is not a pointer, return the current type. See also get_ptrarr_object() and get_pointed_object() ### ida_typeinf.STRMEM_MASK ### ida_typeinf.STRMEM_OFFSET get member by offset \* in: udm->offset - is a member offset in bits ### ida_typeinf.STRMEM_INDEX get member by number \* in: udm->offset - is a member number ### ida_typeinf.STRMEM_AUTO get member by offset if struct, or get member by index if union \* nb: union: index is stored in the udm->offset field! \* nb: struct: offset is in bytes (not in bits)! ### ida_typeinf.STRMEM_NAME get member by name \* in: udm->name - the desired member name. ### ida_typeinf.STRMEM_TYPE get member by type. \* in: udm->type - the desired member type. member types are compared with tinfo_t::equals_to() ### ida_typeinf.STRMEM_SIZE get member by size. \* in: udm->size - the desired member size. ### ida_typeinf.STRMEM_MINS get smallest member by size. ### ida_typeinf.STRMEM_MAXS get biggest member by size. ### ida_typeinf.STRMEM_LOWBND get member by offset or the next member (lower bound) \* in: udm->offset - is a member offset in bits ### ida_typeinf.STRMEM_NEXT get next member after the offset \* in: udm->offset - is a member offset in bits ### ida_typeinf.STRMEM_VFTABLE can be combined with STRMEM_OFFSET, STRMEM_AUTO get vftable instead of the base class ### ida_typeinf.STRMEM_SKIP_EMPTY can be combined with STRMEM_OFFSET, STRMEM_AUTO skip empty members (i.e. having zero size) only last empty member can be returned ### ida_typeinf.STRMEM_CASTABLE_TO can be combined with STRMEM_TYPE: member type must be castable to the specified type ### ida_typeinf.STRMEM_ANON can be combined with STRMEM_NAME: look inside anonymous members too. ### ida_typeinf.STRMEM_SKIP_GAPS can be combined with STRMEM_OFFSET, STRMEM_LOWBND skip gap members ### ida_typeinf.TCMP_EQUAL are types equal? ### ida_typeinf.TCMP_IGNMODS ignore const/volatile modifiers ### ida_typeinf.TCMP_AUTOCAST can t1 be cast into t2 automatically? ### ida_typeinf.TCMP_MANCAST can t1 be cast into t2 manually? ### ida_typeinf.TCMP_CALL can t1 be called with t2 type? ### ida_typeinf.TCMP_DELPTR remove pointer from types before comparing ### ida_typeinf.TCMP_DECL compare declarations without resolving them ### ida_typeinf.TCMP_ANYBASE accept any base class when casting ### ida_typeinf.TCMP_SKIPTHIS skip the first function argument in comparison ### ida_typeinf.TCMP_DEEP_UDT compare udt by member/attributes ### *class* ida_typeinf.simd_info_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### SIMD_VARIADIC #### name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* name of SIMD type (nullptr-undefined) #### tif *: [tinfo_t](#ida_typeinf.tinfo_t)* SIMD type (empty-undefined). #### size *: uint16* SIMD type size in bytes (0-undefined, 0xFFFF-variadic). #### memtype *: type_t* member type BTF_INT8/16/32/64/128, BTF_UINT8/16/32/64/128 BTF_INT - integrals of any size/sign BTF_FLOAT, BTF_DOUBLE BTF_TBYTE - floating: float16 for variadic any size for non-variadic BTF_UNION - union of integral and floating types BTF_UNK - undefined #### is_variadic() → [bool](https://docs.python.org/3/library/functions.html#bool) #### match_pattern(pattern: [simd_info_t](#ida_typeinf.simd_info_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### *class* ida_typeinf.simd_info_vec_t Bases: [`qvector_simd_info_vec_t`](#ida_typeinf.qvector_simd_info_vec_t) #### thisown ### ida_typeinf.guess_func_cc(fti: [func_type_data_t](#ida_typeinf.func_type_data_t), npurged: [int](https://docs.python.org/3/library/functions.html#int), cc_flags: [int](https://docs.python.org/3/library/functions.html#int)) → callcnv_t Use func_type_data_t::guess_cc(). ### ida_typeinf.dump_func_type_data(fti: [func_type_data_t](#ida_typeinf.func_type_data_t), praloc_bits: [int](https://docs.python.org/3/library/functions.html#int)) → [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None) Use func_type_data_t::dump(). ### ida_typeinf.calc_arglocs(fti: [func_type_data_t](#ida_typeinf.func_type_data_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_typeinf.calc_varglocs(fti: [func_type_data_t](#ida_typeinf.func_type_data_t), regs: [regobjs_t](#ida_typeinf.regobjs_t), stkargs: relobj_t, nfixed: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### *class* ida_typeinf.ptr_type_data_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### obj_type *: [tinfo_t](#ida_typeinf.tinfo_t)* pointed object type #### closure *: [tinfo_t](#ida_typeinf.tinfo_t)* cannot have both closure and based_ptr_size #### parent *: [tinfo_t](#ida_typeinf.tinfo_t)* Parent struct. #### delta *: [int](https://docs.python.org/3/library/functions.html#int)* Offset from the beginning of the parent struct. #### based_ptr_size *: uchar* #### taptr_bits *: uchar* TAH bits. #### swap(r: [ptr_type_data_t](#ida_typeinf.ptr_type_data_t)) → [None](https://docs.python.org/3/library/constants.html#None) Set this = r and r = this. #### is_code_ptr() → [bool](https://docs.python.org/3/library/functions.html#bool) Are we pointing to code? #### is_shifted() → [bool](https://docs.python.org/3/library/functions.html#bool) ### *class* ida_typeinf.array_type_data_t(b: [int](https://docs.python.org/3/library/functions.html#int) = 0, n: [int](https://docs.python.org/3/library/functions.html#int) = 0) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### elem_type *: [tinfo_t](#ida_typeinf.tinfo_t)* element type #### base *: [int](https://docs.python.org/3/library/functions.html#int)* array base #### nelems *: [int](https://docs.python.org/3/library/functions.html#int)* number of elements #### swap(r: [array_type_data_t](#ida_typeinf.array_type_data_t)) → [None](https://docs.python.org/3/library/constants.html#None) set this = r and r = this ### *class* ida_typeinf.funcarg_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### argloc *: [argloc_t](#ida_typeinf.argloc_t)* argument location #### name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* argument name (may be empty) #### cmt *: [str](https://docs.python.org/3/library/stdtypes.html#str)* argument comment (may be empty) #### type *: [tinfo_t](#ida_typeinf.tinfo_t)* argument type #### flags *: [int](https://docs.python.org/3/library/functions.html#int)* Function argument property bits #### is_swiftself() → [bool](https://docs.python.org/3/library/functions.html#bool) * **Returns:** true if this funcarg is the implicit Swift self (X20/R13-bound). ### ida_typeinf.FAI_HIDDEN hidden argument ### ida_typeinf.FAI_RETPTR pointer to return value. implies hidden ### ida_typeinf.FAI_STRUCT was initially a structure ### ida_typeinf.FAI_ARRAY was initially an array; see “_\_org_typedef” or “_\_org_arrdim” type attributes to determine the original type ### ida_typeinf.FAI_UNUSED argument is not used by the function ### ida_typeinf.FAI_SWIFTSELF implicit Swift self arg, bound to the SwiftSelf register (X20/R13). At most one funcarg per function. Source: \_\_swiftself. ### *class* ida_typeinf.func_type_data_t Bases: [`funcargvec_t`](#ida_typeinf.funcargvec_t) #### thisown #### flags *: [int](https://docs.python.org/3/library/functions.html#int)* Function type data property bits #### rettype *: [tinfo_t](#ida_typeinf.tinfo_t)* return type #### retloc *: [argloc_t](#ida_typeinf.argloc_t)* return location #### stkargs *: [int](https://docs.python.org/3/library/functions.html#int)* size of stack arguments (not used in build_func_type) #### spoiled *: [reginfovec_t](#ida_typeinf.reginfovec_t)* spoiled register information. if spoiled register info is present, it overrides the standard spoil info (eax, edx, ecx for x86) #### get_explicit_cc() → callcnv_t #### get_cc() → callcnv_t #### set_cc(cc: callcnv_t) → [None](https://docs.python.org/3/library/constants.html#None) #### swap(r: [func_type_data_t](#ida_typeinf.func_type_data_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### is_high() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_noret() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_pure() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_static() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_virtual() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_const() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_ctor() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_dtor() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_synchronized() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_swiftasync() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_swiftthrows() → [bool](https://docs.python.org/3/library/functions.html#bool) #### get_call_method() → [int](https://docs.python.org/3/library/functions.html#int) #### is_vararg_cc() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_golang_cc() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_rust_cc() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_swift_cc() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_user_cc() → [bool](https://docs.python.org/3/library/functions.html#bool) #### guess_cc(purged: [int](https://docs.python.org/3/library/functions.html#int), cc_flags: [int](https://docs.python.org/3/library/functions.html#int)) → callcnv_t Guess function calling convention use the following info: argument locations and ‘stkargs’ #### dump(praloc_bits: [int](https://docs.python.org/3/library/functions.html#int) = 2) → [bool](https://docs.python.org/3/library/functions.html#bool) Dump information that is not always visible in the function prototype. (argument locations, return location, total stkarg size) #### find_argument(\*args) → ssize_t find argument by name ### ida_typeinf.FTI_SPOILED information about spoiled registers is present ### ida_typeinf.FTI_NORET noreturn ### ida_typeinf.FTI_PURE \_\_pure ### ida_typeinf.FTI_HIGH high level prototype (with possibly hidden args) ### ida_typeinf.FTI_STATIC static ### ida_typeinf.FTI_VIRTUAL virtual ### ida_typeinf.FTI_CALLTYPE mask for FTI_\*CALL ### ida_typeinf.FTI_DEFCALL default call ### ida_typeinf.FTI_NEARCALL near call ### ida_typeinf.FTI_FARCALL far call ### ida_typeinf.FTI_INTCALL interrupt call ### ida_typeinf.FTI_ARGLOCS info about argument locations has been calculated (stkargs and retloc too) ### ida_typeinf.FTI_EXPLOCS all arglocs are specified explicitly ### ida_typeinf.FTI_CONST const member function ### ida_typeinf.FTI_CTOR constructor ### ida_typeinf.FTI_DTOR destructor ### ida_typeinf.FTI_SYNCHRONIZED synchronized (Java) ### ida_typeinf.FTI_SWIFTASYNC Swift async function: implicit AsyncContext pointer in the swiftasync register (X22/R14). See vdswift.cpp for the ::_\_swift_get_async_context() surfacing. ### ida_typeinf.FTI_SWIFTTHROWS Swift throws function: errors propagate via the SwiftError register (X21/R12). See vdswift.cpp for the ::_\_swift_get_error / ::_\_swift_set_error surfacing. ### ida_typeinf.FTI_ALL all defined bits ### ida_typeinf.CC_CDECL_OK can use \_\_cdecl calling convention? ### ida_typeinf.CC_ALLOW_ARGPERM disregard argument order? ### ida_typeinf.CC_ALLOW_REGHOLES allow holes in register argument list? ### ida_typeinf.CC_HAS_ELLIPSIS function has a variable list of arguments? ### ida_typeinf.CC_GOLANG_OK can use \_\_golang calling convention ### ida_typeinf.CC_RUST_OK can use \_\_rust calling convention ### ida_typeinf.FMTFUNC_PRINTF ### ida_typeinf.FMTFUNC_SCANF ### ida_typeinf.FMTFUNC_STRFTIME ### ida_typeinf.FMTFUNC_STRFMON ### *class* ida_typeinf.edm_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* #### cmt *: [str](https://docs.python.org/3/library/stdtypes.html#str)* #### value *: uint64* #### empty() → [bool](https://docs.python.org/3/library/functions.html#bool) #### swap(r: [edm_t](#ida_typeinf.edm_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### get_tid() → tid_t ### *class* ida_typeinf.enum_type_data_t(\*args) Bases: [`edmvec_t`](#ida_typeinf.edmvec_t) #### thisown #### group_sizes *: [intvec_t](../ida_pro/index.md#ida_pro.intvec_t)* if present, specifies bitmask group sizes each non-trivial group starts with a mask member #### taenum_bits *: [int](https://docs.python.org/3/library/functions.html#int)* Type attributes for enums #### bte *: bte_t* enum member sizes (shift amount) and style. do not manually set BTE_BITMASK, use set_enum_is_bitmask() #### get_enum_radix() → [int](https://docs.python.org/3/library/functions.html#int) Get enum constant radix * **Returns:** radix or 1 for BTE_CHAR #### is_number_signed() → [bool](https://docs.python.org/3/library/functions.html#bool) #### set_enum_radix(radix: [int](https://docs.python.org/3/library/functions.html#int), sign: [bool](https://docs.python.org/3/library/functions.html#bool)) → [None](https://docs.python.org/3/library/constants.html#None) Set radix to display constants * **Parameters:** **radix** – radix with the special case 1 to display as character #### is_char() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_dec() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_hex() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_oct() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_bin() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_udec() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_shex() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_soct() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_sbin() → [bool](https://docs.python.org/3/library/functions.html#bool) #### has_lzero() → [bool](https://docs.python.org/3/library/functions.html#bool) #### set_lzero(on: [bool](https://docs.python.org/3/library/functions.html#bool)) → [None](https://docs.python.org/3/library/constants.html#None) #### calc_mask() → uint64 #### store_64bit_values() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_bf() → [bool](https://docs.python.org/3/library/functions.html#bool) is bitmask or ordinary enum? #### calc_nbytes() → [int](https://docs.python.org/3/library/functions.html#int) get the width of enum in bytes #### set_nbytes(nbytes: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) set enum width (nbytes) #### is_group_mask_at(idx: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) is the enum member at IDX a non-trivial group mask? a trivial group consist of one bit and has just one member, which can be considered as a mask or a bitfield constant * **Parameters:** **idx** – index * **Returns:** success #### is_valid_group_sizes() → [bool](https://docs.python.org/3/library/functions.html#bool) is valid group sizes #### find_member(\*args) → ssize_t This function has the following signatures: > 1. find_member(name: str, from: int=0, to: int=size_t(-1)) -> ssize_t > 2. find_member(value: uint64, serial: uchar, from: int=0, to: int=size_t(-1), vmask: uint64=uint64(-1)) -> ssize_t # 0: find_member(name: str, from: int=0, to: int=size_t(-1)) -> ssize_t find member (constant or bmask) by name # 1: find_member(value: uint64, serial: uchar, from: int=0, to: int=size_t(-1), vmask: uint64=uint64(-1)) -> ssize_t find member (constant or bmask) by value #### swap(r: [enum_type_data_t](#ida_typeinf.enum_type_data_t)) → [None](https://docs.python.org/3/library/constants.html#None) swap two instances #### add_constant(name: [str](https://docs.python.org/3/library/stdtypes.html#str), value: uint64, cmt: [str](https://docs.python.org/3/library/stdtypes.html#str) = None) → [None](https://docs.python.org/3/library/constants.html#None) add constant for regular enum #### get_value_repr(repr: [value_repr_t](#ida_typeinf.value_repr_t)) → tinfo_code_t get enum radix and other representation info * **Parameters:** **repr** – value display info #### set_value_repr(repr: [value_repr_t](#ida_typeinf.value_repr_t)) → tinfo_code_t set enum radix and other representation info * **Parameters:** **repr** – value display info #### get_serial(index: [int](https://docs.python.org/3/library/functions.html#int)) → uchar returns serial for the constant #### get_max_serial(value: uint64) → uchar return the maximum serial for the value #### get_constant_group(\*args) → PyObject \* get group parameters for the constant, valid for bitmask enum * **Parameters:** * **group_start_index** – index of the group mask * **group_size** – group size (>=1) * **idx** – constant index * **Returns:** success #### all_groups(skip_trivial=False) Generate tuples for bitmask enum groups. Each tupple is: [0] enum member index of group start [1] group size Tupples may include or not the group with 1 element. #### all_constants() Generate tupples of all constants except of bitmasks. Each tupple is: [0] constant index [1] enum member index of group start [2] group size In case of regular enum the second element of tupple is 0 and the third element of tupple is the number of enum members. ### *class* ida_typeinf.typedef_type_data_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### til *: til_t const \** type library to use when resolving #### name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* is_ordref=false: target type name. we do not own this pointer! #### ordinal *: [int](https://docs.python.org/3/library/functions.html#int)* is_ordref=true: type ordinal number #### is_ordref *: [bool](https://docs.python.org/3/library/functions.html#bool)* is reference by ordinal? #### resolve *: [bool](https://docs.python.org/3/library/functions.html#bool)* should resolve immediately? #### swap(r: [typedef_type_data_t](#ida_typeinf.typedef_type_data_t)) → [None](https://docs.python.org/3/library/constants.html#None) ### ida_typeinf.MAX_ENUM_SERIAL Max number of identical constants allowed for one enum type. ### *class* ida_typeinf.custom_data_type_info_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### dtid *: int16* data type id #### fid *: int16* data format ids ### *class* ida_typeinf.value_repr_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### bits *: uint64* #### ri *: [refinfo_t](../ida_nalt/index.md#ida_nalt.refinfo_t)* FRB_OFFSET. #### strtype *: [int](https://docs.python.org/3/library/functions.html#int)* FRB_STRLIT. #### delta *: adiff_t* FRB_STROFF. #### type_ordinal *: [int](https://docs.python.org/3/library/functions.html#int)* FRB_STROFF, FRB_ENUM. #### cd *: [custom_data_type_info_t](#ida_typeinf.custom_data_type_info_t)* FRB_CUSTOM. #### ap *: [array_parameters_t](../ida_nalt/index.md#ida_nalt.array_parameters_t)* FRB_TABFORM, AP_SIGNED is ignored, use FRB_SIGNED instead #### swap(r: [value_repr_t](#ida_typeinf.value_repr_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### clear() → [None](https://docs.python.org/3/library/constants.html#None) #### empty() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_enum() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_offset() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_strlit() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_custom() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_stroff() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_typref() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_signed() → [bool](https://docs.python.org/3/library/functions.html#bool) #### has_tabform() → [bool](https://docs.python.org/3/library/functions.html#bool) #### has_lzeroes() → [bool](https://docs.python.org/3/library/functions.html#bool) #### get_vtype() → uint64 #### set_vtype(vt: uint64) → [None](https://docs.python.org/3/library/constants.html#None) #### set_signed(on: [bool](https://docs.python.org/3/library/functions.html#bool)) → [None](https://docs.python.org/3/library/constants.html#None) #### set_tabform(on: [bool](https://docs.python.org/3/library/functions.html#bool)) → [None](https://docs.python.org/3/library/constants.html#None) #### set_lzeroes(on: [bool](https://docs.python.org/3/library/functions.html#bool)) → [None](https://docs.python.org/3/library/constants.html#None) #### set_ap(\_ap: [array_parameters_t](../ida_nalt/index.md#ida_nalt.array_parameters_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### init_ap(\_ap: [array_parameters_t](../ida_nalt/index.md#ida_nalt.array_parameters_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### from_opinfo(flags: flags64_t, afl: aflags_t, opinfo: [opinfo_t](../ida_nalt/index.md#ida_nalt.opinfo_t), \_ap: [array_parameters_t](../ida_nalt/index.md#ida_nalt.array_parameters_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### parse_value_repr(\*args) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_typeinf.FRB_MASK Mask for the value type (\* means requires additional info): ### ida_typeinf.FRB_UNK Unknown. ### ida_typeinf.FRB_NUMB Binary number. ### ida_typeinf.FRB_NUMO Octal number. ### ida_typeinf.FRB_NUMH Hexadecimal number. ### ida_typeinf.FRB_NUMD Decimal number. ### ida_typeinf.FRB_FLOAT Floating point number (for interpreting an integer type as a floating value) ### ida_typeinf.FRB_CHAR Char. ### ida_typeinf.FRB_SEG Segment. ### ida_typeinf.FRB_ENUM ``` * ``` Enumeration ### ida_typeinf.FRB_OFFSET ``` * ``` Offset ### ida_typeinf.FRB_STRLIT ``` * ``` String literal (used for arrays) ### ida_typeinf.FRB_STROFF ``` * ``` Struct offset ### ida_typeinf.FRB_CUSTOM ``` * ``` Custom data type ### ida_typeinf.FRB_INVSIGN Invert sign (0x01 is represented as -0xFF). ### ida_typeinf.FRB_INVBITS Invert bits (0x01 is represented as ~0xFE). ### ida_typeinf.FRB_SIGNED Force signed representation. ### ida_typeinf.FRB_LZERO Toggle leading zeros (used for integers). ### ida_typeinf.FRB_TABFORM has additional tabular parameters ### *class* ida_typeinf.udm_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### offset *: uint64* member offset in bits #### size *: uint64* size in bits #### name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* member name #### cmt *: [str](https://docs.python.org/3/library/stdtypes.html#str)* member comment #### type *: [tinfo_t](#ida_typeinf.tinfo_t)* member type #### repr *: [value_repr_t](#ida_typeinf.value_repr_t)* radix, refinfo, strpath, custom_id, strtype #### effalign *: [int](https://docs.python.org/3/library/functions.html#int)* effective field alignment (in bytes) #### tafld_bits *: [int](https://docs.python.org/3/library/functions.html#int)* TAH bits. #### fda *: uchar* field alignment (shift amount) #### empty() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_bitfield() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_zero_bitfield() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_unaligned() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_baseclass() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_virtbase() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_vftable() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_method() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_gap() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_regcmt() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_retaddr() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_savregs() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_special_member() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_by_til() → [bool](https://docs.python.org/3/library/functions.html#bool) #### set_unaligned(on: [bool](https://docs.python.org/3/library/functions.html#bool) = True) → [None](https://docs.python.org/3/library/constants.html#None) #### set_baseclass(on: [bool](https://docs.python.org/3/library/functions.html#bool) = True) → [None](https://docs.python.org/3/library/constants.html#None) #### set_virtbase(on: [bool](https://docs.python.org/3/library/functions.html#bool) = True) → [None](https://docs.python.org/3/library/constants.html#None) #### set_vftable(on: [bool](https://docs.python.org/3/library/functions.html#bool) = True) → [None](https://docs.python.org/3/library/constants.html#None) #### set_method(on: [bool](https://docs.python.org/3/library/functions.html#bool) = True) → [None](https://docs.python.org/3/library/constants.html#None) #### set_regcmt(on: [bool](https://docs.python.org/3/library/functions.html#bool) = True) → [None](https://docs.python.org/3/library/constants.html#None) #### set_retaddr(on: [bool](https://docs.python.org/3/library/functions.html#bool) = True) → [None](https://docs.python.org/3/library/constants.html#None) #### set_savregs(on: [bool](https://docs.python.org/3/library/functions.html#bool) = True) → [None](https://docs.python.org/3/library/constants.html#None) #### set_by_til(on: [bool](https://docs.python.org/3/library/functions.html#bool) = True) → [None](https://docs.python.org/3/library/constants.html#None) #### clr_unaligned() → [None](https://docs.python.org/3/library/constants.html#None) #### clr_baseclass() → [None](https://docs.python.org/3/library/constants.html#None) #### clr_virtbase() → [None](https://docs.python.org/3/library/constants.html#None) #### clr_vftable() → [None](https://docs.python.org/3/library/constants.html#None) #### clr_method() → [None](https://docs.python.org/3/library/constants.html#None) #### begin() → uint64 #### end() → uint64 #### compare_with(r: [udm_t](#ida_typeinf.udm_t), tcflags: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### swap(r: [udm_t](#ida_typeinf.udm_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### is_anonymous_udm() → [bool](https://docs.python.org/3/library/functions.html#bool) #### set_value_repr(r: [value_repr_t](#ida_typeinf.value_repr_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### can_be_dtor() → [bool](https://docs.python.org/3/library/functions.html#bool) #### can_rename() → [bool](https://docs.python.org/3/library/functions.html#bool) ### *class* ida_typeinf.udtmembervec_t Bases: [`udtmembervec_template_t`](#ida_typeinf.udtmembervec_template_t) #### thisown ### *class* ida_typeinf.udt_type_data_t Bases: [`udtmembervec_t`](#ida_typeinf.udtmembervec_t) #### thisown #### total_size *: [int](https://docs.python.org/3/library/functions.html#int)* total structure size in bytes #### unpadded_size *: [int](https://docs.python.org/3/library/functions.html#int)* unpadded structure size in bytes #### effalign *: [int](https://docs.python.org/3/library/functions.html#int)* effective structure alignment (in bytes) #### taudt_bits *: [int](https://docs.python.org/3/library/functions.html#int)* TA… and TAUDT… bits. #### version *: uchar* version of udt_type_data_t #### sda *: uchar* declared structure alignment (shift amount+1). 0 - unspecified #### pack *: uchar* #pragma pack() alignment (shift amount) #### is_union *: [bool](https://docs.python.org/3/library/functions.html#bool)* is union or struct? #### swap(r: [udt_type_data_t](#ida_typeinf.udt_type_data_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### is_unaligned() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_msstruct() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_cppobj() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_vftable() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_fixed() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_tuple() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_iface() → [bool](https://docs.python.org/3/library/functions.html#bool) #### set_vftable(on: [bool](https://docs.python.org/3/library/functions.html#bool) = True) → [None](https://docs.python.org/3/library/constants.html#None) #### set_fixed(on: [bool](https://docs.python.org/3/library/functions.html#bool) = True) → [None](https://docs.python.org/3/library/constants.html#None) #### set_tuple(on: [bool](https://docs.python.org/3/library/functions.html#bool) = True) → [None](https://docs.python.org/3/library/constants.html#None) #### set_iface(on: [bool](https://docs.python.org/3/library/functions.html#bool) = True) → [None](https://docs.python.org/3/library/constants.html#None) #### is_last_baseclass(idx: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### add_member(\_name: [str](https://docs.python.org/3/library/stdtypes.html#str), \_type: [tinfo_t](#ida_typeinf.tinfo_t), \_offset: uint64 = 0) → udm_t & Add a new member to a structure or union. This function just pushes a new member to the back of the structure/union member vector. * **Parameters:** * **\_name** – Member name. Must not be nullptr. * **\_type** – Member type. Must not be empty. * **\_offset** – Member offset in bits. It is the caller’s responsibility to specify correct offsets. * **Returns:** { Reference to the newly added member } #### find_member(\*args) → ssize_t This function has the following signatures: > 1. find_member(pattern_udm: udm_t > ``` > * > ``` > , strmem_flags: int) -> ssize_t > 2. find_member(name: str) -> ssize_t > 3. find_member(bit_offset: uint64) -> ssize_t # 0: find_member(pattern_udm: udm_t ``` * ``` , strmem_flags: int) -> ssize_t tinfo_t::find_udm * **Returns:** the index of the found member or -1 # 1: find_member(name: str) -> ssize_t # 2: find_member(bit_offset: uint64) -> ssize_t #### get_best_fit_member(disp) Get the member that is most likely referenced by the specified offset. * **Parameters:** **disp** – the byte offset * **Returns:** a tuple (int, udm_t), or (-1, None) if member not found #### deduplicate_members() → [bool](https://docs.python.org/3/library/functions.html#bool) Rename members with the same names. This function finds duplicate member names and renames them by adding a numeric suffix like \_2, \_3, etc. Also, it renames destructors by substituting ~ by ``` dtr_ ``` . * **Returns:** true if renamed a member ### ida_typeinf.STRUC_SEPARATOR structname.fieldname ### ida_typeinf.VTBL_SUFFIX ### ida_typeinf.VTBL_LAYOUT_SUFFIX ### ida_typeinf.VTBL_MEMNAME ### ida_typeinf.stroff_as_size(plen: [int](https://docs.python.org/3/library/functions.html#int), tif: [tinfo_t](#ida_typeinf.tinfo_t), value: asize_t) → [bool](https://docs.python.org/3/library/functions.html#bool) Should display a structure offset expression as the structure size? ### *class* ida_typeinf.udm_visitor_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### visit_udm(tid: tid_t, tif: [tinfo_t](#ida_typeinf.tinfo_t), udt: [udt_type_data_t](#ida_typeinf.udt_type_data_t), idx: ssize_t) → [int](https://docs.python.org/3/library/functions.html#int) * **Parameters:** * **tid** – udt tid * **tif** – udt type info (may be nullptr for corrupted idbs) * **udt** – udt type data (may be nullptr for corrupted idbs) * **idx** – the index of udt the member (may be -1 if udm was not found) ### ida_typeinf.visit_stroff_udms(sfv: udm_visitor_t, path: tid_t const \*, disp: adiff_t \*, appzero: bool) → adiff_t \* Visit structure fields in a stroff expression or in a reference to a struct data variable. This function can be used to enumerate all components of an expression like ‘a.b.c’. * **Parameters:** * **sfv** – visitor object * **path** – struct path (path[0] contains the initial struct id) * **disp** – offset into structure * **appzero** – should visit field at offset zero? * **Returns:** visitor result ### *class* ida_typeinf.bitfield_type_data_t(\_nbytes: uchar = 0, \_width: uchar = 0, \_is_unsigned: [bool](https://docs.python.org/3/library/functions.html#bool) = False) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### nbytes *: uchar* enclosing type size (1,2,4,8 bytes) #### width *: uchar* number of bits #### is_unsigned *: [bool](https://docs.python.org/3/library/functions.html#bool)* is bitfield unsigned? #### compare(r: [bitfield_type_data_t](#ida_typeinf.bitfield_type_data_t)) → [int](https://docs.python.org/3/library/functions.html#int) #### swap(r: [bitfield_type_data_t](#ida_typeinf.bitfield_type_data_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### is_valid_bitfield() → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_typeinf.is_one_bit_mask(mask: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) Is bitmask one bit? ### ida_typeinf.inf_pack_stkargs(\*args) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_typeinf.inf_big_arg_align(\*args) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_typeinf.inf_huge_arg_align(\*args) → [bool](https://docs.python.org/3/library/functions.html#bool) ### *class* ida_typeinf.type_mods_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### type *: [tinfo_t](#ida_typeinf.tinfo_t)* current type #### name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* current type name #### cmt *: [str](https://docs.python.org/3/library/stdtypes.html#str)* comment for current type #### flags *: [int](https://docs.python.org/3/library/functions.html#int)* Type modification bits #### clear() → [None](https://docs.python.org/3/library/constants.html#None) #### set_new_type(t: [tinfo_t](#ida_typeinf.tinfo_t)) → [None](https://docs.python.org/3/library/constants.html#None) The visit_type() function may optionally save the modified type info. Use the following functions for that. The new name and comment will be applied only if the current tinfo element has storage for them. #### set_new_name(n: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [None](https://docs.python.org/3/library/constants.html#None) #### set_new_cmt(c: [str](https://docs.python.org/3/library/stdtypes.html#str), rptcmt: [bool](https://docs.python.org/3/library/functions.html#bool)) → [None](https://docs.python.org/3/library/constants.html#None) #### has_type() → [bool](https://docs.python.org/3/library/functions.html#bool) #### has_name() → [bool](https://docs.python.org/3/library/functions.html#bool) #### has_cmt() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_rptcmt() → [bool](https://docs.python.org/3/library/functions.html#bool) #### has_info() → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_typeinf.TVIS_TYPE new type info is present ### ida_typeinf.TVIS_NAME new name is present (only for funcargs and udt members) ### ida_typeinf.TVIS_CMT new comment is present (only for udt members) ### ida_typeinf.TVIS_RPTCMT the new comment is repeatable ### *class* ida_typeinf.tinfo_visitor_t(s: [int](https://docs.python.org/3/library/functions.html#int) = 0) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### state *: [int](https://docs.python.org/3/library/functions.html#int)* tinfo visitor states #### visit_type(out: [type_mods_t](#ida_typeinf.type_mods_t), tif: [tinfo_t](#ida_typeinf.tinfo_t), name: [str](https://docs.python.org/3/library/stdtypes.html#str), cmt: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [int](https://docs.python.org/3/library/functions.html#int) Visit a subtype. this function must be implemented in the derived class. it may optionally fill out with the new type info. this can be used to modify types (in this case the ‘out’ argument of apply_to() may not be nullptr) return 0 to continue the traversal. return !=0 to stop the traversal. #### prune_now() → [None](https://docs.python.org/3/library/constants.html#None) To refuse to visit children of the current type, use this: #### apply_to(tif: [tinfo_t](#ida_typeinf.tinfo_t), out: [type_mods_t](#ida_typeinf.type_mods_t) = None, name: [str](https://docs.python.org/3/library/stdtypes.html#str) = None, cmt: [str](https://docs.python.org/3/library/stdtypes.html#str) = None) → [int](https://docs.python.org/3/library/functions.html#int) Call this function to initiate the traversal. ### ida_typeinf.TVST_PRUNE don’t visit children of current type ### ida_typeinf.TVST_DEF visit type definition (meaningful for typerefs) ### ida_typeinf.TVST_LEVEL ### *class* ida_typeinf.regobj_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### regidx *: [int](https://docs.python.org/3/library/functions.html#int)* index into dbg->registers #### relocate *: [int](https://docs.python.org/3/library/functions.html#int)* 0-plain num, 1-must relocate #### value *: bytevec_t* #### size() → [int](https://docs.python.org/3/library/functions.html#int) ### *class* ida_typeinf.regobjs_t Bases: [`regobjvec_t`](#ida_typeinf.regobjvec_t) #### thisown ### ida_typeinf.unpack_idcobj_from_idb(obj: idc_value_t \*, tif: tinfo_t, ea: ida_idaapi.ea_t, off0: bytevec_t const \*, pio_flags: int = 0) → error_t Collection of register objects. Read a typed idc object from the database ### ida_typeinf.PIO_NOATTR_FAIL missing attributes are not ok ### ida_typeinf.PIO_IGNORE_PTRS do not follow pointers ### ida_typeinf.unpack_idcobj_from_bv(obj: idc_value_t \*, tif: tinfo_t, bytes: bytevec_t const &, pio_flags: int = 0) → error_t Read a typed idc object from the byte vector. ### ida_typeinf.pack_idcobj_to_idb(obj: idc_value_t const \*, tif: tinfo_t, ea: ida_idaapi.ea_t, pio_flags: int = 0) → error_t Write a typed idc object to the database. ### ida_typeinf.pack_idcobj_to_bv(obj: idc_value_t const \*, tif: tinfo_t, bytes: relobj_t, objoff: void \*, pio_flags: int = 0) → error_t Write a typed idc object to the byte vector. Byte vector may be non-empty, this function will append data to it ### ida_typeinf.apply_tinfo_to_stkarg(insn: insn_t const &, x: op_t const &, v: int, tif: tinfo_t, name: str) → [bool](https://docs.python.org/3/library/functions.html#bool) Helper function for the processor modules. to be called from processor_t::use_stkarg_type ### *class* ida_typeinf.stkarg_part_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### src *: [int](https://docs.python.org/3/library/functions.html#int)* source operand index in insn_t::ops #### dst *: [int](https://docs.python.org/3/library/functions.html#int)* destination operand index, or -1 for push semantics #### off *: [int](https://docs.python.org/3/library/functions.html#int)* when dst != -1, stack offset for this part (used in place of insn_t::ops[dst].addr); ignored for push ### *class* ida_typeinf.argtinfo_helper_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### reserved *: [int](https://docs.python.org/3/library/functions.html#int)* #### set_op_tinfo(insn: insn_t const &, x: op_t const &, tif: tinfo_t, name: str) → [bool](https://docs.python.org/3/library/functions.html#bool) Set the operand type as specified. #### is_stkarg_load(insn: insn_t const &, src: int \*, dst: int \*) → [bool](https://docs.python.org/3/library/functions.html#bool) Is the current insn a stkarg load? if yes: \* src: index of the source operand in insn_t::ops \* dst: index of the destination operand in insn_t::ops insn_t::ops[dst].addr is expected to have the stack offset #### has_delay_slot(arg0: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) The call instruction with a delay slot? #### use_arg_tinfos(caller: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), fti: [func_type_data_t](#ida_typeinf.func_type_data_t), rargs: [funcargvec_t](#ida_typeinf.funcargvec_t)) → [None](https://docs.python.org/3/library/constants.html#None) This function is to be called by the processor module in response to ev_use_arg_types. ### ida_typeinf.gen_use_arg_tinfos(\_this: [argtinfo_helper_t](#ida_typeinf.argtinfo_helper_t), caller: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), fti: [func_type_data_t](#ida_typeinf.func_type_data_t), rargs: [funcargvec_t](#ida_typeinf.funcargvec_t)) → [None](https://docs.python.org/3/library/constants.html#None) Do not call this function directly, use argtinfo_helper_t. ### ida_typeinf.func_has_stkframe_hole(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), fti: [func_type_data_t](#ida_typeinf.func_type_data_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Looks for a hole at the beginning of the stack arguments. Will make use of the IDB’s func_t function at that place (if present) to help determine the presence of such a hole. ### *class* ida_typeinf.lowertype_helper_t(\*args, \*\*kwargs) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### func_has_stkframe_hole(candidate: [tinfo_t](#ida_typeinf.tinfo_t), candidate_data: [func_type_data_t](#ida_typeinf.func_type_data_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### get_func_purged_bytes(candidate: [tinfo_t](#ida_typeinf.tinfo_t), candidate_data: [func_type_data_t](#ida_typeinf.func_type_data_t)) → [int](https://docs.python.org/3/library/functions.html#int) ### *class* ida_typeinf.ida_lowertype_helper_t(\_tif: [tinfo_t](#ida_typeinf.tinfo_t), \_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), \_pb: [int](https://docs.python.org/3/library/functions.html#int)) Bases: [`lowertype_helper_t`](#ida_typeinf.lowertype_helper_t) #### thisown #### func_has_stkframe_hole(candidate: [tinfo_t](#ida_typeinf.tinfo_t), candidate_data: [func_type_data_t](#ida_typeinf.func_type_data_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### get_func_purged_bytes(candidate: [tinfo_t](#ida_typeinf.tinfo_t), arg3: [func_type_data_t](#ida_typeinf.func_type_data_t)) → [int](https://docs.python.org/3/library/functions.html#int) ### ida_typeinf.lower_type(til: [til_t](#ida_typeinf.til_t), tif: [tinfo_t](#ida_typeinf.tinfo_t), name: [str](https://docs.python.org/3/library/stdtypes.html#str) = None, \_helper: [lowertype_helper_t](#ida_typeinf.lowertype_helper_t) = None) → [int](https://docs.python.org/3/library/functions.html#int) Lower type. Inspect the type and lower all function subtypes using lower_func_type(). We call the prototypes usually encountered in source files “high level” They may have implicit arguments, array arguments, big structure retvals, etc We introduce explicit arguments (i.e. ‘this’ pointer) and call the result “low level prototype”. See FTI_HIGH. In order to improve heuristics for recognition of big structure retvals, it is recommended to pass a helper that will be used to make decisions. That helper will be used only for lowering ‘tif’, and not for the children types walked through by recursion. * **Returns:** 1: removed FTI_HIGH, * **Returns:** 2: made substantial changes * **Returns:** -1: failure ### ida_typeinf.replace_ordinal_typerefs(til: [til_t](#ida_typeinf.til_t), tif: [tinfo_t](#ida_typeinf.tinfo_t)) → [int](https://docs.python.org/3/library/functions.html#int) Replace references to ordinal types by name references. This function ‘unties’ the type from the current local type library and makes it easier to export it. * **Parameters:** * **til** – type library to use. may be nullptr. * **tif** – type to modify (in/out) * **Returns:** number: of replaced subtypes, -1 on failure ### ida_typeinf.UTP_ENUM ### ida_typeinf.UTP_STRUCT ### ida_typeinf.begin_type_updating(utp: update_type_t) → [None](https://docs.python.org/3/library/constants.html#None) Mark the beginning of a large update operation on the types. Can be used with add_enum_member(), add_struc_member, etc… Also see end_type_updating() ### ida_typeinf.end_type_updating(utp: update_type_t) → [None](https://docs.python.org/3/library/constants.html#None) Mark the end of a large update operation on the types (see begin_type_updating()). ### *class* ida_typeinf.field_path_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### top_tif *: [tinfo_t](#ida_typeinf.tinfo_t)* top-level type (after resolving first segment) #### leaf_tif *: [tinfo_t](#ida_typeinf.tinfo_t)* type of the leaf member (== top_tif if path is just a type name) #### leaf_udm_tid *: tid_t* TID of the leaf member, or BADADDR if path is just a type name (no member at the end of the path) #### cumul_bitoff *: uint64* cumulative bit offset of the leaf member from top of top_tif #### stroff_path *: qvector< tid_t >* ready-to-use op_stroff() path: top_tif’s TID at [0], followed by one member TID per union descent (in order). Pass directly to op_stroff(). Empty only if top_tif has no TID (e.g. type not imported into local types yet). ### ida_typeinf.resolve_field_path(out: [field_path_t](#ida_typeinf.field_path_t), til: [til_t](#ida_typeinf.til_t), dotted_path: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [bool](https://docs.python.org/3/library/functions.html#bool) Resolve a dotted field path like “Top.Field1.Field2.Leaf”. The first segment must be a registered TIL type name (a type, not a member). Each subsequent segment is looked up as a member in the current type. Every segment must be spelled out explicitly. On success, out is filled with the leaf info plus the chain of union selections needed to disambiguate the path for op_stroff(). * **Parameters:** * **out** – result; cleared on entry * **til** – type library; nullptr means current idati * **dotted_path** – dotted field path * **Returns:** true on success ### ida_typeinf.get_named_type_tid(name: [str](https://docs.python.org/3/library/stdtypes.html#str)) → tid_t Get named local type TID * **Parameters:** **name** – type name * **Returns:** TID or BADADDR ### ida_typeinf.get_tid_name(tid: tid_t) → [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None) Get a type name for the specified TID * **Parameters:** **tid** – type TID * **Returns:** true if there is type with TID ### ida_typeinf.get_tid_ordinal(tid: tid_t) → [int](https://docs.python.org/3/library/functions.html#int) Get type ordinal number for TID * **Parameters:** **tid** – type/enum constant/udt member TID * **Returns:** type ordinal number or 0 ### ida_typeinf.get_udm_by_fullname(udm: [udm_t](#ida_typeinf.udm_t), fullname: [str](https://docs.python.org/3/library/stdtypes.html#str)) → ssize_t Get udt member by full name * **Parameters:** * **udm** – member, can be NULL * **fullname** – udt member name in format . * **Returns:** member index into udt_type_data_t or -1 ### ida_typeinf.get_idainfo_by_udm(\*args) → [bool](https://docs.python.org/3/library/functions.html#bool) Calculate IDA info from udt member * **Parameters:** * **udm** – udt member * **refinfo_ea** – if specified will be used to adjust the refinfo_t data ### ida_typeinf.create_enum_type(enum_name: [str](https://docs.python.org/3/library/stdtypes.html#str), ei: [enum_type_data_t](#ida_typeinf.enum_type_data_t), enum_width: [int](https://docs.python.org/3/library/functions.html#int), sign: type_sign_t, convert_to_bitmask: [bool](https://docs.python.org/3/library/functions.html#bool), enum_cmt: [str](https://docs.python.org/3/library/stdtypes.html#str) = None) → tid_t Create type enum * **Parameters:** * **enum_name** – type name * **ei** – enum type data * **enum_width** – the width of an enum element allowed values: 0 (unspecified),1,2,4,8,16,32,64 * **sign** – enum sign * **convert_to_bitmask** – try convert enum to bitmask enum * **enum_cmt** – enum type comment * **Returns:** enum TID ### *class* ida_typeinf.valstr_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### oneline *: [str](https://docs.python.org/3/library/stdtypes.html#str)* result if printed on one line in UTF-8 encoding #### length *: [int](https://docs.python.org/3/library/functions.html#int)* length if printed on one line #### members *: valstrs_t \** strings for members, each member separately #### info *: valinfo_t \** additional info #### props *: [int](https://docs.python.org/3/library/functions.html#int)* temporary properties, used internally ### ida_typeinf.VALSTR_OPEN printed opening curly brace ‘{’ ### *class* ida_typeinf.valstrs_t Bases: [`valstrvec_t`](#ida_typeinf.valstrvec_t) #### thisown ### *class* ida_typeinf.text_sink_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown ### ida_typeinf.PDF_INCL_DEPS Include all type dependencies. ### ida_typeinf.PDF_DEF_FWD Allow forward declarations. ### ida_typeinf.PDF_DEF_BASE Include base types: \_\_int8, \_\_int16, etc.. ### ida_typeinf.PDF_HEADER_CMT Prepend output with a descriptive comment. ### ida_typeinf.PDF_NO_ANON_NAME Ignore types with anonymous name. ### ida_typeinf.calc_number_of_children(loc: [argloc_t](#ida_typeinf.argloc_t), tif: [tinfo_t](#ida_typeinf.tinfo_t), dont_deref_ptr: [bool](https://docs.python.org/3/library/functions.html#bool) = False) → [int](https://docs.python.org/3/library/functions.html#int) Calculate max number of lines of a formatted c data, when expanded (PTV_EXPAND). * **Parameters:** * **loc** – location of the data (ALOC_STATIC or ALOC_CUSTOM) * **tif** – type info * **dont_deref_ptr** – consider ‘ea’ as the ptr value * **Returns:** 0: data is not expandable * **Returns:** -1: error, see qerrno * **Returns:** else: the max number of lines ### ida_typeinf.get_enum_member_expr(tif: [tinfo_t](#ida_typeinf.tinfo_t), serial: [int](https://docs.python.org/3/library/functions.html#int), value: uint64) → [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None) Return a C expression that can be used to represent an enum member. If the value does not correspond to any single enum member, this function tries to find a bitwise combination of enum members that correspond to it. If more than half of value bits do not match any enum members, it fails. * **Parameters:** * **tif** – enumeration type * **serial** – which enumeration member to use (0 means the first with the given value) * **value** – value to search in the enumeration type * **Returns:** success ### *class* ida_typeinf.til_symbol_t(n: [str](https://docs.python.org/3/library/stdtypes.html#str) = None, t: [til_t](#ida_typeinf.til_t) = None) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* symbol name #### til *: til_t const \** pointer to til ### *class* ida_typeinf.predicate_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### should_display(til: til_t, name: str, type: type_t const \*, fields: p_list const \*) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_typeinf.choose_named_type(out_sym: [til_symbol_t](#ida_typeinf.til_symbol_t), root_til: [til_t](#ida_typeinf.til_t), title: [str](https://docs.python.org/3/library/stdtypes.html#str), ntf_flags: [int](https://docs.python.org/3/library/functions.html#int), predicate: [predicate_t](#ida_typeinf.predicate_t) = None) → [bool](https://docs.python.org/3/library/functions.html#bool) Choose a type from a type library. * **Parameters:** * **out_sym** – pointer to be filled with the chosen type * **root_til** – pointer to starting til (the function will inspect the base tils if allowed by flags) * **title** – title of listbox to display * **ntf_flags** – combination of Flags for named types * **predicate** – predicate to select types to display (maybe nullptr) * **Returns:** false if nothing is chosen, otherwise true ### ida_typeinf.calc_retloc(\*args) → [bool](https://docs.python.org/3/library/functions.html#bool) This function has the following signatures: > 1. calc_retloc(fti: func_type_data_t > ``` > * > ``` > ) -> bool > 2. calc_retloc(retloc: argloc_t > ``` > * > ``` > , rettype: const tinfo_t &, cc: callcnv_t) -> bool # 0: calc_retloc(fti: func_type_data_t ``` * ``` ) -> bool # 1: calc_retloc(retloc: argloc_t ``` * ``` , rettype: const tinfo_t &, cc: callcnv_t) -> bool ### *class* ida_typeinf.til_type_ref_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### cb *: [int](https://docs.python.org/3/library/functions.html#int)* #### tif *: [tinfo_t](#ida_typeinf.tinfo_t)* #### cursor *: tif_cursor_t* #### ordinal *: [int](https://docs.python.org/3/library/functions.html#int)* #### is_writable *: [bool](https://docs.python.org/3/library/functions.html#bool)* #### is_detached *: [bool](https://docs.python.org/3/library/functions.html#bool)* #### is_forward *: [bool](https://docs.python.org/3/library/functions.html#bool)* #### kind *: type_t* #### memidx *: ssize_t* #### nmembers *: [int](https://docs.python.org/3/library/functions.html#int)* #### udm *: [udm_t](#ida_typeinf.udm_t)* BTF_STRUCT or BTF_UNION: the current member. #### total_size *: [int](https://docs.python.org/3/library/functions.html#int)* #### unpadded_size *: [int](https://docs.python.org/3/library/functions.html#int)* #### last_udm_offset *: uint64* #### bucket_start *: uint64* #### bf_bitoff *: [int](https://docs.python.org/3/library/functions.html#int)* #### offset *: uint64* #### edm *: [edm_t](#ida_typeinf.edm_t)* BTF_ENUM: the current enum member. #### fa *: funcarg_t const \** BT_FUNC: the current argument, nullptr - ellipsis. #### clear() → [None](https://docs.python.org/3/library/constants.html#None) #### on_member() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_typedef() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_struct() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_union() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_enum() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_func() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_udt() → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_typeinf.choose_local_tinfo(arg1: til_t, arg2: str, arg3: til_tinfo_predicate_t \*, arg4: int, arg5: void \*) → [int](https://docs.python.org/3/library/functions.html#int) ### ida_typeinf.choose_local_tinfo_and_delta(arg1: int32 \*, arg2: til_t, arg3: str, arg4: til_tinfo_predicate_t \*, arg5: int, arg6: void \*) → [int](https://docs.python.org/3/library/functions.html#int) ### ida_typeinf.register_custom_callcnv(cnv_incref: [custom_callcnv_t](#ida_typeinf.custom_callcnv_t)) → custom_callcnv_t \* Register a calling convention * **Returns:** CM_CC_INVALID means failure: * bad ccinf.name * ccinf.name already exists * the calling convention is special (usercall, purging, vararg) and there are too many of them already ### ida_typeinf.unregister_custom_callcnv(cnv_decref: [custom_callcnv_t](#ida_typeinf.custom_callcnv_t)) → custom_callcnv_t \* Unregister a calling convention * **Returns:** true if successfully unregistered the custom calling convention ### ida_typeinf.idc_parse_decl(til: [til_t](#ida_typeinf.til_t), decl: [str](https://docs.python.org/3/library/stdtypes.html#str), flags: [int](https://docs.python.org/3/library/functions.html#int)) → Tuple[[str](https://docs.python.org/3/library/stdtypes.html#str), [bytes](https://docs.python.org/3/library/stdtypes.html#bytes), [bytes](https://docs.python.org/3/library/stdtypes.html#bytes)] | [None](https://docs.python.org/3/library/constants.html#None) ### ida_typeinf.calc_type_size(til: [til_t](#ida_typeinf.til_t), type: [bytes](https://docs.python.org/3/library/stdtypes.html#bytes)) Returns the size of a type :param til: Type info library. ‘None’ can be passed. :param type: serialized type byte string :returns: The size of the type (None on failure) ### ida_typeinf.apply_type(til: [til_t](#ida_typeinf.til_t), type: [bytes](https://docs.python.org/3/library/stdtypes.html#bytes), fields: [bytes](https://docs.python.org/3/library/stdtypes.html#bytes), ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), flags: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) Apply the specified type to the address * **Parameters:** * **til** – Type info library. ‘None’ can be used. * **type** – type string * **fields** – fields string (may be empty or None) * **ea** – the address of the object * **flags** – combination of ``` TINFO_ ``` … constants or 0 * **Returns:** Boolean ### ida_typeinf.get_arg_addrs(caller: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) Retrieve addresses of argument initialization instructions * **Parameters:** **caller** – the address of the call instruction * **Returns:** list of instruction addresses ### ida_typeinf.unpack_object_from_idb(til: [til_t](#ida_typeinf.til_t), type: [bytes](https://docs.python.org/3/library/stdtypes.html#bytes), fields: [bytes](https://docs.python.org/3/library/stdtypes.html#bytes), ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), pio_flags: [int](https://docs.python.org/3/library/functions.html#int) = 0) Unpacks from the database at ‘ea’ to an object. Please refer to unpack_object_from_bv() ### ida_typeinf.unpack_object_from_bv(til: [til_t](#ida_typeinf.til_t), type: unpack_object_from_bv.bytes, fields: unpack_object_from_bv.bytes, bytes, pio_flags: [int](https://docs.python.org/3/library/functions.html#int) = 0) Unpacks a buffer into an object. Returns the error_t returned by idaapi.pack_object_to_idb * **Parameters:** * **til** – Type library. ‘None’ can be passed. * **type** – type string * **fields** – fields string (may be empty or None) * **bytes** – the bytes to unpack * **pio_flags** – flags used while unpacking * **Returns:** tuple(1, obj) on success, or tuple(0, err) on failure ### ida_typeinf.pack_object_to_idb(obj, til: [til_t](#ida_typeinf.til_t), type: [bytes](https://docs.python.org/3/library/stdtypes.html#bytes), fields: [bytes](https://docs.python.org/3/library/stdtypes.html#bytes), ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), pio_flags: [int](https://docs.python.org/3/library/functions.html#int) = 0) Write a typed object to the database. Raises an exception if wrong parameters were passed or conversion fails Returns the error_t returned by idaapi.pack_object_to_idb * **Parameters:** * **til** – Type library. ‘None’ can be passed. * **type** – type string * **fields** – fields string (may be empty or None) * **ea** – ea to be used while packing * **pio_flags** – flags used while unpacking ### ida_typeinf.pack_object_to_bv(obj, til: [til_t](#ida_typeinf.til_t), type: [bytes](https://docs.python.org/3/library/stdtypes.html#bytes), fields: [bytes](https://docs.python.org/3/library/stdtypes.html#bytes), base_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), pio_flags: [int](https://docs.python.org/3/library/functions.html#int) = 0) Packs a typed object to a string * **Parameters:** * **til** – Type library. ‘None’ can be passed. * **type** – type string * **fields** – fields string (may be empty or None) * **base_ea** – base ea used to relocate the pointers in the packed object * **pio_flags** – flags used while unpacking * **Returns:** tuple(1, packed_buf) on success, or tuple(0, err_code) on failure ### ida_typeinf.PT_FILE ### ida_typeinf.PT_STANDALONE ### ida_typeinf.idc_parse_types(input: [str](https://docs.python.org/3/library/stdtypes.html#str), flags: [int](https://docs.python.org/3/library/functions.html#int)) → [int](https://docs.python.org/3/library/functions.html#int) ### ida_typeinf.idc_get_type_raw(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → PyObject \* ### ida_typeinf.idc_get_local_type_raw(ordinal) → Tuple[[bytes](https://docs.python.org/3/library/stdtypes.html#bytes), [bytes](https://docs.python.org/3/library/stdtypes.html#bytes)] | [None](https://docs.python.org/3/library/constants.html#None) ### ida_typeinf.idc_guess_type(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None) ### ida_typeinf.idc_get_type(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None) ### ida_typeinf.idc_set_local_type(ordinal: [int](https://docs.python.org/3/library/functions.html#int), dcl: [str](https://docs.python.org/3/library/stdtypes.html#str), flags: [int](https://docs.python.org/3/library/functions.html#int)) → [int](https://docs.python.org/3/library/functions.html#int) ### ida_typeinf.idc_get_local_type(ordinal: [int](https://docs.python.org/3/library/functions.html#int), flags: [int](https://docs.python.org/3/library/functions.html#int)) → [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None) ### ida_typeinf.idc_print_type(type: [bytes](https://docs.python.org/3/library/stdtypes.html#bytes), fields: [bytes](https://docs.python.org/3/library/stdtypes.html#bytes), name: [str](https://docs.python.org/3/library/stdtypes.html#str), flags: [int](https://docs.python.org/3/library/functions.html#int)) → [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None) ### ida_typeinf.idc_get_local_type_name(ordinal: [int](https://docs.python.org/3/library/functions.html#int)) → [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None) ### ida_typeinf.get_named_type(til: [til_t](#ida_typeinf.til_t), name: [str](https://docs.python.org/3/library/stdtypes.html#str), ntf_flags: [int](https://docs.python.org/3/library/functions.html#int)) Get a type data by its name. * **Parameters:** * **til** – Type library * **name** – the type name * **ntf_flags** – a combination of NTF_\* constants * **Returns:** tuple(code, type_str, fields_str, cmt, field_cmts, sclass, value) on success, or None on failure ### ida_typeinf.get_named_type64(til: [til_t](#ida_typeinf.til_t), name: [str](https://docs.python.org/3/library/stdtypes.html#str), ntf_flags: [int](https://docs.python.org/3/library/functions.html#int) = 0) → Tuple[[int](https://docs.python.org/3/library/functions.html#int), [bytes](https://docs.python.org/3/library/stdtypes.html#bytes), [bytes](https://docs.python.org/3/library/stdtypes.html#bytes), [str](https://docs.python.org/3/library/stdtypes.html#str), [str](https://docs.python.org/3/library/stdtypes.html#str), [int](https://docs.python.org/3/library/functions.html#int), [int](https://docs.python.org/3/library/functions.html#int)] | [None](https://docs.python.org/3/library/constants.html#None) Get a named type from a type library. Please use til_t.get_named_type instead. ### ida_typeinf.print_decls(printer: [text_sink_t](#ida_typeinf.text_sink_t), til: [til_t](#ida_typeinf.til_t), ordinals: List[[int](https://docs.python.org/3/library/functions.html#int)], flags: [int](https://docs.python.org/3/library/functions.html#int)) → [int](https://docs.python.org/3/library/functions.html#int) Print types (and possibly their dependencies) in a format suitable for using in a header file. This is the reverse parse_decls(). * **Parameters:** * **printer** – a handler for printing text * **til** – the type library holding the ordinals * **ordinals** – a list of ordinals corresponding to the types to print * **flags** – a combination of ``` PDF_ ``` constants * **Returns:** >0: the number of types exported * **Returns:** 0: an error occurred * **Returns:** <0: the negated number of types exported. There were minor errors and the resulting output might not be compilable. ### ida_typeinf.remove_tinfo_pointer(tif: [tinfo_t](#ida_typeinf.tinfo_t), name: [str](https://docs.python.org/3/library/stdtypes.html#str), til: [til_t](#ida_typeinf.til_t)) → Tuple[[bool](https://docs.python.org/3/library/functions.html#bool), [str](https://docs.python.org/3/library/stdtypes.html#str)] Remove pointer of a type. (i.e. convert “char ``` * ``` ” into “char”). Optionally remove the “lp” (or similar) prefix of the input name. If the input type is not a pointer, then fail. * **Parameters:** * **tif** – the type info * **name** – the name of the type to “unpointerify” * **til** – the type library * **Returns:** a tuple (success, new-name) ### ida_typeinf.get_numbered_type(til: [til_t](#ida_typeinf.til_t), ordinal: [int](https://docs.python.org/3/library/functions.html#int)) → Tuple[[bytes](https://docs.python.org/3/library/stdtypes.html#bytes), [bytes](https://docs.python.org/3/library/stdtypes.html#bytes), [str](https://docs.python.org/3/library/stdtypes.html#str), [str](https://docs.python.org/3/library/stdtypes.html#str), [int](https://docs.python.org/3/library/functions.html#int)] | [None](https://docs.python.org/3/library/constants.html#None) Get a type from a type library, by its ordinal Please use til_t.get_numbered_type instead. ### ida_typeinf.set_numbered_type(ti: til_t, ordinal: int, ntf_flags: int, name: str, type: type_t const \*, fields: p_list const \* = None, cmt: str = None, fldcmts: p_list const \* = None, sclass: sclass_t const \* = None) → tinfo_code_t ### ida_typeinf.cvar ### ida_typeinf.sc_auto ### ida_typeinf.sc_ext ### ida_typeinf.sc_friend ### ida_typeinf.sc_reg ### ida_typeinf.sc_stat ### ida_typeinf.sc_type ### ida_typeinf.sc_unk ### ida_typeinf.sc_virt ### ida_typeinf.TERR_SAVE ### ida_typeinf.TERR_WRONGNAME ### ida_typeinf.BADORD *= 4294967295* ### ida_typeinf.enum_member_vec_t ### ida_typeinf.enum_member_t ### ida_typeinf.udt_member_t ### ida_typeinf.resolve_typedef # index.html.md # ida_dscu Apple Dyld Shared Cache (DSC) API. A DSC: is essentially, a large collection of dylib files (AKA \_images_), packed together in an Apple-custom format those are used to limit the amount of overhead at program launch-time, by having a lot of the relocations/resolutions heavylifting already addressed in addition to \_images_, the DSC-producing tooling creates specific regions whose purpose is to “link” the various images together. Those regions are known as “branch mappings” (older caches used “branch islands”.) occasionally, you will also find some GOT’s (and possibly “unknown regions”) in the address space of a DSC DSC’s can grow very large in size, and will then be split into multiple \_files_ (e.g., iPhone 16 DSC’s have north of 80 files) All-in-all a DSC is an unusual beast, in the sense that hardly makes sense to load it all in an IDA database: you would end up with a a set of mostly-unrelated libraries. Instead, an iterative approach is preferable: load whatever part of the DSC you need, when you need it. This API provides exactly that. # Key concepts/entities images: the dylib files, packed in the DSC unknown regions: portions of the address space that ARE covered by the DSC’s mappings, but are not referred to by any of the known entities. The address space is not missing - it’s our understanding of the content that has a gap. branch islands/branch mappings: stubs, that help stitch together calls between images files: the file(s) that compose the DSC. When a DSC is composed of multiple files, the one that is used as the entrypoint, is called the “toplevel” file. # Secondary concepts/entities file mappings: (to not be confused with branch mappings!) internal, high-level representation of “portions” of a file. Typically files have somewhere between 1…5 mappings region_info_t: a “range”: either a section of an image, or a branch mapping, GOT, unknown region… Typically, an image will have dozens of regions. See below for more info # API Keeping the above concepts in mind, navigating the API should be pretty straightforward: it’s kept simple on-purpose. A couple notes: Use get_dscu_svc() to retrieve the API interface, Initially, the DSC loader will only load the DSC header, Additional images/regions can be loaded through the API, as needed. ## Attributes | [`rt_invalid`](#ida_dscu.rt_invalid) | Invalid. | |--------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------| | [`rt_image_entity`](#ida_dscu.rt_image_entity) | A subset of an image (segment, section, ...). | | [`rt_island`](#ida_dscu.rt_island) | A branch island. | | [`rt_header`](#ida_dscu.rt_header) | The dyld header. | | [`rt_mapping`](#ida_dscu.rt_mapping) | A subcache branch mapping. | | [`rt_unknown`](#ida_dscu.rt_unknown) | A covered cache region whose content we don't (yet) identify. | | [`rt_got`](#ida_dscu.rt_got) | A Global Offset Table. | | [`rt_cache_data`](#ida_dscu.rt_cache_data) | Cache-wide named data (e.g. a linkedit subcache mapping). | | [`DLRF_UNDO_ON_FAILURE`](#ida_dscu.DLRF_UNDO_ON_FAILURE) | failure to satisfy any part of the request, will revert everything | | [`DLRF_CREATE_UNDO_POINT`](#ida_dscu.DLRF_CREATE_UNDO_POINT) | should the request create a new undo point (or rely on the last created one and undo to that.) | | [`DLRF_SILENT`](#ida_dscu.DLRF_SILENT) | don't emit loader_finished notification | | [`DLRF_ASK_CONFIRMATION`](#ida_dscu.DLRF_ASK_CONFIRMATION) | ask the user's confirmation before performing the load | | [`DLRF_DEFAULT`](#ida_dscu.DLRF_DEFAULT) | default set of flags for DSC load requests | | [`FSF_LOADED_IMAGES_ONLY`](#ida_dscu.FSF_LOADED_IMAGES_ONLY) | Skip export tables of images that have not been loaded yet. | | [`FSF_CASE_INSENSITIVE`](#ida_dscu.FSF_CASE_INSENSITIVE) | Match needle case-insensitively. | | [`FSSF_SCOPE_IMAGES`](#ida_dscu.FSSF_SCOPE_IMAGES) | Limit scanning to images. | | [`FSSF_SCOPE_FILES`](#ida_dscu.FSSF_SCOPE_FILES) | Scan entire files. | | [`FSSF_SCOPE_MASK`](#ida_dscu.FSSF_SCOPE_MASK) | Scope mask. | | [`FSSF_IMAGES_SCOPE_DATA_SECTIONS`](#ida_dscu.FSSF_IMAGES_SCOPE_DATA_SECTIONS) | When FSSF_SCOPE_IMAGES, limit scanning to data sections. | | [`FSSF_IMAGES_SCOPE_ALL`](#ida_dscu.FSSF_IMAGES_SCOPE_ALL) | When FSSF_SCOPE_IMAGES, scan all sections. | | [`FSSF_IMAGES_SCOPE_MASK`](#ida_dscu.FSSF_IMAGES_SCOPE_MASK) | Images scope mask. | | [`FSSF_FILES_INCLUDE_SYMBOLS`](#ida_dscu.FSSF_FILES_INCLUDE_SYMBOLS) | When scanning files, include the .symbols pool. | | [`FSSF_FILES_INCLUDE_BRANCH_MAPPINGS`](#ida_dscu.FSSF_FILES_INCLUDE_BRANCH_MAPPINGS) | When scanning files, include branch mapping files. | | [`FSSF_FILES_INCLUDE_OTHER`](#ida_dscu.FSSF_FILES_INCLUDE_OTHER) | When scanning files, include other adjacent files. | | [`FSSF_CASE_INSENSITIVE`](#ida_dscu.FSSF_CASE_INSENSITIVE) | Match needle case-insensitively. | | [`MDF_ALLOW_CPU_MISMATCH`](#ida_dscu.MDF_ALLOW_CPU_MISMATCH) | Perform match operation despite the CPU architecture of the external file & the DSC not matching. | | [`MDF_ALLOW_PLATFORM_MISMATCH`](#ida_dscu.MDF_ALLOW_PLATFORM_MISMATCH) | Perform match operation despite the platform of the external file & the DSC not matching. | | [`DLF_VALIDATE`](#ida_dscu.DLF_VALIDATE) | Perform validation of persisted layout information. | | [`DLF_VALIDATE_HARD`](#ida_dscu.DLF_VALIDATE_HARD) | Do a lot more validating (time-consuming). | | [`DLF_TOPLEVEL_INPUT_PATH`](#ida_dscu.DLF_TOPLEVEL_INPUT_PATH) | Dump the DSC's (toplevel) input path. | | [`DLF_TOPLEVEL_DETAILS`](#ida_dscu.DLF_TOPLEVEL_DETAILS) | Dump some additional details about the toplevel file. | | [`DLF_TOPLEVEL`](#ida_dscu.DLF_TOPLEVEL) | Alias. | | [`DLF_FILES`](#ida_dscu.DLF_FILES) | Dump information about files composing this DSC. | | [`DLF_MAPPINGS`](#ida_dscu.DLF_MAPPINGS) | Dump information about high-level mappings described in files composing this DSC. | | [`DLF_IMAGES`](#ida_dscu.DLF_IMAGES) | Dump information about images (i.e., libraries) found in this DSC. | | [`DLF_IMAGES_DEPENDENCIES`](#ida_dscu.DLF_IMAGES_DEPENDENCIES) | Dump information about each image's dependencies. | | [`DLF_IMAGES_REGIONS`](#ida_dscu.DLF_IMAGES_REGIONS) | Dump information about each image's known regions. | | [`DLF_ISLANDS`](#ida_dscu.DLF_ISLANDS) | Dump information about branch islands. | | [`DLF_ISLANDS_REGIONS`](#ida_dscu.DLF_ISLANDS_REGIONS) | Dump information about each branch island's known regions. | | [`DLF_GOTS`](#ida_dscu.DLF_GOTS) | Dump information about known GOT's in this DSC. | | [`DLF_UNKNOWN_REGIONS`](#ida_dscu.DLF_UNKNOWN_REGIONS) | Dump information about the unknown (covered but unidentified) regions of this DSC. | | [`DLF_CACHE_DATA`](#ida_dscu.DLF_CACHE_DATA) | Dump information about known cache-wide data regions. | | [`DLF_ALL`](#ida_dscu.DLF_ALL) | | ## Classes | [`symbol_match_vec_t`](#ida_dscu.symbol_match_vec_t) | | |--------------------------------------------------------------------------|----| | [`string_match_vec_t`](#ida_dscu.string_match_vec_t) | | | [`region_info_vec_t`](#ida_dscu.region_info_vec_t) | | | [`mapping_coords_vec_t`](#ida_dscu.mapping_coords_vec_t) | | | [`dependency_match_entry_vec_t`](#ida_dscu.dependency_match_entry_vec_t) | | | [`mapping_coords_t`](#ida_dscu.mapping_coords_t) | | | [`region_info_t`](#ida_dscu.region_info_t) | | | [`address_info_t`](#ida_dscu.address_info_t) | | | [`dscu_load_request_t`](#ida_dscu.dscu_load_request_t) | | | [`symbol_match_t`](#ida_dscu.symbol_match_t) | | | [`string_match_t`](#ida_dscu.string_match_t) | | | [`dependency_match_entry_t`](#ida_dscu.dependency_match_entry_t) | | | [`dependency_match_result_t`](#ida_dscu.dependency_match_result_t) | | | [`dscu_svc_t`](#ida_dscu.dscu_svc_t) | | ## Functions | [`get_dscu_svc`](#ida_dscu.get_dscu_svc)(→ dscu_svc_t \*) | Retrieve the "shared cache services". | |-------------------------------------------------------------|-----------------------------------------| ## Module Contents ### *class* ida_dscu.symbol_match_vec_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### push_back(\*args) → symbol_match_t & #### pop_back() → [None](https://docs.python.org/3/library/constants.html#None) #### size() → [int](https://docs.python.org/3/library/functions.html#int) #### empty() → [bool](https://docs.python.org/3/library/functions.html#bool) #### at(\_idx: [int](https://docs.python.org/3/library/functions.html#int)) → symbol_match_t const & #### qclear() → [None](https://docs.python.org/3/library/constants.html#None) #### clear() → [None](https://docs.python.org/3/library/constants.html#None) #### resize(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### grow(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### capacity() → [int](https://docs.python.org/3/library/functions.html#int) #### reserve(cnt: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### truncate() → [None](https://docs.python.org/3/library/constants.html#None) #### swap(r: [symbol_match_vec_t](#ida_dscu.symbol_match_vec_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extract() → symbol_match_t \* #### inject(s: [symbol_match_t](#ida_dscu.symbol_match_t), len: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### begin(\*args) → qvector< symbol_match_t >::const_iterator #### end(\*args) → qvector< symbol_match_t >::const_iterator #### insert(it: [symbol_match_t](#ida_dscu.symbol_match_t), x: [symbol_match_t](#ida_dscu.symbol_match_t)) → qvector< symbol_match_t >::iterator #### erase(\*args) → qvector< symbol_match_t >::iterator #### find(\*args) → qvector< symbol_match_t >::const_iterator #### has(x: [symbol_match_t](#ida_dscu.symbol_match_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### add_unique(x: [symbol_match_t](#ida_dscu.symbol_match_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### append(x: [symbol_match_t](#ida_dscu.symbol_match_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extend(x: [symbol_match_vec_t](#ida_dscu.symbol_match_vec_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### front #### back ### *class* ida_dscu.string_match_vec_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### push_back(\*args) → string_match_t & #### pop_back() → [None](https://docs.python.org/3/library/constants.html#None) #### size() → [int](https://docs.python.org/3/library/functions.html#int) #### empty() → [bool](https://docs.python.org/3/library/functions.html#bool) #### at(\_idx: [int](https://docs.python.org/3/library/functions.html#int)) → string_match_t const & #### qclear() → [None](https://docs.python.org/3/library/constants.html#None) #### clear() → [None](https://docs.python.org/3/library/constants.html#None) #### resize(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### grow(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### capacity() → [int](https://docs.python.org/3/library/functions.html#int) #### reserve(cnt: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### truncate() → [None](https://docs.python.org/3/library/constants.html#None) #### swap(r: [string_match_vec_t](#ida_dscu.string_match_vec_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extract() → string_match_t \* #### inject(s: [string_match_t](#ida_dscu.string_match_t), len: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### begin(\*args) → qvector< string_match_t >::const_iterator #### end(\*args) → qvector< string_match_t >::const_iterator #### insert(it: [string_match_t](#ida_dscu.string_match_t), x: [string_match_t](#ida_dscu.string_match_t)) → qvector< string_match_t >::iterator #### erase(\*args) → qvector< string_match_t >::iterator #### find(\*args) → qvector< string_match_t >::const_iterator #### has(x: [string_match_t](#ida_dscu.string_match_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### add_unique(x: [string_match_t](#ida_dscu.string_match_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### append(x: [string_match_t](#ida_dscu.string_match_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extend(x: [string_match_vec_t](#ida_dscu.string_match_vec_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### front #### back ### *class* ida_dscu.region_info_vec_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### push_back(\*args) → region_info_t & #### pop_back() → [None](https://docs.python.org/3/library/constants.html#None) #### size() → [int](https://docs.python.org/3/library/functions.html#int) #### empty() → [bool](https://docs.python.org/3/library/functions.html#bool) #### at(\_idx: [int](https://docs.python.org/3/library/functions.html#int)) → region_info_t const & #### qclear() → [None](https://docs.python.org/3/library/constants.html#None) #### clear() → [None](https://docs.python.org/3/library/constants.html#None) #### resize(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### grow(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### capacity() → [int](https://docs.python.org/3/library/functions.html#int) #### reserve(cnt: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### truncate() → [None](https://docs.python.org/3/library/constants.html#None) #### swap(r: [region_info_vec_t](#ida_dscu.region_info_vec_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extract() → region_info_t \* #### inject(s: [region_info_t](#ida_dscu.region_info_t), len: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### begin(\*args) → qvector< region_info_t >::const_iterator #### end(\*args) → qvector< region_info_t >::const_iterator #### insert(it: [region_info_t](#ida_dscu.region_info_t), x: [region_info_t](#ida_dscu.region_info_t)) → qvector< region_info_t >::iterator #### erase(\*args) → qvector< region_info_t >::iterator #### find(\*args) → qvector< region_info_t >::const_iterator #### has(x: [region_info_t](#ida_dscu.region_info_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### add_unique(x: [region_info_t](#ida_dscu.region_info_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### append(x: [region_info_t](#ida_dscu.region_info_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extend(x: [region_info_vec_t](#ida_dscu.region_info_vec_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### front #### back ### *class* ida_dscu.mapping_coords_vec_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### push_back(\*args) → mapping_coords_t & #### pop_back() → [None](https://docs.python.org/3/library/constants.html#None) #### size() → [int](https://docs.python.org/3/library/functions.html#int) #### empty() → [bool](https://docs.python.org/3/library/functions.html#bool) #### at(\_idx: [int](https://docs.python.org/3/library/functions.html#int)) → mapping_coords_t const & #### qclear() → [None](https://docs.python.org/3/library/constants.html#None) #### clear() → [None](https://docs.python.org/3/library/constants.html#None) #### resize(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### grow(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### capacity() → [int](https://docs.python.org/3/library/functions.html#int) #### reserve(cnt: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### truncate() → [None](https://docs.python.org/3/library/constants.html#None) #### swap(r: [mapping_coords_vec_t](#ida_dscu.mapping_coords_vec_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extract() → mapping_coords_t \* #### inject(s: [mapping_coords_t](#ida_dscu.mapping_coords_t), len: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### begin(\*args) → qvector< mapping_coords_t >::const_iterator #### end(\*args) → qvector< mapping_coords_t >::const_iterator #### insert(it: [mapping_coords_t](#ida_dscu.mapping_coords_t), x: [mapping_coords_t](#ida_dscu.mapping_coords_t)) → qvector< mapping_coords_t >::iterator #### erase(\*args) → qvector< mapping_coords_t >::iterator #### find(\*args) → qvector< mapping_coords_t >::const_iterator #### has(x: [mapping_coords_t](#ida_dscu.mapping_coords_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### add_unique(x: [mapping_coords_t](#ida_dscu.mapping_coords_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### append(x: [mapping_coords_t](#ida_dscu.mapping_coords_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extend(x: [mapping_coords_vec_t](#ida_dscu.mapping_coords_vec_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### front #### back ### *class* ida_dscu.dependency_match_entry_vec_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### push_back(\*args) → dependency_match_entry_t & #### pop_back() → [None](https://docs.python.org/3/library/constants.html#None) #### size() → [int](https://docs.python.org/3/library/functions.html#int) #### empty() → [bool](https://docs.python.org/3/library/functions.html#bool) #### at(\_idx: [int](https://docs.python.org/3/library/functions.html#int)) → dependency_match_entry_t const & #### qclear() → [None](https://docs.python.org/3/library/constants.html#None) #### clear() → [None](https://docs.python.org/3/library/constants.html#None) #### resize(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### grow(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### capacity() → [int](https://docs.python.org/3/library/functions.html#int) #### reserve(cnt: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### truncate() → [None](https://docs.python.org/3/library/constants.html#None) #### swap(r: [dependency_match_entry_vec_t](#ida_dscu.dependency_match_entry_vec_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extract() → dependency_match_entry_t \* #### inject(s: [dependency_match_entry_t](#ida_dscu.dependency_match_entry_t), len: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### begin(\*args) → qvector< dependency_match_entry_t >::const_iterator #### end(\*args) → qvector< dependency_match_entry_t >::const_iterator #### insert(it: [dependency_match_entry_t](#ida_dscu.dependency_match_entry_t), x: [dependency_match_entry_t](#ida_dscu.dependency_match_entry_t)) → qvector< dependency_match_entry_t >::iterator #### erase(\*args) → qvector< dependency_match_entry_t >::iterator #### find(\*args) → qvector< dependency_match_entry_t >::const_iterator #### has(x: [dependency_match_entry_t](#ida_dscu.dependency_match_entry_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### add_unique(x: [dependency_match_entry_t](#ida_dscu.dependency_match_entry_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### append(x: [dependency_match_entry_t](#ida_dscu.dependency_match_entry_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extend(x: [dependency_match_entry_vec_t](#ida_dscu.dependency_match_entry_vec_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### front #### back ### ida_dscu.get_dscu_svc() → dscu_svc_t \* Retrieve the “shared cache services”. The returned instance is shared, and must not be deleted. Furthermore, the following situations will cause this function to return a nullptr: \* we are currently not operating on a shared cache \* dscu_bootstrap wasn’t called (by the loader) \* an error occurs * **Returns:** the services instance, or nullptr ### ida_dscu.rt_invalid Invalid. ### ida_dscu.rt_image_entity A subset of an image (segment, section, …). ### ida_dscu.rt_island A branch island. ### ida_dscu.rt_header The dyld header. ### ida_dscu.rt_mapping A subcache branch mapping. ### ida_dscu.rt_unknown A covered cache region whose content we don’t (yet) identify. ### ida_dscu.rt_got A Global Offset Table. ### ida_dscu.rt_cache_data Cache-wide named data (e.g. a linkedit subcache mapping). ### *class* ida_dscu.mapping_coords_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### file_index *: int16* #### mapping_index *: int16* the toplevel/subcache to which mapping_index applies. 0 means toplevel file #### valid() → [bool](https://docs.python.org/3/library/functions.html#bool) #### *static* make_invalid() → [mapping_coords_t](#ida_dscu.mapping_coords_t) ### *class* ida_dscu.region_info_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### start *: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)* #### size *: asize_t* Coordinates in address space. #### type *: region_type_t* Size in bytes. #### image_index *: [int](https://docs.python.org/3/library/functions.html#int)* #### branch_island_number *: [int](https://docs.python.org/3/library/functions.html#int)* for rt_image #### name *: char[40]* #### swap(r: [region_info_t](#ida_dscu.region_info_t)) → [None](https://docs.python.org/3/library/constants.html#None) region name (e.g., \_\_text). Not unique #### get_range() → [range_t](../ida_range/index.md#ida_range.range_t) ### *class* ida_dscu.address_info_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### region *: [region_info_t](#ida_dscu.region_info_t)* Region containing the address (type=rt_invalid if not found). #### mapping *: [mapping_coords_t](#ida_dscu.mapping_coords_t)* Mapping that backs the address. #### file_offset *: uint64* Offset within the on-disk file backing mapping. #### valid() → [bool](https://docs.python.org/3/library/functions.html#bool) ### *class* ida_dscu.dscu_load_request_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### images *: [intvec_t](../ida_pro/index.md#ida_pro.intvec_t)* image indexes #### islands *: [intvec_t](../ida_pro/index.md#ida_pro.intvec_t)* branch island numbers #### mappings *: eavec_t* branch mappings #### gots *: eavec_t* global offset table ranges #### unknown_regions *: eavec_t* unknown-region ranges (covered, but unidentified) #### cache_data *: eavec_t* cache-wide data ranges (e.g. linkedit subcache mappings) #### flags *: [int](https://docs.python.org/3/library/functions.html#int)* #### add_region(ri: [region_info_t](#ida_dscu.region_info_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### add_regions(ris: [region_info_vec_t](#ida_dscu.region_info_vec_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### clear() → [None](https://docs.python.org/3/library/constants.html#None) #### empty() → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_dscu.DLRF_UNDO_ON_FAILURE failure to satisfy any part of the request, will revert everything ### ida_dscu.DLRF_CREATE_UNDO_POINT should the request create a new undo point (or rely on the last created one and undo to that.) ### ida_dscu.DLRF_SILENT don’t emit loader_finished notification ### ida_dscu.DLRF_ASK_CONFIRMATION ask the user’s confirmation before performing the load ### ida_dscu.DLRF_DEFAULT default set of flags for DSC load requests ### *class* ida_dscu.symbol_match_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### symbol *: std::string_view* Matching symbol name; the view is valid for the lifetime of the dscu_svc_t. #### ea *: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)* Address of the symbol. #### image_index *: [int](https://docs.python.org/3/library/functions.html#int)* Owning image index, or -1 if the symbol came from the cache’s local symbol table (.symbols). ### *class* ida_dscu.string_match_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### ea *: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)* Mapped address; BADADDR for non-image hits. #### image_index *: [int](https://docs.python.org/3/library/functions.html#int)* Owning image index, or -1 if the hit came from a non-image blob (.symbols, branch mappings, other adjacent files). #### file_index *: [int](https://docs.python.org/3/library/functions.html#int)* When image_index == -1: the file the hit lives in (see get_file_name()). #### file_offset *: uint64* Offset within that file (when image_index == -1). #### context *: [str](https://docs.python.org/3/library/stdtypes.html#str)* Bytes around the match, for display. ### *class* ida_dscu.dependency_match_entry_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### image_name *: [str](https://docs.python.org/3/library/stdtypes.html#str)* The image name. #### image_index *: [int](https://docs.python.org/3/library/functions.html#int)* The image index in this DSC (-1 if not found). #### load_command_type *: [int](https://docs.python.org/3/library/functions.html#int)* Load command type. One of ACH_LC_\*. ### *class* ida_dscu.dependency_match_result_t Bases: [`dependency_match_entry_vec_t`](#ida_dscu.dependency_match_entry_vec_t) #### thisown ### *class* ida_dscu.dscu_svc_t(\*args, \*\*kwargs) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### get_input_file_path() → [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None) Retrieve the path to the dyld_shared_cache file on disk. * **Returns:** true on success #### get_dyld_slide() → adiff_t Return the cumulative ASLR slide applied to the cache. #### update_dyld_slide(delta: adiff_t) → [None](https://docs.python.org/3/library/constants.html#None) Apply an additional slide delta and reload the cache. * **Parameters:** **delta** – slide increment (added to the current slide) #### get_files_names() → [None](https://docs.python.org/3/library/constants.html#None) #### get_file_name(file_index: [int](https://docs.python.org/3/library/functions.html#int)) → [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None) #### get_file_index(file_name: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [int](https://docs.python.org/3/library/functions.html#int) #### get_file_mappings(file_name: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### get_mapping_range(mapping: [mapping_coords_t](#ida_dscu.mapping_coords_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### locate_address(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [address_info_t](#ida_dscu.address_info_t) #### get_region(ri: [region_info_t](#ida_dscu.region_info_t), region_index: [int](https://docs.python.org/3/library/functions.html#int), full: [bool](https://docs.python.org/3/library/functions.html#bool) = True) → [bool](https://docs.python.org/3/library/functions.html#bool) #### get_region_by_ea(ri: region_info_t, ea: ida_idaapi.ea_t, out_region_index: size_t \* = None, full: bool = True) → [bool](https://docs.python.org/3/library/functions.html#bool) #### get_regions(region_indexes: sizevec_t const \* = None, full: bool = True) → [None](https://docs.python.org/3/library/constants.html#None) #### get_images_count() → [int](https://docs.python.org/3/library/functions.html#int) #### get_images_names() → [None](https://docs.python.org/3/library/constants.html#None) #### get_image_index(image_name: [str](https://docs.python.org/3/library/stdtypes.html#str)) → [int](https://docs.python.org/3/library/functions.html#int) #### get_image_name(image_index: [int](https://docs.python.org/3/library/functions.html#int)) → [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None) #### get_image_filename(image_index: [int](https://docs.python.org/3/library/functions.html#int)) → [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None) #### get_image_mapping(\*args) → [mapping_coords_t](#ida_dscu.mapping_coords_t) #### is_image_loaded(\*args) → [bool](https://docs.python.org/3/library/functions.html#bool) #### get_image_file_name(\*args) → [bool](https://docs.python.org/3/library/functions.html#bool) #### get_image_regions(\*args) → [bool](https://docs.python.org/3/library/functions.html#bool) #### get_image_regions_indexes(\*args) → [bool](https://docs.python.org/3/library/functions.html#bool) #### get_image_dependencies(\*args) → [bool](https://docs.python.org/3/library/functions.html#bool) #### get_image_address(image_index: [int](https://docs.python.org/3/library/functions.html#int)) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) #### get_image_total_size(\*args) → uint64 #### get_image_file_index(\*args) → [int](https://docs.python.org/3/library/functions.html#int) #### get_images_dependencies(images_indexes: intvec_t const &, depth: int = 1) → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_island_loaded(island_index: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### load_image(\*args) → [bool](https://docs.python.org/3/library/functions.html#bool) #### load_island(\*args) → [bool](https://docs.python.org/3/library/functions.html#bool) #### load_branch_mapping(\*args) → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_mapping_loaded(mapping_addr: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### load_got(\*args) → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_got_loaded(got_addr: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### load_unknown_region(\*args) → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_unknown_region_loaded(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### load_cache_data(\*args) → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_cache_data_loaded(cache_data_addr: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### load_regions(regions: [dscu_load_request_t](#ida_dscu.dscu_load_request_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### get_load_regions_requests_count() → [int](https://docs.python.org/3/library/functions.html#int) #### get_region_type(region_index: [int](https://docs.python.org/3/library/functions.html#int)) → region_type_t #### query_symbols(range: [range_t](../ida_range/index.md#ida_range.range_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### query_symbol(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → std::string_view #### query_exported_symbol(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → std::string_view #### find_symbol(\*args) → [bool](https://docs.python.org/3/library/functions.html#bool) #### find_string(\*args) → [bool](https://docs.python.org/3/library/functions.html#bool) #### has_local_symbols() → [bool](https://docs.python.org/3/library/functions.html#bool) #### dmc_ok #### dmc_bad_file #### dmc_cpu_mismatch #### dmc_platform_mismatch #### dmc_failed #### match_dependencies(path: [str](https://docs.python.org/3/library/stdtypes.html#str), flags: [int](https://docs.python.org/3/library/functions.html#int) = 0) → dscu_svc_t::depmatch_code_t #### dump_layout(\*args) → [None](https://docs.python.org/3/library/constants.html#None) ### ida_dscu.FSF_LOADED_IMAGES_ONLY Skip export tables of images that have not been loaded yet. ### ida_dscu.FSF_CASE_INSENSITIVE Match needle case-insensitively. ### ida_dscu.FSSF_SCOPE_IMAGES Limit scanning to images. ### ida_dscu.FSSF_SCOPE_FILES Scan entire files. ### ida_dscu.FSSF_SCOPE_MASK Scope mask. ### ida_dscu.FSSF_IMAGES_SCOPE_DATA_SECTIONS When FSSF_SCOPE_IMAGES, limit scanning to data sections. ### ida_dscu.FSSF_IMAGES_SCOPE_ALL When FSSF_SCOPE_IMAGES, scan all sections. ### ida_dscu.FSSF_IMAGES_SCOPE_MASK Images scope mask. ### ida_dscu.FSSF_FILES_INCLUDE_SYMBOLS When scanning files, include the .symbols pool. ### ida_dscu.FSSF_FILES_INCLUDE_BRANCH_MAPPINGS When scanning files, include branch mapping files. ### ida_dscu.FSSF_FILES_INCLUDE_OTHER When scanning files, include other adjacent files. ### ida_dscu.FSSF_CASE_INSENSITIVE Match needle case-insensitively. ### ida_dscu.MDF_ALLOW_CPU_MISMATCH Perform match operation despite the CPU architecture of the external file & the DSC not matching. ### ida_dscu.MDF_ALLOW_PLATFORM_MISMATCH Perform match operation despite the platform of the external file & the DSC not matching. ### ida_dscu.DLF_VALIDATE Perform validation of persisted layout information. ### ida_dscu.DLF_VALIDATE_HARD Do a lot more validating (time-consuming). ### ida_dscu.DLF_TOPLEVEL_INPUT_PATH Dump the DSC’s (toplevel) input path. ### ida_dscu.DLF_TOPLEVEL_DETAILS Dump some additional details about the toplevel file. ### ida_dscu.DLF_TOPLEVEL Alias. ### ida_dscu.DLF_FILES Dump information about files composing this DSC. ### ida_dscu.DLF_MAPPINGS Dump information about high-level mappings described in files composing this DSC. ### ida_dscu.DLF_IMAGES Dump information about images (i.e., libraries) found in this DSC. ### ida_dscu.DLF_IMAGES_DEPENDENCIES Dump information about each image’s dependencies. ### ida_dscu.DLF_IMAGES_REGIONS Dump information about each image’s known regions. ### ida_dscu.DLF_ISLANDS Dump information about branch islands. ### ida_dscu.DLF_ISLANDS_REGIONS Dump information about each branch island’s known regions. ### ida_dscu.DLF_GOTS Dump information about known GOT’s in this DSC. ### ida_dscu.DLF_UNKNOWN_REGIONS Dump information about the unknown (covered but unidentified) regions of this DSC. ### ida_dscu.DLF_CACHE_DATA Dump information about known cache-wide data regions. ### ida_dscu.DLF_ALL # index.html.md # dump_flowchart summary: dump function flowchart description: : Dumps the current function’s flowchart, using 2 methods:
> * the low-level ida_gdl.qflow_chart_t type > * the somewhat higher-level, and slightly more pythonic > ida_gdl.FlowChart type. level: beginner ## Attributes | [`ea`](#dump_flowchart.ea) | | |------------------------------|----| ## Functions | [`out`](#dump_flowchart.out)(p, msg) | | |-----------------------------------------------------------------------|----| | [`out_succ`](#dump_flowchart.out_succ)(p, start_ea, end_ea) | | | [`out_pred`](#dump_flowchart.out_pred)(p, start_ea, end_ea) | | | [`using_qflow_chart_t`](#dump_flowchart.using_qflow_chart_t)(ea[, p]) | | | [`using_FlowChart`](#dump_flowchart.using_FlowChart)(ea[, p]) | | ## Module Contents ### dump_flowchart.out(p, msg) ### dump_flowchart.out_succ(p, start_ea, end_ea) ### dump_flowchart.out_pred(p, start_ea, end_ea) ### dump_flowchart.using_qflow_chart_t(ea, p=True) ### dump_flowchart.using_FlowChart(ea, p=True) ### dump_flowchart.ea # index.html.md # ida_tryblks Architecture independent exception handling info. Try blocks have the following general properties: \* A try block specifies a possibly fragmented guarded code region. \* Each try block has always at least one catch/except block description \* Each catch block contains its boundaries and a filter. \* Additionally a catch block can hold sp adjustment and the offset to the exception object offset (C++). \* Try blocks can be nested. Nesting is automatically calculated at the retrieval time. \* There may be (nested) multiple try blocks starting at the same address. See examples in tests/input/eh_tests. ## Attributes | [`TBERR_OK`](#ida_tryblks.TBERR_OK) | ok | |-----------------------------------------------------|----------------------------------------------------------------| | [`TBERR_START`](#ida_tryblks.TBERR_START) | bad start address | | [`TBERR_END`](#ida_tryblks.TBERR_END) | bad end address | | [`TBERR_ORDER`](#ida_tryblks.TBERR_ORDER) | bad address order | | [`TBERR_EMPTY`](#ida_tryblks.TBERR_EMPTY) | empty try block | | [`TBERR_KIND`](#ida_tryblks.TBERR_KIND) | illegal try block kind | | [`TBERR_NO_CATCHES`](#ida_tryblks.TBERR_NO_CATCHES) | no catch blocks at all | | [`TBERR_INTERSECT`](#ida_tryblks.TBERR_INTERSECT) | range would intersect inner tryblk | | [`TBEA_TRY`](#ida_tryblks.TBEA_TRY) | is EA within a c++ try block? | | [`TBEA_CATCH`](#ida_tryblks.TBEA_CATCH) | is EA the start of a c++ catch/cleanup block? | | [`TBEA_SEHTRY`](#ida_tryblks.TBEA_SEHTRY) | is EA within a seh try block | | [`TBEA_SEHLPAD`](#ida_tryblks.TBEA_SEHLPAD) | is EA the start of a seh finally/except block? | | [`TBEA_SEHFILT`](#ida_tryblks.TBEA_SEHFILT) | is EA the start of a seh filter? | | [`TBEA_ANY`](#ida_tryblks.TBEA_ANY) | | | [`TBEA_FALLTHRU`](#ida_tryblks.TBEA_FALLTHRU) | is there a fall through into provided ea from an unwind region | ## Classes | [`tryblks_t`](#ida_tryblks.tryblks_t) | | |-----------------------------------------------|----| | [`catchvec_t`](#ida_tryblks.catchvec_t) | | | [`try_handler_t`](#ida_tryblks.try_handler_t) | | | [`seh_t`](#ida_tryblks.seh_t) | | | [`catch_t`](#ida_tryblks.catch_t) | | | [`tryblk_t`](#ida_tryblks.tryblk_t) | | ## Functions | [`get_tryblks`](#ida_tryblks.get_tryblks)(→ int) | ------------------------------------------------------------------------- Retrieve try block information from the specified address range. Try blocks are sorted by starting address and their nest levels calculated. | |------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [`del_tryblks`](#ida_tryblks.del_tryblks)(→ None) | Delete try block information in the specified range. | | [`add_tryblk`](#ida_tryblks.add_tryblk)(→ int) | Add one try block information. | | [`find_syseh`](#ida_tryblks.find_syseh)(→ ida_idaapi.ea_t) | Find the start address of the system eh region including the argument. | | [`is_ea_tryblks`](#ida_tryblks.is_ea_tryblks)(→ bool) | Check if the given address ea is part of tryblks description. | ## Module Contents ### *class* ida_tryblks.tryblks_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### push_back(\*args) → tryblk_t & #### pop_back() → [None](https://docs.python.org/3/library/constants.html#None) #### size() → [int](https://docs.python.org/3/library/functions.html#int) #### empty() → [bool](https://docs.python.org/3/library/functions.html#bool) #### at(\_idx: [int](https://docs.python.org/3/library/functions.html#int)) → tryblk_t const & #### qclear() → [None](https://docs.python.org/3/library/constants.html#None) #### clear() → [None](https://docs.python.org/3/library/constants.html#None) #### resize(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### grow(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### capacity() → [int](https://docs.python.org/3/library/functions.html#int) #### reserve(cnt: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### truncate() → [None](https://docs.python.org/3/library/constants.html#None) #### swap(r: [tryblks_t](#ida_tryblks.tryblks_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extract() → tryblk_t \* #### inject(s: [tryblk_t](#ida_tryblks.tryblk_t), len: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### begin(\*args) → qvector< tryblk_t >::const_iterator #### end(\*args) → qvector< tryblk_t >::const_iterator #### insert(it: [tryblk_t](#ida_tryblks.tryblk_t), x: [tryblk_t](#ida_tryblks.tryblk_t)) → qvector< tryblk_t >::iterator #### erase(\*args) → qvector< tryblk_t >::iterator #### find(\*args) → qvector< tryblk_t >::const_iterator #### has(x: [tryblk_t](#ida_tryblks.tryblk_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### add_unique(x: [tryblk_t](#ida_tryblks.tryblk_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### append(x: [tryblk_t](#ida_tryblks.tryblk_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extend(x: [tryblks_t](#ida_tryblks.tryblks_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### front #### back ### *class* ida_tryblks.catchvec_t(\*args) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### push_back(\*args) → catch_t & #### pop_back() → [None](https://docs.python.org/3/library/constants.html#None) #### size() → [int](https://docs.python.org/3/library/functions.html#int) #### empty() → [bool](https://docs.python.org/3/library/functions.html#bool) #### at(\_idx: [int](https://docs.python.org/3/library/functions.html#int)) → catch_t const & #### qclear() → [None](https://docs.python.org/3/library/constants.html#None) #### clear() → [None](https://docs.python.org/3/library/constants.html#None) #### resize(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### grow(\*args) → [None](https://docs.python.org/3/library/constants.html#None) #### capacity() → [int](https://docs.python.org/3/library/functions.html#int) #### reserve(cnt: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### truncate() → [None](https://docs.python.org/3/library/constants.html#None) #### swap(r: [catchvec_t](#ida_tryblks.catchvec_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extract() → catch_t \* #### inject(s: [catch_t](#ida_tryblks.catch_t), len: [int](https://docs.python.org/3/library/functions.html#int)) → [None](https://docs.python.org/3/library/constants.html#None) #### begin(\*args) → qvector< catch_t >::const_iterator #### end(\*args) → qvector< catch_t >::const_iterator #### insert(it: [catch_t](#ida_tryblks.catch_t), x: [catch_t](#ida_tryblks.catch_t)) → qvector< catch_t >::iterator #### erase(\*args) → qvector< catch_t >::iterator #### find(\*args) → qvector< catch_t >::const_iterator #### has(x: [catch_t](#ida_tryblks.catch_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### add_unique(x: [catch_t](#ida_tryblks.catch_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) #### append(x: [catch_t](#ida_tryblks.catch_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### extend(x: [catchvec_t](#ida_tryblks.catchvec_t)) → [None](https://docs.python.org/3/library/constants.html#None) #### front #### back ### *class* ida_tryblks.try_handler_t Bases: [`ida_range.rangevec_t`](../ida_range/index.md#ida_range.rangevec_t) #### thisown #### disp *: [int](https://docs.python.org/3/library/functions.html#int)* #### fpreg *: [int](https://docs.python.org/3/library/functions.html#int)* #### clear() → [None](https://docs.python.org/3/library/constants.html#None) ### *class* ida_tryblks.seh_t Bases: [`try_handler_t`](#ida_tryblks.try_handler_t) #### thisown #### filter *: [rangevec_t](../ida_range/index.md#ida_range.rangevec_t)* #### seh_code *: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)* #### clear() → [None](https://docs.python.org/3/library/constants.html#None) ### *class* ida_tryblks.catch_t Bases: [`try_handler_t`](#ida_tryblks.try_handler_t) #### thisown #### obj *: [int](https://docs.python.org/3/library/functions.html#int)* #### type_id *: [int](https://docs.python.org/3/library/functions.html#int)* ### *class* ida_tryblks.tryblk_t(\*args) Bases: [`ida_range.rangevec_t`](../ida_range/index.md#ida_range.rangevec_t) #### thisown #### level *: uchar* #### cpp() → catchvec_t & #### seh() → seh_t & #### get_kind() → uchar #### empty() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_seh() → [bool](https://docs.python.org/3/library/functions.html#bool) #### is_cpp() → [bool](https://docs.python.org/3/library/functions.html#bool) #### clear() → [None](https://docs.python.org/3/library/constants.html#None) #### set_seh() → seh_t & #### set_cpp() → catchvec_t & ### ida_tryblks.get_tryblks(tbv: [tryblks_t](#ida_tryblks.tryblks_t), range: [range_t](../ida_range/index.md#ida_range.range_t)) → [int](https://docs.python.org/3/library/functions.html#int) ————————————————————————- Retrieve try block information from the specified address range. Try blocks are sorted by starting address and their nest levels calculated. * **Parameters:** * **tbv** – output buffer; may be nullptr * **range** – address range to change * **Returns:** number of found try blocks ### ida_tryblks.del_tryblks(range: [range_t](../ida_range/index.md#ida_range.range_t)) → [None](https://docs.python.org/3/library/constants.html#None) Delete try block information in the specified range. * **Parameters:** **range** – the range to be cleared ### ida_tryblks.add_tryblk(tb: [tryblk_t](#ida_tryblks.tryblk_t)) → [int](https://docs.python.org/3/library/functions.html#int) Add one try block information. * **Parameters:** **tb** – try block to add. * **Returns:** error code; 0 means good ### ida_tryblks.TBERR_OK ok ### ida_tryblks.TBERR_START bad start address ### ida_tryblks.TBERR_END bad end address ### ida_tryblks.TBERR_ORDER bad address order ### ida_tryblks.TBERR_EMPTY empty try block ### ida_tryblks.TBERR_KIND illegal try block kind ### ida_tryblks.TBERR_NO_CATCHES no catch blocks at all ### ida_tryblks.TBERR_INTERSECT range would intersect inner tryblk ### ida_tryblks.find_syseh(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) Find the start address of the system eh region including the argument. * **Parameters:** **ea** – search address * **Returns:** start address of surrounding tryblk, otherwise BADADDR ### ida_tryblks.TBEA_TRY is EA within a c++ try block? ### ida_tryblks.TBEA_CATCH is EA the start of a c++ catch/cleanup block? ### ida_tryblks.TBEA_SEHTRY is EA within a seh try block ### ida_tryblks.TBEA_SEHLPAD is EA the start of a seh finally/except block? ### ida_tryblks.TBEA_SEHFILT is EA the start of a seh filter? ### ida_tryblks.TBEA_ANY ### ida_tryblks.TBEA_FALLTHRU is there a fall through into provided ea from an unwind region ### ida_tryblks.is_ea_tryblks(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), flags: [int](https://docs.python.org/3/library/functions.html#int)) → [bool](https://docs.python.org/3/library/functions.html#bool) Check if the given address ea is part of tryblks description. * **Parameters:** * **ea** – address to check * **flags** – combination of flags for is_ea_tryblks() # index.html.md # del_struct_members summary: delete structure members that fall within an offset range description: : The goal of this script is to demonstrate some usage of the type API. In this script, we first create a structure with many members, and then remove all those that fall within a range. level: beginner ## Attributes | [`struct_decl`](#del_struct_members.struct_decl) | | |----------------------------------------------------|----| | [`tif`](#del_struct_members.tif) | | ## Functions | [`del_range`](#del_struct_members.del_range)(tif, start_byte_offset, end_byte_offset) | | |-----------------------------------------------------------------------------------------|----| | [`dump`](#del_struct_members.dump)(message, tif) | | ## Module Contents ### del_struct_members.struct_decl *= Multiline-String*
Show Value ```python """ struct pcap_hdr_s { uint32_t magic_number; /* magic number */ uint16_t version_major; /* major version number */ uint16_t version_minor; /* minor version number */ int32_t thiszone; /* GMT to local correction */ uint32_t sigfigs; /* accuracy of timestamps */ uint32_t snaplen; /* max length of captured packets, in octets */ uint32_t network; /* data link type */ };""" ```
### del_struct_members.del_range(tif, start_byte_offset, end_byte_offset) ### del_struct_members.dump(message, tif) ### del_struct_members.tif # index.html.md # find_string summary: using “ida_bytes.find_string” description: : IDAPython’s ida_bytes.find_string can be used to implement a simple replacement for the ‘Search > Sequence of bytes…’ dialog, that lets users search for sequences of bytes that compose string literals in the binary file (either in the default 1-byte-per-char encoding, or as UTF-16.) level: intermediate ## Attributes | [`ACTION_NAME`](#find_string.ACTION_NAME) | | |---------------------------------------------------|----| | [`ACTION_SHORTCUT`](#find_string.ACTION_SHORTCUT) | | ## Classes | [`search_strlit_form_t`](#find_string.search_strlit_form_t) | | |---------------------------------------------------------------|----| | [`search_strlit_ah_t`](#find_string.search_strlit_ah_t) | | ## Module Contents ### *class* find_string.search_strlit_form_t Bases: [`ida_kernwin.Form`](../ida_kernwin/index.md#ida_kernwin.Form) ### *class* find_string.search_strlit_ah_t Bases: [`ida_kernwin.action_handler_t`](../ida_kernwin/index.md#ida_kernwin.action_handler_t) #### activate(ctx) Activate an action. This function implements the core behavior of an action. It is called when the action is triggered, from a menu, from a popup menu, from the toolbar, or programmatically. * **Returns:** non-zero: all IDA windows will be refreshed #### update(ctx) Update an action. This is called when the context of the UI changed, and we need to let the action update some of its properties if needed (label, icon, …) In addition, this lets IDA know whether the action is enabled, and when it should be queried for availability again. Note: This callback is not meant to change anything in the application’s state, except by calling one (or many) of the “update_action_\*()” functions on this very action. ### find_string.ACTION_NAME *= 'find_string:search'* ### find_string.ACTION_SHORTCUT *= 'Ctrl+Shift+S'* # index.html.md # add_frame_member summary: add a new member to an existing function frame description: : The goal of this script is to demonstrate some usage of the type API. In this script, we show a way to add a new frame member (a pointer to
> an uint64) inside a wide enough gap in the frame: * Get the function object surrounding cursor location. * Use this function to retrieve the corresponding frame object. * Find a wide enough gap to create our new member. * If found, we use cal_frame_offset() to get the actual offset in the frame structure. * Use the previous result to add the new member. level: advanced ## Functions | [`add_frame_member`](#add_frame_member.add_frame_member)(func_ea) | | |---------------------------------------------------------------------|----| ## Module Contents ### add_frame_member.add_frame_member(func_ea) # index.html.md # list_struct_member summary: list structure members description: : The goal of this script is to demonstrate some usage of the type API. In this script, we: \* Ask the user for a structure name. It must already be present in the local types. \* Retrieve the structure type info from the local type \* Extract its type details (udt) \* Iterates it members and prints their names. level: beginner ## Functions | [`main`](#list_struct_member.main)() | | |----------------------------------------|----| ## Module Contents ### list_struct_member.main() # index.html.md # custom_cli summary: add a custom command-line interpreter description: : Illustrates how one can add command-line interpreters to IDA
This custom interpreter doesn’t actually run any code; it’s there as a ‘getting started’. It provides an example tab completion support. level: advanced ## Attributes | [`mycli`](#custom_cli.mycli) | | |--------------------------------|----| | [`when`](#custom_cli.when) | | ## Classes | [`mycli_t`](#custom_cli.mycli_t) | cli_t wrapper class. | |------------------------------------|------------------------| ## Functions | [`nw_handler`](#custom_cli.nw_handler)(code[, old]) | | |-------------------------------------------------------|----| ## Module Contents ### *class* custom_cli.mycli_t Bases: [`ida_kernwin.cli_t`](../ida_kernwin/index.md#ida_kernwin.cli_t) cli_t wrapper class. This class allows you to implement your own command line interface handlers. #### flags *= 0* #### sname *= 'pycli'* #### lname *= 'Python CLI'* #### hint *= 'pycli hint'* #### OnExecuteLine(line) The user pressed Enter. The CLI is free to execute the line immediately or ask for more lines. This callback is mandatory. * **Parameters:** **line** – typed line(s) * **Returns:** Boolean: True-executed line, False-ask for more lines #### OnKeydown(line, x, sellen, vkey, shift) A keyboard key has been pressed This is a generic callback and the CLI is free to do whatever it wants. This callback is optional. * **Parameters:** * **line** – current input line * **x** – current x coordinate of the cursor * **sellen** – current selection length (usually 0) * **vkey** – virtual key code. if the key has been handled, it should be returned as zero * **shift** – shift state * **Returns:** None - Nothing was changed * **Returns:** tuple(line, x, sellen, vkey): if either of the input line or the x coordinate or the selection length has been modified. * **Returns:** It is possible to return a tuple with None elements to preserve old values. Example: tuple(new_line, None, None, None) or tuple(new_line) #### completions *= ['bonnie & clyde', 'bonfire of the vanities', 'bongiorno']* #### OnFindCompletions(line, x, max_count) The user pressed Tab. Return a list of completions, bounded to max_count results. This callback is optional. * **Parameters:** * **line** – the current line (string) * **x** – the index where the cursor is (int) * **max_count** – do not return more than this many results * **Returns:** None if no completion could be generated, otherwise a tuple: (completions : Sequence[str], hints : Sequence[str], docs: Sequence[str], > match_start: int, match_end: int) ### custom_cli.nw_handler(code, old=0) ### custom_cli.mycli ### custom_cli.when *= 11* # index.html.md # list_enum_member summary: print enumeration members description: : In this example, we will first ask the user to provide the name of an enumeration, and then iterate on it level: beginner ## Functions | [`iter_enum`](#list_enum_member.iter_enum)(name) | | |----------------------------------------------------|----| | [`main`](#list_enum_member.main)() | | ## Module Contents ### list_enum_member.iter_enum(name) ### list_enum_member.main() # index.html.md # list_func_details summary: list database functions prototypes description: : This script demonstrates how to list a function return type along with its parameters types and name if any. We do this for all the functions found in the database. level: beginner ## Attributes | [`func`](#list_func_details.func) | | |-------------------------------------|----| ## Module Contents ### list_func_details.func # index.html.md # add_menus summary: add custom menus to IDA description: : It is possible to add custom menus to IDA, either at the toplevel (i.e., into the menubar), or as submenus of existing menus.
Notes:
> * the same action can be present in more than 1 menu > * this example does not deal with context menus keywords: actions level: beginner ## Attributes | [`ACTION_NAME_0`](#add_menus.ACTION_NAME_0) | | |-----------------------------------------------|----| | [`ACTION_NAME_1`](#add_menus.ACTION_NAME_1) | | | [`desc`](#add_menus.desc) | | ## Classes | [`greeter_t`](#add_menus.greeter_t) | | |---------------------------------------|----| ## Module Contents ### *class* add_menus.greeter_t(greetings) Bases: [`ida_kernwin.action_handler_t`](../ida_kernwin/index.md#ida_kernwin.action_handler_t) #### greetings #### activate(ctx) Activate an action. This function implements the core behavior of an action. It is called when the action is triggered, from a menu, from a popup menu, from the toolbar, or programmatically. * **Returns:** non-zero: all IDA windows will be refreshed #### update(ctx) Update an action. This is called when the context of the UI changed, and we need to let the action update some of its properties if needed (label, icon, …) In addition, this lets IDA know whether the action is enabled, and when it should be queried for availability again. Note: This callback is not meant to change anything in the application’s state, except by calling one (or many) of the “update_action_\*()” functions on this very action. ### add_menus.ACTION_NAME_0 *= 'my_action_0'* ### add_menus.ACTION_NAME_1 *= 'my_action_1'* ### add_menus.desc # index.html.md # ida_auto Functions that work with the autoanalyzer queue. The autoanalyzer works when IDA is not busy processing the user keystrokes. It has several queues, each queue having its own priority. The analyzer stops when all queues are empty. A queue contains addresses or address ranges. The addresses are kept sorted by their values. The analyzer will process all addresses from the first queue, then switch to the second queue and so on. There are no limitations on the size of the queues. This file also contains functions that deal with the IDA status indicator and the autoanalysis indicator. You may use these functions to change the indicator value. ## Attributes | [`cvar`](#ida_auto.cvar) | | |--------------------------------------|--------------------------------------------------------| | [`AU_NONE`](#ida_auto.AU_NONE) | placeholder, not used | | [`AU_UNK`](#ida_auto.AU_UNK) | 0: convert to unexplored | | [`AU_CODE`](#ida_auto.AU_CODE) | 1: convert to instruction | | [`AU_WEAK`](#ida_auto.AU_WEAK) | 2: convert to instruction (ida decision) | | [`AU_PROC`](#ida_auto.AU_PROC) | 3: convert to procedure start | | [`AU_TAIL`](#ida_auto.AU_TAIL) | 4: add a procedure tail | | [`AU_FCHUNK`](#ida_auto.AU_FCHUNK) | 5: find func chunks | | [`AU_USED`](#ida_auto.AU_USED) | 6: reanalyze | | [`AU_USD2`](#ida_auto.AU_USD2) | 7: reanalyze, second pass | | [`AU_TYPE`](#ida_auto.AU_TYPE) | 8: apply type information | | [`AU_LIBF`](#ida_auto.AU_LIBF) | 9: apply signature to address | | [`AU_LBF2`](#ida_auto.AU_LBF2) | 10: the same, second pass | | [`AU_LBF3`](#ida_auto.AU_LBF3) | 11: the same, third pass | | [`AU_CHLB`](#ida_auto.AU_CHLB) | 12: load signature file (file name is kept separately) | | [`AU_FINAL`](#ida_auto.AU_FINAL) | 13: final pass | | [`st_Ready`](#ida_auto.st_Ready) | READY: IDA is doing nothing. | | [`st_Think`](#ida_auto.st_Think) | THINKING: Autoanalysis on, the user may press keys. | | [`st_Waiting`](#ida_auto.st_Waiting) | WAITING: Waiting for the user input. | | [`st_Work`](#ida_auto.st_Work) | BUSY: IDA is busy. | ## Classes | [`auto_display_t`](#ida_auto.auto_display_t) | | |------------------------------------------------|----| ## Functions | [`get_auto_state`](#ida_auto.get_auto_state)(→ atype_t) | Get current state of autoanalyzer. If auto_state == AU_NONE, IDA is currently not running the analysis (it could be temporarily interrupted to perform the user's requests, for example). | |----------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [`set_auto_state`](#ida_auto.set_auto_state)(→ atype_t) | Set current state of autoanalyzer. | | [`get_auto_display`](#ida_auto.get_auto_display)(→ bool) | Get structure which holds the autoanalysis indicator contents. | | [`show_auto`](#ida_auto.show_auto)(→ None) | Change autoanalysis indicator value. | | [`show_addr`](#ida_auto.show_addr)(→ None) | Show an address on the autoanalysis indicator. The address is displayed in the form " @:12345678". | | [`set_ida_state`](#ida_auto.set_ida_state)(→ idastate_t) | Change IDA status indicator value | | [`may_create_stkvars`](#ida_auto.may_create_stkvars)(→ bool) | Is it allowed to create stack variables automatically? This function should be used by IDP modules before creating stack vars. | | [`may_trace_sp`](#ida_auto.may_trace_sp)(→ bool) | Is it allowed to trace stack pointer automatically? This function should be used by IDP modules before tracing sp. | | [`auto_mark_range`](#ida_auto.auto_mark_range)(→ None) | Put range of addresses into a queue. 'start' may be higher than 'end', the kernel will swap them in this case. 'end' doesn't belong to the range. | | [`auto_mark`](#ida_auto.auto_mark)(→ None) | Put single address into a queue. Queues keep addresses sorted. | | [`auto_unmark`](#ida_auto.auto_unmark)(→ None) | Remove range of addresses from a queue. 'start' may be higher than 'end', the kernel will swap them in this case. 'end' doesn't belong to the range. | | [`plan_ea`](#ida_auto.plan_ea)(→ None) | Plan to perform reanalysis. | | [`plan_range`](#ida_auto.plan_range)(→ None) | Plan to perform reanalysis. | | [`auto_make_code`](#ida_auto.auto_make_code)(→ None) | Plan to make code. | | [`auto_make_proc`](#ida_auto.auto_make_proc)(→ None) | Plan to make code&function. | | [`auto_postpone_analysis`](#ida_auto.auto_postpone_analysis)(→ bool) | Plan to reanalyze on the second pass The typical usage of this function in emu.cpp is: if ( !auto_postpone_analysis(ea) ) op_offset(ea, 0, ...); (we make an offset only on the second pass) | | [`reanalyze_callers`](#ida_auto.reanalyze_callers)(→ None) | Plan to reanalyze callers of the specified address. This function will add to AU_USED queue all instructions that call (not jump to) the specified address. | | [`revert_ida_decisions`](#ida_auto.revert_ida_decisions)(→ None) | Delete all analysis info that IDA generated for the given range. | | [`auto_apply_type`](#ida_auto.auto_apply_type)(→ None) | Plan to apply the callee's type to the calling point. | | [`auto_apply_tail`](#ida_auto.auto_apply_tail)(→ None) | Plan to apply the tail_ea chunk to the parent | | [`plan_and_wait`](#ida_auto.plan_and_wait)(→ int) | Analyze the specified range. Try to create instructions where possible. Make the final pass over the specified range if specified. This function doesn't return until the range is analyzed. | | [`auto_wait`](#ida_auto.auto_wait)(→ bool) | Process everything in the queues and return true. | | [`auto_wait_range`](#ida_auto.auto_wait_range)(→ ssize_t) | Process everything in the specified range and return true. | | [`auto_make_step`](#ida_auto.auto_make_step)(→ bool) | Analyze one address in the specified range and return true. | | [`auto_cancel`](#ida_auto.auto_cancel)(→ None) | Remove an address range (ea1..ea2) from queues AU_CODE, AU_PROC, AU_USED. To remove an address range from other queues use auto_unmark() function. 'ea1' may be higher than 'ea2', the kernel will swap them in this case. 'ea2' doesn't belong to the range. | | [`auto_is_ok`](#ida_auto.auto_is_ok)(→ bool) | Are all queues empty? (i.e. has autoanalysis finished?). | | [`peek_auto_queue`](#ida_auto.peek_auto_queue)(→ ida_idaapi.ea_t) | Peek into a queue 'type' for an address not lower than 'low_ea'. Do not remove address from the queue. | | [`auto_get`](#ida_auto.auto_get)(→ ida_idaapi.ea_t) | Retrieve an address from queues regarding their priority. Returns BADADDR if no addresses not lower than 'lowEA' and less than 'highEA' are found in the queues. Otherwise

```
*
```

type will have queue type. | | [`auto_recreate_insn`](#ida_auto.auto_recreate_insn)(→ int) | Try to create instruction | | [`is_auto_enabled`](#ida_auto.is_auto_enabled)(→ bool) | Get autoanalyzer state. | | [`enable_auto`](#ida_auto.enable_auto)(→ bool) | Temporarily enable/disable autoanalyzer. Not user-facing, but rather because IDA sometimes need to turn AA on/off regardless of inf.s_genflags:INFFL_AUTO | ## Module Contents ### ida_auto.get_auto_state() → atype_t Get current state of autoanalyzer. If auto_state == AU_NONE, IDA is currently not running the analysis (it could be temporarily interrupted to perform the user’s requests, for example). ### ida_auto.set_auto_state(new_state: atype_t) → atype_t Set current state of autoanalyzer. * **Parameters:** **new_state** – new state of autoanalyzer * **Returns:** previous state ### *class* ida_auto.auto_display_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) #### thisown #### type *: atype_t* #### ea *: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)* #### state *: idastate_t* ### ida_auto.cvar ### ida_auto.AU_NONE placeholder, not used ### ida_auto.AU_UNK 0: convert to unexplored ### ida_auto.AU_CODE 1: convert to instruction ### ida_auto.AU_WEAK 2: convert to instruction (ida decision) ### ida_auto.AU_PROC 3: convert to procedure start ### ida_auto.AU_TAIL 4: add a procedure tail ### ida_auto.AU_FCHUNK 5: find func chunks ### ida_auto.AU_USED 6: reanalyze ### ida_auto.AU_USD2 7: reanalyze, second pass ### ida_auto.AU_TYPE 8: apply type information ### ida_auto.AU_LIBF 9: apply signature to address ### ida_auto.AU_LBF2 10: the same, second pass ### ida_auto.AU_LBF3 11: the same, third pass ### ida_auto.AU_CHLB 12: load signature file (file name is kept separately) ### ida_auto.AU_FINAL 13: final pass ### ida_auto.st_Ready READY: IDA is doing nothing. ### ida_auto.st_Think THINKING: Autoanalysis on, the user may press keys. ### ida_auto.st_Waiting WAITING: Waiting for the user input. ### ida_auto.st_Work BUSY: IDA is busy. ### ida_auto.get_auto_display(auto_display: [auto_display_t](#ida_auto.auto_display_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Get structure which holds the autoanalysis indicator contents. ### ida_auto.show_auto(\*args) → [None](https://docs.python.org/3/library/constants.html#None) Change autoanalysis indicator value. * **Parameters:** * **ea** – linear address being analyzed * **type** – autoanalysis type (see Autoanalysis queues) ### ida_auto.show_addr(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) Show an address on the autoanalysis indicator. The address is displayed in the form “ @:12345678”. * **Parameters:** **ea** – - linear address to display ### ida_auto.set_ida_state(st: idastate_t) → idastate_t Change IDA status indicator value * **Parameters:** **st** – - new indicator status * **Returns:** old indicator status ### ida_auto.may_create_stkvars() → [bool](https://docs.python.org/3/library/functions.html#bool) Is it allowed to create stack variables automatically? This function should be used by IDP modules before creating stack vars. ### ida_auto.may_trace_sp() → [bool](https://docs.python.org/3/library/functions.html#bool) Is it allowed to trace stack pointer automatically? This function should be used by IDP modules before tracing sp. ### ida_auto.auto_mark_range(start: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), end: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), type: atype_t) → [None](https://docs.python.org/3/library/constants.html#None) Put range of addresses into a queue. ‘start’ may be higher than ‘end’, the kernel will swap them in this case. ‘end’ doesn’t belong to the range. ### ida_auto.auto_mark(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), type: atype_t) → [None](https://docs.python.org/3/library/constants.html#None) Put single address into a queue. Queues keep addresses sorted. ### ida_auto.auto_unmark(start: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), end: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), type: atype_t) → [None](https://docs.python.org/3/library/constants.html#None) Remove range of addresses from a queue. ‘start’ may be higher than ‘end’, the kernel will swap them in this case. ‘end’ doesn’t belong to the range. ### ida_auto.plan_ea(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) Plan to perform reanalysis. ### ida_auto.plan_range(sEA: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), eEA: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) Plan to perform reanalysis. ### ida_auto.auto_make_code(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) Plan to make code. ### ida_auto.auto_make_proc(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) Plan to make code&function. ### ida_auto.auto_postpone_analysis(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Plan to reanalyze on the second pass The typical usage of this function in emu.cpp is: if ( !auto_postpone_analysis(ea) ) op_offset(ea, 0, …); (we make an offset only on the second pass) ### ida_auto.reanalyze_callers(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), noret: [bool](https://docs.python.org/3/library/functions.html#bool)) → [None](https://docs.python.org/3/library/constants.html#None) Plan to reanalyze callers of the specified address. This function will add to AU_USED queue all instructions that call (not jump to) the specified address. * **Parameters:** * **ea** – linear address of callee * **noret** – !=0: the callee doesn’t return, mark to undefine subsequent instructions in the caller. 0: do nothing. ### ida_auto.revert_ida_decisions(ea1: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), ea2: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) Delete all analysis info that IDA generated for the given range. ### ida_auto.auto_apply_type(caller: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), callee: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) Plan to apply the callee’s type to the calling point. ### ida_auto.auto_apply_tail(tail_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), parent_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) Plan to apply the tail_ea chunk to the parent * **Parameters:** * **tail_ea** – linear address of start of tail * **parent_ea** – linear address within parent. If BADADDR, automatically try to find parent via xrefs. ### ida_auto.plan_and_wait(ea1: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), ea2: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), final_pass: [bool](https://docs.python.org/3/library/functions.html#bool) = True) → [int](https://docs.python.org/3/library/functions.html#int) Analyze the specified range. Try to create instructions where possible. Make the final pass over the specified range if specified. This function doesn’t return until the range is analyzed. * **Returns:** 1: OK * **Returns:** 0: Ctrl-Break was pressed ### ida_auto.auto_wait() → [bool](https://docs.python.org/3/library/functions.html#bool) Process everything in the queues and return true. * **Returns:** false if the user clicked cancel. (the wait box must be displayed by the caller if desired) ### ida_auto.auto_wait_range(ea1: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), ea2: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → ssize_t Process everything in the specified range and return true. * **Returns:** number of autoanalysis steps made. -1 if the user clicked cancel. (the wait box must be displayed by the caller if desired) ### ida_auto.auto_make_step(ea1: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), ea2: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Analyze one address in the specified range and return true. * **Returns:** if processed anything. false means that there is nothing to process in the specified range. ### ida_auto.auto_cancel(ea1: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), ea2: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [None](https://docs.python.org/3/library/constants.html#None) Remove an address range (ea1..ea2) from queues AU_CODE, AU_PROC, AU_USED. To remove an address range from other queues use auto_unmark() function. ‘ea1’ may be higher than ‘ea2’, the kernel will swap them in this case. ‘ea2’ doesn’t belong to the range. ### ida_auto.auto_is_ok() → [bool](https://docs.python.org/3/library/functions.html#bool) Are all queues empty? (i.e. has autoanalysis finished?). ### ida_auto.peek_auto_queue(low_ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), type: atype_t) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) Peek into a queue ‘type’ for an address not lower than ‘low_ea’. Do not remove address from the queue. * **Returns:** the address or BADADDR ### ida_auto.auto_get(type: atype_t \*, lowEA: ida_idaapi.ea_t, highEA: ida_idaapi.ea_t) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) Retrieve an address from queues regarding their priority. Returns BADADDR if no addresses not lower than ‘lowEA’ and less than ‘highEA’ are found in the queues. Otherwise ``` * ``` type will have queue type. ### ida_auto.auto_recreate_insn(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [int](https://docs.python.org/3/library/functions.html#int) Try to create instruction * **Parameters:** **ea** – linear address of callee * **Returns:** the length of the instruction or 0 ### ida_auto.is_auto_enabled() → [bool](https://docs.python.org/3/library/functions.html#bool) Get autoanalyzer state. ### ida_auto.enable_auto(enable: [bool](https://docs.python.org/3/library/functions.html#bool)) → [bool](https://docs.python.org/3/library/functions.html#bool) Temporarily enable/disable autoanalyzer. Not user-facing, but rather because IDA sometimes need to turn AA on/off regardless of inf.s_genflags:INFFL_AUTO * **Returns:** old state # index.html.md # ida_problems Functions that deal with the list of problems. There are several problem lists. An address may be inserted to any list. The kernel simply maintains these lists, no additional processing is done. The problem lists are accessible for the user from the View->Subviews->Problems menu item. Addresses in the lists are kept sorted. In general IDA just maintains these lists without using them during analysis (except PR_ROLLED). ## Attributes | [`cvar`](#ida_problems.cvar) | | |----------------------------------------------|-----------------------------------------------------------------------------------------| | [`PR_NOBASE`](#ida_problems.PR_NOBASE) | Can't find offset base. | | [`PR_NONAME`](#ida_problems.PR_NONAME) | Can't find name. | | [`PR_NOFOP`](#ida_problems.PR_NOFOP) | Can't find forced op (not used anymore). | | [`PR_NOCMT`](#ida_problems.PR_NOCMT) | Can't find comment (not used anymore). | | [`PR_NOXREFS`](#ida_problems.PR_NOXREFS) | Can't find references. | | [`PR_JUMP`](#ida_problems.PR_JUMP) | Jump by table !!!! ignored. | | [`PR_DISASM`](#ida_problems.PR_DISASM) | Can't disasm. | | [`PR_HEAD`](#ida_problems.PR_HEAD) | Already head. | | [`PR_ILLADDR`](#ida_problems.PR_ILLADDR) | Exec flows beyond limits. | | [`PR_MANYLINES`](#ida_problems.PR_MANYLINES) | Too many lines. | | [`PR_BADSTACK`](#ida_problems.PR_BADSTACK) | Failed to trace the value of the stack pointer. | | [`PR_ATTN`](#ida_problems.PR_ATTN) | Attention! Probably erroneous situation. | | [`PR_FINAL`](#ida_problems.PR_FINAL) | Decision to convert to instruction/data is made by IDA. | | [`PR_ROLLED`](#ida_problems.PR_ROLLED) | The decision made by IDA was wrong and rolled back. | | [`PR_COLLISION`](#ida_problems.PR_COLLISION) | FLAIR collision: the function with the given name already exists. | | [`PR_DECIMP`](#ida_problems.PR_DECIMP) | FLAIR match indecision: the patterns matched, but not the function(s) being referenced. | | [`PR_END`](#ida_problems.PR_END) | Number of problem types. | ## Functions | [`get_problem_desc`](#ida_problems.get_problem_desc)(→ Union[str, None]) | Get the human-friendly description of the problem, if one was provided to remember_problem. | |----------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------| | [`remember_problem`](#ida_problems.remember_problem)(→ None) | Insert an address to a list of problems. Display a message saying about the problem (except of PR_ATTN,PR_FINAL) PR_JUMP is temporarily ignored. | | [`get_problem`](#ida_problems.get_problem)(→ ida_idaapi.ea_t) | Get an address from the specified problem list. The address is not removed from the list. | | [`forget_problem`](#ida_problems.forget_problem)(→ bool) | Remove an address from a problem list | | [`get_problem_name`](#ida_problems.get_problem_name)(→ str) | Get problem list description. | | [`is_problem_present`](#ida_problems.is_problem_present)(→ bool) | Check if the specified address is present in the problem list. | | [`was_ida_decision`](#ida_problems.was_ida_decision)(→ bool) | | ## Module Contents ### ida_problems.get_problem_desc(t: problist_id_t, ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None) Get the human-friendly description of the problem, if one was provided to remember_problem. * **Parameters:** * **t** – problem list type. * **ea** – linear address. * **Returns:** the message length or -1 if none ### ida_problems.remember_problem(type: problist_id_t, ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t), msg: [str](https://docs.python.org/3/library/stdtypes.html#str) = None) → [None](https://docs.python.org/3/library/constants.html#None) Insert an address to a list of problems. Display a message saying about the problem (except of PR_ATTN,PR_FINAL) PR_JUMP is temporarily ignored. * **Parameters:** * **type** – problem list type * **ea** – linear address * **msg** – a user-friendly message to be displayed instead of the default more generic one associated with the type of problem. Defaults to nullptr. ### ida_problems.get_problem(type: problist_id_t, lowea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t) Get an address from the specified problem list. The address is not removed from the list. * **Parameters:** * **type** – problem list type * **lowea** – the returned address will be higher or equal than the specified address * **Returns:** linear address or BADADDR ### ida_problems.forget_problem(type: problist_id_t, ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Remove an address from a problem list * **Parameters:** * **type** – problem list type * **ea** – linear address * **Returns:** success ### ida_problems.get_problem_name(type: problist_id_t, longname: [bool](https://docs.python.org/3/library/functions.html#bool) = True) → [str](https://docs.python.org/3/library/stdtypes.html#str) Get problem list description. ### ida_problems.is_problem_present(t: problist_id_t, ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) Check if the specified address is present in the problem list. ### ida_problems.was_ida_decision(ea: [ida_idaapi.ea_t](../ida_idaapi/index.md#ida_idaapi.ea_t)) → [bool](https://docs.python.org/3/library/functions.html#bool) ### ida_problems.cvar ### ida_problems.PR_NOBASE Can’t find offset base. ### ida_problems.PR_NONAME Can’t find name. ### ida_problems.PR_NOFOP Can’t find forced op (not used anymore). ### ida_problems.PR_NOCMT Can’t find comment (not used anymore). ### ida_problems.PR_NOXREFS Can’t find references. ### ida_problems.PR_JUMP Jump by table !!!! ignored. ### ida_problems.PR_DISASM Can’t disasm. ### ida_problems.PR_HEAD Already head. ### ida_problems.PR_ILLADDR Exec flows beyond limits. ### ida_problems.PR_MANYLINES Too many lines. ### ida_problems.PR_BADSTACK Failed to trace the value of the stack pointer. ### ida_problems.PR_ATTN Attention! Probably erroneous situation. ### ida_problems.PR_FINAL Decision to convert to instruction/data is made by IDA. ### ida_problems.PR_ROLLED The decision made by IDA was wrong and rolled back. ### ida_problems.PR_COLLISION FLAIR collision: the function with the given name already exists. ### ida_problems.PR_DECIMP FLAIR match indecision: the patterns matched, but not the function(s) being referenced. ### ida_problems.PR_END Number of problem types. # index.html.md # auto_instantiate_widget_plugin summary: restore custom widgets across sessions description: : This is an example demonstrating how one can create widgets from a plugin, and have them re-created automatically at IDA startup-time or at desktop load-time.
This example should be placed in the ‘plugins’ directory of the IDA installation, for it to work.
There are 2 ways to use this example: 1) reloading an IDB, where the widget was opened
> - open the widget (‘View > Open subview > …’) > - save this IDB, and close IDA > - restart IDA with this IDB > => the widget will be visible 1. reloading a desktop, where the widget was opened - open the widget (‘View > Open subview > …’) - save the desktop (‘Windows > Save desktop…’) under, say, the name ‘with_auto’ - start another IDA instance with some IDB, and load that desktop > => the widget will be visible keywords: desktop level: advanced ## Attributes | [`title`](#auto_instantiate_widget_plugin.title) | | |----------------------------------------------------------------------|----| | [`auto_inst`](#auto_instantiate_widget_plugin.auto_inst) | | | [`auto_inst_hooks`](#auto_instantiate_widget_plugin.auto_inst_hooks) | | ## Classes | [`auto_inst_t`](#auto_instantiate_widget_plugin.auto_inst_t) | The base class for implementing simple custom viewers | |----------------------------------------------------------------------------|---------------------------------------------------------| | [`auto_inst_plugin_t`](#auto_instantiate_widget_plugin.auto_inst_plugin_t) | Base class for all scripted plugins. | ## Functions | [`register_open_action`](#auto_instantiate_widget_plugin.register_open_action)() | Provide the action that will create the widget | |----------------------------------------------------------------------------------------|-----------------------------------------------------| | [`register_autoinst_hooks`](#auto_instantiate_widget_plugin.register_autoinst_hooks)() | Register hooks that will create the widget when IDA | | [`PLUGIN_ENTRY`](#auto_instantiate_widget_plugin.PLUGIN_ENTRY)() | | ## Module Contents ### auto_instantiate_widget_plugin.title *= 'Auto-instantiable at IDA startup'* ### *class* auto_instantiate_widget_plugin.auto_inst_t Bases: [`ida_kernwin.simplecustviewer_t`](../ida_kernwin/index.md#ida_kernwin.simplecustviewer_t) The base class for implementing simple custom viewers #### Create() Creates the custom view. This should be the first method called after instantiation * **Parameters:** **title** – The title of the view * **Returns:** Boolean whether it succeeds or fails. It may fail if a window with the same title is already open. In this case better close existing windows ### auto_instantiate_widget_plugin.auto_inst *= None* ### auto_instantiate_widget_plugin.register_open_action() Provide the action that will create the widget when the user asks for it. ### auto_instantiate_widget_plugin.auto_inst_hooks *= None* ### auto_instantiate_widget_plugin.register_autoinst_hooks() Register hooks that will create the widget when IDA requires it because of the IDB/desktop ### *class* auto_instantiate_widget_plugin.auto_inst_plugin_t Bases: [`ida_idaapi.plugin_t`](../ida_idaapi/index.md#ida_idaapi.plugin_t) Base class for all scripted plugins. #### flags *= 0* #### comment *= 'This plugin creates a widget that will be recreated automatically if needed, either at startup...* #### help *= 'No help, really'* #### wanted_name *= 'autoinst'* #### wanted_hotkey *= ''* #### init() #### run(arg) #### term() ### auto_instantiate_widget_plugin.PLUGIN_ENTRY() # index.html.md # vds19 summary: add a custom microcode instruction optimization rule description: : Installs a custom microcode instruction optimization rule, to transform:
> x | ~x
into
> -1
To see this plugin in action please use be_ornot_be.idb level: advanced ## Classes | [`subinsn_optimizer_t`](#vds19.subinsn_optimizer_t) | | |-------------------------------------------------------|--------------------------------------| | [`sample_optimizer_t`](#vds19.sample_optimizer_t) | | | [`my_plugin_t`](#vds19.my_plugin_t) | Base class for all scripted plugins. | ## Functions | [`PLUGIN_ENTRY`](#vds19.PLUGIN_ENTRY)() | | |-------------------------------------------|----| ## Module Contents ### *class* vds19.subinsn_optimizer_t(\_mba: [mba_t](../ida_hexrays/index.md#ida_hexrays.mba_t) = None, \_blk: [mblock_t](../ida_hexrays/index.md#ida_hexrays.mblock_t) = None, \_topins: [minsn_t](../ida_hexrays/index.md#ida_hexrays.minsn_t) = None) Bases: [`ida_hexrays.minsn_visitor_t`](../ida_hexrays/index.md#ida_hexrays.minsn_visitor_t) #### cnt *= 0* #### visit_minsn() ### *class* vds19.sample_optimizer_t Bases: [`ida_hexrays.optinsn_t`](../ida_hexrays/index.md#ida_hexrays.optinsn_t) #### func(blk, ins, optflags) Optimize an instruction. * **Parameters:** * **blk** – current basic block. maybe nullptr, which means that the instruction must be optimized without context * **ins** – instruction to optimize; it is always a top-level instruction. the callback may not delete the instruction but may convert it into nop (see mblock_t::make_nop). to optimize sub-instructions, visit them using minsn_visitor_t. sub-instructions may not be converted into nop but can be converted to “mov x,x”. for example: add x,0,x => mov x,x this callback may change other instructions in the block, but should do this with care, e.g. to no break the propagation algorithm if called with OPTI_NO_LDXOPT. * **optflags** – combination of optimization flags bits * **Returns:** number of changes made to the instruction. if after this call the instruction’s use/def lists have changed, you must mark the block level lists as dirty (see mark_lists_dirty) ### *class* vds19.my_plugin_t Bases: [`ida_idaapi.plugin_t`](../ida_idaapi/index.md#ida_idaapi.plugin_t) Base class for all scripted plugins. #### flags *= 16* #### wanted_name *= 'optimize x|~x'* #### wanted_hotkey *= ''* #### comment *= ''* #### help *= ''* #### init() #### term() #### run(arg) ### vds19.PLUGIN_ENTRY() # index.html.md # list_union_member summary: list union members description: : The goal of this script is to demonstrate some usage of the type API. In this script, we: \* Ask the user for a union name. It must already be present in the local types. \* Retrieve the union type info from the local type \* Extract its type details (udt) \* Iterates it members and prints their names. level: beginner ## Attributes | [`name`](#list_union_member.name) | | |-------------------------------------|----| | [`tif`](#list_union_member.tif) | | ## Module Contents ### list_union_member.name ### list_union_member.tif # index.html.md # lumina_model ## Attributes | [`dquot_escaped_str`](#lumina_model.dquot_escaped_str) | | |----------------------------------------------------------|----| | [`int_types`](#lumina_model.int_types) | | ## Classes | [`func_md_t`](#lumina_model.func_md_t) | | |------------------------------------------------|----| | [`idb_md_t`](#lumina_model.idb_md_t) | | | [`differ_t`](#lumina_model.differ_t) | | | [`diff2script_t`](#lumina_model.diff2script_t) | | ## Functions | [`escaped_bytestr`](#lumina_model.escaped_bytestr)(bts) | | |-----------------------------------------------------------|----| ## Module Contents ### lumina_model.dquot_escaped_str ### lumina_model.int_types ### lumina_model.escaped_bytestr(bts) ### *class* lumina_model.func_md_t(pfn, retrieve=True) #### pfn_ea #### func_info #### pfn() ### *class* lumina_model.idb_md_t #### functions *= []* ### *class* lumina_model.differ_t(flags=0) #### flags *= 0* #### lines *= []* #### pfn_ea *= None* #### put(line) #### on_function_diff_start(pfn_ea) #### on_score_changed(pfn, was, now) #### on_func_name_changed(pfn, was, now) #### on_func_proto_changed(pfn, was, now) #### on_func_cmt_changed(pfn, was, now, rep) #### on_cmt_changed(ea, was, now, rep) #### on_extra_cmt_changed(ea, was, now, is_prev) #### on_user_stkpnt_changed(ea, was, now) #### on_frame_mem_changed(offset, was, now) #### on_insn_ops_repr_changed(ea, was, now) #### diff_function(left, right) ### *class* lumina_model.diff2script_t(flags=0) Bases: [`differ_t`](#lumina_model.differ_t) #### on_function_diff_start(pfn_ea) #### on_func_name_changed(pfn, was, now) #### on_func_proto_changed(pfn, was, now) #### on_func_cmt_changed(pfn, was, now, rep) #### on_cmt_changed(ea, was, now, rep) #### on_extra_cmt_changed(ea, was, now, is_prev) #### on_user_stkpnt_changed(ea, was, now) #### on_frame_mem_changed(offset, was, now) #### on_insn_ops_repr_changed(ea, was, now) # index.html.md # vds21 summary: dynamically provide a custom call type description: : This plugin can greatly improve decompilation of indirect calls:
> call [eax+4]
For them, the decompiler has to guess the prototype of the called function. This has to be done at a very early phase of decompilation because the function prototype influences the data flow analysis. On the other hand, we do not have global data flow analysis results yet because we haven’t analyzed all calls in the function. It is a chicked-and-egg problem.
The decompiler uses various techniques to guess the called function prototype. While it works very well, it may fail in some cases.
To fix, the user can specify the call prototype manually, using “Edit, Operand types, Set operand type” at the call instruction.
This plugin illustrates another approach to the problem: if you happen to be able to calculate the call prototypes dynamically, this is how to inform the decompiler about them. level: intermediate ## Attributes | [`testing`](#vds21.testing) | | |-------------------------------|----| ## Classes | [`callinfo_provider_t`](#vds21.callinfo_provider_t) | | |-------------------------------------------------------|--------------------------------------| | [`my_plugin_t`](#vds21.my_plugin_t) | Base class for all scripted plugins. | ## Functions | [`PLUGIN_ENTRY`](#vds21.PLUGIN_ENTRY)() | | |-------------------------------------------|----| ## Module Contents ### vds21.testing *= False* ### *class* vds21.callinfo_provider_t(\_flags: [int](https://docs.python.org/3/library/functions.html#int) = 0, \_hkcb_flags: [int](https://docs.python.org/3/library/functions.html#int) = 1) Bases: [`ida_hexrays.Hexrays_Hooks`](../ida_hexrays/index.md#ida_hexrays.Hexrays_Hooks) #### build_callinfo(blk, type) Analyzing a call instruction. * **Parameters:** * **blk** – (mblock_t ``` * ``` ) blk->tail is the call. * **type** – (tinfo_t ``` * ``` ) buffer for the output type. * **Returns:** callinfo: (mcallinfo_t ``` ** ``` ) prepared callinfo. The plugin should either specify the function type, either allocate and return a new mcallinfo_t object. ### *class* vds21.my_plugin_t Bases: [`ida_idaapi.plugin_t`](../ida_idaapi/index.md#ida_idaapi.plugin_t) Base class for all scripted plugins. #### flags *= 16* #### wanted_name *= 'Hex-Rays custom prototype provider (IDAPython)'* #### wanted_hotkey *= ''* #### comment *= 'Sample plugin21 for Hex-Rays decompiler'* #### help *= ''* #### init() #### term() #### run(arg) ### vds21.PLUGIN_ENTRY() # index.html.md # extend_idc summary: add functions to the IDC runtime, from IDAPython description: : You can add IDC functions to IDA, whose “body” consists of IDAPython statements!
We’ll register a ‘pow’ function, available to all IDC code, that when invoked will call back into IDAPython, and execute the provided function body.
After running this script, try switching to the IDC interpreter (using the button on the lower-left corner of IDA) and executing pow(3, 7) level: intermediate # index.html.md # vds17 summary: invoke the structure offset-choosing dialog from decompilation description: : Registers an action opens the “Select offsets” widget (select_udt_by_offset() call).
This effectively repeats the functionality already available through Alt+Y.
Place cursor on the union field and press Shift+T level: advanced ## Classes | [`func_stroff_ah_t`](#vds17.func_stroff_ah_t) | | |-------------------------------------------------|--------------------------------------| | [`my_plugin_t`](#vds17.my_plugin_t) | Base class for all scripted plugins. | ## Functions | [`PLUGIN_ENTRY`](#vds17.PLUGIN_ENTRY)() | | |-------------------------------------------|----| ## Module Contents ### *class* vds17.func_stroff_ah_t Bases: [`ida_kernwin.action_handler_t`](../ida_kernwin/index.md#ida_kernwin.action_handler_t) #### activate(ctx) Activate an action. This function implements the core behavior of an action. It is called when the action is triggered, from a menu, from a popup menu, from the toolbar, or programmatically. * **Returns:** non-zero: all IDA windows will be refreshed #### update(ctx) Update an action. This is called when the context of the UI changed, and we need to let the action update some of its properties if needed (label, icon, …) In addition, this lets IDA know whether the action is enabled, and when it should be queried for availability again. Note: This callback is not meant to change anything in the application’s state, except by calling one (or many) of the “update_action_\*()” functions on this very action. ### *class* vds17.my_plugin_t Bases: [`ida_idaapi.plugin_t`](../ida_idaapi/index.md#ida_idaapi.plugin_t) Base class for all scripted plugins. #### flags *= 16* #### wanted_name *= 'Structure offsets (IDAPython)'* #### wanted_hotkey *= ''* #### comment *= 'Sample plugin17 for Hex-Rays decompiler'* #### help *= ''* #### init() #### term() #### run(arg) ### vds17.PLUGIN_ENTRY() # index.html.md # idautils idautils.py - High level utility functions for IDA ## Attributes | [`GetInputFileMD5`](#idautils.GetInputFileMD5) | | |--------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------| | [`cpu`](#idautils.cpu) | This is a special class instance used to access the registers as if they were attributes of this object. | | [`procregs`](#idautils.procregs) | This object is used to access the processor registers. It is useful when decoding instructions and you want to see which instruction is which. | ## Classes | [`Strings`](#idautils.Strings) | Allows iterating over the string list. The set of strings will not be | |------------------------------------|-------------------------------------------------------------------------| | [`peutils_t`](#idautils.peutils_t) | PE utility class. Retrieves PE information from the database. | ## Functions | [`CodeRefsTo`](#idautils.CodeRefsTo)(ea, flow) | Get a list of code references to 'ea' | |--------------------------------------------------------------------------|-------------------------------------------------------------------------------------| | [`CodeRefsFrom`](#idautils.CodeRefsFrom)(ea, flow) | Get a list of code references from 'ea' | | [`DataRefsTo`](#idautils.DataRefsTo)(ea) | Get a list of data references to 'ea' | | [`DataRefsFrom`](#idautils.DataRefsFrom)(ea) | Get a list of data references from 'ea' | | [`XrefTypeName`](#idautils.XrefTypeName)(typecode) | Convert cross-reference type codes to readable names | | [`XrefsFrom`](#idautils.XrefsFrom)(ea[, flags]) | Return all references from address 'ea' | | [`XrefsTo`](#idautils.XrefsTo)(ea[, flags]) | Return all references to address 'ea' | | [`Threads`](#idautils.Threads)() | Returns all thread IDs for the current debugee | | [`Heads`](#idautils.Heads)([start, end]) | Get a list of heads (instructions or data items) | | [`Functions`](#idautils.Functions)([start, end]) | Get a list of functions | | [`Chunks`](#idautils.Chunks)(start) | Get a list of function chunks | | [`Modules`](#idautils.Modules)() | Returns a list of module objects with name,size,base and the rebase_to attributes | | [`Names`](#idautils.Names)() | Returns a list of names | | [`Segments`](#idautils.Segments)() | Get list of segments (sections) in the binary image | | [`Entries`](#idautils.Entries)() | Returns a list of entry points (exports) | | [`FuncItems`](#idautils.FuncItems)(start) | Get a list of function items (instruction or data items inside function boundaries) | | [`Structs`](#idautils.Structs)() | Get a list of structures | | [`StructMembers`](#idautils.StructMembers)(sid) | Get a list of structure members information (or stack vars if given a frame). | | [`DecodePrecedingInstruction`](#idautils.DecodePrecedingInstruction)(ea) | Decode preceding instruction in the execution flow. | | [`DecodePreviousInstruction`](#idautils.DecodePreviousInstruction)(ea) | Decodes the previous instruction and returns an insn_t like class | | [`DecodeInstruction`](#idautils.DecodeInstruction)(ea) | Decodes an instruction and returns an insn_t like class | | [`GetDataList`](#idautils.GetDataList)(ea, count[, itemsize]) | Get data list - INTERNAL USE ONLY | | [`PutDataList`](#idautils.PutDataList)(ea, datalist[, itemsize]) | Put data list - INTERNAL USE ONLY | | [`MapDataList`](#idautils.MapDataList)(ea, length, func[, wordsize]) | Map through a list of data words in the database | | [`GetIdbDir`](#idautils.GetIdbDir)() | Get IDB directory | | [`GetRegisterList`](#idautils.GetRegisterList)() | Returns the register list | | [`GetInstructionList`](#idautils.GetInstructionList)() | Returns the instruction list of the current processor module | | [`Assemble`](#idautils.Assemble)(ea, line) | Assembles one or more lines (does not display an message dialogs) | | [`ProcessUiActions`](#idautils.ProcessUiActions)(actions[, flags]) | | ## Module Contents ### idautils.CodeRefsTo(ea, flow: [bool](https://docs.python.org/3/library/functions.html#bool)) Get a list of code references to ‘ea’ * **Parameters:** * **ea** – Target address * **flow** – Follow normal code flow or not * **Returns:** list of references (may be empty list) Example: ```default for ref in CodeRefsTo(get_screen_ea(), 1): print(ref) ``` ### idautils.CodeRefsFrom(ea, flow: [bool](https://docs.python.org/3/library/functions.html#bool)) Get a list of code references from ‘ea’ * **Parameters:** * **ea** – Target address * **flow** – Follow normal code flow or not * **Returns:** list of references (may be empty list) Example: ```default for ref in CodeRefsFrom(get_screen_ea(), 1): print(ref) ``` ### idautils.DataRefsTo(ea) Get a list of data references to ‘ea’ * **Parameters:** **ea** – Target address * **Returns:** list of references (may be empty list) Example: ```default for ref in DataRefsTo(get_screen_ea()): print(ref) ``` ### idautils.DataRefsFrom(ea) Get a list of data references from ‘ea’ * **Parameters:** **ea** – Target address * **Returns:** list of references (may be empty list) Example: ```default for ref in DataRefsFrom(get_screen_ea()): print(ref) ``` ### idautils.XrefTypeName(typecode) Convert cross-reference type codes to readable names * **Parameters:** **typecode** – cross-reference type code ### idautils.XrefsFrom(ea, flags=0) Return all references from address ‘ea’ * **Parameters:** * **ea** – Reference address * **flags** – one of ida_xref.XREF_ALL (default), ida_xref.XREF_FAR, ida_xref.XREF_DATA Example:: : for xref in XrefsFrom(here(), 0): : print(xref.type, XrefTypeName(xref.type), ‘from’, hex(xref.frm), ‘to’, hex(xref.to)) ### idautils.XrefsTo(ea, flags=0) Return all references to address ‘ea’ * **Parameters:** * **ea** – Reference address * **flags** – one of ida_xref.XREF_ALL (default), ida_xref.XREF_FAR, ida_xref.XREF_DATA Example:: : for xref in XrefsTo(here(), 0): : print(xref.type, XrefTypeName(xref.type), ‘from’, hex(xref.frm), ‘to’, hex(xref.to)) ### idautils.Threads() Returns all thread IDs for the current debugee ### idautils.Heads(start=None, end=None) Get a list of heads (instructions or data items) * **Parameters:** * **start** – start address (default: inf.min_ea) * **end** – end address (default: inf.max_ea) * **Returns:** list of heads between start and end ### idautils.Functions(start=None, end=None) Get a list of functions * **Parameters:** * **start** – start address (default: inf.min_ea) * **end** – end address (default: inf.max_ea) * **Returns:** list of function entrypoints between start and end NOTE: The last function that starts before ‘end’ is included even if it extends beyond ‘end’. Any function that has its chunks scattered in multiple segments will be reported multiple times, once in each segment as they are listed. ### idautils.Chunks(start) Get a list of function chunks See also ida_funcs.func_tail_iterator_t * **Parameters:** **start** – address of the function * **Returns:** list of function chunks (tuples of the form (start_ea, end_ea)) belonging to the function ### idautils.Modules() Returns a list of module objects with name,size,base and the rebase_to attributes ### idautils.Names() Returns a list of names * **Returns:** List of tuples (ea, name) ### idautils.Segments() Get list of segments (sections) in the binary image * **Returns:** List of segment start addresses. ### idautils.Entries() Returns a list of entry points (exports) * **Returns:** List of tuples (index, ordinal, ea, name) ### idautils.FuncItems(start) Get a list of function items (instruction or data items inside function boundaries) See also ida_funcs.func_item_iterator_t * **Parameters:** **start** – address of the function * **Returns:** ea of each item in the function ### idautils.Structs() Get a list of structures * **Returns:** List of tuples (ordinal, sid, name) ### idautils.StructMembers(sid) Get a list of structure members information (or stack vars if given a frame). * **Parameters:** **sid** – ID of the structure. * **Returns:** List of tuples (offset_in_bytes, name, size_in_bytes) NOTE: If ‘sid’ does not refer to a valid structure, an exception will be raised. NOTE: This will not return ‘holes’ in structures/stack frames; it only returns defined structure members. ### idautils.DecodePrecedingInstruction(ea) Decode preceding instruction in the execution flow. * **Parameters:** **ea** – address to decode * **Returns:** (None or the decode instruction, farref) farref will contain ‘true’ if followed an xref, false otherwise ### idautils.DecodePreviousInstruction(ea) Decodes the previous instruction and returns an insn_t like class * **Parameters:** **ea** – address to decode * **Returns:** None or a new insn_t instance ### idautils.DecodeInstruction(ea) Decodes an instruction and returns an insn_t like class * **Parameters:** **ea** – address to decode * **Returns:** None or a new insn_t instance ### idautils.GetDataList(ea, count, itemsize=1) Get data list - INTERNAL USE ONLY ### idautils.PutDataList(ea, datalist, itemsize=1) Put data list - INTERNAL USE ONLY ### idautils.MapDataList(ea, length, func, wordsize=1) Map through a list of data words in the database * **Parameters:** * **ea** – start address * **length** – number of words to map * **func** – mapping function * **wordsize** – size of words to map [default: 1 byte] * **Returns:** None ### idautils.GetInputFileMD5 ### *class* idautils.Strings(default_setup=False) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) Allows iterating over the string list. The set of strings will not be modified, unless asked explicitly at setup()-time. This string list also is used by the “String window” so it may be changed when this window is updated. Example: : s = Strings()
for i in s: : print(“%x: len=%d type=%d -> ‘%s’” % (i.ea, i.length, i.strtype, str(i))) #### *class* StringItem(si) Bases: [`object`](https://docs.python.org/3/library/functions.html#object) Class representing each string item. #### ea String ea #### strtype string type (STRTYPE_xxxxx) #### length string length #### decompiler_string decompiler-generated string #### is_decompiler_string() #### is_1_byte_encoding() #### clear_cache() Clears the string list cache #### size *= 0* #### refresh() Refreshes the string list #### setup(strtypes=[ida_nalt.STRTYPE_C], minlen=5, only_7bit=True, ignore_instructions=False, display_only_existing_strings=False) ### idautils.GetIdbDir() Get IDB directory This function returns directory path of the current IDB database ### idautils.GetRegisterList() Returns the register list ### idautils.GetInstructionList() Returns the instruction list of the current processor module ### idautils.Assemble(ea, line) Assembles one or more lines (does not display an message dialogs) If line is a list then this function will attempt to assemble all the lines This function will turn on batch mode temporarily so that no messages are displayed on the screen * **Parameters:** **ea** – start address * **Returns:** (False, “Error message”) or (True, asm_buf) or (True, [asm_buf1, asm_buf2, asm_buf3]) ### idautils.ProcessUiActions(actions, flags=0) * **Parameters:** * **actions** – A string containing a list of actions separated by semicolon, a list or a tuple * **flags** – flags to be passed to process_ui_action() * **Returns:** Boolean. Returns False if the action list was empty or execute_ui_requests() failed. ### *class* idautils.peutils_t Bases: [`object`](https://docs.python.org/3/library/functions.html#object) PE utility class. Retrieves PE information from the database. Constants from pe.h #### PE_NODE *= '$ PE header'* #### PE_ALT_DBG_FPOS #### PE_ALT_IMAGEBASE #### PE_ALT_PEHDR_OFF #### PE_ALT_NEFLAGS #### PE_ALT_TDS_LOADED #### PE_ALT_PSXDLL #### imagebase Loading address (usually pe.imagebase) #### header_offset Offset of PE header #### header Returns the complete PE header as an instance of peheader_t (defined in the SDK). ### idautils.cpu This is a special class instance used to access the registers as if they were attributes of this object. For example to access the EAX register: > print(“%x” % cpu.Eax) ### idautils.procregs This object is used to access the processor registers. It is useful when decoding instructions and you want to see which instruction is which. For example: > x = idautils.DecodeInstruction(here()) > if x[0] == procregs.Esp: > > print(“This operand is the register ESP) # index.html.md # open_ida_link summary: navigate to entities using ida:// links description: : Demonstrates `ida_kernwin.open_ida_link()` which provides URL-style navigation within the current IDB. The function accepts URIs of the form `ida:///resource?params` and navigates to the matching entity, optionally opening a specific view.
Nine resource types are supported: functions, addresses, strings, segments, names, imports, exports, types, and bookmarks.
Most resources use `rva=` or `ea=` to specify the target address. The `types` resource uses `name=` instead. An optional `view=` parameter selects which view to open (e.g., `view=pseudocode`). keywords: navigation, links level: intermediate ## Attributes | [`image_base`](#open_ida_link.image_base) | | |---------------------------------------------|----| | [`func`](#open_ida_link.func) | | | [`rva`](#id4) | | | [`entry_ea`](#open_ida_link.entry_ea) | | | [`si`](#open_ida_link.si) | | | [`rva`](#id4) | | | [`seg`](#open_ida_link.seg) | | | [`rva`](#id4) | | | [`name_ea`](#open_ida_link.name_ea) | | | [`rva`](#id4) | | | [`import_ea`](#open_ida_link.import_ea) | | | [`rva`](#id4) | | | [`ordinal`](#open_ida_link.ordinal) | | | [`rva`](#id4) | | ## Functions | [`try_open_ida_link`](#open_ida_link.try_open_ida_link)(uri) | Call open_ida_link and print the URI and result. | |----------------------------------------------------------------|----------------------------------------------------| ## Module Contents ### open_ida_link.try_open_ida_link(uri) Call open_ida_link and print the URI and result. ### open_ida_link.image_base ### open_ida_link.func ### open_ida_link.rva ### open_ida_link.entry_ea ### open_ida_link.si ### open_ida_link.rva ### open_ida_link.seg ### open_ida_link.rva ### open_ida_link.name_ea ### open_ida_link.rva ### open_ida_link.import_ea ### open_ida_link.rva ### open_ida_link.ordinal ### open_ida_link.rva # index.html.md # vds10 summary: add custom microcode instruction optimization rule description: : Installs a custom microcode instruction optimization rule, to transform:
> call !DbgRaiseAssertionFailure .0
into
> call !DbgRaiseAssertionFailure > ``` > * > ```
> ” “assertion text”>.0
To see this plugin in action please use arm64_brk.i64 level: intermediate ## Classes | [`nt_assert_optimizer_t`](#vds10.nt_assert_optimizer_t) | | |-----------------------------------------------------------|--------------------------------------| | [`my_plugin_t`](#vds10.my_plugin_t) | Base class for all scripted plugins. | ## Functions | [`PLUGIN_ENTRY`](#vds10.PLUGIN_ENTRY)() | | |-------------------------------------------|----| ## Module Contents ### *class* vds10.nt_assert_optimizer_t Bases: [`ida_hexrays.optinsn_t`](../ida_hexrays/index.md#ida_hexrays.optinsn_t) #### func(blk, ins, optflags) Optimize an instruction. * **Parameters:** * **blk** – current basic block. maybe nullptr, which means that the instruction must be optimized without context * **ins** – instruction to optimize; it is always a top-level instruction. the callback may not delete the instruction but may convert it into nop (see mblock_t::make_nop). to optimize sub-instructions, visit them using minsn_visitor_t. sub-instructions may not be converted into nop but can be converted to “mov x,x”. for example: add x,0,x => mov x,x this callback may change other instructions in the block, but should do this with care, e.g. to no break the propagation algorithm if called with OPTI_NO_LDXOPT. * **optflags** – combination of optimization flags bits * **Returns:** number of changes made to the instruction. if after this call the instruction’s use/def lists have changed, you must mark the block level lists as dirty (see mark_lists_dirty) #### handle_nt_assert(ins) ### *class* vds10.my_plugin_t Bases: [`ida_idaapi.plugin_t`](../ida_idaapi/index.md#ida_idaapi.plugin_t) Base class for all scripted plugins. #### flags *= 16* #### wanted_name *= 'Optimize DbgRaiseAssertionFailure (IDAPython)'* #### wanted_hotkey *= ''* #### comment *= 'Sample plugin10 for Hex-Rays decompiler'* #### help *= ''* #### init() #### term() #### run(arg) ### vds10.PLUGIN_ENTRY() # index.html.md # ida_kernwin Defines the interface between the kernel and the UI. It contains: \* the UI dispatcher notification codes (ui_notification_t) \* convenience functions for UI services \* structures which hold information about the lines (disassembly, structures, enums) generated by the kernel \* functions to interact with the user (dialog boxes) \* some string and conversion functions. ## Attributes | [`MAX_SPACES_ADDED`](#ida_kernwin.MAX_SPACES_ADDED) | | |-----------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [`mbox_internal`](#ida_kernwin.mbox_internal) | internal error | | [`mbox_info`](#ida_kernwin.mbox_info) | | | [`mbox_warning`](#ida_kernwin.mbox_warning) | | | [`mbox_error`](#ida_kernwin.mbox_error) | | | [`mbox_nomem`](#ida_kernwin.mbox_nomem) | | | [`mbox_feedback`](#ida_kernwin.mbox_feedback) | | | [`mbox_readerror`](#ida_kernwin.mbox_readerror) | | | [`mbox_writeerror`](#ida_kernwin.mbox_writeerror) | | | [`mbox_filestruct`](#ida_kernwin.mbox_filestruct) | | | [`mbox_wait`](#ida_kernwin.mbox_wait) | | | [`mbox_hide`](#ida_kernwin.mbox_hide) | | | [`mbox_replace`](#ida_kernwin.mbox_replace) | | | [`chtype_generic`](#ida_kernwin.chtype_generic) | the generic choose() function | | [`chtype_idasgn`](#ida_kernwin.chtype_idasgn) | see choose_idasgn() | | [`chtype_entry`](#ida_kernwin.chtype_entry) | see choose_entry() | | [`chtype_name`](#ida_kernwin.chtype_name) | see choose_name() | | [`chtype_stkvar_xref`](#ida_kernwin.chtype_stkvar_xref) | see choose_stkvar_xref(), | | [`chtype_xref`](#ida_kernwin.chtype_xref) | see choose_xref() | | [`chtype_func`](#ida_kernwin.chtype_func) | see choose_func(), | | [`chtype_segm`](#ida_kernwin.chtype_segm) | see choose_segm(), | | [`chtype_strpath`](#ida_kernwin.chtype_strpath) | see choose_struc_path() | | [`chtype_idatil`](#ida_kernwin.chtype_idatil) | see choose_til() | | [`chtype_srcp`](#ida_kernwin.chtype_srcp) | see choose_srcp() | | [`chtype_struct`](#ida_kernwin.chtype_struct) | see choose_struct() | | [`chtype_enum`](#ida_kernwin.chtype_enum) | see choose_enum() | | [`chtype_enum_by_value_and_size`](#ida_kernwin.chtype_enum_by_value_and_size) | see choose_enum_by_value() | | [`chtype_segment`](#ida_kernwin.chtype_segment) | see choose_segment() | | [`chtype_stkvar_xref_ea`](#ida_kernwin.chtype_stkvar_xref_ea) | see choose_stkvar_xref_ea() | | [`chtype_func_ea`](#ida_kernwin.chtype_func_ea) | see choose_func_ea() | | [`beep_default`](#ida_kernwin.beep_default) | | | [`TCCRT_INVALID`](#ida_kernwin.TCCRT_INVALID) | invalid | | [`TCCRT_FLAT`](#ida_kernwin.TCCRT_FLAT) | flat view | | [`TCCRT_GRAPH`](#ida_kernwin.TCCRT_GRAPH) | graph view | | [`TCCRT_PROXIMITY`](#ida_kernwin.TCCRT_PROXIMITY) | proximity view | | [`TCCPT_INVALID`](#ida_kernwin.TCCPT_INVALID) | invalid | | [`TCCPT_PLACE`](#ida_kernwin.TCCPT_PLACE) | place_t | | [`TCCPT_SIMPLELINE_PLACE`](#ida_kernwin.TCCPT_SIMPLELINE_PLACE) | simpleline_place_t | | [`TCCPT_IDAPLACE`](#ida_kernwin.TCCPT_IDAPLACE) | idaplace_t | | [`TCCPT_TIPLACE`](#ida_kernwin.TCCPT_TIPLACE) | tiplace_t | | [`VME_UNKNOWN`](#ida_kernwin.VME_UNKNOWN) | unknown mouse button | | [`VME_LEFT_BUTTON`](#ida_kernwin.VME_LEFT_BUTTON) | left mouse button | | [`VME_RIGHT_BUTTON`](#ida_kernwin.VME_RIGHT_BUTTON) | right mouse button | | [`VME_MID_BUTTON`](#ida_kernwin.VME_MID_BUTTON) | middle mouse button | | [`SETMENU_POSMASK`](#ida_kernwin.SETMENU_POSMASK) | | | [`SETMENU_INS`](#ida_kernwin.SETMENU_INS) | add menu item before the specified path (default) | | [`SETMENU_APP`](#ida_kernwin.SETMENU_APP) | add menu item after the specified path | | [`SETMENU_FIRST`](#ida_kernwin.SETMENU_FIRST) | add item to the beginning of menu | | [`SETMENU_ENSURE_SEP`](#ida_kernwin.SETMENU_ENSURE_SEP) | make sure there is a separator before the action | | [`CREATETB_ADV`](#ida_kernwin.CREATETB_ADV) | toolbar is for 'advanced mode' only | | [`HIF_IDENTIFIER`](#ida_kernwin.HIF_IDENTIFIER) | text is an identifier (i.e., when searching for the current highlight, SEARCH_IDENT will be used) | | [`HIF_REGISTER`](#ida_kernwin.HIF_REGISTER) | text represents a register (aliases/subregisters will be highlighted as well) | | [`HIF_LOCKED`](#ida_kernwin.HIF_LOCKED) | locked; clicking/moving the cursor around doesn't change the highlight | | [`HIF_NOCASE`](#ida_kernwin.HIF_NOCASE) | case insensitive | | [`HIF_USE_SLOT`](#ida_kernwin.HIF_USE_SLOT) | use the given number, or just use the "floating" highlight | | [`HIF_SLOT_SHIFT`](#ida_kernwin.HIF_SLOT_SHIFT) | position of the 3 top bits specifying which highlight to use | | [`HIF_SLOT_0`](#ida_kernwin.HIF_SLOT_0) | operate on slot 0 | | [`HIF_SLOT_1`](#ida_kernwin.HIF_SLOT_1) | operate on slot 1 | | [`HIF_SLOT_2`](#ida_kernwin.HIF_SLOT_2) | operate on slot 2 | | [`HIF_SLOT_3`](#ida_kernwin.HIF_SLOT_3) | operate on slot 3 | | [`HIF_SLOT_4`](#ida_kernwin.HIF_SLOT_4) | operate on slot 4 | | [`HIF_SLOT_5`](#ida_kernwin.HIF_SLOT_5) | operate on slot 5 | | [`HIF_SLOT_6`](#ida_kernwin.HIF_SLOT_6) | operate on slot 6 | | [`HIF_SLOT_7`](#ida_kernwin.HIF_SLOT_7) | operate on slot 7 | | [`REG_HINTS_MARKER`](#ida_kernwin.REG_HINTS_MARKER) | | | [`REG_HINTS_MARKER_LEN`](#ida_kernwin.REG_HINTS_MARKER_LEN) | | | [`SRCDBG_HINTS_MARKER`](#ida_kernwin.SRCDBG_HINTS_MARKER) | | | [`SRCDBG_HINTS_MARKER_LEN`](#ida_kernwin.SRCDBG_HINTS_MARKER_LEN) | | | [`CDVF_NOLINES`](#ida_kernwin.CDVF_NOLINES) | don't show line numbers | | [`CDVF_LINEICONS`](#ida_kernwin.CDVF_LINEICONS) | icons can be drawn over the line control | | [`CDVF_STATUSBAR`](#ida_kernwin.CDVF_STATUSBAR) | keep the status bar in the custom viewer | | [`IDCHK_OK`](#ida_kernwin.IDCHK_OK) | ok | | [`IDCHK_ARG`](#ida_kernwin.IDCHK_ARG) | bad argument(s) | | [`IDCHK_KEY`](#ida_kernwin.IDCHK_KEY) | bad hotkey name | | [`IDCHK_MAX`](#ida_kernwin.IDCHK_MAX) | too many IDC hotkeys | | [`WCLS_SAVE`](#ida_kernwin.WCLS_SAVE) | save state in desktop config | | [`WCLS_NO_CONTEXT`](#ida_kernwin.WCLS_NO_CONTEXT) | don't change the current context (useful for toolbars) | | [`WCLS_DONT_SAVE_SIZE`](#ida_kernwin.WCLS_DONT_SAVE_SIZE) | don't save size of the window | | [`WCLS_DELETE_LATER`](#ida_kernwin.WCLS_DELETE_LATER) | assign the deletion of the widget to the UI loop ///< | | [`WCLS_CLOSE_LATER`](#ida_kernwin.WCLS_CLOSE_LATER) | | | [`DP_LEFT`](#ida_kernwin.DP_LEFT) | Dock src_form to the left of dest_form. | | [`DP_TOP`](#ida_kernwin.DP_TOP) | Dock src_form above dest_form. | | [`DP_RIGHT`](#ida_kernwin.DP_RIGHT) | Dock src_form to the right of dest_form. | | [`DP_BOTTOM`](#ida_kernwin.DP_BOTTOM) | Dock src_form below dest_form. | | [`DP_INSIDE`](#ida_kernwin.DP_INSIDE) | Create a new tab bar with both src_form and dest_form. | | [`DP_TAB`](#ida_kernwin.DP_TAB) | Place src_form into a tab next to dest_form, if dest_form is in a tab bar (otherwise the same as DP_INSIDE) | | [`DP_BEFORE`](#ida_kernwin.DP_BEFORE) | Place src_form before dst_form in the tab bar instead of after; used with DP_INSIDE or DP_TAB. | | [`DP_FLOATING`](#ida_kernwin.DP_FLOATING) | Make src_form floating. | | [`DP_SZHINT`](#ida_kernwin.DP_SZHINT) | When floating or in a splitter (i.e., not tabbed), use the widget's size hint to determine the best geometry (Qt only) | | [`SVF_COPY_LINES`](#ida_kernwin.SVF_COPY_LINES) | keep a local copy of '

```
*
```

lines' | | [`SVF_LINES_BYPTR`](#ida_kernwin.SVF_LINES_BYPTR) | remember the 'lines' ptr. do not make a copy of '

```
*
```

lines' | | [`CVNF_LAZY`](#ida_kernwin.CVNF_LAZY) | try and move the cursor to a line displaying the place_t if possible. This might disregard the Y position in case of success | | [`CVNF_JUMP`](#ida_kernwin.CVNF_JUMP) | push the current position in this viewer's lochist_t before going to the new location | | [`CVNF_ACT`](#ida_kernwin.CVNF_ACT) | activate (i.e., switch to) the viewer. Activation is performed before the new lochist_entry_t instance is actually copied to the viewer's lochist_t (otherwise, if the viewer was invisible its on_location_changed() handler wouldn't be called.) | | [`WOPN_RESTORE`](#ida_kernwin.WOPN_RESTORE) | if the widget was the only widget in a floating area the last time it was closed, it will be restored as floating, with the same position+size as before | | [`WOPN_PERSIST`](#ida_kernwin.WOPN_PERSIST) | widget will remain available when starting or stopping debugger sessions | | [`WOPN_CLOSED_BY_ESC`](#ida_kernwin.WOPN_CLOSED_BY_ESC) | override idagui.cfg:CLOSED_BY_ESC: esc will close | | [`WOPN_NOT_CLOSED_BY_ESC`](#ida_kernwin.WOPN_NOT_CLOSED_BY_ESC) | override idagui.cfg:CLOSED_BY_ESC: esc will not close | | [`WOPN_DP_MASK`](#ida_kernwin.WOPN_DP_MASK) | | | [`WOPN_DP_SHIFT`](#ida_kernwin.WOPN_DP_SHIFT) | | | [`WOPN_DP_LEFT`](#ida_kernwin.WOPN_DP_LEFT) | Dock widget to the left of dest_ctrl. | | [`WOPN_DP_TOP`](#ida_kernwin.WOPN_DP_TOP) | Dock widget above dest_ctrl. | | [`WOPN_DP_RIGHT`](#ida_kernwin.WOPN_DP_RIGHT) | Dock widget to the right of dest_ctrl. | | [`WOPN_DP_BOTTOM`](#ida_kernwin.WOPN_DP_BOTTOM) | Dock widget below dest_ctrl. | | [`WOPN_DP_INSIDE`](#ida_kernwin.WOPN_DP_INSIDE) | Create a new tab bar with both widget and dest_ctrl. | | [`WOPN_DP_TAB`](#ida_kernwin.WOPN_DP_TAB) | Place widget into a tab next to dest_ctrl, if dest_ctrl is in a tab bar (otherwise the same as WOPN_DP_INSIDE) | | [`WOPN_DP_BEFORE`](#ida_kernwin.WOPN_DP_BEFORE) | Place widget before dst_form in the tab bar instead of after; used with WOPN_DP_INSIDE and WOPN_DP_TAB | | [`WOPN_DP_FLOATING`](#ida_kernwin.WOPN_DP_FLOATING) | Make widget floating. | | [`WOPN_DP_SZHINT`](#ida_kernwin.WOPN_DP_SZHINT) | when floating or in a splitter (i.e., not tabbed), use the widget's size hint to determine the best geometry (Qt only) | | [`WOPN_DP_INSIDE_BEFORE`](#ida_kernwin.WOPN_DP_INSIDE_BEFORE) | | | [`WOPN_DP_TAB_BEFORE`](#ida_kernwin.WOPN_DP_TAB_BEFORE) | | | [`RENADDR_IDA`](#ida_kernwin.RENADDR_IDA) | dialog for "IDA View" | | [`RENADDR_HR`](#ida_kernwin.RENADDR_HR) | dialog for "Pseudocode"; additional flags: | | [`CVLF_USE_MOUSE`](#ida_kernwin.CVLF_USE_MOUSE) | Fetch the location from the mouse, instead of caret in the listing. | | [`cvar`](#ida_kernwin.cvar) | | | [`IDALIB_API_MAGIC`](#ida_kernwin.IDALIB_API_MAGIC) | | | [`DEFAULT_PLACE_LNNUM`](#ida_kernwin.DEFAULT_PLACE_LNNUM) | | | [`PCF_EA_CAPABLE`](#ida_kernwin.PCF_EA_CAPABLE) | toea() implementation returns meaningful data | | [`PCF_MAKEPLACE_ALLOCATES`](#ida_kernwin.PCF_MAKEPLACE_ALLOCATES) | makeplace() returns a freshly allocated (i.e., non-static) instance. All new code should pass that flag to register_place_class(), and the corresponding makeplace() class implementation should return new instances. | | [`LECVT_CANCELED`](#ida_kernwin.LECVT_CANCELED) | | | [`LECVT_ERROR`](#ida_kernwin.LECVT_ERROR) | | | [`LECVT_OK`](#ida_kernwin.LECVT_OK) | | | [`LECVT_WITHIN_LISTING`](#ida_kernwin.LECVT_WITHIN_LISTING) | | | [`CK_TRACE`](#ida_kernwin.CK_TRACE) | traced address | | [`CK_TRACE_OVL`](#ida_kernwin.CK_TRACE_OVL) | overlay trace address | | [`CK_EXTRA1`](#ida_kernwin.CK_EXTRA1) | extra background overlay #1 | | [`CK_EXTRA2`](#ida_kernwin.CK_EXTRA2) | extra background overlay #2 | | [`CK_EXTRA3`](#ida_kernwin.CK_EXTRA3) | extra background overlay #3 | | [`CK_EXTRA4`](#ida_kernwin.CK_EXTRA4) | extra background overlay #4 | | [`CK_EXTRA5`](#ida_kernwin.CK_EXTRA5) | extra background overlay #5 | | [`CK_EXTRA6`](#ida_kernwin.CK_EXTRA6) | extra background overlay #6 | | [`CK_EXTRA7`](#ida_kernwin.CK_EXTRA7) | extra background overlay #7 | | [`CK_EXTRA8`](#ida_kernwin.CK_EXTRA8) | extra background overlay #8 | | [`CK_EXTRA9`](#ida_kernwin.CK_EXTRA9) | extra background overlay #9 | | [`CK_EXTRA10`](#ida_kernwin.CK_EXTRA10) | extra background overlay #10 | | [`CK_EXTRA11`](#ida_kernwin.CK_EXTRA11) | extra background overlay #11 | | [`CK_EXTRA12`](#ida_kernwin.CK_EXTRA12) | extra background overlay #12 | | [`CK_EXTRA13`](#ida_kernwin.CK_EXTRA13) | extra background overlay #13 | | [`CK_EXTRA14`](#ida_kernwin.CK_EXTRA14) | extra background overlay #14 | | [`CK_EXTRA15`](#ida_kernwin.CK_EXTRA15) | extra background overlay #15 | | [`CK_EXTRA16`](#ida_kernwin.CK_EXTRA16) | extra background overlay #16 | | [`LROEF_MASK`](#ida_kernwin.LROEF_MASK) | | | [`LROEF_FULL_LINE`](#ida_kernwin.LROEF_FULL_LINE) | full line background | | [`LROEF_CPS_RANGE`](#ida_kernwin.LROEF_CPS_RANGE) | background for range of chars | | [`BWN_UNKNOWN`](#ida_kernwin.BWN_UNKNOWN) | unknown window | | [`BWN_EXPORTS`](#ida_kernwin.BWN_EXPORTS) | exports | | [`BWN_IMPORTS`](#ida_kernwin.BWN_IMPORTS) | imports | | [`BWN_NAMES`](#ida_kernwin.BWN_NAMES) | names | | [`BWN_FUNCS`](#ida_kernwin.BWN_FUNCS) | functions | | [`BWN_STRINGS`](#ida_kernwin.BWN_STRINGS) | strings | | [`BWN_SEGS`](#ida_kernwin.BWN_SEGS) | segments | | [`BWN_SEGREGS`](#ida_kernwin.BWN_SEGREGS) | segment registers | | [`BWN_SELS`](#ida_kernwin.BWN_SELS) | selectors | | [`BWN_SIGNS`](#ida_kernwin.BWN_SIGNS) | signatures | | [`BWN_TILS`](#ida_kernwin.BWN_TILS) | type libraries | | [`BWN_TITREE`](#ida_kernwin.BWN_TITREE) | type library widget's (e.g., "Local types") tree | | [`BWN_RESERVED_1`](#ida_kernwin.BWN_RESERVED_1) | Reserved. | | [`BWN_PROBS`](#ida_kernwin.BWN_PROBS) | problems | | [`BWN_BPTS`](#ida_kernwin.BWN_BPTS) | breakpoints | | [`BWN_THREADS`](#ida_kernwin.BWN_THREADS) | threads | | [`BWN_MODULES`](#ida_kernwin.BWN_MODULES) | modules | | [`BWN_TRACE`](#ida_kernwin.BWN_TRACE) | tracing view | | [`BWN_CALL_STACK`](#ida_kernwin.BWN_CALL_STACK) | call stack | | [`BWN_XREFS`](#ida_kernwin.BWN_XREFS) | xrefs | | [`BWN_SEARCH`](#ida_kernwin.BWN_SEARCH) | search results | | [`BWN_FRAME`](#ida_kernwin.BWN_FRAME) | function frame | | [`BWN_NAVBAND`](#ida_kernwin.BWN_NAVBAND) | navigation band | | [`BWN_DISASM`](#ida_kernwin.BWN_DISASM) | disassembly views | | [`BWN_HEXVIEW`](#ida_kernwin.BWN_HEXVIEW) | hex view | | [`BWN_NOTEPAD`](#ida_kernwin.BWN_NOTEPAD) | notepad | | [`BWN_OUTPUT`](#ida_kernwin.BWN_OUTPUT) | the text area, in the output window | | [`BWN_CLI`](#ida_kernwin.BWN_CLI) | the command-line, in the output window | | [`BWN_WATCH`](#ida_kernwin.BWN_WATCH) | the 'watches' debugger window | | [`BWN_LOCALS`](#ida_kernwin.BWN_LOCALS) | the 'locals' debugger window | | [`BWN_STKVIEW`](#ida_kernwin.BWN_STKVIEW) | the 'Stack view' debugger window | | [`BWN_CHOOSER`](#ida_kernwin.BWN_CHOOSER) | a non-builtin chooser | | [`BWN_SHORTCUTCSR`](#ida_kernwin.BWN_SHORTCUTCSR) | the shortcuts chooser (Qt version only) | | [`BWN_SHORTCUTWIN`](#ida_kernwin.BWN_SHORTCUTWIN) | the shortcuts window (Qt version only) | | [`BWN_CPUREGS`](#ida_kernwin.BWN_CPUREGS) | one of the 'General registers', 'FPU register', ... debugger windows | | [`BWN_SO_STRUCTS`](#ida_kernwin.BWN_SO_STRUCTS) | the 'Structure offsets' dialog's 'Structures and Unions' panel | | [`BWN_SO_OFFSETS`](#ida_kernwin.BWN_SO_OFFSETS) | the 'Structure offsets' dialog's offset panel | | [`BWN_CMDPALCSR`](#ida_kernwin.BWN_CMDPALCSR) | the command palette chooser (Qt version only) | | [`BWN_CMDPALWIN`](#ida_kernwin.BWN_CMDPALWIN) | the command palette window (Qt version only) | | [`BWN_SNIPPETS`](#ida_kernwin.BWN_SNIPPETS) | the 'Execute script' window | | [`BWN_CUSTVIEW`](#ida_kernwin.BWN_CUSTVIEW) | custom viewers | | [`BWN_ADDRWATCH`](#ida_kernwin.BWN_ADDRWATCH) | the 'Watch List' window | | [`BWN_PSEUDOCODE`](#ida_kernwin.BWN_PSEUDOCODE) | hexrays decompiler views | | [`BWN_RESERVED_2`](#ida_kernwin.BWN_RESERVED_2) | Reserved. | | [`BWN_RESERVED_3`](#ida_kernwin.BWN_RESERVED_3) | Reserved. | | [`BWN_MDVIEWCSR`](#ida_kernwin.BWN_MDVIEWCSR) | lumina metadata view chooser | | [`BWN_DISASM_ARROWS`](#ida_kernwin.BWN_DISASM_ARROWS) | disassembly arrows widget | | [`BWN_CV_LINE_INFOS`](#ida_kernwin.BWN_CV_LINE_INFOS) | custom viewers' lineinfo widget | | [`BWN_SRCPTHMAP_CSR`](#ida_kernwin.BWN_SRCPTHMAP_CSR) | "Source paths..."'s path mappings chooser | | [`BWN_SRCPTHUND_CSR`](#ida_kernwin.BWN_SRCPTHUND_CSR) | "Source paths..."'s undesired paths chooser | | [`BWN_UNDOHIST`](#ida_kernwin.BWN_UNDOHIST) | Undo history. | | [`BWN_SNIPPETS_TREE`](#ida_kernwin.BWN_SNIPPETS_TREE) | the IDB snippets dirtree (Scripts window, Snippets tab) | | [`BWN_SCRIPTS_CSR`](#ida_kernwin.BWN_SCRIPTS_CSR) | obsolete: see BWN_RECENT_SCRIPTS_TREE | | [`BWN_BOOKMARKS`](#ida_kernwin.BWN_BOOKMARKS) | a persistent 'Bookmarks' widget | | [`BWN_TILIST`](#ida_kernwin.BWN_TILIST) | a type listing widget | | [`BWN_TIL_VIEW`](#ida_kernwin.BWN_TIL_VIEW) | a type library's toplevel widget | | [`BWN_TYPE_EDITOR`](#ida_kernwin.BWN_TYPE_EDITOR) | a type editor | | [`BWN_MICROCODE`](#ida_kernwin.BWN_MICROCODE) | microcode view (part of hexrays decompiler) | | [`BWN_XREF_TREE`](#ida_kernwin.BWN_XREF_TREE) | xref tree widget | | [`BWN_TEAMS_VAULT_FILES`](#ida_kernwin.BWN_TEAMS_VAULT_FILES) | | | [`BWN_TEAMS_COMMITS`](#ida_kernwin.BWN_TEAMS_COMMITS) | | | [`BWN_TEAMS_LOCAL_FILES`](#ida_kernwin.BWN_TEAMS_LOCAL_FILES) | | | [`BWN_TEAMS_WORKLISTS`](#ida_kernwin.BWN_TEAMS_WORKLISTS) | | | [`BWN_TEAMS_SITES`](#ida_kernwin.BWN_TEAMS_SITES) | | | [`BWN_TEAMS_USERS`](#ida_kernwin.BWN_TEAMS_USERS) | | | [`BWN_TEAMS_FILE_HISTORY`](#ida_kernwin.BWN_TEAMS_FILE_HISTORY) | | | [`BWN_TEAMS_COMMIT_FILES`](#ida_kernwin.BWN_TEAMS_COMMIT_FILES) | | | [`BWN_TEAMS_EXT_ASSOCS`](#ida_kernwin.BWN_TEAMS_EXT_ASSOCS) | | | [`BWN_TEAMS_OPENED_FILES`](#ida_kernwin.BWN_TEAMS_OPENED_FILES) | | | [`BWN_TEAMS_VAULT_FILE_PICKER`](#ida_kernwin.BWN_TEAMS_VAULT_FILE_PICKER) | | | [`BWN_DSC_INDEX`](#ida_kernwin.BWN_DSC_INDEX) | DyldSharedCache tree widget. | | [`BWN_DSC_SYMBOLS`](#ida_kernwin.BWN_DSC_SYMBOLS) | DyldSharedCache symbols search widget. | | [`BWN_DSC_STRINGS`](#ida_kernwin.BWN_DSC_STRINGS) | DyldSharedCache string-literal search widget. | | [`BWN_XREF_GRAPH`](#ida_kernwin.BWN_XREF_GRAPH) | Xref Graph widget. | | [`BWN_GIT_REPOS`](#ida_kernwin.BWN_GIT_REPOS) | | | [`BWN_XREF_GRAPH_MANAGER`](#ida_kernwin.BWN_XREF_GRAPH_MANAGER) | Xref Graph manager widget. | | [`BWN_RECENT_SCRIPTS_TREE`](#ida_kernwin.BWN_RECENT_SCRIPTS_TREE) | Recent scripts dirtree (Scripts window). | | [`BWN_EXAMPLE_SCRIPTS_TREE`](#ida_kernwin.BWN_EXAMPLE_SCRIPTS_TREE) | IDAPython examples dirtree (Scripts window). | | [`BWN_SEARCH_SCRIPTS_TREE`](#ida_kernwin.BWN_SEARCH_SCRIPTS_TREE) | Search results dirtree (Scripts window). | | [`BWN_PATHFINDER`](#ida_kernwin.BWN_PATHFINDER) | Pathfinder (waypoints/exclusions). | | [`BWN_SNIPPETS_CSR`](#id0) | | | [`IDA_DEBUG_DREFS`](#ida_kernwin.IDA_DEBUG_DREFS) | drefs | | [`IDA_DEBUG_OFFSET`](#ida_kernwin.IDA_DEBUG_OFFSET) | offsets | | [`IDA_DEBUG_FLIRT`](#ida_kernwin.IDA_DEBUG_FLIRT) | flirt | | [`IDA_DEBUG_IDP`](#ida_kernwin.IDA_DEBUG_IDP) | idp module | | [`IDA_DEBUG_LDR`](#ida_kernwin.IDA_DEBUG_LDR) | ldr module | | [`IDA_DEBUG_PLUGIN`](#ida_kernwin.IDA_DEBUG_PLUGIN) | plugin module | | [`IDA_DEBUG_IDS`](#ida_kernwin.IDA_DEBUG_IDS) | ids files | | [`IDA_DEBUG_CONFIG`](#ida_kernwin.IDA_DEBUG_CONFIG) | config file | | [`IDA_DEBUG_CHECKMEM`](#ida_kernwin.IDA_DEBUG_CHECKMEM) | check heap consistency | | [`IDA_DEBUG_LICENSE`](#ida_kernwin.IDA_DEBUG_LICENSE) | licensing | | [`IDA_DEBUG_DEMANGLE`](#ida_kernwin.IDA_DEBUG_DEMANGLE) | demangler | | [`IDA_DEBUG_QUEUE`](#ida_kernwin.IDA_DEBUG_QUEUE) | queue | | [`IDA_DEBUG_ROLLBACK`](#ida_kernwin.IDA_DEBUG_ROLLBACK) | rollback | | [`IDA_DEBUG_ALREADY`](#ida_kernwin.IDA_DEBUG_ALREADY) | already data or code | | [`IDA_DEBUG_TIL`](#ida_kernwin.IDA_DEBUG_TIL) | type system | | [`IDA_DEBUG_NOTIFY`](#ida_kernwin.IDA_DEBUG_NOTIFY) | show all notifications | | [`IDA_DEBUG_DEBUGGER`](#ida_kernwin.IDA_DEBUG_DEBUGGER) | debugger | | [`IDA_DEBUG_APPCALL`](#ida_kernwin.IDA_DEBUG_APPCALL) | appcall | | [`IDA_DEBUG_SRCDBG`](#ida_kernwin.IDA_DEBUG_SRCDBG) | source debugging | | [`IDA_DEBUG_ACCESSIBILITY`](#ida_kernwin.IDA_DEBUG_ACCESSIBILITY) | accessibility | | [`IDA_DEBUG_NETWORK`](#ida_kernwin.IDA_DEBUG_NETWORK) | network | | [`IDA_DEBUG_INTERNET`](#ida_kernwin.IDA_DEBUG_INTERNET) | internet connection (for API backward compatibility) | | [`IDA_DEBUG_SIMPLEX`](#ida_kernwin.IDA_DEBUG_SIMPLEX) | full stack analysis | | [`IDA_DEBUG_DBGINFO`](#ida_kernwin.IDA_DEBUG_DBGINFO) | handling of debug info (e.g. pdb, dwarf) | | [`IDA_DEBUG_LUMINA`](#ida_kernwin.IDA_DEBUG_LUMINA) | lumina related | | [`IDA_DEBUG_THEMES`](#ida_kernwin.IDA_DEBUG_THEMES) | themes | | [`IDA_DEBUG_REGEX`](#ida_kernwin.IDA_DEBUG_REGEX) | regular expression | | [`IDA_DEBUG_SUBPROC`](#ida_kernwin.IDA_DEBUG_SUBPROC) | sub process | | [`IDA_DEBUG_RANGECB`](#ida_kernwin.IDA_DEBUG_RANGECB) | range-based entities like segments, functions and so on | | [`IDA_DEBUG_ALWAYS`](#ida_kernwin.IDA_DEBUG_ALWAYS) | everything | | [`AST_ENABLE_ALWAYS`](#ida_kernwin.AST_ENABLE_ALWAYS) | enable action and do not call action_handler_t::update() anymore | | [`AST_ENABLE_FOR_IDB`](#ida_kernwin.AST_ENABLE_FOR_IDB) | enable action for the current idb. call action_handler_t::update() when a database is opened/closed | | [`AST_ENABLE_FOR_WIDGET`](#ida_kernwin.AST_ENABLE_FOR_WIDGET) | enable action for the current widget. call action_handler_t::update() when a widget gets/loses focus | | [`AST_ENABLE`](#ida_kernwin.AST_ENABLE) | enable action - call action_handler_t::update() when anything changes | | [`AST_DISABLE_ALWAYS`](#ida_kernwin.AST_DISABLE_ALWAYS) | disable action and do not call action_handler_t::action() anymore | | [`AST_DISABLE_FOR_IDB`](#ida_kernwin.AST_DISABLE_FOR_IDB) | analog of AST_ENABLE_FOR_IDB | | [`AST_DISABLE_FOR_WIDGET`](#ida_kernwin.AST_DISABLE_FOR_WIDGET) | analog of AST_ENABLE_FOR_WIDGET | | [`AST_DISABLE`](#ida_kernwin.AST_DISABLE) | analog of AST_ENABLE | | [`CH_MODAL`](#ida_kernwin.CH_MODAL) | Modal chooser. | | [`CH_KEEP`](#ida_kernwin.CH_KEEP) | The chooser instance's lifecycle is not tied to the lifecycle of the widget showing its contents. Closing the widget will not destroy the chooser structure. This allows for, e.g., static global chooser instances that don't need to be allocated on the heap. Also stack-allocated chooser instances must set this bit. | | [`CH_MULTI`](#ida_kernwin.CH_MULTI) | The chooser will allow multi-selection (only for GUI choosers). This bit is set when using the chooser_multi_t structure. | | [`CH_MULTI_EDIT`](#ida_kernwin.CH_MULTI_EDIT) | Obsolete. | | [`CH_NOBTNS`](#ida_kernwin.CH_NOBTNS) | do not display ok/cancel/help/search buttons. Meaningful only for gui modal windows because non-modal windows do not have any buttons anyway. Text mode does not have them neither. | | [`CH_ATTRS`](#ida_kernwin.CH_ATTRS) | generate ui_get_chooser_item_attrs (gui only) | | [`CH_UNUSED`](#ida_kernwin.CH_UNUSED) | | | [`CH_FORCE_DEFAULT`](#ida_kernwin.CH_FORCE_DEFAULT) | if a non-modal chooser was already open, change selection to the default one | | [`CH_CAN_INS`](#ida_kernwin.CH_CAN_INS) | allow to insert new items | | [`CH_CAN_DEL`](#ida_kernwin.CH_CAN_DEL) | allow to delete existing item(s) | | [`CH_CAN_EDIT`](#ida_kernwin.CH_CAN_EDIT) | allow to edit existing item(s) | | [`CH_CAN_REFRESH`](#ida_kernwin.CH_CAN_REFRESH) | allow to refresh chooser | | [`CH_QFLT`](#ida_kernwin.CH_QFLT) | open with quick filter enabled and focused | | [`CH_QFTYP_SHIFT`](#ida_kernwin.CH_QFTYP_SHIFT) | | | [`CH_QFTYP_DEFAULT`](#ida_kernwin.CH_QFTYP_DEFAULT) | set quick filtering type to the possible existing default for this chooser | | [`CH_QFTYP_NORMAL`](#ida_kernwin.CH_QFTYP_NORMAL) | normal (i.e., lexicographical) quick filter type | | [`CH_QFTYP_WHOLE_WORDS`](#ida_kernwin.CH_QFTYP_WHOLE_WORDS) | whole words quick filter type | | [`CH_QFTYP_REGEX`](#ida_kernwin.CH_QFTYP_REGEX) | regex quick filter type | | [`CH_QFTYP_FUZZY`](#ida_kernwin.CH_QFTYP_FUZZY) | fuzzy search quick filter type | | [`CH_QFTYP_MASK`](#ida_kernwin.CH_QFTYP_MASK) | | | [`CH_NO_STATUS_BAR`](#ida_kernwin.CH_NO_STATUS_BAR) | don't show a status bar | | [`CH_RESTORE`](#ida_kernwin.CH_RESTORE) | restore floating position if present (equivalent of WOPN_RESTORE) (GUI version only) | | [`CH_RENAME_IS_EDIT`](#ida_kernwin.CH_RENAME_IS_EDIT) | triggering a 'edit/rename' (i.e., F2 shortcut) on a cell, should call the edit() callback for the corresponding row. | | [`OBSOLETE_CH_BUILTIN_SHIFT`](#ida_kernwin.OBSOLETE_CH_BUILTIN_SHIFT) | | | [`OBSOLETE_CH_BUILTIN_MASK`](#ida_kernwin.OBSOLETE_CH_BUILTIN_MASK) | Mask for builtin chooser numbers. Plugins should not use them. | | [`OBSOLETE_CH_HAS_DIRTREE`](#ida_kernwin.OBSOLETE_CH_HAS_DIRTREE) | | | [`OBSOLETE_CH_TM_NO_TREE`](#ida_kernwin.OBSOLETE_CH_TM_NO_TREE) | | | [`OBSOLETE_CH_TM_FOLDERS_ONLY`](#ida_kernwin.OBSOLETE_CH_TM_FOLDERS_ONLY) | | | [`OBSOLETE_CH_TM_FULL_TREE`](#ida_kernwin.OBSOLETE_CH_TM_FULL_TREE) | | | [`OBSOLETE_CH_TM_SHIFT`](#ida_kernwin.OBSOLETE_CH_TM_SHIFT) | | | [`OBSOLETE_CH_TM_MASK`](#ida_kernwin.OBSOLETE_CH_TM_MASK) | | | [`CH_HAS_DIFF`](#ida_kernwin.CH_HAS_DIFF) | The chooser can be used in a diffing/merging workflow. | | [`CH_NO_SORT`](#ida_kernwin.CH_NO_SORT) | The chooser will not have sorting abilities. | | [`CH_NO_FILTER`](#ida_kernwin.CH_NO_FILTER) | The chooser will not have filtering abilities. | | [`OBSOLETE_CH_NON_PERSISTED_TREE`](#ida_kernwin.OBSOLETE_CH_NON_PERSISTED_TREE) | | | [`OBSOLETE_CH2_LAZY_LOADED`](#ida_kernwin.OBSOLETE_CH2_LAZY_LOADED) | | | [`OBSOLETE_CH2_HAS_INODE2INDEX`](#ida_kernwin.OBSOLETE_CH2_HAS_INODE2INDEX) | | | [`CHCOL_PLAIN`](#ida_kernwin.CHCOL_PLAIN) | plain string | | [`CHCOL_PATH`](#ida_kernwin.CHCOL_PATH) | file path. TUI IDA will truncate excessive cell lengths starting at their beginning, and prepending the resulting text with "..." order to leave the filename visible | | [`CHCOL_HEX`](#ida_kernwin.CHCOL_HEX) | hexadecimal number | | [`CHCOL_DEC`](#ida_kernwin.CHCOL_DEC) | decimal number | | [`CHCOL_EA`](#ida_kernwin.CHCOL_EA) | address | | [`CHCOL_FNAME`](#ida_kernwin.CHCOL_FNAME) | function name. If a chooser column has this flag set and implements chooser_base_t::get_ea(), rows background colors will be automatically set to match the navigator's "Library function", "Lumina function" and "External symbol" colors | | [`CHCOL_SIZE`](#ida_kernwin.CHCOL_SIZE) | human-friendly size (e.g., "1.5 MB"). uses pretty_print_size() for display, raw numeric value for sorting | | [`CHCOL_TIMESTAMP`](#ida_kernwin.CHCOL_TIMESTAMP) | UTC timestamp (seconds since epoch). displayed human-friendly ("Just now", "N minutes ago", "HH:mm", or a full date) and sorted by the raw value. | | [`CHCOL_FORMAT`](#ida_kernwin.CHCOL_FORMAT) | column format mask | | [`CHCOL_DEFHIDDEN`](#ida_kernwin.CHCOL_DEFHIDDEN) | column should be hidden by default | | [`CHCOL_DRAGHINT`](#ida_kernwin.CHCOL_DRAGHINT) | the column number that will be used to build hints for the dragging undo label. This should be provided for at most one column for any given chooser. | | [`OBSOLETE_CHCOL_INODENAME`](#ida_kernwin.OBSOLETE_CHCOL_INODENAME) | | | [`CHCOL_CHECKBOX`](#ida_kernwin.CHCOL_CHECKBOX) | display a checkbox in this column. at most one column per chooser may carry this flag. The check state is communicated via CHITEM_CHKST_MASK in chooser_item_attrs_t::flags. | | [`CHITEM_BOLD`](#ida_kernwin.CHITEM_BOLD) | display the item in bold | | [`CHITEM_ITALIC`](#ida_kernwin.CHITEM_ITALIC) | display the item in italic | | [`CHITEM_UNDER`](#ida_kernwin.CHITEM_UNDER) | underline the item | | [`CHITEM_STRIKE`](#ida_kernwin.CHITEM_STRIKE) | strikeout the item | | [`CHITEM_GRAY`](#ida_kernwin.CHITEM_GRAY) | gray out the item | | [`CHITEM_CHKST_MASK`](#ida_kernwin.CHITEM_CHKST_MASK) | check state mask (2 bits), for columns with CHCOL_CHECKBOX. values match Qt::CheckState: | | [`CHITEM_CHKST_UNCHECKED`](#ida_kernwin.CHITEM_CHKST_UNCHECKED) | unchecked | | [`CHITEM_CHKST_PARTIAL`](#ida_kernwin.CHITEM_CHKST_PARTIAL) | partially checked | | [`CHITEM_CHKST_CHECKED`](#ida_kernwin.CHITEM_CHKST_CHECKED) | checked | | [`CHOOSER_NOMAINMENU`](#ida_kernwin.CHOOSER_NOMAINMENU) | do not display main menu | | [`CHOOSER_NOSTATUSBAR`](#ida_kernwin.CHOOSER_NOSTATUSBAR) | do not display status bar (obsolete. Use CH_NO_STATUS_BAR instead) | | [`GCRF_HIGH_BIT`](#ida_kernwin.GCRF_HIGH_BIT) | | | [`GCRF_HEADER`](#ida_kernwin.GCRF_HEADER) | Return header texts. | | [`GCRF_SELECTION`](#ida_kernwin.GCRF_SELECTION) | Return selected rows. | | [`GCRF_CURRENT`](#ida_kernwin.GCRF_CURRENT) | Return the current row. | | [`GCRF_ALL`](#ida_kernwin.GCRF_ALL) | Return all rows. | | [`GCIF_SELECTION`](#ida_kernwin.GCIF_SELECTION) | Selected row (tabular views), or current item (or possibly selected range) in disassembly. | | [`GCIF_CURRENT`](#ida_kernwin.GCIF_CURRENT) | Current row (tabular views), or current item in disassembly. | | [`iqm_bwn`](#ida_kernwin.iqm_bwn) | | | [`iqm_ctx`](#ida_kernwin.iqm_ctx) | | | [`itq_functions`](#ida_kernwin.itq_functions) | | | [`itq_types`](#ida_kernwin.itq_types) | | | [`nat_lib`](#ida_kernwin.nat_lib) | | | [`nat_fun`](#ida_kernwin.nat_fun) | | | [`nat_cod`](#ida_kernwin.nat_cod) | | | [`nat_dat`](#ida_kernwin.nat_dat) | | | [`nat_und`](#ida_kernwin.nat_und) | | | [`nat_ext`](#ida_kernwin.nat_ext) | | | [`nat_err`](#ida_kernwin.nat_err) | | | [`nat_gap`](#ida_kernwin.nat_gap) | | | [`nat_cur`](#ida_kernwin.nat_cur) | | | [`nat_auto`](#ida_kernwin.nat_auto) | | | [`nat_lum`](#ida_kernwin.nat_lum) | | | [`nat_hlo`](#ida_kernwin.nat_hlo) | | | [`nat_last`](#ida_kernwin.nat_last) | | | [`CVH_USERDATA`](#ida_kernwin.CVH_USERDATA) | | | [`CVH_KEYDOWN`](#ida_kernwin.CVH_KEYDOWN) | see custom_viewer_keydown_t | | [`CVH_POPUP`](#ida_kernwin.CVH_POPUP) | see custom_viewer_popup_t | | [`CVH_DBLCLICK`](#ida_kernwin.CVH_DBLCLICK) | see custom_viewer_dblclick_t | | [`CVH_CURPOS`](#ida_kernwin.CVH_CURPOS) | see custom_viewer_curpos_t | | [`CVH_CLOSE`](#ida_kernwin.CVH_CLOSE) | see custom_viewer_close_t | | [`CVH_CLICK`](#ida_kernwin.CVH_CLICK) | see custom_viewer_click_t | | [`CVH_QT_AWARE`](#ida_kernwin.CVH_QT_AWARE) | see set_custom_viewer_qt_aware() | | [`CVH_HELP`](#ida_kernwin.CVH_HELP) | see custom_viewer_help_t | | [`CVH_MOUSEMOVE`](#ida_kernwin.CVH_MOUSEMOVE) | see custom_viewer_mouse_moved_t | | [`CDVH_USERDATA`](#ida_kernwin.CDVH_USERDATA) | see set_code_viewer_user_data() | | [`CDVH_SRCVIEW`](#ida_kernwin.CDVH_SRCVIEW) | see set_code_viewer_is_source() | | [`CDVH_LINES_CLICK`](#ida_kernwin.CDVH_LINES_CLICK) | see code_viewer_lines_click_t | | [`CDVH_LINES_DBLCLICK`](#ida_kernwin.CDVH_LINES_DBLCLICK) | see code_viewer_lines_click_t | | [`CDVH_LINES_POPUP`](#ida_kernwin.CDVH_LINES_POPUP) | see code_viewer_lines_click_t | | [`CDVH_LINES_DRAWICON`](#ida_kernwin.CDVH_LINES_DRAWICON) | see code_viewer_lines_icon_t | | [`CDVH_LINES_LINENUM`](#ida_kernwin.CDVH_LINES_LINENUM) | see code_viewer_lines_linenum_t | | [`CDVH_LINES_ICONMARGIN`](#ida_kernwin.CDVH_LINES_ICONMARGIN) | see set_code_viewer_lines_icon_margin() | | [`CDVH_LINES_RADIX`](#ida_kernwin.CDVH_LINES_RADIX) | see set_code_viewer_lines_radix() | | [`CDVH_LINES_ALIGNMENT`](#ida_kernwin.CDVH_LINES_ALIGNMENT) | see set_code_viewer_lines_alignment() | | [`CDVH_LINES_FOLD_STATE`](#ida_kernwin.CDVH_LINES_FOLD_STATE) | see code_viewer_fold_state_t | | [`CDVH_LINES_FOLD_TOGGLE`](#ida_kernwin.CDVH_LINES_FOLD_TOGGLE) | see code_viewer_fold_toggle_t | | [`VES_SHIFT`](#ida_kernwin.VES_SHIFT) | state & 1 => Shift is pressed | | [`VES_ALT`](#ida_kernwin.VES_ALT) | | | [`VES_CTRL`](#ida_kernwin.VES_CTRL) | | | [`VES_MOUSE_LEFT`](#ida_kernwin.VES_MOUSE_LEFT) | | | [`VES_MOUSE_RIGHT`](#ida_kernwin.VES_MOUSE_RIGHT) | | | [`VES_MOUSE_MIDDLE`](#ida_kernwin.VES_MOUSE_MIDDLE) | | | [`VES_META`](#ida_kernwin.VES_META) | | | [`msg_activated`](#ida_kernwin.msg_activated) | The message window is activated.