BizHawk/BizHawk.Emulation.Common/Interfaces/Services/ITraceable.cs

46 lines
1.3 KiB
C#
Raw Normal View History

2017-04-24 12:41:55 +00:00
namespace BizHawk.Emulation.Common
2014-12-05 00:17:34 +00:00
{
public interface ITraceSink
{
void Put(TraceInfo info);
}
2014-12-05 00:17:34 +00:00
/// <summary>
2017-04-26 13:44:52 +00:00
/// 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
2014-12-05 00:17:34 +00:00
/// </summary>
public interface ITraceable : IEmulatorService
2014-12-05 00:17:34 +00:00
{
/// <summary>
/// Gets the header that would be used by a trace logger
2014-12-05 00:17:34 +00:00
/// </summary>
string Header { get; }
2014-12-05 00:17:34 +00:00
/// <summary>
/// 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
2014-12-05 00:17:34 +00:00
/// </summary>
ITraceSink Sink { set; }
/// <summary>
/// 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
/// </summary>
bool Enabled { get; }
2014-12-05 00:17:34 +00:00
/// <summary>
/// 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
/// </summary>
void Put(TraceInfo info);
}
public class TraceInfo
{
public string Disassembly { get; set; }
public string RegisterInfo { get; set; }
2014-12-05 00:17:34 +00:00
}
}