/system/core/libunwindstack/tests/ |
D | MemoryOfflineBufferTest.cpp | 59 ASSERT_FALSE(memory_->ReadFully(0, buffer.data(), 1)); in TEST_F() 60 ASSERT_FALSE(memory_->ReadFully(0xfff, buffer.data(), 1)); in TEST_F() 61 ASSERT_FALSE(memory_->ReadFully(0xfff, buffer.data(), 2)); in TEST_F() 62 ASSERT_FALSE(memory_->ReadFully(0x3000, buffer.data(), 1)); in TEST_F() 63 ASSERT_FALSE(memory_->ReadFully(0x3001, buffer.data(), 1)); in TEST_F() 68 ASSERT_TRUE(memory_->ReadFully(kStart, buffer.data(), 10)); in TEST_F() 71 ASSERT_TRUE(memory_->ReadFully(kStart + 555, buffer.data(), 40)); in TEST_F() 74 ASSERT_TRUE(memory_->ReadFully(kStart + kLength - 105, buffer.data(), 105)); in TEST_F() 86 ASSERT_TRUE(memory_->ReadFully(kStart, buffer.data(), 100)); in TEST_F() 90 ASSERT_TRUE(memory_->ReadFully(0x12000, buffer.data(), 100)); in TEST_F()
|
D | MemoryCacheTest.cpp | 49 ASSERT_TRUE(memory_cache_->ReadFully(0x8000 + i, buffer.data(), i)) in TEST_F() 58 ASSERT_TRUE(memory_cache_->ReadFully(0x8000 + i, buffer.data(), i)) in TEST_F() 67 ASSERT_TRUE(memory_cache_->ReadFully(0x8000 + i, buffer.data(), i)) in TEST_F() 77 ASSERT_TRUE(memory_cache_->ReadFully(0x8000 + i, buffer.data(), i)) in TEST_F() 88 ASSERT_TRUE(memory_cache_->ReadFully(0x8ff0, buffer.data(), 32)); in TEST_F() 94 ASSERT_TRUE(memory_cache_->ReadFully(0x8ff0, buffer.data(), 32)); in TEST_F() 101 ASSERT_TRUE(memory_cache_->ReadFully(0x8000 + i, buffer.data(), i)) in TEST_F() 110 ASSERT_TRUE(memory_cache_->ReadFully(0x8000 + i, buffer.data(), i)) in TEST_F() 118 ASSERT_TRUE(memory_cache_->ReadFully(0xa010, buffer.data(), kMaxCachedSize)); in TEST_F() 123 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 | 39 ASSERT_FALSE(memory_->ReadFully(0, buffer.data(), 1)); in TEST_F() 58 ASSERT_TRUE(memory_->ReadFully(0, buffer.data(), buffer.size())); in TEST_F() 67 ASSERT_FALSE(memory_->ReadFully(0, buffer.data(), 101)); in TEST_F() 68 ASSERT_FALSE(memory_->ReadFully(100, buffer.data(), 1)); in TEST_F() 69 ASSERT_FALSE(memory_->ReadFully(101, buffer.data(), 2)); in TEST_F() 70 ASSERT_FALSE(memory_->ReadFully(99, buffer.data(), 2)); in TEST_F() 71 ASSERT_TRUE(memory_->ReadFully(99, buffer.data(), 1)); in TEST_F() 78 ASSERT_FALSE(memory_->ReadFully(UINT64_MAX - 100, buffer.data(), 200)); in TEST_F()
|
D | MemoryRangeTest.cpp | 48 ASSERT_TRUE(range.ReadFully(0, dst.data(), dst.size())); in TEST_F() 60 ASSERT_TRUE(range.ReadFully(1020, dst.data(), 4)); in TEST_F() 66 ASSERT_FALSE(range.ReadFully(1020, dst.data(), 5)); in TEST_F() 67 ASSERT_FALSE(range.ReadFully(1024, dst.data(), 1)); in TEST_F() 68 ASSERT_FALSE(range.ReadFully(1024, dst.data(), 1024)); in TEST_F() 71 ASSERT_TRUE(range.ReadFully(1020, dst.data(), 4)); in TEST_F() 79 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 | 74 ASSERT_TRUE(remote.ReadFully(reinterpret_cast<uint64_t>(src.data()), dst.data(), 1024)); in TEST_F() 103 ASSERT_TRUE(remote.ReadFully(reinterpret_cast<uint64_t>(src.data()), dst.data(), src.size())); in TEST_F() 177 ASSERT_TRUE(remote.ReadFully(reinterpret_cast<uint64_t>(src), dst.data(), pagesize)); in TEST_F() 182 ASSERT_FALSE(remote.ReadFully(reinterpret_cast<uint64_t>(src) + pagesize, dst.data(), 1)); in TEST_F() 183 ASSERT_TRUE(remote.ReadFully(reinterpret_cast<uint64_t>(src) + pagesize - 1, dst.data(), 1)); in TEST_F() 184 ASSERT_FALSE(remote.ReadFully(reinterpret_cast<uint64_t>(src) + pagesize - 4, dst.data(), 8)); in TEST_F() 187 ASSERT_FALSE(remote.ReadFully(UINT64_MAX - 100, dst.data(), 200)); in TEST_F() 210 ASSERT_FALSE(remote.ReadFully(UINT64_MAX - 100, dst.data(), 200)); in TEST_F() 229 ASSERT_FALSE(remote.ReadFully(0, dst.data(), 1)); in TEST_F() 230 ASSERT_FALSE(remote.ReadFully(0, dst.data(), 100)); in TEST_F()
|
D | MapInfoCreateMemoryTest.cpp | 127 ASSERT_TRUE(memory->ReadFully(0, buffer.data(), 1024)); in TEST_F() 134 ASSERT_FALSE(memory->ReadFully(1024, buffer.data(), 1)); in TEST_F() 196 ASSERT_TRUE(memory->ReadFully(0, buffer.data(), 0x100)); in TEST_F() 203 ASSERT_FALSE(memory->ReadFully(0x100, buffer.data(), 1)); in TEST_F() 221 ASSERT_TRUE(memory->ReadFully(0, e_ident, SELFMAG)); in TEST_F() 225 ASSERT_TRUE(memory->ReadFully(0x1000, e_ident, 1)); in TEST_F() 239 ASSERT_TRUE(memory->ReadFully(0, e_ident, SELFMAG)); in TEST_F() 243 ASSERT_TRUE(memory->ReadFully(0x1000, e_ident, 1)); in TEST_F() 278 ASSERT_TRUE(memory->ReadFully(0, buffer.data(), buffer.size())); in TEST_F() 285 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/ |
D | ElfInterface.cpp | 82 if (!memory_->ReadFully(gnu_debugdata_offset_, src.data(), gnu_debugdata_size_)) { in CreateGnuDebugdataMemory() 164 if (!memory_->ReadFully(0, &ehdr, sizeof(ehdr))) { in ReadAllHeaders() 180 if (!memory->ReadFully(0, &ehdr, sizeof(ehdr))) { in GetLoadBias() 187 if (!memory->ReadFully(offset, &phdr, sizeof(phdr))) { in GetLoadBias() 202 if (!memory_->ReadFully(offset, &phdr, sizeof(phdr))) { in ReadProgramHeaders() 254 if (!memory_->ReadFully(gnu_build_id_offset_ + offset, &hdr, sizeof(hdr))) { in ReadBuildID() 264 if (!memory_->ReadFully(gnu_build_id_offset_ + offset, &(name[0]), hdr.n_namesz)) { in ReadBuildID() 280 if (memory_->ReadFully(gnu_build_id_offset_ + offset, &build_id[0], hdr.n_descsz)) { in ReadBuildID() 304 if (memory_->ReadFully(sh_offset, &shdr, sizeof(shdr))) { in ReadSectionHeaders() 313 if (!memory_->ReadFully(offset, &shdr, sizeof(shdr))) { in ReadSectionHeaders() [all …]
|
D | RegsArm.cpp | 77 if (!elf->memory()->ReadFully(adjusted_rel_pc - 5, &value, sizeof(value)) || in GetPcAdjustment() 135 if (!elf_memory->ReadFully(rel_pc, &data, sizeof(data))) { in StepIfSignalHandler() 155 if (!process_memory->ReadFully(sp, &data, sizeof(data))) { in StepIfSignalHandler() 180 if (!process_memory->ReadFully(sp, &data, sizeof(data))) { in StepIfSignalHandler() 195 if (!process_memory->ReadFully(offset, regs_.data(), sizeof(uint32_t) * ARM_REG_LAST)) { in StepIfSignalHandler()
|
D | JitDebug.cpp | 85 if (!memory_->ReadFully(addr, &desc, sizeof(desc))) { in ReadDescriptor32() 99 if (!memory_->ReadFully(addr, &desc, sizeof(desc))) { in ReadDescriptor64() 113 if (!memory_->ReadFully(entry_addr_, &code, sizeof(code))) { in ReadEntry32Pack() 124 if (!memory_->ReadFully(entry_addr_, &code, sizeof(code))) { in ReadEntry32Pad() 135 if (!memory_->ReadFully(entry_addr_, &code, sizeof(code))) { in ReadEntry64()
|
D | RegsX86.cpp | 63 if (!process_memory->ReadFully(regs_[X86_REG_SP], &new_pc, sizeof(new_pc)) || in SetPcFromReturnAddress() 127 if (!elf_memory->ReadFully(rel_pc, &data, sizeof(data))) { in StepIfSignalHandler() 143 if (!process_memory->ReadFully(regs_[X86_REG_SP] + 4, &context, sizeof(context))) { in StepIfSignalHandler() 168 if (!process_memory->ReadFully(regs_[X86_REG_SP] + 8, &ptr, sizeof(ptr))) { in StepIfSignalHandler() 173 if (!process_memory->ReadFully(ptr + 0x14, &x86_ucontext.uc_mcontext, sizeof(x86_mcontext_t))) { in StepIfSignalHandler()
|
D | DexFiles.cpp | 77 if (!memory_->ReadFully(addr + field_offset, &entry, sizeof(entry))) { in ReadEntryPtr32() 86 if (!memory_->ReadFully(addr + field_offset, &entry, sizeof(entry))) { in ReadEntryPtr64() 94 if (!memory_->ReadFully(entry_addr_, &entry, sizeof(entry)) || entry.dex_file == 0) { in ReadEntry32() 106 if (!memory_->ReadFully(entry_addr_, &entry, sizeof(entry)) || entry.dex_file == 0) { in ReadEntry64()
|
D | RegsX86_64.cpp | 64 if (!process_memory->ReadFully(regs_[X86_64_REG_SP], &new_pc, sizeof(new_pc)) || in SetPcFromReturnAddress() 147 if (!elf_memory->ReadFully(rel_pc, &data, sizeof(data)) || data != 0x0f0000000fc0c748) { in StepIfSignalHandler() 152 if (!elf_memory->ReadFully(rel_pc + 8, &data2, sizeof(data2)) || data2 != 0x0f05) { in StepIfSignalHandler() 164 if (!process_memory->ReadFully(regs_[X86_64_REG_SP] + 0x28, &x86_64_ucontext.uc_mcontext, in StepIfSignalHandler()
|
D | Elf.cpp | 199 if (!memory->ReadFully(0, e_ident, SELFMAG)) { in IsValidElf() 216 if (!memory->ReadFully(EI_CLASS, &class_type, 1)) { in GetInfo() 253 if (!memory->ReadFully(EI_CLASS, &class_type_, 1)) { in CreateInterfaceFromMemory() 258 if (!memory->ReadFully(EI_NIDENT + sizeof(Elf32_Half), &e_machine, sizeof(e_machine))) { in CreateInterfaceFromMemory() 279 if (!memory->ReadFully(EI_NIDENT + sizeof(Elf64_Half), &e_machine, sizeof(e_machine))) { in CreateInterfaceFromMemory()
|
D | RegsArm64.cpp | 132 if (!elf_memory->ReadFully(rel_pc, &data, sizeof(data))) { in StepIfSignalHandler() 145 if (!process_memory->ReadFully(regs_[ARM64_REG_SP] + 0x80 + 0xb0 + 0x08, regs_.data(), in StepIfSignalHandler()
|
D | Memory.cpp | 148 bool Memory::ReadFully(uint64_t addr, void* dst, size_t size) { in ReadFully() function in unwindstack::Memory 158 if (!ReadFully(addr, &value, sizeof(value))) { in ReadString() 347 if (!memory_file->ReadFully(0, &start, sizeof(start))) { in Init() 422 if (!impl_->ReadFully(addr_page << kCacheBits, cache_dst, kCacheSize)) { in Read() 445 if (!impl_->ReadFully(addr_page << kCacheBits, cache_dst, kCacheSize)) { in Read()
|
D | Symbols.cpp | 72 if (!elf_memory->ReadFully(cur_offset_, &entry, sizeof(entry))) { in GetName() 111 if (!elf_memory->ReadFully(cur_offset, &entry, sizeof(entry))) { in GetGlobal()
|
D | RegsMips.cpp | 138 if (!elf_memory->ReadFully(rel_pc, &data, sizeof(data))) { in StepIfSignalHandler() 163 if (!process_memory->ReadFully(regs_[MIPS_REG_SP] + offset, values, sizeof(values))) { in StepIfSignalHandler()
|
/system/core/qemu_pipe/ |
D | qemu_pipe.cpp | 27 using android::base::ReadFully; 87 if (!ReadFully(fd, header, 4)) { in qemu_pipe_frame_recv() 102 if (!ReadFully(fd, buff, size)) { in qemu_pipe_frame_recv()
|
/system/core/fs_mgr/liblp/ |
D | reader.cpp | 37 virtual bool ReadFully(void* buffer, size_t length) = 0; 43 bool ReadFully(void* buffer, size_t length) override { in ReadFully() function in android::fs_mgr::FileReader 44 return android::base::ReadFully(fd_, buffer, length); in ReadFully() 55 bool ReadFully(void* out, size_t length) override { in ReadFully() function in android::fs_mgr::MemoryReader 120 if (!android::base::ReadFully(fd, buffer.get(), LP_METADATA_GEOMETRY_SIZE)) { in ReadPrimaryGeometry() 133 if (!android::base::ReadFully(fd, buffer.get(), LP_METADATA_GEOMETRY_SIZE)) { in ReadBackupGeometry() 217 if (!reader->ReadFully(&metadata->header, sizeof(metadata->header))) { in ParseMetadata() 235 if (!reader->ReadFully(buffer.get(), header.tables_size)) { in ParseMetadata()
|
/system/core/libunwindstack/include/unwindstack/ |
D | Memory.h | 47 bool ReadFully(uint64_t addr, void* dst, size_t size); 50 return ReadFully(addr, dst, sizeof(uint32_t)); in Read32() 54 return ReadFully(addr, dst, sizeof(uint64_t)); in Read64()
|
/system/core/fs_mgr/libdm/ |
D | loop_control_test.cpp | 62 ASSERT_TRUE(android::base::ReadFully(loop_fd, buffer, sizeof(buffer))); in TEST()
|
D | dm_test.cpp | 158 ASSERT_TRUE(android::base::ReadFully(dev_fd, sector, sizeof(sector))); in TEST() 160 ASSERT_TRUE(android::base::ReadFully(dev_fd, sector, sizeof(sector))); in TEST()
|