MCPcopy Create free account
hub / github.com/beefytech/Beef / Unpatch

Method Unpatch

BeefRT/gperftools/src/windows/patch_functions.cc:569–580  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

567
568template<int T>
569void LibcInfoWithPatchFunctions<T>::Unpatch() {
570 // We have to cast our GenericFnPtrs to void* for unpatch. This is
571 // contra the C++ spec; we use C-style casts to empahsize that.
572 for (int i = 0; i < kNumFunctions; i++) {
573 if (windows_fn_[i])
574 CHECK_EQ(sidestep::SIDESTEP_SUCCESS,
575 PreamblePatcher::Unpatch((void*)windows_fn_[i],
576 (void*)perftools_fn_[i],
577 (void*)origstub_fn_[i]));
578 }
579 set_is_valid(false);
580}
581
582void WindowsInfo::Patch() {
583 HMODULE hkernel32 = ::GetModuleHandleA("kernel32");

Callers 1

UnpatchWindowsFunctionsFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected