From ca2fe0b301eee78d91167d2eb622ca64458d8c0e Mon Sep 17 00:00:00 2001 From: Ryan Houdek Date: Thu, 5 Sep 2024 13:32:35 -0700 Subject: [PATCH] AOTIR: Move debugdata structure to internal header This definition doesn't need to be exposed in the public API. --- FEXCore/Source/Interface/IR/AOTIR.h | 29 +++++++++++++++++-- .../FEXCore/Debug/InternalThreadState.h | 22 -------------- 2 files changed, 27 insertions(+), 24 deletions(-) diff --git a/FEXCore/Source/Interface/IR/AOTIR.h b/FEXCore/Source/Interface/IR/AOTIR.h index e89e1d67bd..3edab6e600 100644 --- a/FEXCore/Source/Interface/IR/AOTIR.h +++ b/FEXCore/Source/Interface/IR/AOTIR.h @@ -17,9 +17,34 @@ #include #include +namespace FEXCore::CPU { +union Relocation; +} // namespace FEXCore::CPU + namespace FEXCore::Core { -struct DebugData; -} +struct DebugDataSubblock { + uint32_t HostCodeOffset; + uint32_t HostCodeSize; +}; + +struct DebugDataGuestOpcode { + uint64_t GuestEntryOffset; + ptrdiff_t HostEntryOffset; +}; + +/** + * @brief Contains debug data for a block of code for later debugger analysis + * + * Needs to remain around for as long as the code could be executed at least + */ +struct DebugData : public FEXCore::Allocator::FEXAllocOperators { + uint64_t HostCodeSize; ///< The size of the code generated in the host JIT + fextl::vector Subblocks; + fextl::vector GuestOpcodes; + fextl::vector* Relocations; +}; +} // namespace FEXCore::Core + namespace FEXCore::Context { class ContextImpl; } diff --git a/FEXCore/include/FEXCore/Debug/InternalThreadState.h b/FEXCore/include/FEXCore/Debug/InternalThreadState.h index a40b8c87fa..3dc710a9db 100644 --- a/FEXCore/include/FEXCore/Debug/InternalThreadState.h +++ b/FEXCore/include/FEXCore/Debug/InternalThreadState.h @@ -25,7 +25,6 @@ class Context; namespace FEXCore::CPU { class CPUBackend; -union Relocation; } // namespace FEXCore::CPU namespace FEXCore::Frontend { @@ -38,27 +37,6 @@ class PassManager; } // namespace FEXCore::IR namespace FEXCore::Core { -struct DebugDataSubblock { - uint32_t HostCodeOffset; - uint32_t HostCodeSize; -}; - -struct DebugDataGuestOpcode { - uint64_t GuestEntryOffset; - ptrdiff_t HostEntryOffset; -}; - -/** - * @brief Contains debug data for a block of code for later debugger analysis - * - * Needs to remain around for as long as the code could be executed at least - */ -struct DebugData : public FEXCore::Allocator::FEXAllocOperators { - uint64_t HostCodeSize; ///< The size of the code generated in the host JIT - fextl::vector Subblocks; - fextl::vector GuestOpcodes; - fextl::vector* Relocations; -}; // Special-purpose replacement for std::unique_ptr to allow InternalThreadState to be standard layout. // Since a NonMovableUniquePtr is neither copyable nor movable, its only function is to own and release the contained object.