unwindstack: rename Memory::Read to ReadFully.
Rename Memory::Read to ReadFully to match its semantics with that of
android::base. ReadPartially will be renamed to Read in a follow up
commit, kept intentionally separate so that there aren't any callers
accidentally switched from ReadFully to Read.
Test: treehugger
Change-Id: I7d845ac5244c3025d92c8512e960e5d0d1da05af
diff --git a/libunwindstack/ElfInterface.cpp b/libunwindstack/ElfInterface.cpp
index d5d158f..9bdb094 100644
--- a/libunwindstack/ElfInterface.cpp
+++ b/libunwindstack/ElfInterface.cpp
@@ -53,7 +53,7 @@
Crc64GenerateTable();
std::vector<uint8_t> src(gnu_debugdata_size_);
- if (!memory_->Read(gnu_debugdata_offset_, src.data(), gnu_debugdata_size_)) {
+ if (!memory_->ReadFully(gnu_debugdata_offset_, src.data(), gnu_debugdata_size_)) {
gnu_debugdata_offset_ = 0;
gnu_debugdata_size_ = static_cast<uint64_t>(-1);
return nullptr;
@@ -131,7 +131,7 @@
template <typename EhdrType, typename PhdrType, typename ShdrType>
bool ElfInterface::ReadAllHeaders(uint64_t* load_bias) {
EhdrType ehdr;
- if (!memory_->Read(0, &ehdr, sizeof(ehdr))) {
+ if (!memory_->ReadFully(0, &ehdr, sizeof(ehdr))) {
return false;
}
@@ -242,7 +242,7 @@
}
if (shdr.sh_type == SHT_SYMTAB || shdr.sh_type == SHT_DYNSYM) {
- if (!memory_->Read(offset, &shdr, sizeof(shdr))) {
+ if (!memory_->ReadFully(offset, &shdr, sizeof(shdr))) {
return false;
}
// Need to go get the information about the section that contains
@@ -324,7 +324,7 @@
uint64_t offset = dynamic_offset_;
uint64_t max_offset = offset + dynamic_size_;
for (uint64_t offset = dynamic_offset_; offset < max_offset; offset += sizeof(DynType)) {
- if (!memory_->Read(offset, &dyn, sizeof(dyn))) {
+ if (!memory_->ReadFully(offset, &dyn, sizeof(dyn))) {
return false;
}
@@ -388,7 +388,7 @@
template <typename EhdrType>
void ElfInterface::GetMaxSizeWithTemplate(Memory* memory, uint64_t* size) {
EhdrType ehdr;
- if (!memory->Read(0, &ehdr, sizeof(ehdr))) {
+ if (!memory->ReadFully(0, &ehdr, sizeof(ehdr))) {
return;
}
if (ehdr.e_shnum == 0) {