示例#1
0
 private CPUTracer EnsureTracer(Arm cpu)
 {
     CPUTracer tracer;
     var tracerName = FindTracerName(cpu);
     if(!EmulationManager.Instance.CurrentEmulation.TryGetFromBag(tracerName, out tracer))
     {
         cpu.CreateCPUTracer(tracerName);
     }
     if(!EmulationManager.Instance.CurrentEmulation.TryGetFromBag(tracerName, out tracer))
     {
         throw new RecoverableException("Could not initialize CPUTracer.");
     }
     return tracer;
 }
示例#2
0
文件: CPUTracer.cs 项目: rte-se/emul8
 public CPUTracer(Arm cpu)
 {
     this.cpu = cpu;
     this.bus = cpu.Bus;
 }
示例#3
0
 private string FindTracerName(Arm cpu)
 {
     string cpuName;
     if(!cpu.Bus.Machine.TryGetAnyName(cpu, out cpuName))
     {
         throw new Exception("This should never have happened!");
     }
     return "{0}.{1}-{2}".FormatWith(EmulationManager.Instance.CurrentEmulation[cpu.Bus.Machine], cpuName, TracerName);
 }