def make_cblock_insn(ea, blk): insn = ida_hexrays.cinsn_t() insn.ea = ea insn.op = ida_hexrays.cit_block insn.cblock = blk insn.thisown = False return insn
def make_cexpr_insn(ea, obj): insn = ida_hexrays.cinsn_t() insn.ea = ea insn.op = ida_hexrays.cit_expr insn.cexpr = obj insn.thisown = False return insn
def make_if(ea, cond, if_clause): insn = ida_hexrays.cinsn_t() insn.ea = ea insn.op = ida_hexrays.cit_if ifc = ida_hexrays.cif_t() ifc.expr = cond ifc.ithen = if_clause insn.cif = ifc insn.thisown = False return insn
def is_inst(node): return type(node) == type(ida_hexrays.cinsn_t())