Home
last modified time | relevance | path

Searched refs:error_msg (Results 1 – 25 of 62) sorted by relevance

123

/art/runtime/
Dmem_map_test.cc35 std::string error_msg; in RemapAtEndTest() local
44 &error_msg); in RemapAtEndTest()
47 ASSERT_TRUE(base0 != nullptr) << error_msg; in RemapAtEndTest()
57 &error_msg); in RemapAtEndTest()
59 EXPECT_EQ(m0->Begin(), base0) << error_msg; in RemapAtEndTest()
128 std::string error_msg; in TEST_F() local
134 &error_msg)); in TEST_F()
135 ASSERT_TRUE(map.get() != nullptr) << error_msg; in TEST_F()
136 ASSERT_TRUE(error_msg.empty()); in TEST_F()
142 &error_msg)); in TEST_F()
[all …]
Doat_file.cc47 std::string* error_msg) { in OpenWithElfFile() argument
53 return oat_file->Setup(error_msg) ? oat_file.release() : nullptr; in OpenWithElfFile()
58 std::string* error_msg) { in OpenMemory() argument
64 return oat_file->Setup(error_msg) ? oat_file.release() : nullptr; in OpenMemory()
72 std::string* error_msg) { in Open() argument
82 ret.reset(OpenDlopen(filename, location, requested_base, error_msg)); in Open()
92 *error_msg = StringPrintf("Failed to open oat filename for reading: %s", strerror(errno)); in Open()
96 error_msg)); in Open()
105 OatFile* OatFile::OpenWritable(File* file, const std::string& location, std::string* error_msg) { in OpenWritable() argument
107 return OpenElfFile(file, location, nullptr, nullptr, true, false, error_msg); in OpenWritable()
[all …]
Ddex_file_verifier_test.cc105 std::string* error_msg) { in OpenDexFileBase64() argument
126 bool success = DexFile::Open(location, location, error_msg, &tmp); in OpenDexFileBase64()
127 CHECK(success) << error_msg; in OpenDexFileBase64()
153 std::string error_msg; in TEST_F() local
155 &error_msg)); in TEST_F()
156 ASSERT_TRUE(raw.get() != nullptr) << error_msg; in TEST_F()
170 std::string* error_msg) { in FixChecksumAndOpen() argument
191 if (!DexFile::Open(location, location, error_msg, &tmp)) { in FixChecksumAndOpen()
202 std::string* error_msg) { in ModifyAndLoad() argument
213 error_msg)); in ModifyAndLoad()
[all …]
Dzip_archive_test.cc34 std::string error_msg; in TEST_F() local
35 …:unique_ptr<ZipArchive> zip_archive(ZipArchive::Open(GetLibCoreDexFileName().c_str(), &error_msg)); in TEST_F()
36 ASSERT_TRUE(zip_archive.get() != nullptr) << error_msg; in TEST_F()
37 ASSERT_TRUE(error_msg.empty()); in TEST_F()
38 std::unique_ptr<ZipEntry> zip_entry(zip_archive->Find("classes.dex", &error_msg)); in TEST_F()
40 ASSERT_TRUE(error_msg.empty()); in TEST_F()
46 bool success = zip_entry->ExtractToFile(*file, &error_msg); in TEST_F()
47 ASSERT_TRUE(success) << error_msg; in TEST_F()
48 ASSERT_TRUE(error_msg.empty()); in TEST_F()
Dzip_archive.cc43 bool ZipEntry::ExtractToFile(File& file, std::string* error_msg) { in ExtractToFile() argument
46 *error_msg = std::string(ErrorCodeString(error)); in ExtractToFile()
54 std::string* error_msg) { in ExtractToMemMap() argument
60 PROT_READ | PROT_WRITE, false, error_msg)); in ExtractToMemMap()
62 DCHECK(!error_msg->empty()); in ExtractToMemMap()
69 *error_msg = std::string(ErrorCodeString(error)); in ExtractToMemMap()
90 ZipArchive* ZipArchive::Open(const char* filename, std::string* error_msg) { in Open() argument
96 *error_msg = std::string(ErrorCodeString(error)); in Open()
105 ZipArchive* ZipArchive::OpenFromFd(int fd, const char* filename, std::string* error_msg) { in OpenFromFd() argument
112 *error_msg = std::string(ErrorCodeString(error)); in OpenFromFd()
[all …]
Delf_file.cc133 std::string* error_msg, uint8_t* requested_base) { in Open() argument
145 if (!elf_file->Setup(prot, flags, error_msg)) { in Open()
151 ElfFile* ElfFile::Open(File* file, int prot, int flags, std::string* error_msg) { in Open() argument
154 if (!elf_file->Setup(prot, flags, error_msg)) { in Open()
160 bool ElfFile::Setup(int prot, int flags, std::string* error_msg) { in Setup() argument
164 *error_msg = StringPrintf("Failed to get length of file: '%s' fd=%d: %s", in Setup()
170 *error_msg = StringPrintf("File size of %zd bytes not large enough to contain ELF header of " in Setup()
180 file_->GetPath().c_str(), error_msg), in Setup()
181 error_msg)) { in Setup()
187 *error_msg = StringPrintf("File size of %zd bytes not large enough to contain ELF program " in Setup()
[all …]
Ddex_file.cc53 static int OpenAndReadMagic(const char* filename, uint32_t* magic, std::string* error_msg) { in OpenAndReadMagic() argument
57 *error_msg = StringPrintf("Unable to open '%s' : %s", filename, strerror(errno)); in OpenAndReadMagic()
62 *error_msg = StringPrintf("Failed to find magic in '%s'", filename); in OpenAndReadMagic()
66 *error_msg = StringPrintf("Failed to seek to beginning of file '%s' : %s", filename, in OpenAndReadMagic()
73 bool DexFile::GetChecksum(const char* filename, uint32_t* checksum, std::string* error_msg) { in GetChecksum() argument
89 ScopedFd fd(OpenAndReadMagic(file_part, &magic, error_msg)); in GetChecksum()
91 DCHECK(!error_msg->empty()); in GetChecksum()
95 …std::unique_ptr<ZipArchive> zip_archive(ZipArchive::OpenFromFd(fd.release(), filename, error_msg)); in GetChecksum()
97 *error_msg = StringPrintf("Failed to open zip archive '%s'", file_part); in GetChecksum()
100 std::unique_ptr<ZipEntry> zip_entry(zip_archive->Find(zip_entry_name, error_msg)); in GetChecksum()
[all …]
Dzip_archive.h39 bool ExtractToFile(File& file, std::string* error_msg);
41 std::string* error_msg);
61 static ZipArchive* Open(const char* filename, std::string* error_msg);
62 static ZipArchive* OpenFromFd(int fd, const char* filename, std::string* error_msg);
64 ZipEntry* Find(const char* name, std::string* error_msg) const;
Doat_file.h46 std::string* error_msg);
54 std::string* error_msg);
61 static OatFile* OpenWritable(File* file, const std::string& location, std::string* error_msg);
63 static OatFile* OpenReadable(File* file, const std::string& location, std::string* error_msg);
68 std::string* error_msg);
225 const DexFile* OpenDexFile(std::string* error_msg) const;
298 std::string* error_msg);
306 std::string* error_msg);
309 bool Dlopen(const std::string& elf_filename, byte* requested_base, std::string* error_msg);
313 std::string* error_msg);
[all …]
Dmem_map.cc137 std::string* error_msg) { in ContainedWithinExistingMap() argument
140 *error_msg = StringPrintf("Failed to build process map"); in ContainedWithinExistingMap()
151 *error_msg = StringPrintf("Requested region 0x%08" PRIxPTR "-0x%08" PRIxPTR " does not overlap " in ContainedWithinExistingMap()
161 std::string* error_msg) { in CheckNonOverlapping() argument
164 *error_msg = StringPrintf("Failed to build process map"); in CheckNonOverlapping()
173 *error_msg = StringPrintf("Requested region 0x%08" PRIxPTR "-0x%08" PRIxPTR " overlaps with " in CheckNonOverlapping()
195 std::string* error_msg) { in CheckMapRequest() argument
235 *error_msg = os.str(); in CheckMapRequest()
240 bool low_4gb, std::string* error_msg) { in MapAnonymous() argument
267 *error_msg = StringPrintf("ashmem_create_region failed for '%s': %s", name, strerror(errno)); in MapAnonymous()
[all …]
Delf_file.h43 static ElfFile* Open(File* file, bool writable, bool program_header_only, std::string* error_msg,
47 static ElfFile* Open(File* file, int mmap_prot, int mmap_flags, std::string* error_msg);
112 bool Load(bool executable, std::string* error_msg);
117 bool Setup(int prot, int flags, std::string* error_msg);
119 bool SetMap(MemMap* map, std::string* error_msg);
143 bool CheckSectionsExist(std::string* error_msg) const;
149 bool CheckAndSet(Elf32_Off offset, const char* label, byte** target, std::string* error_msg);
Dmem_map.h64 bool low_4gb, std::string* error_msg);
71 const char* filename, std::string* error_msg) { in MapFile() argument
72 return MapFileAtAddress(NULL, byte_count, prot, flags, fd, start, false, filename, error_msg); in MapFile()
85 std::string* error_msg);
132 std::string* error_msg);
/art/runtime/gc/space/
Dimage_space.cc143 std::string* error_msg) { in GenerateImage() argument
148 *error_msg = "Failed to generate image because no boot class path specified"; in GenerateImage()
195 return Exec(arg_vector, error_msg); in GenerateImage()
228 std::string error_msg; in FindImageFilename() local
229 if (!GetDalvikCacheFilename(image_location, dalvik_cache.c_str(), cache_filename, &error_msg)) { in FindImageFilename()
230 LOG(WARNING) << error_msg; in FindImageFilename()
252 InstructionSet isa, std::string* error_msg) { in RelocateImage() argument
294 return Exec(argv, error_msg); in RelocateImage()
297 static ImageHeader* ReadSpecificImageHeader(const char* filename, std::string* error_msg) { in ReadSpecificImageHeader() argument
300 *error_msg = StringPrintf("Unable to read image header for %s", filename); in ReadSpecificImageHeader()
[all …]
Dimage_space.h46 static ImageSpace* Create(const char* image, InstructionSet image_isa, std::string* error_msg)
59 std::string* error_msg);
132 bool validate_oat_file, std::string* error_msg)
135 OatFile* OpenOatFile(const char* image, std::string* error_msg) const
138 bool ValidateOatFile(std::string* error_msg) const
/art/compiler/
Delf_writer_test.cc90 std::string error_msg; in TEST_F() local
91 std::unique_ptr<ElfFile> ef(ElfFile::Open(file.get(), false, false, &error_msg)); in TEST_F()
92 CHECK(ef.get() != nullptr) << error_msg; in TEST_F()
98 std::string error_msg; in TEST_F() local
99 std::unique_ptr<ElfFile> ef(ElfFile::Open(file.get(), false, false, &error_msg)); in TEST_F()
100 CHECK(ef.get() != nullptr) << error_msg; in TEST_F()
106 std::string error_msg; in TEST_F() local
107 std::unique_ptr<ElfFile> ef(ElfFile::Open(file.get(), false, true, &error_msg)); in TEST_F()
108 CHECK(ef.get() != nullptr) << error_msg; in TEST_F()
109 CHECK(ef->Load(false, &error_msg)) << error_msg; in TEST_F()
Delf_patcher.h39 std::string* error_msg)
45 std::string* error_msg)
50 std::string* error_msg) in Patch() argument
53 DefaultImageAddressCallback, nullptr, error_msg); in Patch()
58 std::string* error_msg) in Patch() argument
61 DefaultImageAddressCallback, nullptr, error_msg); in Patch()
67 ImageAddressCallback cb, void* cb_data, std::string* error_msg) in ElfPatcher() argument
70 cb_data_(cb_data), error_msg_(error_msg), in ElfPatcher()
Delf_writer.cc44 std::string error_msg; in GetOatElfInformation() local
45 std::unique_ptr<ElfFile> elf_file(ElfFile::Open(file, false, false, &error_msg)); in GetOatElfInformation()
46 CHECK(elf_file.get() != nullptr) << error_msg; in GetOatElfInformation()
/art/runtime/base/
Dscoped_flock.cc28 bool ScopedFlock::Init(const char* filename, std::string* error_msg) { in Init() argument
35 *error_msg = StringPrintf("Failed to open file '%s': %s", filename, strerror(errno)); in Init()
40 *error_msg = StringPrintf("Failed to lock file '%s': %s", filename, strerror(errno)); in Init()
46 *error_msg = StringPrintf("Failed to fstat file '%s': %s", filename, strerror(errno)); in Init()
64 bool ScopedFlock::Init(File* file, std::string* error_msg) { in Init() argument
68 *error_msg = StringPrintf("Failed to duplicate open file '%s': %s", in Init()
74 …*error_msg = StringPrintf("Failed to lock file '%s': %s", file->GetPath().c_str(), strerror(errno)… in Init()
Dscoped_flock_test.cc27 std::string error_msg; in TEST_F() local
35 &error_msg)); in TEST_F()
37 ASSERT_FALSE(file_lock.Init("/guaranteed/not/to/exist", &error_msg)); in TEST_F()
Dscoped_flock.h39 bool Init(const char* filename, std::string* error_msg);
43 bool Init(File* file, std::string* error_msg);
/art/compiler/utils/
Dassembler_test.h348 EXPECT_TRUE(res.ok) << res.error_msg; in Driver()
384 std::string error_msg; member
391 bool Assemble(const char* from_file, const char* to_file, std::string* error_msg) { in Assemble() argument
405 return Exec(args, error_msg); in Assemble()
417 std::string error_msg; in Objdump() local
431 if (!Exec(args, &error_msg)) { in Objdump()
432 EXPECT_TRUE(false) << error_msg; in Objdump()
465 std::string error_msg; in DisassembleBinaries() local
466 if (!DisassembleBinary(data_name, &error_msg)) { in DisassembleBinaries()
467 LOG(INFO) << "Error disassembling: " << error_msg; in DisassembleBinaries()
[all …]
/art/runtime/verifier/
Dmethod_verifier_test.cc38 std::string error_msg; in VerifyClass() local
39 ASSERT_TRUE(MethodVerifier::VerifyClass(klass, true, &error_msg) == MethodVerifier::kNoFailure) in VerifyClass()
40 << error_msg; in VerifyClass()
/art/runtime/native/
Djava_lang_VMClassLoader.cc87 std::string error_msg; in VMClassLoader_getBootClassPathResource() local
88 std::unique_ptr<ZipArchive> zip_archive(ZipArchive::Open(location.c_str(), &error_msg)); in VMClassLoader_getBootClassPathResource()
90 LOG(WARNING) << "Failed to open zip archive '" << location << "': " << error_msg; in VMClassLoader_getBootClassPathResource()
93 std::unique_ptr<ZipEntry> zip_entry(zip_archive->Find(name.c_str(), &error_msg)); in VMClassLoader_getBootClassPathResource()
/art/dex2oat/
Ddex2oat.cc312 std::string* error_msg) { in ReadImageClassesFromZip() argument
313 std::unique_ptr<ZipArchive> zip_archive(ZipArchive::Open(zip_filename, error_msg)); in ReadImageClassesFromZip()
317 std::unique_ptr<ZipEntry> zip_entry(zip_archive->Find(image_classes_filename, error_msg)); in ReadImageClassesFromZip()
319 *error_msg = StringPrintf("Failed to find '%s' within '%s': %s", image_classes_filename, in ReadImageClassesFromZip()
320 zip_filename, error_msg->c_str()); in ReadImageClassesFromZip()
325 error_msg)); in ReadImageClassesFromZip()
327 *error_msg = StringPrintf("Failed to extract '%s' from '%s': %s", image_classes_filename, in ReadImageClassesFromZip()
328 zip_filename, error_msg->c_str()); in ReadImageClassesFromZip()
338 const std::string& oat_location, std::string* error_msg) { in PatchOatCode() argument
342 MAP_SHARED, error_msg)); in PatchOatCode()
[all …]
/art/patchoat/
Dpatchoat.cc94 std::string error_msg; in LocationToFilename() local
96 &cache_filename, &error_msg)) { in LocationToFilename()
168 std::string error_msg; in Patch() local
172 &error_msg)); in Patch()
174 LOG(ERROR) << "unable to map image file " << input_image->GetPath() << " : " << error_msg; in Patch()
263 std::string error_msg; in Patch() local
267 &error_msg)); in Patch()
269 LOG(ERROR) << "unable to map image file " << input_image->GetPath() << " : " << error_msg; in Patch()
275 PROT_READ | PROT_WRITE, MAP_PRIVATE, &error_msg)); in Patch()
277 LOG(ERROR) << "unable to open oat file " << input_oat->GetPath() << " : " << error_msg; in Patch()
[all …]

123