mirror of
https://github.com/FEX-Emu/FEX.git
synced 2026-10-27 18:00:48 +01:00
SMC: Add mprotect based tracking, --smc=mtrack, make default
This commit is contained in:
1 parent
73d43c1d55
commit
a284adcd19
18 files changed
+1018
-170
No files matched your search
@@ -15,6 +15,7 @@ $end_info$
|
||||
#include <FEXCore/Core/CoreState.h>
|
||||
#include <FEXCore/Utils/Allocator.h>
|
||||
#include <FEXCore/Utils/LogManager.h>
|
||||
#include <FEXCore/HLE/SyscallHandler.h>
|
||||
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
@@ -119,6 +120,25 @@ private:
|
||||
constexpr static uint64_t STACK_SIZE = 8 * 1024 * 1024;
|
||||
};
|
||||
|
||||
class DummySyscallHandler: public FEXCore::HLE::SyscallHandler {
|
||||
public:
|
||||
|
||||
uint64_t HandleSyscall(FEXCore::Core::CpuStateFrame *Frame, FEXCore::HLE::SyscallArguments *Args) override {
|
||||
LOGMAN_MSG_A_FMT("Syscalls not implemented");
|
||||
return 0;
|
||||
}
|
||||
|
||||
FEXCore::HLE::SyscallABI GetSyscallABI(uint64_t Syscall) override {
|
||||
LOGMAN_MSG_A_FMT("Syscalls not implemented");
|
||||
return {0, false, 0 };
|
||||
}
|
||||
|
||||
std::shared_mutex Mutex;
|
||||
FEXCore::HLE::AOTIRCacheEntryLookupResult LookupAOTIRCacheEntry(uint64_t GuestAddr) override {
|
||||
return {0, 0, FHU::ScopedSignalMaskWithSharedLock {Mutex}};
|
||||
}
|
||||
};
|
||||
|
||||
int main(int argc, char **argv, char **const envp)
|
||||
{
|
||||
LogMan::Throw::InstallHandler(AssertHandler);
|
||||
@@ -141,6 +161,7 @@ int main(int argc, char **argv, char **const envp)
|
||||
std::unique_ptr<FEX::HLE::SignalDelegator> SignalDelegation = std::make_unique<FEX::HLE::SignalDelegator>();
|
||||
|
||||
FEXCore::Context::SetSignalDelegator(CTX, SignalDelegation.get());
|
||||
FEXCore::Context::SetSyscallHandler(CTX, new DummySyscallHandler());
|
||||
|
||||
FEX::IRLoader::Loader Loader(Args[0], Args[1]);
|
||||
|
||||
|
||||
Reference in new issue
Block a user