Home
last modified time | relevance | path

Searched refs:ReadFully (Results 1 – 25 of 75) sorted by relevance

123

/system/unwinding/libunwindstack/tests/
DMemoryOfflineBufferTest.cpp58 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()
DMemoryThreadCacheTest.cpp49 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 …]
DMemoryCacheTest.cpp48 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 …]
DMemoryFileTest.cpp52 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 …]
DMemoryRangeTest.cpp47 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()
DMemoryBufferTest.cpp38 ASSERT_FALSE(memory_->ReadFully(0, buffer.data(), 1)); in TEST_F()
57 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()
DMemoryLocalTest.cpp36 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()
DMemoryRemoteTest.cpp53 ASSERT_TRUE(remote.ReadFully(reinterpret_cast<uint64_t>(src.data()), dst.data(), 1024)); in TEST_F()
71 ASSERT_TRUE(remote.ReadFully(reinterpret_cast<uint64_t>(src.data()), dst.data(), src.size())); in TEST_F()
124 ASSERT_TRUE(remote.ReadFully(reinterpret_cast<uint64_t>(src), dst.data(), pagesize)); in TEST_F()
129 ASSERT_FALSE(remote.ReadFully(reinterpret_cast<uint64_t>(src) + pagesize, dst.data(), 1)); in TEST_F()
130 ASSERT_TRUE(remote.ReadFully(reinterpret_cast<uint64_t>(src) + pagesize - 1, dst.data(), 1)); in TEST_F()
131 ASSERT_FALSE(remote.ReadFully(reinterpret_cast<uint64_t>(src) + pagesize - 4, dst.data(), 8)); in TEST_F()
134 ASSERT_FALSE(remote.ReadFully(UINT64_MAX - 100, dst.data(), 200)); in TEST_F()
146 ASSERT_FALSE(remote.ReadFully(UINT64_MAX - 100, dst.data(), 200)); in TEST_F()
155 ASSERT_FALSE(remote.ReadFully(0, dst.data(), 1)); in TEST_F()
156 ASSERT_FALSE(remote.ReadFully(0, dst.data(), 100)); in TEST_F()
DMapInfoCreateMemoryTest.cpp121 ASSERT_TRUE(memory->ReadFully(0, buffer.data(), 1024)); in TEST_F()
128 ASSERT_FALSE(memory->ReadFully(1024, buffer.data(), 1)); in TEST_F()
190 ASSERT_TRUE(memory->ReadFully(0, buffer.data(), 0x100)); in TEST_F()
197 ASSERT_FALSE(memory->ReadFully(0x100, buffer.data(), 1)); in TEST_F()
215 ASSERT_TRUE(memory->ReadFully(0, e_ident, SELFMAG)); in TEST_F()
219 ASSERT_TRUE(memory->ReadFully(0x1000, e_ident, 1)); in TEST_F()
233 ASSERT_TRUE(memory->ReadFully(0, e_ident, SELFMAG)); in TEST_F()
237 ASSERT_TRUE(memory->ReadFully(0x1000, e_ident, 1)); in TEST_F()
272 ASSERT_TRUE(memory->ReadFully(0, buffer.data(), buffer.size())); in TEST_F()
279 ASSERT_FALSE(memory->ReadFully(buffer.size(), buffer.data(), 1)); in TEST_F()
[all …]
DMemoryLocalUnsafeTest.cpp37 ASSERT_TRUE(local->ReadFully(reinterpret_cast<uint64_t>(src.data()), dst.data(), 1024)); in TEST()
44 ASSERT_TRUE(local->ReadFully(reinterpret_cast<uint64_t>(src.data()), dst.data(), 1024)); in TEST()
DMapInfoGetElfTest.cpp197 ASSERT_TRUE(elf->memory()->ReadFully(0, buffer.data(), buffer.size())); in TEST_F()
203 ASSERT_FALSE(elf->memory()->ReadFully(buffer.size(), buffer.data(), 1)); in TEST_F()
225 ASSERT_TRUE(elf->memory()->ReadFully(0, buffer.data(), 0x1000)); in TEST_F()
231 ASSERT_FALSE(elf->memory()->ReadFully(0x1000, buffer.data(), 1)); in TEST_F()
259 ASSERT_TRUE(elf->memory()->ReadFully(0, buffer.data(), 0x1000)); in TEST_F()
263 ASSERT_TRUE(elf->memory()->ReadFully(0x1000, buffer.data(), 1)); in TEST_F()
287 ASSERT_TRUE(elf->memory()->ReadFully(0, buffer.data(), 0x1000)); in TEST_F()
291 ASSERT_TRUE(elf->memory()->ReadFully(0x1000, buffer.data(), 1)); in TEST_F()
318 ASSERT_TRUE(elf->memory()->ReadFully(0, buffer.data(), 0x1000)); in TEST_F()
322 ASSERT_TRUE(elf->memory()->ReadFully(0x1000, buffer.data(), 1)); in TEST_F()
/system/unwinding/libunwindstack/
DElfInterface.cpp133 if (!elf_memory->ReadFully(info.offset, compressed.data(), info.size)) { in CreateMemoryFromCompressedSection()
196 if (!memory_->ReadFully(0, &ehdr, sizeof(ehdr))) { in ReadAllHeaders()
212 if (!memory->ReadFully(0, &ehdr, sizeof(ehdr))) { in GetLoadBias()
219 if (!memory->ReadFully(offset, &phdr, sizeof(phdr))) { in GetLoadBias()
237 if (!memory_->ReadFully(offset, &phdr, sizeof(phdr))) { in ReadProgramHeaders()
298 if (!memory_->ReadFully(gnu_build_id_offset_ + offset, &hdr, sizeof(hdr))) { in ReadBuildID()
308 if (!memory_->ReadFully(gnu_build_id_offset_ + offset, &(name[0]), hdr.n_namesz)) { in ReadBuildID()
324 if (memory_->ReadFully(gnu_build_id_offset_ + offset, &build_id[0], hdr.n_descsz)) { in ReadBuildID()
347 if (memory_->ReadFully(sh_offset, &shdr, sizeof(shdr))) { in ReadSectionHeaders()
356 if (!memory_->ReadFully(offset, &shdr, sizeof(shdr))) { in ReadSectionHeaders()
[all …]
DRegsX86.cpp56 if (!process_memory->ReadFully(regs_[X86_REG_SP], &new_pc, sizeof(new_pc)) || in SetPcFromReturnAddress()
119 if (!elf->memory()->ReadFully(elf_offset, &data, sizeof(data))) { in StepIfSignalHandler()
135 if (!process_memory->ReadFully(regs_[X86_REG_SP] + 4, &context, sizeof(context))) { in StepIfSignalHandler()
160 if (!process_memory->ReadFully(regs_[X86_REG_SP] + 8, &ptr, sizeof(ptr))) { in StepIfSignalHandler()
165 if (!process_memory->ReadFully(ptr + 0x14, &x86_ucontext.uc_mcontext, sizeof(x86_mcontext_t))) { in StepIfSignalHandler()
DRegsArm.cpp103 if (!elf->memory()->ReadFully(elf_offset, &data, sizeof(data))) { in StepIfSignalHandler()
123 if (!process_memory->ReadFully(sp, &data, sizeof(data))) { in StepIfSignalHandler()
148 if (!process_memory->ReadFully(sp, &data, sizeof(data))) { in StepIfSignalHandler()
163 if (!process_memory->ReadFully(offset, regs_.data(), sizeof(uint32_t) * ARM_REG_LAST)) { in StepIfSignalHandler()
DRegsX86_64.cpp57 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 != 0x05) { in StepIfSignalHandler()
156 if (!process_memory->ReadFully(regs_[X86_64_REG_SP] + 0x28, &x86_64_ucontext.uc_mcontext, in StepIfSignalHandler()
DElf.cpp215 if (!memory->ReadFully(0, e_ident, SELFMAG)) { in IsValidElf()
232 if (!memory->ReadFully(EI_CLASS, &class_type, 1)) { in GetInfo()
287 if (!memory->ReadFully(EI_CLASS, &class_type_, 1)) { in CreateInterfaceFromMemory()
292 if (!memory->ReadFully(EI_NIDENT + sizeof(Elf32_Half), &e_machine, sizeof(e_machine))) { in CreateInterfaceFromMemory()
309 if (!memory->ReadFully(EI_NIDENT + sizeof(Elf64_Half), &e_machine, sizeof(e_machine))) { in CreateInterfaceFromMemory()
DGlobalDebugImpl.h100 if (!this->memory_->ReadFully(addr, &desc, kSizeOfDescriptorV2)) { in ReadDescriptor()
103 if (!this->memory_->ReadFully(addr, &desc, kSizeOfDescriptorV1)) { in ReadDescriptor()
250 if (!memory_->ReadFully(uid.address, &data, jit_entry_size_)) { in ReadNewEntries()
309 if (!(memory_->ReadFully(next_field_addr, &address[i], sizeof(address[i])))) { in ReadNextField()
320 if (!memory_->ReadFully(address[i] + seqlock_offset_, &seqlock[i], sizeof(seqlock[i]))) { in ReadNextField()
DJitDebug.cpp31 if (dst_ptr == nullptr || !memory->ReadFully(addr, dst_ptr, size)) { in Load()
/system/unwinding/libunwindstack/include/unwindstack/
DMemory.h59 bool ReadFully(uint64_t addr, void* dst, size_t size);
62 return ReadFully(addr, dst, sizeof(uint32_t)); in Read32()
66 return ReadFully(addr, dst, sizeof(uint64_t)); in Read64()
/system/core/fs_mgr/liblp/
Dreader.cpp41 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/libbase/
Dabi_compatibility.cpp56 bool ReadFully(int fd, void* data, size_t byte_count) { in ReadFully() function
57 return ReadFully(borrowed_fd(fd), data, byte_count); in ReadFully()
/system/core/fastboot/
Dsuper_flash_helper_test.cpp72 ASSERT_TRUE(android::base::ReadFully(real_super_fd, expected.data(), expected.size())); in TEST()
77 ASSERT_TRUE(android::base::ReadFully(fb_super.fd, actual.data(), actual.size())); in TEST()
/system/apex/apexd/
Dapexd_verity.cpp37 using android::base::ReadFully;
95 if (!ReadFully(fd, buf.data(), block_size)) { in GenerateHashTree()
133 if (!ReadFully(fd.get(), root_verity.data(), block_size)) { in CalculateRootDigest()
/system/core/debuggerd/libdebuggerd/
Dgwp_asan.cpp34 return process_memory->ReadFully(state_addr, state, sizeof(*state)); in retrieve_gwp_asan_state()
58 if (!process_memory->ReadFully(metadata_addr, meta, in retrieve_gwp_asan_metadata()
/system/core/fs_mgr/libdm/
Dloop_control_test.cpp62 ASSERT_TRUE(android::base::ReadFully(loop_fd, buffer, sizeof(buffer))); in TEST()

123