Emul8.Peripherals.CPU.TranslationCPU.LogFunctionNames C# (CSharp) Method

LogFunctionNames() public method

public LogFunctionNames ( bool value ) : void
value bool
return void
        public void LogFunctionNames(bool value)
        {
            if(value)
            {
                var pc_cache = new LRUCache<uint, string>(10000);
                var messageBuilder = new StringBuilder(256);

                SetHookAtBlockBegin((pc, size) =>
                {
                    string name;
                    if(!pc_cache.TryGetValue(pc, out name))
                    {
                        name = Bus.FindSymbolAt(pc);
                        pc_cache.Add(pc, name);
                    }

                    messageBuilder.Clear();
                    this.Log(LogLevel.Info, messageBuilder.Append("Entering function ").Append(name).Append(" at 0x").Append(pc.ToString("X")).ToString());
                });
            }
            else
            {
                SetHookAtBlockBegin(null);
            }
        }
TranslationCPU