namespace BizHawk.Emulation.Common { public interface ITraceSink { void Put(TraceInfo info); } /// /// This service allows the core to dump a CPU trace to the client /// If available the Trace Logger tool will be available on the client /// public interface ITraceable : IEmulatorService { /// /// Gets the header that would be used by a trace logger /// string Header { get; } /// /// Sets the sink /// that's right, we can only have one sink. /// a sink can route to two other sinks if it has to, though /// ITraceSink Sink { set; } /// /// Gets a value indicating whether racing is enabled /// This is defined as equivalent to Sink != null /// It's put here because it's such a common operation to check whether it's enabled, and it's not nice to write Sink != null all over /// bool Enabled { get; } /// /// This is defined as equivalent to Sink.Put /// TBD: could it be defined as equivalent to if(Enabled) Sink.Put()? Probably not, that's just a small amount of wasted work /// void Put(TraceInfo info); } public class TraceInfo { public string Disassembly { get; set; } public string RegisterInfo { get; set; } } }