libabigail
Loading...
Searching...
No Matches
abg-dwarf-reader.h
Go to the documentation of this file.
1// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
2// -*- Mode: C++ -*-
3//
4// Copyright (C) 2013-2026 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"
22
23namespace abigail
24{
25
26/// The namespace for the DWARF reader.
27namespace dwarf
28{
29
30using namespace abigail::ir;
31
32elf_based_reader_sptr
33create_reader(const std::string& elf_path,
34 const vector<string>& debug_info_root_paths,
36 const abigail::fe_iface::options_type& options);
37
38elf_based_reader_sptr
39create_reader(const std::string& elf_path,
40 const vector<string>& debug_info_root_paths,
42
43void
45 const std::string& elf_path,
46 const vector<string>& debug_info_root_paths,
47 const abigail::fe_iface::options_type& options);
48
49corpus_sptr
50read_corpus_from_elf(const std::string& elf_path,
51 const vector<string>& debug_info_root_paths,
54 fe_iface::status& status);
55
56corpus_sptr
57read_corpus_from_elf(const std::string& elf_path,
58 const vector<string>& debug_info_root_paths,
60 fe_iface::status& status);
61
62bool
64 const string& elf_path,
65 const string& symbol_name,
66 bool demangle,
67 vector<elf_symbol_sptr>& symbols);
68
69bool
71 const string& path,
72 const string& symname,
73 vector<elf_symbol_sptr>& func_syms);
74}// end namespace dwarf
75
76}// end namespace abigail
77
78#endif //__ABG_DWARF_READER_H__
This file contains the declarations for an elf-based. DWARF and CTF readers can inherit this one.
The common interface of readers based on ELF.
status
The status of the fe_iface::read_corpus call.
This is an abstraction of the set of resources necessary to manage several aspects of the internal re...
Definition abg-ir.h:216
bool lookup_symbol_from_elf(const environment &env, const string &elf_path, const string &symbol_name, bool demangle, vector< elf_symbol_sptr > &syms)
Look into the symbol tables of a given elf file and see if we find a given symbol.
corpus_sptr read_corpus_from_elf(const std::string &elf_path, const vector< string > &debug_info_root_paths, environment &environment, const fe_iface::options_type &options, fe_iface::status &status)
Read all abigail::translation_unit possible from the debug info accessible from an elf file,...
void reset_reader(elf_based_reader &rdr, const std::string &elf_path, const vector< string > &debug_info_root_path, const fe_iface::options_type &options)
Re-initialize a reader so that it can re-used to read another binary.
bool lookup_public_function_symbol_from_elf(environment &env, const string &path, const string &symname, vector< elf_symbol_sptr > &syms)
Look into the symbol tables of an elf file to see if a public function of a given name is found.
elf_based_reader_sptr create_reader(const std::string &elf_path, const vector< string > &debug_info_root_paths, environment &environment, const fe_iface::options_type &options)
Create a dwarf::reader.
The namespace of the internal representation of ABI artifacts like types and decls.
Toplevel namespace for libabigail.
The generic options that control the behaviour of all Front-End interfaces.