Skip to content

Commit 7d2a9dc

Browse files
chore: Remove trace code
1 parent e064dce commit 7d2a9dc

1 file changed

Lines changed: 0 additions & 5 deletions

File tree

‎src/Spice86.Core/Emulator/CPU/CfgCpu/InstructionExecutor/InstructionExecutionHelper.cs‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -401,11 +401,6 @@ public uint In32(ushort port) {
401401
public void Out32(ushort port, uint val) => IoPortDispatcher.WriteDWord(port, val);
402402

403403
public void HandleCpuException(CfgInstruction instruction, CpuException cpuException) {
404-
if (Environment.GetEnvironmentVariable("SPICE86_TRACE_EXC") is not null) {
405-
System.IO.Directory.CreateDirectory("tmp");
406-
System.IO.File.AppendAllText("tmp/exc_trace.txt",
407-
$"vec=0x{cpuException.InterruptVector:X2} type={cpuException.GetType().Name} CS=0x{State.CS:X4} EIP=0x{State.EIP:X8} SS=0x{State.SS:X4} ESP=0x{State.ESP:X8} err={cpuException.ErrorCode} msg={cpuException.Message}\n");
408-
}
409404
// Check if this is an invalid opcode exception and we should fail the emulator
410405
if (_failOnInvalidOpcode && cpuException is CpuInvalidOpcodeException) {
411406
throw new InvalidVMOperationException(State, cpuException);

0 commit comments

Comments
 (0)