| 19 | } |
| 20 | |
| 21 | PUBLIC int DobbyDestroy(void *address) { |
| 22 | // check if we already hook |
| 23 | HookEntry *entry = Interceptor::SharedInstance()->FindHookEntry(address); |
| 24 | if (entry) { |
| 25 | uint8_t *buffer = entry->origin_chunk_.chunk_buffer; |
| 26 | uint32_t buffer_size = entry->origin_chunk_.chunk.length; |
| 27 | #if defined(TARGET_ARCH_ARM) |
| 28 | address = (void *)((addr_t)address - 1); |
| 29 | #endif |
| 30 | CodePatch(address, buffer, buffer_size); |
| 31 | Interceptor::SharedInstance()->RemoveHookEntry(address); |
| 32 | return RT_SUCCESS; |
| 33 | } |
| 34 | |
| 35 | return RT_FAILED; |
| 36 | } |
| 37 | |
| 38 | #endif |
nothing calls this directly
no test coverage detected