• Home
  • Raw
  • Download

Lines Matching refs:uptr

150 static bool DistanceIsWithin2Gig(uptr from, uptr target) {  in DistanceIsWithin2Gig()
152 return target - from <= (uptr)0x7FFFFFFFU; in DistanceIsWithin2Gig()
154 return from - target <= (uptr)0x80000000U; in DistanceIsWithin2Gig()
157 static uptr GetMmapGranularity() { in GetMmapGranularity()
163 static uptr RoundUpTo(uptr size, uptr boundary) { in RoundUpTo()
183 uptr address, uptr size, DWORD *old_protection) { in ChangeMemoryProtection()
190 uptr address, uptr size, DWORD old_protection) { in RestoreMemoryProtection()
197 static bool IsMemoryPadding(uptr address, uptr size) { in IsMemoryPadding()
211 static bool FunctionHasPrefix(uptr address, const T &pattern) { in FunctionHasPrefix()
219 static bool FunctionHasPadding(uptr address, uptr size) { in FunctionHasPadding()
228 static void WritePadding(uptr from, uptr size) { in WritePadding()
232 static void CopyInstructions(uptr from, uptr to, uptr size) { in CopyInstructions()
236 static void WriteJumpInstruction(uptr from, uptr target) { in WriteJumpInstruction()
244 static void WriteShortJumpInstruction(uptr from, uptr target) { in WriteShortJumpInstruction()
253 static void WriteIndirectJumpInstruction(uptr from, uptr indirect_target) { in WriteIndirectJumpInstruction()
270 uptr from, uptr indirect_target, uptr target) { in WriteBranch()
280 static void WriteDirectBranch(uptr from, uptr target) { in WriteDirectBranch()
292 uptr content;
293 uptr allocated_size;
294 uptr max_size;
297 static const uptr kTrampolineScanLimitRange = 1 << 30; // 1 gig
301 static void *AllocateTrampolineRegion(uptr image_address, size_t granularity) { in AllocateTrampolineRegion()
303 uptr address = image_address; in AllocateTrampolineRegion()
304 uptr scanned = 0; in AllocateTrampolineRegion()
320 address = (uptr)info.BaseAddress + info.RegionSize; in AllocateTrampolineRegion()
343 static uptr AllocateMemoryForTrampoline(uptr image_address, size_t size) { in AllocateMemoryForTrampoline()
355 current->content = (uptr)content; in AllocateMemoryForTrampoline()
363 uptr next_address = current->content + current->allocated_size; in AllocateMemoryForTrampoline()
379 uptr allocated_space = region->content + region->allocated_size; in AllocateMemoryForTrampoline()
387 static size_t GetInstructionSize(uptr address) { in GetInstructionSize()
552 static size_t RoundUpToInstrBoundary(size_t size, uptr address) { in RoundUpToInstrBoundary()
565 uptr old_func, uptr new_func, uptr *orig_old_func) { in OverrideFunctionWithDetour()
569 uptr header = (uptr)old_func - kDetourHeaderLen; in OverrideFunctionWithDetour()
570 uptr patch_length = kDetourHeaderLen + kShortJumpInstructionLength; in OverrideFunctionWithDetour()
600 uptr old_func, uptr new_func, uptr *orig_old_func) { in OverrideFunctionWithRedirectJump()
606 uptr relative_offset = *(u32*)(old_func + 1); in OverrideFunctionWithRedirectJump()
607 uptr absolute_target = old_func + relative_offset + kJumpInstructionLength; in OverrideFunctionWithRedirectJump()
613 uptr trampoline = AllocateMemoryForTrampoline(old_func, kDirectBranchLength); in OverrideFunctionWithRedirectJump()
635 uptr old_func, uptr new_func, uptr *orig_old_func) { in OverrideFunctionWithHotPatch()
638 uptr header = (uptr)old_func - kHotPatchHeaderLen; in OverrideFunctionWithHotPatch()
639 uptr patch_length = kHotPatchHeaderLen + kShortJumpInstructionLength; in OverrideFunctionWithHotPatch()
649 uptr trampoline_length = instruction_size + kDirectBranchLength; in OverrideFunctionWithHotPatch()
650 uptr trampoline = AllocateMemoryForTrampoline(old_func, trampoline_length); in OverrideFunctionWithHotPatch()
660 uptr indirect_address = 0; in OverrideFunctionWithHotPatch()
684 uptr old_func, uptr new_func, uptr *orig_old_func) { in OverrideFunctionWithTrampoline()
688 uptr indirect_address = 0; in OverrideFunctionWithTrampoline()
698 uptr trampoline_length = instructions_length + kDirectBranchLength; in OverrideFunctionWithTrampoline()
699 uptr trampoline = AllocateMemoryForTrampoline(old_func, trampoline_length); in OverrideFunctionWithTrampoline()
722 uptr patch_address = old_func - padding_length; in OverrideFunctionWithTrampoline()
723 uptr patch_length = instructions_length + padding_length; in OverrideFunctionWithTrampoline()
739 uptr old_func, uptr new_func, uptr *orig_old_func) { in OverrideFunction()
777 RVAPtr(void *module, uptr rva) in RVAPtr()
793 uptr InternalGetProcAddress(void *module, const char *func_name) { in InternalGetProcAddress()
817 return (uptr)(char *)func; in InternalGetProcAddress()
824 static bool GetFunctionAddressInDLLs(const char *func_name, uptr *func_addr) { in GetFunctionAddressInDLLs()
832 bool OverrideFunction(const char *name, uptr new_func, uptr *orig_old_func) { in OverrideFunction()
833 uptr orig_func; in OverrideFunction()
841 const char *function_name, uptr new_function, in OverrideImportedFunction()
842 uptr *orig_old_func) { in OverrideImportedFunction()