Lines Matching full:funcid

167 bool patchSled(const XRaySledEntry &Sled, bool Enable, int32_t FuncId,
172 Success = patchFunctionEntry(Enable, FuncId, Sled, Trampolines,
176 Success = patchFunctionExit(Enable, FuncId, Sled, Trampolines);
179 Success = patchFunctionTailExit(Enable, FuncId, Sled, Trampolines);
182 Success = patchFunctionEntry(Enable, FuncId, Sled, Trampolines,
186 Success = patchCustomEvent(Enable, FuncId, Sled);
189 Success = patchTypedEvent(Enable, FuncId, Sled);
200 findFunctionSleds(int32_t FuncId,
206 for (std::size_t I = 0; I < InstrMap.Entries && CurFn <= FuncId; I++) {
214 if (CurFn == FuncId) {
224 XRayPatchingStatus patchFunction(int32_t FuncId, int32_t ObjId,
252 Report("Invalid function id provided: %d\n", FuncId);
256 // FuncId must be a positive number, less than the number of functions
258 if (FuncId <= 0 || static_cast<size_t>(FuncId) > InstrMap.Functions) {
259 Report("Invalid function id provided: %d\n", FuncId);
263 auto PackedId = __xray::MakePackedId(FuncId, ObjId);
268 SledRange = {InstrMap.SledsIndex[FuncId - 1].fromPCRelative(),
269 InstrMap.SledsIndex[FuncId - 1].Size};
271 SledRange = findFunctionSleds(FuncId, InstrMap);
282 Report("Failed patching any sled for function '%d'.", FuncId);
317 uint32_t FuncId = 1;
363 ++FuncId;
366 auto PackedId = __xray::MakePackedId(FuncId, ObjId);
437 XRayPatchingStatus mprotectAndPatchFunction(int32_t FuncId, int32_t ObjId,
456 // FuncId must be a positive number, less than the number of functions
458 if (FuncId <= 0 || static_cast<size_t>(FuncId) > InstrMap.Functions) {
459 Report("Invalid function id provided: %d\n", FuncId);
475 SledRange = {InstrMap.SledsIndex[FuncId - 1].fromPCRelative(),
476 InstrMap.SledsIndex[FuncId - 1].Size};
478 SledRange = findFunctionSleds(FuncId, InstrMap);
502 return patchFunction(FuncId, ObjId, Enable);
584 XRayPatchingStatus __xray_patch_function(int32_t FuncId) XRAY_NEVER_INSTRUMENT {
585 auto Ids = __xray::UnpackId(FuncId);
592 __xray_patch_function_in_object(int32_t FuncId,
594 return mprotectAndPatchFunction(FuncId, ObjId, true);
598 __xray_unpatch_function(int32_t FuncId) XRAY_NEVER_INSTRUMENT {
599 auto Ids = __xray::UnpackId(FuncId);
606 __xray_unpatch_function_in_object(int32_t FuncId,
608 return mprotectAndPatchFunction(FuncId, ObjId, false);
631 uintptr_t __xray_function_address_in_object(int32_t FuncId, int32_t ObjId)
646 if (FuncId <= 0 || static_cast<size_t>(FuncId) > InstrMap.Functions)
649 InstrMap.SledsIndex ? InstrMap.SledsIndex[FuncId - 1].fromPCRelative()
650 : findFunctionSleds(FuncId, InstrMap).Begin;
686 int32_t __xray_pack_id(int32_t FuncId, int32_t ObjId) {
687 return __xray::MakePackedId(FuncId, ObjId);