writes a pointer to the instrumented code
| 288 | |
| 289 | // writes a pointer to the instrumented code |
| 290 | void 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 |
| 312 | void TinyDBR::WritePointerAtOffset(ModuleInfo* module, size_t value, size_t offset) |
no outgoing calls
no test coverage detected