#pragma once #include #include #include #include namespace FEX::DebuggerState { bool ActiveCore(); void SetContext(FEXCore::Context::Context *ctx); FEXCore::Context::Context *GetContext(); FEXCore::Config::ConfigCore GetCoreType(); void SetCoreType(FEXCore::Config::ConfigCore CoreType); int GetRunningMode(); ///< This is the running mode we've set int GetCoreCurrentRunningMode(); ///< This typically matches `GetRunningMode()` but can differ when we are in the middle of stepping void SetRunningMode(int RunningMode); FEXCore::Core::CPUState GetCPUState(); bool IsCoreRunning(); // Client interface void RegisterStepCallback(std::function Callback); void RegisterPauseCallback(std::function Callback); void RegisterContinueCallback(std::function Callback); void Step(); void Pause(); void Continue(); void RegisterCreateCallback(std::function Callback); void Create(char const *Filename, bool ELF); void RegisterCompileRIPCallback(std::function Callback); void CompileRIP(uint64_t RIP); void RegisterCloseCallback(std::function Callback); void Close(); void RegisterNewStateCallback(std::function Callback); void CallNewState(); void RegisterGetIRCallback(std::function); void GetIR(std::stringstream *out, uint64_t PC); bool HasNewState(); void SetHasNewState(bool State = true); }