Checks if there is sufficient space and writes code at the current offset
| 260 | |
| 261 | // Checks if there is sufficient space and writes code at the current offset |
| 262 | void 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 |
| 274 | void TinyDBR::WriteCodeAtOffset(ModuleInfo* module, size_t offset, void* data, size_t size) |
no outgoing calls
no test coverage detected