MCPcopy Create free account
hub / github.com/GJDuck/e9patch / patchUnused

Function patchUnused

src/e9patch/e9tactics.cpp:402–417  ·  view source on GitHub ↗

* Patch in unused memory. */

Source from the content-addressed store, hash-verified

400 * Patch in unused memory.
401 */
402static void patchUnused(Patch *P, unsigned offset)
403{
404 assert(offset <= P->I->size);
405 for (unsigned i = offset; i < P->I->size; i++)
406 {
407 switch (P->I->STATE[i])
408 {
409 case STATE_INSTRUCTION: case STATE_QUEUED:
410 P->I->PATCH[i] = /*int3=*/0xcc;
411 P->I->STATE[i] = STATE_FREE;
412 break;
413 default:
414 break;
415 }
416 }
417}
418
419/*
420 * Return true if the given instruction can be instrumented.

Callers 4

tactic_B0Function · 0.85
tactic_B1Function · 0.85
tactic_T3Function · 0.85
tactic_T0Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected