def add(self, key, value): self.AddLine("%s = %s" % ( expr2colorstr( key, symbol_pool=self.symbol_pool ), expr2colorstr( value, symbol_pool=self.symbol_pool ) ))
def add(self, key, value): self.AddLine("%s = %s" % ( expr2colorstr( key, loc_db=self.loc_db ), expr2colorstr( value, loc_db=self.loc_db ) ))
def color_irblock(irblock, ir_arch): out = [] lbl = idaapi.COLSTR("%s:" % ir_arch.loc_db.pretty_str(irblock.loc_key), idaapi.SCOLOR_INSN) out.append(lbl) for assignblk in irblock: for dst, src in sorted(viewitems(assignblk)): dst_f = expr2colorstr(dst, loc_db=ir_arch.loc_db) src_f = expr2colorstr(src, loc_db=ir_arch.loc_db) line = idaapi.COLSTR("%s = %s" % (dst_f, src_f), idaapi.SCOLOR_INSN) out.append(' %s' % line) out.append("") out.pop() return "\n".join(out)
def color_irblock(irblock, ir_arch): out = [] lbl = idaapi.COLSTR(ir_arch.symbol_pool.str_loc_key(irblock.loc_key), idaapi.SCOLOR_INSN) out.append(lbl) for assignblk in irblock: for dst, src in sorted(assignblk.iteritems()): dst_f = expr2colorstr(dst, symbol_pool=ir_arch.symbol_pool) src_f = expr2colorstr(src, symbol_pool=ir_arch.symbol_pool) line = idaapi.COLSTR("%s = %s" % (dst_f, src_f), idaapi.SCOLOR_INSN) out.append(' %s' % line) out.append("") out.pop() dst = str(' Dst: %s' % irblock.dst) dst = idaapi.COLSTR(dst, idaapi.SCOLOR_RPTCMT) out.append(dst) return "\n".join(out)
def color_irblock(irblock): out = [] lbl = idaapi.COLSTR(str(irblock.label), idaapi.SCOLOR_INSN) out.append(lbl) for assignblk in irblock.irs: for dst, src in sorted(assignblk.iteritems()): dst_f = expr2colorstr(ir_arch.arch.regs.all_regs_ids, dst) src_f = expr2colorstr(ir_arch.arch.regs.all_regs_ids, src) line = idaapi.COLSTR("%s = %s" % (dst_f, src_f), idaapi.SCOLOR_INSN) out.append(' %s' % line) out.append("") out.pop() dst = str(' Dst: %s' % irblock.dst) dst = idaapi.COLSTR(dst, idaapi.SCOLOR_RPTCMT) out.append(dst) return "\n".join(out)
def color_irbloc(irbloc): o = [] lbl = '%s' % irbloc.label lbl = idaapi.COLSTR(lbl, idaapi.SCOLOR_INSN) o.append(lbl) for assignblk in irbloc.irs: for dst, src in sorted(assignblk.iteritems()): dst_f = expr2colorstr(ir_arch.arch.regs.all_regs_ids, dst) src_f = expr2colorstr(ir_arch.arch.regs.all_regs_ids, src) s = idaapi.COLSTR("%s = %s" % (dst_f, src_f), idaapi.SCOLOR_INSN) o.append(' %s' % s) o.append("") o.pop() i = len(irbloc.irs) s = str(' Dst: %s' % irbloc.dst) s = idaapi.COLSTR(s, idaapi.SCOLOR_RPTCMT) o.append(s) return "\n".join(o)
def color_irbloc(irbloc): o = [] lbl = '%s' % irbloc.label lbl = idaapi.COLSTR(lbl, idaapi.SCOLOR_INSN) o.append(lbl) for i, expr in enumerate(irbloc.irs): for e in expr: s = expr2colorstr(ir_arch.arch.regs.all_regs_ids, e) s = idaapi.COLSTR(s, idaapi.SCOLOR_INSN) o.append(' %s' % s) o.append("") o.pop() i = len(irbloc.irs) s = str(' Dst: %s' % irbloc.dst) s = idaapi.COLSTR(s, idaapi.SCOLOR_RPTCMT) o.append(s) return "\n".join(o)
def add(self, key, value): self.AddLine("%s = %s" % (expr2colorstr(key, symbol_pool=self.symbol_pool), expr2colorstr(value, symbol_pool=self.symbol_pool)))
def add(self, key, value): self.AddLine("%s = %s" % (expr2colorstr(self.machine.mn.regs.all_regs_ids, key), expr2colorstr(self.machine.mn.regs.all_regs_ids, value)))