bool read_all_types = false,
bool linux_kernel_mode = false);
+const string&
+read_context_get_path(const read_context&);
+
void
reset_read_context(read_context_sptr &ctxt,
const std::string& elf_path,
read_context_sptr
create_native_xml_read_context(std::istream* in, environment* env);
+const string&
+read_context_get_path(const read_context&);
+
abigail::corpus_sptr
read_corpus_from_file(const string& path);
return result;
}
+/// Getter for the path to the binary this @ref read_context is for.
+///
+/// @return the path to the binary the @ref read_context is for.
+const string&
+read_context_get_path(const read_context& ctxt)
+{return ctxt.elf_path();}
+
/// Re-initialize a read_context so that it can re-used to read
/// another binary.
///
return result;
}
+/// Getter for the path to the binary this @ref read_context is for.
+///
+/// @return the path to the binary the @ref read_context is for.
+const string&
+read_context_get_path(const read_context& ctxt)
+{return ctxt.get_path();}
+
/// De-serialize an ABI corpus from an input XML document which root
/// node is 'abi-corpus'.
///
++i)
read_suppressions(*i, supprs);
- if (!opts.headers_dir1.empty())
+ if (read_context_get_path(read_ctxt) == opts.file1
+ && !opts.headers_dir1.empty())
{
// Generate suppression specification to avoid showing ABI
- // changes on types that are not defined in public headers.
+ // changes on types that are not defined in public headers for
+ // the first binary.
//
// As these suppression specifications are applied during the
// corpus loading, they are going to be dropped from the
}
}
- if (!opts.headers_dir2.empty())
+ if (read_context_get_path(read_ctxt) == opts.file2
+ && !opts.headers_dir2.empty())
{
// Generate suppression specification to avoid showing ABI
- // changes on types that are not defined in public headers.
+ // changes on types that are not defined in public headers for
+ // the second binary.
//
// As these suppression specifications are applied during the
// corpus loading, they are going to be dropped from the