8 #ifndef __ABG_REPORTER_PRIV_H__
9 #define __ABG_REPORTER_PRIV_H__
23 #define RETURN_IF_BEING_REPORTED_OR_WAS_REPORTED_EARLIER(S1, S2) \
25 if (diff_context_sptr ctxt = d.context()) \
26 if (diff_sptr _diff_ = ctxt->get_canonical_diff_for(S1, S2)) \
27 if (_diff_->currently_reporting() || _diff_->reported_once()) \
29 if (_diff_->currently_reporting()) \
30 out << indent << "details are being reported\n"; \
32 out << indent << "details were reported earlier\n"; \
49 #define RETURN_IF_BEING_REPORTED_OR_WAS_REPORTED_EARLIER2(D, INTRO_TEXT) \
51 if (diff_sptr _diff_ = d.context()->get_canonical_diff_for(D)) \
52 if (_diff_->currently_reporting() || _diff_->reported_once()) \
54 string _name_ = _diff_->first_subject()->get_pretty_representation(); \
55 if (_diff_->currently_reporting()) \
56 out << indent << INTRO_TEXT << " '" << _name_ \
57 << "' changed, as being reported\n"; \
60 out << indent << INTRO_TEXT << " '" \
61 << _name_ << "' changed"; \
62 report_loc_info(D->first_subject(), *d.context(), out); \
63 out << ", as reported earlier\n"; \
78 #define RETURN_IF_BEING_REPORTED_OR_WAS_REPORTED_EARLIER3(S1, S2, INTRO_TEXT) \
80 if (diff_sptr _diff_ = d.context()->get_canonical_diff_for(S1, S2)) \
81 if (_diff_->currently_reporting() || _diff_->reported_once()) \
83 string _name_ = _diff_->first_subject()->get_pretty_representation(); \
84 if (_diff_->currently_reporting()) \
85 out << indent << INTRO_TEXT << " '" << _name_ << "' changed; " \
86 "details are being reported\n"; \
89 out << indent << INTRO_TEXT << " '" << _name_ << "' changed"; \
90 report_loc_info(S1, *d.context(), out); \
91 out << ", as reported earlier\n"; \
110 emit_num_value(uint64_t value,
const diff_context& ctxt, ostream& out);
115 const diff_context& ctxt,
120 const diff_context& ctxt,
127 const diff_context& ctxt,
129 bool show_bits_or_bytes =
true);
133 method_decl_sptr mem_fn,
140 const string& indent);
156 const string& indent =
"",
157 bool local_only =
false);
163 const string& indent =
"",
164 bool local_only =
false);
171 const string& indent);
175 const diff_context& ctxt,
180 decl_base_sptr second,
183 const string& indent);
198 const string& section_name,
199 const string& indent);
206 const string& section_name,
207 const string& indent);
211 const decl_base_sptr& decl2,
214 const string& indent);
218 const decl_base_sptr& decl2,
221 const string& indent);
228 const string& indent);
232 const string& indent,
239 const string& indent,
245 const string &indent);
250 const string &indent);
255 const string &indent);
260 const string &indent);
The declaration of the reporting types of libabigail's diff engine.
This type abstracts changes for a class_decl.
This is the base class of class_diff and union_diff.
This is a document class that aims to capture statistics about the changes carried by a corpus_diff t...
An abstraction of a diff between between two abi corpus.
The abstraction of a change between two ABI artifacts, a.k.a an artifact change.
Abstraction of an elf symbol.
shared_ptr< diff > diff_sptr
Convenience typedef for a shared_ptr for the diff class.
void show_linkage_name_and_aliases(ostream &out, const string &indent, const elf_symbol &symbol, const string_elf_symbols_map_type &sym_map)
For a given symbol, emit a string made of its name and version. The string also contains the list of ...
void maybe_report_interfaces_impacted_by_diff(const diff *d, ostream &out, const string &indent)
If a given diff node impacts some public interfaces, then report about those impacted interfaces on a...
void maybe_report_diff_for_symbol(const elf_symbol_sptr &symbol1, const elf_symbol_sptr &symbol2, const diff_context_sptr &ctxt, ostream &out, const string &indent)
Report the difference between two ELF symbols, if there is any.
void maybe_show_relative_offset_change(const var_diff_sptr &diff, diff_context &ctxt, ostream &out)
If a given var_diff node carries a data member change in which the offset of the data member actually...
uint64_t convert_bits_to_bytes(size_t bits)
Convert a number in bits into a number in bytes.
void maybe_report_unreachable_type_changes(const corpus_diff &d, const corpus_diff::diff_stats &s, const string &indent, ostream &out)
Report changes about types that are not reachable from global functions and variables,...
shared_ptr< diff_context > diff_context_sptr
Convenience typedef for a shared pointer of diff_context.
void report_size_and_alignment_changes(type_or_decl_base_sptr first, type_or_decl_base_sptr second, diff_context_sptr ctxt, ostream &out, const string &indent)
Report the size and alignment changes of a type.
bool report_loc_info(const type_or_decl_base_sptr &tod, const diff_context &ctxt, ostream &out)
shared_ptr< var_diff > var_diff_sptr
Convenience typedef for a shared pointer to a var_diff type.
void show_numerical_change(const string &what, uint64_t old_bits, uint64_t new_bits, const diff_context &ctxt, ostream &out, bool show_bits_or_byte)
Emit a message showing the numerical change between two values, to a given output stream.
bool maybe_report_diff_for_variable(const decl_base_sptr &decl1, const decl_base_sptr &decl2, const diff_context_sptr &ctxt, ostream &out, const string &indent)
Report the differences between two generic variables.
void maybe_report_base_class_reordering(const class_diff &d, ostream &out, const string &indent)
Report about the base classes of a class having been re-ordered.
void represent_data_member(var_decl_sptr d, const diff_context_sptr &ctxt, ostream &out, const string &indent)
Stream a string representation for a data member.
void maybe_show_relative_size_change(const var_diff_sptr &diff, diff_context &ctxt, ostream &out)
If a given var_diff node carries a hange in which the size of the variable actually changed,...
diff_kind
Represent the kind of difference we want report_mem_header() to report.
void maybe_report_data_members_replaced_by_anon_dm(const class_or_union_diff &d, ostream &out, const string &indent)
Report about data members replaced by an anonymous data member without changing the overall bit-layou...
bool maybe_report_diff_for_member(const decl_base_sptr &decl1, const decl_base_sptr &decl2, const diff_context_sptr &ctxt, ostream &out, const string &indent)
Report the differences in access specifiers and static-ness for class members.
void report_mem_header(ostream &out, size_t number, size_t num_filtered, diff_kind k, const string §ion_name, const string &indent)
Output the header preceding the the report for insertion/deletion/change of a part of a class....
void show_offset_or_size(const string &what, uint64_t value, const diff_context &ctxt, ostream &out)
Emit a message showing the value of a numerical value representing a size or an offset,...
void emit_num_value(uint64_t value, const diff_context &ctxt, ostream &out)
Emit a numerical value to an output stream.
void report_name_size_and_alignment_changes(decl_base_sptr first, decl_base_sptr second, diff_context_sptr ctxt, ostream &out, const string &indent)
Report the name, size and alignment changes of a type.
void represent(const diff_context &ctxt, method_decl_sptr mem_fn, ostream &out)
Stream a string representation for a member function.
uint64_t maybe_convert_bits_to_bytes(uint64_t bits, const diff_context &ctxt)
Convert a bits value into a byte value if the current diff context instructs us to do so.
shared_ptr< elf_symbol > elf_symbol_sptr
A convenience typedef for a shared pointer to elf_symbol.
change_kind
A bitfield that gives callers of abigail::ir::equals() some insight about how different two internal ...
shared_ptr< var_decl > var_decl_sptr
Convenience typedef for a shared pointer on a var_decl.
shared_ptr< type_or_decl_base > type_or_decl_base_sptr
A convenience typedef for a shared_ptr to type_or_decl_base.
std::unordered_map< string, elf_symbols > string_elf_symbols_map_type
Convenience typedef for a map which key is a string and which value is a vector of elf_symbol.
Toplevel namespace for libabigail.