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

Method WritePointer

3rdParty/tinydbr/tinydbr.cpp:290–309  ·  view source on GitHub ↗

writes a pointer to the instrumented code

Source from the content-addressed store, hash-verified

288
289// writes a pointer to the instrumented code
290void TinyDBR::WritePointer(ModuleInfo* module, size_t value)
291{
292 if (module->instrumented_code_allocated + child_ptr_size > module->instrumented_code_size)
293 {
294 FATAL("Insufficient memory allocated for instrumented code");
295 }
296
297 if (child_ptr_size == 8)
298 {
299 *(uint64_t*)(module->instrumented_code_local + module->instrumented_code_allocated) =
300 (uint64_t)value;
301 }
302 else
303 {
304 *(uint32_t*)(module->instrumented_code_local + module->instrumented_code_allocated) =
305 (uint32_t)value;
306 }
307
308 module->instrumented_code_allocated += child_ptr_size;
309}
310
311// writes a pointer to the instrumented code
312void TinyDBR::WritePointerAtOffset(ModuleInfo* module, size_t value, size_t offset)

Callers 3

JmpAddressMethod · 0.80
WriteUnwindInfoMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected