MCPcopy Create free account
hub / github.com/FEX-Emu/FEX / GetFrameBlockInfo

Function GetFrameBlockInfo

FEXCore/Source/Interface/Core/Core.cpp:108–118  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

106 const CPU::CPUBackend::JITCodeTail* InlineTail;
107};
108static GetFrameBlockInfoResult GetFrameBlockInfo(FEXCore::Core::CpuStateFrame* Frame) {
109 const uint64_t BlockBegin = Frame->State.InlineJITBlockHeader;
110 auto InlineHeader = reinterpret_cast<const CPU::CPUBackend::JITCodeHeader*>(BlockBegin);
111
112 if (InlineHeader) {
113 auto InlineTail = reinterpret_cast<const CPU::CPUBackend::JITCodeTail*>(Frame->State.InlineJITBlockHeader + InlineHeader->OffsetToBlockTail);
114 return {InlineHeader, InlineTail};
115 }
116
117 return {InlineHeader, nullptr};
118}
119
120bool ContextImpl::IsAddressInCurrentBlock(FEXCore::Core::InternalThreadState* Thread, uint64_t Address, uint64_t Size) {
121 auto [_, InlineTail] = GetFrameBlockInfo(Thread->CurrentFrame);

Callers 4

GetGuestBlockEntryMethod · 0.85
RestoreRIPFromHostPCMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected