MCPcopy Create free account
hub / github.com/Inori/GPCS4 / WriteCode

Method WriteCode

3rdParty/tinydbr/tinydbr.cpp:262–271  ·  view source on GitHub ↗

Checks if there is sufficient space and writes code at the current offset

Source from the content-addressed store, hash-verified

260
261// Checks if there is sufficient space and writes code at the current offset
262void TinyDBR::WriteCode(ModuleInfo* module, void* data, size_t size)
263{
264 if (module->instrumented_code_allocated + size > module->instrumented_code_size)
265 {
266 FATAL("Insufficient memory allocated for instrumented code");
267 }
268
269 memcpy(module->instrumented_code_local + module->instrumented_code_allocated, data, size);
270 module->instrumented_code_allocated += size;
271}
272
273// Checks if there is sufficient space and writes code at the chosen offset
274void TinyDBR::WriteCodeAtOffset(ModuleInfo* module, size_t offset, void* data, size_t size)

Callers 15

CrashMethod · 0.80
BreakpointMethod · 0.80
NopMethod · 0.80
JmpAddressMethod · 0.80
OffsetStackMethod · 0.80
ReadStackMethod · 0.80
WriteStackMethod · 0.80
TranslateJmpMethod · 0.80
InstrumentRetMethod · 0.80
MovIndirectTargetMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected