Home
last modified time | relevance | path

Searched refs:elfFile (Results 1 – 9 of 9) sorted by relevance

/developtools/profiler/hiebpf/src/
Delf_symbol_info.cpp27 std::unique_ptr<ElfFile> elfFile = ElfFile::MakeUnique(fileName); in GetSymbolTable() local
28 CHECK_NOTNULL(elfFile, false, "elf '%s' load failed\n", fileName.c_str()); in GetSymbolTable()
32 for (auto &phdr : elfFile->phdrs_) { in GetSymbolTable()
44 if (elfFile->shdrs_.find(symTab) != elfFile->shdrs_.end()) { in GetSymbolTable()
46 const auto &shdr = elfFile->shdrs_[symTab]; in GetSymbolTable()
47 const uint8_t *data = elfFile->GetSectionData(shdr->secIndex_); in GetSymbolTable()
55 … CHECK_TRUE(elfFile->shdrs_.find(strTab) != elfFile->shdrs_.end(), false, "get symbol tab failed"); in GetSymbolTable()
56 const auto &strshdr = elfFile->shdrs_[strTab]; in GetSymbolTable()
57 data = elfFile->GetSectionData(strshdr->secIndex_); in GetSymbolTable()
64 … CHECK_TRUE(elfFile->shdrs_.find(dynSym) != elfFile->shdrs_.end(), false, "get symbol tab failed"); in GetSymbolTable()
[all …]
Dbpf_controller.cpp388 std::unique_ptr<ElfFile> elfFile = ElfFile::MakeUnique(path); in GetSymOffset() local
389 CHECK_NOTNULL(elfFile, 0, "ELF file open failed"); in GetSymOffset()
391 …CHECK_TRUE(elfFile->shdrs_.find(dynsym) != elfFile->shdrs_.end(), 0, "section dynsym failed to obt… in GetSymOffset()
392 const auto &sym = elfFile->shdrs_[dynsym]; in GetSymOffset()
393 const uint8_t *symData = elfFile->GetSectionData(sym->secIndex_); in GetSymOffset()
396 …CHECK_TRUE(elfFile->shdrs_.find(dynstr) != elfFile->shdrs_.end(), 0, "section dynstr failed to obt… in GetSymOffset()
397 const auto &str = elfFile->shdrs_[dynstr]; in GetSymOffset()
398 const uint8_t *strData = elfFile->GetSectionData(str->secIndex_); in GetSymOffset()
419 …CHECK_TRUE(elfFile->shdrs_.find(text) != elfFile->shdrs_.end(), 0, "section text failed to obtain … in GetSymOffset()
420 const auto &textPtr = elfFile->shdrs_[text]; in GetSymOffset()
/developtools/hiperf/src/
Dhiperf_libreport.cpp228 std::unique_ptr<ElfFile> elfFile = ElfFile::MakeUnique(elfPath); in ReportGetBuildId() local
229 if (elfFile == nullptr) { in ReportGetBuildId()
232 for (const auto &shdrPair : elfFile->shdrs_) { in ReportGetBuildId()
235 const unsigned char *data = elfFile->GetSectionData(shdr->secIndex_); in ReportGetBuildId()
251 std::unique_ptr<ElfFile> elfFile = ElfFile::MakeUnique(elfPath); in ReportGetElfArch() local
254 if (elfFile == nullptr or elfFile->ehdr_ == nullptr) { in ReportGetElfArch()
257 switch (elfFile->ehdr_->machine_) { in ReportGetElfArch()
274 HLOGD("elf '%s' mache value is '%x'(%s) \n", elfPath, elfFile->ehdr_->machine_, in ReportGetElfArch()
Dsymbols_file.cpp351 std::unique_ptr<ElfFile> elfFile = LoadElfFile(elfPath); in LoadDebugInfo() local
352 if (elfFile == nullptr) { in LoadDebugInfo()
358 for (const auto &phdr : elfFile->phdrs_) { in LoadDebugInfo()
371 if (!ParseShdr(std::move(elfFile))) { in LoadDebugInfo()
574 bool ReadSymTab(const std::unique_ptr<ElfFile> &elfFile, const ELF::SectionHeader *shdr, in ReadSymTab() argument
582 if (!elfFile->ParseSymTable(shdr)) { in ReadSymTab()
589 for (const std::unique_ptr<ElfSymbol> &symbol : elfFile->symTable_->symbols_) { in ReadSymTab()
606 std::string name = elfFile->GetStrPtr(shdr->link_, symbol->nameIndex_); in ReadSymTab()
625 bool ParseShdr(const std::unique_ptr<ElfFile> elfFile) in ParseShdr() argument
628 for (const auto &shdrPair : elfFile->shdrs_) { in ParseShdr()
[all …]
/developtools/profiler/device/plugins/native_daemon/src/
Dsymbols_file.cpp324 std::unique_ptr<ElfFile> elfFile = LoadElfFile(elfPath); in LoadDebugInfo() local
325 if (elfFile == nullptr) { in LoadDebugInfo()
331 for (auto &phdr : elfFile->phdrs_) { in LoadDebugInfo()
344 if (!ParseShdr(std::move(elfFile))) { in LoadDebugInfo()
550 bool ReadSymTab(const std::unique_ptr<ElfFile> &elfFile, const ELF::SectionHeader *shdr, in ReadSymTab() argument
554 if (!elfFile->ParseSymTable(shdr)) { in ReadSymTab()
561 for (const std::unique_ptr<ElfSymbol> &symbol : elfFile->symTable_->symbols_) { in ReadSymTab()
578 std::string name = elfFile->GetStrPtr(shdr->link_, symbol->nameIndex_); in ReadSymTab()
596 bool ParseShdr(const std::unique_ptr<ElfFile> elfFile) in ParseShdr() argument
599 for (const auto &shdrPair : elfFile->shdrs_) { in ParseShdr()
[all …]
/developtools/profiler/device/plugins/native_daemon/test/unittest/common/native/
Delf_parser_test.cpp142 std::unique_ptr<ElfFileFromReadelf> elfFile {new (std::nothrow) ElfFileFromReadelf(fileType)}; in MakeUnique() local
143 if (elfFile == nullptr) { in MakeUnique()
147 if (!elfFile->Init()) { in MakeUnique()
152 return elfFile; in MakeUnique()
1322 const std::unique_ptr<ElfFile> &elfFile) in CompareElfHeader() argument
1324 const auto &ehdr1 = elfFile->ehdr_; in CompareElfHeader()
1363 const std::unique_ptr<ElfFile> &elfFile) in CompareSecHeaders() argument
1365 const auto &shdrs1 = elfFile->shdrs_; in CompareSecHeaders()
1378 const std::unique_ptr<ElfFile> &elfFile) in ComparePrgHeaders() argument
1380 const auto &phdrs1 = elfFile->phdrs_; in ComparePrgHeaders()
/developtools/hiperf/test/unittest/common/native/
Delf_parser_test.cpp143 std::unique_ptr<ElfFileFromReadelf> elfFile {new (std::nothrow) ElfFileFromReadelf(fileType)}; in MakeUnique() local
144 if (elfFile == nullptr) { in MakeUnique()
148 if (!elfFile->Init()) { in MakeUnique()
153 return elfFile; in MakeUnique()
1335 const std::unique_ptr<ElfFile> &elfFile) in CompareElfHeader() argument
1337 const auto &ehdr1 = elfFile->ehdr_; in CompareElfHeader()
1376 const std::unique_ptr<ElfFile> &elfFile) in CompareSecHeaders() argument
1378 const auto &shdrs1 = elfFile->shdrs_; in CompareSecHeaders()
1391 const std::unique_ptr<ElfFile> &elfFile) in ComparePrgHeaders() argument
1393 const auto &phdrs1 = elfFile->phdrs_; in ComparePrgHeaders()
/developtools/smartperf_host/trace_streamer/src/parser/htrace_pbreader_parser/
Dhtrace_parser.cpp118 std::unique_ptr<ElfFile> elfFile = ElfFile::MakeUnique(relativeFilePath); in ParserFileSO() local
119 if (elfFile == nullptr) { in ParserFileSO()
127 GetSymbols(std::move(elfFile), symbolInfo, absoluteFilePath); in ParserFileSO()
/developtools/profiler/host/smartperf/trace_streamer/src/parser/htrace_pbreader_parser/
Dhtrace_parser.cpp121 std::unique_ptr<ElfFile> elfFile = ElfFile::MakeUnique(relativeFilePath); in ParserFileSO() local
122 if (elfFile == nullptr) { in ParserFileSO()
130 GetSymbols(std::move(elfFile), symbolInfo, absoluteFilePath); in ParserFileSO()