summaryrefslogtreecommitdiffstats
path: root/ChangeLog
diff options
context:
space:
mode:
authorDodji Seketeli <dodji@redhat.com>2014-11-18 23:05:06 +0100
committerDodji Seketeli <dodji@redhat.com>2014-11-18 23:18:06 +0100
commit38f03186bc6846e064488736a663b601775fe305 (patch)
treebc2c5fc9f368473cca714e357b8dcb723af68042 /ChangeLog
parent[gen-changelog] Make subject line always come first (diff)
downloadlibabigail-38f03186bc6846e064488736a663b601775fe305.tar.gz
libabigail-38f03186bc6846e064488736a663b601775fe305.tar.bz2
libabigail-38f03186bc6846e064488736a663b601775fe305.tar.xz
Added a ChangeLog that is auto-generated by gen-changelog.py
* ChangeLog: Add this auto-generated file. Signed-off-by: Dodji Seketeli <dodji@redhat.com>
Diffstat (limited to 'ChangeLog')
-rw-r--r--ChangeLog10245
1 files changed, 10245 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
new file mode 100644
index 00000000..1be7cf7e
--- /dev/null
+++ b/ChangeLog
@@ -0,0 +1,10245 @@
12014-11-18 Dodji Seketeli <dodji@redhat.com>
2
3 Allow introductory text in commit log and ignore it when generating ChangeLog
4 * gen-changelog.py (process_commit): Everything that comes between
5 the subject line of the commit and the first \t* sequence is
6 considered to be introductory text. Ignore it when generating the
7 ChangeLog entry.
8 * COMMIT-LOG-GUIDELINES: Update the commit log guidelines to
9 reflect the fact that we can now have introductory text in the
10 commit log.
11
122014-11-18 Dodji Seketeli <dodji@redhat.com>
13
14 Initial import of gen-changelog.py
15 * gen-changelog.py: Copy from
16 https://github.com/GNOME/gnet/blob/master/gen-changelog.py.
17 License it under LGPLV v2+ after asking Edward Hervey's kind
18 permission. Ain't Free Software really great?
19
202014-11-10 Dodji Seketeli <dodji@redhat.com>
21
22 Cleanup of the web page
23 * doc/website/libabigail-website.doxy: Remove the redundant
24 information that was appearing on the web page.
25 * doc/website/mainpage.txt: Clean-up the text of the web page, add
26 information for the new IRC channel #libabigail on oftc.net,
27 re-organize the content by putting sections where we had
28 paragraphs. Add a table of content. Also add a web form to
29 subscribe/unsubscribe to the mailing list.
30
312014-11-08 Dodji Seketeli <dodji@redhat.com>
32
33 Sort functions by the their qualified name
34 * src/abg-comparison.cc (function_comp::operator()): Sort the
35 functions by only looking at their qualified name, as opposed to
36 their return type name.
37
382014-11-08 Dodji Seketeli <dodji@redhat.com>
39
40 Remove too tight assert from de-mangling code
41 * src/abg-ir.cc (demangle_cplus_mangled_name): The return length
42 can be zero. That means, no de-mangling was done.
43
442014-11-08 Dodji Seketeli <dodji@redhat.com>
45
46 Sort reported changed declarations & types in a given scope
47 * src/abg-comparison.cc (struct changed_type_or_decl_comp, struct
48 changed_vars_comp): New comparison functors.
49 (sort_changed_type_or_decl, sort_changed_vars): New static
50 functions.
51 (scope_diff::report): Use the above to sort changed declarations,
52 and types in a given scope.
53 (corpus_diff::report): Likewise for the changed variables.
54 * tests/data/test-abidiff/test-struct1-report.txt: Adjust.
55 * tests/data/test-diff-suppr/test7-var-suppr-report-0.txt:
56 Likewise.
57 * tests/data/test-diff-suppr/test7-var-suppr-report-8.txt:
58 Likewise.
59
602014-11-08 Dodji Seketeli <dodji@redhat.com>
61
62 Sort elf symbols before serializing them
63 * include/abg-corpus.h (corpus::{get_sorted_fun_symbols,
64 get_sorted_var_symbols}): Declare new member functions.
65 * src/abg-corpus.cc (corpus_priv::{sorted_var_symbols,
66 sorted_fun_symbols}): New data members.
67 (struct elf_symbol_comp_functor): Define new comparison functor.
68 (corpus::{get_sorted_fun_symbols, get_sorted_var_symbols}): Define
69 new member functions.
70 * src/abg-writer.cc (write_elf_symbols_table): Take a sorted
71 vector of symbols in parameters, rather than an unsorted map.
72 (write_corpus_to_native_xml): Write a sorted vector of symbols,
73 rather than an unsorted map of symbols.
74 * tests/data/test-read-dwarf/test0.abi: Adjust.
75 * tests/data/test-read-dwarf/test1.abi: Likewise.
76 * tests/data/test-read-dwarf/test2.so.abi: Likewise.
77 * tests/data/test-read-dwarf/test3.so.abi: Likewise.
78 * tests/data/test-read-dwarf/test6.so.abi: Likewise.
79
802014-11-07 Dodji Seketeli <dodji@redhat.com>
81
82 Fix template parameter hashing: make it know about enclosing template
83 * include/abg-ir.h (template_parameter_sptr, template_decl_sptr)
84 (template_decl_wptr): Declare new typedefs.
85 (class template_decl): Make this virtually inherit decl_base and
86 pimpl-ify it.
87 (class template_parameter): Pimpl-ify this. Make the constructor
88 take the enclosing template parameter.
89 (struct template_decl::hash): Declare this here, rather than in
90 src/abg-hash.cc
91 (class type_tparameter, non_type_tparameter, template_tparameter)
92 (class type_composition, function_tdecl, class_tdecl): Pimpl-ify
93 this.
94 * src/abg-hash.cc (template_parameter::hash::operator()): Hash the
95 enclosing template parameter. Avoid infinite recursion due to the
96 loop hash parameter -> hash template -> hash parameter.
97 (template_decl::hash::operator()) Define this here, now that it's
98 declared in abg-ir.h. Also, avoid infinite recursion here; this
99 is complementary to what is done in the hashing for
100 template_parameter.
101 ({type_tparameter, template_tparameter, }::hash::operator()):
102 Cache the calculated hash just as what is done for other types
103 hashed.
104 (template_decl::priv): Define this new type.
105 (template_decl::{add_template_parameter, get_template_parameters,
106 ~template_decl}): Define these here to pimpl-ify template_decl.
107 (template_parameter::priv): Define this new type.
108 (template_parameter::template_parameter): Define this here to
109 pimpl-ify template_parameter. Note also that this now takes the
110 enclosing template decl.
111 (template_parameter::{get_index, get_enclosing_template_decl,
112 get_hashing_has_started, set_hashing_has_started, operator::==}):
113 Define these here to pimpl-ify template_parameter.
114 (type_tparameter::priv): Define this new type.
115 (type_tparameter::type_tparameter): Define this here to pimpl-ify
116 type_tparameter. Also, not that this constructor now takes the
117 enclosing template decl.
118 (class non_type_tparameter::priv): Define new type.
119 (non_type_tparameter::{non_type_tparameter, get_type}): Define
120 these here to pimpl-ify non_type_tparameter. The constructor now
121 takes the enclosing template.
122 (template_tparameter::priv): Define new type.
123 (template_tparameter::template_tparameter): Define this here to
124 pimpl-ify template_tparameter. This constructor now takes the
125 enclosing template.
126 (class type_composition::priv): New type.
127 (type_composition::{type_composition, get_composed_type,
128 set_composed_type}): Define these here to pimpl-ify
129 type_composition. The constructor now takes the enclosing
130 template decl.
131 (class function_tdecl::priv): Define new type.
132 (function_tdecl::{function_tdecl, set_pattern, get_pattern,
133 get_binding}): Define this here to pimpl-ify function_tdecl.
134 (class class_tdecl::priv): Define this new type.
135 (class_tdecl::class_tdecl): Define this here to pimpl-ify
136 class_tdecl.
137 (class_tdecl::set_pattern): Adjust to pimpl-ify.
138 (class_tdecl::get_pattern): Define new pimpl-ified getter.
139 * src/abg-reader.cc (build_function_tdecl, build_class_tdecl):
140 Cleanup. Pass the enclosing template to the template parameters
141 that are built.
142 (build_type_tparameter, build_type_composition)
143 (build_non_type_tparameter, build_template_tparameter)
144 (build_template_parameter): Take the enclosing template
145 declaration and pass it to the template parameter being created.
146 * tests/data/test-read-write/test12.xml: Fix and Adjust.
147 * tests/data/test-read-write/test13.xml: Likewise.
148
1492014-11-06 Dodji Seketeli <dodji@redhat.com>
150
151 Style fix
152 * include/abg-ir.h (class location): Remove useless white space.
153 * src/abg-writer.cc (type_has_existing_id): Use type_base_sptr
154 rather than shared_ptr<type_base>.
155 (write_template_tparameter): Use template_tparameter_sptr rather
156 than shared_ptr<template_tparameter>.
157
1582014-11-05 Dodji Seketeli <dodji@redhat.com>
159
160 Pass -std=gnu++11 to the compiler when --enable-cxx11 for tests
161 * tests/Makefile.am: Pass -std=gnu++11 to the compiler when
162 --enable-cxx11 has been used.
163
1642014-11-05 Dodji Seketeli <dodji@redhat.com>
165
166 Make the use of a C++-11 compiler optional
167 * configure.ac: Define a new --enable-cxx11 switch to control the
168 use of the C++-11 compiler. Define a WITH_CXX11 C macro and an
169 automake ENABLE_CXX11 variable.
170 * config.h.in: Initialize the new WITH_CXX11 C macro.
171 * src/Makefile.am: Include the files coded in C++-11 only if the
172 ENABLE_CXX11 automake variable is defined.
173 * tests/Makefile.am: Likewise, build the runtestsvg test program
174 only if C++-11 usage is enabled.
175 * include/abg-diff-utils.h (class d_path_vec): Remove useless
176 usage of the 'typename' keyword.
177 * include/abg-fwd.h (is_enum_type): Renamed is_enum into this,
178 because of a name clash with a tr1 function when not using C++-11.
179 (is_pointer_type): Likewise, renamed is_pointer into this because
180 of a name clash with a tr1 function when not using C++-11.
181 * src/abg-comp-filter.cc (has_harmless_name_change): Adjust for
182 the is_enum -> is_enum_type change.
183 * src/abg-comparison.cc (type_suppression::suppresses_diff):
184 Likewise.
185 (class function_suppression::priv): Add a missing "class" keyword
186 in friend declaration.
187 (diff_context::diff_has_been_traversed)
188 (diff_context::mark_diff_as_traversed): Do not use the C++-11
189 specific type uintptr_t.
190 * src/abg-dwarf-reader.cc (create_default_dwfl): Do not use
191 designated initializers. Sigh. This is handy though.
192 (expr_result::abs): Cast the argument of std::abs to avoid
193 ambiguous call.
194 (finish_member_function_reading): Adjust for the is_pointer ->
195 is_pointer_type renaming.
196 * src/abg-hash.cc (scope_decl::hash::operator)
197 (class_decl::base_spec::hash::operator)
198 (type_composition::hash::operator): Use std::tr1::hash string,
199 rather than the C++-11 specific std::hash function.
200 * src/abg-ini.cc (read_sections, write_sections): Make
201 std::ifstream constructor take a const char* rather than a string.
202 * src/abg-ir.cc (is_enum_type, is_pointer_type): Renamed is_enum
203 into is_enum_type and is_pointer into is_pointer_type.
204 * src/abg-writer.cc (write_translation_unit): Remove useless
205 typename keyword. Make ofstream take a const char* rather than a
206 string.
207 (write_namespace_decl): Remove useless typename keyword.
208 (write_corpus_to_native_xml_file): Make ofstream take a const
209 char* rather than a string.
210 * tests/test-abidiff.cc (main): Make ofstream take a const char*
211 rather than a string.
212 * tests/test-diff-dwarf.cc (main): Likewise.
213
2142014-11-05 Dodji Seketeli <dodji@seketeli.org>
215
216 Remove some m4 auto-generated files from version control
217 * m4/ltoptions.m4: Remove from version control.
218 * m4/ltversion.m4: Remove from version control.
219 * m4/lt~obsolete.m4: Remove from version control.
220
2212014-11-03 Dodji Seketeli <dodji@redhat.com>
222
223 Add usage examples to the abidiff manual
224 * doc/manuals/abidiff.rst: Add a usage example section along with
225 some small and clean examples.
226
2272014-11-01 Dodji Seketeli <dodji@redhat.com>
228
229 Fix the API doc string of the abigail::xml_writer namespace
230 * src/abg-writer.cc: Fix the API doc of the xml_writer namespace.
231
2322014-11-01 Dodji Seketeli <dodji@redhat.com>
233
234 Fix an apidoc typo
235 * include/abg-comparison.h (class variable_suppression): Fix a
236 typo in the doc string.
237
2382014-11-01 Dodji Seketeli <dodji@redhat.com>
239
240 Update the manual for variable suppression concepts
241 * doc/manuals/libabigail-concepts.rst: Add a section for variable
242 suppression specification in the concepts part of the manual.
243
2442014-11-01 Dodji Seketeli <dodji@redhat.com>
245
246 Fix some restructured text doc glitches in the fn suppression manual
247 * doc/manuals/libabigail-concepts.rst: Fix quoting of the syntax
248 of parameter specification string, for the function suppression
249 concepts.
250
2512014-11-01 Dodji Seketeli <dodji@redhat.com>
252
253 Cleanup the mainpage of the API doc
254 * include/abg-fwd.h: Cleanup text of the API doc mainpage.
255
2562014-11-01 Dodji Seketeli <dodji@redhat.com>
257
258 Make get_binary_load_address static
259 * src/abg-dwarf-reader.cc (get_binary_load_address): Make this
260 function static.
261
2622014-11-01 Dodji Seketeli <dodji@redhat.com>
263
264 Initial support for variable suppressions
265 * include/abg-comparison.h (variable_suppression_sptr)
266 (variable_suppressions_type): New convenience typedefs.
267 (class variable_suppression): Declare new type.
268 * src/abg-comparison.cc (is_var_diff): New predicate.
269 (read_variable_suppression): Define new static function.
270 (class variable_suppression::priv): Define type for the private
271 data of the variable_suppression type.
272 (variable_suppression::{variable_suppression,
273 ~variable_suppression, get_name, set_name, get_name_regex_str,
274 set_name_regex_str, get_symbol_name, set_symbol_name,
275 get_symbol_name_regex_str, set_symbol_name_regex_str,
276 get_symbol_version, set_symbol_version,
277 get_symbol_version_regex_str, set_symbol_version_regex_str,
278 get_type_name, set_type_name, get_type_name_regex_str,
279 set_type_name_regex_str, suppresses_diff}): Define new member
280 functions for the variable_suppression type.
281 * tests/data/test-diff-suppr/libtest7-var-suppr-v0.so: Add new
282 test input.
283 * tests/data/test-diff-suppr/libtest7-var-suppr-v1.so: Likewise.
284 * tests/data/test-diff-suppr/test7-var-suppr-1.suppr: Likewise.
285 * tests/data/test-diff-suppr/test7-var-suppr-2.suppr: Likewise.
286 * tests/data/test-diff-suppr/test7-var-suppr-3.suppr: Likewise.
287 * tests/data/test-diff-suppr/test7-var-suppr-4.suppr: Likewise.
288 * tests/data/test-diff-suppr/test7-var-suppr-5.suppr: Likewise.
289 * tests/data/test-diff-suppr/test7-var-suppr-6.suppr: Likewise.
290 * tests/data/test-diff-suppr/test7-var-suppr-7.suppr: Likewise.
291 * tests/data/test-diff-suppr/test7-var-suppr-8.suppr: Likewise.
292 * tests/data/test-diff-suppr/test7-var-suppr-report-0.txt: Likewise.
293 * tests/data/test-diff-suppr/test7-var-suppr-report-1.txt: Likewise.
294 * tests/data/test-diff-suppr/test7-var-suppr-report-2.txt: Likewise.
295 * tests/data/test-diff-suppr/test7-var-suppr-report-3.txt: Likewise.
296 * tests/data/test-diff-suppr/test7-var-suppr-report-4.txt: Likewise.
297 * tests/data/test-diff-suppr/test7-var-suppr-report-5.txt: Likewise.
298 * tests/data/test-diff-suppr/test7-var-suppr-report-6.txt: Likewise.
299 * tests/data/test-diff-suppr/test7-var-suppr-report-7.txt: Likewise.
300 * tests/data/test-diff-suppr/test7-var-suppr-report-8.txt:
301 Likewise.
302 * tests/data/test-diff-suppr/test7-var-suppr-version-script: Likewise.
303 * tests/data/test-diff-suppr/test7-var-suppr-v0.cc: Source code
304 for the librairie above.
305 * tests/data/test-diff-suppr/test7-var-suppr-v1.cc: Source code
306 for the librairie above.
307 * tests/Makefile.am: Add the new test input data to the source
308 distribution.
309 * tests/test-diff-suppr.cc: Update to make this harness to run
310 over the new test input above.
311
3122014-11-01 Dodji Seketeli <dodji@redhat.com>
313
314 Update the suppr-doc.txt file for variable suppressions
315 * doc/suppr-doc.txt: Add the suppress_variable section example.
316
3172014-11-01 Dodji Seketeli <dodji@redhat.com>
318
319 Make var_diff and function_decl_diff extend decl_diff_base
320 * include/abg-comparison.h (class var_diff, class
321 function_decl_diff): Make these types inherit the decl_diff_base
322 class. This is like the fact that all kinds of diff inherit the
323 type_diff_base class.
324 * src/abg-comparison.cc (var_diff::var_diff)
325 (function_decl_diff::function_decl_diff): Adjust to initialize the
326 sub-object of decl_diff_base;
327 (is_decl_diff): New predicate to know if a diff is about decls.
328 (is_function_decl): New predicate to know if a diff is about
329 function decls.
330 (function_suppression::suppresses_diff): Adjust to use the new
331 is_function_decl.
332
3332014-11-01 Dodji Seketeli <dodji@redhat.com>
334
335 Fix logic of type suppression evaluation
336 * include/abg-comparison.cc (type_suppression::suppresses_diff):
337 Try to evaluate the "type_name_regexp" property only if the
338 "type_name" is empty.
339
3402014-11-01 Dodji Seketeli <dodji@redhat.com>
341
342 Remove useless functions from the comparison engine
343 * include/abg-comparison.h (read_type_suppression): Remove this
344 function declaration.
345 * src/abg-comparison.cc (read_type_suppressions): Remove this
346 static function definition.
347 (read_function_suppressions): Remove this static function
348 declaration.
349
3502014-11-01 Dodji Seketeli <dodji@redhat.com>
351
352 Spit and polish variables presentation in diff report
353 * src/abg-comparison.cc (corpus_diff::report): Show the full
354 representation of the variable, rather than just its name. Also,
355 show the new representation of the variable only if it has
356 changed.
357 * tests/data/test-diff-dwarf/test9-report.txt: Adjust test.
358 * tests/data/test-diff-filter/test15-0-report.txt: Likewise.
359 * tests/data/test-diff-filter/test15-1-report.txt: Likewise.
360
3612014-11-01 Dodji Seketeli <dodji@redhat.com>
362
363 Fix various apidoc typos
364 * include/abg-comparison.h (class function_suppression): Fix typo
365 in the doc string.
366 * src/abg-comparison.cc (is_type_diff, read_suppressions)
367 (diff::reported_once, typedef_diff::report): Fix the doc string.
368
3692014-11-01 Dodji Seketeli <dodji@redhat.com>
370
371 Fix regexp escaping section of manual
372 * doc/manuals/libabigail-concepts.rst: Re-indent and fix some
373 typos in the regexp escaping section of the manual.
374
3752014-11-01 Dodji Seketeli <dodji@redhat.com>
376
377 Doxygen shouldn't extract doc for static functions or private types
378 * doc/api/libabigail.doxy: Do not extract doc for static
379 functions, local classes.
380
3812014-11-01 Dodji Seketeli <dodji@redhat.com>
382
383 Update .gitignore
384 * .gitignore: Ignore *~ emacs files.
385
3862014-10-29 Dodji Seketeli <dodji@redhat.com>
387
388 Separate alias targets with a comma
389 * src/abg-ir.cc (elf_symbol::get_aliases_id_string): Separate
390 alias targets by a comma.
391 * tests/data/test-diff-dwarf/test18-alias-sym-v1.cc: Update test
392 to add more than one alias to a given symbol.
393
3942014-10-28 Dodji Seketeli <dodji@redhat.com>
395
396 Fix a typo in the manual about function suppressions
397 * doc/manuals/libabigail-concepts.rst: Fix a typo.
398
3992014-10-28 Dodji Seketeli <dodji@redhat.com>
400
401 Initial support for function suppressions
402 * include/abg-comparison.h (enum visiting_kind): Change the
403 meaning of this. It was to determine if traversal was to be done
404 in a pre or post manner. But with the recent addition of
405 diff_node_visitor::visit_{begin,end}() notifiers, the pre/post
406 handling is taken care of in a different way. So now the meaning
407 of this enum is changed to handle whether diff node children
408 should be visited or not. So the enumerators are now
409 DEFAULT_VISITING_KIND, and SKIP_CHILDREN_VISITING_KIND. And it's
410 a bit-field.
411 (operator{&,~}): Declare more bit manipulation operators for the
412 enum visiting_kind.
413 (function_suppression_sptr, function_suppressions_type): New
414 typedefs.
415 (function_suppression, function_suppression::parameter_spec):
416 Declare new types.
417 (read_function_suppressions): Declare new function.
418 (diff_node_visitor::diff_node_visitor): Adjust for the enum
419 visiting_kind change. Value-initialize the visiting_kind_ data
420 member.
421 * src/abg-comparison.cc (operator{&,~}): Define these operators
422 for enum visiting_kind.
423 (read_type_suppressions): Forward declare this static function.
424 (read_function_suppression, read_parameter_spec_from_string):
425 Define new static functions.
426 (read_suppressions): Update to read function suppressions too,
427 using the new read_function_suppression function above.
428 (class function_suppression::parameter_spec::priv): Define new
429 type.
430 (function_suppression::parameter_spec::*): Define the member
431 functions of the new function_suppression::parameter_spec type.
432 (class function_suppression::priv): Define new type.
433 (function_suppression::*): Define the member functions of the new
434 function_suppression type.
435 (diff::traverse): There is no more {PRE,POST}_VISITING_KIND
436 enumerator. So nuke the code that was dealing with it.
437 (redundancy_marking_visitor::skip_children_nodes_): New data
438 member flag.
439 (redundancy_marking_visitor::visit_begin): If the current diff
440 node is not be reported (is filtered out), do not bother visit its
441 children nodes for the purpose of marking redundant nodes. So use
442 the new skip_children_nodes_ flag above to know we are in that case.
443 (redundancy_marking_visitor::visit_end): Unset the new
444 skip_children_nodes_ flag above when appropriate.
445 * include/abg-fwd.h (is_function_decl): Declare new function.
446 * include/abg-ir.h
447 (function_type::get_parm_at_index_from_first_non_implicit_parm):
448 Declare new member function.
449 * src/abg-ir.cc (is_function_decl): Define new function.
450 (function_type::get_parm_at_index_from_first_non_implicit_parm):
451 Define new member function.
452 * src/abg-comp-filter.cc (apply_filter): Adjust for the enum
453 visiting_kind change. No need to set it for filters anymore
454 * doc/suppr-doc.txt: Update examples of function suppression.
455 * doc/manuals/libabigail-concepts.rst: Update the manual for the
456 function suppression addition.
457 * tests/data/test-diff-suppr/libtest5-fn-suppr-v0.so: New test input.
458 * tests/data/test-diff-suppr/libtest5-fn-suppr-v1.so: New test input.
459 * tests/data/test-diff-suppr/libtest6-fn-suppr-v0.so: New test input.
460 * tests/data/test-diff-suppr/libtest6-fn-suppr-v1.so: New test input.
461 * tests/data/test-diff-suppr/test5-fn-suppr-0.suppr: New test input.
462 * tests/data/test-diff-suppr/test5-fn-suppr-1.suppr: New test input.
463 * tests/data/test-diff-suppr/test5-fn-suppr-2.suppr: New test input.
464 * tests/data/test-diff-suppr/test5-fn-suppr-3.suppr: New test input.
465 * tests/data/test-diff-suppr/test5-fn-suppr-4.suppr: New test input.
466 * tests/data/test-diff-suppr/test5-fn-suppr-report-0.txt: New test input.
467 * tests/data/test-diff-suppr/test5-fn-suppr-report-1.txt: New test input.
468 * tests/data/test-diff-suppr/test5-fn-suppr-report-2.txt: New test input.
469 * tests/data/test-diff-suppr/test5-fn-suppr-report-3.txt: New test input.
470 * tests/data/test-diff-suppr/test5-fn-suppr-report-4.txt: New test input.
471 * tests/data/test-diff-suppr/test5-fn-suppr-report-5.txt: New test input.
472 * tests/data/test-diff-suppr/test5-fn-suppr-v0.cc: Source code for
473 new test input.
474 * tests/data/test-diff-suppr/test5-fn-suppr-v1.cc: Source code for
475 new test input.
476 * tests/data/test-diff-suppr/test6-fn-suppr-0.suppr: New test input.
477 * tests/data/test-diff-suppr/test6-fn-suppr-1.suppr: New test input.
478 * tests/data/test-diff-suppr/test6-fn-suppr-2.suppr: New test input.
479 * tests/data/test-diff-suppr/test6-fn-suppr-3.suppr: New test input.
480 * tests/data/test-diff-suppr/test6-fn-suppr-report-0.txt: New test input.
481 * tests/data/test-diff-suppr/test6-fn-suppr-report-1.txt: New test input.
482 * tests/data/test-diff-suppr/test6-fn-suppr-report-2.txt: New test input.
483 * tests/data/test-diff-suppr/test6-fn-suppr-report-3.txt: New test input.
484 * tests/data/test-diff-suppr/test6-fn-suppr-report-4.txt: New test input.
485 * tests/data/test-diff-suppr/test6-fn-suppr-v0.cc: Source code for
486 new test input.
487 * tests/data/test-diff-suppr/test6-fn-suppr-v1.cc: Source code for
488 new test input.
489 * tests/data/test-diff-suppr/test6-fn-suppr-version-script: New
490 test input.
491 * tests/Makefile.am: Add the new files above to source
492 the distribution.
493 * tests/test-diff-suppr.cc (in_out_specs): Add the test inputs
494 above to the list of tests to be run by this harness.
495
4962014-10-28 Dodji Seketeli <dodji@redhat.com>
497
498 Add missing virtual destructor in comparison engine code
499 * include/abg-comparison.h (type_suppression::~type_suppression):
500 Declare missing virtual destructor.
501 * src/abg-comparison.cc (type_suppression::~type_suppression):
502 Define missing virtual destructor.
503
5042014-10-27 Dodji Seketeli <dodji@redhat.com>
505
506 Pimplify abigail::ir::function_type
507 * include/abg-ir.h (function_type::priv_): Declare new data
508 member.
509 (function_type::<all the methods>): Move the inline methods out of
510 line in src/abg-ir.cc.
511 (function_type::{return_type_, parms_}): Move these ...
512 * src/abg-ir.cc (function_type::priv::{return_type_, parms_}):
513 ... Here.
514 (struct function_type::priv): New type for the private data of
515 function_type.
516 (function_type::<all the methods>): Move the previously inline
517 methods of function_type here. Adjust them to tap into priv_->*
518 to get the private data members.
519
5202014-10-27 Dodji Seketeli <dodji@redhat.com>
521
522 Light style fix
523 * include/abg-ir.h (function_decl::get_type): Change the return
524 type from shared_ptr<function_type> to function_type_sptr.
525
5262014-10-27 Dodji Seketeli <dodji@redhat.com>
527
528 Allow white spaces in ini file property values
529 * src/abg-ini.cc (read_context::char_is_property_value_char): New
530 member function.
531 (read_context::read_next_char): Fix typos. Allow escaping of '['
532 and ']'.
533 (read_context::read_property_value): Use the new
534 read_context::char_is_property_value_char above.
535
5362014-10-27 Dodji Seketeli <dodji@redhat.com>
537
538 Fix typo in suppression specification manual
539 * doc/manuals/libabigail-concepts.rst: Fix name -> name_regexp.
540
5412014-10-22 Dodji Seketeli <dodji@redhat.com>
542
543 Support comparing symbols not referenced by debug info
544 * doc/manuals/abidiff.rst: Adjust intro to mention that w/o debug
545 info, abidiff now works but just report about added/removed
546 symbols. Add documentation about the new
547 --no-unreferenced-symbols option.
548 * include/abg-comparison.h (string_elf_symbol_map): New typedef.
549 (diff_context::show_symbols_unreferenced_by_debug_info): Declare
550 new accessors.
551 * src/abg-comparison.cc
552 (diff_context::priv::show_syms_unreferenced_by_di_): New data
553 member.
554 (diff_context::priv::priv): Adjust.
555 (diff_context::show_symbols_unreferenced_by_debug_info): Implement
556 these accessors.
557 (corpus_diff::priv::{unrefed_fn_syms_edit_script_,
558 unrefed_var_syms_edit_script_, added_unrefed_fn_syms_,
559 deleted_unrefed_fn_syms_, added_unrefed_var_syms_,
560 deleted_unrefed_var_syms_}): New data members.
561 (corpus_diff::priv::diff_stats::{num_func_syms_removed,
562 num_func_syms_added, num_var_syms_removed, num_var_syms_added}):
563 New data members.
564 (corpus_diff::priv::diff_stats::diff_stats): Adjust.
565 (corpus_diff::ensure_lookup_tables_populated): Populate lookup
566 tables for added/removed symbols that are not referenced by any
567 debug info.
568 (corpus_diff::priv::apply_filters_and_compute_diff_stats): Compute
569 stats for the added/removed symbols not referenced by any debug
570 info.
571 (corpus_diff::priv::emit_diff_stats): Emit stats about
572 added/removed symbols that are not referenced by any debug info.
573 (corpus_diff::length): Adjust to take in account added/removed
574 symbols not referenced by any debug info.
575 (show_linkage_name_and_aliases): New static function.
576 (corpus_diff::report): When emitting a symbol name, emit its
577 version too, and tell if it aliases other symbols. Avoid emitted
578 extra new lines. Report added/removed symbols not referenced by
579 any debug info.
580 (compute_diff): In the overload for corpus_sptr, compute the diffs
581 for symbols not referenced by debug info.
582 * include/abg-corpus.h
583 (corpus::get_unreferenced_{function,variable}_symbols): Declare
584 new member functions.
585 * src/abg-corpus.cc (corpus_priv::{unrefed_fun_symbols,
586 unrefed_var_symbols}): New data members.
587 (corpus_priv::build_unreferenced_symbols_tables): Define new
588 member function.
589 (struct comp_elf_symbols_functor): New functor.
590 (corpus::is_empty): Adjust to take in account added/removed
591 symbols not referenced by debug info.
592 (corpus::{get_unreferenced_function_symbols,
593 corpus::get_unreferenced_variable_symbols}): Define these
594 accessors.
595 * include/abg-dwarf-reader.h (enum status): Transform this into
596 bitfields. Add a STATUS_UNKNOWN value that has the value 0.
597 (operator|(status, status), operator&(status, status))
598 (operator|=(status&, status), operator&=(status, status)): New
599 bit-wise operators to manipulate instances of the status bit-field.
600 * src/abg-dwarf-reader.cc (get_version_for_symbol): Fix this to
601 avoid returning garbage version sometimes.
602 (read_debug_info_into_corpus): Fix this to return a non-null but
603 empty corpus_sptr when there is no debug info available.
604 (operator|(status, status), operator&(status, status))
605 (operator|=(status&, status), operator&=(status, status)): Define
606 these new bitwise operators to manipulate instances of the status
607 bit-field.
608 (read_corpus_from_elf): Now that the abigail::dwarf_reader::status
609 is a bit-field, set it to reflect if debug info and/or symbol
610 tables have been found. Do not bail out if debug info hasn't been
611 found. Rather, keep going, and go look for symbols-only; this is
612 a kind of operating in degraded mode.
613 * include/abg-ir.h (elf_symbol::get_aliases_id_string): Add a flag
614 that says if the current instance of elf_symbol should be included
615 in the list of aliases or not.
616 * src/abg-ir.cc (elf_symbol::get_aliases_id_string): Define it.
617 * tests/data/test-diff-dwarf/test16-syms-only-v{0,1}.o: New test
618 input.
619 * tools/abidiff.cc
620 (options::show_symbols_not_referenced_by_debug_info): New data
621 member.
622 (options:options): Adjust.
623 (display_usage): Add an info string for the new
624 --no-unreferenced-symbols command line option.
625 (parse_command_line): Parse the new --no-unreferenced-symbols
626 command line.
627 (set_diff_context_from_opts): Set the diff_context according to
628 the presence of --no-unreferenced-symbols.
629 (main): Adjust for the fact that abigail::dwarf_reader::status is
630 now a bit-field.
631 * tools/abilint.cc (main): Adjust for the fact that
632 abigail::dwarf_reader::status is now a bit-field..
633 ():
634 * tests/data/test-diff-dwarf/test16-syms-only-report.txt: New test
635 reference output.
636 * tests/data/test-diff-dwarf/test16-syms-only-v{0,1}.cc: Source code
637 for new test input.
638 * tests/data/test-diff-dwarf/test17-non-refed-syms-v{0,1}.o: New
639 test input.
640 * tests/data/test-diff-dwarf/test17-non-refed-syms-v{0,1}.cc: New
641 source code for test input.
642 * tests/data/test-diff-dwarf/libtest18-alias-sym-v{0,1}.so: New
643 test input.
644 * tests/data/test-diff-dwarf/test18-alias-sym-report-0.txt:
645 Reference output for new test input.
646 * tests/data/test-diff-dwarf/test18-alias-sym-v{0,1}.cc: Source
647 code for new test input.
648 * tests/data/test-diff-dwarf/test18-alias-sym-version-script:
649 Source code for new test input.
650 * tests/Makefile.am: Add the new test materials to the source
651 distribution.
652 * tests/test-diff-dwarf.cc(in_out_specs): Add the new input tests
653 above to the array of tests to run by this harness.
654 (main): Emit empty reports for empty resulting diffs.
655 * tests/data/test-diff-dwarf/test{0,8,9,12,14-inline-report,}-report.txt:
656 Adjust.
657 * tests/data/test-diff-filter/test{0,01,2,4,5,7,8,9,10,12,13,15-0,15-1}-report.txt:
658 Likewise.
659 * tests/data/test-diff-filter/test{19-enum,20-inline,}-report-0.txt:
660 Likewise.
661 * tests/data/test-diff-suppr/test0-type-suppr-report-{1,2}.txt:
662 Likewise.
663 * tests/data/test-diff-suppr/test{1,2}-typedef-suppr-report-1.txt:
664 Likewise.
665
6662014-10-22 Dodji Seketeli <dodji@redhat.com>
667
668 Allow comparison of shared_ptr of things
669 * include/abg-diff-utils.h: Adjust copyright years.
670 (deep_ptr_eq_functor::operator()(const shared_ptr<T>, const
671 shared_ptr<T>)): New comparison operator.
672
6732014-10-17 Dodji Seketeli <dodji@redhat.com>
674
675 Use the "standard" equality operator when comparing variables
676 * src/abg-comparison.cc (compute_diff): In the overload for
677 corpus_sptr, use the diff_utils::deep_ptr_eq_functor that is used
678 to compare functions too, rather than the ad-hoc early struct
679 var_eq_type we were using until now.
680
6812014-10-16 Dodji Seketeli <dodji@redhat.com>
682
683 Yet another fix to the DWARF method "static-ness" detection heuristic
684 * include/abg-fwd.h (is_pointer, is_qualified_type): Declare new
685 functions.
686 * src/abg-ir.cc (is_pointer, is_qualified_type): Implement these
687 new functions.
688 * src/abg-dwarf-reader.cc (finish_member_function_reading):
689 Sometimes, the this pointer of a non-static method can point to a
690 *qualified* version of its containing type. I am seeing that when
691 comparing libstdc++.so from RHEL 6.5 and RHEL 7. Take that in
692 account when trying to detect that the first parameter of a member
693 function is the this pointer, and thus detect that the function is
694 a non static member function.
695 * tests/data/test-read-dwarf/test8-qualified-this-pointer.so.abi:
696 New test input.
697 * tests/data/test-read-dwarf/test8-qualified-this-pointer.so: New
698 test input.
699 * tests/data/test-read-dwarf/test8-qualified-this-pointer.cc:
700 Source code of new test input.
701 * tests/test-read-dwarf.cc: Update copyright year.
702 (in_out_spec): Add the new test inputs to this array, so that this
703 test harness runs on them.
704 * tests/Makefile.am: Add the new test inputs to the source
705 distribution.
706
7072014-10-16 Dodji Seketeli <dodji@redhat.com>
708
709 Avoid infinite loops in the comparison code for classes
710 * src/abg-ir.cc (equals): In the overload for classes, make sure
711 to store the name of the lhs of the class and the rhs into the
712 lhs. Also, when we bail out because we detect that there is a
713 comparison underway, do *not* unmark the current class as not being
714 involved in the comparison. Also, break at the first lhs virtual
715 member function that is different from the rhs counter part.
716
7172014-10-15 Dodji Seketeli <dodji@redhat.com>
718
719 Update the manual for the suppression specification initial work
720 * doc/manuals/abidiff.rst: Add documentation for the new
721 --suppressions command line switch.
722 (--harmless, --harmful): Refer to the new "concepts" section
723 below, where harmful/harmless concepts are now explained.
724 (Notes): Move the content of the notes section where
725 harmful/harmless concepts were explained, to the newly created
726 'Concepts' section.
727 * doc/manuals/index.rst: Limit the depth of the table of content
728 to 2. Add the new libabigail-concepts.rst stuff in here. Adjust
729 for the renaming of tools.rst to libabigail-tools.rst.
730 * doc/manuals/libabigail-concepts.rst: New file.
731
7322014-10-13 Dodji Seketeli <dodji@redhat.com>
733
734 Properly propagate {REDUNDANT, SUPPRESSED}_CATEGORY wrt local changes
735 * src/abg-comparison.cc
736 (suppression_categorization_visitor::visit_end): If a diff node
737 carries local changes, then, even if all of its children node have
738 been suppressed, this diff node shall not be categorized as
739 suppressed by way of propagation.
740 (redundancy_marking_visitor::visit_end): If a diff node carries
741 local changes, then, even if all of its children nodes are
742 redundant, this diff node shall not be categorized as being
743 redundant by way of propagation.
744 * tests/data/test-diff-suppr/libtest4-local-suppr-v{0,1}.so: New test
745 inputs.
746 * tests/data/test-diff-suppr/test4-local-suppr-0.suppr: Likewise.
747 * tests/data/test-diff-suppr/test4-local-suppr-report-{0,1}.txt:
748 Likewise.
749 * tests/data/test-diff-suppr/test4-local-suppr-v{0,1}.{c,h}:
750 Source code of the new tests inputs.
751 * tests/Makefile.am: Add the new test material to the source
752 distribution.
753 * tests/test-diff-suppr.cc (in_out_spec): Run this test harness
754 over the new test input above.
755
7562014-10-13 Dodji Seketeli <dodji@redhat.com>
757
758 Gain ability know if a diff node has local changes
759 * include/abg-comparison.h (diff::has_local_changes): Add new pure
760 interface.
761 ({decl_diff_base, type_diff_base, distinct_type_diff, var_diff,
762 pointer_diff, reference_diff, array_diff, qualified_type_diff,
763 enum_diff, class_diff, base_diff, scope_diff, function_decl_diff,
764 type_decl_diff, typedef_diff,
765 translation_unit_diff}::has_local_changes): Declare the
766 implementation of the pure interface above.
767 * src/abg-comparison.cc ({decl_diff_base, type_diff_base,
768 distinct_type_diff, var_diff, pointer_diff, reference_diff,
769 array_diff, qualified_type_diff, enum_diff, class_diff, base_diff,
770 scope_diff, function_decl_diff, type_decl_diff, typedef_diff,
771 translation_unit_diff}::has_local_changes): Define the
772 implementation of the pure interface above.
773
7742014-10-13 Dodji Seketeli <dodji@redhat.com>
775
776 Write comparison functions that hint at the kind of changes they see
777 * include/abg-ir.h (enum change_kind): Declare new enum.
778 (operator|(change_kind, change_kind), operator&(change_kind,
779 change_kind), operator|=(change_kind&, change_kind)): Declare new bit-wise
780 operators for the new enum change_kind.
781 (equals): Declare this new comparison function for decl_base,
782 scope_decl, type_base, type_decl, scope_type_decl,
783 qualified_type_def, pointer_type_def, reference_type_def,
784 array_type_def, enum_type_decl, typedef_decl, var_decl,
785 function_decl, function_type, class_decl, and
786 class_decl::base_spec.
787 (class_decl::base_spec::operator(const decl_base&)): Declare new
788 equality operator.
789 * src/abg-ir.cc (operator|(change_kind l, change_kind r))
790 (operator&(change_kind l, change_kind r), operator|=(change_kind&
791 l, change_kind r), operator&=(change_kind& l, change_kind r)):
792 Define these new operators.
793 (equals): Define this new comparison function for decl_base,
794 scope_decl, type_base, type_decl, scope_type_decl,
795 qualified_type_def, pointer_type_def, reference_type_def,
796 array_type_def, enum_type_decl, typedef_decl, var_decl,
797 function_decl, function_type, class_decl, and
798 class_decl::base_spec.
799 ({decl_base, scope_decl, type_base, type_decl, scope_type_decl,
800 qualified_type_def, pointer_type_def, reference_type_def,
801 array_type_def, enum_type_decl, typedef_decl, var_decl,
802 function_decl, function_type, class_decl,
803 class_decl::base_spec}::operator==): Re-write these comparison
804 operators in terms of their relevant equal() functions.
805
8062014-09-22 Dodji Seketeli <dodji@redhat.com>
807
808 Fix struct type kind suppression support
809 * src/abg-comparison.cc (type_suppression::suppresses_diff): Do
810 not crash on diff nodes that are not about struct/classes, when
811 "type_kind = struct" has been specified.
812 * tests/data/test-diff-suppr/test2-struct-suppr-{0,1}.suppr: New test input.
813 * tests/data/test-diff-suppr/test2-struct-suppr-report-{0,1}.txt:
814 Likewise.
815 * tests/data/test-diff-suppr/test2-struct-suppr-v{0,1}.o: Likewise
816 * tests/data/test-diff-suppr/test2-struct-suppr-v{1,0}.cc: Source code
817 for binary test input.
818 * tests/test-diff-suppr.cc (in_out_spec): Run this harness on the
819 new test input above.
820 * tests/Makefile.am: Add the new test input files to source
821 distribution.
822
8232014-09-22 Dodji Seketeli <dodji@redhat.com>
824
825 Replace is_typedef by type_kind property in type suppressions
826 * doc/suppr-doc.txt: Add type_kind property "documentation" in the
827 type suppression.
828 * include/abg-comparison.h (type_suppression::type_kind): New
829 enum.
830 (type_suppression::{get_consider_typedefness,
831 set_consider_typedefness, get_is_typedef, set_is_typedef}):
832 Remove.
833 (type_suppression::{get_consider_type_kind,
834 set_consider_type_kind, get_type_kind, set_type_kind}): Declare
835 new methods.
836 * Include/abg-fwd.h (is_type_decl): Declare new function.
837 (is_enum): Declare new overload that takes a type_base_sptr.
838 * src/abg-comparison.cc
839 (type_suppression::priv::{consider_typedefness_, is_typedef_}):
840 Remove these data members.
841 (type_suppression::priv::{consider_type_kind_, type_kind_}): New
842 data members.
843 (type_suppression::priv::priv): Adjust.
844 (type_suppression::{get_consider_typedefness,
845 set_consider_typedefness, get_is_typedef, set_is_typedef}): Remove
846 these member functions.
847 (type_suppression::{get_consider_type_kind,
848 set_consider_type_kind, get_type_kind, set_type_kind}): Define
849 these new member functions.
850 (type_suppression::suppresses_diff): Adjust to consider the kind
851 of types more generally than just considering typedef-ness.
852 (read_type_kind_string): New static function.
853 (read_type_suppression): Use the above to parse the value of the
854 new type_kind property. Adjust the creation of the resulting
855 type_suppression object.
856 * src/abg-ir.cc (is_type_decl): Define new function.
857 * tests/data/test-diff-suppr/test1-typedef-suppr-0.suppr: Adjust.
858 * tests/data/test-diff-suppr/test1-typedef-suppr-1.suppr: Adjust.
859
8602014-09-19 Dodji Seketeli <dodji@redhat.com>
861
862 Initial support for type suppressions
863 * include/abg-comparison.h (diff_category::SUPPRESSED_CATEGORY):
864 New enumerator.
865 (diff_category::{SIZE_OR_OFFSET_CHANGE_CATEGORY,
866 VIRTUAL_MEMBER_CHANGE_CATEGORY): Update the enumerator values for
867 these.
868 (diff::EVERYTHING_CATEGORY): Adjust.
869 (suppression_base, type_suppression): Declare new types.
870 (suppression_ptr, suppressions_type, type_suppression_sptr)
871 (type_suppressions_type): New typedefs.
872 (read_type_suppressions, read_suppressions): Declare new
873 functions.
874 (diff_context::{suppressions, add_suppression, add_suppressions}):
875 Declare new methods.
876 (diff::is_suppressed): Declare new member function.
877 (apply_suppressions): Declare new function & overloads.
878 * src/abg-comparison.cc (is_type_diff): Define new static
879 function.
880 ({suppression_base, type_suppression}::priv): Define new types.
881 ({suppression_base, type_suppression}::*): Define the methods of the new
882 suppression_base, type_suppressions types.
883 (read_type_suppression, read_type_suppressions, read_suppressions)
884 (read_type_suppressions): Define new static functions.
885 (diff_context::priv::supprssions_): New data member.
886 (diff_context::{suppressions, add_suppression, add_suppressions}):
887 New methods.
888 (diff::is_filtered_out): Consider that a diff node that is in the
889 SUPPRESSED_CATEGORY is filtered out.
890 (diff::is_suppressed): Define new member function.
891 (operator<<(ostream& o, diff_category c)): Support the
892 SUPPRESSED_CATEGORY category.
893 (corpus_diff::report): Apply suppressions before reporting
894 anything.
895 (category_propagation_visitor::visit_end): Do not propagate
896 SUPPRESSED_CATEGORY. This is just like what we do for
897 REDUNDANT_CATEGORY.
898 (struct suppression_categorization_visitor): New visitor.
899 (apply_suppressions): Define function & overloads.
900 * include/abg-ini.h (config::section::find_property): New method.
901 (config::section): Fix end of class comment.
902 * src/abg-ini.cc (config::section::find_property): Define new
903 method.
904 * tests/data/test-diff-suppr/test0-type-suppr-{0,1,2}.suppr: New
905 test input files.
906 * tests/data/test-diff-suppr/test0-type-suppr-report-{0,1,2,3}.txt:
907 Likewise.
908 * tests/data/test-diff-suppr/test0-type-suppr-v{0,1}.o: Likewise.
909 * tests/data/test-diff-suppr/test0-type-suppr-v{0,1}.cc: Source code
910 for new test input.
911 * tests/data/test-diff-suppr/test1-typedef-suppr-v{0,1}.o: New test
912 input files.
913 * tests/data/test-diff-suppr/test1-typedef-suppr.h: Source code
914 for new test input files.
915 * tests/data/test-diff-suppr/test1-typedef-suppr-v{0,1}.c: Likewise
916 * tests/data/test-diff-suppr/test1-typedef-suppr-{0,1}.suppr: New
917 test input files.
918 * tests/data/test-diff-suppr/test1-typedef-suppr-report-0.txt: Likewise.
919 * tests/data/test-diff-suppr/test1-typedef-suppr-report-1.txt: Likewise.
920 * tests/data/test-diff-suppr/test1-typedef-suppr-report-2.txt: Likewise.
921 * tests/test-diff-suppr.cc: New test harness to run type suppression tests
922 using the input files above.
923 * tests/data/test-diff-suppr/test3-struct-suppr-0.suppr: New test input.
924 * tests/data/test-diff-suppr/test3-struct-suppr-1.suppr: Likewise.
925 * tests/data/test-diff-suppr/test3-struct-suppr-report-0.txt: Likewise.
926 * tests/data/test-diff-suppr/test3-struct-suppr-report-1.txt: Likewise.
927 * tests/data/test-diff-suppr/test3-struct-suppr-report-2.txt: Likewise.
928 * tests/data/test-diff-suppr/test3-struct-suppr-v0.cc: Likewise.
929 * tests/data/test-diff-suppr/test3-struct-suppr-v0.o: Likewise.
930 * tests/data/test-diff-suppr/test3-struct-suppr-v1.cc: Likewise.
931 * tests/data/test-diff-suppr/test3-struct-suppr-v1.o: Likewise.
932 * tests/Makefile.am: Build the new runtestdiffsuppr test harness
933 from the test-diff-filter.cc file. Add the new test files to the
934 build system and source distribution.
935 * tools/bidiff.cc (options::suppressions): New data member.
936 (display_usage): Add a help string for the new
937 --suppressions command line switch.
938 (parse_command_line): Parse the --suppressions command line
939 switch.
940 (set_diff_context_from_opts): Read the suppressions provided by
941 the --suppression command line switch and stuff them into the diff
942 context.
943
9442014-09-19 Dodji Seketeli <dodji@redhat.com>
945
946 Make all type diff types extend new type_diff_base type
947 * include/abg-comparison.h (type_diff_base, decl_diff_base): New
948 types.
949 (type_diff_base_sptr): New typedef.
950 (pointer_diff, reference_diff, array_diff, qualified_type_diff)
951 (enum_diff, class_diff, type_decl_diff, typedef_diff): Make this
952 extend the new type_diff_base.
953 * src/abg-comparison.cc (type_diff_base::priv, type_diff_base):
954 Define these new types and their methods.
955 (pointer_diff::pointer_diff, array_diff::array_diff)
956 (reference_diff::reference_diff)
957 (qualified_type_diff::qualified_type_diff, enum_diff::enum_diff)
958 (class_diff::class_diff, type_decl_diff::type_decl_diff)
959 (typedef_diff::typedef_diff): Adjust.
960
9612014-09-18 Dodji Seketeli <dodji@redhat.com>
962
963 Rename abigail::ini::config::section_vector to sections_type
964 * include/abg-ini.h (abigail::ini::config::sections_type): Renamed
965 section_vector into this.
966 (config::{get_sections, set_sections, read_sections,
967 write_sections}): Adjust.
968 * src/abg-ini.cc (config::priv::sections_): Adjust.
969 (config::priv::priv): Likewise.
970 (config::{config, get_sections}): Likewise.
971 (read_sections, read_config, write_sections): Likewise.
972
9732014-09-08 Dodji Seketeli <dodji@redhat.com>
974
975 Implement the abigail::ini::config abstraction
976 * include/abg-ini.h (config::config): Add an overload that take a
977 path and sections.
978 (config::{get,set}_sections): New accessors.
979 (read_sections): Rename the previous read_config() functions into
980 these.
981 (read_config): Add these function declarations to really act on
982 instances of abigail::ini::config.
983 (write_section): Rename the previous write_config functions into
984 these.
985 (write_config): Add these function declarations to really act on
986 instances of abigail::ini::config.
987 * src/abg-ini.cc (class config::priv): Implement this.
988 (config::{config, ~config, get_path, set_path, get_sections,
989 set_sections}): Define these new methods.
990 (read_sections): Rename the former read_config into this.
991 (read_config): Add this function definitions to really act on
992 instances of abigail::ini::config.
993 (write_sections): Rename the former write_config into this.
994 (write_config):: Add this function definitions to really act on
995 instances of abigail::ini::config.
996 * tools/binilint.cc (main): Adjust.
997
9982014-09-05 Dodji Seketeli <dodji@redhat.com>
999
1000 Initial support of ini-style file parsing
1001 * include/abg-ini.h: New file.
1002 * include/Makefile.am: Add include/abg-ini.h to the source
1003 distribution.
1004 * src/abg-ini.cc: New file.
1005 * src/Makefile.am: Add src/abg-ini.cc to the source distribution.
1006 * tools/binilint.cc: New testing tool.
1007 * tools/Makefile.am: Add tools/binilint.cc to the source distribution.
1008
10092014-09-03 Dodji Seketeli <dodji@redhat.com>
1010
1011 Initial examples of suppression list specifications
1012 * doc/suppr-doc.txt: New file.
1013
10142014-10-11 Dodji Seketeli <dodji@redhat.com>
1015
1016 Put IR artifacts in the abigail::ir namespace
1017 * include/abg-fwd.h: Wrap IR artifacts into abigail::ir namespace.
1018 Inject that new abigail::ir namespace into the abigail namespace.
1019 * include/abg-ir.h: Wrap IR artifacts into abigail::ir namespace.
1020 (function_decl::parameter::get_type_name): Adjust the call to
1021 abigail::get_type_name. It's now a call to
1022 abigail::ir::get_type_name.
1023 * src/abg-ir.cc: Wrap IR artifacts into abigail::ir namespace.
1024 * include/abg-traverse.h: Wrap the ir traversing artifact into the
1025 abigail::ir namespace too.
1026 * src/abg-traverse.cc: Adjust.
1027 * include/abg-corpus.h: Wrap corpus type stuff into abigail::ir.
1028 * include/abg-dwarf-reader.h: Inject namespace abigail::ir stuff
1029 into the abigail::dwarf_reader namespace.
1030 * include/abg-reader.h: Inject namespace abigail::ir stuff into
1031 the abigail::xml_reader namespace.
1032 * src/abg-reader.cc: Adjust.
1033 * include/abg-writer.h: Inject namespace abigail::ir stuff into
1034 the abigail::xml_writer namespace.
1035 * src/abg-writer.cc: Inject namespace abigail::ir stuff into
1036 abigail namespace here too.
1037 * src/abg-hash.cc: Inject the abigail::ir namespace into the
1038 abigail namespace.
1039 * tools/abg-tools-utils.cc: Adjust for the injection of
1040 abigail::function_decl. It's now abigail::ir::function_decl.
1041
10422014-10-13 Dodji Seketeli <dodji@redhat.com>
1043
1044 Misc style cleanups
1045 * src/abg-comparison.cc: ({pointer_diff, reference_diff}::length):
1046 Add some vertical spaces here.
1047
10482014-10-13 Dodji Seketeli <dodji@redhat.com>
1049
1050 constify dm_context_rel::operator==
1051 * include/abg-ir.h (dm_context_rel::operator==): Make this const.
1052
10532014-10-13 Dodji Seketeli <dodji@redhat.com>
1054
1055 A distinct_diff node has no children node
1056 * src/abg-comparison.cc (distinct_diff::chain_into_hierarchy): Do
1057 not append any children node here.
1058
10592014-10-13 Dodji Seketeli <dodji@redhat.com>
1060
1061 Remove useless redundant_filter
1062 * include/abg-comp-filter.h (class redundant_filter): Remove this
1063 now useless type declaration
1064 * src/abg-comparison.cc (filtering::redundant_filter::visit):
1065 Remove this useless member function definition.
1066
10672014-10-10 Dodji Seketeli <dodji@redhat.com>
1068
1069 Sort diff reports about function parameters by their indexes
1070 * include/abg-comparison.h (changed_parms_type): New convenience
1071 typedef.
1072 * src/abg-comparison.cc (struct changed_parm_comp): New comparison
1073 functor.
1074 (sort_changed_parm_map): New sorting function.
1075 (function_decl_diff::report): Use the new sort_changed_parm_map to
1076 sort the diffs for function parameters by their indexes.
1077
10782014-10-10 Dodji Seketeli <dodji@redhat.com>
1079
1080 Don't be too eager to use distinct_diff
1081 * src/abg-comparison.cc (try_to_diff): For this to actually
1082 select a diff kind, the two diff subject must be of type
1083 'DiffType'.
1084 (compute_diff_for_types, compute_diff_for_decls): Use
1085 distinct_diff in last resort.
1086
10872014-10-10 Dodji Seketeli <dodji@redhat.com>
1088
1089 Implement generic diff tree walking and port categorization over it
1090 * include/abg-comp-filter.h (apply_filter): Declare new overload
1091 that takes a corpus_diff_sptr ...
1092 * src/abg-comp-filter.cc (apply_filter): ... and define it. On
1093 the existing overload for diff_sptr, make sure to traverse all
1094 diff nodes, even those that have already been traversed.
1095 * include/abg-comparison.h (enum diff_category): Remove
1096 NOT_REDUNDANT_CATEGORY, add REDUNDANT_CATEGORY.
1097 (operator&=, +operator<<): Declare new operators for enum diff_category.
1098 (diff_context::{forbid_traversing_a_node_twice,
1099 traversing_a_node_twice_is_forbidden):
1100 (diff_context::categorizing_redundancy): Remove this declaration.
1101 (diff_context::maybe_apply_filters): Declare a new overload that
1102 takes a corpus_diff_sptr. And a take a new flag that says if it
1103 should visit all nodes including those that have already been
1104 visited.
1105 (diff::priv_): Make this data member protected.
1106 (diff::{begin_traversing, is_traversing, end_traversing,
1107 finish_diff_type, children_nodes, append_child_node,
1108 get_pretty_representation, chain_into_hierarchy, traverse}):
1109 Declare new member functions.
1110 (distinct_diff::{finish_diff_type, get_pretty_representation,
1111 chain_into_hierarchy}): Likewise.
1112 (distinct_diff::traverse): Remove.
1113 (pointer_diff::pointer_diff): Take the underlying type diff in
1114 parameter.
1115 (pointer_diff::{finish_diff_type, get_pretty_representation,
1116 chain_into_hierarchy}): Declare new member functions.
1117 (pointer_diff::traverse): Remove.
1118 (reference_type_def::reference_type_def): Take the underlying type
1119 diff in parameter.
1120 ({array_type_def, reference_type_def}::{finish_diff_type,
1121 get_pretty_representation, chain_into_hierarchy}): Declare new
1122 member functions.
1123 ({array_type_diff, reference_type_def}::traverse): Remove.
1124 (qualified_type_diff::qualified_type_diff): Take the underlying
1125 type diff in parameter.
1126 ({enum_diff, qualified_type_diff, class_diff}::{finish_diff_type,
1127 get_pretty_representation, chain_into_hierarchy}): Declare new
1128 member functions.
1129 ({enum_diff, qualified_type_diff, class_diff}::traverse): Remove.
1130 (is_class_diff): Declare new function.
1131 (base_diff::base_diff): Take the underlying type diff in
1132 parameter.
1133 ({scope_diff, base_diff}::{finish_diff_type, get_pretty_representation,
1134 chain_into_hierarchy}): Declare new member functions.
1135 ({scope_diff, base_diff}::traverse): Remove.
1136 (function_decl_diff::function_decl_diff): Take the return type
1137 diff as parameter.
1138 ({function_decl_diff, type_decl_diff}::{finish_diff_type,
1139 get_pretty_representation, chain_into_hierarchy}): Declare new
1140 member functions.
1141 ({function_decl_diff, type_decl_diff}::traverse): Remove.
1142 (typedef_diff::typedef_diff): Take the underlying type diff as
1143 parameter.
1144 (typedef::{finish_diff_type, get_pretty_representation,
1145 chain_into_hierarchy}): Declare new member functions.
1146 ({typedef, translation_unit_diff}::traverse): Remove member
1147 function.
1148 (corpus_diff::{finish_diff_type, children_nodes,
1149 append_child_node, changed_variables, get_pretty_representation,
1150 chain_into_hierarchy}): Declare new member functions.
1151 (class diff_node_visitor::{visit_begin, visit_end}): Declare new
1152 member functions.
1153 (propagate_categories, print_diff_tree, categorizing_redundancy)
1154 (clear_redundancy_categorization, apply_filters): New functions
1155 and function overloads.
1156 * src/abg-comparison.cc (TRY_PRE_VISIT, TRY_PRE_VISIT_CLASS_DIFF)
1157 (TRY_POST_VISIT, TRY_POST_VISIT_CLASS_DIFF)
1158 (CATEGORIZE_REDUNDANCY_FROM_CHILD_NODE)
1159 (UPDATE_REDUNDANCY_CATEGORIZATION_FROM_NODE_SUBTREE)
1160 (TRAVERSE_DIFF_NODE_AND_PROPAGATE_CATEGORY)
1161 (TRAVERSE_MEM_DIFF_NODE_AND_PROPAGATE_CATEGORY)
1162 (TRAVERSE_MEM_FN_DIFF_NODE_AND_PROPAGATE_CATEGORY)
1163 (ENSURE_DIFF_NODE_TRAVERSED_ONCE)
1164 (ENSURE_MEM_DIFF_NODE_TRAVERSED_ONCE): Remove these macros.
1165 Hurrah.
1166 (diff_context::priv::categorizing_redundancy_): Remove.
1167 (diff_context::priv::forbid_traversing_a_node_twice_): Add new
1168 data member.
1169 (diff_context::priv::priv): Adjust.
1170 (diff_context::{forbid_traversing_a_node_twice,
1171 traversing_a_node_twice_is_forbidden}): Define new member
1172 functions.
1173 (diff_context::maybe_apply_filters): Once filters are applied (and
1174 categories are set to the relevant diff tree nodes, run a pass
1175 over the diff tree to propagate the categories to the relevant
1176 diff tree parent nodes. Add an overload for corpus_diff_sptr.
1177 (diff_context::categorizing_redundancy): Remove member function.
1178 (diff_context::maybe_apply_filters): Define a new overload for
1179 corpus_diff_sptr
1180 (struct diff::priv::{finished_, traversing_, children_,
1181 pretty_representation_}): New data members.
1182 (diff::priv::priv): Adjust.
1183 (diff::{begin_traversing, is_traversing, end_traversing,
1184 finish_diff_type, children_nodes, append_child_node, traverse,
1185 set_category, get_pretty_representation, chain_into_hierarchy}):
1186 Define new member functions.
1187 (diff::is_filtered_out): Do not refer to NOT_REDUNDANT_CATEGORY
1188 anymore. Rather, use the new REDUNDANT_CATEGORY.
1189 ({distinct_diff, var_diff, pointer_diff, array_diff,
1190 reference_diff, qualified_type_diff, enum_diff, class_diff,
1191 base_diff, scope_diff, function_decl_diff, type_decl_diff,
1192 typedef_diff}::{get_pretty_representation, chain_into_hierarchy,
1193 finish_diff_type}): Define new member functions.
1194 ({distinct_diff, var_diff, pointer_diff, array_diff,
1195 reference_diff, qualified_type_diff, enum_diff, class_diff,
1196 base_diff, scope_diff, function_decl_diff, type_decl_diff,
1197 typedef_diff, translation_unit_diff}::traverse): Remove member
1198 functions.
1199 (operator&=, operator<<): Define new operators for diff_category.
1200 ({function_decl_diff, typedef_diff}::priv::priv): Add a new
1201 constructor.
1202 (pointer_diff::{priv::priv, pointer_diff})
1203 (reference_diff::{priv::priv, reference_diff})
1204 (qualified_type_diff::{priv::priv, qualified_type_diff})
1205 (enum_diff::{priv::priv, enum_diff}, base_diff::{priv::priv,
1206 base_diff}, function_decl_diff::function_decl_diff): Take the
1207 underlying type diff in parameter.
1208 (compute_diff): Adjust the pointer_diff, reference_diff,
1209 qualified_type_diff, base_diff, function_decl_diff overloads.
1210 (class_diff::priv::{count_filtered_bases,
1211 count_filtered_subtype_changed_dm, count_filtered_changed_dm,
1212 count_filtered_changed_mem_fns, count_filtered_inserted_mem_fns,
1213 count_filtered_deleted_mem_fns}): Adjust for the call to
1214 diff_context::maybe_apply_filters.
1215 (corpus_diff::priv::{finished_, pretty_representation_}): New data
1216 member.
1217 (corpus_diff::priv::priv): New constructor.
1218 (corpus_diff::priv::clear_redundancy_categorization): Define new
1219 member function.
1220 (corpus_diff::priv::apply_filters_and_compute_diff_stats):
1221 Adjust for call to diff_context::maybe_apply_filters. Also, call
1222 clear_redundancy_categorization at the end.
1223 (corpus_diff::priv::categorize_redundant_changed_sub_nodes):
1224 Revisit logic.
1225 (corpus_diff::{chain_into_hierarchy, finish_diff_type,
1226 children_nodes, append_child_node, changed_variables,
1227 get_pretty_representation}): Define new member functions.
1228 (corpus_diff::report): Categorize redundancy for every top level
1229 function/variable diff.
1230 (corpus_diff::traverse): Adjust to the new traversing interface.
1231 (diff_node_visitor::{visit_begin, visit_end}): Define new member
1232 functions.
1233 (struct category_propagation_visitor, struct diff_node_printer)
1234 (struct redundancy_marking_visitor, struct
1235 redundancy_clearing_visitor): New diff tree node visitors.
1236 (propagate_categories, print_diff_tree, categorize_redundancy)
1237 (clear_redundancy_categorization, apply_filters): Define new
1238 functions.
1239 * tests/Makefile.am: Add the new tests/print-diff-tree.cc to the
1240 source distribution. Build it into a tests/printdifftree binary.
1241 * tools/abidiff.cc (print_diff_tree): Add debugging functions to
1242 call from within the debugger. By default, this function and its
1243 overloads are not compiled.
1244
12452014-10-10 Dodji Seketeli <dodji@redhat.com>
1246
1247 Update copyright notice for tests/test-diff2.cc
1248 * tests/test-diff2.cc: Update copyright year.
1249
12502014-10-09 Dodji Seketeli <dodji@redhat.com>
1251
1252 Do not crash on function_decl_diff for fns that have no symbol
1253 * src/abg-comparison.cc (function_decl_diff::report): If a
1254 function decl has no associated elf symbol, do not crash while
1255 trying to report about its elf symbol aliases.
1256
12572014-10-09 Dodji Seketeli <dodji@redhat.com>
1258
1259 Avoid broken output for virtual member fns w/o symbols
1260 * src/abg-comparison.cc (represent): When a virtual member
1261 function has no associated elf symbol, do not emit garbage in lieu
1262 of the linkage name. Just emit no linkage name;
1263 * tests/data/test-abidiff/test-struct1-report.txt: Adjust.
1264
12652014-10-02 Dodji Seketeli <dodji@redhat.com>
1266
1267 Sort added/removed/changed functions reported by the comparison engine
1268 * src/abg-comparison.cc (struct function_comp, struct
1269 changed_function_ptr_comp): New comparison functors.
1270 (sort_string_function_ptr_map)
1271 (sort_string_changed_function_ptr_map): Define new static
1272 functions.
1273 (corpus_diff::report): Sort the added/removed/changed functions
1274 that are reported.
1275 * tests/data/test-diff-dwarf/test0-report.txt: Adjust.
1276 * tests/data/test-diff-filter/test01-report.txt: Adjust.
1277 * tests/data/test-diff-filter/test2-report.txt: Adjust.
1278 * tests/data/test-diff-filter/test9-report.txt: Adjust.
1279
12802014-10-02 Dodji Seketeli <dodji@redhat.com>
1281
1282 Mention virtual-ness of member function in their pretty representation
1283 * include/abg-fwd.h (get_member_function_is_virtual): Declare new
1284 overload for pointers.
1285 * src/abg-ir.cc (get_member_function_is_virtual): Define it.
1286 (function_decl::get_pretty_representation): Print virtual-ness of
1287 the function_decl being pretty printed.
1288
12892014-10-02 Dodji Seketeli <dodji@redhat.com>
1290
1291 Do not crash when reporting diffs about virtual member fns that have no symbol
1292 * src/abg-comparison.cc (represent): If a virtual member function
1293 has no symbol do not crash.
1294
12952014-10-02 Dodji Seketeli <dodji@redhat.com>
1296
1297 Fixup member functions which virtual-ness has just been set
1298 * include/abg-ir.h (fixup_virtual_member_function): Declare new
1299 function.
1300 (class_decl): Declare fixup_virtual_member_function() as a member.
1301 * src/abg-ir.cc (set_member_function_is_virtual): Ensure that the
1302 member function that has seen its virtualness set is also put
1303 correctly put in the vector of virtual member functions of its
1304 class.
1305
13062014-10-02 Dodji Seketeli <dodji@redhat.com>
1307
1308 Assert that only decls with elf symbols are part of comparison
1309 * src/abg-corpus.cc (corpus::priv::build_public_decl_table): Assert
1310 that when read from DWARF, only decls with elf symbols are part of
1311 the public decls table.
1312
13132014-10-02 Dodji Seketeli <dodji@redhat.com>
1314
1315 Emit all virtual member functions in group
1316 * src/abg-writer.cc (write_class_decl): Emit virtual member
1317 functions contiguously.
1318
13192014-10-02 Dodji Seketeli <dodji@redhat.com>
1320
1321 Always emit vtable offset for virtual member function
1322 * src/abg-writer.cc (write_voffset): Emit the vtable offset of
1323 virtual function even when the offset is zero.
1324
13252014-10-02 Dodji Seketeli <dodji@redhat.com>
1326
1327 Do not forget priv_->in_pub_sym_tab_ when copying decl_base
1328 * src/abg-ir.cc (decl_base::decl_base(const decl_base& d)): Do
1329 not forget to copy priv_->in_pub_sym_tab_.
1330
13312014-10-01 Dodji Seketeli <dodji@redhat.com>
1332
1333 Fix reading several clones of the same member function from DWARF
1334 * include/abg-fwd.h (set_member_function_is_ctor)
1335 (set_member_function_is_dtor, set_member_function_is_const)
1336 (set_member_function_vtable_offset): Declare new functions.
1337 * include/abg-ir.h (class_decl::sort_virtual_mem_fns): Declare new
1338 member function.
1339 (mem_fn_context_rel::{vtable_offset, is_constructor is_destructor,
1340 is_const}): Add these setters.
1341 (set_member_function_is_ctor, set_member_function_is_dtor)
1342 (set_member_function_is_static, set_member_function_is_const)
1343 (set_member_function_vtable_offset)
1344 (set_member_function_is_virtual): Declare these new friend
1345 function to class class_decl::method_decl.
1346 * src/abg-dwarf-reader.cc (finish_member_function_reading): Split
1347 this out from build_class_type_and_add_to_ir. Use the new setters
1348 for member functions properties introduced above.
1349 (build_class_type_and_add_to_ir): Factorize the creation of member
1350 function by using build_ir_node_from_die. Once that function has
1351 created the member function in a rather generic way, use the new
1352 finish_member_function_reading to set the remaining specific
1353 properties for member functions.
1354 (build_function_decl): When called to read additional properties
1355 of a function_decl, allow this to read and update the elf symbol
1356 properties too. This is useful for building a clone of a function
1357 that already has an elf symbol.
1358 (build_ir_node_from_die): When building a function decl, consider
1359 the case of a DIE that has both DW_AT_specification and
1360 DW_AT_abstract_origin set. That is, DW_AT_abstract_origin is set,
1361 and the origin has DW_AT_specification set. This is basically a
1362 clone of a function that implements an interface (this happens for
1363 destructors, for instance). In this case, really do the cloning
1364 of the interface implementation. If the cloned function happens
1365 to be member function, use finish_member_function_reading to read
1366 the properties relevant to its method-ness.
1367 * src/abg-ir.cc (set_member_function_is_ctor)
1368 (set_member_function_is_dtor, set_member_function_is_const)
1369 (set_member_function_vtable_offset)
1370 (class_decl::sort_virtual_mem_fns): Define new functions.
1371 (sort_virtual_member_functions): Define new static function.
1372 (struct virtual_member_function_less_than): New functor.
1373 (class_decl::add_member_function): Keep virtual member functions
1374 vector sorted.
1375 * data/test-read-dwarf/test1.abi: Adjust. Now, both the
1376 cdtor specification and all the clones that implements the
1377 different are emitted.
1378 * data/test-read-dwarf/test2.so.abi: Likewise.
1379
13802014-10-01 Dodji Seketeli <dodji@redhat.com>
1381
1382 Do not crash when comparing functions that have no symbol
1383 * src/abg-comparison.cc
1384 (class_diff::ensure_lookup_tables_populated): Just skip functions
1385 that have no ELF symbol.
1386
13872014-09-30 Dodji Seketeli <dodji@redhat.com>
1388
1389 Rename member_function_is_virtual to get_member_function_is_virtual
1390 * include/abg-fwd.h (get_member_function_is_virtual): Renamed the
1391 declaration of member_function_is_virtual into this.
1392 * src/abg-ir.cc (get_member_function_is_virtual): Likewise for its
1393 definition.
1394 * include/abg-ir.h (class decl_base): Adjust the friend function
1395 member_function_is_virtual references.
1396 * src/abg-comp-filter.cc (has_virtual_mem_fn_change)
1397 (has_non_virtual_mem_fn_change): Adjust.
1398 * src/abg-comparison.cc (represent)
1399 (SKIP_MEM_FN_IF_VIRTUALITY_DISALLOWED, class_diff::report):
1400 Likewise.
1401 * src/abg-hash.cc (class_decl::hash::operator()): Likewise.
1402 (function_decl::clone, class_decl::add_member_function): Adjust.
1403
14042014-09-30 Dodji Seketeli <dodji@redhat.com>
1405
1406 Factorize a no-op deleter for shared pointer
1407 * include/abg-sptr-utils.h (struct noop_deleter): Move this here
1408 from ...
1409 * src/abg-comparison.cc (struct noop_deleter): ... here.
1410
14112014-09-30 Dodji Seketeli <dodji@redhat.com>
1412
1413 Link manuals from the main web page
1414 * doc/website/mainpage.txt: Add a link to the manuals.
1415
14162014-09-26 Dodji Seketeli <dodji@redhat.com>
1417
1418 Initial documentation for libabigail
1419 * doc/manuals/Makefile: New file, generated by sphinx-quickstart.
1420 * doc/manuals/abidiff.rst: New manual for abidiff.
1421 * doc/manuals/abidw.rst: New manual for abidw.
1422 * doc/manuals/abilint.rst: New manual for abilint.
1423 * doc/manuals/conf.py: New configuration file generated by sphinx-quickstart.
1424 * doc/manuals/index.rst: The root of the this documentation.
1425 * doc/manuals/libabigail-overview.rst: The overview of libabigail.
1426 * doc/manuals/tools.rst: The root of the tools manuals.
1427
14282014-09-26 Dodji Seketeli <dodji@redhat.com>
1429
1430 Do not install the abisym program
1431 * tools/Makefile.am: Do not install abisym. It's really there
1432 just for testing purposes and is of almost no use for generic
1433 users.
1434
14352014-09-26 Dodji Seketeli <dodji@redhat.com>
1436
1437 Rename bi* tools to abi* tools
1438 * tests/data/test-bidiff: Rename this directory to
1439 tests/data/test-abidiff.
1440 * tests/test-bidiff.cc: Renamed this to tests/test-abidiff.cc.
1441 * tools/biar.cc: Renamed to tools/abiar.cc
1442 * tools/bidiff.cc: Renamed to tools/abidiff.cc
1443 * tools/bidw.cc: Renamed to tools/abidw.cc
1444 * tools/bilint.cc: Renamed to tools/abilint.cc
1445 * tools/bisym.cc: Renamed to tools/abisym.cc
1446 * tests/test-alt-dwarf-file.cc: Renamed references to bidw* to abidw*.
1447 * tests/test-diff-filter.cc: Renamed references to bidiff to abidiff.
1448 * tests/test-lookup-syms.cc: Renamed references to bisym to abisym.
1449 * tools/Makefile.am: Adjust.
1450 * tests/Makefile.am: Likewise.
1451
14522014-09-19 Dodji Seketeli <dodji@redhat.com>
1453
1454 Light cleanup in abg-corpus.cc
1455 * src/abg-corpus.cc
1456 (symtab_build_visitor_type::regex_fns_suppress): use
1457 sptr_utils::build_sptr, rather than building the shared_ptr of
1458 regex_t by hand.
1459
14602014-09-18 Dodji Seketeli <dodji@redhat.com>
1461
1462 Pimplify abigail::comparison::diff type
1463 * include/abg-comparison.h (diff::{priv, sptr}): New types.
1464 (diff::priv_): New member.
1465 (diff::*): Remove all the other previous data members and
1466 transform the inline member function definition into declarations
1467 only.
1468 * src/abg-comparison.cc (class diff::priv): New private data type.
1469 (diff::*): Define the previous inline member functions as
1470 out-of-line here.
1471
14722014-09-18 Dodji Seketeli <dodji@redhat.com>
1473
1474 Rename shared_ptr<regex_t> into regex_t_sptr
1475 * include/abg-sptr-utils.h (build_sptr()): Rename the return type
1476 from shared_ptr<regex_t> to regex_t_sptr.
1477
14782014-09-19 Dodji Seketeli <dodji@redhat.com>
1479
1480 Fix a comment in abg-comparison.h
1481 * include/abg-comparison.h (class base_diff): Fix comment.
1482
14832014-09-05 Dodji Seketeli <dodji@redhat.com>
1484
1485 Light style cleanup in tools/bidiff.cc
1486 * tools/bidiff.cc (display_usage): Remove useless space before '&'.
1487
14882014-09-05 Dodji Seketeli <dodji@redhat.com>
1489
1490 src/Makefile.am cleanup
1491 * src/Makefile.am: Remove the unused 'headers' variable.
1492
14932014-09-16 Dodji Seketeli <dodji@redhat.com>
1494
1495 Emit reports about not-yet categorized diff nodes
1496 * include/abg-comparison.h (NO_CHANGE_CATEGORY): Better comment
1497 this enumerator.
1498 * src/abg-comparison.cc (diff::is_filtered_out): Not-yet
1499 categorized changes are not filtered out anymore.
1500 (distinct_diff::report): Avoid extraneous new line here.
1501
15022014-09-16 Dodji Seketeli <dodji@redhat.com>
1503
1504 Better support for inline related diffs
1505 * include/abg-comparison.h
1506 (diff_category::HARMLESS_SYMBOL_ALIAS_CHANGE_CATEORY): New
1507 enumerator.
1508 (diff_category::EVERYTHING_CATEGORY): Adjust.
1509 * include/abg-ir.h (elf_symbol::get_aliases_id_string)
1510 (elf_symbol::does_alias, elf_symbols_alias)
1511 (compute_aliases_for_elf_symbol): Declare new functions ...
1512 * src/abg-ir.cc (elf_symbol::get_aliases_id_string)
1513 (elf_symbol::does_alias, elf_symbols_alias)
1514 (compute_aliases_for_elf_symbol): ... and define them.
1515 (function_decl::operator==): Take in account elf symbol aliases.
1516 * src/abg-comp-filter.cc (function_name_changed_but_not_symbol):
1517 Define new static functions.
1518 (harmless_filter::visit): Categorize function name changes that
1519 n doesn't impact underlying elf symbols (or the fact that two
1520 symbols were aliases and are not anymore) as harmless.
1521 * src/abg-comparison.cc (function_decl_diff::report): Properly
1522 report function name changes, or symbol aliases changes for that
1523 matter. Also report inline-ness declaration changes.
1524 * src/abg-dwarf-reader.cc (die_is_declared_inline): New static
1525 function.
1526 (build_function_decl): Use the above.
1527 * tools/bidiff.cc (set_diff_context_from_opts): Add
1528 abigail::comparison::HARMLESS_SYMBOL_ALIAS_CHANGE_CATEORY into the
1529 harmless change camp.
1530 * tests/data/test-diff-dwarf/test14-inline-report.txt: New test
1531 input.
1532 * tests/data/test-diff-dwarf/test14-inline-v0.o: Likewise.
1533 * tests/data/test-diff-dwarf/test14-inline-v1.o: Likewise.
1534 * tests/data/test-diff-dwarf/test14-inline-v0.cc: Source code for
1535 test input.
1536 * tests/data/test-diff-dwarf/test14-inline-v1.cc: Source code for
1537 test input.
1538 * tests/test-diff-dwarf.cc: Run this test harness over the new
1539 input above.
1540 * tests/data/test-diff-filter/test20-inline-report-0.txt: Likewise.
1541 * tests/data/test-diff-filter/test20-inline-report-1.txt:
1542 Likewise.
1543 * tests/data/test-diff-filter/test20-inline-v0.o: New test input.
1544 * tests/data/test-diff-filter/test20-inline-v1.o: New test input.
1545 * tests/data/test-diff-filter/test20-inline-v0.cc: Source code for
1546 test input.
1547 * tests/data/test-diff-filter/test20-inline-v1.cc: Likewise.
1548 * tests/test-diff-filter.cc: Run this test harness over the new
1549 input above.
1550
15512014-09-16 Dodji Seketeli <dodji@redhat.com>
1552
1553 Better support for enum diffs
1554 * include/abg-comparison.h (changed_enumerator_type): New typedef.
1555 (diff_category::{HARMLESS_ENUM_CHANGE_CATEGORY}): New enumerator.
1556 * src/abg-comp-filter.cc (has_type_size_change)
1557 (has_enumerator_insertion, has_enumerator_removal_or_change)
1558 (has_harmful_enum_change): New functions.
1559 (harmless_filter::visit): Categorize enumerator insertions that
1560 don't change the size of the type into HARMLESS_ENUM_CHANGE_CATEGORY.
1561 (harmful_filter::visit): Categorize enumerator removal or any enum
1562 change that changes the size of the type into
1563 SIZE_OR_OFFSET_CHANGE_CATEGORY.
1564 * src/abg-comparison.cc (enumerator_value_comp)
1565 (changed_enumerator_comp): New types.
1566 (sort_enumerators, sort_changed_enumerators): New static
1567 functions.
1568 (enum_diff::report): Sort enum related reports by the value of the
1569 enumerators.
1570 * src/abg-dwarf-reader.cc (build_enum_type): Name anonymous enums
1571 as __anonymous_enum__.
1572 * tools/bidiff.cc (set_diff_context_from_opts): Add
1573 abigail::comparison::HARMLESS_ENUM_CHANGE_CATEGORY into the harmless
1574 stuff camp.
1575 * tests/data/test-diff-dwarf/test15-enum-report.txt: New test
1576 input.
1577 * tests/data/test-diff-dwarf/test15-enum-v1.o: Likewise.
1578 * tests/data/test-diff-dwarf/test15-enum-v0.o: Likewise.
1579 * tests/data/test-diff-dwarf/test15-enum-v0.cc: Source code for
1580 test input.
1581 * tests/data/test-diff-dwarf/test15-enum-v1.cc: Likewise.
1582 * tests/data/test-diff-filter/test19-enum-report-0.txt: New test input.
1583 * tests/data/test-diff-filter/test19-enum-report-1.txt: Likewise.
1584 * tests/data/test-diff-filter/test19-enum-v0.o: Likewise.
1585 * tests/data/test-diff-filter/test19-enum-v1.o: Likewise.
1586 * tests/data/test-diff-filter/test19-enum-v0.cc: Source code for
1587 test input.
1588 * tests/data/test-diff-filter/test19-enum-v1.cc: Likewise.
1589 * tests/test-diff-dwarf.cc: Run this test harness on the new test
1590 inputs above.
1591 * tests/test-diff-filter.cc: Likewise.
1592 * tests/Makefile.am: Add the new files above to the source distribution.
1593
15942014-09-16 Dodji Seketeli <dodji@redhat.com>
1595
1596 Add constness to elf_symbol::operator==
1597 * include/abg-ir.h (elf_symbol::operator==): Add a const to the
1598 declaration ...
1599 * src/abg-ir.cc (elf_symbol::operator==): ... and to the definition.
1600
16012014-09-15 Dodji Seketeli <dodji@redhat.com>
1602
1603 Misc style cleanups
1604 * src/abg-comparison.cc (ChangedDataMemberComp): Rename this to
1605 changed_data_member_comp
1606 (sort_changed_data_members): Adjust.
1607 (DataMemberComp): Rename this to data_member_comp.
1608 (sort_data_members): Adjust.
1609
16102014-09-15 Dodji Seketeli <dodji@redhat.com>
1611
1612 Constify some function parameters in abg-comp-filter.cc
1613 * src/abg-comp-filter.cc (type_size_changed): Now take const
1614 parameters.
1615
16162014-09-09 Jan Engelhardt <jengelh@inai.de>
1617
1618 Add .gitignore files.
1619 * .gitignore: Add new file.
1620 * m4/.gitignore: Likewise.
1621 * tools/.gitignore: Likewise.
1622
16232014-09-09 Jan Engelhardt <jengelh@inai.de>
1624
1625 Place -L/-l flags into *_LIBADD/*_LDADD
1626 * src/Makefile.am: -L and -l ought to be in LIBADD/LDADD because
1627 that is the only place guaranteed to be in the right spot. So add
1628 Them to libabigail_la_LIBADD.
1629 * tools/Makefile.am: Likewise.
1630
16312014-09-09 Jan Engelhardt <jengelh@inai.de>
1632
1633 Add libelf to libabigail.la's linker line
1634 * configure.ac: Check for the existence of libelf at configure
1635 time by looking at the presence of the elf_end symbol. Add the
1636 libelf to the link command line.
1637
16382014-09-09 Jan Engelhardt <jengelh@inai.de>
1639
1640 Drop hardcoded substitutions
1641 * doc/Makefile.am: Do not use @docdir@. It's indeed replaced at
1642 configure time. But there is no need for this limitation with
1643 automake, as $(docdir) is available and replaceable anytime.
1644 * src/Makefile.am: Likewise for @DEPS_LIBS@ and @DEPS_CFLAGS@.
1645
16462014-09-09 Jan Engelhardt <jengelh@inai.de>
1647
1648 Replace indirect variable assignments
1649 * configure.ac(DEVEL_CFLAGS, DEVEL_CXXFLAGS): Remove these
1650 useless variables.
1651 (CFLAGS, CXXFLAGS): Set these variables directly.
1652 * include/Makefile.am (pkginclude_HEADERS): Use this predefined
1653 variable.
1654 (publicheaders_DATA, publicheadersdir): Remove these.
1655
16562014-09-09 Jan Engelhardt <jengelh@inai.de>
1657
1658 Remove empty and autogenerated files from git repository
1659 * ChangeLog: Remove this empty file for now. It'll be added back
1660 right before the first release by automatic generation from the
1661 commit logs.
1662 * INSTALL: Remove this empty file for now.
1663 * NEWS: Remove this empty file for now. It'll be added back right
1664 before the first release.
1665 * configure.ac (AM_INIT_AUTOMAKE): As the mandatory but empty
1666 files above are being removed for now, let's put in the 'foreign'
1667 mode of automake for the moment. We'll likely remove it at
1668 release time.
1669
16702014-09-09 Jan Engelhardt <jengelh@inai.de>
1671
1672 Set automake options globally
1673 * configure.ac(AM_INIT_AUTOMAKE): Set the subdir-object option
1674 here ..
1675 * src/Makefile.am: ... not here.
1676 * tests/Makefile.am: Likewise.
1677 * tools/Makefile.am: Likewise.
1678
16792014-09-09 Jan Engelhardt <jengelh@inai.de>
1680
1681 Stash some autogenerated tools in build-aux/
1682 * configure.ac: Reduce the pollution in the top-level directory a
1683 bit.
1684
16852014-09-10 Dodji Seketeli <dodji@redhat.com>
1686
1687 Fix memory leaks due to cycles in types ownership
1688 * include/abg-fwd.h (std::tr1::weak_ptr): Inject this type in the
1689 abigail namespace.
1690 * include/abg-ir.h: Write a memory management guideline for the IR
1691 artifacts.
1692 (Type_base_wptr, function_type_wptr)
1693 (class_decl_wptr): New typedefs.
1694 (translation_unit::get_canonical_function_type): Declare new
1695 member function.
1696 (qualified_type_def::underlying_type_)
1697 (reference_type_def::pointed_to_type_)
1698 (typedef_decl::underlying_type_, function_decl::parameter::type_)
1699 (function_type::return_type_, method_type::class_type_)
1700 (non_type_tparameter::type_, type_composition::type_): Make this a
1701 weak pointer.
1702 (qualified_type_def::get_pointed_to_type)
1703 (reference_type_def::get_pointed_to_type)
1704 (array_type::get_element_type, typedef_decl::get_underlying_type)
1705 (var_decl::get_type, function_decl::parameter::get_type)
1706 (function_type::get_return_type, method_type::get_class_type)
1707 (non_type_tparameter::get_type)
1708 (type_composition::get_composed_type): Adjust to make this return
1709 a shared pointer initialized with the content of the weak pointer.
1710 (function_decl::function_decl, method_decl::method_decl): Remove
1711 the overload that doesn't take a type. This is because now,
1712 function types need to be registered to their containing
1713 translation unit.
1714 (struct function_type::hash): Declare here.
1715 * src/abg-hash.cc (struct function_type::hash): Declare this in
1716 abg-ir.h and just define the methods here.
1717 * src/abg-ir.cc (fn_type_ptr_map): New typedef.
1718 (translation_unit::priv::canonical_types_): Remove this unused
1719 member.
1720 (translation_unit::priv::canonical_function_types_): New member.
1721 (translation_unit::get_canonical_function_type): Define this
1722 function.
1723 (array_type_def::priv::element_type_, var_decl::priv::type_)
1724 (function_decl::priv::type_): Make this a weak pointer.
1725 (qualified_type_def::get_underlying_type)
1726 (pointer_type_def::get_pointed_to_type)
1727 (reference_type_def::get_pointed_to_type)
1728 (array_type_def::get_element_type)
1729 (typedef_decl::get_underlying_type, var_decl::get_type)
1730 (function_decl::get_type): Adjust to make this return a shared
1731 pointer initialized with the content of the weak pointer.
1732 (qualified_type_def::build_name)
1733 (pointer_type_def::get_qualified_name)
1734 (reference_type_def::get_qualified_name): Adjust.
1735 (method_type::set_class_type): Cleanup the logic.
1736 (function_decl::priv::priv): Remove the overload that takes a bare
1737 pointer to a type. This should not be used now that we need the
1738 function type to registered with the translation unit.
1739 (function_decl::function_decl): Remove the overload that doesn't
1740 take a type. This is because now, function types need to be
1741 registered to their containing translation unit.
1742 * src/abg-dwarf-reader.cc (build_function_decl): Register the
1743 function type within its translation type and use its canonical
1744 version. This complies with the new memory management rules.
1745 * src/abg-reader.cc (build_function_decl): Likewise.
1746
17472014-09-10 Dodji Seketeli <dodji@redhat.com>
1748
1749 Compare class names when comparing methods
1750 * src/abg-ir.cc:
1751
17522014-09-10 Dodji Seketeli <dodji@redhat.com>
1753
1754 Slight white space fix
1755 * src/abg-hash.cc (method_type::hash::operator()(const
1756 method_type&)): White space fix.
1757
17582014-09-10 Dodji Seketeli <dodji@redhat.com>
1759
1760 Update copyright notice
1761 * include/abg-ir.h: Update year of copyright notice.
1762
17632014-07-05 Ondrej Oprala <ooprala@redhat.com>
1764
1765 Unite help output for tools
1766 * tools/biar.cc (std::ostream): Add a using directive.
1767 (display_usage): Make it take a string reference and an ostream
1768 as parameters. Use the ostream argument as an output stream
1769 instead of a hard-coded cout.
1770 Prettify output.
1771 (main): Call display_usage with new parameters.
1772 * tools/bidiff.cc (display_usage): Declare it static.
1773 Prettify output.
1774 * tools/bidw.cc (display_usage): Prettify output.
1775 * tools/bilint.cc (display_usage): Declare it static.
1776 Prettify output.
1777 * tools/bisym.cc (std::cerr): Add a using directive.
1778 (prog_name): Rename progname into this.
1779 (display_usage): Rename show_help into this.
1780 Add an ostream as a parameter. Use the ostream argument
1781 as output stream insted of a hard-coded cout.
1782
17832014-09-03 Dodji Seketeli <dodji@redhat.com>
1784
1785 Adjust copyright year
1786 * tests/test-diff-dwarf.cc: Adjust year in copyright notice.
1787
17882014-09-03 Dodji Seketeli <dodji@redhat.com>
1789
1790 Sort reported changed data members by increasing offset
1791 * include/abg-comparison.h (changed_type_or_decl_vector): New
1792 typedef.
1793 * include/abg-fwd.h (is_data_member): Change the overload that
1794 takes a decl_base_sptr to make it return the real var_decl_sptr
1795 rather than just a bool.
1796 * src/abg-comparison.cc (ChangedDataMemberComp, DataMemberComp):
1797 New comparison functors.
1798 (sort_changed_data_members, sort_data_members): Sorting functions
1799 for changed data members and data members.
1800 (class_diff::report): Sort reports for deleted, inserted and
1801 change data members by the increasing value of the offsets of said
1802 data members.
1803 * src/abg-ir.cc (is_data_member): Change the overload that takes a
1804 decl_base_sptr to make it return the real var_decl_sptr rather
1805 than just a bool.
1806 * tests/data/test-bidiff/test-struct1-report.txt: Adjust.
1807 * tests/data/test-diff-dwarf/test13-report.txt: New test input.
1808 * tests/data/test-diff-dwarf/test13-v0.cc: Source code for new
1809 test input.
1810 * tests/data/test-diff-dwarf/test13-v0.o: New test input.
1811 * tests/data/test-diff-dwarf/test13-v1.cc: Source code for new
1812 test input.
1813 * tests/data/test-diff-dwarf/test13-v1.o: New test input.
1814 * tests/Makefile.am: Add the new test inputs above to the source
1815 distribution.
1816 * tests/test-diff-dwarf.cc: Run this test harness on the new test
1817 input.
1818
18192014-09-03 Dodji Seketeli <dodji@redhat.com>
1820
1821 Do not filter out diff nodes that are only in NOT_REDUNDANT_CATEGORY
1822 * src/abg-comparison.cc (diff::is_filtered_out): If a diff not is
1823 only in the NOT_REDUNDANT_CATEGORY category consider it as not
1824 being filtered.
1825 * tests/data/test-diff-filter/test18-report.txt: New test input.
1826 * tests/data/test-diff-filter/test18-v0.cc: Source code for new
1827 test input.
1828 * tests/data/test-diff-filter/test18-v0.o: New test input.
1829 * tests/data/test-diff-filter/test18-v1.cc: Source code for new
1830 test input.
1831 * tests/data/test-diff-filter/test18-v1.o: New test input.
1832 * tests/Makefile.am: Add the new test inputs to the source distribution.
1833 * tests/test-diff-filter.cc: Run this test harness on the new test
1834 input above.
1835
18362014-09-03 Dodji Seketeli <dodji@redhat.com>
1837
1838 White space cleanup
1839 * src/abg-ir.cc (get_data_member_offset): Remove useless
1840 horizontal white space.
1841
18422014-09-03 Dodji Seketeli <dodji@redhat.com>
1843
1844 Add some comments in the comparison engine
1845 * src/abg-comparison.cc: Add a comment for the file.
1846 (struct class_diff::priv::{subtype_changed_dm_,changed_dm_}): Add
1847 comment for these data members.
1848
18492014-09-02 Dodji Seketeli <dodji@redhat.com>
1850
1851 Remove useless new line from comparison engine's report
1852 * src/abg-comparison.cc (class_diff::report): Do not emit new
1853 lines after reporting about inserted data members.
1854 * tests/data/test-bidiff/test-qual-type0-report.txt: Adjust.
1855 * tests/data/test-bidiff/test-struct0-report.txt: Adjust.
1856 * tests/data/test-bidiff/test-struct1-report.txt: Adjust.
1857 * tests/data/test-diff-dwarf/test0-report.txt: Adjust.
1858 * tests/data/test-diff-dwarf/test1-report.txt: Adjust.
1859 * tests/data/test-diff-dwarf/test3-report.txt: Adjust.
1860 * tests/data/test-diff-dwarf/test7-report.txt: Adjust.
1861 * tests/data/test-diff-filter/test0-report.txt: Adjust.
1862 * tests/data/test-diff-filter/test01-report.txt: Adjust.
1863 * tests/data/test-diff-filter/test1-report.txt: Adjust.
1864 * tests/data/test-diff-filter/test11-report.txt: Adjust.
1865 * tests/data/test-diff-filter/test14-0-report.txt: Adjust.
1866 * tests/data/test-diff-filter/test14-1-report.txt: Adjust.
1867 * tests/data/test-diff-filter/test15-0-report.txt: Adjust.
1868 * tests/data/test-diff-filter/test15-1-report.txt: Adjust.
1869 * tests/data/test-diff-filter/test16-report.txt: Adjust.
1870 * tests/data/test-diff-filter/test17-0-report.txt: Adjust.
1871 * tests/data/test-diff-filter/test17-1-report.txt: Adjust.
1872 * tests/data/test-diff-filter/test2-report.txt: Adjust.
1873 * tests/data/test-diff-filter/test3-report.txt: Adjust.
1874 * tests/data/test-diff-filter/test9-report.txt: Adjust.
1875
18762014-09-01 Dodji Seketeli <dodji@redhat.com>
1877
1878 Adjust copyright years
1879 * src/abg-corpus.cc: Adjust copyright years.
1880 * src/abg-libzip-utils.cc: Likewise.
1881 * src/abg-writer.cc: Likewise.
1882
18832014-09-01 Dodji Seketeli <dodji@redhat.com>
1884
1885 Factorize basic redundancy detection in diff report
1886 * src/abg-comparison.cc
1887 (RETURN_IF_BEING_REPORTED_OR_WAS_REPORTED_EARLIER)
1888 (RETURN_IF_BEING_REPORTED_OR_WAS_REPORTED_EARLIER{2,3}): New
1889 macros.
1890 ({pointer_diff, array_diff, reference_diff, qualified_type_diff,
1891 class_diff, typedef_diff}::report): Use the new macros above.
1892 * tests/data/test-bidiff/test-qual-type0-report.txt: Adjust
1893 because type pretty representation are now always quoted.
1894 * tests/data/test-bidiff/test-struct1-report.txt: Adjust likewise.
1895
18962014-08-31 Dodji Seketeli <dodji@redhat.com>
1897
1898 Display package configuration at the end of configure
1899 * configure.ac: Display the configure of the package at the end of
1900 the configure script.
1901
19022014-08-31 Dodji Seketeli <dodji@redhat.com>
1903
1904 Make zip archive support optional
1905 * configure.ac: Support a new --enable-zip-archive option. By
1906 default its value is set to the 'auto', meaning that if libzip is
1907 installed, that turns the option on -- just like if
1908 --enable-zip-archive was called with the value 'yes'; if libzip is
1909 not installed, that turns the option off -- just like if
1910 --enable-zip-archive was called with the value 'no'. If libzip is
1911 detected, the pre-processor macro HAVE_LIBZIP is set to 1. If
1912 --enable-zip-archive is turned on, the pre-processor macro
1913 WITH_ZIP_ARCHIVE is set to 1.
1914 * config.h.in (HAVE_LIBZIP, WITH_ZIP): New define.
1915 * src/abg-corpus.cc: Include config.h. Guard the inclusion of
1916 abg-libzip-utils.h with the WITH_ZIP_ARCHIVE macro. Likewise for
1917 the use of declarations coming from abg-libzip-utils.h.
1918 * src/abg-libzip-utils.cc: Include config.h. Guard the file's
1919 content with the WITH_ZIP_ARCHIVE macro.
1920 * src/abg-reader.cc: Include config.h. Guard the inclusion of
1921 abg-libzip-utils.h with the WITH_ZIP_ARCHIVE. Likewise for the
1922 use of declarations coming from abg-libzip-utils.h.
1923 * src/abg-writer.cc: Likewise.
1924 * tests/Makefile.am: Build runtestwritereadarchive and runtestdot
1925 only if zip archives are supported.
1926 * tools/Makefile.am: The biar program is built only if
1927 zip archives are supported.
1928 * tools/bidiff.cc: Handle zip archives only if the
1929 WITH_ZIP_ARCHIVE macros is defined.
1930 * tools/bilint.cc: Likewise.
1931
19322014-08-28 Dodji Seketeli <dodji@redhat.com>
1933
1934 Tell bidiff --help, wrong options and missing argument apart
1935 * tools/bidiff.cc (options::{display_usage,missing_operand}): New
1936 data members.
1937 (options::options): Initialize them.
1938 (parse_command_line): Flag missing operands. Return false only
1939 when an option could not be parsed. Flag when the user wants us
1940 to display help.
1941 (main): Tell --help, wrong options and missing argument apart and
1942 give an appropriate message on stderr. The help string goes to
1943 stdout though. Just like what GNU diff does.
1944
19452014-08-28 Dodji Seketeli <dodji@redhat.com>
1946
1947 In bidiff, don't emit a report when the binaries have the same ABI
1948 * tools/bidiff.cc (main): For differences of zero length, do not
1949 emit any report.
1950
19512014-08-29 Dodji Seketeli <dodji@redhat.com>
1952
1953 Take variables in account in corpus changes detection
1954 * src/abg-comparison.cc (corpus_diff::length): Take changes about
1955 variables into account.
1956
19572014-08-28 Dodji Seketeli <dodji@redhat.com>
1958
1959 During redundancy marking start with the current node as non redundant
1960 * src/abg-comparison.cc (ENSURE_DIFF_NODE_TRAVERSED_ONCE): If the
1961 diff node is being traversed for the first time, mark it as being
1962 in the NOT_REDUNDANT_CATEGORY. I don't know why I was doing this
1963 only for classes and basic types. Update comments.
1964 * tests/data/test-diff-filter/test16-report.txt: New test input.
1965 * tests/data/test-diff-filter/test16-v0.cc: Source code of new
1966 test input.
1967 * tests/data/test-diff-filter/test16-v0.o: New test input.
1968 * tests/data/test-diff-filter/test16-v1.cc: Source code of new
1969 test input.
1970 * tests/data/test-diff-filter/test16-v1.o: New test input.
1971 * tests/data/test-diff-filter/test17-0-report.txt: Likewise.
1972 * tests/data/test-diff-filter/test17-1-report.txt: Likewise.
1973 * tests/data/test-diff-filter/test17-v0.cc: Source code of new
1974 test input.
1975 * tests/data/test-diff-filter/test17-v0.o: Likewise.
1976 * tests/data/test-diff-filter/test17-v1.cc: Source code of new
1977 test input.
1978 * tests/data/test-diff-filter/test17-v1.o: Likewise.
1979 * tests/Makefile.am: Add the new files to the source distribution.
1980 * tests/test-diff-filter.cc (in_out_spec): Run this test harness
1981 over the new test inputs.
1982
19832014-08-28 Dodji Seketeli <dodji@redhat.com>
1984
1985 Give anonymous struct the name "__anonymous_struct__"
1986 * src/abg-dwarf-reader.cc (build_class_type_and_add_to_ir): Set
1987 the name of anonymous structs to '__anonymous_struct_'.
1988
19892014-08-28 Dodji Seketeli <dodji@redhat.com>
1990
1991 Style fix in the comparison engine
1992 * src/abg-comparison.cc (represent): Remove useless white space.
1993
19942014-08-27 Dodji Seketeli <dodji@redhat.com>
1995
1996 In bidiff, change --no-linkage-names to --no-linkage-name
1997 * tools/bidiff.cc (display_usage): Change--no-linkage-names -o
1998 --no-linkage-name in the help string.
1999 (parse_command_line): Adjust the command line parsing accordingly.
2000 * tests/test-diff-filter.cc (in_out_specs): Adjust.
2001
20022014-08-27 Dodji Seketeli <dodji@redhat.com>
2003
2004 In diff reports, show symbol version info in linkage names
2005 * src/abg-comparison.cc (represent, corpus_diff::report): show
2006 symbol version info in linkage name info.
2007
20082014-08-27 Dodji Seketeli <dodji@redhat.com>
2009
2010 In diff reports, fns & members add/remove at the top, changes later.
2011 * src/abg-comparison.cc (class_diff::report): Put virtual member
2012 function adding/removal/change first, then data members
2013 add/removal, then the rest (including data members changes).
2014 (corpus_diff::report): Put function adding/removal first, then
2015 function changes. Likewise for variables.
2016 * tests/data/test-bidiff/test-struct0-report.txt: Adjust.
2017 * tests/data/test-bidiff/test-struct1-report.txt: Adjust.
2018 * tests/data/test-diff-dwarf/test0-report.txt: Adjust.
2019 * tests/data/test-diff-dwarf/test1-report.txt: Adjust.
2020 * tests/data/test-diff-dwarf/test12-report.txt: Adjust.
2021 * tests/data/test-diff-dwarf/test8-report.txt: Adjust.
2022 * tests/data/test-diff-dwarf/test9-report.txt: Adjust.
2023 * tests/data/test-diff-filter/test0-report.txt: Adjust.
2024 * tests/data/test-diff-filter/test01-report.txt: Adjust.
2025 * tests/data/test-diff-filter/test1-report.txt: Adjust.
2026 * tests/data/test-diff-filter/test13-report.txt: Adjust.
2027 * tests/data/test-diff-filter/test2-report.txt: Adjust.
2028 * tests/data/test-diff-filter/test3-report.txt: Adjust.
2029 * tests/data/test-diff-filter/test9-report.txt: Adjust.
2030
20312014-08-27 Dodji Seketeli <dodji@redhat.com>
2032
2033 Consider symbol versions' public-ness during comparison
2034 * src/abg-ir.cc (elf_symbol::operator==): Rather than comparing
2035 bindings, compare public-ness here. That is, if two symbol
2036 versions' differ because one is GLOBAL and the other one is WEAK,
2037 they should still be considered equal, from an ABI standpoint.
2038
20392014-08-27 Dodji Seketeli <dodji@redhat.com>
2040
2041 Lookup proper names of symbol during determination of deleted/added decls
2042 * src/abg-comparison.cc
2043 ({class,corpus}_diff::ensure_lookup_tables_populated): Now that in the
2044 intermediate maps we store symbol *ids* rather than symbol names,
2045 make sure to really refer to symbol names for symbol lookups,
2046 rather than (wrongly) referring to symbol ids.
2047
20482014-08-26 Dodji Seketeli <dodji@redhat.com>
2049
2050 Cleanup bidiff help string some more
2051 * tools/bidiff.cc (display_usage): Add help strings for --harmless
2052 and --no-harmful.
2053 (main): Emit the help string to stdout, not stderr.
2054
20552014-08-26 Dodji Seketeli <dodji@redhat.com>
2056
2057 bidiff --no-harmless is no more
2058 * tools/bidiff.cc (display_usage): Remove the help string for the
2059 --no-harmless option that doesn't exist anymore, as it's on by
2060 default.
2061
20622014-08-26 Dodji Seketeli <dodji@redhat.com>
2063
2064 During comparison use symbol name + version as decl ID
2065 * include/abg-ir.h ({var,function}_decl::get_id): New member
2066 function declarations.
2067 * src/abg-ir.cc ({var,function}_decl::get_id): New member function
2068 definitions.
2069 * src/abg-comparison.cc
2070 (corpus_diff::priv::ensure_lookup_tables_populated): Use the
2071 ::get_id() function to get an identifier for the function or
2072 variable.
2073 * src/abg-corpus.cc (symtab_build_visitor_type::build_id): Use the
2074 get_id of the function/variable.
2075
20762014-08-26 Dodji Seketeli <dodji@redhat.com>
2077
2078 Fix access to alternate die -> decl map
2079 * src/abg-dwarf-reader.cc (read_context::alternate_die_decl_map):
2080 Return the real alternate die decl map, rather than what we was
2081 doing previously b/c of a stupid copy/paste. Oh well.
2082
20832014-08-25 Dodji Seketeli <dodji@redhat.com>
2084
2085 Take symbol versions in account when computing added/removed decls
2086 * include/abg-corpus.h
2087 (corpus::lookup_{function,variable}_symbol): Add an overload
2088 declaration that takes the version of the symbol to lookup.
2089 * src/abg-comparison.cc
2090 (corpus_diff::priv::ensure_lookup_tables_populated): So when looking
2091 up the corpora for symbols, take their versions in account.
2092 * src/abg-corpus.cc (corpus::lookup_{function,variable}_symbol):
2093 Add an overload definition that takes the version of the symbol to
2094 lookup.
2095 (symtab_build_visitor_type::build_id): New
2096 member functions.
2097 (corpus::priv::build_public_decl_table): Use the new member
2098 functions above.
2099 * src/abg-ir.cc (elf_symbol::version::operator==): Do not take the
2100 is_default flag in account when comparing two symbol versions.
2101 * libtest12-v{0,1}.so: New test input files.
2102 * libtest12-v{0,1}.c: Source code for the test input files.
2103 * test12-version-script: Version script to build the files above.
2104 * test12-report.txt: Test input file.
2105 * tests/Makefile.am: Add the new test input files above to the
2106 source distribution.
2107 * tests/test-diff-dwarf.cc (in_out_specs[]): Add an entry to this
2108 table for the new test input files.
2109
21102014-08-25 Dodji Seketeli <dodji@redhat.com>
2111
2112 Misc style cleanups
2113 * include/abg-corpus.h (corpus::lookup_function_symbol)
2114 (corpus::lookup_variable_symbol): Add the name of the function
2115 parameter in the declaration.
2116 * include/abg-ir.h (elf_symbol::version::version): Properly indent
2117 this constructor declaration.
2118 * src/abg-corpus.cc
2119 (symtab_build_visitor_type::symtab_build_visitor_type): Properly
2120 indent constructor parameters.
2121 * src/abg-ir.cc (function_decl::operator==): Fix typo in
2122 comments.
2123
21242014-08-25 Dodji Seketeli <dodji@redhat.com>
2125
2126 bidiff --harmful is not supported anymore
2127 * tools/bidiff.cc (display_usage): remove the '--harmful' line
2128 from the help string as this option is now activated by default.
2129 It's --harmless that exists now.
2130
21312014-08-22 Dodji Seketeli <dodji@redhat.com>
2132
2133 A builtin type name change is not harmless - fix that
2134 * include/abg-comp-filter.h (has_harmless_name_change): New
2135 function declaration.
2136 * include/abg-comparison.h
2137 (diff_category::DECL_NAME_CHANGE_CATEGORY): Renamed this into
2138 HARMLESS_DECL_NAME_CHANGE_CATEGORY.
2139 (diff_category::EVERYTHING_CATEGORY): Update.
2140 * include/abg-fwd.h (is_enum): New function declaration.
2141 (is_var_decl): Return the shared_ptr<var_decl> rather than a bool.
2142 (is_data_member): New overload that takes a shared_ptr<decl_base>.
2143 * src/abg-comp-filter.cc (decl_name_changed): Consider the
2144 qualified name here.
2145 (has_harmless_name_change): Define new function declaration.
2146 (harmless_filter::visit): Use the new has_harmless_name_change
2147 function.
2148 * src/abg-comparison.cc (represent)
2149 (report_name_size_and_alignment_changes, enum_diff::report)
2150 (typedef_diff::report, is_data_member): Use the new
2151 filtering::has_harmless_name_change function to simplify logic of
2152 emitting the name change related diff
2153 * tools/bidiff.cc (set_diff_context_from_opts): Adjust
2154 DECL_NAME_CHANGE_CATEGORY -> HARMLESS_DECL_NAME_CHANGE_CATEGORY.
2155 * src/abg-ir.cc (is_data_member, is_enum): New function definitions.
2156 (is_var_decl): Return the var_decl_sptr rather than just a bool.
2157 * tests/data/test-diff-filter/test13-report.txt: Adjust.
2158 * tests/data/test-diff-filter/test6-report.txt: Adjust.
2159
21602014-08-18 Ondrej Oprala <ooprala@redhat.com>
2161
2162 Support C and C++ array type.
2163 * include/abg-comparison.h (array_diff): Declare new class.
2164 (array_diff_sptr): Shared pointer to type array_diff.
2165 (compute_diff): Overload the function to take type
2166 array_diff_sptr as the first two arguments.
2167 * include/abg-fwd.h (array_type_def): Declare new class.
2168 (subrange_type): Likewise.
2169 (is_array_def): Declare new function.
2170 * include/abg-ir.h (array_type_def_sptr): Shared pointer
2171 to type array_type_def.
2172 (array_type_def): Declare new class.
2173 (ir_node_visitor::visit): Declare a new virtual function
2174 taking a pointer to type array_type_def as an argument.
2175 * src/abg-comparison.cc (compute_diff_for_types): Add
2176 try_to_diff for two instances of type array_type_def.
2177 (array_diff::priv): declare struct for holding private members
2178 of type array_diff.
2179 (array_diff::array_diff): Define constructor.
2180 (array_diff::{first,second}_array):Define new
2181 member functions.
2182 (array_diff::element_type_diff): Likewise.
2183 (array_diff::{length,report,traverse}): Likewise.
2184 (compute_diff): Define function overloaded in
2185 include/abg-comparison.h.
2186 * src/abg-dwarf-reader.cc (build_array_type): Define new
2187 function. Handle DW_TAG_array_type and DW_TAG_subrange type.
2188 (build_ir_node_from_die): Amend case DW_TAG_array_type with
2189 a call to build_array_type.
2190 * src/abg-hash.cc (array_type_def::hash): Declare new struct.
2191 (type_base::dynamic_hash::operator()): Attempt to dynamic_cast
2192 the argument to type array_type_def as well.
2193 (array_type_def::hash): Declare new struct.
2194 * src/abg-ir.cc (array_type_def::array_type_def): Define
2195 constructors.
2196 (array_type_def::priv): declare struct for holding private members
2197 of type array_type_def.
2198 (array_type_def::operator==(const decl_base&):
2199 Define new operator.
2200 (array_type_def::operator==(const type_base&):
2201 Likewise.
2202 (array_type_def::append_subrange{,s}): Define
2203 new functions.
2204 (array_type_def::{set,get}_size_in_bits): Likewise.
2205 (array_type_def::get_dimension_count): Likewise.
2206 (array_type_def::get_qualified_name): Likewise.
2207 (array_type_def::get_pretty_representation): Likewise.
2208 (array_type_def::get_subrange_representation): Likewise.
2209 (array_type_def::traverse): Likewise.
2210 (array_type_def::get_{element_type,location,subranges}): Likewise.
2211 (array_type_def::is_infinite): Likewise.
2212 (array_type_def::~array_type_def): Define destructor.
2213 (ir_node_visitor::visit): Define function, taking
2214 pointer to array_type_def as an argument.
2215 * src/abg-reader.cc (map_id_and_node): Check if node
2216 is an array.
2217 (is_array_def): Check if object is an array.
2218 (handle_element_node): Handle array_type_def as well.
2219 (build_subrange_type): Define new function.
2220 (build_array_type_def): Likewise.
2221 (build_type): Build type array_type_def as well.
2222 (build_type_composition): Likewise.
2223 (handle_array_type_def): Define new function.
2224 * src/abg-writer.cc: (write_decl): Output arrays
2225 as well.
2226 (write_member_type): Likewise.
2227 (write_type_composition): Likewise.
2228 (write_array_type_def): Define new function.
2229 * tests/data/test-diff-dwarf/test{10,11}-v{0,1}.{cc,o}: New test source
2230 files
2231 * tests/data/test-diff-dwarf/test{10,11}-report.txt: Likewise.
2232 * tests/data/test-diff-dwarf/test10-report.txt: New test input.
2233 * tests/data/test-read-dwarf/test7.cc: New test source
2234 file.
2235 * tests/data/test-read-dwarf/test7.so: New input binary
2236 to read.
2237 * tests/data/test-read-dwarf/test7.so.abi: New reference
2238 test to compare against.
2239 * tests/data/test-read-write/test25.xml: New test source
2240 file.
2241 * tests/test-diff-dwarf.cc: Adjust to launch the new test.
2242 * tests/test-read-dwarf.cc: Likewise.
2243 * tests/test-read-write.cc: Likewise.
2244 * test/Makefile.am: Add the new test inputs to the source
2245 distribution.
2246
22472014-08-19 Dodji Seketeli <dodji@redhat.com>
2248
2249 Ignore variables which type couldn't be read from DWARF
2250 * src/abg-dwarf-reader.cc (build_var_decl): Drop the var on the
2251 floor if its type couldn't be built.
2252
22532014-08-19 Dodji Seketeli <dodji@redhat.com>
2254
2255 Support TLS variables
2256 * src/abg-ir.cc (elf_symbol::is_variable): Accept TLS objects as
2257 variables too.
2258 * src/abg-dwarf-reader.cc (eval_last_constant_dwarf_sub_expr)
2259 (die_location_address): Add an output parameter to say if the
2260 resulting constant value is a tls address or not.
2261 (lookup_public_variable_symbol_from_elf): Use the proper
2262 elf_symbol::is_variable() method, rather than trying to figure out
2263 the low levels of what a variable is here. Also, cleanup the
2264 condition.
2265 (read_context::load_symbol_maps): Consider symbols of type
2266 STT_TLS, when loading symbols for variables. Also, to avoir
2267 symbols that are for versions, filter out symbols of type
2268 STT_OBJECT and with a SHN_ABS section index.
2269 (read_context::get_variable_address): If the address is for a tls
2270 variable, do no try to adjust the address to arrange for things
2271 like prelink. As that doesn't seem to affect TLS variables.
2272 (dwarf_expr_eval_context::set_tls_addr): New data member.
2273 (dwarf_expr_eval_context::dwarf_expr_eval_context): Initialize it.
2274 (dwarf_expr_eval_context::set_tls_address): New accessors.
2275 (dwarf_expr_eval_context::op_manipulates_stack): Handle
2276 DW_OP_GNU_push_tls_address, a bit like DW_OP_form_tls_address, but
2277 then, its result is a constant. Set the
2278 dwarf_expr_eval_context::set_tls_addr flag when these two OPs are
2279 run.
2280 (die_member_offset): Adjust to the new signature of
2281 eval_last_constant_dwarf_sub_expr.
2282 * tests/data/test-diff-dwarf/libtest9-v0.so: New test input.
2283 * tests/data/test-diff-dwarf/libtest9-v1.so: Likewise.
2284 * tests/data/test-diff-dwarf/test9-report.txt: Likewise
2285 * tests/data/test-diff-dwarf/test9-v0.cc: Source code for the
2286 first input.
2287 * tests/data/test-diff-dwarf/test9-v1.cc: Source code for the
2288 second input.
2289 * tests/test-diff-dwarf.cc: Run this harness on the two new inputs
2290 above.
2291 * tests/Makefile.am: Add the new inputs to the source distribution.
2292
22932014-08-18 Dodji Seketeli <dodji@redhat.com>
2294
2295 Update copyright for abg-dwarf-reader.cc
2296 * src/abg-dwarf-reader.cc: Update copyright year.
2297
22982014-08-18 Dodji Seketeli <dodji@redhat.com>
2299
2300 Make the link to the alt debug info file relative
2301 * tests/data/test-alt-dwarf-file/test0-debug-dir/.build-id/16/7088580c513b439c9ed95fe6a8b29496495f26.debug:
2302 Make this link be relative.
2303
23042014-08-15 Dodji Seketeli <dodji@redhat.com>
2305
2306 White space fix
2307 * tests/test-lookup-syms.cc: Remove useless white space.
2308
23092014-08-15 Dodji Seketeli <dodji@redhat.com>
2310
2311 Update copyright notice
2312 * tests/test-lookup-syms.cc: Update year in copyright notice.
2313 * tools/bidw.cc: Likewise.
2314
23152014-08-15 Dodji Seketeli <dodji@redhat.com>
2316
2317 Support alternate debug info sections
2318 * include/abg-dwarf-reader.h (class read_context)
2319 (typedef read_context_sptr, create_read_context)
2320 (has_alt_debug_info): Declare these.
2321 (read_corpus_from_elf): Declare new overload.
2322 * src/abg-dwarf-reader.cc (find_alt_debug_info)
2323 (is_die_attribute_resolved_through_gnu_ref_alt)
2324 (build_primary_die_parent_relations_under)
2325 (build_alternate_die_parent_relations_under):
2326 Define new static functions.
2327 (read_context::{alt_dwarf_,
2328 alt_debug_info_path_, alternate_die_decl_map_,
2329 alternate_die_parent_map_}): New data members.
2330 (read_context::{alt_dwarf, alt_debug_info_path,
2331 alternate_die_decl_map, associate_die_to_decl_primary,
2332 associate_die_to_decl_alternate, associate_die_to_decl,
2333 lookup_decl_from_die_offset_primary,
2334 lookup_decl_from_die_offset_alternate,
2335 lookup_decl_from_die_offset, alternate_die_parent_map}): New
2336 member functions.
2337 (read_context::load_debug_info): Painfully Get a handle on the
2338 alternate debug info section too. We shouldn't have to do all
2339 this work; we could use the new dwarf_getalt() function from
2340 libdw, but we cannot as we want to support supports that predate
2341 that api. When a version of elfutils gets released with that api
2342 though, we should conditionally use that instead.
2343 (build_ir_node_from_die, get_parent_die, get_scope_for_die)
2344 (build_namespace_decl_and_add_to_ir)
2345 (build_class_type_and_add_to_ir, build_qualified_type)
2346 (build_pointer_type_def, build_reference_type, build_typedef_type)
2347 (build_var_decl, build_function_decl): Take a new parameter that
2348 tells if the input DIE is from alternate debug info. Adjust their
2349 code accordingly.
2350 (die_die_attribute): Take a new output parameter that tells if the
2351 resolved DIE is from alternate debug info. Also take a new
2352 parameter that tells if the input DIE is from alternate debug info
2353 sections.
2354 (build_die_parent_relations_under): Take the DIE -> parent map to
2355 act upon. Also, add a new overload that takes a flag saying if
2356 the DIE is from alternate debug info or not, and act upon that.
2357 (build_die_parent_maps): Renamed build_die_parent_map into this
2358 and make it build DIE -> parent DIE relationship for the alternate
2359 debug info file as well.
2360 (find_last_import_unit_point_before_die, ): Adjust to use the
2361 information about if the relevant DIEs are in alternate debug info
2362 or not.
2363 (build_translation_unit_and_add_to_ir): Clear the alternate DIE ->
2364 decl map, that is per TU just as the primary DIE -> decl map.
2365 Adjust to use the information about if the relevant DIEs are in
2366 alternate debug info or not.
2367 (read_debug_info_into_corpus): Build the two DIE -> DIE parent
2368 maps (one for the primary debug info and one for the alternate
2369 debug info).
2370 (create_read_context, has_alt_debug_info): Define new public entry
2371 points.
2372 (read_corpus_from_elf): New entry point overload that takes a
2373 read_context.
2374 * tools/bidw.cc (options::{check_alt_debug_info_path,
2375 show_base_name_alt_debug_info_path}): New data members.
2376 (display_usage): Update for the two new options
2377 --check-alternate-debug-info and
2378 check-alternate-debug-info-base-name.
2379 (parse_command_line): Parse the two options above.
2380 (main) Handle the two new options above.
2381 * tests/Makefile.am: Build the new runtestaltdwarf test. Add the
2382 new data/test-alt-dwarf-file/* files to the build system.
2383 * tests/test-alt-dwarf-file.cc: New test driver.
2384 * tests/data/test-alt-dwarf-file/test0-common.cc: New test input
2385 files.
2386 * tests/data/test-alt-dwarf-file/libtest0-common.so: Likewise.
2387 * tests/data/test-alt-dwarf-file/test0.cc: Likewise.
2388 * tests/data/test-alt-dwarf-file/libtest0.so: Likewise.
2389 * tests/data/test-alt-dwarf-file/test0.h: Likewise.
2390 * tests/data/test-alt-dwarf-file/test0-common-dwz.debug: Likewise.
2391 * tests/data/test-alt-dwarf-file/test0-debug-dir/.build-id/16/7088580c513b439c9ed95fe6a8b29496495f26.debug:
2392 Likewise.
2393 * tests/data/test-alt-dwarf-file/test0-debug-dir/test0-common-dwz.debug:
2394 Likewise.
2395 * tests/data/test-read-dwarf/test1.abi: Adjust. bidw doesn't emit
2396 an abstract constructor/destructor anymore. It emits just the
2397 functions matching the cdtor symbols found in the binary.
2398 * tests/data/test-read-dwarf/test2.so.abi: Likewise.
2399
24002014-07-26 Dodji Seketeli <dodji@redhat.com>
2401
2402 Better handle corner cases of void* DWARF parsing
2403 * src/abg-dwarf-reader.cc (build_pointer_type_def): Better
2404 support cases where the underlying type of the pointer is not
2405 know. In that case, the pointer should not be created.
2406
24072014-07-20 Dodji Seketeli <dodji@redhat.com>
2408
2409 Support finding symbols with bias wrt DWARF references
2410 * src/abg-dwarf-reader.cc (get_binary_load_address): New function
2411 definition.
2412 (read_context::elf_handle): Add comment.
2413 (read_context::{dwarf_elf_handle, dwarf_is_splitted,
2414 maybe_adjust_address_for_exec_or_dyn}): New method definitions.
2415 (maybe_adjust_fn_sym_address)
2416 (maybe_adjust_var_sym_address): Move these so they become members
2417 of read_context. Also, For shared libraries and executable (that
2418 could have been e.g prelinked), consider their loading address
2419 when trying to find which symbol resides at a given place in
2420 memory.
2421 (read_context::{get_function_address, get_variable_address):
2422 Adjust.
2423 (build_translation_unit_and_add_to_ir): Fix comment.
2424
24252014-07-20 Dodji Seketeli <dodji@redhat.com>
2426
2427 Reset the scope of void_type_decl for each new translation unit
2428 * src/abg-dwarf-reader.cc (build_translation_unit_and_add_to_ir):
2429 Clear the void_type_decl on new translation units.
2430
24312014-07-18 Dodji Seketeli <dodji@redhat.com>
2432
2433 Update INSTALL file
2434 * INSTALL: Adjust the copyright year information because autotools
2435 2.69 did.
2436
24372014-07-18 Dodji Seketeli <dodji@redhat.com>
2438
2439 Correctly write the name of a const reference type
2440 * src/abg-dwarf-reader.cc (maybe_strip_qualification): Define new
2441 function.
2442 (build_ir_node_from_die): Use the maybe_strip_qualification when
2443 building a qualified type.
2444 * src/abg-ir.cc (qualified_type_def::build_name): Fix the
2445 representation of the name of a reference that is const.
2446 * tests/data/test-read-dwarf/test1.abi: Adjust.
2447 * tests/data/test-diff-dwarf/test0-report.txt: Likewise.
2448 * tests/data/test-diff-dwarf/test1-report.txt: Likewise.
2449 * tests/data/test-diff-dwarf/test6-report.txt: Likewise.
2450 * tests/data/test-diff-dwarf/test7-report.txt: Likewise.
2451 * tests/data/test-diff-dwarf/test8-report.txt: Likewise.
2452 * tests/data/test-diff-filter/test0-report.txt: Likewise.
2453 * tests/data/test-diff-filter/test01-report.txt: Likewise.
2454 * tests/data/test-diff-filter/test2-report.txt: Likewise.
2455 * tests/data/test-diff-filter/test3-report.txt: Likewise.
2456 * tests/data/test-diff-filter/test9-report.txt: Likewise.
2457 * tests/data/test-diff-filter/test10-report.txt: Likewise.
2458 * tests/data/test-diff-filter/test13-report.txt: Likewise.
2459 * tests/data/test-diff-filter/test14-0-report.txt: Likewise.
2460 * tests/data/test-diff-filter/test14-1-report.txt: Likewise.
2461
24622014-07-01 Sinny Kumari <skumari@redhat.com>
2463
2464 Consider symbols with STB_GNU_UNIQUE binding as public
2465 * src/abg-ir.cc (is_public): Change in function to consider
2466 symbols with STB_GNU_UNIQUE binding as public
2467 * tests/data/test-read-dwarf/test6.cc: Test file to generate
2468 STB_GNU_UNIQUE binding symbols
2469 * tests/data/test-read-dwarf/test6.so: Test shared library having
2470 STB_GNU_UNIQUE binding symbols
2471 * tests/data/test-read-dwarf/test6.so.abi: XML file containing
2472 dwarf information from test6.so
2473 * tests/test-read-dwarf.cc (in_out_specs): Add the new test above
2474 * tests/Makefile.am: Add tests/data/test-read-dwarf/test6.cc,
2475 tests/data/test-read-dwarf/test6.so and
2476 tests/data/test-read-dwarf/test6.so.abi to the distribution
2477
24782014-07-01 Dodji Seketeli <dodji@redhat.com>
2479
2480 Add comment to test-read-write.cc
2481 * tests/test-read-write.cc: Update copyright notice and add a
2482 meaningful comment for the file.
2483
24842014-06-23 Dodji Seketeli <dodji@redhat.com>
2485
2486 Support reading void* type from DWARF
2487 * include/abg-ir.h (type_decl::get_void_type_decl): Declare new
2488 static method.
2489 * src/abg-ir.cc (type_decl::get_void_type_decl): Define it.
2490 * src/abg-dwarf-reader.cc (build_ir_node_for_void_type): Define
2491 new static function.
2492 (build_pointer_type_def): Support void* type nodes here.
2493 * tests/data/test-read-dwarf/test5.cc: Source code for new test
2494 input.
2495 * tests/data/test-read-dwarf/test5.o: New test input.
2496 * tests/data/test-read-dwarf/test5.o.abi: Likewise.
2497 * tests/Makefile.am: Add the above to the source distribution.
2498
24992014-06-23 Dodji Seketeli <dodji@redhat.com>
2500
2501 Update a comment in abg-dwarf-reader.cc
2502 * src/abg-dwarf-reader.cc (build_ir_node_from_die): Update a
2503 comment here.
2504
25052014-06-23 Mark Wielaard <mjw@redhat.com>
2506
2507 Handle C99 restrict qualifier and DWARFv3 DW_TAG_restrict_type.
2508 * src/abg-dwarf-reader.cc (build_qualified_type): Handle
2509 DW_TAG_restrict_type by adding CV_RESTRICT.
2510 (build_ir_node_from_die): Call build_qualified_type for
2511 DW_TAG_restrict_type.
2512 * src/abg-reader.cc (build_qualified_type_decl): Handle
2513 "restrict" attribute by adding CV_RESTRICT.
2514 * src/abg-writer.cc (write_qualified_type_def): Output
2515 "restrict" attribute for CV_RESTRICT.
2516 * tests/data/test-read-dwarf/test4.c: New test file.
2517 * tests/data/test-read-dwarf/test4.so: Likewise.
2518 * tests/data/test-read-dwarf/test4.so.abi: Likewise.
2519 * tests/data/test-read-write/test24.xml: Likewise.
2520 * tests/test-read-dwarf.cc (in_out_specs): Add test4.
2521 * tests/test-read-write.cc (in_out_specs): Add test24.xml.
2522
25232014-06-23 Dodji Seketeli <dodji@seketeli.org>
2524
2525 Add subdir-objects automake option where it is needed
2526 * src/Makefile.am: Add the subdir-object automake option here.
2527 Do not specify absolute paths for the input files as Automake now
2528 takes care of that just fine.
2529 * tests/Makefile.am: Likewise.
2530 * tools/Makefile.am: Likewise.
2531
25322014-06-23 Dodji Seketeli <dodji@seketeli.org>
2533
2534 Remove autotools artifacts from the repository
2535 * config.guess: Remove from revision control system.
2536 * config.sub: Likewise.
2537 * depcomp: Likewise.
2538 * m4/libtool.m4: Likewise.
2539 * missing: Likewise.
2540
25412014-06-23 Dodji Seketeli <dodji@redhat.com>
2542
2543 Avoid reporting diff nodes that have already been reported
2544 * include/abg-comp-filter.h (class harmful_filter): Update
2545 comment.
2546 (class redundant_filter): Declare new filter.
2547 * include/abg-comparison.h (enum
2548 diff_category::NOT_REDUNDANT_CATEGORY): New category. Update the
2549 values of the other enumerators.
2550 (diff_context::{add_diff, diff_has_been_traversed}): New overloads.
2551 (diff_context::{categorizing_redundancy, show_redundant_changes}):
2552 Declare new methods.
2553 (diff_context::remove_from_category): Define new inline method.
2554 * src/abg-comparison.cc (noop_deleter::operator()): Constify the
2555 parameter.
2556 (CATEGORIZE_REDUNDANCY_FROM_CHILD_NODE)
2557 (UPDATE_REDUNDANCY_CATEGORIZATION_FROM_NODE_SUBTREE): New macros.
2558 (TRAVERSE_DIFF_NODE_AND_PROPAGATE_CATEGORY)
2559 (TRAVERSE_MEM_DIFF_NODE_AND_PROPAGATE_CATEGORY)
2560 (TRAVERSE_MEM_FN_DIFF_NODE_AND_PROPAGATE_CATEGORY): Use the new
2561 CATEGORIZE_REDUNDANCY_FROM_CHILD_NODE and
2562 UPDATE_REDUNDANCY_CATEGORIZATION_FROM_NODE_SUBTREE macros above.
2563 (ENSURE_DIFF_NODE_TRAVERSED_ONCE)
2564 (ENSURE_MEM_DIFF_NODE_TRAVERSED_ONCE): If the (type_decl or class)
2565 node hasn't been yet traversed, mark it as non-redundant.
2566 (diff_context::priv::categorizing_redundancy): New member.
2567 (diff_context::priv::priv): Initialize it.
2568 (diff_context::{add_diff, diff_has_been_traversed): Define new
2569 overloads.
2570 (diff_context::mark_diff_as_traversed): Intern a diff node that is
2571 marked as being traversed.
2572 (diff_context::{categorizing_redundancy, show_redundant_changes}):
2573 Define new methods.
2574 (diff::is_filtered_out): A redundant function or top-level
2575 variable is considered filtered-out. Otherwise, the new
2576 NOT_REDUNDANT_CATEGORY doesn't play any role when comparing
2577 allowed categories with the set of categories a diff node belongs
2578 to.
2579 (corpus::priv::categorize_redundant_changed_sub_nodes): Define
2580 new member function.
2581 (corpus_diff::priv::apply_filters_and_compute_diff_stats): Change
2582 this to first walk the changed functions and variables to apply
2583 filters, then categorize redundant changed functions, and then
2584 walk the changed functions and variables again to count
2585 filtered-out diff nodes.
2586 (filtering::redundant_filter::visit): Define new member function.
2587 * tools/bidiff.cc (options::show_redundant_changes): New data
2588 member.
2589 (options::options): Initialize it.
2590 (display_usage): Add help string for the --redundant command line
2591 option.
2592 (parse_command_line): Add support for the --redundant command line
2593 option.
2594 (set_diff_context_from_opts): Take the --redundant command line
2595 option in account.
2596 * tests/test-diff-filter.cc: Update this to add new test inputs.
2597 * tests/data/test-diff-filter/test14-0-report.txt: New test input.
2598 * tests/data/test-diff-filter/test14-1-report.txt: Likewise.
2599 * tests/data/test-diff-filter/test14-v0.cc: Likewise.
2600 * tests/data/test-diff-filter/test14-v0.o: Likewise.
2601 * tests/data/test-diff-filter/test14-v1.cc: Likewise.
2602 * tests/data/test-diff-filter/test14-v1.o: Likewise.
2603 * tests/data/test-diff-filter/test15-0-report.txt: Likewise.
2604 * tests/data/test-diff-filter/test15-1-report.txt: Likewise.
2605 * tests/data/test-diff-filter/test15-v0.cc: Likewise.
2606 * tests/data/test-diff-filter/test15-v0.o: Likewise.
2607 * tests/data/test-diff-filter/test15-v1.cc: Likewise.
2608 * tests/data/test-diff-filter/test15-v1.o: Likewise.
2609 * tests/Makefile.am: Add the above to the build system.
2610
26112014-06-23 Dodji Seketeli <dodji@redhat.com>
2612
2613 A name that couldn't be demangled remains the same
2614 * src/abg-ir.cc (demangle_cplus_mangled_name): When the demangler
2615 fails to demangle a name, just return the input name as-is.
2616
26172014-06-23 Dodji Seketeli <dodji@redhat.com>
2618
2619 Update copyright notice for a bunch of files
2620 * include/abg-comp-filter.h: Update copyright notice.
2621 * include/abg-comparison.h: Likewise.
2622 * src/abg-comparison.cc: Likewise.
2623 * src/abg-ir.cc: Likewise.
2624 * tools/bidiff.cc: Likewise.
2625 * tests/test-diff-filter.cc: Likewise.
2626
26272014-06-19 Sinny Kumari <skumari@redhat.com>
2628
2629 Keep symbol's multiple aliases within single attribute separated by comma
2630 * src/abg-writer.cc (write_elf_symbol_aliases): Changing function
2631 to keep multiple symbol aliases within one alias attribute
2632 * src/abg-reader.cc (build_elf_symbol_db): Changing function to read
2633 symbol's alias attribute and split if multiple alias exist with comma(,)
2634 asi a delimiter and add all aliases to main symbol
2635 * tests/data/test-read-dwarf/test3.c: Test file to generate multiple aliases
2636 * tests/data/test-read-dwarf/test3.so: Test shared library having multiple
2637 aliases of a symbol
2638 * tests/data/test-read-dwarf/test3.so.abi: XML file containing dwarf
2639 information from test3.so
2640 * tests/test-read-dwarf.cc (in_out_specs): Add the new test above
2641 * tests/Makefile.am: Add tests/data/test-read-dwarf/test3.c,
2642 tests/data/test-read-dwarf/test3.so and tests/data/test-read-dwarf/test3.so.abi
2643 to the distribution
2644
26452014-06-18 Mark Wielaard <mjw@redhat.com>
2646
2647 DW_TAG_mutable_type doesn't exist.
2648 * src/abg-dwarf-reader.cc (is_type_tag): Remove DW_TAG_mutable_type.
2649 (build_ir_node_from_die): Likewise.
2650
26512014-06-05 Dodji Seketeli <dodji@redhat.com>
2652
2653 Look at first parm type and artificial-ness to detect static-ness
2654 * src/abg-dwarf-reader.cc (build_class_type_and_add_to_ir): To
2655 tell if a member function is static, look if the first parm is a
2656 pointer to the type of the enclosing class, and if it's
2657 artificial. Don't bother trying to be smart by looking at the
2658 non-presence of DW_AT_object_pointer b/c that attribute wasn't
2659 emitted by GCC 4_4.
2660
26612014-06-04 Dodji Seketeli <dodji@redhat.com>
2662
2663 Harden debug info path management & better error reporting
2664 * include/abg-dwarf-reader.h (enum status): New enum.
2665 (read_corpus_from_elf): Return an instance of status above, and
2666 return the corpus by parameter.
2667 * src/abg-dwarf-reader.cc (create_default_dwfl): Add a comment
2668 about elfutils wanting the Dwfl_Callbacks::debuginfo_path to be an
2669 absolute path.
2670 (read_corpus_from_elf): Return an instance of status above, and
2671 return the corpus by parameter.
2672 * tools/abg-tools-utils.h (make_path_absolute): Declare new function.
2673 * tools/abg-tools-utils.cc (make_path_absolute): New
2674 implementation.
2675 * tools/bidiff.cc (options::di_root_path[12]): Make these be
2676 shared pointers.
2677 (parse_command_line): ensure the debug info root paths are
2678 absolute.
2679 (main): Adjust. Give meaningful errors when the debug info or
2680 symbol files couldn't be read.
2681 * tools/bidw.cc (options::di_root_path): Make this be a shared
2682 pointer.
2683 (parse_command_line): Ensure the debug info root path is absolute.
2684 (main): Adjust. Give meaningful errors when the debug info or
2685 symbol files couldn't be read.
2686 * tools/bilint.cc (options::di_root_path): Make this be a shared
2687 pointer.
2688 (parse_command_line): Ensure the debug info root path is absolute.
2689 (main): Adjust. Give meaningful errors when the debug info or
2690 symbol file couldn't be read.
2691 * tests/test-diff-dwarf.cc (main): Adjust.
2692 * tests/test-read-dwarf.cc (main): Likewise.
2693
26942014-06-02 Dodji Seketeli <dodji@redhat.com>
2695
2696 Do not choke on AR archives
2697 * tools/abg-tools-utils.h (file_type::FILE_TYPE_AR): New enumerator.
2698 * tools/abg-tools-utils.cc (guess_file_type): Recognize AR archive
2699 files.
2700 * tools/bidiff.cc (main): Support AR archives.
2701 * tools/bidw.cc (main): Likewise.
2702 * tools/bilint.cc (main): Likewise.
2703
27042014-05-30 Dodji Seketeli <dodji@redhat.com>
2705
2706 Honor linkage name showing when displaying added/removed member functions
2707 * src/abg-comparison.cc (represent): Take a diff_context. If
2708 instructed to show linkage names, show the linkage name of the
2709 member function.
2710 (class_diff::report): Adjust for the new signature of represent().
2711
27122014-05-30 Dodji Seketeli <dodji@redhat.com>
2713
2714 Make bidiff filter output and display symbol names by default
2715 * tools/bidiff.cc (options::options): Initialize
2716 options::show_linkage_names to true and
2717 options::show_harmful_changes to false.
2718 (parse_command_line): Change --linkage-names into
2719 --no-linkage-names as the linkage names are now displayed by
2720 default. Change --no-harmless into --harmless as harmless changes
2721 are now filtered by default.
2722 (display_usage): Update help string for the --linkage-names ->
2723 --no-linkage-names and --no-harmful -> --harmful change.
2724 * tests/test-diff-filter.cc: Adjust.
2725
27262014-05-29 Dodji Seketeli <dodji@redhat.com>
2727
2728 Ensure added/removed member functions have their symbols added/removed
2729 * include/abg-comparison.h (diff_context::{set_corpora,
2730 get_first_corpus, get_second_corpus}): Declare new member
2731 functions.
2732 * src/abg-comparison.cc (diff_context::{set_corpora,
2733 get_first_corpus, get_second_corpus}): Define them.
2734 (compute_diff): In the overload for corpus_sptr stick the corpora
2735 being compared, into the diff context.
2736 (class_diff::ensure_lookup_tables_populated): If a member function
2737 is allegedly removed, check that its underlying symbol is removed
2738 from the corpus as well. Otherwise, consider that the member
2739 function hasn't been removed. Likewise, if a member function is
2740 allegedly added, check that its underlying symbol has been added
2741 to the corpus as well. Otherwise, consider that the member
2742 function hasn't been added. The symbols can now be accessed
2743 through the two corpora that are now present in the diff context.
2744
27452014-05-29 Dodji Seketeli <dodji@redhat.com>
2746
2747 Fix scope for DIEs with specification or abstract_origin attributes
2748 * src/abg-dwarf-reader.cc (get_scope_for_die): If the DIE has a
2749 DW_AT_specification or DW_AT_abstract_origin attribute, get the
2750 scope of the referred-to DIE.
2751 (build_ir_node_from_die): For a variable DIE that has a
2752 DW_AT_{specification,abstract_origin} attribute, do not add the
2753 built variable IR node to its scope because it is already in a
2754 scope. It's in a scope because that built variable is for the DIE
2755 that is referred-to by the DW_AT_{specification,abstract_origin}
2756 attribute. Likewise for member functions. Also, now,
2757 get_scope_for_die can return a class for a function DIE because
2758 get_scope_for_die now returns the *logical* scope of the DIE; that
2759 is, it follows DW_AT_{specification,abstract_origin} attributes.
2760 * tests/data/test-read-dwarf/test1.abi: Adjust.
2761
27622014-05-28 Dodji Seketeli <dodji@redhat.com>
2763
2764 Add a symbol database to the ABI Corpus & support symbol aliases
2765 * include/abg-corpus.h (corpus::{g,s}et_{fun,var}_symbol_map{_sptr}):
2766 Declare new accessors.
2767 (corpus::lookup_{variable,function}_symbol): Declare new member
2768 functions.
2769 * src/abg-corpus.cc (corpus::{g,s}et_{fun,var}_symbol_map{_sptr}):
2770 Define new accessors.
2771 (corpus::lookup_{variable,function}_symbol): Define new member
2772 functions.
2773 * include/abg-ir.h (string_elf_symbol_sptr_map_type)
2774 (string_elf_symbol_sptr_map_sptr, elf_symbols)
2775 (string_elf_symbols_map_type, string_elf_symbols_map_sptr): New
2776 convenience typedefs.
2777 (elf_symbol::{get_main_symbol, is_main_symbol, get_next_alias,
2778 has_aliases, add_alias, get_id_string,
2779 get_name_and_version_from_id, operator=}): Declare new member
2780 functions.
2781 * src/abg-ir.cc (elf_symbol::{get_main_symbol, is_main_symbol,
2782 get_next_alias, has_aliases, add_alias, get_id_string,
2783 get_name_and_version_from_id, operator=}): Define new member
2784 functions.
2785 * include/abg-reader.h (read_corpus_from_file): Take a shared
2786 pointer to corpus.
2787 * src/abg-reader.cc (read_context::{g,s}et_corpus): Define these.
2788 (build_elf_symbol_db, build_elf_symbol_from_reference)
2789 (read_symbol_db_from_input): Define new functions.
2790 (read_corpus_from_input): Adjust. Make it read symbol databases.
2791 (build_elf_symbol): Harden this.
2792 (build_{var,function}_decl): Read the symbol reference. Do not
2793 read the local symbol serialization anymore.
2794 (read_corpus_from_archive): Adjust.
2795 (read_corpus_from_file): Take a reference to a shared pointer to
2796 corpus, rather than a reference to the corpus.
2797 (read_corpus_from_native_xml): Only keep the overload that returns
2798 a corpus. Set the current context with the corpus.
2799 * src/abg-dwarf-reader.cc (addr_elf_symbol_sptr_map_type)
2800 (addr_elf_symbol_sptr_map_sptr): New convenience typedefs.
2801 (read_context::{fun_sym_addr_sym_index_map_,
2802 var_sym_addr_sym_index_map_): Remove.
2803 (read_context::{fun,var}_addr_sym_map_): New. Replace the above
2804 that got removed.
2805 (read_context::{var,fun}_syms_): New.
2806 (read_context::lookup_elf_{fn,var}_symbol_from_address): Adjust.
2807 (read_context::{fun,var}_addr_sym_map{_sptr}): New.
2808 (read_context::{fun,var}_syms{_sptr}): New.
2809 (read_context::load_symbol_maps): Replace
2810 read_context::load_symbol_addr_to_index_maps. Adjust to load all
2811 the new maps.
2812 (read_context::maybe_load_symbol_maps): New.
2813 (read_debug_info_into_corpus): Renamed build_corpus into this.
2814 Update to load symbol maps and set it to the corpus.
2815 * src/abg-writer.cc (write_context::get_fun_symbol_map): New
2816 accessor.
2817 (write_elf_symbol_aliases, write_elf_symbol_reference)
2818 (write_elf_symbols_table): Define new static functions.
2819 (write_var_decl): Write the reference to the underlying symbol of
2820 the variable. Do not write the full symbol here anymore.
2821 (write_function_decl): Likewise, write the reference to the
2822 underlying symbol of the function. Do not write the full symbol
2823 here anymore.
2824 (write_corpus_to_native_xml): Write the symbol databases at the
2825 beginning of the corpus document.
2826 * src/abg-comparison.cc
2827 (corpus_diff::priv::ensure_lookup_tables_populated): Now that the
2828 corpus has symbols, check if a the symbol of an allegedly deleted
2829 function (resp. variable) is deleted; if not, then do not report
2830 the function (resp. variable) as deleted. Similarly, check if the
2831 symbol of an allegedly added function (resp. variable) is added.
2832 if not, the do not report the function (resp. variable) as added.
2833 * tests/test-write-read-archive.cc (main): Adjust.
2834 * tools/biar.cc (extract_tus_from_archive): Likewise.
2835 * tests/data/test-diff-filter/test9-report.txt: Adjust.
2836 * tests/data/test-read-dwarf/test0.abi: Likewise.
2837 * tests/data/test-read-dwarf/test1.abi: Likewise.
2838 * tests/data/test-read-dwarf/test2.so.abi: Likewise.
2839
28402014-05-21 Dodji Seketeli <dodji@redhat.com>
2841
2842 Rename 'symbol' in fn names to 'public decl' in abg-corpus.{cc,h}
2843 * src/abg-corpus.cc (lots of places): Rename references to
2844 'symbol' in function & variable names to 'public_decl'.
2845
28462014-05-22 Dodji Seketeli <dodji@redhat.com>
2847
2848 Support debug info files being outside the expected system directories
2849 * include/abg-dwarf-reader.h (read_corpus_from_elf): Take a
2850 debug_info_root_path parameter.
2851 src/abg-dwarf-reader.cc (create_default_dwfl): Take a
2852 debug_info_root_path. Use that to initialize the Dwfl_Callbacks
2853 structure used by dwfl_begin.
2854 (create_default_dwfl_sptr, read_corpus_from_elf): Likewise, Take a
2855 debug_info_root_path parameter.
2856 * tests/test-diff-dwarf.cc (main): Adjust.
2857 * tests/test-read-dwarf.cc (main): Likewise.
2858 * tools/bidiff.cc (options::dir_root_path[12]): New member.
2859 (options::options): Initialize it.
2860 (display_usage): Add help string for the --debug-info-dir[12]
2861 options.
2862 (parse_command_line): Handle the new --debug-info-dir[12] options.
2863 (main): Pass the debug info directories to read_corpus_from_elf.
2864 * bidw.cc (options::::di_root_path): New member.
2865 (options::options): Initialize it.
2866 (display_usage): Add help string for the new --debug-info-dir
2867 option.
2868 (parse_command_line): Handle the new --debug-info-dir.
2869 (main): Pass the debug info root path to read_corpus_from_elf.
2870 * tools/bilint.cc (options::di_root_path): New member.
2871 (options::options): Initialize it.
2872 (display_usage): Add help string for the new --debug-info-dir.
2873 (parse_command_line): Handle --debug-info-dir command line option.
2874 (main): Pass the debug info root path to read_corpus_from_elf.
2875
28762014-05-21 Dodji Seketeli <dodji@redhat.com>
2877
2878 Fix detection of destructors
2879 * src/abg-dwarf-reader.cc (build_class_type_and_add_to_ir): Simply
2880 detect that the destructor starts with a '~'.
2881
28822014-05-21 Dodji Seketeli <dodji@redhat.com>
2883
2884 Add clone in the scope of the cloned decl they logically belong to
2885 * src/abg-dwarf-reader.cc (build_ir_node_from_die): Do not try to
2886 add the cloned function/variable to the current scope because
2887 cloning should have added the decl into the scope of the cloned
2888 target.
2889 * src/abg-ir.cc ({var,function}_decl::clone): Insert the clone
2890 decl into the scope of the cloned decl. My understanding is that
2891 it's where they belong.
2892 * tests/data/test-read-dwarf/test1.abi: Update this to incorporate
2893 all the abstract constructors/destructors *and* their clones into
2894 the classes where they belong.
2895 * tests/data/test-read-dwarf/test1.abi: Adjust for the abstract
2896 cdtor being added to the class, as well as their cloned concrete
2897 instances.
2898 * tests/data/test-read-dwarf/test2.so.abi: Likewise.
2899
29002014-05-20 Dodji Seketeli <dodji@redhat.com>
2901
2902 Support decl cloning when seeing DW_AT_abstract_origin
2903 * include/abg-ir.h ({var,function}_decl::clone): New method.
2904 * src/abg-dwarf-reader.cc (die_die_attribute): Add a flag to avoid
2905 looking through DW_AT_abstract_origin attribute here.
2906 (build_function_decl): Set the linkage name from
2907 DW_AT_linkage_name if it's not set yet.
2908 (build_ir_node_from_die): For DW_TAG_{variable,subprogram}, when
2909 we see DW_AT_abstract_origin, clone the decl they refer to.
2910 Also, avoid dropping the DIE on the floor just because it doesn't
2911 have die_is_artificial here.
2912 * src/abg-ir.cc ({var,function}_decl::clone): Implement this.
2913
29142014-05-19 Dodji Seketeli <dodji@redhat.com>
2915
2916 Don't share types across TUs when DW_TAG_partial_unit are involved
2917 * src/abg-dwarf-reader.cc (build_translation_unit_and_add_to_ir):
2918 Clear the part of the context that needs to be per TU.
2919 (build_ir_node_from_die): Assert that this should not be called
2920 for partial and imported unit because for now our practical
2921 assumption is that DIEs under partial unit are lazily read only
2922 when referenced by DIEs that are under DW_TAG_compile_unit.
2923 * tests/Makefile.am: Add the new test files to the build system.
2924 * tests/data/test-read-dwarf/test2.so.abi: Fix the reference
2925 output here to avoid sharing types across TUs, making the output
2926 valid for bilint.
2927
29282014-05-19 Dodji Seketeli <dodji@redhat.com>
2929
2930 Initial support for DW_TAG_partial_unit
2931 * src/abg-dwarf-reader.cc (read_context::cur_tu_die_): New member.
2932 (read_context::read_context): Initialize the new member.
2933 (read_context::cur_tu_die): New accessors.
2934 (find_last_import_unit_point_before_die): New static function.
2935 (get_parent_die): Take a logical current die offset parameter. If
2936 the die we want the parent for is a partial unit, then find the
2937 last DW_TAG_imported_unit that imports that partial unit before
2938 the logical current die and return the parent of that
2939 DW_TAG_imported_unit die.
2940 (get_scope_for_die): Take a logical current die offset parameter.
2941 Adjust.
2942 (build_translation_unit_and_add_to_ir): Set/unset the current
2943 translation unit DIE in the context. Adjust.
2944 (build_namespace_decl_and_add_to_ir)
2945 (build_class_type_and_add_to_ir, build_qualified_type)
2946 (build_pointer_type_def, build_reference_type, build_typedef_type)
2947 (build_var_decl, build_function_decl, build_ir_node_from_die):
2948 Take a logical current die offset parameter. Adjust.
2949 (build_corpus): Accept that we can have DIE that are not
2950 DW_TAG_compile_unit at the top level, because, well, we can now
2951 have DW_TAG_partial_unit too.
2952 * tests/data/test-read-dwarf/test2-{0,1}.cc: New test source
2953 files.
2954 * tests/data/test-read-dwarf/test2.h: Likewise.
2955 * tests/data/test-read-dwarf/test2.so: New input binary to read.
2956 * tests/data/test-read-dwarf/test2.so.abi: New reference test to
2957 compare against.
2958 * tests/test-read-dwarf.cc: Adjust to launch the new test.
2959
29602014-05-14 Dodji Seketeli <dodji@redhat.com>
2961
2962 Re-build a test input file with debug info
2963 * tests/data/test-lookup-syms/test1.so: Rebuild this with debug
2964 info.
2965
29662014-05-14 Dodji Seketeli <dodji@redhat.com>
2967
2968 Serialize and de-serialize elf symbols for var & function decls
2969 * abg-ir.h (string_to_elf_symbol_type, string_to_elf_symbol_binding):
2970 Declare new entry points.
2971 * src/abg-ir.cc (string_to_elf_symbol_type)
2972 (string_to_elf_symbol_binding): Define new entry points.
2973 * include/abg-libxml-utils.h (xml_char_sptr_to_string): Declare
2974 new entry points.
2975 * src/abg-libxml-utils.cc (xml_char_sptr_to_string): Define new
2976 entry points.
2977 * src/abg-reader.cc (read_elf_symbol_type)
2978 (read_elf_symbol_binding, build_elf_symbol): Define new static
2979 functions.
2980 (build_function_decl, build_var_decl): Use the new
2981 build_elf_symbol and set the symbol to the function. Flag the
2982 function as having a public symbol in the symbol table if the
2983 symbol is public.
2984 * src/abg-writer.cc (write_elf_symbol_type)
2985 (write_elf_symbol_binding, write_elf_symbol): Define new static
2986 functions.
2987 (write_var_decl, write_function_decl): Use the new
2988 write_elf_symbol to serialize the symbol for the decl.
2989 * tests/data/test-read-dwarf/test[01].abi: Adjust.
2990
29912014-05-14 Dodji Seketeli <dodji@redhat.com>
2992
2993 Don't crash when de-serializing an empty function parm xml node
2994 * src/abg-reader.cc (build_function_parameter): Do not crash if
2995 the xml node is NULL.
2996
29972014-05-14 Dodji Seketeli <dodji@redhat.com>
2998
2999 Fix a typo in serializing a decl_base::binding
3000 * src/abg-ir.cc (operator<<(std::ostream&, decl_base::binding)):
3001 Fix a typo here.
3002
30032014-05-14 Dodji Seketeli <dodji@redhat.com>
3004
3005 Add a help string for the --no-absolute-path option of bisym
3006 * tools/bisym.cc (show_help): Add a missing help string.
3007
30082014-05-13 Dodji Seketeli <dodji@redhat.com>
3009
3010 Do not try to use ELF hash tables in demangling lookup mode
3011 * src/abg-dwarf-reader.cc (lookup_symbol_from_elf): If in
3012 demangling mode, do not use ELF hash tables.
3013
30142014-05-13 Dodji Seketeli <dodji@redhat.com>
3015
3016 Use the proper symbol table for and set linkage_name to symbol name
3017 * src/abg-dwarf-reader.cc (find_symbol_table_section): Return the
3018 .symtab if we are looking at an executable or relocatable file and
3019 .dynsym if we are looking at a DSO.
3020 (find_symbol_table_section_index): Likewise. Implement this in
3021 terms of find_symbol_table_section.
3022 (build_{function,var}_decl): Set the linkage_name to the symbol
3023 name, if the symbol name is not empty.
3024 * tests/data/test-diff-filter/test9-report.txt: Adjust.
3025
30262014-05-13 Dodji Seketeli <dodji@redhat.com>
3027
3028 Remove redundant "'" around linkage names in diff reports
3029 * src/abg-comparison.cc (corpus_diff::report): Remove the
3030 redundant "'" from the linkage names in the diff.
3031
30322014-05-08 Dodji Seketeli <dodji@redhat.com>
3033
3034 Initial support for elf symbol (versionning) during decl comparison
3035 * include/abg-fwd.h (get_linkage_name): Remove.
3036 * include/abg-dwarf-reader.h (enum symbol_type)
3037 (enum symbol_binding): Move these into abg-ir.h.
3038 (lookup_symbol_from_elf, lookup_public_function_symbol_from_elf):
3039 Adjust.
3040 * src/abg-dwarf-reader.cc (eval_last_constant_dwarf_sub_expr):
3041 Declare this before using it.
3042 (die_address_attribute, die_location_address)
3043 (stt_to_elf_symbol_type, stb_to_elf_symbol_binding)
3044 (find_hash_table_section_index, find_symbol_table_section)
3045 (find_symbol_table_section_index, find_text_section)
3046 (find_bss_section, compare_symbol_name)
3047 (get_symbol_versionning_sections get_version_for_symbol)
3048 (lookup_symbol_from_sysv_hash_tab)
3049 (lookup_symbol_from_gnu_hash_tab, get_elf_class_size_in_bytes)
3050 (bloom_word_at, setup_gnu_ht, lookup_symbol_from_elf_hash_tab)
3051 (lookup_symbol_from_symtab, maybe_adjust_fn_sym_address)
3052 (maybe_adjust_var_sym_address): New static functions.
3053 (enum hash_table_kind): New enum.
3054 (struct gnu_ht): New struct.
3055 (read_context::var_decls_to_add_): Renamed var_decls_to_add into
3056 this.
3057 (read_context::{fun, var}_sym_addr_sym_index_map_): New member.
3058 (read_context::{lookup_symbol_from_elf,
3059 lookup_elf_symbol_from_index, lookup_elf_fn_symbol_from_address,
3060 lookup_elf_var_symbol_from_address, fun_sym_addr_sym_index_map,
3061 var_sym_addr_sym_index_map, load_symbol_addr_to_index_maps,
3062 get_function_address, get_variable_address}): New member
3063 functions.
3064 (read_context::lookup_public_{variable,
3065 function}_symbol_from_elf): Adjust.
3066 (op_pushes_constant_value): Fix a bug here.
3067 (lookup_symbol_from_elf): Adjust. Support cases where there is no
3068 elf hash table, e.g, for relocatable files.
3069 (lookup_public_function_symbol_from_elf)
3070 (lookup_public_variable_symbol_from_elf): Adjust.
3071 (build_var_decl): Allow updating the var_decl to associate it with
3072 its underlying symbol. In that case, if the linkage name is not
3073 set, set it to the symbol name.
3074 (build_function_decl): Likewise for function_decl.
3075 (operator<<(std::ostream&, symbol_type)):
3076 (operator<<(std::ostream&, symbol_binding)): Move these do
3077 abg-ir.cc.
3078 * include/abg-ir.h (class elf_symbol): Declare new class. Move
3079 enum symbol_binding and enum symbol_type (from abg-dwarf-reader.h) to
3080 elf_symbol::binding and elf_symbol::type here.
3081 (operator<<(std::ostream&, elf_symbol::type))
3082 (operator<<(std::ostream&, elf_symbol::binding))
3083 (operator==(const elf_symbol_sptr, const elf_symbol_sptr)): New
3084 operators.
3085 (class elf_symbol::version): Declare new class.
3086 (class var_decl): Make this pimpl, and add ...
3087 (var_decl::{g,s}et_symbol): ... new member functions.
3088 (class function_decl): Likewise, make this pimpl and add ...
3089 (function_decl::{g,s}et_symbol): ... new member functions.
3090 * src/abg-ir.cc (struct elf_symbol, elf_symbol::priv): New
3091 types.
3092 (elf_symbol::*): Lots of new members and member functions.
3093 (operator==(const elf_symbol_sptr, const elf_symbol_sptr)): New.
3094 (operator<<(std::ostream&, elf_symbol::type)): New.
3095 (operator<<(std::ostream&, elf_symbol::binding)): New.
3096 (elf_symbol::version::priv): New type.
3097 (elf_symbol::version::*): Lots of member functions.
3098 (get_linkage_name): Removed.
3099 (var_decl::priv): New type. Pimplify the thing.
3100 (var_decl::{s,g}et_symbol): New.
3101 (var_decl::operator==): Take symbols in account in the comparison.
3102 (function_decl::priv): New type.
3103 (function_decl::*): Pimplify.
3104 (function_decl::{s,g}et_symbol): New.
3105 (function_decl::operator==): Take symbols in account in the
3106 comparison.
3107 * include/abg-comparison.h (diff_context::show_linkage_name): New
3108 member function.
3109 * src/abg-comparison.cc (diff_context::priv::show_linkage_name_):
3110 New member.
3111 (diff_context::priv::priv): Initialize it.
3112 (diff_context::show_linkage_names): New member function.
3113 (corpus_diff::report): If the user used --show-linkage-names,
3114 display the linkage name after the name of the functions. Add
3115 missing "'" in the some spots.
3116 * tools/bidiff.cc (options.show_linkage_names): New member.
3117 (display_usage, parse_command_line): Support --linkage-names.
3118 * tools/bisym.cc (show_help): Add '\n' at the end of help string
3119 for --demangle. Add --no-absolute-path option.
3120 (parse_command_line): Support --no-absolute-path.
3121 (main): Adjust for symbol (versionning) support. Consider that
3122 the program successfully completed even when the symbol wasn't
3123 found. Support --no-absolute-path.
3124 * tests/data/test-lookup-syms/test0-report.txt: New.
3125 * tests/data/test-lookup-syms/test01-report.txt: New.
3126 * tests/data/test-lookup-syms/test02-report.txt: New.
3127 * tests/data/test-read-dwarf/test0.abi: Adjust.
3128 * tests/data/test-read-dwarf/test1.abi: Adjust.
3129 * tests/data/test-diff-dwarf/test7-report.txt: Adjust.
3130 * tests/data/test-diff-filter/test10-report.txt: Adjust.
3131 * tests/data/test-diff-filter/test12-report.txt: Adjust.
3132 * tests/data/test-lookup-syms/test1-[123]-report.txt: New.
3133 * tests/data/test-lookup-syms/test1.c: New.
3134 * tests/data/test-lookup-syms/test1.version-script: New.
3135 * tests/test-lookup-syms.cc: Adjust for new tests.
3136 * test/Makefile.am: Adjust makefile.
3137
31382014-05-07 Dodji Seketeli <dodji@redhat.com>
3139
3140 Rename decl_base::get_mangled_name into decl_base::get_linkage_name
3141 * include/abg-ir.h (decl_base::get_linkage_name): Renamed
3142 decl_base::get_mangled_name into this.
3143 * src/abg-comparison.cc
3144 (class_diff::ensure_lookup_tables_populated)
3145 (function_decl_diff::report, type_decl_diff::report)
3146 (corpus_diff::priv::ensure_lookup_tables_populated)
3147 (corpus_diff::report, compute_diff): Adjust.
3148 * src/abg-corpus.cc ({var_comp, func_comp}::operator()): Likewise.
3149 (corpus::priv::build_symbol_table): Likewise.
3150 * src/abg-dwarf-reader.cc (die_linkage_name): Renamed
3151 die_mangled_name into this.
3152 (die_loc_and_name, build_translation_unit_and_add_to_ir)
3153 (build_namespace_decl_and_add_to_ir, build_type_decl)
3154 (build_enum_type, build_class_type_and_add_to_ir)
3155 (build_typedef_type, build_var_decl, build_function_decl, ): Adjust.
3156 * src/abg-hash.cc (decl_base::hash::operator()): Likewise.
3157 * src/abg-ir.cc (decl_base::priv::linkage_name_): Renamed
3158 decl_base::priv::mangled_name_ into this.
3159 (decl_base::priv::priv, decl_base::{decl_base, operator==})
3160 (get_linkage_name, typedef_decl::typedef_decl, var_decl::var_decl)
3161 (function_decl::function_decl, class_decl::base_spec::base_spec)
3162 (class_decl::method_decl::method_decl): Adjust.
3163 (decl_base::{g,s}et_linkage_name): Renamed
3164 decl_base::{g,s}et_mangled_name into this.
3165 * src/abg-writer.cc (write_decl, write_typedef_decl)
3166 (write_var_decl, write_function_decl, dump): Adjust.
3167
31682014-04-21 Dodji Seketeli <dodji@redhat.com>
3169
3170 Drop symbols not global in a symtab from corpus symtab
3171 * src/abg-corpus.cc (corpus_priv::build_symbol_table): If a
3172 function or variable symbol is not public (global or weak) and
3173 present in an elf symbol table, drop it from the corpus symbol
3174 table. As a result functions are variables (not present in the
3175 elf symbol tables) that we were previously taking in account are
3176 not dropped on the floor, leading to much less noise.
3177 * tests/data/test-diff-dwarf/test0-v0.cc: Update to avoid
3178 generating inline functions.
3179 * tests/data/test-diff-dwarf/test0-v0.o: Likewise.
3180 * tests/data/test-diff-dwarf/test0-v1.cc: Likewise.
3181 * tests/data/test-diff-dwarf/test0-v1.o: Likewise.
3182 * tests/data/test-diff-dwarf/test7-v0.o: Likewise.
3183 * tests/data/test-diff-dwarf/test7-v1.cc: Likewise.
3184 * tests/data/test-diff-dwarf/test7-v1.o: Likewise.
3185 * tests/data/test-diff-dwarf/test8-v0.cc: Likewise.
3186 * tests/data/test-diff-dwarf/test8-v0.o: Likewise.
3187 * tests/data/test-diff-dwarf/test8-v1.cc: Likewise.
3188 * tests/data/test-diff-dwarf/test8-v1.o: Likewise.
3189 * tests/data/test-diff-filter/test0-v0.cc: Likewise.
3190 * tests/data/test-diff-filter/test0-v0.o: Likewise.
3191 * tests/data/test-diff-filter/test0-v1.cc: Likewise.
3192 * tests/data/test-diff-filter/test0-v1.o: Likewise.
3193 * tests/data/test-diff-filter/test10-v0.cc: Likewise.
3194 * tests/data/test-diff-filter/test10-v0.o: Likewise.
3195 * tests/data/test-diff-filter/test10-report.txt: Likewise.
3196 * tests/data/test-diff-filter/test10-v1.o: Likewise.
3197 * tests/data/test-diff-filter/test13-v0.cc: Likewise.
3198 * tests/data/test-diff-filter/test13-v0.o: Likewise.
3199 * tests/data/test-diff-filter/test13-v1.cc: Likewise.
3200 * tests/data/test-diff-filter/test13-v1.o: Likewise.
3201 * tests/data/test-diff-filter/test2-v0.cc: Likewise.
3202 * tests/data/test-diff-filter/test2-v0.o: Likewise.
3203 * tests/data/test-diff-filter/test2-v1.cc: Likewise.
3204 * tests/data/test-diff-filter/test2-v1.o: Likewise.
3205 * tests/data/test-diff-filter/test4-v0.cc: Likewise.
3206 * tests/data/test-diff-filter/test4-v0.o: Likewise.
3207 * tests/data/test-diff-filter/test4-v1.cc: Likewise.
3208 * tests/data/test-diff-filter/test4-v1.o: Likewise.
3209 * tests/data/test-diff-filter/test9-v0.o: Likewise.
3210 * tests/data/test-diff-filter/test9-v1.cc: Likewise.
3211 * tests/data/test-diff-filter/test9-v1.o: Likewise.
3212
32132014-04-21 Dodji Seketeli <dodji@redhat.com>
3214
3215 Fix mangled name setting for static data members from DWARF
3216 * src/abg-dwarf-reader.cc (build_var_decl): Support adding
3217 properties to an existing var_decl. For now just add mangled
3218 name.
3219 (build_ir_node_from_die): Accept DW_TAG_member too. This helps
3220 for when this function is used to add additional properties to an
3221 existing DW_TAG_member representing a static data member. Then,
3222 use build_var_decl to really add the value of the additional
3223 mangled name property.
3224
32252014-04-21 Dodji Seketeli <dodji@redhat.com>
3226
3227 Always show pretty representation of variables in report
3228 * src/abg-comparison.cc (corpus_diff::report): Display the pretty
3229 representation of the variable, no matter what.
3230
32312014-04-21 Dodji Seketeli <dodji@redhat.com>
3232
3233 Set "is_in_public_symbol_table" property for vars & fns
3234 * src/abg-dwarf-reader.cc (build_var_decl, build_function_decl):
3235 Set the "is_in_public_symbol_table" property for the variable or
3236 function decl.
3237
32382014-04-21 Dodji Seketeli <dodji@redhat.com>
3239
3240 Support symbol lookups from ELF
3241 * include/abg-dwarf-reader.h (symbol_type, symbol_binding): New
3242 enums.
3243 (operator<<): Declare new overloads for the new enums above.
3244 (lookup_symbol_from_elf, lookup_public_function_symbol_from_elf):
3245 Declare new entry points.
3246 * src/abg-dwarf-reader.cc (lookup_symbol_from_elf)
3247 (lookup_public_function_symbol_from_elf)
3248 (lookup_public_variable_symbol_from_elf): Define new static
3249 functions.
3250 (read_context::elf_{module_, handle}_): New data members.
3251 (read_context::{elf_module, elf_handle}): New accessors.
3252 (read_context::load_debug_info): Store the elf module into
3253 read_context::_elf_module_. Adjust.
3254 (read_context::{lookup_symbol_from_elf,
3255 lookup_public_function_symbol_from_elf,
3256 lookup_public_variable_symbol_from_elf}): New member functions.
3257 (lookup_symbol_from_elf, lookup_public_function_symbol_from_elf)
3258 (operator<<): Define public entry points.
3259 * tools/bisym.cc: New tool to lookup a symbol in an elf file.
3260 * tools/Makefile.am: Add the bisym.cc source file to the
3261 distribution and arrange to compile it into a 'bisym' executable.
3262 * tests/test-lookup-syms.cc: New test harness.
3263 * tests/data/test-lookup-syms/test0-report.txt: New test input
3264 for the harness above.
3265 * tests/data/test-lookup-syms/test0.cc: Likewise.
3266 * tests/data/test-lookup-syms/test0.o: Likewise
3267 * tests/data/test-lookup-syms/test01-report.txt: Likewise.
3268 * tests/data/test-lookup-syms/test02-report.txt: Likewise.
3269 * tests/Makefile.am: Build the new runtestlookupsyms test and add
3270 the new files to the distribution.
3271
32722014-04-21 Dodji Seketeli <dodji@redhat.com>
3273
3274 Add corpus::{s,g}et_origin accessors
3275 * include/abg-corpus.h (enum corpus::origin): New enum.
3276 (corpus::{g,s}et_origin): New accessors.
3277 * src/abg-corpus.cc (corpus::priv::origin): New data member.
3278 (corpus::priv::is_symbol_table_built): Move this up.
3279 (corpus::priv::priv): Adjust.
3280 (corpus::{g,s}et_origin): Define accessors.
3281 * src/abg-dwarf-reader.cc (read_corpus_from_elf): Set the corpus
3282 origin. Also set the path. Oops.
3283 * src/abg-reader.cc (read_corpus_from_input)
3284 (read_corpus_from_archive): Set the corpus origin.
3285
32862014-04-21 Dodji Seketeli <dodji@redhat.com>
3287
3288 Add a get_linkage_name function.
3289 * include/abg-fwd.h (is_at_global_scope): Declare a new overload.
3290 (get_linkage_name): Declare ...
3291 * src/abg-ir.cc (get_linkage_name): ... these new entry points.
3292 (is_at_global_scope): Define these new overloads useful for the
3293 new get_linkage_name.
3294
32952014-04-21 Dodji Seketeli <dodji@redhat.com>
3296
3297 Pimplify decl_base and add decl_base::{s,g}et_is_in_public_symbol_table
3298 * include/abg-ir.h (struct decl_base::priv): New pimpl type.
3299 (decl_base::priv_): New pimpl.
3300 (decl_base::{hashing_started, peek_hash_value,
3301 peek_qualified_name, set_qualified_name}): Declare new protected
3302 methods.
3303 (decl_base::{get_context_rel, set_qualified_name, get_location,
3304 set_location, set_name, set_mangled_name, get_visibility,
3305 set_visibility}): Move these out-of-line.
3306 (decl_base::{g,s}et_is_public_symbol_table):
3307 (class_decl::hashing_started): Remove this as we now have
3308 decl_base::hashing_started.
3309 (decl_base::{hash_, hashing_started, location_, context_, name_,
3310 qualified_parent_name_, qualified_name_, mangled_name_,
3311 visibility_}): Move all these members into the new ...
3312 * src/abg-ir.cc (struct decl_base::priv): ... pimpl type.
3313 (decl_base::decl_base): Move these out-of-line here. Adjust the
3314 other overloads.
3315 (decl_base::{hashing_started, peek_hash_value,
3316 peek_qualified_name, set_qualified_name}): Define these new
3317 protected methods.
3318 (decl_base::{get_context_rel, set_context_rel, get_location,
3319 set_location, set_name, get_mangled_name, set_mangled_name,
3320 get_visibility, set_visibility}): Define these out-of-line here.
3321 (decl_base::{get_hash, set_hash, get_scope,
3322 get_qualified_parent_name, get_qualified_name, operator==,
3323 set_scope}): Adjust.
3324 (qualified_type_def::get_qualified_name): Likewise.
3325 (pointer_type_def::get_qualified_name): Likewise.
3326 (reference_type_def::get_qualified_name): Likewise.
3327 (var_decl::set_scope): Likewise.
3328 (class_decl::base_spec): Likewise.
3329 (class_decl::method_decl::set_scope): Likewise.
3330 (decl_base::{g,s}et_is_in_public_symbol_table): Define new accessors.
3331 * src/abg-hash.cc ({decl_base, type_decl, scope_decl,
3332 scope_type_decl, qualified_type_def, pointer_type_def,
3333 reference_type_def, enum_type_decl, typedef_decl, var_decl,
3334 class_decl}::hash::operator): Adjust.
3335
33362014-04-17 Dodji Seketeli <dodji@redhat.com>
3337
3338 Categorize base class changes as SIZE_OR_OFFSET_CHANGE_CATEGORY
3339 * include/abg-comparison.h (class_diff::{deleted, inserted,
3340 changed}_bases): Declare new member functions ...
3341 * src/abg-comparison.cc ((class_diff::{deleted, inserted,
3342 changed}_bases)): ... and define them.
3343 * src/abg-comp-filter.cc (base_classes_added_or_removed): Define
3344 new static functions.
3345 (harmless_filter): Categorize base classes added or removed.
3346 * tests/data/test-diff-dwarf/test8-report.txt: New test input.
3347 * tests/data/test-diff-dwarf/test8-v0.cc: Likewise.
3348 * tests/data/test-diff-dwarf/test8-v0.o: Likewise.
3349 * tests/data/test-diff-dwarf/test8-v1.cc: Likewise.
3350 * tests/data/test-diff-dwarf/test8-v1.o: Likewise.
3351 * tests/data/test-diff-filter/test13-report.txt: New test input.
3352 * tests/data/test-diff-filter/test13-v0.cc: Likewise.
3353 * tests/data/test-diff-filter/test13-v0.o: Likewise.
3354 * tests/data/test-diff-filter/test13-v1.cc: Likewise.
3355 * tests/data/test-diff-filter/test13-v1.o: Likewise.
3356 * tests/Makefile.am: Add the new files above to the source distribution.
3357 * tests/test-diff-dwarf.cc: Use the new relevant input above to
3358 run more tests.
3359 * tests/test-diff-filter.cc: Likewise.
3360
33612014-04-17 Dodji Seketeli <dodji@redhat.com>
3362
3363 Fix class diff reporting issues for base classes
3364 * src/abg-comparison.cc (class_diff::report): For base classes,
3365 report their pretty representation. Do not try to report a the
3366 diff of a changed base class that got filtered out. Avoid
3367 emitting too many vertical white spaces.
3368
33692014-04-17 Dodji Seketeli <dodji@redhat.com>
3370
3371 Simplify SIZE_OR_OFFSET_CHANGE_CATEGORY categorizing
3372 * src/abg-comp-filter.cc (harmful_filter::visit): Now that
3373 type_size_changed is correctly geared to not be fulled by
3374 decl-only classes, there is no need for its caller to handle that
3375 case. And data_member_offset_changed ain't affected by decl-only
3376 classes anyway. So the code is now much simpler.
3377
33782014-04-17 Dodji Seketeli <dodji@redhat.com>
3379
3380 Fix API doc for static_data_member_type_size_changed
3381 * src/abg-comp-filter.cc (static_data_member_type_size_changed):
3382 Fix API doc comment.
3383
33842014-04-17 Dodji Seketeli <dodji@redhat.com>
3385
3386 Don't blindly drop DIEs defined in the scope of a function
3387 * src/abg-dwarf-reader.cc (get_scope_for_die): Do not drop a DIE
3388 on the floor just because it is in the scope of a function. We
3389 were dropping a function parameter because its type is a typedef
3390 defined right before the parameter, in the scope of the function.
3391 Urgh. So with this change, that function parameter is not dropped
3392 anymore. I have seen that happening in a DWARF generated by GCC
3393 4.7.1 on libstdc++.so. Hard to come up with a regression test
3394 case for this one.
3395
33962014-04-17 Dodji Seketeli <dodji@redhat.com>
3397
3398 Useless code killing
3399 * src/abg-comparison.cc (decls_equal::operator()(const decls_type,
3400 const decls_type)): Kill dead code. Note that there is a proper
3401 equality operator for decl_base_sptr already.
3402
34032014-04-17 Dodji Seketeli <dodji@redhat.com>
3404
3405 File static data member changes in STATIC_DATA_MEMBER_CHANGE_CATEGORY
3406 * include/abg-comparison.h
3407 (diff_category::STATIC_DATA_MEMBER_CHANGE_CATEGORY): New category.
3408 (diff_category::EVERYTHING_CATEGORY): Update
3409 * src/abg-comp-filter.cc (static_data_member_type_size_changed)
3410 (static_data_member_added_or_removed): Define new static
3411 functions.
3412 (harmless_filter::visit): Categorize changes to static data
3413 members as STATIC_DATA_MEMBER_CHANGE_CATEGORY.
3414 * tools/bidiff.cc (set_diff_context_from_opts):
3415 STATIC_DATA_MEMBER_CHANGE_CATEGORY is falls into the harmless
3416 group.
3417 * tests/data/test-diff-filter/test12-report.txt: New test input.
3418 * tests/data/test-diff-filter/test12-v0.cc: Likewise.
3419 * tests/data/test-diff-filter/test12-v0.o: Likewise.
3420 * tests/data/test-diff-filter/test12-v1.cc: Likewise.
3421 * tests/data/test-diff-filter/test12-v1.o: Likewise.
3422 * tools/bidiff.cc: Run this test with the additional input data
3423 above.
3424 * tests/Makefile.am: Adjust.
3425
34262014-04-17 Dodji Seketeli <dodji@redhat.com>
3427
3428 Fix typo in comments
3429 * include/abg-comparison.h
3430 (diff_category::NON_VIRT_MEM_FUN_CHANGE_CATEGORY): Fix typo in
3431 comments.
3432
34332014-04-17 Dodji Seketeli <dodji@redhat.com>
3434
3435 Only non-static data member changes are SIZE_OR_OFFSET_CHANGE_CATEGORY
3436 * src/abg-comp-filter.cc
3437 (non_static_data_member_type_size_changed): Renamed
3438 data_member_offset_changed into this. Make sure the test detects
3439 changes on *non-static* data members only.
3440 (non_static_data_member_added_or_removed): Likewise for
3441 data_member_offset_changed that got renamed into this.
3442 (harmful_filter::visit): Adjust.
3443
34442014-04-17 Dodji Seketeli <dodji@redhat.com>
3445
3446 Fix comments in categorization code
3447 * src/abg-comp-filter.cc (data_member_added_or_removed): Fix
3448 comments.
3449
34502014-04-16 Dodji Seketeli <dodji@redhat.com>
3451
3452 Really detect static-ness of data members. Oops.
3453 * src/abg-dwarf-reader.cc (build_class_type_and_add_to_ir): Let's
3454 consider that a data member being not laid out (i.e, not having a
3455 data_member_location) is is a static data member. Otherwise, we
3456 were not detecting static data members at all. Well we were only
3457 inferring their presence from seeing the static variable
3458 definition later on. That means we were missing most of the
3459 static variables. Woops.
3460 * src/abg-comparison.cc
3461 (corpus_diff::priv::ensure_lookup_tables_populated): Now that we
3462 are really seeing static data members, let's be prepare to the
3463 fact that we can the same static data member being declared
3464 several times in a corpus.
3465 * tests/data/test-diff-dwarf/test7-report.txt: New test input file.
3466 * tests/data/test-diff-dwarf/test7-v0.cc: Likewise.
3467 * tests/data/test-diff-dwarf/test7-v0.o: Likewise.
3468 * tests/data/test-diff-dwarf/test7-v1.cc: Likewise.
3469 * tests/data/test-diff-dwarf/test7-v1.o: Likewise.
3470 * tests/test-diff-dwarf.cc: Update this to consume the new test
3471 input files.
3472 * tests/Makefile.am: Update this to add the missing test files to
3473 the source distribution.
3474
34752014-04-16 Dodji Seketeli <dodji@redhat.com>
3476
3477 Add dumping routines for declaration location
3478 * include/abg-fwd.h (get_global_scope()): New overload for const
3479 decl_base&. Move the other overloads up in the file.
3480 (get_translation_unit): Add an overload for decl_base&. Constify
3481 the others.
3482 (dump_decl_location): Declare new functions.
3483 * src/abg-ir.cc (get_global_scope): Define the overload for const
3484 decl_base&. Write the other overloads in terms of this one.
3485 (get_translation_unit): Likewise, define the overload for const
3486 decl_base&. Write the other overloads in terms of this one.
3487 (dump_decl_location): Define these new overloads.
3488
34892014-04-16 Dodji Seketeli <dodji@redhat.com>
3490
3491 Fix dumping function to make them use generic ostream
3492 * src/abg-writer.cc (dump(const decl_base_sptr, std::ostream&)):
3493 Do not dump the content to cerr here. Rather dump to the output
3494 stream given in parameter. Oops.
3495 (dump(const translation_unit&, std::ostream&)): Likewise.
3496
34972014-04-16 Dodji Seketeli <dodji@redhat.com>
3498
3499 Misc style fixes
3500 * src/abg-ir.cc (get_translation_unit): Remove useless vertical
3501 white space.
3502 (is_global_scope): Add missing API doc.
3503
35042014-04-16 Dodji Seketeli <dodji@redhat.com>
3505
3506 A virt mem fn deleted and added to the same offset is not harmful
3507 * src/abg-comp-filter.cc (has_virtual_mem_fn_change): A virtual
3508 member that gets deleted and added back again to the same vtable
3509 offset is not considered as being a virtual member function change
3510 suitable for VIRTUAL_MEMBER_CHANGE_CATEGORY. Likewise for a
3511 function sub-type change not involving a change in the vtable
3512 offset.
3513
35142014-04-16 Dodji Seketeli <dodji@redhat.com>
3515
3516 Do not categorize size/offset changes when a decl-only class is involved
3517 * src/abg-comp-filter.cc (there_is_a_decl_only_class)
3518 (diff_involves_decl_only_class): New static functions.
3519 (type_size_changed, data_member_added_or_removed)
3520 (has_virtual_mem_fn_change, has_non_virtual_mem_fn_change): Bail
3521 out if one of the types involved is a decl-only class.
3522
35232014-04-16 Dodji Seketeli <dodji@redhat.com>
3524
3525 Work around "mangled name vanishing from one version of mem fn decl" bug
3526 * src/abg-comparison.cc
3527 (class_diff::ensure_lookup_tables_populated): If the first version
3528 of the member function decl doesn't have a mangled name while the
3529 second has it, try the lookups using the pretty representation of
3530 the function.
3531
35322014-04-16 Dodji Seketeli <dodji@redhat.com>
3533
3534 Do not try to represent the offset for a static data member
3535 * src/abg-comparison.cc (represent_data_member(var_decl_sptr,
3536 ostream&)): If the data member is static, do not try to represent
3537 its offset.
3538
35392014-04-16 Dodji Seketeli <dodji@redhat.com>
3540
3541 A static data member shouldn't be checked for having been laid out
3542 * src/abg-comparison.cc (represent_data_member(var_decl_sptr,
3543 ostream&)): If the data member is static do not check for it
3544 having been laid out.
3545
35462014-04-16 Dodji Seketeli <dodji@redhat.com>
3547
3548 Prefix pretty representation of static data members with 'static'
3549 * src/abg-ir.cc (var_decl::get_pretty_representation): Prefix
3550 pretty representation of static data members with 'static'.
3551
35522014-04-16 Dodji Seketeli <dodji@redhat.com>
3553
3554 Provide a robust way of getting the size of a qualified type
3555 * include/abg-ir.h (qualified_type_def::get_size_in_bits): Declare
3556 new member function ...
3557 * src/abg-ir.cc (qualified_type_def::get_size_in_bits): ... and
3558 define it. Keep in mind that some times the size of the
3559 underlying type can change between the moment the qualified type
3560 is created and the end of its life time. That is because a
3561 subsequent DIE (from DWARF) can alter the size of the underlying
3562 type. This overload allows the user to always query the size of
3563 the underlying type and keep the size of the qualified type in
3564 sync with it.
3565
35662014-04-16 Dodji Seketeli <dodji@redhat.com>
3567
3568 Add an assert to the pointer diff reporting code
3569 * src/abg-comparison.cc (pointer_diff::report): If the pointer
3570 diff node is deemed to be reported then the underlying diff node
3571 should be reported as well.
3572
35732014-04-16 Dodji Seketeli <dodji@redhat.com>
3574
3575 Little style adjustment in diff node categorization code
3576 * src/abg-comp-filter.cc (harmful_filter::visit): Factorize the
3577 categorization into SIZE_OR_OFFSET_CHANGE_CATEGORY for data member
3578 adding or removal and for data member type size change.
3579
35802014-04-15 Dodji Seketeli <dodji@redhat.com>
3581
3582 If a diff node is in NO_CHANGE_CATEGORY do not report it anymore
3583 * src/abg-comparison.cc (diff::is_filtered_out): Now that we seem
3584 to be flagging every changes to a class into a category, we do not
3585 need to dive into reporting a diff not that is categorized as
3586 NO_CHANGE_CATEGORY anymore. So let's have the implementation that
3587 one would expect for this function.
3588
35892014-04-15 Dodji Seketeli <dodji@redhat.com>
3590
3591 Categorize changes to virt mem fncts as VIRTUAL_MEMBER_CHANGE_CATEGORY
3592 * src/abg-comp-filter.cc (has_virtual_mem_fn_change): New static
3593 function.
3594 (harmful_filter): Categorize changes to virtual member functions
3595 into VIRTUAL_MEMBER_CHANGE_CATEGORY.
3596 * src/abg-comparison.cc
3597 (class_diff::priv::count_filtered_changed_dm): Move this up, right
3598 after class_diff::priv::count_filtered_subtype_changed_dm.
3599 (SKIP_MEM_FN_IF_VIRTUALITY_DISALLOWED): New macro.
3600 (class_diff::priv::count_filtered_{changed, inserted,
3601 deleted}_mem_fns): Modify these to properly take member function
3602 virtual-ness in account.
3603
36042014-04-15 Dodji Seketeli <dodji@redhat.com>
3605
3606 Do not hash non-virtual member functions when hashing a class
3607 * src/abg-hash.cc (class_decl::hash::operator): Do not hash
3608 non-virtual member functions.
3609
36102014-04-15 Dodji Seketeli <dodji@redhat.com>
3611
3612 Fix a missing new line in the reports
3613 * src/abg-comparison.cc (represent(class_decl::method_decl_sptr,
3614 ostream&)): Add a missing new line.
3615 * tests/data/test-bidiff/test-struct1-report.txt: Adjust.
3616
36172014-04-14 Dodji Seketeli <dodji@redhat.com>
3618
3619 Add more pretty printing facilities
3620 * include/abg-comparison.h (get_pretty_representation(diff*)):
3621 Declare new function.
3622 * include/abg-fwd.h (get_pretty_representation): Declare functions
3623 for decl_base*, type_base*, decl_base_sptr and type_base_sptr.
3624 * src/abg-comparison.cc (get_pretty_representation): Implement
3625 this for diff*.
3626 * src/abg-ir.cc (get_pretty_representation): Define
3627 implementations for decl_base*, type_base*, decl_base_sptr and
3628 type_base_sptr.
3629
36302014-04-14 Dodji Seketeli <dodji@redhat.com>
3631
3632 Don't compare non-virtual member functions in class comparison
3633 * src/abg-comparison.cc
3634 (class_diff::ensure_lookup_tables_populated): Use the virtual
3635 member functions here, not the member functions in general.
3636 (compute_diff): Consider virtual member functions only, not
3637 non-virtual ones.
3638 * src/abg-ir.cc (class_decl::operator==): Do not compare
3639 non-virtual member functions. Only compare virtual member
3640 functions.
3641 * tests/data/test-bidiff/test-struct1-report.txt: New test input.
3642 * tests/data/test-diff-dwarf/test0-report.txt: New test input.
3643 * tests/data/test-diff-filter/test0-report.txt: New test input.
3644 * tests/data/test-diff-filter/test01-report.txt: New test input.
3645 * tests/data/test-diff-filter/test10-report.txt: New test input.
3646 * tests/data/test-diff-filter/test11-report.txt: New test input.
3647 * tests/data/test-diff-filter/test2-report.txt: New test input.
3648 * tests/data/test-diff-filter/test9-report.txt: New test input.
3649
36502014-04-14 Dodji Seketeli <dodji@redhat.com>
3651
3652 Recognize virtual member functions better and store them appart
3653 * include/abg-fwd.h (set_member_function_is_virtual): Declare new
3654 function.
3655 * include/abg-ir.h (class class_decl): Declare
3656 set_member_function_is_virtual and member_function_is_virtual as
3657 friends of class_decl.
3658 (class_decl::add_member_function): Take an is_virtual flag.
3659 (class_decl::get_num_virtual_functions): Remove.
3660 (class_decl::get_virtual_mem_fns): New member function.
3661 (mem_fn_context_rel::is_virtual_): New member.
3662 (mem_fn_context_rel::mem_fn_context_rel): Adjust to initialize the
3663 new is_virtual_ member.
3664 (mem_fn_context_rel::is_virtual): New member functions.
3665 * src/abg-comparison.cc (represent): Adjust.
3666 * src/abg-dwarf-reader.cc (build_class_type_and_add_to_ir): Adjust.
3667 * src/abg-ir.cc (member_function_is_virtual): Change this to use
3668 mem_fn_context_rel::is_virtual.
3669 (set_member_function_is_virtual): Define this new function.
3670 (class_decl::priv::virtual_mem_fns_): New member to hold virtual
3671 member functions.
3672 (class_decl::get_virtual_mem_fns): Implement this member function.
3673 (class_decl::get_num_virtual_functions): Remove.
3674 (class_decl::add_member_function): Take a new is_virtual flag.
3675 Add virtual member functions to
3676 class_decl::priv::virtual_mem_fns_.
3677 * src/abg-reader.cc (build_class_decl): Adjust.
3678
36792014-04-13 Dodji Seketeli <dodji@redhat.com>
3680
3681 Filter non-virtual member fns insertions/deletions from class changes
3682 * include/abg-fwd.h (member_function_is_virtual): Declare new
3683 function.
3684 * include/abg-comparison.h
3685 (diff_category::{NON_VIRT_MEM_FUN_CHANGE_CATEGORY,
3686 VIRTUAL_MEMBER_CHANGE_CATEGORY}): New enumerators.
3687 (diff_category::EVERYTHING_CATEGORY): Adjust.
3688 (class_diff::{changed, deleted, inserted}_member_fns): Declare new
3689 member functions.
3690 * src/abg-comp-filter.cc (data_member_added_or_removed): Add
3691 missing comments.
3692 (has_non_virtual_mem_fn_change): New static predicate function.
3693 (harmless_filter::visit): Categorize non-virtual member function
3694 changes in a diff into NON_VIRT_MEM_FUN_CHANGE_CATEGORY.
3695 * src/abg-comparison.cc
3696 (TRAVERSE_MEM_FN_DIFF_NODE_AND_PROPAGATE_CATEGORY): New macro.
3697 (report_mem_header): Count filtered functions for added/deleted
3698 functions as well.
3699 (class_diff::priv::count_filtered_changed_mem_fns): Renamed
3700 priv::count_filtered_member_functions into this. Filter out
3701 changes to non-virtual member functions here.
3702 (class_diff::priv::count_filtered_{inserted, deleted}_mem_fns):
3703 New member functions.
3704 (class_diff::{deleted, inserted, changed}_member_fns): Define new
3705 member functions.
3706 (class_diff::report): Adjust count for filtered inserted/deleted
3707 member functions. Do not report NON_VIRT_MEM_FUN_CHANGE_CATEGORY
3708 if it's disallowed.
3709 (class_diff::traverse): Propagate only
3710 VIRTUAL_MEMBER_CHANGE_CATEGORY from member functions to their
3711 enclosing class.
3712 * src/abg-ir.cc (member_function_is_virtual): Define new
3713 functions.
3714 * tools/bidiff.cc (set_diff_context_from_opts): Adjust to add
3715 NON_VIRT_MEM_FUN_CHANGE_CATEGORY into the harmless group and
3716 VIRTUAL_MEMBER_CHANGE_CATEGORY into the harmful one.
3717 * tests/data/test-diff-filter/test0-report.txt: New test input.
3718 * tests/data/test-diff-filter/test10-report.txt: Likewise.
3719 * tests/data/test-diff-filter/test10-v0.cc: Likewise.
3720 * tests/data/test-diff-filter/test10-v0.o: Likewise.
3721 * tests/data/test-diff-filter/test10-v1.cc: Likewise.
3722 * tests/data/test-diff-filter/test10-v1.o: Likewise.
3723 * tests/data/test-diff-filter/test11-report.txt: Likewise.
3724 * tests/data/test-diff-filter/test11-v0.cc: Likewise.
3725 * tests/data/test-diff-filter/test11-v0.o: Likewise.
3726 * tests/data/test-diff-filter/test11-v1.cc: Likewise.
3727 * tests/data/test-diff-filter/test11-v1.o: Likewise.
3728 * tests/data/test-diff-filter/test2-report.txt: Likewise.
3729 * tests/data/test-diff-filter/test9-report.txt: Likewise.
3730 * tests/data/test-diff-filter/test9-v0.cc: Likewise.
3731 * tests/data/test-diff-filter/test9-v0.o: Likewise.
3732 * tests/data/test-diff-filter/test9-v1.cc: Likewise.
3733 * tests/data/test-diff-filter/test9-v1.o: Likewise.
3734 * tests/test-diff-filter.cc: Consume the test input above to run
3735 more tests.
3736
37372014-04-13 Dodji Seketeli <dodji@redhat.com>
3738
3739 Make class_decl pimpl and harden comparison infloop prevention
3740 * include/abg-ir.h (class_decl::{priv}): New private data member.
3741 (class_decl::{get_is_declaration_only, set_is_declaration_only,
3742 is_struct, get_definition_of_declaration, get_earlier_declaration,
3743 add_base_specifier, get_base_specifiers, get_member_types,
3744 get_data_members, get_member_functions,
3745 get_member_function_templates, get_member_class_templates}): Move
3746 these methods out-of-line.
3747 (class_decl::{comparison_started_,
3748 declaration_,is_declaration_only_, definition_of_declaration,
3749 is_struct_, bases_, member_types_, data_members_,
3750 member_functions_, member_function_template,
3751 member_class_templates_}): Move these data members into the pimpl
3752 in ...
3753 * src/abg-ir.cc
3754 (class_decl::priv::{declaration_,is_declaration_only_,
3755 definition_of_declaration, is_struct_, bases_, member_types_,
3756 data_members_, member_functions_, member_function_template,
3757 member_class_templates_}): ... here.
3758 (class_decl::priv::classes_being_compared_): New data member.
3759 (class_decl::priv::priv): Initialize the data members.
3760 (class_decl::priv::{mark_as_being_compared,
3761 unmark_as_being_compared, comparison_started): New methods.
3762 (class_decl::{get_is_declaration_only, set_is_declaration_only,
3763 is_struct, get_definition_of_declaration, add_base_specifier,
3764 get_base_specifiers, get_member_types, get_data_members,
3765 get_member_functions, get_member_function_templates,
3766 get_member_class_templates}): Move these out-of-line in here.
3767 (class_decl::{class_decl, set_definition_of_declaration,
3768 set_earlier_declaration, insert_member_type, add_member_type,
3769 add_data_member, add_member_function,
3770 add_member_function_template, add_member_class_template,
3771 has_no_base_nor_member}): Adjust.
3772 (class_decl::operator==): Harden inf-loop prevention during class
3773 comparison using the new priv::mark/unmark_as_being_compared()
3774 functions. Now comparison of a class really compares member
3775 functions again. And it is *slooow*. I should probably change
3776 this to compare only virtual member functions. But at least this
3777 should be correct and robust for now.
3778 * tests/data/test-diff-filter/test0-report.txt: Adjust.
3779 * test01-report.txt: Adjust.
3780
37812014-04-11 Dodji Seketeli <dodji@redhat.com>
3782
3783 Remove the parent member of the diff node
3784 * include/abg-comparison.h (diff::parent_): Remove.
3785 (diff::diff): Adjust.
3786 (diff::{get, set}_parent): Remove.
3787 * src/abg-comp-filter.cc (harmless_filter::visit): Remove category
3788 propagation to the parent.
3789
37902014-04-11 Dodji Seketeli <dodji@redhat.com>
3791
3792 Update the decl_base copy constructor for forgotten members
3793 * src/abg-ir.cc (decl_base::decl_base): Copy forgotten decl_base
3794 members hashing_started_, qualified_parent_name_, qualified_name_.
3795
37962014-04-11 Dodji Seketeli <dodji@redhat.com>
3797
3798 Comment fix in filtering code
3799 * src/abg-comp-filter.cc (harmful_filter::visit): Fix comment
3800 typos.
3801
38022014-04-11 Dodji Seketeli <dodji@redhat.com>
3803
3804 Put data member type size changes in SIZE_OR_OFFSET_CHANGE_CATEGORY
3805 * src/abg-comp-filter.cc (type_size_changed): New overload for
3806 type_base_sptr.
3807 (data_member_type_size_changed): New predicate.
3808 (harmful_filter::visit): Use the new predicate to categorize data
3809 member type size changes into the SIZE_OR_OFFSET_CHANGE_CATEGORY.
3810
38112014-04-11 Dodji Seketeli <dodji@redhat.com>
3812
3813 Represent a removed+added data member at a given offset as changed
3814 * include/abg-fwd.h (get_data_member_offset): Declare new overload for
3815 decl_base_sptr.
3816 * include/abg-comparison.h (unsigned_decl_base_sptr_map)
3817 (unsigned_changed_type_or_decl_map): New typedefs.
3818 * src/abg-ir.cc (get_data_member_offset): Define new overload for decl_base_sptr.
3819 * src/abg-comparison.cc (diff_kind::subtype_change_kind): New
3820 enumerator for a change about a type or sub-type of a member of a
3821 structure/enum.
3822 (report_mem_header): Handle the new enumerator above.
3823 (class_diff::priv::{deleted_dm_by_offset_, inserted_dm_by_offset_,
3824 changed_dm_}): New data members.
3825 (class_diff::priv::subtype_changed_dm_): Renamed
3826 class_diff::priv::changed_data_members_ into this.
3827 (class_diff::priv::subtype_changed_dm): Renamed
3828 class_diff::priv::data_member_has_changed into this. Adjust.
3829 (class_diff::count_filtered_subtype_changed_dm): Renamed
3830 count_filtered_data_members into this. Adjust.
3831 (class_diff::priv::count_filtered_changed_dm): New member
3832 function.
3833 (class_diff::lookup_tables_empty): Adjust.
3834 (class_diff::ensure_lookup_tables_populated): Adjust. Detect when
3835 a data member is deleted and added back to offset N, and be
3836 prepared to present that as a change of data member at offset N.
3837 (class_diff::report): Adjust. Report data members of a given
3838 offset that have changed.
3839 * tests/data/test-diff-dwarf/test6-report.txt: New reference
3840 report for new test input.
3841 * tests/data/test-diff-dwarf/test6-v0.cc: Source code for new test
3842 input binary.
3843 * tests/data/test-diff-dwarf/test6-v0.o: New test input binary.
3844 * tests/data/test-diff-dwarf/test6-v1.cc: Source code for new test
3845 input binary.
3846 * tests/data/test-diff-dwarf/test6-v1.o: New test input binary.
3847 * tests/test-diff-dwarf.cc: Adjust to include the new test inputs above.
3848
38492014-04-11 Dodji Seketeli <dodji@redhat.com>
3850
3851 Unmark class_diff node as being traversed once traversal is finished
3852 * src/abg-comparison.cc (class_diff:traverse): Unmark class_diff
3853 node as being traversed once traversal is finished
3854
38552014-04-11 Dodji Seketeli <dodji@redhat.com>
3856
3857 Do not use the parent diff node link for category propagation
3858 * src/abg-comparison.cc (class_diff::traverse): Use the new
3859 TRAVERSE_MEM_DIFF_NODE_AND_PROPAGATE_CATEGORY macro to propagate
3860 categorization from the children diff nodes to the current one for
3861 bases, data members and member functions.
3862 (scope_diff::traverse): Likewise, use the
3863 TRAVERSE_DIFF_NODE_AND_PROPAGATE_CATEGORY to propagate
3864 categorization from the children diff nodes to the current one.
3865
38662014-04-11 Dodji Seketeli <dodji@redhat.com>
3867
3868 Ensure that each diff node is traversed just once
3869 * include/abg-comparison.cc (pointer_map): New typedef.
3870 (diff_context::{has_diff_for}): New overload for diff*.
3871 (diff_context::{diff_has_been_traversed, mark_diff_as_traversed,
3872 forget_traversed_diffs}): Declare new methods.
3873 * src/abg-comparison.cc (ENSURE_DIFF_NODE_TRAVERSED_ONCE)
3874 (ENSURE_MEM_DIFF_NODE_TRAVERSED_ONCE): Define new macros.
3875 (diff_context::priv::traversed_diff_nodes_): New data member.
3876 (diff_context::has_diff_for): New overload for diff*
3877 (diff_context::{diff_has_been_traversed, mark_diff_as_traversed,
3878 forget_traversed_diffs}): Define new member functions.
3879 (diff_context::maybe_apply_filters): Forget the traversed diffs
3880 before applying a filter.
3881 ({distinct_diff, var_diff, pointer_diff, reference_diff,
3882 qualified_type_diff, enum_diff, class_diff, base_diff, scope_diff,
3883 function_decl_diff, type_decl_diff, typedef_diff,
3884 translation_unit_diff}::traverse): Ensure that the diff node is
3885 traversed only once.
3886
38872014-04-11 Dodji Seketeli <dodji@redhat.com>
3888
3889 Factorize diff sub-tree traversal and category propagation code
3890 * src/abg-comparison.cc
3891 (TRAVERSE_DIFF_NODE_AND_PROPAGATE_CATEGORY)
3892 (TRAVERSE_MEM_DIFF_NODE_AND_PROPAGATE_CATEGORY): New macros.
3893 ({distinct_diff, pointer_diff, reference_diff,
3894 qualified_type_diff, enum_diff, base_diff, function_decl_diff,
3895 typedef_diff}::traverse): Use the new macro above in lieu of the
3896 duplicated sub-tree traversal code in there.
3897
38982014-04-11 Dodji Seketeli <dodji@redhat.com>
3899
3900 Style fixes in the diff nodes traversing code
3901 * src/abg-comparison.cc (TRY_{PRE, PRO}_VISIT, TRY_{PRE,
3902 PRO}_VISIT_CLASS_DIFF, ): Add a white space.
3903
39042014-04-10 Dodji Seketeli <dodji@redhat.com>
3905
3906 Supporting reporting data member name change
3907 * src/abg-comparison.cc (represent): Support reporting data member
3908 name change.
3909
39102014-04-10 Dodji Seketeli <dodji@redhat.com>
3911
3912 Consider added/removed data members as changing size or offset
3913 * src/abg-comp-filter.cc (data_member_added_or_removed): New
3914 static function.
3915 (harmless_filter::visit): Re-organize logic. Categorize data
3916 member addition/removal into SIZE_OR_OFFSET_CHANGE_CATEGORY.
3917
39182014-04-10 Dodji Seketeli <dodji@redhat.com>
3919
3920 Add missing comment
3921 * src/abg-ir.cc (non_type_tparameter::get_hash): Add missing api doc.
3922
39232014-04-09 Dodji Seketeli <dodji@redhat.com>
3924
3925 Fix and add missing hashing through the virtual decl_base::get_hash
3926 * include/abg-ir.h (struct {scope_decl, non_type_tparameter,
3927 type_composition, class_decl}::hash): Declare hashers.
3928 ({scope_decl, var_decl, non_type_tparameter, type_composition,
3929 class_decl}::get_hash): Provide new overloads of the get_hash.
3930 * src/abg-hash.cc ({type_decl, scope_type_decl,
3931 qualified_type_def, pointer_type_def, reference_type_def,
3932 enum_type_decl, typedef_decl, var_decl,
3933 function_decl}::hash::operator()): If the hash is being
3934 calculated, do not use the not-yet fully calculated hash value.
3935 Rather, calculate the hash, cache it and return the value.
3936 ({class_decl, non_type_tparameter}::hash::operator()): Moved the
3937 {class_decl, non_type_tparameter}::hash declaration out of here
3938 and stick it in include/abg-ir.h. Keep the definition of the
3939 hashing operators here though.
3940 (type_composition::hash::operator()): New operator definition.
3941 * src/abg-ir.cc ({scope_decl, var_decl, class_decl,
3942 non_type_tparameter, type_composition}::get_hash): Define new
3943 virtual overload.
3944
39452014-04-08 Dodji Seketeli <dodji@redhat.com>
3946
3947 Fix mis-hashing of base specifiers and function_decl during comparison
3948 * include/abg-ir.h (function_decl::get_hash): Declare new virtual
3949 overload.
3950 * src/abg-hash.cc (class_decl::base_spec::hash::operator()):
3951 Properly hash the base specifier so that it doesn't collide with
3952 hashing a class.
3953 * src/abg-ir.cc (decl_base::get_hash): Abort if we detect a
3954 missing overload for this;
3955 (function_decl::get_hash() const): Implement this missing
3956 overload, allowing using the virtual decl_base::get_hash for
3957 function_decl.
3958
39592014-04-08 Dodji Seketeli <dodji@redhat.com>
3960
3961 Properly place opening quote and add missing closing quote in report
3962 * src/abg-comparison.cc (corpus_diff::report): Move the [{A,D}]
3963 marker before the opening quote. And add a closing quote.
3964 * tests/data/test-diff-dwarf/test0-report.txt: Adjust.
3965 * tests/data/test-diff-filter/test0-report.txt: Adjust.
3966 * tests/data/test-diff-filter/test01-report.txt: Adjust.
3967 * tests/data/test-diff-filter/test2-report.txt: Adjust.
3968
39692014-04-08 Dodji Seketeli <dodji@redhat.com>
3970
3971 Drive-by indentation fix
3972 * src/abg-dwarf-reader.cc (build_ir_node_from_die): Fix
3973 indentation.
3974
39752014-04-08 Dodji Seketeli <dodji@redhat.com>
3976