| 6554 | } |
| 6555 | |
| 6556 | void DecodedOp::log(CPU* cpu) { |
| 6557 | #ifdef _DEBUG |
| 6558 | if (cpu->logFile.isOpen() && this->inst >= 0 && this->inst < None) { |
| 6559 | BOXEDWINE_CRITICAL_SECTION; |
| 6560 | U64 pos = cpu->logFile.getPos(); |
| 6561 | cpu->logFile.writeFormat("%04X %08X ", cpu->thread->id, cpu->eip.u32); |
| 6562 | cpu->logFile.write(toString().c_str()); |
| 6563 | U64 endPos = cpu->logFile.getPos(); |
| 6564 | if (endPos - pos < 55) { |
| 6565 | cpu->logFile.write(B(" ").substr(0, (U32)(55 - (endPos - pos)))); |
| 6566 | } |
| 6567 | cpu->logFile.writeFormat(" EAX=%.8X ECX=%.8X EDX=%.8X EBX=%.8X ESP=%.8X EBP=%.8X ESI=%.8X EDI=%.8X SS=%.8X DS=%.8X FLAGS=%.8X\n", EAX, ECX, EDX, EBX, ESP, EBP, ESI, EDI, cpu->seg[SS].address, cpu->seg[DS].address, cpu->flags); |
| 6568 | cpu->logFile.flush(); |
| 6569 | } |
| 6570 | #endif |
| 6571 | } |
no test coverage detected