[Reflection] Change ReadBytesFunction to return a pointer rather than copying data, and adjust its users accordingly.

rdar://problem/37538580
This commit is contained in:
Mike Ash
2018-02-21 12:17:28 -05:00
parent 1dcdd939ca
commit bf58357e54
6 changed files with 71 additions and 30 deletions

View File

@@ -42,9 +42,9 @@ class InProcessMemoryReader final : public MemoryReader {
return true;
}
bool readBytes(RemoteAddress address, uint8_t *dest, uint64_t size) override {
std::memcpy(dest, address.getLocalPointer<void>(), (size_t) size);
return true;
std::tuple<const void *, std::function<void()>>
readBytes(RemoteAddress address, uint64_t size) override {
return std::make_tuple(address.getLocalPointer<void>(), []{});
}
};