1
0
mirror of https://github.com/0O0o0oOoO00/Alas.git synced 2026-05-22 18:49:29 +08:00

add: migrate source code of luahook

This commit is contained in:
0O0o0oOoO00
2025-11-01 00:23:46 +08:00
parent 753e676152
commit 41505d6e91
520 changed files with 154475 additions and 0 deletions

View File

@@ -0,0 +1,40 @@
#ifndef FUNCTION_WRAPPER_H
#define FUNCTION_WRAPPER_H
#include "dobby/dobby_internal.h"
#include "TrampolineBridge/ClosureTrampolineBridge/ClosureTrampoline.h"
#include "InterceptRouting/InterceptRouting.h"
#include "Interceptor.h"
#if TARGET_ARCH_IA32
#elif TARGET_ARCH_X64
#include "InterceptRouting/x64/X64InterceptRouting.h"
#elif TARGET_ARCH_ARM64
#include "InterceptRouting/arm64/ARM64InterceptRouting.h"
#elif TARGET_ARCH_ARM
#else
#error "unsupported architecture"
#endif
class FunctionWrapperRouting : public InterceptRouting {
public:
FunctionWrapperRouting(InterceptEntry *entry) : InterceptRouting(entry) {
}
void DispatchRouting();
void *GetTrampolineTarget();
private:
void BuildPreCallRouting();
void BuildPostCallRouting();
private:
void *prologue_dispatch_bridge;
void *epilogue_dispatch_bridge;
};
#endif