mirror of
git://sourceware.org/git/libabigail.git
synced 2025-01-29 21:02:48 +00:00
99a6fce808
It's this time of the year again. This patch updates the copyright years notice in the preamble of each source code file to include year 2025. This is done by updating and executing the shell script update-copyright.sh. * include/abg-btf-reader.h: Update copyright year to include 2025. * include/abg-comp-filter.h: Likewise. * include/abg-comparison.h: Likewise. * include/abg-config.h: Likewise. * include/abg-corpus.h: Likewise. * include/abg-ctf-reader.h: Likewise. * include/abg-cxx-compat.h: Likewise. * include/abg-diff-utils.h: Likewise. * include/abg-dwarf-reader.h: Likewise. * include/abg-elf-based-reader.h: Likewise. * include/abg-elf-reader.h: Likewise. * include/abg-fe-iface.h: Likewise. * include/abg-fwd.h: Likewise. * include/abg-hash.h: Likewise. * include/abg-ini.h: Likewise. * include/abg-interned-str.h: Likewise. * include/abg-ir.h: Likewise. * include/abg-libxml-utils.h: Likewise. * include/abg-reader.h: Likewise. * include/abg-regex.h: Likewise. * include/abg-reporter.h: Likewise. * include/abg-sptr-utils.h: Likewise. * include/abg-suppression.h: Likewise. * include/abg-tools-utils.h: Likewise. * include/abg-traverse.h: Likewise. * include/abg-viz-common.h: Likewise. * include/abg-viz-dot.h: Likewise. * include/abg-viz-svg.h: Likewise. * include/abg-workers.h: Likewise. * include/abg-writer.h: Likewise. * src/abg-btf-reader.cc: Likewise. * src/abg-comp-filter.cc: Likewise. * src/abg-comparison-priv.h: Likewise. * src/abg-comparison.cc: Likewise. * src/abg-config.cc: Likewise. * src/abg-corpus-priv.h: Likewise. * src/abg-corpus.cc: Likewise. * src/abg-ctf-reader.cc: Likewise. * src/abg-default-reporter.cc: Likewise. * src/abg-diff-utils.cc: Likewise. * src/abg-dwarf-reader.cc: Likewise. * src/abg-elf-based-reader.cc: Likewise. * src/abg-elf-helpers.cc: Likewise. * src/abg-elf-helpers.h: Likewise. * src/abg-elf-reader.cc: Likewise. * src/abg-fe-iface.cc: Likewise. * src/abg-hash.cc: Likewise. * src/abg-ini.cc: Likewise. * src/abg-internal.h: Likewise. * src/abg-ir-priv.h: Likewise. * src/abg-ir.cc: Likewise. * src/abg-leaf-reporter.cc: Likewise. * src/abg-libxml-utils.cc: Likewise. * src/abg-reader.cc: Likewise. * src/abg-regex.cc: Likewise. * src/abg-reporter-priv.cc: Likewise. * src/abg-reporter-priv.h: Likewise. * src/abg-suppression-priv.h: Likewise. * src/abg-suppression.cc: Likewise. * src/abg-symtab-reader.cc: Likewise. * src/abg-symtab-reader.h: Likewise. * src/abg-tools-utils.cc: Likewise. * src/abg-traverse.cc: Likewise. * src/abg-viz-common.cc: Likewise. * src/abg-viz-dot.cc: Likewise. * src/abg-viz-svg.cc: Likewise. * src/abg-workers.cc: Likewise. * src/abg-writer.cc: Likewise. * tests/print-diff-tree.cc: Likewise. * tests/test-abicompat.cc: Likewise. * tests/test-abidiff-exit.cc: Likewise. * tests/test-abidiff.cc: Likewise. * tests/test-alt-dwarf-file.cc: Likewise. * tests/test-core-diff.cc: Likewise. * tests/test-cxx-compat.cc: Likewise. * tests/test-diff-dwarf-abixml.cc: Likewise. * tests/test-diff-dwarf.cc: Likewise. * tests/test-diff-filter.cc: Likewise. * tests/test-diff-pkg.cc: Likewise. * tests/test-diff-suppr.cc: Likewise. * tests/test-diff2.cc: Likewise. * tests/test-dot.cc: Likewise. * tests/test-elf-helpers.cc: Likewise. * tests/test-ini.cc: Likewise. * tests/test-ir-walker.cc: Likewise. * tests/test-kmi-whitelist.cc: Likewise. * tests/test-lookup-syms.cc: Likewise. * tests/test-read-btf.cc: Likewise. * tests/test-read-ctf.cc: Likewise. * tests/test-read-dwarf.cc: Likewise. * tests/test-read-write.cc: Likewise. * tests/test-svg.cc: Likewise. * tests/test-symtab-reader.cc: Likewise. * tests/test-symtab.cc: Likewise. * tests/test-tools-utils.cc: Likewise. * tests/test-types-stability.cc: Likewise. * tests/test-utils.cc: Likewise. * tests/test-utils.h: Likewise. * tools/abicompat.cc: Likewise. * tools/abidiff.cc: Likewise. * tools/abidw.cc: Likewise. * tools/abilint.cc: Likewise. * tools/abipkgdiff.cc: Likewise. * tools/abisym.cc: Likewise. * tools/binilint.cc: Likewise. * tools/kmidiff.cc: Likewise. * update-copyright.sh: Likewise. Signed-off-by: Dodji Seketeli <dodji@redhat.com>
173 lines
3.6 KiB
C++
173 lines
3.6 KiB
C++
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
// -*- Mode: C++ -*-
|
|
//
|
|
// Copyright (C) 2022-2025 Red Hat, Inc.
|
|
//
|
|
// Author: Dodji Seketeli
|
|
|
|
/// @file
|
|
///
|
|
/// This file contains the declarations for the @ref fe_iface a.k.a
|
|
/// "Front End Interface".
|
|
|
|
#ifndef __ABG_FE_IFACE_H__
|
|
#define __ABG_FE_IFACE_H__
|
|
|
|
#include "abg-ir.h"
|
|
#include "abg-suppression.h"
|
|
|
|
namespace abigail
|
|
{
|
|
|
|
/// The base class of all libabigail front-ends: The Front End Interface.
|
|
///
|
|
/// A front end reads a given type of binary format and constructs a
|
|
/// libagbigail internal representation from it.
|
|
///
|
|
/// The middle-end then manipulates that IR.
|
|
class fe_iface
|
|
{
|
|
protected:
|
|
struct priv;
|
|
priv* priv_;
|
|
|
|
public:
|
|
|
|
/// The status of the @ref fe_iface::read_corpus call.
|
|
enum status
|
|
{
|
|
/// The status is in an unknown state
|
|
STATUS_UNKNOWN = 0,
|
|
|
|
/// This status is for when the call went OK.
|
|
STATUS_OK = 1,
|
|
|
|
/// This status is for when the debug info could not be read.
|
|
STATUS_DEBUG_INFO_NOT_FOUND = 1 << 1,
|
|
|
|
/// This status is for when the alternate debug info could not be
|
|
/// found.
|
|
STATUS_ALT_DEBUG_INFO_NOT_FOUND = 1 << 2,
|
|
|
|
/// This status is for when the symbols of the ELF binaries could
|
|
/// not be read.
|
|
STATUS_NO_SYMBOLS_FOUND = 1 << 3,
|
|
};
|
|
|
|
/// The generic options that control the behaviour of all Front-End
|
|
/// interfaces.
|
|
struct options_type
|
|
{
|
|
environment& env;
|
|
bool load_in_linux_kernel_mode = false;
|
|
bool load_all_types = false;
|
|
/// If this option is set to true, then the functions and
|
|
/// variables that have an undefined symbol are going to be
|
|
/// represented in the IR.
|
|
bool load_undefined_interfaces = false;
|
|
bool drop_undefined_syms = false;
|
|
bool show_stats = false;
|
|
bool do_log = false;
|
|
bool leverage_dwarf_factorization = true;
|
|
bool assume_odr_for_cplusplus = true;
|
|
options_type(environment&);
|
|
|
|
};// font_end_iface::options_type
|
|
|
|
fe_iface(const std::string& corpus_path, environment& e);
|
|
|
|
virtual ~fe_iface();
|
|
|
|
virtual void
|
|
initialize(const std::string& corpus_path);
|
|
|
|
const options_type&
|
|
options() const;
|
|
|
|
options_type&
|
|
options();
|
|
|
|
const std::string&
|
|
corpus_path() const;
|
|
|
|
void
|
|
corpus_path(const std::string&);
|
|
|
|
const string&
|
|
dt_soname() const;
|
|
|
|
void
|
|
dt_soname(const string&);
|
|
|
|
bool
|
|
load_in_linux_kernel_mode() const;
|
|
|
|
suppr::suppressions_type&
|
|
suppressions();
|
|
|
|
const suppr::suppressions_type&
|
|
suppressions() const;
|
|
|
|
void
|
|
suppressions(suppr::suppressions_type&);
|
|
|
|
void
|
|
add_suppressions(const suppr::suppressions_type&);
|
|
|
|
corpus_sptr
|
|
corpus();
|
|
|
|
const corpus_sptr
|
|
corpus() const;
|
|
|
|
corpus_group_sptr&
|
|
corpus_group();
|
|
|
|
const corpus_group_sptr&
|
|
corpus_group() const;
|
|
|
|
void
|
|
corpus_group(const ir::corpus_group_sptr& cg);
|
|
|
|
bool
|
|
has_corpus_group() const;
|
|
|
|
corpus_sptr
|
|
main_corpus_from_current_group();
|
|
|
|
bool
|
|
current_corpus_is_main_corpus_from_current_group();
|
|
|
|
corpus_sptr
|
|
should_reuse_type_from_corpus_group();
|
|
|
|
void
|
|
add_fn_to_exported_or_undefined_decls(const function_decl* fn);
|
|
|
|
void
|
|
add_var_to_exported_or_undefined_decls(const var_decl_sptr& var);
|
|
|
|
virtual ir::corpus_sptr
|
|
read_corpus(status& status) = 0;
|
|
}; //end class fe_iface
|
|
|
|
typedef shared_ptr<fe_iface> fe_iface_sptr;
|
|
|
|
std::string
|
|
status_to_diagnostic_string(fe_iface::status s);
|
|
|
|
fe_iface::status
|
|
operator|(fe_iface::status, fe_iface::status);
|
|
|
|
fe_iface::status
|
|
operator&(fe_iface::status, fe_iface::status);
|
|
|
|
fe_iface::status&
|
|
operator|=(fe_iface::status&, fe_iface::status);
|
|
|
|
fe_iface::status&
|
|
operator&=(fe_iface::status&, fe_iface::status);
|
|
|
|
}// end namespace abigail
|
|
#endif // __ABG_FE_IFAC_H__
|