/system/core/libunwindstack/tests/ |
D | MemoryOfflineBufferTest.cpp | 58 ASSERT_FALSE(memory_->ReadFully(0, buffer.data(), 1)); in TEST_F() 59 ASSERT_FALSE(memory_->ReadFully(0xfff, buffer.data(), 1)); in TEST_F() 60 ASSERT_FALSE(memory_->ReadFully(0xfff, buffer.data(), 2)); in TEST_F() 61 ASSERT_FALSE(memory_->ReadFully(0x3000, buffer.data(), 1)); in TEST_F() 62 ASSERT_FALSE(memory_->ReadFully(0x3001, buffer.data(), 1)); in TEST_F() 67 ASSERT_TRUE(memory_->ReadFully(kStart, buffer.data(), 10)); in TEST_F() 70 ASSERT_TRUE(memory_->ReadFully(kStart + 555, buffer.data(), 40)); in TEST_F() 73 ASSERT_TRUE(memory_->ReadFully(kStart + kLength - 105, buffer.data(), 105)); in TEST_F() 85 ASSERT_TRUE(memory_->ReadFully(kStart, buffer.data(), 100)); in TEST_F() 89 ASSERT_TRUE(memory_->ReadFully(0x12000, buffer.data(), 100)); in TEST_F()
|
D | MemoryCacheTest.cpp | 48 ASSERT_TRUE(memory_cache_->ReadFully(0x8000 + i, buffer.data(), i)) in TEST_F() 57 ASSERT_TRUE(memory_cache_->ReadFully(0x8000 + i, buffer.data(), i)) in TEST_F() 66 ASSERT_TRUE(memory_cache_->ReadFully(0x8000 + i, buffer.data(), i)) in TEST_F() 76 ASSERT_TRUE(memory_cache_->ReadFully(0x8000 + i, buffer.data(), i)) in TEST_F() 87 ASSERT_TRUE(memory_cache_->ReadFully(0x8ff0, buffer.data(), 32)); in TEST_F() 93 ASSERT_TRUE(memory_cache_->ReadFully(0x8ff0, buffer.data(), 32)); in TEST_F() 100 ASSERT_TRUE(memory_cache_->ReadFully(0x8000 + i, buffer.data(), i)) in TEST_F() 109 ASSERT_TRUE(memory_cache_->ReadFully(0x8000 + i, buffer.data(), i)) in TEST_F() 117 ASSERT_TRUE(memory_cache_->ReadFully(0xa010, buffer.data(), kMaxCachedSize)); in TEST_F() 122 ASSERT_TRUE(memory_cache_->ReadFully(0xa010, buffer.data(), kMaxCachedSize)); in TEST_F() [all …]
|
D | MemoryFileTest.cpp | 52 ASSERT_TRUE(memory_.ReadFully(0, buffer.data(), 10)); in TEST_F() 62 ASSERT_TRUE(memory_.ReadFully(0, buffer.data(), 10)); in TEST_F() 78 ASSERT_TRUE(memory_.ReadFully(0, buffer.data(), 8)); in TEST_F() 94 ASSERT_TRUE(memory_.ReadFully(0, buffer.data(), 10)); in TEST_F() 115 ASSERT_TRUE(memory_.ReadFully(0, buffer.data(), 10)); in TEST_F() 152 ASSERT_FALSE(memory_.ReadFully(0, buffer.data(), 10)); in TEST_F() 156 ASSERT_FALSE(memory_.ReadFully(10000, buffer.data(), 10)); in TEST_F() 157 ASSERT_FALSE(memory_.ReadFully(5000, buffer.data(), 10)); in TEST_F() 158 ASSERT_FALSE(memory_.ReadFully(4990, buffer.data(), 11)); in TEST_F() 159 ASSERT_TRUE(memory_.ReadFully(4990, buffer.data(), 10)); in TEST_F() [all …]
|
D | MemoryBufferTest.cpp | 38 ASSERT_FALSE(memory_->ReadFully(0, buffer.data(), 1)); in TEST_F() 57 ASSERT_TRUE(memory_->ReadFully(0, buffer.data(), buffer.size())); in TEST_F() 66 ASSERT_FALSE(memory_->ReadFully(0, buffer.data(), 101)); in TEST_F() 67 ASSERT_FALSE(memory_->ReadFully(100, buffer.data(), 1)); in TEST_F() 68 ASSERT_FALSE(memory_->ReadFully(101, buffer.data(), 2)); in TEST_F() 69 ASSERT_FALSE(memory_->ReadFully(99, buffer.data(), 2)); in TEST_F() 70 ASSERT_TRUE(memory_->ReadFully(99, buffer.data(), 1)); in TEST_F() 77 ASSERT_FALSE(memory_->ReadFully(UINT64_MAX - 100, buffer.data(), 200)); in TEST_F()
|
D | MemoryRangeTest.cpp | 47 ASSERT_TRUE(range.ReadFully(0, dst.data(), dst.size())); in TEST_F() 59 ASSERT_TRUE(range.ReadFully(1020, dst.data(), 4)); in TEST_F() 65 ASSERT_FALSE(range.ReadFully(1020, dst.data(), 5)); in TEST_F() 66 ASSERT_FALSE(range.ReadFully(1024, dst.data(), 1)); in TEST_F() 67 ASSERT_FALSE(range.ReadFully(1024, dst.data(), 1024)); in TEST_F() 70 ASSERT_TRUE(range.ReadFully(1020, dst.data(), 4)); in TEST_F() 78 ASSERT_FALSE(overflow->ReadFully(UINT64_MAX - 10, buffer.data(), 100)); in TEST_F()
|
D | MemoryLocalTest.cpp | 36 ASSERT_TRUE(local.ReadFully(reinterpret_cast<uint64_t>(src.data()), dst.data(), 1024)); in TEST() 43 ASSERT_TRUE(local.ReadFully(reinterpret_cast<uint64_t>(src.data()), dst.data(), 1024)); in TEST() 57 ASSERT_FALSE(local.ReadFully(0, dst.data(), 1)); in TEST() 58 ASSERT_FALSE(local.ReadFully(0, dst.data(), 100)); in TEST() 68 ASSERT_FALSE(local.ReadFully(reinterpret_cast<uint64_t>(&value), dst.data(), SIZE_MAX)); in TEST()
|
D | MemoryRemoteTest.cpp | 57 ASSERT_TRUE(remote.ReadFully(reinterpret_cast<uint64_t>(src.data()), dst.data(), 1024)); in TEST() 86 ASSERT_TRUE(remote.ReadFully(reinterpret_cast<uint64_t>(src.data()), dst.data(), src.size())); in TEST() 160 ASSERT_TRUE(remote.ReadFully(reinterpret_cast<uint64_t>(src), dst.data(), pagesize)); in TEST() 165 ASSERT_FALSE(remote.ReadFully(reinterpret_cast<uint64_t>(src) + pagesize, dst.data(), 1)); in TEST() 166 ASSERT_TRUE(remote.ReadFully(reinterpret_cast<uint64_t>(src) + pagesize - 1, dst.data(), 1)); in TEST() 167 ASSERT_FALSE(remote.ReadFully(reinterpret_cast<uint64_t>(src) + pagesize - 4, dst.data(), 8)); in TEST() 170 ASSERT_FALSE(remote.ReadFully(UINT64_MAX - 100, dst.data(), 200)); in TEST() 193 ASSERT_FALSE(remote.ReadFully(UINT64_MAX - 100, dst.data(), 200)); in TEST() 212 ASSERT_FALSE(remote.ReadFully(0, dst.data(), 1)); in TEST() 213 ASSERT_FALSE(remote.ReadFully(0, dst.data(), 100)); in TEST()
|
D | MapInfoCreateMemoryTest.cpp | 121 ASSERT_TRUE(memory->ReadFully(0, buffer.data(), 1024)); in TEST_F() 128 ASSERT_FALSE(memory->ReadFully(1024, buffer.data(), 1)); in TEST_F() 191 ASSERT_TRUE(memory->ReadFully(0, buffer.data(), 0x100)); in TEST_F() 198 ASSERT_FALSE(memory->ReadFully(0x100, buffer.data(), 1)); in TEST_F() 216 ASSERT_TRUE(memory->ReadFully(0, e_ident, SELFMAG)); in TEST_F() 220 ASSERT_TRUE(memory->ReadFully(0x1000, e_ident, 1)); in TEST_F() 234 ASSERT_TRUE(memory->ReadFully(0, e_ident, SELFMAG)); in TEST_F() 238 ASSERT_TRUE(memory->ReadFully(0x1000, e_ident, 1)); in TEST_F() 273 ASSERT_TRUE(memory->ReadFully(0, buffer.data(), buffer.size())); in TEST_F() 280 ASSERT_FALSE(memory->ReadFully(buffer.size(), buffer.data(), 1)); in TEST_F() [all …]
|
D | MapInfoGetElfTest.cpp | 202 ASSERT_TRUE(elf->memory()->ReadFully(0, buffer.data(), buffer.size())); in TEST_F() 208 ASSERT_FALSE(elf->memory()->ReadFully(buffer.size(), buffer.data(), 1)); in TEST_F() 230 ASSERT_TRUE(elf->memory()->ReadFully(0, buffer.data(), 0x1000)); in TEST_F() 236 ASSERT_FALSE(elf->memory()->ReadFully(0x1000, buffer.data(), 1)); in TEST_F() 264 ASSERT_TRUE(elf->memory()->ReadFully(0, buffer.data(), 0x1000)); in TEST_F() 268 ASSERT_TRUE(elf->memory()->ReadFully(0x1000, buffer.data(), 1)); in TEST_F() 292 ASSERT_TRUE(elf->memory()->ReadFully(0, buffer.data(), 0x1000)); in TEST_F() 296 ASSERT_TRUE(elf->memory()->ReadFully(0x1000, buffer.data(), 1)); in TEST_F()
|
/system/core/libunwindstack/include/unwindstack/ |
D | Memory.h | 49 bool ReadFully(uint64_t addr, void* dst, size_t size); 52 return ReadFully(addr, dst, sizeof(uint32_t)); in Read32() 56 return ReadFully(addr, dst, sizeof(uint64_t)); in Read64()
|
/system/core/libunwindstack/ |
D | ElfInterface.cpp | 105 if (!memory_->ReadFully(gnu_debugdata_offset_, src.get(), gnu_debugdata_size_)) { in CreateGnuDebugdataMemory() 191 if (!memory_->ReadFully(0, &ehdr, sizeof(ehdr))) { in ReadAllHeaders() 207 if (!memory->ReadFully(0, &ehdr, sizeof(ehdr))) { in GetLoadBias() 214 if (!memory->ReadFully(offset, &phdr, sizeof(phdr))) { in GetLoadBias() 232 if (!memory_->ReadFully(offset, &phdr, sizeof(phdr))) { in ReadProgramHeaders() 291 if (!memory_->ReadFully(gnu_build_id_offset_ + offset, &hdr, sizeof(hdr))) { in ReadBuildID() 301 if (!memory_->ReadFully(gnu_build_id_offset_ + offset, &(name[0]), hdr.n_namesz)) { in ReadBuildID() 317 if (memory_->ReadFully(gnu_build_id_offset_ + offset, &build_id[0], hdr.n_descsz)) { in ReadBuildID() 341 if (memory_->ReadFully(sh_offset, &shdr, sizeof(shdr))) { in ReadSectionHeaders() 350 if (!memory_->ReadFully(offset, &shdr, sizeof(shdr))) { in ReadSectionHeaders() [all …]
|
D | RegsArm.cpp | 104 if (!elf_memory->ReadFully(elf_offset, &data, sizeof(data))) { in StepIfSignalHandler() 124 if (!process_memory->ReadFully(sp, &data, sizeof(data))) { in StepIfSignalHandler() 149 if (!process_memory->ReadFully(sp, &data, sizeof(data))) { in StepIfSignalHandler() 164 if (!process_memory->ReadFully(offset, regs_.data(), sizeof(uint32_t) * ARM_REG_LAST)) { in StepIfSignalHandler()
|
D | RegsX86.cpp | 56 if (!process_memory->ReadFully(regs_[X86_REG_SP], &new_pc, sizeof(new_pc)) || in SetPcFromReturnAddress() 120 if (!elf_memory->ReadFully(elf_offset, &data, sizeof(data))) { in StepIfSignalHandler() 136 if (!process_memory->ReadFully(regs_[X86_REG_SP] + 4, &context, sizeof(context))) { in StepIfSignalHandler() 161 if (!process_memory->ReadFully(regs_[X86_REG_SP] + 8, &ptr, sizeof(ptr))) { in StepIfSignalHandler() 166 if (!process_memory->ReadFully(ptr + 0x14, &x86_ucontext.uc_mcontext, sizeof(x86_mcontext_t))) { in StepIfSignalHandler()
|
D | JitDebug.cpp | 86 if (!memory_->ReadFully(addr, &desc, sizeof(desc))) { in ReadDescriptor32() 100 if (!memory_->ReadFully(addr, &desc, sizeof(desc))) { in ReadDescriptor64() 114 if (!memory_->ReadFully(entry_addr_, &code, sizeof(code))) { in ReadEntry32Pack() 125 if (!memory_->ReadFully(entry_addr_, &code, sizeof(code))) { in ReadEntry32Pad() 136 if (!memory_->ReadFully(entry_addr_, &code, sizeof(code))) { in ReadEntry64()
|
D | DexFiles.cpp | 88 if (!memory_->ReadFully(addr + field_offset, &entry, sizeof(entry))) { in ReadEntryPtr32() 97 if (!memory_->ReadFully(addr + field_offset, &entry, sizeof(entry))) { in ReadEntryPtr64() 105 if (!memory_->ReadFully(entry_addr_, &entry, sizeof(entry)) || entry.dex_file == 0) { in ReadEntry32() 117 if (!memory_->ReadFully(entry_addr_, &entry, sizeof(entry)) || entry.dex_file == 0) { in ReadEntry64()
|
D | RegsX86_64.cpp | 57 if (!process_memory->ReadFully(regs_[X86_64_REG_SP], &new_pc, sizeof(new_pc)) || in SetPcFromReturnAddress() 140 if (!elf_memory->ReadFully(elf_offset, &data, sizeof(data)) || data != 0x0f0000000fc0c748) { in StepIfSignalHandler() 145 if (!elf_memory->ReadFully(elf_offset + 8, &data2, sizeof(data2)) || data2 != 0x0f05) { in StepIfSignalHandler() 157 if (!process_memory->ReadFully(regs_[X86_64_REG_SP] + 0x28, &x86_64_ucontext.uc_mcontext, in StepIfSignalHandler()
|
D | Elf.cpp | 208 if (!memory->ReadFully(0, e_ident, SELFMAG)) { in IsValidElf() 225 if (!memory->ReadFully(EI_CLASS, &class_type, 1)) { in GetInfo() 262 if (!memory->ReadFully(EI_CLASS, &class_type_, 1)) { in CreateInterfaceFromMemory() 267 if (!memory->ReadFully(EI_NIDENT + sizeof(Elf32_Half), &e_machine, sizeof(e_machine))) { in CreateInterfaceFromMemory() 288 if (!memory->ReadFully(EI_NIDENT + sizeof(Elf64_Half), &e_machine, sizeof(e_machine))) { in CreateInterfaceFromMemory()
|
/system/core/qemu_pipe/ |
D | qemu_pipe.cpp | 27 using android::base::ReadFully; 86 if (!ReadFully(fd, header, 4)) { in qemu_pipe_frame_recv() 101 if (!ReadFully(fd, buff, size)) { in qemu_pipe_frame_recv()
|
/system/core/adb/tls/tests/ |
D | tls_connection_test.cpp | 306 ASSERT_TRUE(client_->ReadFully(buf.data(), msg_.size())); in TEST_F() 310 auto data = server_->ReadFully(msg_.size()); in TEST_F() 330 auto data = client_->ReadFully(msg_.size()); in TEST_F() 334 auto data = server_->ReadFully(msg_.size()); in TEST_F() 357 auto data = client_->ReadFully(msg_.size()); in TEST_F() 361 auto data = server_->ReadFully(msg_.size()); in TEST_F() 388 auto data = client_->ReadFully(msg_.size()); in TEST_F() 392 auto data = server_->ReadFully(msg_.size()); in TEST_F() 506 auto data = client_->ReadFully(msg_.size()); in TEST_F() 510 auto data = server_->ReadFully(msg_.size()); in TEST_F()
|
/system/core/fs_mgr/liblp/ |
D | reader.cpp | 41 virtual bool ReadFully(void* buffer, size_t length) = 0; 47 bool ReadFully(void* buffer, size_t length) override { in ReadFully() function in android::fs_mgr::FileReader 48 return android::base::ReadFully(fd_, buffer, length); in ReadFully() 59 bool ReadFully(void* out, size_t length) override { in ReadFully() function in android::fs_mgr::MemoryReader 124 if (!android::base::ReadFully(fd, buffer.get(), LP_METADATA_GEOMETRY_SIZE)) { in ReadPrimaryGeometry() 137 if (!android::base::ReadFully(fd, buffer.get(), LP_METADATA_GEOMETRY_SIZE)) { in ReadBackupGeometry() 172 if (!reader->ReadFully(&header, sizeof(LpMetadataHeaderV1_0))) { in ReadMetadataHeader() 201 if (!reader->ReadFully(offset, remaining_bytes)) { in ReadMetadataHeader() 271 if (!reader->ReadFully(buffer.get(), header.tables_size)) { in ParseMetadata()
|
/system/core/adb/tls/include/adb/tls/ |
D | tls_connection.h | 100 virtual std::vector<uint8_t> ReadFully(size_t size) = 0; 105 virtual bool ReadFully(void* buf, size_t size) = 0;
|
/system/libbase/ |
D | abi_compatibility.cpp | 52 bool ReadFully(int fd, void* data, size_t byte_count) { in ReadFully() function 53 return ReadFully(borrowed_fd(fd), data, byte_count); in ReadFully()
|
/system/apex/apexd/ |
D | apexd_verity.cpp | 34 using android::base::ReadFully; 89 if (!ReadFully(fd, buf.data(), block_size)) { in GenerateHashTree() 127 if (!ReadFully(fd.get(), root_verity.data(), block_size)) { in CalculateRootDigest()
|
/system/core/adb/tls/ |
D | tls_connection.cpp | 49 std::vector<uint8_t> ReadFully(size_t size) override; 50 bool ReadFully(void* buf, size_t size) override; 309 std::vector<uint8_t> TlsConnectionImpl::ReadFully(size_t size) { in ReadFully() function in adb::tls::__anon2995fb160111::TlsConnectionImpl 311 if (!ReadFully(buf.data(), buf.size())) { in ReadFully() 318 bool TlsConnectionImpl::ReadFully(void* buf, size_t size) { in ReadFully() function in adb::tls::__anon2995fb160111::TlsConnectionImpl
|
/system/core/fs_mgr/libdm/ |
D | loop_control_test.cpp | 62 ASSERT_TRUE(android::base::ReadFully(loop_fd, buffer, sizeof(buffer))); in TEST()
|