#pragma once #include #include #include #include #include namespace XCEngine::UI::Editor { struct UIEditorCrashTraceFrame { std::uintptr_t address = 0u; std::uintptr_t displacement = 0u; std::uint32_t line = 0u; std::uint32_t lineDisplacement = 0u; std::string moduleName = {}; std::string symbolName = {}; std::string sourceFile = {}; }; struct UIEditorCrashTrace { std::uint32_t exceptionCode = 0u; const void* exceptionAddress = nullptr; std::uint32_t threadId = 0u; std::string exceptionModule = {}; std::vector stackFrames = {}; }; void InitializeUIEditorRuntimeTrace(const std::filesystem::path& logRoot); void ShutdownUIEditorRuntimeTrace(); void AppendUIEditorRuntimeTrace( std::string_view channel, std::string_view message); void AppendUIEditorCrashTrace( std::uint32_t exceptionCode, const void* exceptionAddress); void AppendUIEditorCrashTrace(const UIEditorCrashTrace& trace); std::filesystem::path GetUIEditorRuntimeTracePath(); std::filesystem::path GetUIEditorCrashTracePath(); bool IsUIEditorRuntimeTraceInitialized(); } // namespace XCEngine::UI::Editor