1 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 2 // -*- Mode: C++ -*- 3 // 4 // Copyright (C) 2013-2022 Red Hat, Inc. 5 // 6 // Author: Dodji Seketeli 7 8 /// @file 9 /// 10 /// This file contains the declarations of the entry points to 11 /// de-serialize an instance of @ref abigail::corpus from a file in 12 /// elf format, containing dwarf information. 13 14 #ifndef __ABG_DWARF_READER_H__ 15 #define __ABG_DWARF_READER_H__ 16 17 #include <ostream> 18 #include <elfutils/libdwfl.h> 19 #include "abg-corpus.h" 20 #include "abg-suppression.h" 21 #include "abg-elf-based-reader.h" 22 23 namespace abigail 24 { 25 26 /// The namespace for the DWARF reader. 27 namespace dwarf 28 { 29 30 using namespace abigail::ir; 31 32 elf_based_reader_sptr 33 create_reader(const std::string& elf_path, 34 const vector<char**>& debug_info_root_paths, 35 environment& environment, 36 bool read_all_types = false, 37 bool linux_kernel_mode = false); 38 39 void 40 reset_reader(elf_based_reader& rdr, 41 const std::string& elf_path, 42 const vector<char**>& debug_info_root_paths, 43 bool read_all_types = false, 44 bool linux_kernel_mode = false); 45 46 corpus_sptr 47 read_corpus_from_elf(const std::string& elf_path, 48 const vector<char**>& debug_info_root_paths, 49 environment& environment, 50 bool load_all_types, 51 fe_iface::status& status); 52 53 bool 54 lookup_symbol_from_elf(const environment& env, 55 const string& elf_path, 56 const string& symbol_name, 57 bool demangle, 58 vector<elf_symbol_sptr>& symbols); 59 60 bool 61 lookup_public_function_symbol_from_elf(const environment& env, 62 const string& path, 63 const string& symname, 64 vector<elf_symbol_sptr>& func_syms); 65 }// end namespace dwarf 66 67 }// end namespace abigail 68 69 #endif //__ABG_DWARF_READER_H__ 70