Checks if a block of memory has been written
| 56 | |
| 57 | // Checks if a block of memory has been written |
| 58 | bool debugFileIsSet(uint8_t* storeMask, int64_t offset, int64_t length) { |
| 59 | for (int64_t i = 0; i < length; i += 4096) |
| 60 | if (memcmp(&storeMask[offset + i], debugFileSetPage, std::min((int64_t)4096, length - i))) |
| 61 | return false; |
| 62 | |
| 63 | return true; |
| 64 | } |
| 65 | |
| 66 | // Checks that a given block of data is the same as what has been written by a call to debugFileSet |
| 67 | void debugFileCheck(std::string context, std::string file, const void* data, int64_t offset, int length) { |