| 567 | |
| 568 | template<int T> |
| 569 | void 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 | |
| 582 | void WindowsInfo::Patch() { |
| 583 | HMODULE hkernel32 = ::GetModuleHandleA("kernel32"); |
no outgoing calls
no test coverage detected