Skip to content

Commit

Permalink
Merge pull request FEX-Emu#4038 from Sonicadvance1/move_aotir_debugdata
Browse files Browse the repository at this point in the history
AOTIR: Move debugdata structure to internal header
  • Loading branch information
Sonicadvance1 authored Sep 6, 2024
2 parents bbef4d7 + ca2fe0b commit 304b5de
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 24 deletions.
29 changes: 27 additions & 2 deletions FEXCore/Source/Interface/IR/AOTIR.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,34 @@
#include <shared_mutex>
#include <FEXCore/HLE/SourcecodeResolver.h>

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<DebugDataSubblock> Subblocks;
fextl::vector<DebugDataGuestOpcode> GuestOpcodes;
fextl::vector<FEXCore::CPU::Relocation>* Relocations;
};
} // namespace FEXCore::Core

namespace FEXCore::Context {
class ContextImpl;
}
Expand Down
22 changes: 0 additions & 22 deletions FEXCore/include/FEXCore/Debug/InternalThreadState.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ class Context;

namespace FEXCore::CPU {
class CPUBackend;
union Relocation;
} // namespace FEXCore::CPU

namespace FEXCore::Frontend {
Expand All @@ -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<DebugDataSubblock> Subblocks;
fextl::vector<DebugDataGuestOpcode> GuestOpcodes;
fextl::vector<FEXCore::CPU::Relocation>* 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.
Expand Down

0 comments on commit 304b5de

Please sign in to comment.