mirror of
https://github.com/geode-sdk/geode.git
synced 2024-12-04 13:11:09 -05:00
24 lines
746 B
C++
24 lines
746 B
C++
#include "InterceptRouting/Routing/FunctionInlineReplace/function-inline-replace.h"
|
|
|
|
#include "dobby_internal.h"
|
|
|
|
void FunctionInlineReplaceRouting::DispatchRouting() {
|
|
BuildReplaceRouting();
|
|
|
|
// generate relocated code which size == trampoline size
|
|
GenerateRelocatedCode(trampoline_buffer_->getSize());
|
|
}
|
|
|
|
void FunctionInlineReplaceRouting::BuildReplaceRouting() {
|
|
this->SetTrampolineTarget(this->replace_call);
|
|
DLOG(0, "[inline] Set trampoline target => %p", GetTrampolineTarget());
|
|
|
|
// generate trampoline buffer, run before `GenerateRelocatedCode`
|
|
GenerateTrampolineBuffer(entry_->target_address, GetTrampolineTarget());
|
|
}
|
|
|
|
#if 0
|
|
void *FunctionInlineReplaceRouting::GetTrampolineTarget() {
|
|
return this->replace_call;
|
|
}
|
|
#endif
|