Пример #1
0
 def instr_hook():
     # add register dump
     state.get(cpu)
     res = state.dump()
     for r in res:
         log_instr.info(r)
     # disassemble line
     pc = cpu.r_reg(REG_PC)
     self.trace_code_line(pc)
Пример #2
0
 def instr_hook():
   # add register dump
   state.get(cpu)
   res = state.dump()
   for r in res:
     log_instr.info(r)
   # disassemble line
   pc = cpu.r_reg(REG_PC)
   self.trace_code_line(pc)
Пример #3
0
 def trace_code_line(self, pc):
     label, sym, src, addon = self._get_disasm_info(pc)
     _, txt = self.disasm.disassemble(pc)
     if sym is not None:
         log_instr.info("%s%s:", " " * 40, sym)
     if src is not None:
         log_instr.info("%s%s", " " * 50, src)
     log_instr.info("%-40s  %06x    %-20s  %s" % (label, pc, txt, addon))
Пример #4
0
 def trace_code_line(self, pc):
   label, sym, src, addon = self._get_disasm_info(pc)
   _, txt = self.disasm.disassemble(pc)
   if sym is not None:
     log_instr.info("%s%s:", " "*40, sym)
   if src is not None:
     log_instr.info("%s%s", " "*50, src)
   log_instr.info("%-40s  %06x    %-20s  %s" % (label, pc, txt, addon))