@@ -5,6 +5,7 @@ abg-interned-str.h \
abg-ir.h \
abg-corpus.h \
abg-reader.h \
+abg-elf-reader-status.h \
abg-dwarf-reader.h \
abg-writer.h \
abg-comparison.h \
@@ -18,6 +18,7 @@
#include <elfutils/libdwfl.h>
#include "abg-corpus.h"
#include "abg-suppression.h"
+#include "abg-elf-reader-status.h"
namespace abigail
{
@@ -28,42 +29,6 @@ namespace dwarf_reader
using namespace abigail::ir;
-/// The status of the @ref read_corpus_from_elf() 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,
-};
-
-string
-status_to_diagnostic_string(status s);
-
-status
-operator|(status, status);
-
-status
-operator&(status, status);
-
-status&
-operator|=(status&, status);
-
-status&
-operator&=(status&, status);
-
/// The kind of ELF file we are looking at.
enum elf_type
{
@@ -111,17 +76,17 @@ void
set_read_context_corpus_group(read_context& ctxt, corpus_group_sptr& group);
corpus_sptr
-read_corpus_from_elf(read_context& ctxt, status& stat);
+read_corpus_from_elf(read_context& ctxt, elf_reader::status& stat);
corpus_sptr
read_corpus_from_elf(const std::string& elf_path,
const vector<char**>& debug_info_root_paths,
ir::environment* environment,
bool load_all_types,
- status&);
+ elf_reader::status&);
corpus_sptr
-read_and_add_corpus_to_group_from_elf(read_context&, corpus_group&, status&);
+read_and_add_corpus_to_group_from_elf(read_context&, corpus_group&, elf_reader::status&);
bool
lookup_symbol_from_elf(const environment* env,
@@ -140,12 +105,12 @@ bool
refers_to_alt_debug_info(const read_context& ctxt,
string& alt_di_path);
-status
+elf_reader::status
has_alt_debug_info(read_context& ctxt,
bool& has_alt_di,
string& alt_debug_info_path);
-status
+elf_reader::status
has_alt_debug_info(const string& elf_path,
char** debug_info_root_path,
bool& has_alt_di,
new file mode 100644
@@ -0,0 +1,66 @@
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+// -*- Mode: C++ -*-
+//
+// Copyright (C) 2013-2020 Red Hat, Inc.
+//
+// Author: Dodji Seketeli
+
+/// @file
+///
+/// This file contains declarations implementing the different status
+/// in which a corpus read from an ELF file can result. It is used by
+/// the readers based on ELF files, such as DWARF and CTF.
+
+#ifndef __ABG_ELF_READER_STATUS__
+#define __ABG_ELF_READER_STATUS__
+
+#include <string>
+
+namespace abigail
+{
+
+/// The namespace for an ELF based reader.
+namespace elf_reader
+{
+
+/// The status of the @ref read_corpus_from_elf() 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,
+};
+
+std::string
+status_to_diagnostic_string(status s);
+
+status
+operator|(status, status);
+
+status
+operator&(status, status);
+
+status&
+operator|=(status&, status);
+
+status&
+operator&=(status&, status);
+
+}// end namespace elf_reader
+
+}// end namespace abigail
+
+#endif //__ABG_ELF_READER_STATUS__
@@ -26,6 +26,7 @@ abg-suppression-priv.h \
abg-suppression.cc \
abg-comp-filter.cc \
abg-reader.cc \
+abg-elf-reader-status.cc \
abg-dwarf-reader.cc \
abg-libxml-utils.cc \
abg-hash.cc \
@@ -56,6 +56,7 @@ ABG_END_EXPORT_DECLARATIONS
#endif
using std::string;
+using namespace abigail::elf_reader;
namespace abigail
{
@@ -15394,60 +15395,6 @@ build_ir_node_from_die(read_context& ctxt,
true);
}
-status
-operator|(status l, status r)
-{
- return static_cast<status>(static_cast<unsigned>(l)
- | static_cast<unsigned>(r));
-}
-
-status
-operator&(status l, status r)
-{
- return static_cast<status>(static_cast<unsigned>(l)
- & static_cast<unsigned>(r));
-}
-
-status&
-operator|=(status& l, status r)
-{
- l = l | r;
- return l;
-}
-
-status&
-operator&=(status& l, status r)
-{
- l = l & r;
- return l;
-}
-
-/// Emit a diagnostic status with english sentences to describe the
-/// problems encoded in a given abigail::dwarf_reader::status, if
-/// there is an error.
-///
-/// @param status the status to diagnose
-///
-/// @return a string containing sentences that describe the possible
-/// errors encoded in @p s. If there is no error to encode, then the
-/// empty string is returned.
-string
-status_to_diagnostic_string(status s)
-{
- string str;
-
- if (s & STATUS_DEBUG_INFO_NOT_FOUND)
- str += "could not find debug info\n";
-
- if (s & STATUS_ALT_DEBUG_INFO_NOT_FOUND)
- str += "could not find alternate debug info\n";
-
- if (s & STATUS_NO_SYMBOLS_FOUND)
- str += "could not load ELF symbols\n";
-
- return str;
-}
-
/// Create a dwarf_reader::read_context.
///
/// @param elf_path the path to the elf file the context is to be used for.
new file mode 100644
@@ -0,0 +1,87 @@
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+// -*- Mode: C++ -*-
+//
+// Copyright (C) 2013-2020 Red Hat, Inc.
+//
+// Author: Dodji Seketeli
+
+/// @file
+///
+/// This file contains the implementation of facilities to deal with
+/// status codes related to ELF based readers.
+
+#include "config.h"
+
+#include "abg-internal.h"
+
+// <headers defining libabigail's API go under here>
+ABG_BEGIN_EXPORT_DECLARATIONS
+
+#include "abg-elf-reader-status.h"
+
+ABG_END_EXPORT_DECLARATIONS
+// </headers defining libabigail's API>
+
+namespace abigail
+{
+
+namespace elf_reader
+{
+
+status
+operator|(status l, status r)
+{
+ return static_cast<status>(static_cast<unsigned>(l)
+ | static_cast<unsigned>(r));
+}
+
+status
+operator&(status l, status r)
+{
+ return static_cast<status>(static_cast<unsigned>(l)
+ & static_cast<unsigned>(r));
+}
+
+status&
+operator|=(status& l, status r)
+{
+ l = l | r;
+ return l;
+}
+
+status&
+operator&=(status& l, status r)
+{
+ l = l & r;
+ return l;
+}
+
+/// Return a diagnostic status with english sentences to describe the
+/// problems encoded in a given abigail::elf_reader::status, if
+/// there is an error.
+///
+/// @param status the status to diagnose
+///
+/// @return a string containing sentences that describe the possible
+/// errors encoded in @p s. If there is no error to encode, then the
+/// empty string is returned.
+std::string
+status_to_diagnostic_string(status s)
+{
+ std::string str;
+
+ if (s & STATUS_DEBUG_INFO_NOT_FOUND)
+ str += "could not find debug info\n";
+
+ if (s & STATUS_ALT_DEBUG_INFO_NOT_FOUND)
+ str += "could not find alternate debug info\n";
+
+ if (s & STATUS_NO_SYMBOLS_FOUND)
+ str += "could not load ELF symbols\n";
+
+ return str;
+}
+
+}// end namespace elf_reader
+
+}// end namespace abigail
@@ -2544,7 +2544,7 @@ build_corpus_group_from_kernel_dist_under(const string& root,
char *di_root_ptr = di_root.get();
vector<char**> di_roots;
di_roots.push_back(&di_root_ptr);
- abigail::dwarf_reader::status status = abigail::dwarf_reader::STATUS_OK;
+ abigail::elf_reader::status status = abigail::elf_reader::STATUS_OK;
corpus_group_sptr group;
if (!vmlinux.empty())
{
@@ -101,7 +101,7 @@ main(int argc, char* argv[])
if (!opts.elf1.empty() && !opts.elf2.empty())
{
- dwarf_reader::status c1_status, c2_status;
+ elf_reader::status c1_status, c2_status;
corpus_sptr c1, c2;
environment_sptr env(new environment);
@@ -109,7 +109,7 @@ main(int argc, char* argv[])
c1 = dwarf_reader::read_corpus_from_elf(opts.elf1, di_roots, env.get(),
/*load_all_types=*/false,
c1_status);
- if (c1_status != dwarf_reader::STATUS_OK)
+ if (c1_status != elf_reader::STATUS_OK)
{
cerr << "Failed to read elf file " << opts.elf1 << "\n";
return 1;
@@ -118,7 +118,7 @@ main(int argc, char* argv[])
c2 = dwarf_reader::read_corpus_from_elf(opts.elf2, di_roots, env.get(),
/*load_all_types=*/false,
c2_status);
- if (c2_status != dwarf_reader::STATUS_OK)
+ if (c2_status != elf_reader::STATUS_OK)
{
cerr << "Failed to read elf file " << opts.elf2 << "\n";
return 1;
@@ -380,8 +380,8 @@ main()
continue;
}
- abigail::dwarf_reader::status status =
- abigail::dwarf_reader::STATUS_UNKNOWN;
+ abigail::elf_reader::status status =
+ abigail::elf_reader::STATUS_UNKNOWN;
environment_sptr env(new environment);
std::vector<char**> di_roots;
@@ -157,7 +157,7 @@ main(int argc, char **argv)
abigail::ir::environment_sptr env(new abigail::ir::environment);
abigail::corpus_sptr c;
- abigail::dwarf_reader::status status = abigail::dwarf_reader::STATUS_OK;
+ abigail::elf_reader::status status = abigail::elf_reader::STATUS_OK;
std::vector<char**> di_roots;
if (!(c = abigail::dwarf_reader::read_corpus_from_elf(file_name, di_roots,
env.get(),
@@ -589,8 +589,8 @@ struct test_task : public abigail::workers::task
in_public_headers_path = in_elf_base + spec.in_public_headers_path;
env.reset(new abigail::ir::environment);
- abigail::dwarf_reader::status status =
- abigail::dwarf_reader::STATUS_UNKNOWN;
+ abigail::elf_reader::status status =
+ abigail::elf_reader::STATUS_UNKNOWN;
vector<char**> di_roots;
ABG_ASSERT(abigail::tools_utils::file_exists(in_elf_path));
read_context_sptr ctxt = create_read_context(in_elf_path,
@@ -34,7 +34,7 @@ using suppr::suppressions_type;
static const std::string test_data_dir =
std::string(abigail::tests::get_src_dir()) + "/tests/data/test-symtab/";
-dwarf_reader::status
+elf_reader::status
read_corpus(const std::string& path,
corpus_sptr& result,
const std::vector<std::string>& whitelist_paths =
@@ -58,10 +58,10 @@ read_corpus(const std::string& path,
dwarf_reader::add_read_context_suppressions(*ctxt, wl_suppr);
}
- dwarf_reader::status status = dwarf_reader::STATUS_UNKNOWN;
+ elf_reader::status status = elf_reader::STATUS_UNKNOWN;
result = read_corpus_from_elf(*ctxt, status);
- REQUIRE(status != dwarf_reader::STATUS_UNKNOWN);
+ REQUIRE(status != elf_reader::STATUS_UNKNOWN);
return status;
}
@@ -69,22 +69,22 @@ TEST_CASE("Symtab::Empty", "[symtab, basic]")
{
const std::string binary = "basic/empty.so";
corpus_sptr corpus_ptr;
- const dwarf_reader::status status = read_corpus(binary, corpus_ptr);
+ const elf_reader::status status = read_corpus(binary, corpus_ptr);
REQUIRE(!corpus_ptr);
- REQUIRE((status & dwarf_reader::STATUS_NO_SYMBOLS_FOUND));
+ REQUIRE((status & elf_reader::STATUS_NO_SYMBOLS_FOUND));
}
TEST_CASE("Symtab::NoDebugInfo", "[symtab, basic]")
{
const std::string binary = "basic/no_debug_info.so";
corpus_sptr corpus_ptr;
- const dwarf_reader::status status = read_corpus(binary, corpus_ptr);
+ const elf_reader::status status = read_corpus(binary, corpus_ptr);
REQUIRE(corpus_ptr);
REQUIRE(status
- == (dwarf_reader::STATUS_OK
- | dwarf_reader::STATUS_DEBUG_INFO_NOT_FOUND));
+ == (elf_reader::STATUS_OK
+ | elf_reader::STATUS_DEBUG_INFO_NOT_FOUND));
}
// this value indicates in the following helper method, that we do not want to
@@ -102,11 +102,11 @@ assert_symbol_count(const std::string& path,
std::vector<std::string>())
{
corpus_sptr corpus_ptr;
- const dwarf_reader::status status =
+ const elf_reader::status status =
read_corpus(path, corpus_ptr, whitelist_paths);
REQUIRE(corpus_ptr);
- REQUIRE((status & dwarf_reader::STATUS_OK));
+ REQUIRE((status & elf_reader::STATUS_OK));
const corpus& corpus = *corpus_ptr;
size_t total_symbols = 0;
@@ -244,10 +244,10 @@ TEST_CASE("Symtab::SymtabWithWhitelist", "[symtab, whitelist]")
+ "basic/one_function_one_variable_irrelevant.whitelist");
corpus_sptr corpus_ptr;
- const dwarf_reader::status status =
+ const elf_reader::status status =
read_corpus(binary, corpus_ptr, whitelists);
REQUIRE(!corpus_ptr);
- REQUIRE((status & dwarf_reader::STATUS_NO_SYMBOLS_FOUND));
+ REQUIRE((status & elf_reader::STATUS_NO_SYMBOLS_FOUND));
}
GIVEN("we read the binary with only the function whitelisted")
@@ -246,7 +246,7 @@ using abigail::ir::type_base_sptr;
using abigail::ir::function_type_sptr;
using abigail::ir::function_decl;
using abigail::ir::var_decl;
-using abigail::dwarf_reader::status;
+using abigail::elf_reader::status;
using abigail::dwarf_reader::read_corpus_from_elf;
using abigail::comparison::diff_context_sptr;
using abigail::comparison::diff_context;
@@ -696,7 +696,7 @@ main(int argc, char* argv[])
char * app_di_root = opts.app_di_root_path.get();
vector<char**> app_di_roots;
app_di_roots.push_back(&app_di_root);
- status status = abigail::dwarf_reader::STATUS_UNKNOWN;
+ status status = abigail::elf_reader::STATUS_UNKNOWN;
environment_sptr env(new environment);
corpus_sptr app_corpus=
read_corpus_from_elf(opts.app_path,
@@ -704,13 +704,13 @@ main(int argc, char* argv[])
/*load_all_types=*/opts.weak_mode,
status);
- if (status & abigail::dwarf_reader::STATUS_NO_SYMBOLS_FOUND)
+ if (status & abigail::elf_reader::STATUS_NO_SYMBOLS_FOUND)
{
emit_prefix(argv[0], cerr)
<< "could not read symbols from " << opts.app_path << "\n";
return abigail::tools_utils::ABIDIFF_ERROR;
}
- if (!(status & abigail::dwarf_reader::STATUS_OK))
+ if (!(status & abigail::elf_reader::STATUS_OK))
{
emit_prefix(argv[0], cerr)
<< "could not read file " << opts.app_path << "\n";
@@ -753,15 +753,15 @@ main(int argc, char* argv[])
lib1_di_roots, env.get(),
/*load_all_types=*/false,
status);
- if (status & abigail::dwarf_reader::STATUS_DEBUG_INFO_NOT_FOUND)
+ if (status & abigail::elf_reader::STATUS_DEBUG_INFO_NOT_FOUND)
emit_prefix(argv[0], cerr)
<< "could not read debug info for " << opts.lib1_path << "\n";
- if (status & abigail::dwarf_reader::STATUS_NO_SYMBOLS_FOUND)
+ if (status & abigail::elf_reader::STATUS_NO_SYMBOLS_FOUND)
{
cerr << "could not read symbols from " << opts.lib1_path << "\n";
return abigail::tools_utils::ABIDIFF_ERROR;
}
- if (!(status & abigail::dwarf_reader::STATUS_OK))
+ if (!(status & abigail::elf_reader::STATUS_OK))
{
emit_prefix(argv[0], cerr)
<< "could not read file " << opts.lib1_path << "\n";
@@ -780,16 +780,16 @@ main(int argc, char* argv[])
lib2_di_roots, env.get(),
/*load_all_types=*/false,
status);
- if (status & abigail::dwarf_reader::STATUS_DEBUG_INFO_NOT_FOUND)
+ if (status & abigail::elf_reader::STATUS_DEBUG_INFO_NOT_FOUND)
emit_prefix(argv[0], cerr)
<< "could not read debug info for " << opts.lib2_path << "\n";
- if (status & abigail::dwarf_reader::STATUS_NO_SYMBOLS_FOUND)
+ if (status & abigail::elf_reader::STATUS_NO_SYMBOLS_FOUND)
{
emit_prefix(argv[0], cerr)
<< "could not read symbols from " << opts.lib2_path << "\n";
return abigail::tools_utils::ABIDIFF_ERROR;
}
- if (!(status & abigail::dwarf_reader::STATUS_OK))
+ if (!(status & abigail::elf_reader::STATUS_OK))
{
emit_prefix(argv[0], cerr)
<< "could not read file " << opts.lib2_path << "\n";
@@ -45,6 +45,7 @@ using abigail::suppr::suppression_sptr;
using abigail::suppr::suppressions_type;
using abigail::suppr::read_suppressions;
using namespace abigail::dwarf_reader;
+using namespace abigail::elf_reader;
using abigail::tools_utils::emit_prefix;
using abigail::tools_utils::check_file;
using abigail::tools_utils::guess_file_type;
@@ -945,17 +946,17 @@ prepare_di_root_paths(options& o)
/// @return abigail::tools_utils::ABIDIFF_ERROR if an error was
/// detected, abigail::tools_utils::ABIDIFF_OK otherwise.
static abigail::tools_utils::abidiff_status
-handle_error(abigail::dwarf_reader::status status_code,
+handle_error(abigail::elf_reader::status status_code,
const abigail::dwarf_reader::read_context* ctxt,
const string& prog_name,
const options& opts)
{
- if (!(status_code & abigail::dwarf_reader::STATUS_OK))
+ if (!(status_code & abigail::elf_reader::STATUS_OK))
{
emit_prefix(prog_name, cerr)
<< "failed to read input file " << opts.file1 << "\n";
- if (status_code & abigail::dwarf_reader::STATUS_DEBUG_INFO_NOT_FOUND)
+ if (status_code & abigail::elf_reader::STATUS_DEBUG_INFO_NOT_FOUND)
{
emit_prefix(prog_name, cerr) <<
"could not find the debug info\n";
@@ -1008,7 +1009,7 @@ handle_error(abigail::dwarf_reader::status status_code,
}
}
- if (status_code & abigail::dwarf_reader::STATUS_ALT_DEBUG_INFO_NOT_FOUND)
+ if (status_code & abigail::elf_reader::STATUS_ALT_DEBUG_INFO_NOT_FOUND)
{
emit_prefix(prog_name, cerr)
<< "could not find the alternate debug info file";
@@ -1023,7 +1024,7 @@ handle_error(abigail::dwarf_reader::status status_code,
cerr << "\n";
}
- if (status_code & abigail::dwarf_reader::STATUS_NO_SYMBOLS_FOUND)
+ if (status_code & abigail::elf_reader::STATUS_NO_SYMBOLS_FOUND)
emit_prefix(prog_name, cerr)
<< "could not find the ELF symbols in the file '"
<< opts.file1
@@ -1132,9 +1133,9 @@ main(int argc, char* argv[])
env->self_comparison_debug_is_on(true);
#endif
translation_unit_sptr t1, t2;
- abigail::dwarf_reader::status c1_status =
- abigail::dwarf_reader::STATUS_OK,
- c2_status = abigail::dwarf_reader::STATUS_OK;
+ abigail::elf_reader::status c1_status =
+ abigail::elf_reader::STATUS_OK,
+ c2_status = abigail::elf_reader::STATUS_OK;
corpus_sptr c1, c2;
corpus_group_sptr g1, g2;
bool files_suppressed = false;
@@ -519,7 +519,7 @@ load_corpus_and_write_abixml(char* argv[],
read_context& ctxt = *context;
corpus_sptr corp;
- dwarf_reader::status s = dwarf_reader::STATUS_UNKNOWN;
+ elf_reader::status s = elf_reader::STATUS_UNKNOWN;
t.start();
corp = read_corpus_from_elf(ctxt, s);
t.stop();
@@ -537,7 +537,7 @@ load_corpus_and_write_abixml(char* argv[],
if (!corp)
{
- if (s == dwarf_reader::STATUS_DEBUG_INFO_NOT_FOUND)
+ if (s == elf_reader::STATUS_DEBUG_INFO_NOT_FOUND)
{
if (opts.di_root_paths.empty())
{
@@ -567,7 +567,7 @@ load_corpus_and_write_abixml(char* argv[],
}
}
}
- else if (s == dwarf_reader::STATUS_NO_SYMBOLS_FOUND)
+ else if (s == elf_reader::STATUS_NO_SYMBOLS_FOUND)
emit_prefix(argv[0], cerr)
<< "Could not read ELF symbol information from "
<< opts.in_file_path << "\n";
@@ -885,11 +885,11 @@ main(int argc, char* argv[])
{
bool has_alt_di = false;
string alt_di_path;
- abigail::dwarf_reader::status status =
+ abigail::elf_reader::status status =
abigail::dwarf_reader::has_alt_debug_info(ctxt,
has_alt_di,
alt_di_path);
- if (status & abigail::dwarf_reader::STATUS_OK)
+ if (status & abigail::elf_reader::STATUS_OK)
{
if (alt_di_path.empty())
;
@@ -346,7 +346,7 @@ main(int argc, char* argv[])
abigail::translation_unit_sptr tu;
abigail::corpus_sptr corp;
abigail::corpus_group_sptr group;
- abigail::dwarf_reader::status s = abigail::dwarf_reader::STATUS_OK;
+ abigail::elf_reader::status s = abigail::elf_reader::STATUS_OK;
char* di_root_path = 0;
file_type type = guess_file_type(opts.file_path);
@@ -426,9 +426,9 @@ main(int argc, char* argv[])
{
emit_prefix(argv[0], cerr)
<< "failed to read " << opts.file_path << "\n";
- if (!(s & abigail::dwarf_reader::STATUS_OK))
+ if (!(s & abigail::elf_reader::STATUS_OK))
{
- if (s & abigail::dwarf_reader::STATUS_DEBUG_INFO_NOT_FOUND)
+ if (s & abigail::elf_reader::STATUS_DEBUG_INFO_NOT_FOUND)
{
cerr << "could not find the debug info";
if(di_root_path == 0)
@@ -442,7 +442,7 @@ main(int argc, char* argv[])
<< "Maybe the root path to the debug "
"information is wrong?\n";
}
- if (s & abigail::dwarf_reader::STATUS_NO_SYMBOLS_FOUND)
+ if (s & abigail::elf_reader::STATUS_NO_SYMBOLS_FOUND)
emit_prefix(argv[0], cerr)
<< "could not find the ELF symbols in the file "
<< opts.file_path
@@ -1231,7 +1231,7 @@ set_diff_context_from_opts(diff_context_sptr ctxt,
///
/// @param detailed_error_status is this pointer is non-null and if
/// the function returns ABIDIFF_ERROR, then the function sets the
-/// pointed-to parameter to the abigail::dwarf_reader::status value
+/// pointed-to parameter to the abigail::elf_reader::status value
/// that gives details about the rror.
///
/// @return the status of the comparison.
@@ -1246,7 +1246,7 @@ compare(const elf_file& elf1,
abigail::ir::environment_sptr &env,
corpus_diff_sptr &diff,
diff_context_sptr &ctxt,
- abigail::dwarf_reader::status *detailed_error_status = 0)
+ abigail::elf_reader::status *detailed_error_status = 0)
{
char *di_dir1 = (char*) debug_dir1.c_str(),
*di_dir2 = (char*) debug_dir2.c_str();
@@ -1263,8 +1263,8 @@ compare(const elf_file& elf1,
<< elf2.path
<< "...\n";
- abigail::dwarf_reader::status c1_status = abigail::dwarf_reader::STATUS_OK,
- c2_status = abigail::dwarf_reader::STATUS_OK;
+ abigail::elf_reader::status c1_status = abigail::elf_reader::STATUS_OK,
+ c2_status = abigail::elf_reader::STATUS_OK;
ctxt.reset(new diff_context);
set_diff_context_from_opts(ctxt, opts);
@@ -1315,7 +1315,7 @@ compare(const elf_file& elf1,
corpus1 = read_corpus_from_elf(*c, c1_status);
bool bail_out = false;
- if (!(c1_status & abigail::dwarf_reader::STATUS_OK))
+ if (!(c1_status & abigail::elf_reader::STATUS_OK))
{
if (opts.verbose)
emit_prefix("abipkgdiff", cerr)
@@ -1332,7 +1332,7 @@ compare(const elf_file& elf1,
if (opts.fail_if_no_debug_info)
{
bool debug_info_error = false;
- if (c1_status & abigail::dwarf_reader::STATUS_DEBUG_INFO_NOT_FOUND)
+ if (c1_status & abigail::elf_reader::STATUS_DEBUG_INFO_NOT_FOUND)
{
if (opts.verbose)
emit_prefix("abipkgdiff", cerr)
@@ -1349,7 +1349,7 @@ compare(const elf_file& elf1,
debug_info_error = true;
}
- if (c1_status & abigail::dwarf_reader::STATUS_ALT_DEBUG_INFO_NOT_FOUND)
+ if (c1_status & abigail::elf_reader::STATUS_ALT_DEBUG_INFO_NOT_FOUND)
{
if (opts.verbose)
emit_prefix("abipkgdiff", cerr)
@@ -1402,7 +1402,7 @@ compare(const elf_file& elf1,
corpus2 = read_corpus_from_elf(*c, c2_status);
bool bail_out = false;
- if (!(c2_status & abigail::dwarf_reader::STATUS_OK))
+ if (!(c2_status & abigail::elf_reader::STATUS_OK))
{
if (opts.verbose)
emit_prefix("abipkgdiff", cerr)
@@ -1419,7 +1419,7 @@ compare(const elf_file& elf1,
if (opts.fail_if_no_debug_info)
{
bool debug_info_error = false;
- if (c2_status & abigail::dwarf_reader::STATUS_DEBUG_INFO_NOT_FOUND)
+ if (c2_status & abigail::elf_reader::STATUS_DEBUG_INFO_NOT_FOUND)
{
if (opts.verbose)
emit_prefix("abipkgdiff", cerr)
@@ -1436,7 +1436,7 @@ compare(const elf_file& elf1,
debug_info_error = true;
}
- if (c2_status & abigail::dwarf_reader::STATUS_ALT_DEBUG_INFO_NOT_FOUND)
+ if (c2_status & abigail::elf_reader::STATUS_ALT_DEBUG_INFO_NOT_FOUND)
{
if (opts.verbose)
emit_prefix("abipkgdiff", cerr)
@@ -1520,14 +1520,14 @@ compare_to_self(const elf_file& elf,
abigail::ir::environment_sptr &env,
corpus_diff_sptr &diff,
diff_context_sptr &ctxt,
- abigail::dwarf_reader::status *detailed_error_status = 0)
+ abigail::elf_reader::status *detailed_error_status = 0)
{
char *di_dir = (char*) debug_dir.c_str();
vector<char**> di_dirs;
di_dirs.push_back(&di_dir);
- abigail::dwarf_reader::status c_status = abigail::dwarf_reader::STATUS_OK;
+ abigail::elf_reader::status c_status = abigail::elf_reader::STATUS_OK;
if (opts.verbose)
emit_prefix("abipkgdiff", cerr)
@@ -1549,7 +1549,7 @@ compare_to_self(const elf_file& elf,
corp = read_corpus_from_elf(*c, c_status);
- if (!(c_status & abigail::dwarf_reader::STATUS_OK))
+ if (!(c_status & abigail::elf_reader::STATUS_OK))
{
if (opts.verbose)
emit_prefix("abipkgdiff", cerr)
@@ -2000,8 +2000,8 @@ public:
diff_context_sptr ctxt;
corpus_diff_sptr diff;
- abigail::dwarf_reader::status detailed_status =
- abigail::dwarf_reader::STATUS_UNKNOWN;
+ abigail::elf_reader::status detailed_status =
+ abigail::elf_reader::STATUS_UNKNOWN;
status |= compare(args->elf1, args->debug_dir1, args->private_types_suppr1,
args->elf2, args->debug_dir2, args->private_types_suppr2,
@@ -2031,7 +2031,7 @@ public:
if (status & abigail::tools_utils::ABIDIFF_ERROR)
{
string diagnostic =
- abigail::dwarf_reader::status_to_diagnostic_string(detailed_status);
+ abigail::elf_reader::status_to_diagnostic_string(detailed_status);
if (diagnostic.empty())
diagnostic =
"Unknown error. Please run the tool again with --verbose\n";
@@ -2069,8 +2069,8 @@ public:
diff_context_sptr ctxt;
corpus_diff_sptr diff;
- abigail::dwarf_reader::status detailed_status =
- abigail::dwarf_reader::STATUS_UNKNOWN;
+ abigail::elf_reader::status detailed_status =
+ abigail::elf_reader::STATUS_UNKNOWN;
status |= compare_to_self(args->elf1, args->debug_dir1,
args->opts, env, diff, ctxt,
@@ -2097,7 +2097,7 @@ public:
if (status & abigail::tools_utils::ABIDIFF_ERROR)
{
string diagnostic =
- abigail::dwarf_reader::status_to_diagnostic_string(detailed_status);
+ abigail::elf_reader::status_to_diagnostic_string(detailed_status);
if (diagnostic.empty())
diagnostic =