0

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?

2
  • Not a real answer, but if you can usually pass null (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 combine build_def_list to get an mlist_t, and then mblock_t.for_all_uses if you only need it for a single mblock. In my (limited) experience, mlist_t and the for_all_* methods are more reliable for doing searches, especially because you're not limited to just an mblock. Commented Mar 23 at 15:43
  • Thanks, I ended up doing it myself too.
    – Ethan Xie
    Commented Mar 25 at 6:17

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.