Backported fixes

This commit is contained in:
Arnaud Diederen
2021-09-13 08:05:30 +02:00
parent cc2b1e8d7c
commit 7ee60670f9
8 changed files with 34 additions and 81 deletions
Binary file not shown.
+1 -1
View File
@@ -157,7 +157,7 @@ def cinsn_details(self):
cinsn_t.details = property(cinsn_details)
cfuncptr_t.__str__ = lambda self: str(self.__deref__())
cfuncptr_t.__eq__ = lambda self, other: self.__ptrval__() == other.__ptrval__()
cfuncptr_t.__eq__ = lambda self, other: self.__ptrval__() == other.__ptrval__() if isinstance(other, cfuncptr_t) else False
import ida_typeinf
def cfunc_type(self):
-4
View File
@@ -3737,10 +3737,6 @@
'func_contains',
'func_does_return',
'func_has_stkframe_hole',
'func_item_iterator_decode_preceding_insn',
'func_item_iterator_decode_prev_insn',
'func_item_iterator_next',
'func_item_iterator_prev',
'func_item_iterator_t___next__',
'func_item_iterator_t_chunk',
'func_item_iterator_t_current',
-4
View File
@@ -3737,10 +3737,6 @@
'func_contains',
'func_does_return',
'func_has_stkframe_hole',
'func_item_iterator_decode_preceding_insn',
'func_item_iterator_decode_prev_insn',
'func_item_iterator_next',
'func_item_iterator_prev',
'func_item_iterator_t___next__',
'func_item_iterator_t_chunk',
'func_item_iterator_t_current',
+2 -36
View File
@@ -12664,38 +12664,6 @@ func_does_return(*args)
func_does_return(callee) -> bool
@param callee (C++: ea_t)
Help on function func_item_iterator_decode_preceding_insn in module ida_funcs:
func_item_iterator_decode_preceding_insn(*args)
func_item_iterator_decode_preceding_insn(fii, visited, p_farref, out) -> bool
fii: func_item_iterator_t *
visited: eavec_t *
p_farref: bool *
out: insn_t *
Help on function func_item_iterator_decode_prev_insn in module ida_funcs:
func_item_iterator_decode_prev_insn(*args)
func_item_iterator_decode_prev_insn(fii, out) -> bool
fii: func_item_iterator_t *
out: insn_t *
Help on function func_item_iterator_next in module ida_funcs:
func_item_iterator_next(*args)
func_item_iterator_next(fii, testf, ud) -> bool
fii: func_item_iterator_t *
testf: testf_t *
ud: void *
Help on function func_item_iterator_prev in module ida_funcs:
func_item_iterator_prev(*args)
func_item_iterator_prev(fii, testf, ud) -> bool
fii: func_item_iterator_t *
testf: testf_t *
ud: void *
Help on class func_item_iterator_t in module ida_funcs:
class func_item_iterator_t(__builtin__.object)
@@ -12709,9 +12677,8 @@ class func_item_iterator_t(__builtin__.object)
| _ea: ea_t
|
| __next__(self, *args)
| __next__(self, func, ud) -> bool
| __next__(self, func) -> bool
| func: testf_t *
| ud: void *
|
| __repr__ = _swig_repr(self)
|
@@ -12755,9 +12722,8 @@ class func_item_iterator_t(__builtin__.object)
| next_not_tail(self) -> bool
|
| prev(self, *args)
| prev(self, func, ud) -> bool
| prev(self, func) -> bool
| @param func (C++: testf_t *)
| @param ud (C++: void *)
|
| prev_addr(self, *args)
| prev_addr(self) -> bool
+2 -36
View File
@@ -12600,38 +12600,6 @@ func_does_return(*args) -> 'bool'
func_does_return(callee) -> bool
@param callee (C++: ea_t)
Help on function func_item_iterator_decode_preceding_insn in module ida_funcs:
func_item_iterator_decode_preceding_insn(*args) -> 'bool'
func_item_iterator_decode_preceding_insn(fii, visited, p_farref, out) -> bool
fii: func_item_iterator_t *
visited: eavec_t *
p_farref: bool *
out: insn_t *
Help on function func_item_iterator_decode_prev_insn in module ida_funcs:
func_item_iterator_decode_prev_insn(*args) -> 'bool'
func_item_iterator_decode_prev_insn(fii, out) -> bool
fii: func_item_iterator_t *
out: insn_t *
Help on function func_item_iterator_next in module ida_funcs:
func_item_iterator_next(*args) -> 'bool'
func_item_iterator_next(fii, testf, ud) -> bool
fii: func_item_iterator_t *
testf: testf_t *
ud: void *
Help on function func_item_iterator_prev in module ida_funcs:
func_item_iterator_prev(*args) -> 'bool'
func_item_iterator_prev(fii, testf, ud) -> bool
fii: func_item_iterator_t *
testf: testf_t *
ud: void *
Help on class func_item_iterator_t in module ida_funcs:
class func_item_iterator_t(builtins.object)
@@ -12645,9 +12613,8 @@ class func_item_iterator_t(builtins.object)
| _ea: ea_t
|
| __next__(self, *args) -> 'bool'
| __next__(self, func, ud) -> bool
| __next__(self, func) -> bool
| func: testf_t *
| ud: void *
|
| __repr__ = _swig_repr(self)
|
@@ -12694,9 +12661,8 @@ class func_item_iterator_t(builtins.object)
| next_not_tail(self) -> bool
|
| prev(self, *args) -> 'bool'
| prev(self, func, ud) -> bool
| prev(self, func) -> bool
| @param func (C++: testf_t *)
| @param ud (C++: void *)
|
| prev_addr(self, *args) -> 'bool'
| prev_addr(self) -> bool
+6
View File
@@ -29,6 +29,12 @@
%template (dyn_ea_array) dynamic_wrapped_array_t<ea_t>;
%template (dyn_regarg_array) dynamic_wrapped_array_t<regarg_t>;
%ignore func_item_iterator_next;
%ignore func_item_iterator_prev;
%ignore func_item_iterator_decode_prev_insn;
%ignore func_item_iterator_decode_preceding_insn;
%ignore func_item_iterator_succ;
%extend func_t
{
dynamic_wrapped_array_t<stkpnt_t> __get_points__()
+23
View File
@@ -1828,6 +1828,29 @@ ${NONNULL_TYPEMAPS}
$result = iobuf;
}
%fragment("call_py_testf_t", "header")
{
bool call_py_testf_t(flags_t flags, void *ud)
{
PYW_GIL_CHECK_LOCKED_SCOPE();
PyObject *py_callable = (PyObject *) ud;
QASSERT(0, PyCallable_Check(py_callable));
newref_t py_flags(PyLong_FromUnsignedLong(flags));
newref_t result(PyObject_CallFunctionObjArgs(py_callable, py_flags.o, nullptr));
return result != nullptr && PyObject_IsTrue(result.o);
}
}
%typemap(in, fragment="call_py_testf_t") (testf_t *func, void *ud)
{
// %typemap(in, fragment="call_py_testf_t") (testf_t *func, void *ud)
if ( !PyCallable_Check($input) )
SWIG_exception_fail(
SWIG_TypeError,
"in method '" "$symname" "', argument " "$argnum"" of type 'callable'");
$1 = call_py_testf_t;
$2 = $input;
}
#endif // __HEADER_I__
// END: auto-inserted header