mirror of
https://github.com/idapython/src
synced 2026-06-08 14:47:00 +00:00
Backported fixes
This commit is contained in:
@@ -2844,10 +2844,6 @@
|
||||
'delete_optblock_t',
|
||||
'delete_optinsn_t',
|
||||
'delete_pattern_id_t',
|
||||
'delete_pkt_clean_db_t',
|
||||
'delete_pkt_debugctl_t',
|
||||
'delete_pkt_dump_md_result_t',
|
||||
'delete_pkt_dump_md_t',
|
||||
'delete_pkt_get_pop_result_t',
|
||||
'delete_pkt_get_pop_t',
|
||||
'delete_pkt_helo_t',
|
||||
@@ -8177,10 +8173,6 @@
|
||||
'new_optinsn_t',
|
||||
'new_packet',
|
||||
'new_pattern_id_t',
|
||||
'new_pkt_clean_db_t',
|
||||
'new_pkt_debugctl_t',
|
||||
'new_pkt_dump_md_result_t',
|
||||
'new_pkt_dump_md_t',
|
||||
'new_pkt_get_pop_result_t',
|
||||
'new_pkt_get_pop_t',
|
||||
'new_pkt_helo_t',
|
||||
@@ -8859,12 +8851,6 @@
|
||||
'ph_get_segreg_size',
|
||||
'ph_get_tbyte_size',
|
||||
'ph_get_version',
|
||||
'pkt_debugctl_t_args_get',
|
||||
'pkt_debugctl_t_args_set',
|
||||
'pkt_dump_md_result_t_contents_get',
|
||||
'pkt_dump_md_result_t_contents_set',
|
||||
'pkt_dump_md_t_sort_get',
|
||||
'pkt_dump_md_t_sort_set',
|
||||
'pkt_get_pop_result_t_results_get',
|
||||
'pkt_get_pop_result_t_results_set',
|
||||
'pkt_get_pop_t_nresults_get',
|
||||
|
||||
@@ -2844,10 +2844,6 @@
|
||||
'delete_optblock_t',
|
||||
'delete_optinsn_t',
|
||||
'delete_pattern_id_t',
|
||||
'delete_pkt_clean_db_t',
|
||||
'delete_pkt_debugctl_t',
|
||||
'delete_pkt_dump_md_result_t',
|
||||
'delete_pkt_dump_md_t',
|
||||
'delete_pkt_get_pop_result_t',
|
||||
'delete_pkt_get_pop_t',
|
||||
'delete_pkt_helo_t',
|
||||
@@ -8175,10 +8171,6 @@
|
||||
'new_optinsn_t',
|
||||
'new_packet',
|
||||
'new_pattern_id_t',
|
||||
'new_pkt_clean_db_t',
|
||||
'new_pkt_debugctl_t',
|
||||
'new_pkt_dump_md_result_t',
|
||||
'new_pkt_dump_md_t',
|
||||
'new_pkt_get_pop_result_t',
|
||||
'new_pkt_get_pop_t',
|
||||
'new_pkt_helo_t',
|
||||
@@ -8856,12 +8848,6 @@
|
||||
'ph_get_segreg_size',
|
||||
'ph_get_tbyte_size',
|
||||
'ph_get_version',
|
||||
'pkt_debugctl_t_args_get',
|
||||
'pkt_debugctl_t_args_set',
|
||||
'pkt_dump_md_result_t_contents_get',
|
||||
'pkt_dump_md_result_t_contents_set',
|
||||
'pkt_dump_md_t_sort_get',
|
||||
'pkt_dump_md_t_sort_set',
|
||||
'pkt_get_pop_result_t_results_get',
|
||||
'pkt_get_pop_result_t_results_set',
|
||||
'pkt_get_pop_t_nresults_get',
|
||||
|
||||
@@ -105,7 +105,7 @@ class hexrays_callback_info(object):
|
||||
|
||||
return
|
||||
|
||||
def invert_if(self, cfunc, insn):
|
||||
def invert_if(self, insn):
|
||||
|
||||
if insn.opname != 'if':
|
||||
return False
|
||||
@@ -168,12 +168,11 @@ class hexrays_callback_info(object):
|
||||
|
||||
def invert_if_event(self, vu):
|
||||
|
||||
cfunc = vu.cfunc.__deref__()
|
||||
i = self.find_if_statement(vu)
|
||||
if not i:
|
||||
return False
|
||||
|
||||
if self.invert_if(cfunc, i):
|
||||
if self.invert_if(i):
|
||||
vu.refresh_ctext()
|
||||
self.add_location(i.ea)
|
||||
|
||||
@@ -192,7 +191,7 @@ class hexrays_callback_info(object):
|
||||
def visit_insn(self, i):
|
||||
try:
|
||||
if i.op == ida_hexrays.cit_if and i.ea in self.inverter.stored:
|
||||
self.inverter.invert_if(self.cfunc, i)
|
||||
self.inverter.invert_if(i)
|
||||
except:
|
||||
traceback.print_exc()
|
||||
return 0 # continue enumeration
|
||||
|
||||
@@ -133,7 +133,7 @@ class XrefsForm(ida_kernwin.PluginForm):
|
||||
lines = []
|
||||
for stmt in insnvec:
|
||||
|
||||
qp = ida_hexrays.qstring_printer_t(cfunc.__deref__(), False)
|
||||
qp = ida_hexrays.qstring_printer_t(cfunc, False)
|
||||
|
||||
stmt._print(0, qp)
|
||||
s = qp.s.split('\n')[0]
|
||||
|
||||
Binary file not shown.
@@ -66640,135 +66640,6 @@ class pattern_id_t(__builtin__.object)
|
||||
| __swig_destroy__ = <built-in function delete_pattern_id_t>
|
||||
| delete_pattern_id_t(self)
|
||||
|
||||
Help on class pkt_clean_db_t in module ida_lumina:
|
||||
|
||||
class pkt_clean_db_t(__builtin__.object)
|
||||
| Proxy of C++ pkt_clean_db_t class.
|
||||
|
|
||||
| Methods defined here:
|
||||
|
|
||||
| __init__(self, *args)
|
||||
| __init__(self) -> pkt_clean_db_t
|
||||
|
|
||||
| __repr__ = _swig_repr(self)
|
||||
|
|
||||
| ----------------------------------------------------------------------
|
||||
| Data descriptors defined here:
|
||||
|
|
||||
| __dict__
|
||||
| dictionary for instance variables (if defined)
|
||||
|
|
||||
| __weakref__
|
||||
| list of weak references to the object (if defined)
|
||||
|
|
||||
| thisown
|
||||
| The membership flag
|
||||
|
|
||||
| ----------------------------------------------------------------------
|
||||
| Data and other attributes defined here:
|
||||
|
|
||||
| __swig_destroy__ = <built-in function delete_pkt_clean_db_t>
|
||||
| delete_pkt_clean_db_t(self)
|
||||
|
||||
Help on class pkt_debugctl_t in module ida_lumina:
|
||||
|
||||
class pkt_debugctl_t(__builtin__.object)
|
||||
| Proxy of C++ pkt_debugctl_t class.
|
||||
|
|
||||
| Methods defined here:
|
||||
|
|
||||
| __init__(self, *args)
|
||||
| __init__(self) -> pkt_debugctl_t
|
||||
|
|
||||
| __repr__ = _swig_repr(self)
|
||||
|
|
||||
| ----------------------------------------------------------------------
|
||||
| Data descriptors defined here:
|
||||
|
|
||||
| __dict__
|
||||
| dictionary for instance variables (if defined)
|
||||
|
|
||||
| __weakref__
|
||||
| list of weak references to the object (if defined)
|
||||
|
|
||||
| args
|
||||
| pkt_debugctl_t_args_get(self) -> qstrvec_t *
|
||||
|
|
||||
| thisown
|
||||
| The membership flag
|
||||
|
|
||||
| ----------------------------------------------------------------------
|
||||
| Data and other attributes defined here:
|
||||
|
|
||||
| __swig_destroy__ = <built-in function delete_pkt_debugctl_t>
|
||||
| delete_pkt_debugctl_t(self)
|
||||
|
||||
Help on class pkt_dump_md_result_t in module ida_lumina:
|
||||
|
||||
class pkt_dump_md_result_t(__builtin__.object)
|
||||
| Proxy of C++ pkt_dump_md_result_t class.
|
||||
|
|
||||
| Methods defined here:
|
||||
|
|
||||
| __init__(self, *args)
|
||||
| __init__(self) -> pkt_dump_md_result_t
|
||||
|
|
||||
| __repr__ = _swig_repr(self)
|
||||
|
|
||||
| ----------------------------------------------------------------------
|
||||
| Data descriptors defined here:
|
||||
|
|
||||
| __dict__
|
||||
| dictionary for instance variables (if defined)
|
||||
|
|
||||
| __weakref__
|
||||
| list of weak references to the object (if defined)
|
||||
|
|
||||
| contents
|
||||
| pkt_dump_md_result_t_contents_get(self) -> func_info_pattern_and_frequency_vec_t
|
||||
|
|
||||
| thisown
|
||||
| The membership flag
|
||||
|
|
||||
| ----------------------------------------------------------------------
|
||||
| Data and other attributes defined here:
|
||||
|
|
||||
| __swig_destroy__ = <built-in function delete_pkt_dump_md_result_t>
|
||||
| delete_pkt_dump_md_result_t(self)
|
||||
|
||||
Help on class pkt_dump_md_t in module ida_lumina:
|
||||
|
||||
class pkt_dump_md_t(__builtin__.object)
|
||||
| Proxy of C++ pkt_dump_md_t class.
|
||||
|
|
||||
| Methods defined here:
|
||||
|
|
||||
| __init__(self, *args)
|
||||
| __init__(self) -> pkt_dump_md_t
|
||||
|
|
||||
| __repr__ = _swig_repr(self)
|
||||
|
|
||||
| ----------------------------------------------------------------------
|
||||
| Data descriptors defined here:
|
||||
|
|
||||
| __dict__
|
||||
| dictionary for instance variables (if defined)
|
||||
|
|
||||
| __weakref__
|
||||
| list of weak references to the object (if defined)
|
||||
|
|
||||
| sort
|
||||
| pkt_dump_md_t_sort_get(self) -> dump_md_sort_type_t
|
||||
|
|
||||
| thisown
|
||||
| The membership flag
|
||||
|
|
||||
| ----------------------------------------------------------------------
|
||||
| Data and other attributes defined here:
|
||||
|
|
||||
| __swig_destroy__ = <built-in function delete_pkt_dump_md_t>
|
||||
| delete_pkt_dump_md_t(self)
|
||||
|
||||
Help on class pkt_get_pop_result_t in module ida_lumina:
|
||||
|
||||
class pkt_get_pop_result_t(__builtin__.object)
|
||||
|
||||
@@ -310,6 +310,41 @@ SWIGINTERN void __raise_vdf(const vd_failure_t &e)
|
||||
|
||||
%delobject create_cfunc;
|
||||
|
||||
%fragment("cvt_cfunc_t", "header")
|
||||
{
|
||||
bool cvt_cfunc_t(cfunc_t **out, PyObject *obj)
|
||||
{
|
||||
cfunc_t *cfunc = 0;
|
||||
int res = SWIG_ConvertPtr(obj, (void **) &cfunc, SWIGTYPE_p_cfunc_t, 0 | 0);
|
||||
if ( SWIG_IsOK(res) )
|
||||
{
|
||||
*out = cfunc;
|
||||
}
|
||||
else
|
||||
{
|
||||
cfuncptr_t *cfuncptr = 0;
|
||||
res = SWIG_ConvertPtr(obj, (void **) &cfuncptr, SWIGTYPE_p_qrefcnt_tT_cfunc_t_t, 0 | 0);
|
||||
if ( SWIG_IsOK(res) )
|
||||
*out = *cfuncptr;
|
||||
}
|
||||
return res;
|
||||
}
|
||||
}
|
||||
|
||||
%typemap(typecheck, fragment="cvt_cfunc_t", precedence=SWIG_TYPECHECK_POINTER) cfunc_t * {
|
||||
// %typemap(typecheck, precedence=SWIG_TYPECHECK_POINTER) cfunc_t *
|
||||
cfunc_t *cfunc = nullptr;
|
||||
const int res$argnum = cvt_cfunc_t(&cfunc, $input);
|
||||
_v = SWIG_CheckState(res$argnum);
|
||||
}
|
||||
|
||||
%typemap(in, fragment="cvt_cfunc_t") cfunc_t * {
|
||||
// %typemap(in, fragment="cvt_cfunc_t") cfunc_t *
|
||||
int res$argnum = cvt_cfunc_t(&$1, $input);
|
||||
if ( !SWIG_IsOK(res$argnum) )
|
||||
SWIG_exception_fail(SWIG_ArgError(res$argnum), "in method '$symname', argument $argnum of type $1_type");
|
||||
}
|
||||
|
||||
%extend cfunc_t {
|
||||
%immutable argidx;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user