const string_elf_symbols_map_sptr
get_fun_symbol_map_sptr() const;
- const string_elf_symbols_map_type&
+ virtual const string_elf_symbols_map_type&
get_fun_symbol_map() const;
const string_elf_symbols_map_sptr
const string_elf_symbols_map_sptr
get_var_symbol_map_sptr() const;
- const string_elf_symbols_map_type&
+ virtual const string_elf_symbols_map_type&
get_var_symbol_map() const;
const string_elf_symbols_map_sptr
virtual const corpus::variables&
get_variables() const;
- const string_elf_symbols_map_type&
+ virtual const string_elf_symbols_map_type&
get_var_symbol_map() const;
- const string_elf_symbols_map_type&
+ virtual const string_elf_symbols_map_type&
get_fun_symbol_map() const;
virtual const elf_symbols&
const elf_symbol_sptr
corpus::lookup_function_symbol(const string& n) const
{
- if (!get_fun_symbol_map_sptr())
+ if (get_fun_symbol_map().empty())
return elf_symbol_sptr();
string_elf_symbols_map_type::const_iterator it =
- get_fun_symbol_map_sptr()->find(n);
- if ( it == get_fun_symbol_map_sptr()->end())
+ get_fun_symbol_map().find(n);
+ if ( it == get_fun_symbol_map().end())
return elf_symbol_sptr();
return it->second[0];
}
corpus::lookup_function_symbol(const string& symbol_name,
const elf_symbol::version& version) const
{
- if (!get_fun_symbol_map_sptr())
+ if (get_fun_symbol_map().empty())
return elf_symbol_sptr();
string_elf_symbols_map_type::const_iterator it =
- get_fun_symbol_map_sptr()->find(symbol_name);
- if ( it == get_fun_symbol_map_sptr()->end())
+ get_fun_symbol_map().find(symbol_name);
+ if ( it == get_fun_symbol_map().end())
return elf_symbol_sptr();
return find_symbol_by_version(version, it->second);
const elf_symbol_sptr
corpus::lookup_variable_symbol(const string& n) const
{
- if (!get_var_symbol_map_sptr())
+ if (get_var_symbol_map().empty())
return elf_symbol_sptr();
string_elf_symbols_map_type::const_iterator it =
- get_var_symbol_map_sptr()->find(n);
- if ( it == get_var_symbol_map_sptr()->end())
+ get_var_symbol_map().find(n);
+ if ( it == get_var_symbol_map().end())
return elf_symbol_sptr();
return it->second[0];
}
corpus::lookup_variable_symbol(const string& symbol_name,
const elf_symbol::version& version) const
{
- if (!get_var_symbol_map_sptr())
+ if (get_var_symbol_map().empty())
return elf_symbol_sptr();
string_elf_symbols_map_type::const_iterator it =
- get_var_symbol_map_sptr()->find(symbol_name);
- if ( it == get_var_symbol_map_sptr()->end())
+ get_var_symbol_map().find(symbol_name);
+ if ( it == get_var_symbol_map().end())
return elf_symbol_sptr();
return find_symbol_by_version(version, it->second);
test-abidiff/test-PR18791-report0.txt \
test-abidiff/test-PR18791-v0.so.abi \
test-abidiff/test-PR18791-v1.so.abi \
+test-abidiff/test-PR24552-report0.txt \
+test-abidiff/test-PR24552-v0.abi \
+test-abidiff/test-PR24552-v1.abi \
\
test-abidiff-exit/test1-voffset-change-report0.txt \
test-abidiff-exit/test1-voffset-change-report1.txt \
--- /dev/null
+Functions changes summary: 0 Removed, 0 Changed, 0 Added function
+Variables changes summary: 0 Removed, 0 Changed, 0 Added variable
+
--- /dev/null
+<abi-corpus-group path='mypath' architecture='elf-arm-aarch64'>
+ <abi-corpus path='vmlinux' architecture='elf-arm-aarch64'>
+ <elf-function-symbols>
+ <elf-symbol name='func' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
+ </elf-function-symbols>
+ <abi-instr version='1.0' address-size='64' path='file.h' comp-dir-path='common' language='LANG_C89'>
+ <function-decl name='func' filepath='file.h' line='22' column='1' visibility='default' binding='global' size-in-bits='64'>
+ </function-decl>
+ </abi-instr>
+ </abi-corpus>
+</abi-corpus-group>
--- /dev/null
+<abi-corpus-group path='mypath' architecture='elf-arm-aarch64'>
+ <abi-corpus path='vmlinux' architecture='elf-arm-aarch64'>
+ <elf-function-symbols>
+ <elf-symbol name='func' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
+ </elf-function-symbols>
+ <abi-instr version='1.0' address-size='64' path='file.h' comp-dir-path='common' language='LANG_C89'>
+ <function-decl name='func' filepath='file.h' line='22' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='func'>
+ </function-decl>
+ </abi-instr>
+ </abi-corpus>
+</abi-corpus-group>
"data/test-abidiff/test-PR18791-report0.txt",
"output/test-abidiff/test-PR18791-report0.txt"
},
+ {
+ "data/test-abidiff/test-PR24552-v0.abi",
+ "data/test-abidiff/test-PR24552-v1.abi",
+ "data/test-abidiff/test-PR24552-report0.txt",
+ "output/test-abidiff/test-PR24552-report0.txt"
+ },
// This should be the last entry.
{0, 0, 0, 0}
};
using abigail::ir::environment;
using abigail::ir::environment_sptr;
using abigail::corpus_sptr;
+using abigail::corpus_group_sptr;
using abigail::translation_unit;
using abigail::translation_unit_sptr;
using abigail::xml_reader::read_translation_unit_from_file;
using abigail::xml_reader::read_corpus_from_native_xml_file;
+using abigail::xml_reader::read_corpus_group_from_native_xml_file;
using abigail::comparison::corpus_diff_sptr;
using abigail::comparison::translation_unit_diff_sptr;
using abigail::comparison::compute_diff;
environment_sptr env(new environment);
translation_unit_sptr tu1, tu2;
corpus_sptr corpus1, corpus2;
+ corpus_group_sptr corpus_group1, corpus_group2;
file_type t = guess_file_type(first_in_path);
if (t == abigail::tools_utils::FILE_TYPE_NATIVE_BI)
tu1 = read_translation_unit_from_file(first_in_path, env.get());
else if (t == abigail::tools_utils::FILE_TYPE_XML_CORPUS)
corpus1 = read_corpus_from_native_xml_file(first_in_path, env.get());
+ else if (t == abigail::tools_utils::FILE_TYPE_XML_CORPUS_GROUP)
+ corpus_group1 = read_corpus_group_from_native_xml_file(first_in_path,
+ env.get());
else
abort();
- if (!tu1 && !corpus1)
+ if (!tu1 && !corpus1 && !corpus_group1)
{
cerr << "failed to read " << first_in_path << "\n";
is_ok = false;
tu2 = read_translation_unit_from_file(second_in_path, env.get());
else if (t == abigail::tools_utils::FILE_TYPE_XML_CORPUS)
corpus2 = read_corpus_from_native_xml_file(second_in_path, env.get());
+ else if (t == abigail::tools_utils::FILE_TYPE_XML_CORPUS_GROUP)
+ corpus_group2 = read_corpus_group_from_native_xml_file(first_in_path,
+ env.get());
else
abort();
- if (!tu2 && !corpus2)
+ if (!tu2 && !corpus2 && !corpus_group2)
{
cerr << "failed to read " << second_in_path << "\n";
is_ok = false;
ctxt->show_locs(false);
if (tu1)
d1= compute_diff(tu1, tu2, ctxt);
- else
+ else if (corpus1)
d2 = compute_diff(corpus1, corpus2, ctxt);
+ else if (corpus_group1)
+ d2 = compute_diff(corpus_group1, corpus_group2, ctxt);
ofstream of(out_path.c_str(), std::ios_base::trunc);
if (!of.is_open())
{