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)
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)
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))
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))