diff --git a/BUILDING.txt b/BUILDING.txt index 81722d3..911a98a 100644 --- a/BUILDING.txt +++ b/BUILDING.txt @@ -13,11 +13,10 @@ REQUIREMENTS - IDA and IDA SDK [> 5.6] http://www.hex-rays.com/idapro/ - - Python [2.5.1, 2.6.1, 2.7] + - Python 3.x http://www.python.org/ - Simplified Wrapper Interface Generator (SWIG) - - if you intend to build for Python 2.x: [4.0.1] - if you intend to build for Python 3.x: [4.0.1, with support for -py3-limited-api] Hex-Rays cannot guarantee support for IDAPython diff --git a/README_python3.txt b/README_python3.txt index c85cf3c..156f4c6 100644 --- a/README_python3.txt +++ b/README_python3.txt @@ -1,34 +1,6 @@ +IDAPython requires a Python3.x installation in order to work. -IDAPython comes in two flavors: - -* IDAPython-for-Python2.7 -* IDAPython-for-Python3.x - -# Switching between IDAPython-for-Python2.7, and IDAPython-for-Python3.x. - -IDA ships with two versions of IDAPython: -* one that runs using the Python2.7 runtime -* one that runs using the Python3.x runtime - -By default, IDA will load the one that runs using the Python3.x runtime. -In order to have IDA use IDAPython-on-Python2.7, the file -'use_python2' needs to be present in the 'python' subdirectory. - -That file will be looked for in the following places: -* IDA's install path: path/to/ida_install/python/use_python2 -* The 'IDAUSR' directory: - + ~/.idapro/python/use_python2 (on Linux/OSX) - + %APPDATA%\Hex-Rays\IDA Pro\python\use_python2 (on Windows) - + [...or any other directory if the environment variable $IDAUSR is set] - -# Selecting which Python3.x install runtime to use - -The situation for IDAPython-for-Python2.7 is simple: it uses Python 2.7, -and will expect that [lib]python2.7.[dll|so|dylib] is present in the system -library path so that IDA can find it. - -But when it comes to IDAPython-for-Python3.x, things gets more complex: -because different users might have different (and possibly multiple) +Because different users might have different (and possibly multiple) versions of Python3.x installed, IDA comes with a tool called `idapyswitch` that can be run to select the desired Python3.x runtime. diff --git a/api_contents3.txt b/api_contents3.txt index dd20e6e..0ad787d 100644 --- a/api_contents3.txt +++ b/api_contents3.txt @@ -1925,6 +1925,15 @@ 'chooser_item_attrs_t_flags_get', 'chooser_item_attrs_t_flags_set', 'chooser_item_attrs_t_reset', + 'chooser_stdact_desc_t_icon_get', + 'chooser_stdact_desc_t_icon_set', + 'chooser_stdact_desc_t_label_get', + 'chooser_stdact_desc_t_label_set', + 'chooser_stdact_desc_t_tooltip_get', + 'chooser_stdact_desc_t_tooltip_set', + 'chooser_stdact_desc_t_ucb', + 'chooser_stdact_desc_t_version_get', + 'chooser_stdact_desc_t_version_set', 'chunk_size', 'chunk_start', 'cif_t___eq__', @@ -2132,7 +2141,6 @@ 'clr_lzero', 'clr_lzero0', 'clr_lzero1', - 'clr_module_data', 'clr_node_info', 'clr_noret', 'clr_notcode', @@ -2295,6 +2303,8 @@ 'create_memory_linput', 'create_menu', 'create_mutable_graph', + 'create_nodeval_merge_handler', + 'create_nodeval_merge_handlers', 'create_numbered_type_name', 'create_outctx', 'create_oword', @@ -2303,6 +2313,7 @@ 'create_simple_diff_handler', 'create_simple_idb_diff_handler', 'create_source_viewer', + 'create_std_modmerge_handlers', 'create_strlit', 'create_struct', 'create_switch_table', @@ -2698,6 +2709,7 @@ 'delete_channel_redir_t', 'delete_choose_ioport_parser_t', 'delete_chooser_item_attrs_t', + 'delete_chooser_stdact_desc_t', 'delete_cif_t', 'delete_cinsn_list_t', 'delete_cinsn_list_t_iterator', @@ -2813,6 +2825,8 @@ 'delete_history_t', 'delete_ida_lowertype_helper_t', 'delete_idaplace_t', + 'delete_idbattr_info_t', + 'delete_idbattr_valmap_t', 'delete_idc_global_t', 'delete_idc_value_t', 'delete_idc_values_t', @@ -2831,10 +2845,12 @@ 'delete_insn_site_t', 'delete_insn_t', 'delete_instant_dbgopts_t', + 'delete_int64vec_t', 'delete_int_pointer', 'delete_interval_t', 'delete_intvec_t', 'delete_ioports_fallback_t', + 'delete_item_block_locator_t', 'delete_iterator', 'delete_ivl_t', 'delete_ivl_with_name_t', @@ -2850,7 +2866,6 @@ 'delete_lochist_t', 'delete_lock_func', 'delete_lock_segment', - 'delete_longlongvec_t', 'delete_lowertype_helper_t', 'delete_lumina_client_t', 'delete_lumina_op_res_vec_t', @@ -2879,6 +2894,9 @@ 'delete_memreg_info_t', 'delete_memreg_infos_t', 'delete_menu', + 'delete_merge_handler_params_t', + 'delete_merge_node_helper_t', + 'delete_merge_node_info_t', 'delete_metadata_iterator_t', 'delete_microcode_filter_t', 'delete_minsn_t', @@ -2886,6 +2904,7 @@ 'delete_mlist_mop_visitor_t', 'delete_mlist_t', 'delete_mnumber_t', + 'delete_moddata_diff_helper_t', 'delete_modinfo_t', 'delete_mop_addr_t', 'delete_mop_pair_t', @@ -2901,6 +2920,7 @@ 'delete_node_ordering_t', 'delete_num_range_t', 'delete_number_format_t', + 'delete_octet_generator_t', 'delete_op_parent_info_t', 'delete_op_t', 'delete_operand_locator_t', @@ -2979,6 +2999,7 @@ 'delete_segm_move_info_t', 'delete_segm_move_info_vec_t', 'delete_segm_move_infos_t', + 'delete_segment_defsr_array', 'delete_segment_t', 'delete_seh_t', 'delete_sel_array', @@ -3050,8 +3071,8 @@ 'delete_ui_stroff_applicator_t', 'delete_ui_stroff_op_t', 'delete_ui_stroff_ops_t', + 'delete_uint64vec_t', 'delete_uintvec_t', - 'delete_ulonglongvec_t', 'delete_unreferenced_stkvars', 'delete_user_cmts_iterator_t', 'delete_user_cmts_t', @@ -3096,6 +3117,7 @@ 'deref_idcv', 'deref_ptr', 'deserialize_tinfo', + 'destroy_moddata_merge_handlers', 'detach_action_from_menu', 'detach_action_from_popup', 'detach_action_from_toolbar', @@ -3322,6 +3344,7 @@ 'disown_cfunc_parentee_t', 'disown_chain_visitor_t', 'disown_choose_ioport_parser_t', + 'disown_chooser_stdact_desc_t', 'disown_const_aloc_visitor_t', 'disown_ctree_parentee_t', 'disown_ctree_visitor_t', @@ -3336,10 +3359,13 @@ 'disown_graph_visitor_t', 'disown_highlighter_cbs_t', 'disown_ioports_fallback_t', + 'disown_item_block_locator_t', 'disown_macro_constructor_t', + 'disown_merge_node_helper_t', 'disown_microcode_filter_t', 'disown_minsn_visitor_t', 'disown_mlist_mop_visitor_t', + 'disown_moddata_diff_helper_t', 'disown_mop_visitor_t', 'disown_optblock_t', 'disown_optinsn_t', @@ -3439,7 +3465,6 @@ 'ea_pointer_cast', 'ea_pointer_frompointer', 'ea_pointer_value', - 'ea_to_ea64', 'ea_viewer_history_push_and_jump', 'eamap_begin', 'eamap_clear', @@ -3750,6 +3775,7 @@ 'find_data', 'find_defined', 'find_error', + 'find_free_chunk', 'find_free_selector', 'find_func_bounds', 'find_idc_class', @@ -4438,6 +4464,7 @@ 'get_dtype_flag', 'get_dtype_size', 'get_dword', + 'get_ea_diffpos_name', 'get_ea_name', 'get_ea_viewer_history_info', 'get_effective_spd', @@ -4626,7 +4653,6 @@ 'get_member_type', 'get_merror_desc', 'get_min_spd_ea', - 'get_module_data', 'get_module_info', 'get_mreg_name', 'get_name', @@ -4666,6 +4692,7 @@ 'get_numbered_type', 'get_numbered_type_name', 'get_octet', + 'get_octet2', 'get_offbase', 'get_offset_expr', 'get_offset_expression', @@ -5143,6 +5170,56 @@ 'idainfo_xrefnum_set', 'idaplace_t_ea_get', 'idaplace_t_ea_set', + 'idbattr_info_t___lt__', + 'idbattr_info_t_bitmask_get', + 'idbattr_info_t_bitmask_set', + 'idbattr_info_t_has_individual_node', + 'idbattr_info_t_hashname', + 'idbattr_info_t_idi_flags_get', + 'idbattr_info_t_idi_flags_set', + 'idbattr_info_t_individual_node_get', + 'idbattr_info_t_individual_node_set', + 'idbattr_info_t_is_bitfield', + 'idbattr_info_t_is_bitmap', + 'idbattr_info_t_is_boolean', + 'idbattr_info_t_is_buf_var', + 'idbattr_info_t_is_bytearray', + 'idbattr_info_t_is_cstr', + 'idbattr_info_t_is_decimal', + 'idbattr_info_t_is_hash', + 'idbattr_info_t_is_hexadecimal', + 'idbattr_info_t_is_incremented', + 'idbattr_info_t_is_node_altval', + 'idbattr_info_t_is_node_blob', + 'idbattr_info_t_is_node_supval', + 'idbattr_info_t_is_node_valobj', + 'idbattr_info_t_is_node_var', + 'idbattr_info_t_is_onoff', + 'idbattr_info_t_is_qstring', + 'idbattr_info_t_is_readonly_var', + 'idbattr_info_t_is_scalar_var', + 'idbattr_info_t_is_struc_field', + 'idbattr_info_t_is_val_mapped', + 'idbattr_info_t_maxsize_get', + 'idbattr_info_t_maxsize_set', + 'idbattr_info_t_name_get', + 'idbattr_info_t_name_set', + 'idbattr_info_t_offset_get', + 'idbattr_info_t_offset_set', + 'idbattr_info_t_ridx', + 'idbattr_info_t_str_false', + 'idbattr_info_t_str_true', + 'idbattr_info_t_tag_get', + 'idbattr_info_t_tag_set', + 'idbattr_info_t_use_hlpstruc', + 'idbattr_info_t_vmap_get', + 'idbattr_info_t_vmap_set', + 'idbattr_info_t_width_get', + 'idbattr_info_t_width_set', + 'idbattr_valmap_t_valname_get', + 'idbattr_valmap_t_valname_set', + 'idbattr_valmap_t_value_get', + 'idbattr_valmap_t_value_set', 'idc_get_local_type', 'idc_get_local_type_name', 'idc_get_local_type_raw', @@ -5796,6 +5873,45 @@ 'instant_dbgopts_t_pid_set', 'instant_dbgopts_t_port_get', 'instant_dbgopts_t_port_set', + 'int64vec_t___eq__', + 'int64vec_t___getitem__', + 'int64vec_t___len__', + 'int64vec_t___ne__', + 'int64vec_t___setitem__', + 'int64vec_t__del', + 'int64vec_t_add_unique', + 'int64vec_t_at', + 'int64vec_t_begin', + 'int64vec_t_begin__SWIG_0', + 'int64vec_t_begin__SWIG_1', + 'int64vec_t_capacity', + 'int64vec_t_clear', + 'int64vec_t_empty', + 'int64vec_t_end', + 'int64vec_t_end__SWIG_0', + 'int64vec_t_end__SWIG_1', + 'int64vec_t_erase', + 'int64vec_t_erase__SWIG_0', + 'int64vec_t_erase__SWIG_1', + 'int64vec_t_extract', + 'int64vec_t_find', + 'int64vec_t_find__SWIG_0', + 'int64vec_t_find__SWIG_1', + 'int64vec_t_has', + 'int64vec_t_inject', + 'int64vec_t_insert', + 'int64vec_t_pop_back', + 'int64vec_t_push_back', + 'int64vec_t_push_back__SWIG_0', + 'int64vec_t_push_back__SWIG_1', + 'int64vec_t_qclear', + 'int64vec_t_reserve', + 'int64vec_t_resize', + 'int64vec_t_resize__SWIG_0', + 'int64vec_t_resize__SWIG_1', + 'int64vec_t_size', + 'int64vec_t_swap', + 'int64vec_t_truncate', 'int_pointer_assign', 'int_pointer_cast', 'int_pointer_frompointer', @@ -5937,6 +6053,7 @@ 'is_defarg', 'is_defarg0', 'is_defarg1', + 'is_diff_merge_mode', 'is_double', 'is_dummy_member_name', 'is_dword', @@ -6138,6 +6255,7 @@ 'is_usersp', 'is_userti', 'is_valid_cp', + 'is_valid_dstate', 'is_valid_trace_file', 'is_valid_typename', 'is_vararg_cc', @@ -6153,6 +6271,8 @@ 'is_yword', 'is_zstroff', 'is_zword', + 'item_block_locator_t_get_block_head', + 'item_block_locator_t_setup_blocks', 'iterator___eq__', 'iterator___ne__', 'iterator___ref__', @@ -6365,45 +6485,6 @@ 'lock_segm', 'log2ceil', 'log2floor', - 'longlongvec_t___eq__', - 'longlongvec_t___getitem__', - 'longlongvec_t___len__', - 'longlongvec_t___ne__', - 'longlongvec_t___setitem__', - 'longlongvec_t__del', - 'longlongvec_t_add_unique', - 'longlongvec_t_at', - 'longlongvec_t_begin', - 'longlongvec_t_begin__SWIG_0', - 'longlongvec_t_begin__SWIG_1', - 'longlongvec_t_capacity', - 'longlongvec_t_clear', - 'longlongvec_t_empty', - 'longlongvec_t_end', - 'longlongvec_t_end__SWIG_0', - 'longlongvec_t_end__SWIG_1', - 'longlongvec_t_erase', - 'longlongvec_t_erase__SWIG_0', - 'longlongvec_t_erase__SWIG_1', - 'longlongvec_t_extract', - 'longlongvec_t_find', - 'longlongvec_t_find__SWIG_0', - 'longlongvec_t_find__SWIG_1', - 'longlongvec_t_has', - 'longlongvec_t_inject', - 'longlongvec_t_insert', - 'longlongvec_t_pop_back', - 'longlongvec_t_push_back', - 'longlongvec_t_push_back__SWIG_0', - 'longlongvec_t_push_back__SWIG_1', - 'longlongvec_t_qclear', - 'longlongvec_t_reserve', - 'longlongvec_t_resize', - 'longlongvec_t_resize__SWIG_0', - 'longlongvec_t_resize__SWIG_1', - 'longlongvec_t_size', - 'longlongvec_t_swap', - 'longlongvec_t_truncate', 'lookup_key_code', 'lower_type', 'lowertype_helper_t_func_has_stkframe_hole', @@ -6596,6 +6677,7 @@ 'lvar_t_clr_noptr_var', 'lvar_t_clr_notarg', 'lvar_t_clr_overlapped_var', + 'lvar_t_clr_shared', 'lvar_t_clr_spoiled_var', 'lvar_t_clr_thisarg', 'lvar_t_clr_unknown_width', @@ -6630,6 +6712,7 @@ 'lvar_t_is_notarg', 'lvar_t_is_overlapped_var', 'lvar_t_is_result_var', + 'lvar_t_is_shared', 'lvar_t_is_spoiled_var', 'lvar_t_is_thisarg', 'lvar_t_is_unknown_width', @@ -6652,6 +6735,7 @@ 'lvar_t_set_noptr_var', 'lvar_t_set_notarg', 'lvar_t_set_overlapped_var', + 'lvar_t_set_shared', 'lvar_t_set_spoiled_var', 'lvar_t_set_thisarg', 'lvar_t_set_typed', @@ -6820,6 +6904,7 @@ 'mba_t_gotoff_stkvars_set', 'mba_t_graph_insns', 'mba_t_has_bad_sp', + 'mba_t_has_outlines', 'mba_t_has_over_chains', 'mba_t_has_passregs', 'mba_t_has_stack_retval', @@ -7256,6 +7341,78 @@ 'memreg_infos_t_size', 'memreg_infos_t_swap', 'memreg_infos_t_truncate', + 'merge_data_t_add_event_handler', + 'merge_data_t_base_id', + 'merge_data_t_compare_merging_tifs', + 'merge_data_t_dbctx_ids_get', + 'merge_data_t_dbctx_ids_set', + 'merge_data_t_ev_handlers_get', + 'merge_data_t_ev_handlers_set', + 'merge_data_t_get_block_head', + 'merge_data_t_has_existing_node', + 'merge_data_t_item_block_locator_get', + 'merge_data_t_item_block_locator_set', + 'merge_data_t_last_udt_related_merger_get', + 'merge_data_t_last_udt_related_merger_set', + 'merge_data_t_local_id', + 'merge_data_t_map_privrange_id', + 'merge_data_t_map_tinfo', + 'merge_data_t_nbases_get', + 'merge_data_t_nbases_set', + 'merge_data_t_remote_id', + 'merge_data_t_remove_event_handler', + 'merge_data_t_set_dbctx_ids', + 'merge_data_t_setup_blocks', + 'merge_handler_params_t_insert_after_get', + 'merge_handler_params_t_insert_after_set', + 'merge_handler_params_t_kind_get', + 'merge_handler_params_t_kind_set', + 'merge_handler_params_t_label_get', + 'merge_handler_params_t_label_set', + 'merge_handler_params_t_md_get', + 'merge_handler_params_t_mh_flags_get', + 'merge_handler_params_t_mh_flags_set', + 'merge_handler_params_t_ui_complex_details', + 'merge_handler_params_t_ui_complex_details__SWIG_0', + 'merge_handler_params_t_ui_complex_details__SWIG_1', + 'merge_handler_params_t_ui_complex_name', + 'merge_handler_params_t_ui_complex_name__SWIG_0', + 'merge_handler_params_t_ui_complex_name__SWIG_1', + 'merge_handler_params_t_ui_dp_shortname', + 'merge_handler_params_t_ui_dp_shortname__SWIG_0', + 'merge_handler_params_t_ui_dp_shortname__SWIG_1', + 'merge_handler_params_t_ui_has_details', + 'merge_handler_params_t_ui_has_details__SWIG_0', + 'merge_handler_params_t_ui_has_details__SWIG_1', + 'merge_handler_params_t_ui_indent', + 'merge_handler_params_t_ui_indent__SWIG_0', + 'merge_handler_params_t_ui_indent__SWIG_1', + 'merge_handler_params_t_ui_linediff', + 'merge_handler_params_t_ui_linediff__SWIG_0', + 'merge_handler_params_t_ui_linediff__SWIG_1', + 'merge_handler_params_t_ui_split_char', + 'merge_handler_params_t_ui_split_char__SWIG_0', + 'merge_handler_params_t_ui_split_char__SWIG_1', + 'merge_handler_params_t_ui_split_str', + 'merge_handler_params_t_ui_split_str__SWIG_0', + 'merge_handler_params_t_ui_split_str__SWIG_1', + 'merge_node_helper_t_append_eavec', + 'merge_node_helper_t_get_column_headers', + 'merge_node_helper_t_get_netnode', + 'merge_node_helper_t_is_mergeable', + 'merge_node_helper_t_map_scalar', + 'merge_node_helper_t_map_string', + 'merge_node_helper_t_print_entry_details', + 'merge_node_helper_t_print_entry_name', + 'merge_node_helper_t_refresh', + 'merge_node_info_t_name_get', + 'merge_node_info_t_name_set', + 'merge_node_info_t_nds_flags_get', + 'merge_node_info_t_nds_flags_set', + 'merge_node_info_t_node_helper_get', + 'merge_node_info_t_node_helper_set', + 'merge_node_info_t_tag_get', + 'merge_node_info_t_tag_set', 'metadata_iterator_t_data_end', 'metadata_iterator_t_data_get', 'metadata_iterator_t_data_set', @@ -7336,7 +7493,7 @@ 'minsn_t_l_set', 'minsn_t_lexcompare', 'minsn_t_may_use_aliased_memory', - 'minsn_t_modifes_d', + 'minsn_t_modifies_d', 'minsn_t_modifies_pair_mop', 'minsn_t_next_get', 'minsn_t_next_set', @@ -7425,6 +7582,17 @@ 'mnumber_t_update_value', 'mnumber_t_value_get', 'mnumber_t_value_set', + 'moddata_diff_helper_t_fields_get', + 'moddata_diff_helper_t_fields_set', + 'moddata_diff_helper_t_get_struc_ptr', + 'moddata_diff_helper_t_merge_ending', + 'moddata_diff_helper_t_merge_starting', + 'moddata_diff_helper_t_module_name_get', + 'moddata_diff_helper_t_module_name_set', + 'moddata_diff_helper_t_netnode_name_get', + 'moddata_diff_helper_t_netnode_name_set', + 'moddata_diff_helper_t_nfields_get', + 'moddata_diff_helper_t_nfields_set', 'modify_user_lvar_info', 'modify_user_lvars', 'modinfo_t_base_get', @@ -7963,6 +8131,7 @@ 'new_channel_redir_t', 'new_choose_ioport_parser_t', 'new_chooser_item_attrs_t', + 'new_chooser_stdact_desc_t', 'new_cif_t', 'new_cif_t__SWIG_0', 'new_cif_t__SWIG_1', @@ -8052,7 +8221,6 @@ 'new_edge_layout_point_t', 'new_edge_layout_point_t__SWIG_0', 'new_edge_layout_point_t__SWIG_1', - 'new_edge_layout_point_t__SWIG_2', 'new_edge_segment_t', 'new_edge_t', 'new_edge_t__SWIG_0', @@ -8148,6 +8316,8 @@ 'new_history_item_t__SWIG_1', 'new_history_t', 'new_ida_lowertype_helper_t', + 'new_idbattr_info_t', + 'new_idbattr_valmap_t', 'new_idc_global_t', 'new_idc_global_t__SWIG_0', 'new_idc_global_t__SWIG_1', @@ -8176,6 +8346,9 @@ 'new_insn_site_t', 'new_insn_t', 'new_instant_dbgopts_t', + 'new_int64vec_t', + 'new_int64vec_t__SWIG_0', + 'new_int64vec_t__SWIG_1', 'new_int_pointer', 'new_interval_t', 'new_interval_t__SWIG_0', @@ -8185,6 +8358,7 @@ 'new_intvec_t__SWIG_0', 'new_intvec_t__SWIG_1', 'new_ioports_fallback_t', + 'new_item_block_locator_t', 'new_iterator', 'new_ivl_t', 'new_ivl_with_name_t', @@ -8209,9 +8383,6 @@ 'new_lochist_t', 'new_lock_func', 'new_lock_segment', - 'new_longlongvec_t', - 'new_longlongvec_t__SWIG_0', - 'new_longlongvec_t__SWIG_1', 'new_lumina_op_res_vec_t', 'new_lumina_op_res_vec_t__SWIG_0', 'new_lumina_op_res_vec_t__SWIG_1', @@ -8252,6 +8423,9 @@ 'new_memreg_infos_t', 'new_memreg_infos_t__SWIG_0', 'new_memreg_infos_t__SWIG_1', + 'new_merge_handler_params_t', + 'new_merge_node_helper_t', + 'new_merge_node_info_t', 'new_metadata_iterator_t', 'new_microcode_filter_t', 'new_minsn_t', @@ -8264,6 +8438,7 @@ 'new_mlist_t__SWIG_1', 'new_mlist_t__SWIG_2', 'new_mnumber_t', + 'new_moddata_diff_helper_t', 'new_modinfo_t', 'new_mop_addr_t', 'new_mop_addr_t__SWIG_0', @@ -8289,6 +8464,7 @@ 'new_node_ordering_t', 'new_num_range_t', 'new_number_format_t', + 'new_octet_generator_t', 'new_op_parent_info_t', 'new_op_t', 'new_operand_locator_t', @@ -8422,6 +8598,7 @@ 'new_segm_move_info_vec_t__SWIG_0', 'new_segm_move_info_vec_t__SWIG_1', 'new_segm_move_infos_t', + 'new_segment_defsr_array', 'new_segment_t', 'new_seh_t', 'new_sel_array', @@ -8530,12 +8707,12 @@ 'new_ui_stroff_ops_t', 'new_ui_stroff_ops_t__SWIG_0', 'new_ui_stroff_ops_t__SWIG_1', + 'new_uint64vec_t', + 'new_uint64vec_t__SWIG_0', + 'new_uint64vec_t__SWIG_1', 'new_uintvec_t', 'new_uintvec_t__SWIG_0', 'new_uintvec_t__SWIG_1', - 'new_ulonglongvec_t', - 'new_ulonglongvec_t__SWIG_0', - 'new_ulonglongvec_t__SWIG_1', 'new_user_cmts_iterator_t', 'new_user_cmts_t', 'new_user_defined_prefix_t', @@ -8700,6 +8877,15 @@ 'number_format_t_type_name_get', 'number_format_t_type_name_set', 'oct_flag', + 'octet_generator_t_avail_bits_get', + 'octet_generator_t_avail_bits_set', + 'octet_generator_t_ea_get', + 'octet_generator_t_ea_set', + 'octet_generator_t_high_byte_first_get', + 'octet_generator_t_high_byte_first_set', + 'octet_generator_t_invert_byte_order', + 'octet_generator_t_value_get', + 'octet_generator_t_value_set', 'off_flag', 'op_adds_xrefs', 'op_bin', @@ -10291,6 +10477,13 @@ 'segm_move_info_vec_t_swap', 'segm_move_info_vec_t_truncate', 'segm_move_infos_t_find', + 'segment_defsr_array___getitem__', + 'segment_defsr_array___len__', + 'segment_defsr_array___setitem__', + 'segment_defsr_array__get_bytes', + 'segment_defsr_array__set_bytes', + 'segment_defsr_array_data_get', + 'segment_t___getDefsr', 'segment_t_abits', 'segment_t_abytes', 'segment_t_align_get', @@ -10481,7 +10674,6 @@ 'set_member_name', 'set_member_tinfo', 'set_member_type', - 'set_module_data', 'set_name', 'set_nav_colorizer', 'set_node_info', @@ -10505,6 +10697,7 @@ 'set_reg_val', 'set_reg_val__SWIG_0', 'set_reg_val__SWIG_1', + 'set_registry_root', 'set_regvar_cmt', 'set_remote_debugger', 'set_resume_mode', @@ -11690,6 +11883,45 @@ 'ui_stroff_ops_t_size', 'ui_stroff_ops_t_swap', 'ui_stroff_ops_t_truncate', + 'uint64vec_t___eq__', + 'uint64vec_t___getitem__', + 'uint64vec_t___len__', + 'uint64vec_t___ne__', + 'uint64vec_t___setitem__', + 'uint64vec_t__del', + 'uint64vec_t_add_unique', + 'uint64vec_t_at', + 'uint64vec_t_begin', + 'uint64vec_t_begin__SWIG_0', + 'uint64vec_t_begin__SWIG_1', + 'uint64vec_t_capacity', + 'uint64vec_t_clear', + 'uint64vec_t_empty', + 'uint64vec_t_end', + 'uint64vec_t_end__SWIG_0', + 'uint64vec_t_end__SWIG_1', + 'uint64vec_t_erase', + 'uint64vec_t_erase__SWIG_0', + 'uint64vec_t_erase__SWIG_1', + 'uint64vec_t_extract', + 'uint64vec_t_find', + 'uint64vec_t_find__SWIG_0', + 'uint64vec_t_find__SWIG_1', + 'uint64vec_t_has', + 'uint64vec_t_inject', + 'uint64vec_t_insert', + 'uint64vec_t_pop_back', + 'uint64vec_t_push_back', + 'uint64vec_t_push_back__SWIG_0', + 'uint64vec_t_push_back__SWIG_1', + 'uint64vec_t_qclear', + 'uint64vec_t_reserve', + 'uint64vec_t_resize', + 'uint64vec_t_resize__SWIG_0', + 'uint64vec_t_resize__SWIG_1', + 'uint64vec_t_size', + 'uint64vec_t_swap', + 'uint64vec_t_truncate', 'uintvec_t___eq__', 'uintvec_t___getitem__', 'uintvec_t___len__', @@ -11729,45 +11961,6 @@ 'uintvec_t_size', 'uintvec_t_swap', 'uintvec_t_truncate', - 'ulonglongvec_t___eq__', - 'ulonglongvec_t___getitem__', - 'ulonglongvec_t___len__', - 'ulonglongvec_t___ne__', - 'ulonglongvec_t___setitem__', - 'ulonglongvec_t__del', - 'ulonglongvec_t_add_unique', - 'ulonglongvec_t_at', - 'ulonglongvec_t_begin', - 'ulonglongvec_t_begin__SWIG_0', - 'ulonglongvec_t_begin__SWIG_1', - 'ulonglongvec_t_capacity', - 'ulonglongvec_t_clear', - 'ulonglongvec_t_empty', - 'ulonglongvec_t_end', - 'ulonglongvec_t_end__SWIG_0', - 'ulonglongvec_t_end__SWIG_1', - 'ulonglongvec_t_erase', - 'ulonglongvec_t_erase__SWIG_0', - 'ulonglongvec_t_erase__SWIG_1', - 'ulonglongvec_t_extract', - 'ulonglongvec_t_find', - 'ulonglongvec_t_find__SWIG_0', - 'ulonglongvec_t_find__SWIG_1', - 'ulonglongvec_t_has', - 'ulonglongvec_t_inject', - 'ulonglongvec_t_insert', - 'ulonglongvec_t_pop_back', - 'ulonglongvec_t_push_back', - 'ulonglongvec_t_push_back__SWIG_0', - 'ulonglongvec_t_push_back__SWIG_1', - 'ulonglongvec_t_qclear', - 'ulonglongvec_t_reserve', - 'ulonglongvec_t_resize', - 'ulonglongvec_t_resize__SWIG_0', - 'ulonglongvec_t_resize__SWIG_1', - 'ulonglongvec_t_size', - 'ulonglongvec_t_swap', - 'ulonglongvec_t_truncate', 'unhide_border', 'unhide_item', 'unmark_selection', diff --git a/api_contents2.txt b/api_contents_pro3.txt similarity index 98% rename from api_contents2.txt rename to api_contents_pro3.txt index 617967e..6247030 100644 --- a/api_contents2.txt +++ b/api_contents_pro3.txt @@ -1925,6 +1925,15 @@ 'chooser_item_attrs_t_flags_get', 'chooser_item_attrs_t_flags_set', 'chooser_item_attrs_t_reset', + 'chooser_stdact_desc_t_icon_get', + 'chooser_stdact_desc_t_icon_set', + 'chooser_stdact_desc_t_label_get', + 'chooser_stdact_desc_t_label_set', + 'chooser_stdact_desc_t_tooltip_get', + 'chooser_stdact_desc_t_tooltip_set', + 'chooser_stdact_desc_t_ucb', + 'chooser_stdact_desc_t_version_get', + 'chooser_stdact_desc_t_version_set', 'chunk_size', 'chunk_start', 'cif_t___eq__', @@ -2132,7 +2141,6 @@ 'clr_lzero', 'clr_lzero0', 'clr_lzero1', - 'clr_module_data', 'clr_node_info', 'clr_noret', 'clr_notcode', @@ -2698,6 +2706,7 @@ 'delete_channel_redir_t', 'delete_choose_ioport_parser_t', 'delete_chooser_item_attrs_t', + 'delete_chooser_stdact_desc_t', 'delete_cif_t', 'delete_cinsn_list_t', 'delete_cinsn_list_t_iterator', @@ -2831,6 +2840,7 @@ 'delete_insn_site_t', 'delete_insn_t', 'delete_instant_dbgopts_t', + 'delete_int64vec_t', 'delete_int_pointer', 'delete_interval_t', 'delete_intvec_t', @@ -2850,7 +2860,6 @@ 'delete_lochist_t', 'delete_lock_func', 'delete_lock_segment', - 'delete_longlongvec_t', 'delete_lowertype_helper_t', 'delete_lumina_client_t', 'delete_lumina_op_res_vec_t', @@ -2901,6 +2910,7 @@ 'delete_node_ordering_t', 'delete_num_range_t', 'delete_number_format_t', + 'delete_octet_generator_t', 'delete_op_parent_info_t', 'delete_op_t', 'delete_operand_locator_t', @@ -2979,6 +2989,7 @@ 'delete_segm_move_info_t', 'delete_segm_move_info_vec_t', 'delete_segm_move_infos_t', + 'delete_segment_defsr_array', 'delete_segment_t', 'delete_seh_t', 'delete_sel_array', @@ -3050,8 +3061,8 @@ 'delete_ui_stroff_applicator_t', 'delete_ui_stroff_op_t', 'delete_ui_stroff_ops_t', + 'delete_uint64vec_t', 'delete_uintvec_t', - 'delete_ulonglongvec_t', 'delete_unreferenced_stkvars', 'delete_user_cmts_iterator_t', 'delete_user_cmts_t', @@ -3322,6 +3333,7 @@ 'disown_cfunc_parentee_t', 'disown_chain_visitor_t', 'disown_choose_ioport_parser_t', + 'disown_chooser_stdact_desc_t', 'disown_const_aloc_visitor_t', 'disown_ctree_parentee_t', 'disown_ctree_visitor_t', @@ -3439,7 +3451,6 @@ 'ea_pointer_cast', 'ea_pointer_frompointer', 'ea_pointer_value', - 'ea_to_ea64', 'ea_viewer_history_push_and_jump', 'eamap_begin', 'eamap_clear', @@ -3750,6 +3761,7 @@ 'find_data', 'find_defined', 'find_error', + 'find_free_chunk', 'find_free_selector', 'find_func_bounds', 'find_idc_class', @@ -4626,7 +4638,6 @@ 'get_member_type', 'get_merror_desc', 'get_min_spd_ea', - 'get_module_data', 'get_module_info', 'get_mreg_name', 'get_name', @@ -4666,6 +4677,7 @@ 'get_numbered_type', 'get_numbered_type_name', 'get_octet', + 'get_octet2', 'get_offbase', 'get_offset_expr', 'get_offset_expression', @@ -5796,6 +5808,45 @@ 'instant_dbgopts_t_pid_set', 'instant_dbgopts_t_port_get', 'instant_dbgopts_t_port_set', + 'int64vec_t___eq__', + 'int64vec_t___getitem__', + 'int64vec_t___len__', + 'int64vec_t___ne__', + 'int64vec_t___setitem__', + 'int64vec_t__del', + 'int64vec_t_add_unique', + 'int64vec_t_at', + 'int64vec_t_begin', + 'int64vec_t_begin__SWIG_0', + 'int64vec_t_begin__SWIG_1', + 'int64vec_t_capacity', + 'int64vec_t_clear', + 'int64vec_t_empty', + 'int64vec_t_end', + 'int64vec_t_end__SWIG_0', + 'int64vec_t_end__SWIG_1', + 'int64vec_t_erase', + 'int64vec_t_erase__SWIG_0', + 'int64vec_t_erase__SWIG_1', + 'int64vec_t_extract', + 'int64vec_t_find', + 'int64vec_t_find__SWIG_0', + 'int64vec_t_find__SWIG_1', + 'int64vec_t_has', + 'int64vec_t_inject', + 'int64vec_t_insert', + 'int64vec_t_pop_back', + 'int64vec_t_push_back', + 'int64vec_t_push_back__SWIG_0', + 'int64vec_t_push_back__SWIG_1', + 'int64vec_t_qclear', + 'int64vec_t_reserve', + 'int64vec_t_resize', + 'int64vec_t_resize__SWIG_0', + 'int64vec_t_resize__SWIG_1', + 'int64vec_t_size', + 'int64vec_t_swap', + 'int64vec_t_truncate', 'int_pointer_assign', 'int_pointer_cast', 'int_pointer_frompointer', @@ -6138,6 +6189,7 @@ 'is_usersp', 'is_userti', 'is_valid_cp', + 'is_valid_dstate', 'is_valid_trace_file', 'is_valid_typename', 'is_vararg_cc', @@ -6313,7 +6365,7 @@ 'loader_input_t_from_capsule', 'loader_input_t_from_fp', 'loader_input_t_from_linput', - 'loader_input_t_get_char', + 'loader_input_t_get_byte', 'loader_input_t_get_linput', 'loader_input_t_gets', 'loader_input_t_getz', @@ -6365,45 +6417,6 @@ 'lock_segm', 'log2ceil', 'log2floor', - 'longlongvec_t___eq__', - 'longlongvec_t___getitem__', - 'longlongvec_t___len__', - 'longlongvec_t___ne__', - 'longlongvec_t___setitem__', - 'longlongvec_t__del', - 'longlongvec_t_add_unique', - 'longlongvec_t_at', - 'longlongvec_t_begin', - 'longlongvec_t_begin__SWIG_0', - 'longlongvec_t_begin__SWIG_1', - 'longlongvec_t_capacity', - 'longlongvec_t_clear', - 'longlongvec_t_empty', - 'longlongvec_t_end', - 'longlongvec_t_end__SWIG_0', - 'longlongvec_t_end__SWIG_1', - 'longlongvec_t_erase', - 'longlongvec_t_erase__SWIG_0', - 'longlongvec_t_erase__SWIG_1', - 'longlongvec_t_extract', - 'longlongvec_t_find', - 'longlongvec_t_find__SWIG_0', - 'longlongvec_t_find__SWIG_1', - 'longlongvec_t_has', - 'longlongvec_t_inject', - 'longlongvec_t_insert', - 'longlongvec_t_pop_back', - 'longlongvec_t_push_back', - 'longlongvec_t_push_back__SWIG_0', - 'longlongvec_t_push_back__SWIG_1', - 'longlongvec_t_qclear', - 'longlongvec_t_reserve', - 'longlongvec_t_resize', - 'longlongvec_t_resize__SWIG_0', - 'longlongvec_t_resize__SWIG_1', - 'longlongvec_t_size', - 'longlongvec_t_swap', - 'longlongvec_t_truncate', 'lookup_key_code', 'lower_type', 'lowertype_helper_t_func_has_stkframe_hole', @@ -6596,6 +6609,7 @@ 'lvar_t_clr_noptr_var', 'lvar_t_clr_notarg', 'lvar_t_clr_overlapped_var', + 'lvar_t_clr_shared', 'lvar_t_clr_spoiled_var', 'lvar_t_clr_thisarg', 'lvar_t_clr_unknown_width', @@ -6630,6 +6644,7 @@ 'lvar_t_is_notarg', 'lvar_t_is_overlapped_var', 'lvar_t_is_result_var', + 'lvar_t_is_shared', 'lvar_t_is_spoiled_var', 'lvar_t_is_thisarg', 'lvar_t_is_unknown_width', @@ -6652,6 +6667,7 @@ 'lvar_t_set_noptr_var', 'lvar_t_set_notarg', 'lvar_t_set_overlapped_var', + 'lvar_t_set_shared', 'lvar_t_set_spoiled_var', 'lvar_t_set_thisarg', 'lvar_t_set_typed', @@ -6820,6 +6836,7 @@ 'mba_t_gotoff_stkvars_set', 'mba_t_graph_insns', 'mba_t_has_bad_sp', + 'mba_t_has_outlines', 'mba_t_has_over_chains', 'mba_t_has_passregs', 'mba_t_has_stack_retval', @@ -7336,7 +7353,7 @@ 'minsn_t_l_set', 'minsn_t_lexcompare', 'minsn_t_may_use_aliased_memory', - 'minsn_t_modifes_d', + 'minsn_t_modifies_d', 'minsn_t_modifies_pair_mop', 'minsn_t_next_get', 'minsn_t_next_set', @@ -7827,7 +7844,11 @@ 'netnode_supprev', 'netnode_supprev_idx8', 'netnode_supset', + 'netnode_supset__SWIG_0', + 'netnode_supset__SWIG_1', 'netnode_supset_ea', + 'netnode_supset_ea__SWIG_0', + 'netnode_supset_ea__SWIG_1', 'netnode_supset_idx8', 'netnode_supshift', 'netnode_supstr', @@ -7959,6 +7980,7 @@ 'new_channel_redir_t', 'new_choose_ioport_parser_t', 'new_chooser_item_attrs_t', + 'new_chooser_stdact_desc_t', 'new_cif_t', 'new_cif_t__SWIG_0', 'new_cif_t__SWIG_1', @@ -8048,7 +8070,6 @@ 'new_edge_layout_point_t', 'new_edge_layout_point_t__SWIG_0', 'new_edge_layout_point_t__SWIG_1', - 'new_edge_layout_point_t__SWIG_2', 'new_edge_segment_t', 'new_edge_t', 'new_edge_t__SWIG_0', @@ -8172,6 +8193,9 @@ 'new_insn_site_t', 'new_insn_t', 'new_instant_dbgopts_t', + 'new_int64vec_t', + 'new_int64vec_t__SWIG_0', + 'new_int64vec_t__SWIG_1', 'new_int_pointer', 'new_interval_t', 'new_interval_t__SWIG_0', @@ -8205,9 +8229,6 @@ 'new_lochist_t', 'new_lock_func', 'new_lock_segment', - 'new_longlongvec_t', - 'new_longlongvec_t__SWIG_0', - 'new_longlongvec_t__SWIG_1', 'new_lumina_op_res_vec_t', 'new_lumina_op_res_vec_t__SWIG_0', 'new_lumina_op_res_vec_t__SWIG_1', @@ -8285,6 +8306,7 @@ 'new_node_ordering_t', 'new_num_range_t', 'new_number_format_t', + 'new_octet_generator_t', 'new_op_parent_info_t', 'new_op_t', 'new_operand_locator_t', @@ -8418,6 +8440,7 @@ 'new_segm_move_info_vec_t__SWIG_0', 'new_segm_move_info_vec_t__SWIG_1', 'new_segm_move_infos_t', + 'new_segment_defsr_array', 'new_segment_t', 'new_seh_t', 'new_sel_array', @@ -8526,12 +8549,12 @@ 'new_ui_stroff_ops_t', 'new_ui_stroff_ops_t__SWIG_0', 'new_ui_stroff_ops_t__SWIG_1', + 'new_uint64vec_t', + 'new_uint64vec_t__SWIG_0', + 'new_uint64vec_t__SWIG_1', 'new_uintvec_t', 'new_uintvec_t__SWIG_0', 'new_uintvec_t__SWIG_1', - 'new_ulonglongvec_t', - 'new_ulonglongvec_t__SWIG_0', - 'new_ulonglongvec_t__SWIG_1', 'new_user_cmts_iterator_t', 'new_user_cmts_t', 'new_user_defined_prefix_t', @@ -8696,6 +8719,15 @@ 'number_format_t_type_name_get', 'number_format_t_type_name_set', 'oct_flag', + 'octet_generator_t_avail_bits_get', + 'octet_generator_t_avail_bits_set', + 'octet_generator_t_ea_get', + 'octet_generator_t_ea_set', + 'octet_generator_t_high_byte_first_get', + 'octet_generator_t_high_byte_first_set', + 'octet_generator_t_invert_byte_order', + 'octet_generator_t_value_get', + 'octet_generator_t_value_set', 'off_flag', 'op_adds_xrefs', 'op_bin', @@ -9305,12 +9337,12 @@ 'qfile_t_flush', 'qfile_t_from_capsule', 'qfile_t_from_fp', - 'qfile_t_get_char', + 'qfile_t_get_byte', 'qfile_t_get_fp', 'qfile_t_gets', 'qfile_t_open', 'qfile_t_opened', - 'qfile_t_put_char', + 'qfile_t_put_byte', 'qfile_t_puts', 'qfile_t_read', 'qfile_t_readbytes', @@ -10287,6 +10319,13 @@ 'segm_move_info_vec_t_swap', 'segm_move_info_vec_t_truncate', 'segm_move_infos_t_find', + 'segment_defsr_array___getitem__', + 'segment_defsr_array___len__', + 'segment_defsr_array___setitem__', + 'segment_defsr_array__get_bytes', + 'segment_defsr_array__set_bytes', + 'segment_defsr_array_data_get', + 'segment_t___getDefsr', 'segment_t_abits', 'segment_t_abytes', 'segment_t_align_get', @@ -10477,7 +10516,6 @@ 'set_member_name', 'set_member_tinfo', 'set_member_type', - 'set_module_data', 'set_name', 'set_nav_colorizer', 'set_node_info', @@ -10501,6 +10539,7 @@ 'set_reg_val', 'set_reg_val__SWIG_0', 'set_reg_val__SWIG_1', + 'set_registry_root', 'set_regvar_cmt', 'set_remote_debugger', 'set_resume_mode', @@ -11686,6 +11725,45 @@ 'ui_stroff_ops_t_size', 'ui_stroff_ops_t_swap', 'ui_stroff_ops_t_truncate', + 'uint64vec_t___eq__', + 'uint64vec_t___getitem__', + 'uint64vec_t___len__', + 'uint64vec_t___ne__', + 'uint64vec_t___setitem__', + 'uint64vec_t__del', + 'uint64vec_t_add_unique', + 'uint64vec_t_at', + 'uint64vec_t_begin', + 'uint64vec_t_begin__SWIG_0', + 'uint64vec_t_begin__SWIG_1', + 'uint64vec_t_capacity', + 'uint64vec_t_clear', + 'uint64vec_t_empty', + 'uint64vec_t_end', + 'uint64vec_t_end__SWIG_0', + 'uint64vec_t_end__SWIG_1', + 'uint64vec_t_erase', + 'uint64vec_t_erase__SWIG_0', + 'uint64vec_t_erase__SWIG_1', + 'uint64vec_t_extract', + 'uint64vec_t_find', + 'uint64vec_t_find__SWIG_0', + 'uint64vec_t_find__SWIG_1', + 'uint64vec_t_has', + 'uint64vec_t_inject', + 'uint64vec_t_insert', + 'uint64vec_t_pop_back', + 'uint64vec_t_push_back', + 'uint64vec_t_push_back__SWIG_0', + 'uint64vec_t_push_back__SWIG_1', + 'uint64vec_t_qclear', + 'uint64vec_t_reserve', + 'uint64vec_t_resize', + 'uint64vec_t_resize__SWIG_0', + 'uint64vec_t_resize__SWIG_1', + 'uint64vec_t_size', + 'uint64vec_t_swap', + 'uint64vec_t_truncate', 'uintvec_t___eq__', 'uintvec_t___getitem__', 'uintvec_t___len__', @@ -11725,45 +11803,6 @@ 'uintvec_t_size', 'uintvec_t_swap', 'uintvec_t_truncate', - 'ulonglongvec_t___eq__', - 'ulonglongvec_t___getitem__', - 'ulonglongvec_t___len__', - 'ulonglongvec_t___ne__', - 'ulonglongvec_t___setitem__', - 'ulonglongvec_t__del', - 'ulonglongvec_t_add_unique', - 'ulonglongvec_t_at', - 'ulonglongvec_t_begin', - 'ulonglongvec_t_begin__SWIG_0', - 'ulonglongvec_t_begin__SWIG_1', - 'ulonglongvec_t_capacity', - 'ulonglongvec_t_clear', - 'ulonglongvec_t_empty', - 'ulonglongvec_t_end', - 'ulonglongvec_t_end__SWIG_0', - 'ulonglongvec_t_end__SWIG_1', - 'ulonglongvec_t_erase', - 'ulonglongvec_t_erase__SWIG_0', - 'ulonglongvec_t_erase__SWIG_1', - 'ulonglongvec_t_extract', - 'ulonglongvec_t_find', - 'ulonglongvec_t_find__SWIG_0', - 'ulonglongvec_t_find__SWIG_1', - 'ulonglongvec_t_has', - 'ulonglongvec_t_inject', - 'ulonglongvec_t_insert', - 'ulonglongvec_t_pop_back', - 'ulonglongvec_t_push_back', - 'ulonglongvec_t_push_back__SWIG_0', - 'ulonglongvec_t_push_back__SWIG_1', - 'ulonglongvec_t_qclear', - 'ulonglongvec_t_reserve', - 'ulonglongvec_t_resize', - 'ulonglongvec_t_resize__SWIG_0', - 'ulonglongvec_t_resize__SWIG_1', - 'ulonglongvec_t_size', - 'ulonglongvec_t_swap', - 'ulonglongvec_t_truncate', 'unhide_border', 'unhide_item', 'unmark_selection', diff --git a/build.py b/build.py index 0884956..976c053 100644 --- a/build.py +++ b/build.py @@ -21,19 +21,19 @@ had to build/install it yourself, you will have to specify '--swig-home'. What follows, are example build commands -### Windows (assume SWiG is installed in C:\swigwin-2.0.12, and IDA is in C:\Program Files\IDA7) +### Windows (assume SWiG is installed in C:\swigwin-4.0.1, and IDA is in C:\Program Files\IDA8) - python2 build.py \\ + python3 build.py \\ --with-hexrays \\ - --swig-home C:/swigwin-2.0.12 \\ - --ida-install "c:/Program\ Files/IDA_7.0-171130-tests" + --swig-home C:/swigwin-4.0.1 \\ + --ida-install "c:/Program\ Files/IDA_8.0" -### Linux/OSX (assume SWiG is installed in /opt/swiglinux-2.0.12, and IDA is in /opt/my-ida-install) +### Linux/OSX (assume SWiG is installed in /opt/swiglinux-4.0.1, and IDA is in /opt/my-ida-install) - python2 build.py \\ + python3 build.py \\ --with-hexrays \\ - --swig-home /opt/swiglinux-2.0.12 \\ + --swig-home /opt/swiglinux-4.0.1 \\ --ida-install /opt/my-ida-install """, formatter_class=argparse.RawTextHelpFormatter) diff --git a/docs/howto/swig.md b/docs/howto/swig.md new file mode 100644 index 0000000..0523ed5 --- /dev/null +++ b/docs/howto/swig.md @@ -0,0 +1,66 @@ + +This is an FAQ-style repository of SWiG incantations that are +regularly needed. + +# Remove an argument from a prototype (because it doesn't make sense in the context of IDAPython) + + %typemap(in,numinputs=0) int length + { + $1 = -1; // always -1 in IDAPython + } + +# Add a parameter to a C++ notification + +Assume a notification named `struc_renamed`, to which you just +added a `bool success` parameter (to carry along information about the +operation's success so far): + + struc_renamed, ///< A structure type has been renamed. + ///< \param sptr (::struc_t *) + ///< \param success (bool) // <--------- new + +That new parameter will be picked up by the hooks-producing code +automatically (great!), which means existing hooks are now broken +(bad.) + +We need to add support for calling into "old-style" hooks. That's done +through the `patch_codegen.py` mechanism, and in particular the +`director_method_call_arity_cap` rule. Something like this should do: + + "SwigDirector_IDB_Hooks::struc_renamed" : [ + ("director_method_call_arity_cap", ( + False, # add GIL lock + "struc_renamed", + "(method ,(PyObject *)obj0,(__argcnt < 3 ? nullptr : (PyObject *)obj1), nullptr)", + "(swig_get_self(), (PyObject *) swig_method_name ,(PyObject *)obj0,(__argcnt < 3 ? nullptr : (PyObject *)obj1), nullptr)") + )), + ], + +# Handle a virtual method's "output" parameter in a director + +Assume you have a virtual method taking an 'output' argument: + + void merge_node_helper_t::get_column_headers(qstrvec_t *out, ...) + +The neat thing to do here is to let Python implementations do the +following: + + def get_column_headers(self, ...): + # ... + return ["Name", "Address"] + +To achieve that, you want to use the `directorargout` typemap: + + %typemap(directorargout) qstrvec_t * (qstrvec_t tmp) + { // %typemap(directorargout) qstrvec_t * + if ( PyW_PyListToStrVec(&tmp, $result) >= 0 ) + { + $1->swap(tmp); + } + else + { + Swig::DirectorTypeMismatchException::raise( + SWIG_ErrorType(SWIG_TypeError), + "in output value of type 'qstrvec_t' in method '$symname'"); + } + } diff --git a/examples/analysis/dump_func_info.py b/examples/analysis/dump_func_info.py index bd4c823..4e327cc 100644 --- a/examples/analysis/dump_func_info.py +++ b/examples/analysis/dump_func_info.py @@ -25,6 +25,8 @@ def dump_flags(fn): print(" Thunk function") if fn.flags & ida_funcs.FUNC_LUMINA: print(" Function info is provided by Lumina") + if fn.flags & ida_funcs.FUNC_OUTLINE: + print(" Outlined code, not a real function") def dump_regvars(pfn): diff --git a/examples/core/list_strings.py b/examples/core/list_strings.py index 1b14976..3032a01 100644 --- a/examples/core/list_strings.py +++ b/examples/core/list_strings.py @@ -10,12 +10,13 @@ see_also: show_selected_strings """ from __future__ import print_function +import ida_nalt import idautils s = idautils.Strings(False) -s.setup(strtypes=Strings.STR_UNICODE | Strings.STR_C) +s.setup(strtypes=[ida_nalt.STRTYPE_C, ida_nalt.STRTYPE_C_16]) for i, v in enumerate(s): if v is None: print("Failed to retrieve string index %d" % i) else: - print("%x: len=%d type=%d index=%d-> '%s'" % (v.ea, v.length, v.type, i, str(v))) + print("%x: len=%d type=0x%x index=%d-> '%s'" % (v.ea, v.length, v.strtype, i, str(v))) diff --git a/examples/idbhooks/log_idb_events.py b/examples/idbhooks/log_idb_events.py index e7aa36c..e05bdf7 100644 --- a/examples/idbhooks/log_idb_events.py +++ b/examples/idbhooks/log_idb_events.py @@ -322,7 +322,7 @@ class idb_logger_hooks_t(ida_idp.IDB_Hooks): def struc_member_renamed(self, sptr, mptr): return self._log() - def struc_renamed(self, sptr): + def struc_renamed(self, sptr, success): return self._log() def tail_owner_changed(self, tail, owner_func, old_owner): diff --git a/examples/index.html b/examples/index.html index 1be7a5a..068f5b8 100644 --- a/examples/index.html +++ b/examples/index.html @@ -68,6 +68,7 @@ the function we are currently looking at.