Lines Matching refs:error_msg

133                        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()
193 file_->GetPath().c_str(), error_msg), in Setup()
194 error_msg)) { in Setup()
195 *error_msg = StringPrintf("Failed to map ELF program headers: %s", error_msg->c_str()); in Setup()
201 file_->GetPath().c_str(), error_msg), in Setup()
202 error_msg)) { in Setup()
203 *error_msg = StringPrintf("Failed to map ELF file: %s", error_msg->c_str()); in Setup()
211 if (!CheckAndSet(GetHeader().e_phoff, "program headers", &program_headers_start_, error_msg)) { in Setup()
216 if (!CheckAndSet(GetHeader().e_shoff, "section headers", &section_headers_start_, error_msg)) { in Setup()
223 *error_msg = StringPrintf("Failed to find shstrtab section header in ELF file: '%s'", in Setup()
231 *error_msg = StringPrintf("Failed to find PT_DYNAMIC program header in ELF file: '%s'", in Setup()
237 reinterpret_cast<byte**>(&dynamic_section_start_), error_msg)) { in Setup()
245 *error_msg = StringPrintf("Failed to find section header for section %d in ELF file: '%s'", in Setup()
252 reinterpret_cast<byte**>(&symtab_section_start_), error_msg)) { in Setup()
259 reinterpret_cast<byte**>(&dynsym_section_start_), error_msg)) { in Setup()
271 reinterpret_cast<byte**>(&dynstr_section_start_), error_msg)) { in Setup()
280 reinterpret_cast<byte**>(&strtab_section_start_), error_msg)) { in Setup()
300 reinterpret_cast<byte**>(&hash_section_start_), error_msg)) { in Setup()
309 if (!CheckSectionsExist(error_msg)) { in Setup()
328 byte** target, std::string* error_msg) { in CheckAndSet() argument
330 *error_msg = StringPrintf("Offset %d is out of range for %s in ELF file: '%s'", offset, label, in CheckAndSet()
369 bool ElfFile::CheckSectionsExist(std::string* error_msg) const { in CheckSectionsExist()
373 *error_msg = StringPrintf("No section headers in ELF file: '%s'", file_->GetPath().c_str()); in CheckSectionsExist()
380 *error_msg = StringPrintf("Failed to find PT_DYNAMIC program header in ELF file: '%s'", in CheckSectionsExist()
387 *error_msg = StringPrintf("Failed to find dynamic section in ELF file: '%s'", in CheckSectionsExist()
397 *error_msg = StringPrintf("No strtab for symtab in ELF file: '%s'", file_->GetPath().c_str()); in CheckSectionsExist()
404 *error_msg = StringPrintf("Symtab is not linked to the strtab in ELF file: '%s'", in CheckSectionsExist()
412 *error_msg = StringPrintf("No dynstr in ELF file: '%s'", file_->GetPath().c_str()); in CheckSectionsExist()
416 *error_msg = StringPrintf("No dynsym in ELF file: '%s'", file_->GetPath().c_str()); in CheckSectionsExist()
422 *error_msg = StringPrintf("Failed to find hash section in ELF file: '%s'", in CheckSectionsExist()
430 *error_msg = StringPrintf("Hash section is not linked to the dynstr in ELF file: '%s'", in CheckSectionsExist()
443 *error_msg = StringPrintf("Shstrtab is not in the mapped ELF file: '%s'", in CheckSectionsExist()
452 bool ElfFile::SetMap(MemMap* map, std::string* error_msg) { in SetMap() argument
455 DCHECK(!error_msg->empty()); in SetMap()
467 *error_msg = StringPrintf("Failed to find ELF magic value %d %d %d %d in %s, found %d %d %d %d", in SetMap()
477 *error_msg = StringPrintf("Failed to find expected EI_CLASS value %d in %s, found %d", in SetMap()
484 *error_msg = StringPrintf("Failed to find expected EI_DATA value %d in %s, found %d", in SetMap()
491 *error_msg = StringPrintf("Failed to find expected EI_VERSION value %d in %s, found %d", in SetMap()
498 *error_msg = StringPrintf("Failed to find expected e_type value %d in %s, found %d", in SetMap()
505 *error_msg = StringPrintf("Failed to find expected e_version value %d in %s, found %d", in SetMap()
512 *error_msg = StringPrintf("Failed to find expected e_entry value %d in %s, found %d", in SetMap()
519 *error_msg = StringPrintf("Failed to find non-zero e_phoff value in %s", in SetMap()
524 *error_msg = StringPrintf("Failed to find non-zero e_shoff value in %s", in SetMap()
529 *error_msg = StringPrintf("Failed to find non-zero e_ehsize value in %s", in SetMap()
534 *error_msg = StringPrintf("Failed to find non-zero e_phentsize value in %s", in SetMap()
539 *error_msg = StringPrintf("Failed to find non-zero e_phnum value in %s", in SetMap()
544 *error_msg = StringPrintf("Failed to find non-zero e_shentsize value in %s", in SetMap()
549 *error_msg = StringPrintf("Failed to find non-zero e_shnum value in %s", in SetMap()
554 *error_msg = StringPrintf("Failed to find non-zero e_shstrndx value in %s", in SetMap()
559 *error_msg = StringPrintf("Failed to find e_shnum value %d less than %d in %s", in SetMap()
568 *error_msg = StringPrintf("Failed to find e_phoff value %d less than %zd in %s", in SetMap()
575 *error_msg = StringPrintf("Failed to find e_shoff value %d less than %zd in %s", in SetMap()
1042 bool ElfFile::Load(bool executable, std::string* error_msg) { in Load() argument
1073 *error_msg = oss.str(); in Load()
1082 *error_msg = StringPrintf("No program header for entry %d in ELF file %s.", in Load()
1110 *error_msg = StringPrintf("Failed to get length of file: '%s' fd=%d: %s", in Load()
1127 error_msg)); in Load()
1129 *error_msg = StringPrintf("Failed to allocate %s: %s", in Load()
1130 reservation_name.c_str(), error_msg->c_str()); in Load()
1168 *error_msg = StringPrintf("File size of %zd bytes not large enough to contain ELF segment " in Load()
1180 error_msg)); in Load()
1182 *error_msg = StringPrintf("Failed to map ELF file segment %d from %s: %s", in Load()
1183 i, file_->GetPath().c_str(), error_msg->c_str()); in Load()
1187 *error_msg = StringPrintf("Failed to map ELF file segment %d from %s at expected address %p, " in Load()
1198 *error_msg = StringPrintf("dynamic section address invalid in ELF file %s", in Load()
1210 *error_msg = StringPrintf("DT_HASH value %p does not refer to a loaded ELF segment of %s", in Load()
1219 *error_msg = StringPrintf("DT_HASH value %p does not refer to a loaded ELF segment of %s", in Load()
1228 *error_msg = StringPrintf("DT_HASH value %p does not refer to a loaded ELF segment of %s", in Load()
1237 *error_msg = StringPrintf("DT_NULL found after %d .dynamic entries, " in Load()
1248 if (!CheckSectionsExist(error_msg)) { in Load()
1594 std::string error_msg; in GdbJITSupport() local
1598 MAP_PRIVATE, &error_msg)); in GdbJITSupport()