in hey-rays api there's a method:
def find_def(self, *args) -> "minsn_t *":
r"""
find_def(self, op, p_i1, i2, fdflags) -> minsn_t
@param op: mop_t const &
@param p_i1: minsn_t **
@param i2: minsn_t const *
@param fdflags: int
"""
return _ida_hexrays.mblock_t_find_def(self, *args)
which will need a ptr to ptr to a instruction.
but I didn't find any method can create a minsn_t **. is there any way to do that?
None
) to those. If you're trying to get the parent minstruction, though, because your result resides in an moperand, you might be able to combinebuild_def_list
to get anmlist_t
, and thenmblock_t.for_all_uses
if you only need it for a single mblock. In my (limited) experience,mlist_t
and thefor_all_*
methods are more reliable for doing searches, especially because you're not limited to just an mblock.