1 2019-03-27 Dodji Seketeli <dodji@redhat.com>
3 Update NEWS file for 1.6
6 2019-03-27 Dodji Seketeli <dodji@redhat.com>
8 Add missing assignment operators
9 * include/abg-interned-str.h (interned_string::operator=): Define
12 ({location, enum_type_decl::enumerator}::operator=): Declare
14 * src/abg-ir.cc (enum_type_decl::enumerator::operator=): Define
17 2019-03-25 Dodji Seketeli <dodji@redhat.com>
19 Bug 24378 - DW_TAG_subroutine_type as a DIE scope causes infinite loop
20 * src/abg-dwarf-reader.cc (get_scope_die): Look through
21 DW_TAG_subroutine_type to get the scope of a given DIE.
22 * tests/data/Makefile.am: Add the two new files below to source
24 * tests/data/test-read-dwarf/PR24378-fn-is-not-scope.abi: New
25 reference test output.
26 * tests/data/test-read-dwarf/PR24378-fn-is-not-scope.o: New binary
28 * tests/test-read-dwarf.cc (in_out_specs): Add the new test input
31 2019-03-22 Dodji Seketeli <dodji@redhat.com>
34 * src/abg-dwarf-reader.cc (build_function_type): Cleanup
35 indentation and comments.
37 2019-03-21 Dodji Seketeli <dodji@redhat.com>
39 Better pointer name equality optimization in DIE de-duplication code
40 * src/abg-dwarf-reader.cc
41 (die_is_pointer_reference_or_typedef_type)
42 (die_peel_pointer_and_typedef): Define new static functions.
43 (compare_dies_string_attribute_value): Turn this function into a
45 (compare_dies_cu_decl_file): Make this function compare the cu
46 decl file name of the leaf type of the pointer, not just the one
47 of the pointer itself.
48 (compare_as_decl_dies): Compare the DWARF tags too.
49 (compare_dies): Simplify logic.
51 2019-03-21 Dodji Seketeli <dodji@redhat.com>
53 Add ir::{lookup_data_member, get_function_parameter}
54 * include/abg-ir.h (lookup_data_member, get_function_parameter):
55 Declare new functions.
56 * src/abg-ir.cc (lookup_data_member, get_function_parameter):
59 2019-03-21 Dodji Seketeli <dodji@redhat.com>
61 Better detection of void* to something* change
62 * include/abg-ir.h (is_void_type): Add a new overload that takes
64 * src/abg-ir.cc (is_void_type): Define the new overload that takes
66 (is_void_pointer_type): Look through typedefs in
69 2019-03-21 Dodji Seketeli <dodji@redhat.com>
71 PR24257 - Handle DW_TAG_typedef with no underlying type
72 * src/abg-dwarf-reader.cc (build_typedef_type): DW_TAG_typedef
73 with no underlying type means typedef void foo.
74 * tests/data/test-annotate/test15-pr18892.so.abi: Adjust.
75 * tests/data/test-annotate/test18-pr19037-libvtkRenderingLIC-6.1.so.abi:
77 * tests/data/test-annotate/test19-pr19023-libtcmalloc_and_profiler.so.abi:
79 * tests/data/test-annotate/test20-pr19025-libvtkParallelCore-6.1.so.abi:
81 * tests/data/test-annotate/test21-pr19092.so.abi: Likewise.
82 * tests/data/test-read-dwarf/PR22015-libboost_iostreams.so.abi:
84 * tests/data/test-read-dwarf/PR22122-libftdc.so.abi: Likewise.
85 * tests/data/test-read-dwarf/test10-pr18818-gcc.so.abi: Likewise.
86 * tests/data/test-read-dwarf/test11-pr18828.so.abi: Likewise.
87 * tests/data/test-read-dwarf/test12-pr18844.so.abi: Likewise.
88 * tests/data/test-read-dwarf/test15-pr18892.so.abi: Likewise.
89 * tests/data/test-read-dwarf/test16-pr18904.so.abi: Likewise.
90 * tests/data/test-read-dwarf/test18-pr19037-libvtkRenderingLIC-6.1.so.abi:
92 * tests/data/test-read-dwarf/test19-pr19023-libtcmalloc_and_profiler.so.abi:
94 * tests/data/test-read-dwarf/test20-pr19025-libvtkParallelCore-6.1.so.abi:
96 * tests/data/test-read-dwarf/test21-pr19092.so.abi: Likewise.
97 * tests/data/test-read-dwarf/test22-pr19097-libstdc++.so.6.0.17.so.abi:
99 * tests/data/test-read-dwarf/test9-pr18818-clang.so.abi: Likewise.
101 2019-02-20 Dodji Seketeli <dodji@redhat.com>
103 Do not build DIE -> parent map just because we see an asm TU
104 * src/abg-dwarf-reader.cc:
106 2019-02-19 Dodji Seketeli <dodji@redhat.com>
108 Avoid over-suppressing fns & vars when analysing the Kernel
109 * include/abg-dwarf-reader.h (get_ignore_symbol_table): Take a
111 * src/abg-dwarf-reader.cc (get_ignore_symbol_table): Likewise.
112 (function_is_suppressed): When the symbol table optimization is in
113 flight -- that is, when no symbol table has been loaded -- do not
114 try to see if a given function symbol was exported at the ELF
115 level or not. Just look at if the function was suppressed or not.
116 (variable_is_suppressed): Likewise for variables.
118 2019-02-08 Dodji Seketeli <dodji@redhat.com>
120 Bug 24188 - Assertion failed while analysing a Fortran binary
121 * src/abg-dwarf-reader.cc (compare_as_type_dies): Handle
122 DW_TAG_string_type DIEs here.
123 (compare_dies): Handle DW_TAG_string_type DIEs by using
124 compare_as_type_dies.
125 * tests/data/test-diff-pkg/netcdf-fortran-debuginfo-4.4.4-10.fc29.x86_64.rpm:
127 * tests/data/test-diff-pkg/netcdf-fortran-debuginfo-4.4.4-11.fc30.x86_64.rpm:
129 * tests/data/test-diff-pkg/netcdf-fortran-mpich-4.4.4-10.fc29.x86_64-4.4.4-11.fc30.x86_64-report-0.txt:
130 New expected test reference output.
131 * tests/data/test-diff-pkg/netcdf-fortran-mpich-4.4.4-10.fc29.x86_64.rpm:
133 * tests/data/test-diff-pkg/netcdf-fortran-mpich-4.4.4-11.fc30.x86_64.rpm:
135 * tests/data/test-diff-pkg/netcdf-fortran-mpich-debuginfo-4.4.4-10.fc29.x86_64.rpm:
137 * tests/data/test-diff-pkg/netcdf-fortran-mpich-debuginfo-4.4.4-11.fc30.x86_64.rpm:
139 * tests/data/test-diff-pkg/netcdf-fortran-mpich-devel-4.4.4-10.fc29.x86_64.rpm:
141 * tests/data/test-diff-pkg/netcdf-fortran-mpich-devel-4.4.4-11.fc30.x86_64.rpm:
143 * tests/data/Makefile.am: Add the new test input material above to
145 * tests/test-diff-pkg.cc (in_out_spec): Add the new test RPMs
146 above to the set of RPMs to use as test input.
148 2019-02-06 Dodji Seketeli <dodji@redhat.com>
150 Bug 24157 - Wrong support of Ada ranges
151 * include/abg-ir.h (array_type_def::subrange_type::bound_value):
153 (array_type_def::subrange_type::subrange_type): Adjust to use the
154 new bound_value type for bound values.
155 (array_type_def::subrange_type::{get_upper_bound, get_lower_bound,
156 set_upper_bound, set_lower_bound}): Return or take int64_t rather
158 (array_type_def::subrange_type::get_length): Return uint64_t
160 * src/abg-dwarf-reader.cc (die_signed_constant_attribute)
161 (die_constant_attribute, die_attribute_has_form)
162 (die_attribute_is_signed, die_attribute_is_unsigned)
163 (die_attribute_has_no_signedness): Define new static functions.
164 (get_default_array_lower_bound): Return uint64_t rather than int.
165 (build_subrange_type): Use the new
166 array_type_def::subrange_type::bound_value type for bound values.
167 Use the new die_constant_attribute function, rather than
168 die_unsigned_constant_attribute to fecth the bound values.
170 (array_type_def::subrange_type::bound_value::{bound_value,
171 get_signedness, set_signedness, get_signed_value,
172 get_unsigned_value, set_unsigned, set_signed}): Define new member
174 (array_type_def::subrange_type::priv::{lower_bound_,
175 upper_bound}): Use the new class bound_value.
176 (array_type_def::subrange_type::priv::priv): Adjust to use the new
177 bound_value class to hold bound values.
178 (array_type_def::subrange_type::subrange_type): Likewise.
179 (array_type_def::subrange_type::{get_upper_bound, get_lower_bound,
180 set_upper_bound, set_lower_bound}): Return or take int64_t rather
182 (array_type_def::subrange_type::get_length): Return uint64_t
184 (types_have_similar_structure): Handle array_type_def::subrange_type
185 * src/abg-reader.cc (build_subrange_type): Use the new
186 array_type_def::subrange_type::bound_value to hold bound values.
187 * tests/data/test-diff-pkg/GtkAda-debuginfo-2.24.2-29.fc29.x86_64.rpm:
188 New binary RPM as test input.
189 * tests/data/test-diff-pkg/GtkAda-debuginfo-2.24.2-30.fc30.x86_64.rpm:
191 * tests/data/test-diff-pkg/GtkAda-devel-2.24.2-29.fc29.x86_64.rpm:
193 * tests/data/test-diff-pkg/GtkAda-devel-2.24.2-30.fc30.x86_64.rpm:
195 * tests/data/test-diff-pkg/GtkAda-gl-2.24.2-29.fc29.x86_64--2.24.2-30.fc30.x86_64-report-0.txt:
196 New expected test output.
197 * tests/data/test-diff-pkg/GtkAda-gl-2.24.2-29.fc29.x86_64.rpm:
198 New binary RPM as test input.
199 * tests/data/test-diff-pkg/GtkAda-gl-2.24.2-30.fc30.x86_64.rpm:
201 * tests/data/test-diff-pkg/GtkAda-gl-debuginfo-2.24.2-29.fc29.x86_64.rpm:
203 * tests/data/test-diff-pkg/GtkAda-gl-debuginfo-2.24.2-30.fc30.x86_64.rpm:
205 * tests/data/Makefile.am: Add the new test material above to source
207 * tests/test-diff-pkg.cc (in_out_specs): Add the new input testing
210 2019-01-30 Dodji Seketeli <dodji@redhat.com>
213 * src/abg-comparison.cc (enum_diff::changed_enumerators): Fix apidoc.
215 2019-01-30 Dodji Seketeli <dodji@redhat.com>
217 Bug 24139 - Support suppressing some enumerator changes
218 * doc/manuals/libabigail-concepts.rst: Document the new
219 'changed_enumerators' property.
220 * include/abg-suppression.h
221 (type_suppression::{g, s}et_changed_enumerator_names): Declare two
222 new member functions.
223 * src/abg-suppression-priv.h
224 (type_suppression::priv::changed_enumerator_names_): Add a new
226 * src/abg-suppression.cc
227 (type_suppression::{g,s}et_changed_enumerator_names): Define two
228 new member functions.
229 (type_suppression::suppresses_diff): Support evaluating the new
230 'changed_enumerators = <vector of changed enumerators>'.
231 (read_type_suppression): Read the new list
232 property'changed_enumerators" and store it into the
233 type_suppression using the new
234 type_suppression::set_changed_enumerator_names ().
235 * tests/data/test-diff-suppr/libtest4{0,1}-enumerator-changes-v{0,1}.so:
236 Add new test inpujts.
237 * tests/data/test-diff-suppr/test4{0,1}-enumerator-changes-0.suppr:
238 Add a new suppr spec for this new test.
239 * tests/data/test-diff-suppr/test4{0,1}-enumerator-changes-report-0.txt:
241 * tests/data/test-diff-suppr/test4{0,1}-enumerator-changes-v{0,1}.cc:
242 Add Source code of libtest4{0,1}-enumerator-changes-v{0,1}.so.
243 * tests/data/Makefile.am: Add the test files above to source
245 * tests/test-diff-suppr.cc: Add the test input files above to the
248 2019-01-25 Dodji Seketeli <dodji@redhat.com>
250 Better comments in the comparison engine
251 * include/abg-comparison.h (enum diff_category): Add comments to
252 describe what to update when a new enumerator is added to this enum.
253 * src/abg-comp-filter.cc (has_fn_return_type_cv_qual_change): Fix
256 2019-01-25 Dodji Seketeli <dodji@redhat.com>
258 Bug 20175 - Classify CV qual changes in variable type as harmless
259 * include/abg-comparison.h (VAR_TYPE_CV_CHANGE_CATEGORY): Add new
260 enumerator to diff_category enum.
261 (EVERYTHING_CATEGORY): Update this enumerator.
262 * src/abg-comp-filter.cc (type_diff_has_cv_qual_change_only):
263 Support array diff nodes carrying a cv qual change on the element
265 (has_var_type_cv_qual_change): Define new static function.
266 (categorize_harmless_diff_node): Use the new
267 has_var_type_cv_qual_change to categorize variable diff node with
268 cv qual change on its type as harmless.
269 * src/abg-comparison.cc
270 (get_default_harmless_categories_bitmap): Update this.
271 (operator<<(ostream& o, diff_category c)): Likewise.
272 * include/abg-ir.h (equals_modulo_cv_qualifier): Declare new ...
273 * src/abg-ir.cc (equals_modulo_cv_qualifier): ... function.
274 * tests/data/test-diff-pkg/libICE-1.0.6-1.el6.x86_64.rpm--libICE-1.0.9-2.el7.x86_64.rpm-report-0.txt:
275 Update expected test output.
276 * tests/data/test-diff-pkg/spice-server-0.12.4-19.el7.x86_64-0.12.8-1.el7.x86_64-report-2.txt: Likewise.
277 * tests/data/Makefile.am: Add the new test material below to
279 * tests/data/test-diff-pkg/nss-3.23.0-1.0.fc23.x86_64-report-0.txt:
280 New expecte test output.
281 * tests/data/test-diff-pkg/nss-3.23.0-1.0.fc23.x86_64.rpm: New
283 * tests/data/test-diff-pkg/nss-3.24.0-1.0.fc23.x86_64.rpm: Likewise.
284 * tests/data/test-diff-pkg/nss-debuginfo-3.23.0-1.0.fc23.x86_64.rpm: Likewise.
285 * tests/data/test-diff-pkg/nss-debuginfo-3.24.0-1.0.fc23.x86_64.rpm: Likewise.
286 * tests/data/test-diff-pkg/nss-devel-3.23.0-1.0.fc23.x86_64.rpm: Likewise.
287 * tests/data/test-diff-pkg/nss-devel-3.24.0-1.0.fc23.x86_64.rpm: Likewise.
288 * tests/test-diff-pkg.cc (in_out_specs): Add the test input above
291 2019-01-24 Dodji Seketeli <dodji@redhat.com>
293 Properly add the new rust tests to EXTRA_DIST
294 * tests/data/Makefile.am: Add the new rust tests to
297 2019-01-24 Dodji Seketeli <dodji@redhat.com>
299 Conditionalize the Rust support regression test
300 * tests/test-diff-dwarf.cc: Run the rust support regression test
301 only if we support Rust on the platform.
302 * tests/test-utils.h: Include config.h.
304 2019-01-24 Dodji Seketeli <dodji@redhat.com>
306 Fix a typo in the recent Rust support and update regression tests
307 * configure.ac: Fix the typo HAS_LANG_Rust into HAS_DW_LANG_Rust.
308 * tests/data/test-diff-dwarf/test46-readme.txt: Add new file to
310 * tests/data/test-diff-dwarf/test46-rust-libone.so: Likewise.
311 * tests/data/test-diff-dwarf/test46-rust-libtwo.so: Likewise.
312 * tests/data/test-diff-dwarf/test46-rust-report-0.txt: Likewise.
313 * tests/test-diff-dwarf.cc (in_out_specs): Update the tests array
314 to compare the two new binaries included above.
316 2019-01-18 Dodji Seketeli <dodji@redhat.com>
318 Overhaul detection the DW_LANG_* enumerators from dwarf.h
319 * configure.ac: Detect the presence of DW_LANG_{UPC, D, Python,
320 Go, C11, C_plus_plus_03, C_plus_plus_11, C_plus_plus_14,
321 Mips_Assembler, Rust} and define the corresponding
322 HAVE_DW_LANG_*_enumerator macro accordingly.
323 * include/abg-ir.h (LANG_C_plus_plus_03): Define this new
324 enumerator in the translation_unit::language enum.
325 * src/abg-dwarf-reader.cc (dwarf_language_to_tu_language): Use the
326 new HAVE_DW_LANG_*_enumerator macros.
327 (get_default_array_lower_bound): Support the
328 translation_unit::LANG_C_plus_plus_03 enumerator.
329 * src/abg-ir.cc (is_cplus_plus_language): Support the
330 translation_unit::LANG_C_plus_plus_03 enumerator.
332 2019-01-18 Dodji Seketeli <dodji@redhat.com>
335 * src/abg-dwarf-reader.cc (dwarf_language_to_tu_language): Fix a
336 thinko in the detection of the support of the DW_LANG_Rust enumerator.
338 2019-01-17 Mark Wielaard <mark@klomp.org>
340 Conditionalize the use of DW_LANG_C_plus_plus_03 and DW_LANG_Rust
341 * include/abg-ir.h (LANG_C_plus_plus_03): Add this new language
342 enum to "enum translation_unit::language".
343 * src/abg-dwarf-reader.cc (dwarf_language_to_tu_language): Do not
344 use DW_LANG_Rust or DW_LANG_C_plus_plus_03 if these are not
346 (get_default_array_lower_bound): Handle the new
347 translation_unit::LANG_C_plus_plus_03 enumerator.
349 2019-01-17 Dodji Seketeli <dodji@redhat.com>
351 Support some new DWARF language encoding for C and C++
352 * src/abg-dwarf-reader.cc (dwarf_language_to_tu_language): Support
353 new DW_LANG_{C11, C_plus_plus_03, C_plus_plus_11, C_plus_plus_14}
356 2019-01-17 Dodji Seketeli <dodji@redhat.com>
358 Add (very) basic support for Rust
359 * include/abg-ir.h (LANG_Rust): Add this new enumerator to the
360 "enum language" enum.
361 * src/abg-dwarf-reader.cc (dwarf_language_to_tu_language): Handle
363 (get_default_array_lower_bound): Likewise.
365 2019-01-15 Dodji Seketeli <dodji@redhat.com>
367 Separate public types of first binary from those of the second
368 * include/abg-dwarf-reader.h (read_context_get_path): Declare new
370 * include/abg-reader.h (read_context_get_path): Likewise.
371 * src/abg-dwarf-reader.cc (read_context_get_path): Define new function.
372 * src/abg-reader.cc (read_context_get_path): Likewise.
373 * tools/abidiff.cc (set_suppressions): Set the suppression
374 specification derived from the --headers-dir1 option only for the first
375 binary, and similarly, from the --headers-dir2 option only for the
378 2019-01-09 Dodji Seketeli <dodji@redhat.com>
380 Bug 23044 - Assertions with side effects
382 * include/abg-diff-utils.h:
384 * src/abg-comp-filter.cc:
385 * src/abg-comparison-priv.h:
386 * src/abg-comparison.cc:
387 * src/abg-corpus-priv.h:
389 * src/abg-default-reporter.cc:
390 * src/abg-diff-utils.cc:
391 * src/abg-dwarf-reader.cc:
395 * src/abg-leaf-reporter.cc:
397 * src/abg-reporter-priv.cc:
398 * src/abg-suppression.cc:
399 * src/abg-tools-utils.cc:
400 * src/abg-workers.cc:
402 * tests/test-diff-filter.cc:
403 * tests/test-diff-pkg.cc:
404 * tests/test-read-dwarf.cc:
405 * tests/test-read-write.cc:
406 * tests/test-types-stability.cc:
407 * tools/abicompat.cc:
409 * tools/abipkgdiff.cc:
411 2019-01-07 Dodji Seketeli <dodji@redhat.com>
413 Update copyright for 2019
414 * include/abg-comp-filter.h: Update copyright for 2019
415 * include/abg-comparison.h: Update copyright for 2019
416 * include/abg-config.h: Update copyright for 2019
417 * include/abg-corpus.h: Update copyright for 2019
418 * include/abg-diff-utils.h: Update copyright for 2019
419 * include/abg-dwarf-reader.h: Update copyright for 2019
420 * include/abg-fwd.h: Update copyright for 2019
421 * include/abg-hash.h: Update copyright for 2019
422 * include/abg-ini.h: Update copyright for 2019
423 * include/abg-interned-str.h: Update copyright for 2019
424 * include/abg-ir.h: Update copyright for 2019
425 * include/abg-libxml-utils.h: Update copyright for 2019
426 * include/abg-libzip-utils.h: Update copyright for 2019
427 * include/abg-reader.h: Update copyright for 2019
428 * include/abg-reporter.h: Update copyright for 2019
429 * include/abg-sptr-utils.h: Update copyright for 2019
430 * include/abg-suppression.h: Update copyright for 2019
431 * include/abg-tools-utils.h: Update copyright for 2019
432 * include/abg-traverse.h: Update copyright for 2019
433 * include/abg-viz-common.h: Update copyright for 2019
434 * include/abg-viz-dot.h: Update copyright for 2019
435 * include/abg-viz-svg.h: Update copyright for 2019
436 * include/abg-workers.h: Update copyright for 2019
437 * include/abg-writer.h: Update copyright for 2019
438 * src/abg-comp-filter.cc: Update copyright for 2019
439 * src/abg-comparison-priv.h: Update copyright for 2019
440 * src/abg-comparison.cc: Update copyright for 2019
441 * src/abg-config.cc: Update copyright for 2019
442 * src/abg-corpus-priv.h: Update copyright for 2019
443 * src/abg-corpus.cc: Update copyright for 2019
444 * src/abg-default-reporter.cc: Update copyright for 2019
445 * src/abg-diff-utils.cc: Update copyright for 2019
446 * src/abg-dwarf-reader.cc: Update copyright for 2019
447 * src/abg-hash.cc: Update copyright for 2019
448 * src/abg-ini.cc: Update copyright for 2019
449 * src/abg-internal.h: Update copyright for 2019
450 * src/abg-ir-priv.h: Update copyright for 2019
451 * src/abg-ir.cc: Update copyright for 2019
452 * src/abg-leaf-reporter.cc: Update copyright for 2019
453 * src/abg-libxml-utils.cc: Update copyright for 2019
454 * src/abg-libzip-utils.cc: Update copyright for 2019
455 * src/abg-reader.cc: Update copyright for 2019
456 * src/abg-reporter-priv.cc: Update copyright for 2019
457 * src/abg-reporter-priv.h: Update copyright for 2019
458 * src/abg-sptr-utils.cc: Update copyright for 2019
459 * src/abg-suppression-priv.h: Update copyright for 2019
460 * src/abg-suppression.cc: Update copyright for 2019
461 * src/abg-tools-utils.cc: Update copyright for 2019
462 * src/abg-traverse.cc: Update copyright for 2019
463 * src/abg-viz-common.cc: Update copyright for 2019
464 * src/abg-viz-dot.cc: Update copyright for 2019
465 * src/abg-viz-svg.cc: Update copyright for 2019
466 * src/abg-workers.cc: Update copyright for 2019
467 * src/abg-writer.cc: Update copyright for 2019
468 * tests/print-diff-tree.cc: Update copyright for 2019
469 * tests/test-abicompat.cc: Update copyright for 2019
470 * tests/test-abidiff-exit.cc: Update copyright for 2019
471 * tests/test-abidiff.cc: Update copyright for 2019
472 * tests/test-alt-dwarf-file.cc: Update copyright for 2019
473 * tests/test-core-diff.cc: Update copyright for 2019
474 * tests/test-diff-dwarf-abixml.cc: Update copyright for 2019
475 * tests/test-diff-dwarf.cc: Update copyright for 2019
476 * tests/test-diff-filter.cc: Update copyright for 2019
477 * tests/test-diff-pkg.cc: Update copyright for 2019
478 * tests/test-diff-suppr.cc: Update copyright for 2019
479 * tests/test-diff2.cc: Update copyright for 2019
480 * tests/test-ini.cc: Update copyright for 2019
481 * tests/test-ir-walker.cc: Update copyright for 2019
482 * tests/test-lookup-syms.cc: Update copyright for 2019
483 * tests/test-read-dwarf.cc: Update copyright for 2019
484 * tests/test-read-write.cc: Update copyright for 2019
485 * tests/test-types-stability.cc: Update copyright for 2019
486 * tests/test-utils.cc: Update copyright for 2019
487 * tests/test-utils.h: Update copyright for 2019
488 * tests/test-write-read-archive.cc: Update copyright for 2019
489 * tools/abiar.cc: Update copyright for 2019
490 * tools/abicompat.cc: Update copyright for 2019
491 * tools/abidiff.cc: Update copyright for 2019
492 * tools/abidw.cc: Update copyright for 2019
493 * tools/abilint.cc: Update copyright for 2019
494 * tools/abipkgdiff.cc: Update copyright for 2019
495 * tools/abisym.cc: Update copyright for 2019
496 * tools/binilint.cc: Update copyright for 2019
497 * tools/kmidiff.cc: Update copyright for 2019
498 * update-copyright.sh: Update new year to 2019
500 2018-12-06 Xiao Jia via libabigail <libabigail@sourceware.org>
502 Some documentation fixes
503 * COMPILING: Add the pkg-config dependency.
504 * doc/manuals/kmidiff.rst: Replace the redundant --full-impact
505 documentation with the proper --impacted-interfaces one.
507 2018-11-29 Dodji Seketeli <dodji@redhat.com>
509 Add basic support for Fortran binaries
510 * src/abg-dwarf-reader.cc (die_pretty_print_type): Support
511 DW_TAG_string_type DIEs. They all have the same representation
514 2018-11-08 Dodji Seketeli <dodji@redhat.com>
516 Some light style change in abidiff.cc
517 * tools/abidiff.cc (adjust_diff_context_for_kmidiff): Take a
518 reference to diff_context rather than a pointer.
521 2018-11-08 Dodji Seketeli <dodji@redhat.com>
523 Add a --fail-no-debug-info to abidiff
524 * doc/manuals/abidiff.rst: Document the new --fail-no-debug-info
526 * tools/abidiff.cc (options::fail_no_debug_info): Define new data
528 (display_usage): Provide a help string for the new
529 --fail-no-debug-info option.
530 (parse_command_line): Parse the new option.
531 (main): If --fail-no-debug-info and no debug info was found, or
532 not alternate debuginfo file was found, bail out.
534 2018-11-08 Dodji Seketeli <dodji@redhat.com>
536 Support having several debuginfo search dirs for a binary
537 * doc/manuals/abidiff.rst: Adjust doc for the
538 --debug-info-dir{1,2} that can now be provided several times.
539 * include/abg-dwarf-reader.h ({create, reset}_read_context)
540 (read_corpus_from_elf): Take a vector of debug info root dirs.
541 * include/abg-tools-utils.h (trim_leading_string)
542 (find_file_under_dir, make_path_absolute_to_be_freed)
543 (convert_char_stars_to_char_star_stars): Declare new functions.
544 * src/abg-dwarf-reader.cc (find_alt_debug_info_link): Renamed
545 find_alt_debug_info_location into this.
546 (find_alt_debug_info_path): Define new static function.
547 (find_alt_debug_info): Take a vector of debug info root dirs. Use
548 the new find_alt_debug_info_path to look into the debug info root
549 dirs for the alt debug info.
550 (read_context::debug_info_root_paths_): Define new data member.
551 (read_context::read_context): Take a vector of debug info root
552 dirs and initialize the new read_context::debug_info_root_paths_.
553 (read_context::{initialize, create_default_dwfl}): Take a vector
554 of debug info root dirs and adjust.
555 (read_context::{add_debug_info_root_paths,
556 add_debug_info_root_path, find_alt_debug_info}): Define new member
558 (read_context::load_debug_info): Look into the debug info roots
559 for split debug info files.
560 (create_read_context, read_corpus_from_elf): Take a vector of
561 debug info root dirs and adjust.
562 (has_alt_debug_info): Adjust.
563 * src/abg-tools-utils.cc (trim_leading_string)
564 (make_path_absolute_to_be_freed, find_file_under_dir)
565 (convert_char_stars_to_char_star_stars): Define new functions.
566 (entry_of_file_with_name): Define new static function.
567 (build_corpus_group_from_kernel_dist_under): Adjust.
568 * tests/print-diff-tree.cc (main): Adjust.
569 * tests/test-diff-dwarf.cc (main): Adjust.
570 * tests/test-ir-walker.cc (main): Adjust.
571 * tests/test-read-dwarf.cc (main): Adjust.
572 * tools/abicompat.cc (main): Adjust.
573 * tools/abidiff.cc (options::di_root_paths{1,2}): Changed
574 di_root_path{1,2} into this, change their types into vectors of
576 (options::prepared_di_root_paths{1,2}): Define new data members.
577 (options::~options): Define new destructor.
578 (parse_command_line): Adjust.
579 (prepare_di_root_paths): Define new static function.
580 (handle_error): Remove arguments input_file_name,
581 debug_info_dir{1,2}. Now just take an instance of options
584 * tools/abidw.cc (options::dir_root_paths): Renamed dir_root_path
585 into this and make it be a vector of allocated char*.
586 (options::prepared_di_root_paths): Define new data member.
587 (options::~options): Free the allocated char* in
588 options::dir_root_paths.
589 (parse_command_line): Support several --debug-info-dir.
590 (load_corpus_and_write_abixml): Adjust.
591 (prepare_di_root_paths): Define static function.
593 * tools/abilint.cc (main): Adjust.
594 * tools/abipkgdiff.cc (compare): Adjust.
596 2018-10-26 Dodji Seketeli <dodji@redhat.com>
598 Update website for 1.5
599 * doc/website/mainpage.txt: Update website for 1.5
601 2018-10-26 Dodji Seketeli <dodji@redhat.com>
603 Bump version number to 1.6
604 * configure.ac: Bump version number to 1.6
606 2018-10-25 Dodji Seketeli <dodji@redhat.com>
608 Update ChangeLog for 1.5
609 * ChangeLog: Update automatically by calling make
612 2018-10-25 Dodji Seketeli <dodji@redhat.com>
614 Update NEWS file for 1.5
615 * NEWS: Update for 1.5
617 2018-10-18 Dodji Seketeli <dodji@redhat.com>
619 Bug rhbz1638554 - assertion failed in is_mostly_distinct_diff
620 * src/abg-comp-filter.cc (is_mostly_distinct_diff): Handle the
621 case of the type diff of the function parameter diff being a
624 2018-10-17 Dodji Seketeli <dodji@redhat.com>
626 Define UINT64_MAX when it's not defined
627 * src/abg-dwarf-reader.cc: Define UINT64_MAX when it's not defined.
629 2018-10-16 Dodji Seketeli <dodji@redhat.com>
631 Better support array with unknown upper bound
632 * include/abg-comparison.h
633 (BENIGN_INFINITE_ARRAY_CHANGE_CATEGORY): A new enumerator in the
635 (EVERYTHING_CATEGORY): Adjust.
636 * src/abg-comparison.cc (get_default_harmless_categories_bitmap):
638 (operator<<(ostream& o, diff_category)): Likewise.
639 * include/abg-ir.h (array_type_def::subrange_type::is_infinite):
640 Declare new member function.
641 * src/abg-ir.cc (array_type_def::subrange_type::priv::infinite_):
643 (array_type_def::subrange_type::priv::priv): Initialize it.
644 (array_type_def::subrange_type::get_length): Better support
645 unknown sized subrange.
646 (array_type_def::subrange_type::is_infinite): Define new member
648 * src/abg-comp-filter.cc (has_benign_infinite_array_change):
649 Define new static function.
650 (categorize_harmless_diff_node): Use the new
651 has_benign_infinite_array_change above.
652 * src/abg-dwarf-reader.cc (build_subrange_type): Better recognize a
653 subrange type with unknown upper bound. Represent that with the
654 new array_type_def::subrange_type::is_infinite member property.
655 * src/abg-reader.cc (build_subrange_type): Likewise.
656 * tests/data/test-abidiff/test-PR18166-libtirpc.so.abi: Adjust.
657 * tests/data/test-annotate/libtest23.so.abi: Likewise.
658 * tests/data/test-annotate/libtest24-drop-fns-2.so.abi: Likewise.
659 * tests/data/test-annotate/libtest24-drop-fns.so.abi: Likewise.
660 * tests/data/test-annotate/test14-pr18893.so.abi: Likewise.
661 * tests/data/test-annotate/test19-pr19023-libtcmalloc_and_profiler.so.abi:
663 * tests/data/test-annotate/test7.so.abi: Likewise.
664 * tests/data/test-read-dwarf/libtest23.so.abi: Likewise.
665 * tests/data/test-read-dwarf/libtest24-drop-fns-2.so.abi: Likewise.
666 * tests/data/test-read-dwarf/libtest24-drop-fns.so.abi: Likewise.
667 * tests/data/test-read-dwarf/test10-pr18818-gcc.so.abi: Likewise.
668 * tests/data/test-read-dwarf/test11-pr18828.so.abi: Likewise.
669 * tests/data/test-read-dwarf/test14-pr18893.so.abi: Likewise.
670 * tests/data/test-read-dwarf/test19-pr19023-libtcmalloc_and_profiler.so.abi: Likewise.
671 * tests/data/test-read-dwarf/test22-pr19097-libstdc++.so.6.0.17.so.abi: Likewise.
672 * tests/data/test-read-dwarf/test9-pr18818-clang.so.abi: Likewise.
674 2018-10-11 Dodji Seketeli <dodji@redhat.com>
676 Add default suppression specification for the libvirt project
677 * default.abignore: Suppress changes on functions with symbol
678 version LIBVIRT_PRIVATE in libvirt.so.* shared objects.
680 2018-10-11 Dodji Seketeli <dodji@redhat.com>
682 Add default suppression specification for the krb5 project
683 * default.abignore: Ignore changes about functions starting with
686 2018-10-03 Dodji Seketeli <dodji@redhat.com>
689 * src/abg-suppression.cc (type_suppression::suppresses_diff): Fix
692 2018-10-03 Dodji Seketeli <dodji@redhat.com>
694 Bug 23708 - categorize void* to pointer change as harmless
695 * include/abg-comparison.h (VOID_PTR_TO_PTR_CHANGE_CATEGORY): New
696 enumerator in the diff_category enum. Also, adjust the
697 EVERYTHING_CATEGORY enumerator.
698 * include/abg-fwd.h (is_void_pointer_type): Declare new function.
699 * src/abg-comp-filter.cc (has_void_ptr_to_ptr_change): Define new
700 static function and ...
701 (categorize_harmless_diff_node): ... use it here.
702 * src/abg-comparison.cc (get_default_harmless_categories_bitmap):
703 Add the new abigail::comparison::VOID_PTR_TO_PTR_CHANGE_CATEGORY
705 (operator<<(ostream& o, diff_category c)): Add support for the new
706 VOID_PTR_TO_PTR_CHANGE_CATEGORY.
707 * src/abg-ir.cc (is_void_pointer_type): Define new function.
708 * tests/data/Makefile.am: Add the new test material below to source distribution.
709 * tests/data/test-diff-filter/test47-filter-void-ptr-change-report-0.txt:
710 New test reference output.
711 * tests/data/test-diff-filter/test47-filter-void-ptr-change-v{0,1}.c:
712 Source code of the new binary test input below.
713 * tests/data/test-diff-filter/test47-filter-void-ptr-change-v{0,1}.o:
714 New binary test input.
715 * tests/test-diff-filter.cc: Add the test input/output above to
718 2018-10-02 Dodji Seketeli <dodji@redhat.com>
720 Categorize CV qualifier changes on fn return types as harmless
721 * include/abg-comparison.h (FN_RETURN_TYPE_CV_CHANGE_CATEGORY):
722 New enumerator for diff_category.
723 (EVERYTHING_CATEGORY): Update.
724 * src/abg-comp-filter.cc (type_diff_has_cv_qual_change_only):
725 Factorize this function out of ...
726 (has_fn_parm_type_cv_qual_change): ... this one.
727 (has_fn_return_type_cv_qual_change): Define new static function.
728 (categorize_harmless_diff_node): Use the new
729 has_fn_return_type_cv_qual_change.
730 * src/abg-comparison.cc (get_default_harmless_categories_bitmap):
731 Adjust to add the new FN_RETURN_TYPE_CV_CHANGE_CATEGORY category.
732 (operator<<(ostream& o, diff_category c)): Support the new
733 FN_RETURN_TYPE_CV_CHANGE_CATEGORY.
734 * tests/data/Makefile.am: Add the new test material below to
736 * tests/data/test-diff-filter/test46-fn-return-qual-change-report-0.txt:
737 New reference output for the new input test.
738 * tests/data/test-diff-filter/test46-fn-return-qual-change-v{0,1}.c:
739 New source code for the new binary test input.
740 * tests/data/test-diff-filter/test46-fn-return-qual-change-v{0,1}.o:
741 New binary test input files.
742 * tests/test-diff-filter.cc: Add the new test input above to test
745 2018-10-01 Dodji Seketeli <dodji@redhat.com>
747 Fix propagation of private type suppression category
748 * include/abg-comp-filter.h (has_harmful_name_change): Declare new
750 * include/abg-comparison.h (PRIVATE_TYPE_CATEGORY): New enumerator
752 (EVERYTHING_CATEGORY): Adjust this enumerator in diff_category;
753 (is_suppressed): Take an output parameter to say if the
754 suppression is a private type suppression.
755 * include/abg-suppression.h (is_private_type_suppr_spec): Take a
756 const reference parameter and add an overload for a shared
758 * src/abg-comp-filter.cc (has_harmful_name_change): Define new
760 * src/abg-comparison-priv.h (diff::priv::is_filtered_out): Diffs
761 of category PRIVATE_TYPE_CATEGORY are also considered filtered
763 * src/abg-comparison.cc (diff::is_filtered_out): Adjust to account
764 for canonical diffs of category PRIVATE_TYPE_CATEGORY.
765 (diff::is_suppressed): Add an overload that takes a
766 is_private_type output parameter. Re-write the old overload in
767 terms of the new one.
768 (operator<<(ostream& o, diff_category c)): Handle
769 PRIVATE_TYPE_CATEGORY.
770 (category_propagation_visitor::visit_end): Do not propagate
771 PRIVATE_TYPE_CATEGORY here. Do not propagate
772 HARMLESS_DECL_NAME_CHANGE_CATEGORY either, when the class does
773 have a harmful decl name change.
774 (suppression_categorization_visitor::visit_begin): Set the new
775 PRIVATE_TYPE_CATEGORY category but do not propagate it.
776 (suppression_categorization_visitor::visit_end): Add some
778 * src/abg-default-reporter.cc (default_reporter::report): Avoid
779 reporting typedef underlying types that are in the
780 PRIVATE_TYPE_CATEGORY category.
781 * src/abg-suppression.cc (type_suppression::suppresses_diff): Do
782 not peel typedefs if we are a private type suppression.
783 (is_private_type_suppr_spec): Take a const reference.
784 * tests/data/Makefile.am: Add the new test material below to
786 * tests/test-diff-suppr.cc: Use new test binary input.
787 * tests/data/test-diff-filter/test7-report.txt: Adjust.
788 * tests/data/test-diff-suppr/test39-opaque-type-report-0.txt: New
789 test reference output.
790 * tests/data/test-diff-suppr/test39-opaque-type-v{0,1}.c: Source
791 code of new test binary input.
792 * tests/data/test-diff-suppr/test39-opaque-type-v{0,1}.o: New test
794 * tests/data/test-diff-suppr/test39-public-headers-dir/test39-header-v{0,1}.h:
795 Source code of new test binary input.
797 2018-09-25 Dodji Seketeli <dodji@redhat.com>
799 PR23641 - confusion when a type definition DIE is matched by a supprspec and its decl DIEs aren't
800 * src/abg-dwarf-reader.cc (get_opaque_version_of_type): If no
801 pre-existing opaque version was found, a new one is created and
802 returned. Take a needed "where_offset" parameter.
803 (build_ir_node_from_die): Adjust the call to
804 get_opaque_version_of_type.
806 2018-09-21 Dodji Seketeli <dodji@redhat.com>
808 PR23641 - Type definition DIE matched by a supprspec but not its decl
809 *definition* of T, they will be dropped too.
810 We'll end up with those two libraries that are identical (modulo the
811 order in which libabigail sees type declarations and their
812 definitions) and are considered different when a suppression
813 specification makes us drop T: the second library appears to
814 libabigail as if T was removed from it.
815 This is the problem addressed by this patch.
816 When the definition of a type T is suppressed because it's considered
817 private then we look if there was a forward declaration for it
818 elsewhere, that is not matched by the private type suppression
819 specification. If we encountered such a type declaration then it
820 means that declaration is in effect an "opaque" version of T. So
821 rather than just dropping T altogether, we keep (and build an IR) for
822 its opaque version only. And we drop the definition of T.
823 This seems to fix the issue.
824 I can't seem to reproduce the slight re-ordering of DIEs descriptions that
825 uncover the issue so I'll rely on integration tests to catch future
826 regressions on this issue, rather than on unit tests. Sigh.
827 * include/abg-tools-utils.h (PRIVATE_TYPES_SUPPR_SPEC_NAME):
828 Remove this extern constant definition.
829 * src/abg-dwarf-reader.cc (type_is_suppressed): Add an overload
830 that takes an additional type_is_private output parameter.
831 (get_opaque_version_of_type): New static function.
832 (build_ir_node_from_die): For class types, get the opaque version
833 for suppressed private types rather than dropping them altogether.
834 * src/abg-reader.cc (type_is_suppressed): Adjust.
835 * src/abg-suppression-priv.h (type_is_suppressed): Add an overload
836 that takes a type_is_private output parameter.
837 * include/abg-suppression.h (get_private_types_suppr_spec_label)
838 (is_private_type_suppr_spec): Declare new functions.
839 * src/abg-suppression.cc
840 (get_private_types_suppr_spec_label, is_private_type_suppr_spec):
841 Define new functions.
842 (suppression_matches_type_name_or_location): Use the new
843 get_private_types_suppr_spec_label rather than a global extern
845 * src/abg-tools-utils.cc (handle_fts_entry): Adjust to use the new
846 get_private_types_suppr_spec_label.
847 (gen_suppr_spec_from_headers): Handle the case or an empty headers
850 2018-09-03 Dodji Seketeli <dodji@redhat.com>
852 Add option to avoid walking abigail::ir nodes twice
853 * include/abg-ir.h (struct ir_node_visitor): Make this be a class.
854 Add a private data member to it, following the 'pimpl' idiom.
855 (ir_node_visitor::{allow_visiting_already_visited_type_node,
856 mark_type_node_as_visited, forget_visited_type_nodes,
857 type_node_has_been_visited}): Declare new member functions.
858 * src/abg-ir.cc ({type_base, type_decl, scope_type_decl,
859 qualified_type_decl, pointer_type_def, reference_type_def,
860 array_type_def, enum_type_decl, typedef_decl, class_or_union,
861 class_decl, union_decl}::traverse): Avoid re-visiting the type
862 node if the visitor was configured as such.
863 (struct ir_node_visitor::priv): Define new struct.
864 (ir_node_visitor::{allow_visiting_already_visited_type_node,
865 mark_type_node_as_visited, forget_visited_type_nodes,
866 type_node_has_been_visited}): Define new member functions.
867 * tests/test-ir-walker.cc
868 (name_printing_visitor::name_printing_visitor): Avoid visiting a
871 2018-08-31 Dodji Seketeli <dodji@redhat.com>
873 Fix apidoc of dwarf_reader::get_soname_of_elf_file
874 * src/abg-dwarf-reader.cc (get_soname_of_elf_file): Document the
875 first parameter. Remove bogus documentation of the previous 'elf'
878 2018-08-30 Dodji Seketeli <dodji@redhat.com>
880 Bug 23533 - Accept '=' in ini property values
881 * src/abg-ini.cc (char_is_delimiter): Take a new include_equal
882 flag to control is the equal character should be considered as a
884 (char_is_property_value_char): Accept the equal character as a
885 valid property value character.
886 * tests/Makefile.am: Build a new runtestini test from the new
887 tests/test-ini.cc source file.
888 * tests/data/Makefile.am: Add the two new test inputs below to
890 * tests/data/test-ini/test01-equal-in-property-string.{abignore,
891 abignore.expected}: New test inputs.
892 * tests/test-ini.cc: New test harness.
894 2018-08-06 Dodji Seketeli <dodji@redhat.com>
896 Make test-ir-walker work on ELF binaries directly
897 * test-ir-walker.cc (main): Load an ABI corpus from an elf file
898 and walk its translation units.
900 2018-07-17 Dodji Seketeli <dodji@redhat.com>
902 Allow use of python even when fedabipkgdiff is disabled
903 * configure.ac: Detect the presence and version of python even
904 when fedabipkgdiff is disabled.
906 2018-07-16 Dodji Seketeli <dodji@redhat.com>
908 Bump version number to 1.5
909 * configure.ac: Bump version number to 1.5
911 2018-07-13 Dodji Seketeli <dodji@redhat.com>
913 Update ChangeLog for 1.4 release
914 * ChangeLog: Update this using make update-changelog
916 2018-07-13 Dodji Seketeli <dodji@redhat.com>
918 Update NEWS file for 1.4 release
919 * NEWS: Added 1.4 entries
921 2018-07-13 Dodji Seketeli <dodji@redhat.com>
923 Properly add test materials for test-diff-suppr/test38-char-class-in-ini*
924 * tests/data/Makefile.am: Add proper path for
925 test-diff-suppr/test38-char-class-in-ini*.
927 2018-07-12 Dodji Seketeli <dodji@redhat.com>
929 Allow square brackets in ini property values
930 * src/abg-ini.cc (char_is_delimiter): Possibly disallow square
931 bracket characters into the set of delimiters.
932 * tests/data/test-diff-suppr/test38-char-class-in-ini-report-0.txt:
933 New reference output.
934 * tests/data/test-diff-suppr/test38-char-class-in-ini-v{0,1}.c:
935 Source code new test binaries.
936 * tests/data/test-diff-suppr/test38-char-class-in-ini-v{0,1}.o:
938 * tests/data/test-diff-suppr/test38-char-class-in-ini.abignore:
939 New test abi suppression file.
940 * tests/data/Makefile.am: Add the new test materials above to
942 * tests/test-diff-suppr.cc: Add the test materials above to the
945 2018-07-10 Dodji Seketeli <dodji@redhat.com>
947 Fix race between runtestdefaultsupprs{py3.sh,.py}
948 * tests/Makefile.am: Run runtestdefaultsupprspy3.sh if we are in
949 python3 mode otherwise run runtestdefaultsupprs.py.
951 2018-06-29 Dodji Seketeli <dodji@redhat.com>
953 Ensure die_function_type_is_method_type returns a class type die
954 * src/abg-dwarf-reader.cc (die_peel_typedef): Define new static
956 (die_function_type_is_method_type): Use the function above to peel
957 the class die from potential typedefs wrapping it.
959 2018-06-28 Dodji Seketeli <dodji@redhat.com>
961 Misc style adjustements
962 * include/abg-suppression.h
963 (function_suppression::ADDED_FUNCTION_CHANGE_KIND): Fix the
964 comment of this enumerator.
965 (suppresses_variable): Cleanup parameter name.
966 * src/abg-comparison.cc: Remove useless horizontal space.
967 * src/abg-suppression.cc
968 (variable_suppression::suppresses_variable): Fix typo.
970 2018-06-28 Dodji Seketeli <dodji@redhat.com>
972 Initial basic support of union type in suppression specifications
973 * src/abg-suppression.cc (suppression_matches_type_no_name):
976 2018-06-28 Dodji Seketeli <dodji@redhat.com>
978 Filter out changes like type to const type
979 * include/abg-comparison.h (FN_PARM_TYPE_CV_CHANGE_CATEGORY): Add
980 this new enumerator to the diff_category enum. Also, OR this to
981 the value of the EVERYTHING_CATEGORY enumerator.
982 * src/abg-comp-filter.cc (has_fn_parm_type_top_cv_qual_change):
983 Rename has_fn_parm_type_cv_qual_change into this.
984 (has_fn_parm_type_cv_qual_change): New function.
985 (categorize_harmless_diff_node): Categorize cv qual changes as
986 being of category FN_PARM_TYPE_CV_CHANGE_CATEGORY.
987 * src/abg-comparison.cc (get_default_harmless_categories_bitmap):
988 Add FN_PARM_TYPE_CV_CHANGE_CATEGORY to the default harmless
990 * tests/data/test-diff-pkg/libICE-1.0.6-1.el6.x86_64.rpm--libICE-1.0.9-2.el7.x86_64.rpm-report-0.txt: Adjust.
992 2018-06-28 Dodji Seketeli <dodji@redhat.com>
994 Fix redundancy detection through fn ptr and typedef paths
995 * include/abg-comparison.h
996 (is_function_type_diff_with_local_changes)
997 (is_reference_or_pointer_diff_to_non_basic_distinct_types)
998 (peel_typedef_diff): Declare new functions.
999 * src/abg-comparison.cc
1000 (is_function_type_diff_with_local_changes)
1001 (is_reference_or_ptr_diff_to_non_basic_nor_distinct_types)
1002 (peel_typedef_diff): Define new functions.
1003 (is_reference_or_pointer_diff): Peel typedefs before operating.
1004 (redundancy_marking_visitor::visit_begin): Only sibbling parameter
1005 diff node that carry basic type changes (or distinct type changes)
1006 are *not* marked as redundant. All other kinds of sibbling
1007 parameter diff nodes are markes redundant. Also, rather than
1008 never marking function type diffs as redundant by fear of missing
1009 local changes on these, just avoid marking function type diff
1010 nodes with local changes. It's possible to be that precise now
1011 that we can detect that a diff node carries local changes.
1012 * tests/data/test-diff-suppr/test37-opaque-type-v{0,1}.o: New
1014 * tests/data/test-diff-suppr/test37-opaque-type-v{0,1}.c: Source
1015 code of the binary tests input above.
1016 * tests/data/test-diff-suppr/test37-opaque-type-header-dir/test37-opaque-type-header-v{0,1}.h:
1017 Headers of the binary tests input above.
1018 * tests/data/test-diff-suppr/test37-opaque-type-report-0.txt:
1019 Reference output for this new test.
1020 * tests/data/Makefile.am: Add the new test material above to
1021 source distribution.
1022 * tests/test-diff-suppr.cc (in_out_specs): Add the new test input
1023 above to the test harness.
1025 2018-06-08 Dodji Seketeli <dodji@redhat.com>
1027 Fix indentation of help string in abipkgdiff
1028 * tools/abipkgdiff.cc (display_usage): Fix indentation of help
1031 2018-06-08 Dodji Seketeli <dodji@redhat.com>
1033 Identify a function using its symbol name and version
1034 * src/abg-default-reporter.cc (default_reporter::report): In C,
1035 tell the user about the underlying function symbol name only if
1036 said symbol name is different from the name of the function.
1037 * src/abg-ir.cc (function_decl::get_id): If the function has an
1038 underlying symbol, use the symbol name and version as the function
1039 ID. But if the function symbol has an alias then use the linkage
1041 * tests/data/test-diff-pkg/elfutils-debuginfo-0.170-4.el7.x86_64.rpm:
1042 New binary test input.
1043 * tests/data/test-diff-pkg/elfutils-debuginfo-0.171-1.el7.x86_64.rpm: Likewise.
1044 * tests/data/test-diff-pkg/elfutils-devel-0.170-4.el7.x86_64.rpm: Likewise.
1045 * tests/data/test-diff-pkg/elfutils-devel-0.171-1.el7.x86_64.rpm: Likewise.
1046 * tests/data/test-diff-pkg/elfutils-libs-0.170-4.el7.x86_64.rpm: Likewise.
1047 * tests/data/test-diff-pkg/elfutils-libs-0.171-1.el7.x86_64.rpm: Likewise.
1048 * tests/data/test-diff-pkg/elfutils-libs-0.170-4.el7.x86_64-multiple-sym-vers-report-0.txt:
1049 New reference test output.
1050 * tests/data/Makefile.am: Add the new test material above to
1051 source distribution.
1052 * tests/test-diff-pkg.cc (in_out_specs): Integrate the new test
1053 inputs above into the harness.
1055 2018-06-06 Dodji Seketeli <dodji@redhat.com>
1058 * configure.ac: Bump version to 1.4
1060 2018-06-06 Dodji Seketeli <dodji@redhat.com>
1062 Explicitely detect anonymous data member changes
1063 * include/abg-comp-filter.h (has_anonymous_data_member_change):
1064 Add new function declaration.
1065 * include/abg-fwd.h (is_data_member, is_anonymous_data_member):
1066 declare new overloads.
1067 * src/abg-comp-filter.cc (has_anonymous_data_member_change):
1068 Define new overloads.
1069 * src/abg-ir.cc (is_data_member, is_anonymous_data_member): Define
1071 * src/abg-reporter-priv.cc (represent): In the var_diff overload,
1072 detect when we have anonymous data member changes and emit
1073 explicit error messages then.
1074 * tests/data/test-diff-dwarf/test45-anon-dm-change-report-0.txt:
1076 * tests/data/test-diff-dwarf/test45-anon-dm-change-v0.cc: Likewise.
1077 * tests/data/test-diff-dwarf/test45-anon-dm-change-v0.o: Likewise.
1078 * tests/data/test-diff-dwarf/test45-anon-dm-change-v1.cc: Likewise.
1079 * tests/data/test-diff-dwarf/test45-anon-dm-change-v1.o: Likewise.
1080 * tests/data/Makefile.am: Add the new test material above to source
1082 * tests/test-diff-dwarf.cc (in_out_specs): Add the new test
1083 material above to the test harness.
1084 * tests/data/test-diff-filter/test30-pr18904-rvalueref-report0.txt: Adjust.
1085 * tests/data/test-diff-filter/test30-pr18904-rvalueref-report1.txt: Likewise.
1086 * tests/data/test-diff-filter/test30-pr18904-rvalueref-report2.txt: Likewise.
1087 * tests/data/test-diff-filter/test35-pr18754-no-added-syms-report-0.txt: Likewise.
1089 2018-06-05 Dodji Seketeli <dodji@redhat.com>
1091 Add test44-anon-struct-union-v{0,1}.o to source distribution
1092 * tests/data/Makefile.am: Add
1093 test-diff-dwarf/test44-anon-struct-union-v{0,1}.o files to source
1096 2018-06-04 Dodji Seketeli <dodji@redhat.com>
1098 Use the flat representation for anonymous struct/unions
1099 * src/abg-ir.cc (get_class_or_union_flat_representation): Take a
1100 const class_or_union* (like what the declaration in the header
1101 file says), rather than just a class_or_union*.
1102 ({class,union}_decl::get_pretty_representation): For anonymous
1103 classes and unions, use the flat representation.
1104 * tests/data/test-annotate/libtest23.so.abi: Adjust.
1105 * tests/data/test-annotate/libtest24-drop-fns-2.so.abi: Likewise.
1106 * tests/data/test-annotate/libtest24-drop-fns.so.abi: Likewise.
1107 * tests/data/test-annotate/test13-pr18894.so.abi: Likewise.
1108 * tests/data/test-annotate/test14-pr18893.so.abi: Likewise.
1109 * tests/data/test-annotate/test15-pr18892.so.abi: Likewise.
1110 * tests/data/test-annotate/test17-pr19027.so.abi: Likewise.
1111 * tests/data/test-annotate/test18-pr19037-libvtkRenderingLIC-6.1.so.abi: Likewise.
1112 * tests/data/test-annotate/test19-pr19023-libtcmalloc_and_profiler.so.abi: Likewise.
1113 * tests/data/test-annotate/test20-pr19025-libvtkParallelCore-6.1.so.abi: Likewise.
1114 * tests/data/test-annotate/test21-pr19092.so.abi: Likewise.
1115 * tests/data/test-diff-dwarf/test43-PR22913-report-0.txt: Likewise.
1116 * tests/data/test-diff-dwarf/test44-anon-struct-union-report-0.txt:
1117 New test reference output.
1118 * tests/data/test-diff-dwarf/test44-anon-struct-union-v{0,1}.cc:
1119 Source code of new test binary outputs.
1120 * tests/data/test-diff-dwarf/test44-anon-struct-union-v{0,1}.o:
1121 New test binary outputs.
1122 * tests/data/Makefile.am: Add the new test materials above to
1123 source districution.
1124 * tests/test-diff-dwarf.cc (in_out_specs): Add the new test
1125 material above to the test harness here.
1126 * tests/data/test-diff-filter/test30-pr18904-rvalueref-report0.txt: Adjust.
1127 * tests/data/test-diff-filter/test30-pr18904-rvalueref-report1.txt: Likewise.
1128 * tests/data/test-diff-filter/test30-pr18904-rvalueref-report2.txt: Likewise.
1129 * tests/data/test-diff-filter/test35-pr18754-no-added-syms-report-0.txt: Likewise.
1130 * tests/data/test-diff-pkg/libcdio-0.94-1.fc26.x86_64--libcdio-0.94-2.fc26.x86_64-report.1.txt: Likewise.
1131 * tests/data/test-diff-pkg/spice-server-0.12.4-19.el7.x86_64-0.12.8-1.el7.x86_64-report-2.txt: Likewise.
1132 * tests/data/test-read-dwarf/test22-pr19097-libstdc++.so.6.0.17.so.abi: Likewise.
1134 2018-06-01 Dodji Seketeli <dodji@redhat.com>
1136 Better detect when pointer and qualified types carry local changes
1137 * src/abg-comparison.cc
1138 (leaf_diff_node_marker_visitor::visit_begin): Do not mark
1139 qualified types as leaf diff nodes.
1140 (redundancy_marking_visitor::visit_end): Changes to qualified type
1141 are never considered local. This is just as for pointer and
1143 * src/abg-default-reporter.cc
1144 (default_reporter::report_local_reference_type_changes): Display
1145 structural changes of the pointed-to type.
1146 (default_reporter::report): In the overload for reference_diff,
1147 better detect and handle when we have local changes, or not.
1148 * src/abg-ir.cc (equals): In the overload for qualified_type_def
1149 and reference_type_de, report local type changes of the underlying
1150 type as local changes. Add comments in the overload for pointer
1151 type, and make it look like the the overload for reference_type.
1152 * src/abg-leaf-reporter.cc (leaf_reporter::report): In the
1153 overload for pointer_diff, remove end of line.
1154 * tests/data/test-diff-filter/libtest45-basic-type-change-report-1.txt: Adjust.
1155 * tests/data/test-diff-filter/test30-pr18904-rvalueref-report0.txt: Likewise.
1156 * tests/data/test-diff-filter/test30-pr18904-rvalueref-report1.txt: Likewise.
1157 * tests/data/test-diff-filter/test30-pr18904-rvalueref-report2.txt: Likewise.
1158 * tests/data/test-diff-filter/test35-pr18754-no-added-syms-report-0.txt: Likewise.
1160 2018-05-23 Dodji Seketeli <dodji@redhat.com>
1162 Better detect when diff nodes only carry local type changes
1163 * include/abg-comparison.h ({diff, type_diff_base, decl_diff_base,
1164 distinct_diff, var_diff, pointer_diff, reference_diff, array_diff,
1165 qualified_type, enum_diff, class_or_union_diff, class_diff,
1166 base_diff, scope_diff, fn_parm_diff, function_type_diff,
1167 function_decl_diff, typedef_diff,
1168 translation_unit_diff}::has_local_changes): Return an enum
1169 change_kind, rather than just a bool.
1170 (is_diff_of_basic_type): Declare an overload that takes a boolean
1172 (is_qualified_type_diff, peel_pointer_diff, peel_reference_diff)
1173 (peel_qualified_type, peel_pointer_or_qualified_type): Declare new
1175 * include/abg-fwd.h (peel_qualified_type):
1176 * include/abg-ir.h (enum change_kind::{LOCAL_TYPE_CHANGE_KIND,
1177 LOCAL_NON_TYPE_CHANGE_KIND, ALL_LOCAL_CHANGES_MASK}): Add these
1178 three new enumerators.
1179 * src/abg-comparison.cc ({distinct_diff, var_diff, pointer_diff,
1180 array_diff, reference_diff, qualified_type_diff, enum_diff,
1181 class_or_union_diff, class_diff, base_diff, scope_diff,
1182 fn_parm_diff, function_type_diff, function_decl_diff,
1183 type_decl_diff, typedef_diff,
1184 translation_unit_diff}::has_local_changes): Adjust to return an
1185 enum change_kind, rather than just a bool.
1186 (has_local_type_change_only): Define new functions.
1187 (has_basic_type_change_only): Use the new
1188 has_local_type_change_only function and the new overload for
1189 is_diff_of_basic_type.
1190 (is_diff_of_basic_type): Define an overload that takes a boolean
1192 (is_qualified_type_diff, peel_pointer_diff, peel_reference_diff)
1193 (peel_qualified_type, peel_pointer_or_qualified_type): Define new
1195 * src/abg-ir.cc (equals): In the overloads for decl_base,
1196 scope_decl, type_base, qualified_type_diff, pointer_type_def,
1197 reference_type_def, array_type_def, enum_type_decl, typedef_decl,
1198 var_decl, function_type, function_decl, function_decl::parameter,
1199 class_or_union, class_decl::base_spec and class_decl, properly set
1200 the new abigail::ir::{LOCAL_CHANGE_KIND,
1201 LOCAL_NON_TYPE_CHANGE_KIND, LOCAL_TYPE_CHANGE_KIND} bits.
1202 (types_have_similar_structure): Peel qualified types and typedefs
1204 (peel_qualified_or_typedef_type): Define new function.
1205 * tests/data/test-diff-pkg/spice-server-0.12.4-19.el7.x86_64-0.12.8-1.el7.x86_64-report-3.txt:
1207 * tests/data/test-diff-filter/libtest45-basic-type-change-report-{0,1}.txt:
1208 New reference test reports.
1209 * tests/data/test-diff-filter/libtest45-basic-type-change-v{0,1}.so:
1210 New input test binaries.
1211 * tests/data/test-diff-filter/test45-basic-type-change-v{0,1}.cc:
1212 Source code of the input test binaries above.
1213 * tests/data/Makefile.am: Add the new test file above to source
1215 * tests/test-diff-filter.cc: Add the test input above to the test
1218 2018-05-18 Dodji Seketeli <dodji@redhat.com>
1220 Improve detection of local *type* changes
1221 * include/abg-fwd.h (is_type_decl): Declare new overload for
1223 (types_have_similar_structure): Declare new function.
1224 * src/abg-comparison.cc
1225 (class_or_union_diff::priv::count_filtered_changed_dm): Even when
1226 looking at local changes only, do not forget to count nodes that
1228 * src/abg-ir.cc (types_have_similar_structure): Define new
1230 (is_type_decl): Define new overload for
1233 (equals): In the overload for var_decl, use the new
1234 types_have_similar_structure function to detect local (type)
1236 * src/abg-reporter-priv.cc (represent): In the overload for
1237 var_decl, use the diff::has_local_changes function to detect local
1238 changes, now that we can better detect local changes.
1239 * tests/data/test-diff-filter/test44-anonymous-data-member-report-1.txt:
1241 * tests/data/test-diff-suppr/test36-leaf-report-0.txt: Likewise.
1243 2018-05-16 Dodji Seketeli <dodji@redhat.com>
1245 Remove references, arrays and fn parms from leaf diff nodes
1246 * src/abg-comparison.cc
1247 (leaf_diff_node_marker_visitor::visit_begin): Do not mark
1248 references, array and fn parms diff nodes as leaf nodes.
1249 * tests/data/test-diff-pkg/spice-server-0.12.4-19.el7.x86_64-0.12.8-1.el7.x86_64-report-3.txt:
1252 2018-05-23 Dodji Seketeli <dodji@redhat.com>
1254 Fix typo in tests/runtestdefaultsupprs.py
1255 * tests/runtestdefaultsupprs.py.in: Fix typo.
1257 2018-05-17 Dodji Seketeli <dodji@redhat.com>
1260 * ChangeLog: Update this file automatically by running the "make
1261 update-changelog" command.
1263 2018-05-17 Dodji Seketeli <dodji@redhat.com>
1265 Update NEWS file for 1.3 release
1266 * NEWS: Update for 1.3.
1268 2018-05-16 Dodji Seketeli <dodji@redhat.com>
1270 Don't bail because "rpm" issued an error
1271 * src/abg-tools-utils.cc (get_dsos_provided_by_rpm): Do not fail
1272 when the rpm command issues an error. Rather rely on the presence
1273 of a valid output or not. Also, make sure to filter out error
1274 outputs so that they don't appear in the general output of tools
1275 using this function.
1277 2018-05-16 Dodji Seketeli <dodji@redhat.com>
1279 Handle cases where no python2 interpreter is found
1280 * configure.ac: When no python2 is found and only python3 is
1281 found, then use python3.
1283 2018-05-16 Dodji Seketeli <dodji@redhat.com>
1285 Use the correct python interpreter in runtestdefaultsupprs.py
1286 * configure.ac: Make the PYTHON environemnt variable usable in
1287 auto-generated files.
1288 * tests/runtestdefaultsupprs.py.in: Use the python interpreter
1289 detected by configure.
1291 2018-05-16 Dodji Seketeli <dodji@redhat.com>
1293 Use the dynamically selected python for Koji configure tests
1294 * configure.ac: Use the python interpreter that was selected by
1295 the configure script for the Koji version test.
1297 2018-05-14 Dodji Seketeli <dodji@redhat.com>
1299 Sort the output of the leaf reporter
1300 * include/abg-comparison.h (diff_ptrs_type): Define new typedef.
1301 * src/abg-comparison-priv.h (sort_string_diff_ptr_map): Declare
1303 * src/abg-comparison.cc (sort_string_diff_sptr_map): Update
1305 (sort_string_diff_ptr_map): Define new function.
1306 * src/abg-leaf-reporter.cc (report_diffs): Sort the diff nodes
1307 before reporting about them.
1308 * tests/data/test-diff-suppr/test36-leaf-report-0.txt: Adjust.
1310 2018-05-14 Dodji Seketeli <dodji@redhat.com>
1312 Show data member offsets in bytes too
1313 * src/abg-reporter-priv.cc (represent): In the overload for
1314 var_diff_sptr, use the function show_offset_or_size, rather than
1316 * tests/data/test-diff-filter/test31-pr18535-libstdc++-report-0.txt: Adjust.
1317 * tests/data/test-diff-filter/test31-pr18535-libstdc++-report-1.txt: Adjust.
1318 * tests/data/test-diff-filter/test44-anonymous-data-member-report-0.txt: Adjust.
1319 * tests/data/test-diff-filter/test44-anonymous-data-member-report-1.txt: Adjust.
1321 2018-05-09 Dodji Seketeli <dodji@redhat.com>
1323 Initial support of anonymous data members
1324 * include/abg-comparison.h (is_class_or_union_diff)
1325 (is_anonymous_class_or_union_diff): Declare new functions.
1326 * include/abg-fwd.h (is_class_type): Declare new overload for
1328 (is_data_member): Declare new overload for decl_base*.
1329 (is_anonymous_data_member)
1330 (anonymous_data_member_to_class_or_union)
1331 (get_class_or_union_flat_representation)
1332 (data_member_has_anonymous_type): Declare new functions.
1333 (is_at_class_scope): Return the class or union scope.
1334 * include/abg-ir.h (var_decl::get_qualified_name): New virtual
1335 data member which overloads decl_base::get_qualified_name.
1336 * src/abg-comparison.cc (is_class_or_union_diff)
1337 (is_anonymous_class_or_union_diff): Define new functions
1338 (leaf_diff_node_marker_visitor::visit_begin): Don't mark anonymous
1339 class or union diff nodes as diff nodes.
1340 * src/abg-ir.cc (is_data_member): Define new overload for
1342 (is_class_type, is_union_type): Define new overload for type_or_decl_base&.
1343 (is_anonymous_data_member)
1344 (anonymous_data_member_to_class_or_union)
1345 (get_class_or_union_flat_representation)
1346 (data_member_has_anonymous_type): Define new function overloads.
1347 (var_decl::get_qualified_name): Define new virtual member
1349 (is_at_class_scope): Return the class or union scope.
1350 (var_decl::get_pretty_representation): Support anonymous data
1352 (equals): In the overload for class_or_union_diff, mark data
1353 member textual representation changes as local changes.
1354 * src/abg-reporter-priv.cc (represent): In the overload for
1355 var_diff, support changes to anonymous data members.
1356 * src/abg-leaf-reporter.cc (leaf_reporter::report): Report sorted
1357 -- by offset -- data member changes before the ones that are
1358 sorted by other things.
1359 * tests/data/test-diff-filter/libtest44-anonymous-data-member-v{0,1}.so:
1360 New binary test input
1361 * tests/data/test-diff-filter/test44-anonymous-data-member-report-{0,1}.txt:
1362 New reference test outputs.
1363 * tests/data/test-diff-filter/test44-anonymous-data-member-v{0,1}.c:
1364 Source code of the new binary test output above.
1365 * tests/data/Makefile.am: Add the new test files above to the
1366 source distribution.
1367 * tests/data/test-annotate/libtest23.so.abi: Adjust test reference
1369 * tests/data/test-annotate/libtest24-drop-fns-2.so.abi: Likewise.
1370 * tests/data/test-annotate/libtest24-drop-fns.so.abi: Likewise.
1371 * tests/data/test-annotate/test13-pr18894.so.abi: Likewise.
1372 * tests/data/test-annotate/test14-pr18893.so.abi: Likewise.
1373 * tests/data/test-annotate/test15-pr18892.so.abi: Likewise.
1374 * tests/data/test-annotate/test17-pr19027.so.abi: Likewise.
1375 * tests/data/test-annotate/test18-pr19037-libvtkRenderingLIC-6.1.so.abi: Likewise.
1376 * tests/data/test-annotate/test19-pr19023-libtcmalloc_and_profiler.so.abi: Likewise.
1377 * tests/data/test-annotate/test20-pr19025-libvtkParallelCore-6.1.so.abi: Likewise.
1378 * tests/data/test-annotate/test21-pr19092.so.abi: Likewise.
1379 * tests/data/test-diff-dwarf/test43-PR22913-report-0.txt: Likewise.
1380 * tests/data/test-diff-filter/test30-pr18904-rvalueref-report0.txt: Likewise.
1381 * tests/data/test-diff-filter/test30-pr18904-rvalueref-report1.txt: Likewise.
1382 * tests/data/test-diff-filter/test30-pr18904-rvalueref-report2.txt: Likewise.
1383 * tests/data/test-diff-filter/test31-pr18535-libstdc++-report-0.txt: Likewise.
1384 * tests/data/test-diff-filter/test31-pr18535-libstdc++-report-1.txt: Likewise.
1385 * tests/data/test-diff-filter/test35-pr18754-no-added-syms-report-0.txt: Likewise.
1386 * tests/data/test-diff-pkg/libcdio-0.94-1.fc26.x86_64--libcdio-0.94-2.fc26.x86_64-report.1.txt: Likewise.
1387 * tests/data/test-diff-pkg/spice-server-0.12.4-19.el7.x86_64-0.12.8-1.el7.x86_64-report-2.txt: Likewise.
1389 2018-04-20 Dodji Seketeli <dodji@redhat.com>
1391 Represent sizes and offsets in bytes and hexadecimal values
1392 * doc/manuals/abidiff.rst: Add documentation for the new
1393 --show-bits, --show-bytes, --show-hex and --show-dec options.
1394 * doc/manuals/abipkgdiff.rst: Likewise.
1395 * doc/manuals/kmidiff.rst: Likewise.
1396 * include/abg-comparison.h (diff_context::{show_hex_values,
1397 show_offsets_sizes_in_bits}): Declare new member functions.
1398 * src/abg-comparison-priv.h (diff_context::priv::{hex_values_,
1399 show_offsets_sizes_in_bits_}): Declare new data members.
1400 (diff_context::priv::priv): Initialize them.
1401 * src/abg-comparison.cc (diff_context::{show_hex_values,
1402 show_offsets_sizes_in_bits}): Define new member functions.
1403 * src/abg-default-reporter.cc (default_reporter::report): Adjust
1404 the call to maybe_report_diff_for_symbol.
1405 * src/abg-leaf-reporter.cc (leaf_reporter::report): Likewise.
1406 * src/abg-reporter-priv.h (convert_bits_to_bytes)
1407 (maybe_convert_bits_to_bytes, emit_num_value, show_offset_or_size)
1408 (show_numerical_change): Declare new functions.
1409 (maybe_report_diff_for_symbol): Take a diff_context in parameter.
1410 * src/abg-reporter-priv.cc (convert_bits_to_bytes, emit_num_value)
1411 (maybe_convert_bits_to_bytes, show_numerical_change)
1412 (show_offset_or_size): Define new functions.
1413 (represent): In the overload for method_decl, var_decl, use the
1414 new emit_num_value function.
1415 (represent_data_member): Use the new show_offset_or_size function.
1416 (maybe_show_relative_offset_change): Use the new
1417 convert_bits_to_bytes, diff_context::show_offsets_sizes_in_bits,
1418 emit_num_value functions.
1419 (maybe_show_relative_offset_change): Likewise.
1420 (report_size_and_alignment_changes): Use the new emit_num_value
1421 and show_numerical_change functions.
1422 (maybe_report_diff_for_symbol): Tak a diff_context in argument.
1423 Use the new show_numerical_change function.
1424 * tests/test-diff-filter.cc (in_out_spec): Add a new entry to test
1425 hexa and bytes output.
1426 * tools/abidiff.cc (options::{show_hexadecimal_values,
1427 show_offsets_sizes_in_bits}): New data members.
1428 (options::options): Initialize them.
1429 (display_usage): New help strings for the new
1430 --show{bytes,bits,hex,dec} options.
1431 (parse_command_line): Parse the new --show{bytes,bits,hex,dec} options.
1432 (set_diff_context_from_opts) Set the diff context wrt hex and
1434 * tools/abipkgdiff.cc (options::{show_hexadecimal_values,
1435 show_offsets_sizes_in_bits}): New data members.
1436 (options::options): Initialize them.
1437 (display_usage): New help strings for the new
1438 --show{bytes,bits,hex,dec} options.
1439 (set_diff_context_from_opts): Set the diff context wrt hex and
1441 (parse_command_line): Parse the new --show{bytes,bits,hex,dec}
1443 * tools/kmidiff.cc (options::{show_hexadecimal_values,
1444 show_offsets_sizes_in_bits}): New data members.
1445 (options::options): Initialize them.
1446 (display_usage):New help strings for the new
1447 --show{bytes,bits,hex,dec} options.
1448 (parse_command_line): Parse the new --show{bytes,bits,hex,dec}
1450 (set_diff_context): Set the diff context wrt hex and bytes values.
1451 * tests/data/test-diff-filter/test30-pr18904-rvalueref-report2.txt:
1452 New reference test output.
1453 * tests/data/Makefile.am: Add the new reference test output above
1454 to source distribution.
1455 * tests/data/test-abicompat/test0-fn-changed-report-0.txt: Adjust.
1456 * tests/data/test-abicompat/test0-fn-changed-report-2.txt: Likewise.
1457 * tests/data/test-abicompat/test5-fn-changed-report-0.txt: Likewise.
1458 * tests/data/test-abicompat/test5-fn-changed-report-1.txt: Likewise.
1459 * tests/data/test-abicompat/test6-var-changed-report-0.txt: Likewise.
1460 * tests/data/test-abicompat/test6-var-changed-report-1.txt: Likewise.
1461 * tests/data/test-abicompat/test7-fn-changed-report-0.txt: Likewise.
1462 * tests/data/test-abicompat/test7-fn-changed-report-1.txt: Likewise.
1463 * tests/data/test-abicompat/test7-fn-changed-report-2.txt: Likewise.
1464 * tests/data/test-abicompat/test8-fn-changed-report-0.txt: Likewise.
1465 * tests/data/test-abicompat/test9-fn-changed-report-0.txt: Likewise.
1466 * tests/data/test-abidiff/test-PR18791-report0.txt: Likewise.
1467 * tests/data/test-abidiff/test-qual-type0-report.txt: Likewise.
1468 * tests/data/test-abidiff/test-struct0-report.txt: Likewise.
1469 * tests/data/test-abidiff/test-struct1-report.txt: Likewise.
1470 * tests/data/test-abidiff/test-var0-report.txt: Likewise.
1471 * tests/data/test-diff-dwarf/test0-report.txt: Likewise.
1472 * tests/data/test-diff-dwarf/test1-report.txt: Likewise.
1473 * tests/data/test-diff-dwarf/test10-report.txt: Likewise.
1474 * tests/data/test-diff-dwarf/test11-report.txt: Likewise.
1475 * tests/data/test-diff-dwarf/test13-report.txt: Likewise.
1476 * tests/data/test-diff-dwarf/test21-redundant-fn-report-0.txt: Likewise.
1477 * tests/data/test-diff-dwarf/test22-changed-parm-c-report-0.txt: Likewise.
1478 * tests/data/test-diff-dwarf/test26-added-parms-before-variadic-report.txt: Likewise.
1479 * tests/data/test-diff-dwarf/test27-local-base-diff-report.txt: Likewise.
1480 * tests/data/test-diff-dwarf/test3-report.txt: Likewise.
1481 * tests/data/test-diff-dwarf/test32-fnptr-changes-report-0.txt: Likewise.
1482 * tests/data/test-diff-dwarf/test33-fnref-changes-report-0.txt: Likewise.
1483 * tests/data/test-diff-dwarf/test34-pr19173-libfoo-report-0.txt: Likewise.
1484 * tests/data/test-diff-dwarf/test35-pr19173-libfoo-long-clang-report-0.txt: Likewise.
1485 * tests/data/test-diff-dwarf/test35-pr19173-libfoo-long-gcc-report-0.txt: Likewise.
1486 * tests/data/test-diff-dwarf/test36-ppc64-aliases-report-0.txt: Likewise.
1487 * tests/data/test-diff-dwarf/test37-union-report-0.txt: Likewise.
1488 * tests/data/test-diff-dwarf/test39-union-report-0.txt: Likewise.
1489 * tests/data/test-diff-dwarf/test40-report-0.txt: Likewise.
1490 * tests/data/test-diff-dwarf/test43-PR22913-report-0.txt: Likewise.
1491 * tests/data/test-diff-dwarf/test8-report.txt: Likewise.
1492 * tests/data/test-diff-dwarf/test9-report.txt: Likewise.
1493 * tests/data/test-diff-filter/test0-report.txt: Likewise.
1494 * tests/data/test-diff-filter/test01-report.txt: Likewise.
1495 * tests/data/test-diff-filter/test1-report.txt: Likewise.
1496 * tests/data/test-diff-filter/test10-report.txt: Likewise.
1497 * tests/data/test-diff-filter/test11-report.txt: Likewise.
1498 * tests/data/test-diff-filter/test13-report.txt: Likewise.
1499 * tests/data/test-diff-filter/test14-0-report.txt: Likewise.
1500 * tests/data/test-diff-filter/test14-1-report.txt: Likewise.
1501 * tests/data/test-diff-filter/test15-0-report.txt: Likewise.
1502 * tests/data/test-diff-filter/test15-1-report.txt: Likewise.
1503 * tests/data/test-diff-filter/test16-report-2.txt: Likewise.
1504 * tests/data/test-diff-filter/test16-report.txt: Likewise.
1505 * tests/data/test-diff-filter/test17-0-report.txt: Likewise.
1506 * tests/data/test-diff-filter/test17-1-report.txt: Likewise.
1507 * tests/data/test-diff-filter/test2-report.txt: Likewise.
1508 * tests/data/test-diff-filter/test27-redundant-and-filtered-children-nodes-report-0.txt: Likewise.
1509 * tests/data/test-diff-filter/test27-redundant-and-filtered-children-nodes-report-1.txt: Likewise.
1510 * tests/data/test-diff-filter/test27-redundant-and-filtered-children-nodes-report-2.txt: Likewise.
1511 * tests/data/test-diff-filter/test28-redundant-and-filtered-children-nodes-report-0.txt: Likewise.
1512 * tests/data/test-diff-filter/test28-redundant-and-filtered-children-nodes-report-1.txt: Likewise.
1513 * tests/data/test-diff-filter/test29-finer-redundancy-marking-report-0.txt: Likewise.
1514 * tests/data/test-diff-filter/test3-report.txt: Likewise.
1515 * tests/data/test-diff-filter/test30-pr18904-rvalueref-report0.txt: Likewise.
1516 * tests/data/test-diff-filter/test30-pr18904-rvalueref-report1.txt: Likewise.
1517 * tests/data/test-diff-filter/test31-pr18535-libstdc++-report-0.txt: Likewise.
1518 * tests/data/test-diff-filter/test31-pr18535-libstdc++-report-1.txt: Likewise.
1519 * tests/data/test-diff-filter/test32-ppc64le-struct-change-report0.txt: Likewise.
1520 * tests/data/test-diff-filter/test35-pr18754-no-added-syms-report-0.txt: Likewise.
1521 * tests/data/test-diff-filter/test35-pr18754-no-added-syms-report-1.txt: Likewise.
1522 * tests/data/test-diff-filter/test37-report-0.txt: Likewise.
1523 * tests/data/test-diff-filter/test39/test39-report-0.txt: Likewise.
1524 * tests/data/test-diff-filter/test42-leaf-report-output-0.txt: Likewise.
1525 * tests/data/test-diff-filter/test6-report.txt: Likewise.
1526 * tests/data/test-diff-filter/test9-report.txt: Likewise.
1527 * tests/data/test-diff-pkg/dirpkg-1-report-1.txt: Likewise.
1528 * tests/data/test-diff-pkg/dirpkg-3-report-1.txt: Likewise.
1529 * tests/data/test-diff-pkg/dirpkg-3-report-2.txt: Likewise.
1530 * tests/data/test-diff-pkg/libICE-1.0.6-1.el6.x86_64.rpm--libICE-1.0.9-2.el7.x86_64.rpm-report-0.txt: Likewise.
1531 * tests/data/test-diff-pkg/libsigc++-2.0-0c2a_2.4.0-1_amd64--libsigc++-2.0-0v5_2.4.1-1ubuntu2_amd64-report-0.txt: Likewise.
1532 * tests/data/test-diff-pkg/spice-server-0.12.4-19.el7.x86_64-0.12.8-1.el7.x86_64-report-2.txt: Likewise.
1533 * tests/data/test-diff-pkg/symlink-dir-test1-report0.txt: Likewise.
1534 * tests/data/test-diff-pkg/tarpkg-0-report-0.txt: Likewise.
1535 * tests/data/test-diff-pkg/tarpkg-1-report-0.txt: Likewise.
1536 * tests/data/test-diff-pkg/tbb-4.1-9.20130314.fc22.x86_64--tbb-4.3-3.20141204.fc23.x86_64-report-0.txt: Likewise.
1537 * tests/data/test-diff-pkg/tbb-4.1-9.20130314.fc22.x86_64--tbb-4.3-3.20141204.fc23.x86_64-report-1.txt: Likewise.
1538 * tests/data/test-diff-suppr/test0-type-suppr-report-0.txt: Likewise.
1539 * tests/data/test-diff-suppr/test0-type-suppr-report-3.txt: Likewise.
1540 * tests/data/test-diff-suppr/test0-type-suppr-report-5.txt: Likewise.
1541 * tests/data/test-diff-suppr/test0-type-suppr-report-7.txt: Likewise.
1542 * tests/data/test-diff-suppr/test1-typedef-suppr-report-0.txt: Likewise.
1543 * tests/data/test-diff-suppr/test1-typedef-suppr-report-2.txt: Likewise.
1544 * tests/data/test-diff-suppr/test11-add-data-member-report-0.txt: Likewise.
1545 * tests/data/test-diff-suppr/test12-add-data-member-report-0.txt: Likewise.
1546 * tests/data/test-diff-suppr/test12-add-data-member-report-2.txt: Likewise.
1547 * tests/data/test-diff-suppr/test13-suppr-through-pointer-report-0.txt: Likewise.
1548 * tests/data/test-diff-suppr/test13-suppr-through-pointer-report-1.txt: Likewise.
1549 * tests/data/test-diff-suppr/test14-suppr-non-redundant-report-0.txt: Likewise.
1550 * tests/data/test-diff-suppr/test14-suppr-non-redundant-report-1.txt: Likewise.
1551 * tests/data/test-diff-suppr/test15-suppr-added-fn-report-0.txt: Likewise.
1552 * tests/data/test-diff-suppr/test15-suppr-added-fn-report-1.txt: Likewise.
1553 * tests/data/test-diff-suppr/test15-suppr-added-fn-report-5.txt: Likewise.
1554 * tests/data/test-diff-suppr/test16-suppr-removed-fn-report-0.txt: Likewise.
1555 * tests/data/test-diff-suppr/test16-suppr-removed-fn-report-2.txt: Likewise.
1556 * tests/data/test-diff-suppr/test17-suppr-added-var-report-0.txt: Likewise.
1557 * tests/data/test-diff-suppr/test17-suppr-added-var-report-2.txt: Likewise.
1558 * tests/data/test-diff-suppr/test17-suppr-added-var-report-5.txt: Likewise.
1559 * tests/data/test-diff-suppr/test18-suppr-removed-var-report-0.txt: Likewise.
1560 * tests/data/test-diff-suppr/test18-suppr-removed-var-report-2.txt: Likewise.
1561 * tests/data/test-diff-suppr/test18-suppr-removed-var-report-5.txt: Likewise.
1562 * tests/data/test-diff-suppr/test2-struct-suppr-report-0.txt: Likewise.
1563 * tests/data/test-diff-suppr/test23-alias-filter-report-0.txt: Likewise.
1564 * tests/data/test-diff-suppr/test23-alias-filter-report-2.txt: Likewise.
1565 * tests/data/test-diff-suppr/test24-soname-report-1.txt: Likewise.
1566 * tests/data/test-diff-suppr/test24-soname-report-10.txt: Likewise.
1567 * tests/data/test-diff-suppr/test24-soname-report-12.txt: Likewise.
1568 * tests/data/test-diff-suppr/test24-soname-report-14.txt: Likewise.
1569 * tests/data/test-diff-suppr/test24-soname-report-16.txt: Likewise.
1570 * tests/data/test-diff-suppr/test24-soname-report-4.txt: Likewise.
1571 * tests/data/test-diff-suppr/test25-typedef-report-0.txt: Likewise.
1572 * tests/data/test-diff-suppr/test26-loc-suppr-report-0.txt: Likewise.
1573 * tests/data/test-diff-suppr/test26-loc-suppr-report-3.txt: Likewise.
1574 * tests/data/test-diff-suppr/test29-soname-report-3.txt: Likewise.
1575 * tests/data/test-diff-suppr/test29-soname-report-6.txt: Likewise.
1576 * tests/data/test-diff-suppr/test29-soname-report-8.txt: Likewise.
1577 * tests/data/test-diff-suppr/test3-struct-suppr-report-0.txt: Likewise.
1578 * tests/data/test-diff-suppr/test3-struct-suppr-report-1.txt: Likewise.
1579 * tests/data/test-diff-suppr/test3-struct-suppr-report-2.txt: Likewise.
1580 * tests/data/test-diff-suppr/test30-report-0.txt: Likewise.
1581 * tests/data/test-diff-suppr/test31-report-1.txt: Likewise.
1582 * tests/data/test-diff-suppr/test32-report-0.txt: Likewise.
1583 * tests/data/test-diff-suppr/test32-report-1.txt: Likewise.
1584 * tests/data/test-diff-suppr/test33-report-0.txt: Likewise.
1585 * tests/data/test-diff-suppr/test35-leaf-report-0.txt: Likewise.
1586 * tests/data/test-diff-suppr/test36-leaf-report-0.txt: Likewise.
1587 * tests/data/test-diff-suppr/test4-local-suppr-report-0.txt: Likewise.
1588 * tests/data/test-diff-suppr/test4-local-suppr-report-1.txt: Likewise.
1589 * tests/data/test-diff-suppr/test5-fn-suppr-report-0.txt: Likewise.
1590 * tests/data/test-diff-suppr/test5-fn-suppr-report-1.txt: Likewise.
1591 * tests/data/test-diff-suppr/test5-fn-suppr-report-2.txt: Likewise.
1592 * tests/data/test-diff-suppr/test5-fn-suppr-report-3.txt: Likewise.
1593 * tests/data/test-diff-suppr/test5-fn-suppr-report-4.txt: Likewise.
1594 * tests/data/test-diff-suppr/test5-fn-suppr-report-5.txt: Likewise.
1595 * tests/data/test-diff-suppr/test6-fn-suppr-report-0-1.txt: Likewise.
1596 * tests/data/test-diff-suppr/test6-fn-suppr-report-0.txt: Likewise.
1597 * tests/data/test-diff-suppr/test6-fn-suppr-report-1.txt: Likewise.
1598 * tests/data/test-diff-suppr/test6-fn-suppr-report-2.txt: Likewise.
1599 * tests/data/test-diff-suppr/test6-fn-suppr-report-3.txt: Likewise.
1600 * tests/data/test-diff-suppr/test7-var-suppr-report-0.txt: Likewise.
1601 * tests/data/test-diff-suppr/test7-var-suppr-report-1.txt: Likewise.
1602 * tests/data/test-diff-suppr/test7-var-suppr-report-2.txt: Likewise.
1603 * tests/data/test-diff-suppr/test7-var-suppr-report-3.txt: Likewise.
1604 * tests/data/test-diff-suppr/test7-var-suppr-report-4.txt: Likewise.
1605 * tests/data/test-diff-suppr/test7-var-suppr-report-7.txt: Likewise.
1606 * tests/data/test-diff-suppr/test7-var-suppr-report-8.txt: Likewise.
1607 * tests/data/test-diff-suppr/test8-redundant-fn-report-0.txt: Likewise.
1608 * tests/data/test-diff-suppr/test8-redundant-fn-report-1.txt: Likewise.
1609 * tests/data/test-diff-suppr/test9-changed-parm-c-report-0.txt: Likewise.
1610 * tests/data/test-diff-suppr/test9-changed-parm-c-report-1.txt: Likewise.
1612 2018-04-18 Dodji Seketeli <dodji@redhat.com>
1614 Use absolute builddir paths in automake test files
1615 * tests/runtestdefaultsupprs.py.in: Use abs_top_builddir rather
1618 2018-04-10 Jonathan Wakely <jwakely@redhat.com>
1620 Use std::string::substr instead of appending single chars
1621 * src/abg-ini.cc (trim_white_space): Use std::string::substr
1622 instead of appending single chars.
1624 2018-04-10 Jonathan Wakely <jwakely@redhat.com>
1626 Rename misleading remove_trailing_white_spaces functions
1627 * include/abg-tools-utils.h (trim_white_space): Renamed
1628 remove_trailing_white_spaces into this.
1629 * src/abg-ini.cc (trim_white_space): Likewise.
1630 * src/abg-tools-utils.cc (get_dsos_provided_by_rpm): Adjust.
1632 2018-04-10 Jonathan Wakely <jwakely@redhat.com>
1634 Remove unused local set<string> variables
1635 * src/abg-tools-utils.cc (get_dsos_provided_by_rpm): Remove unsed
1636 set<string> variable.
1637 * tools/abipkgdiff.cc (maybe_create_public_dso_sonames_set):
1640 2018-04-10 Jonathan Wakely <jwakely@redhat.com>
1642 Remove assertion with side-effects
1643 * src/abg-tools-utils.cc (get_dsos_provided_by_rpm): Fix
1644 std::string::sbustr and remove assert with side effect.
1646 2018-04-13 Dodji Seketeli <dodji@redhat.com>
1649 * src/abg-comparison.cc (category_propagation_visitor): Adjust comment.
1650 * src/abg-default-reporter.cc
1651 (default_reporter::report_local_function_type_changes): Remove
1654 2018-04-13 Dodji Seketeli <dodji@redhat.com>
1656 Update tests for the "better leaf mode redundancy management" patchset
1657 * tests/data/test-abidiff-exit/test1-voffset-change-report1.txt: Adjust.
1658 * tests/data/test-abidiff/test-PR18791-report0.txt: Likewise.
1659 * tests/data/test-abidiff/test-enum0-report.txt: Likewise.
1660 * tests/data/test-abidiff/test-enum1-report.txt: Likewise.
1661 * tests/data/test-diff-filter/test1-report.txt: Likewise.
1662 * tests/data/test-diff-filter/test14-0-report.txt: Likewise.
1663 * tests/data/test-diff-filter/test15-0-report.txt: Likewise.
1664 * tests/data/test-diff-filter/test17-0-report.txt: Likewise.
1665 * tests/data/test-diff-filter/test27-redundant-and-filtered-children-nodes-report-0.txt: Likewise.
1666 * tests/data/test-diff-filter/test28-redundant-and-filtered-children-nodes-report-0.txt: Likewise.
1667 * tests/data/test-diff-filter/test3-report.txt: Likewise.
1668 * tests/data/test-diff-filter/test30-pr18904-rvalueref-report0.txt: Likewise.
1669 * tests/data/test-diff-filter/test30-pr18904-rvalueref-report1.txt: Likewise.
1670 * tests/data/test-diff-filter/test32-ppc64le-struct-change-report0.txt: Likewise.
1671 * tests/data/test-diff-filter/test35-pr18754-no-added-syms-report-0.txt: Likewise.
1672 * tests/data/test-diff-filter/test35-pr18754-no-added-syms-report-1.txt: Likewise.
1673 * tests/data/test-diff-filter/test4-report.txt: Likewise.
1674 * tests/data/test-diff-filter/test41-report-0.txt: Likewise.
1675 * tests/data/test-diff-filter/test42-leaf-report-output-0.txt: Likewise.
1676 * tests/data/test-diff-pkg/dirpkg-3-report-1.txt: Likewise.
1677 * tests/data/test-diff-pkg/dirpkg-3-report-2.txt: Likewise.
1678 * tests/data/test-diff-pkg/libICE-1.0.6-1.el6.x86_64.rpm--libICE-1.0.9-2.el7.x86_64.rpm-report-0.txt: Likewise.
1679 * tests/data/test-diff-pkg/libcdio-0.94-1.fc26.x86_64--libcdio-0.94-2.fc26.x86_64-report.1.txt: Likewise.
1680 * tests/data/test-diff-pkg/spice-server-0.12.4-19.el7.x86_64-0.12.8-1.el7.x86_64-report-0.txt: Likewise.
1681 * tests/data/test-diff-pkg/spice-server-0.12.4-19.el7.x86_64-0.12.8-1.el7.x86_64-report-1.txt: Likewise.
1682 * tests/data/test-diff-pkg/spice-server-0.12.4-19.el7.x86_64-0.12.8-1.el7.x86_64-report-2.txt: Likewise.
1683 * tests/data/test-diff-pkg/spice-server-0.12.4-19.el7.x86_64-0.12.8-1.el7.x86_64-report-3.txt: Likewise.
1684 * tests/data/test-diff-pkg/tbb-4.1-9.20130314.fc22.x86_64--tbb-4.3-3.20141204.fc23.x86_64-report-0.txt: Likewise.
1685 * tests/data/test-diff-suppr/test1-typedef-suppr-report-1.txt: Likewise.
1686 * tests/data/test-diff-suppr/test1-typedef-suppr-report-2.txt: Likewise.
1687 * tests/data/test-diff-suppr/test13-suppr-through-pointer-report-1.txt: Likewise.
1688 * tests/data/test-diff-suppr/test14-suppr-non-redundant-report-0.txt: Likewise.
1689 * tests/data/test-diff-suppr/test14-suppr-non-redundant-report-1.txt: Likewise.
1690 * tests/data/test-diff-suppr/test15-suppr-added-fn-report-1.txt: Likewise.
1691 * tests/data/test-diff-suppr/test15-suppr-added-fn-report-2.txt: Likewise.
1692 * tests/data/test-diff-suppr/test15-suppr-added-fn-report-3.txt: Likewise.
1693 * tests/data/test-diff-suppr/test15-suppr-added-fn-report-4.txt: Likewise.
1694 * tests/data/test-diff-suppr/test16-suppr-removed-fn-report-1.txt: Likewise.
1695 * tests/data/test-diff-suppr/test16-suppr-removed-fn-report-2.txt: Likewise.
1696 * tests/data/test-diff-suppr/test16-suppr-removed-fn-report-3.txt: Likewise.
1697 * tests/data/test-diff-suppr/test16-suppr-removed-fn-report-4.txt: Likewise.
1698 * tests/data/test-diff-suppr/test17-suppr-added-var-report-1.txt: Likewise.
1699 * tests/data/test-diff-suppr/test17-suppr-added-var-report-2.txt: Likewise.
1700 * tests/data/test-diff-suppr/test17-suppr-added-var-report-3.txt: Likewise.
1701 * tests/data/test-diff-suppr/test17-suppr-added-var-report-4.txt: Likewise.
1702 * tests/data/test-diff-suppr/test18-suppr-removed-var-report-1.txt: Likewise.
1703 * tests/data/test-diff-suppr/test18-suppr-removed-var-report-3.txt: Likewise.
1704 * tests/data/test-diff-suppr/test18-suppr-removed-var-report-4.txt: Likewise.
1705 * tests/data/test-diff-suppr/test2-struct-suppr-report-0.txt: Likewise.
1706 * tests/data/test-diff-suppr/test2-struct-suppr-report-1.txt: Likewise.
1707 * tests/data/test-diff-suppr/test25-typedef-report-1.txt: Likewise.
1708 * tests/data/test-diff-suppr/test27-add-aliased-function-report-1.txt: Likewise.
1709 * tests/data/test-diff-suppr/test27-add-aliased-function-report-2.txt: Likewise.
1710 * tests/data/test-diff-suppr/test27-add-aliased-function-report-5.txt: Likewise.
1711 * tests/data/test-diff-suppr/test28-add-aliased-function-report-3.txt: Likewise.
1712 * tests/data/test-diff-suppr/test28-add-aliased-function-report-6.txt: Likewise.
1713 * tests/data/test-diff-suppr/test30-report-1.txt: Likewise.
1714 * tests/data/test-diff-suppr/test34-report-0.txt: Likewise.
1715 * tests/data/test-diff-suppr/test35-leaf-report-0.txt: Likewise.
1716 * tests/data/test-diff-suppr/test36-leaf-report-0.txt: Likewise.
1717 * tests/data/test-diff-suppr/test5-fn-suppr-report-1.txt: Likewise.
1718 * tests/data/test-diff-suppr/test5-fn-suppr-report-2.txt: Likewise.
1719 * tests/data/test-diff-suppr/test5-fn-suppr-report-3.txt: Likewise.
1720 * tests/data/test-diff-suppr/test5-fn-suppr-report-4.txt: Likewise.
1721 * tests/data/test-diff-suppr/test5-fn-suppr-report-5.txt: Likewise.
1722 * tests/data/test-diff-suppr/test7-var-suppr-report-1.txt: Likewise.
1723 * tests/data/test-diff-suppr/test7-var-suppr-report-2.txt: Likewise.
1724 * tests/data/test-diff-suppr/test7-var-suppr-report-3.txt: Likewise.
1725 * tests/data/test-diff-suppr/test7-var-suppr-report-4.txt: Likewise.
1726 * tests/data/test-diff-suppr/test7-var-suppr-report-5.txt: Likewise.
1727 * tests/data/test-diff-suppr/test7-var-suppr-report-6.txt: Likewise.
1728 * tests/data/test-diff-suppr/test7-var-suppr-report-7.txt: Likewise.
1729 * tests/data/test-diff-suppr/test7-var-suppr-report-9.txt: Likewise.
1730 * tests/data/test-diff-suppr/test8-redundant-fn-report-0.txt: Likewise.
1732 2018-04-13 Dodji Seketeli <dodji@redhat.com>
1734 [abipkgdiff]: in leaf mode we always show redundant changes
1735 * tools/abipkgdiff.cc (set_diff_context_from_opts):
1736 diff_context::show_leaf_changes_only automatically makes us show
1737 redundant changes. So do not try to show redundant changes in
1740 2018-04-13 Dodji Seketeli <dodji@redhat.com>
1742 When we say an a change was reported earlier give its source location
1743 * src/abg-reporter-priv.h
1744 (RETURN_IF_BEING_REPORTED_OR_WAS_REPORTED_EARLIER2)
1745 (RETURN_IF_BEING_REPORTED_OR_WAS_REPORTED_EARLIER3): Report the
1746 location of the artifact.
1748 2018-04-13 Dodji Seketeli <dodji@redhat.com>
1750 Avoid reporting an enum change if it has already been reported
1751 * src/abg-default-reporter.cc (default_reporter::report): In the
1752 enum_diff overload, do not report a node if it's always been
1753 reported; rather, say that it has been reported earlier.
1755 2018-04-13 Dodji Seketeli <dodji@redhat.com>
1757 Always show redundant changes in leaf mode
1758 * src/abg-comparison.cc (diff_context::show_leaf_changes_only):
1759 Show redundant changes when in leaf mode.
1761 2018-04-12 Dodji Seketeli <dodji@redhat.com>
1763 Fix leaf report of class data member changes
1764 * src/abg-leaf-reporter.cc (leaf_reporter::report): In the
1765 class_or_uion_diff overload, do not emit the data member changes
1767 * src/abg-reporter-priv.cc (represent): In the var_diff_sptr
1768 overload, show data member changes when its textual representation
1771 2018-04-12 Dodji Seketeli <dodji@redhat.com>
1773 Only show leaf type changes in the leaf type changes section
1774 * src/abg-leaf-reporter.cc (report_type_changes_from_diff_maps):
1775 Split this out from leaf_reporter::report_changes_from_diff_maps
1776 and make it report only about leaf *type* changes.
1777 (leaf_reporter::report_changes_from_diff_maps): Use the new
1778 report_type_changes_from_diff_maps function.
1779 (leaf_reporter::report): In the overload for corpus_diff, use the
1780 new report_type_changes_from_diff_maps function, instead of the
1781 report_changes_from_diff_maps function.
1783 2018-04-12 Dodji Seketeli <dodji@redhat.com>
1785 Don't filter out typedef changes with redundant underlying type changes
1786 * src/abg-default-reporter.cc (default_reporter::report): In the
1787 overload for typedef, report underlying type changes een when they
1788 are redundant, if the whole typedef change needs to be repoted.
1790 2018-04-12 Dodji Seketeli <dodji@redhat.com>
1792 Improve function changes reporting in leaf and default mode
1793 * src/abg-default-reporter.cc (default_reporter::report): In the
1794 overload for fn_parm_diff, consider that parameter type changes are
1796 * src/abg-ir.cc (equals): In the overload for function_type,
1797 consider that if the textual representation of the function return
1798 type or a function parameter changed, then that's a local change
1799 for the current instance of function_type. Likewise, in the
1800 overload for function_decl, consider that a change in the textual
1801 representation of the function_decl is a local change. Likewise,
1802 in the overload of function_decl::parameter, consider that a
1803 change in the textual representation of the parameter type is a
1805 * src/abg-leaf-reporter.cc (leaf_reporter::report): Report leaf
1806 changes to functions.
1808 2018-04-12 Dodji Seketeli <dodji@redhat.com>
1810 Better handle category propagation of pointer changes
1811 * src/abg-comparison.cc
1812 (leaf_diff_node_marker_visitor::visit_begin): Do not consider
1813 local pointer changes as being leaf changes.
1814 (suppression_categorization_visitor::visit_end):
1815 Allow propagation of the SUPPRESSED_CATEGORY category to pointer
1817 (redundancy_marking_visitor::visit_end): Allow propagation of the
1818 REDUNDANT_CATEGORY category to pointer diff nodes.
1819 * src/abg-ir.cc (equals): In the pointer_type_def overload,
1820 consider changes where the textual representation of the
1821 pointed-to changed as being local to the pointer type.
1822 * src/abg-leaf-reporter.cc (leaf_reporter::report): In the
1823 pointer_diff overload, report the change in the textual
1824 representation of the pointer.
1826 2018-04-11 Dodji Seketeli <dodji@redhat.com>
1828 Fix meaning of "harmless name change" to avoid overfiltering
1829 * include/abg-ir.h (enum_has_non_name_change): Declare new
1830 * function. Make it a friend of class enum_type_decl.
1831 * src/abg-comp-filter.cc (has_harmless_name_change): A typedef
1832 name change cannot be harmless if the textual representation of
1833 the underlying type changes too. Also, use the new
1834 enum_has_non_name_change to tighten the harmless name change
1835 definition for an enum.
1836 * src/abg-default-reporter.cc
1837 (default_reporter::report_local_typedef_changes): If the name of
1838 the typedef changed, report it no matter what.
1839 * src/abg-ir.cc (enum_has_non_name_change): Define new function.
1841 2018-04-11 Dodji Seketeli <dodji@redhat.com>
1843 Do not mark "distinct" diff nodes as being redundant
1844 * include/abg-comp-filter.h (is_mostly_distinct_diff): Declare new
1846 * include/abg-fwd.h (peel_typedef_pointer_or_reference_type): Take
1847 a boolean to decide to peel qualified types or not.
1848 * src/abg-comp-filter.cc (is_mostly_distinct_diff): Define this function.
1849 * src/abg-comparison.cc (redundancy_marking_visitor::visit_begin):
1850 Do not mark distinct_diff nodes as being redundant.
1851 * src/abg-ir.cc (peel_typedef_pointer_or_reference_type):
1852 Implement taking a boolean to decide to peel qualified types or
1855 2018-04-11 Dodji Seketeli <dodji@redhat.com>
1857 Overhaul of the report diff stats summary
1858 * include/abg-comparison.h
1859 (corpus_diff::diff_stats::{num_leaf_type_changes,
1860 num_leaf_type_changes_filtered_out, net_num_leaf_type_changes,
1861 num_leaf_func_changes, num_leaf_func_changes_filtered_out,
1862 net_num_leaf_func_changes, num_leaf_var_changes,
1863 num_leaf_var_changes_filtered_out, net_num_leaf_var_changes}):
1864 Declare new member functions.
1865 * src/abg-comparison-priv.h
1866 (corpus_diff::priv::count_leaf_type_changes): Declare new member
1868 * src/abg-comparison.cc
1869 (corpus_diff::diff_stats::net_num_leaf_changes): Fix comment.
1870 (corpus_diff::diff_stats::{num_leaf_type_changes,
1871 num_leaf_type_changes_filtered_out, net_num_leaf_type_changes,
1872 num_leaf_func_changes, num_leaf_func_changes_filtered_out,
1873 net_num_leaf_func_changes, num_leaf_var_changes,
1874 num_leaf_var_changes_filtered_out, net_num_leaf_var_changes}):
1875 Define these member functions.
1876 (do_count_diff_map_changes): Move this macro out of ...
1877 (corpus_diff::priv::count_leaf_changes): ... this. Also, use
1878 the new function corpus_diff::priv::count_leaf_type_changes.
1879 (corpus_diff::priv::count_leaf_type_changes): Splitted this out of
1880 the previous corpus_diff::priv::count_leaf_changes function.
1881 (corpus_diff::priv::apply_filters_and_compute_diff_stats): Account
1882 for (filtered) types, functions and variables, in a leaf change
1884 (corpus_diff::priv::emit_diff_stats): Emit a better stat summary
1885 that takes into account leaf-changed types, functions and
1888 2018-04-10 Dodji Seketeli <dodji@redhat.com>
1890 Do not show decl-only-to-def changes in the leaf reporter
1891 * include/abg-comp-filter.h (has_class_decl_only_def_change):
1892 Declare this function.
1893 * src/abg-comp-filter.cc (has_class_decl_only_def_change): Make
1894 this function be non-static.
1895 * src/abg-comparison.cc
1896 (leaf_diff_node_marker_visitor::visit_begin): Use it to avoid
1897 marking class-decl-only-def changes as being leaf changes.
1898 * libtest43-decl-only-def-change-leaf-report-v0.so: New test input file.
1899 * libtest43-decl-only-def-change-leaf-report-v1.so: Likewise.
1900 * test43-decl-only-def-change-leaf-report-0.txt: Likewise.
1901 * test43-decl-only-def-change-leaf-report-v0.cc: Likewise.
1902 * test43-decl-only-def-change-leaf-report-v1.cc: Likewise.
1903 * tests/test-diff-filter.cc (in_out_specs): Run the test over the
1905 * tests/data/Makefile.am: Add the new test materials to source
1908 2018-03-30 Dodji Seketeli <dodji@redhat.com>
1910 Don't possibly forget type definition when reading a CorpusGroup
1911 * src/abg-dwarf-reader.cc (add_or_update_class_type): Look for
1912 declaration-only-ness to determine if we've already seen the same
1913 type from the main corpus of the group.
1915 2018-03-30 Dodji Seketeli <dodji@redhat.com>
1917 Don't crash when invoking kmidiff with no debug info root dir
1918 * tools/kmidiff.cc (main): Do not crash on empty debug info root
1921 2018-03-30 Dodji Seketeli <dodji@redhat.com>
1923 Do not enable fedabipkgdiff tests if fedabipkgdiff itself is disabled
1924 * tests/Makefile.am: Run runtestfedabipkgdiff{py3?}.py only if
1925 fedabipkgdiff itself is enabled.
1927 2018-03-25 Chenxiong Qi <cqi@redhat.com>
1929 Bug 22722 - Make fedabipkgdiff and its tests support both python 3 and 2
1930 * configure.ac: Add new option --enable-python3. Add new
1931 test runner file tests/runtestdefaultsupprs-py3 and
1932 tests/runtestfedabipkgdiffpy3.sh. Add required six Python module.
1933 * tests/Makefile.am: Add new test files
1934 tests/runtestdefaultsupprspy3.sh and
1935 tests/runtestfedabipkgdiffpy3.sh accordingly.
1936 * tests/mockfedabipkgdiff.in: Convert print statement to
1937 six.print_. Replace call to function filter with list
1938 comprehension. Replace basestring with six.string_types.
1939 * tests/runtestdefaultsupprspy3.sh.in: New shell script to run
1940 test runtestdefaultsupprs with Python 3.
1941 * tests/runtestdefaultsupprs.py.in: Repalce a few tabs with
1942 proper number of spaces which is detected by Python 3
1944 * tests/runtestfedabipkgdiffpy3.sh.in: New shell script to run
1945 test runtestfedabipkgdiff with Python 3.
1946 * tests/runtestfedabipkgdiff.py.in: Use python from env in
1947 shebang instead of a fixed path to a Python interpreter.
1948 * tools/fedabipkgdiff: Globally replace print statement with a
1949 function call to print which is available by importing
1950 print_function from __future__ module. Use six.print_ to output
1951 string to stderr instead. Convert function call to map to
1952 for-loop. (cmp_nvr): Change argument to handle a Koji build
1953 mapping instead of only the nvr. (Brew.listBuilds): use the new
1954 cmp_nvr to sort builds.
1956 2018-03-29 Dodji Seketeli <dodji@redhat.com>
1958 Detect the presence of 'rpm' as it's now needed by abipkgdiff
1959 * configure.ac: Detect that the 'rpm' is present. Otherwise,
1960 disable rpm support.
1962 2018-03-28 Dodji Seketeli <dodji@redhat.com>
1964 Make abipkgdiff avoid comparing private DSOs from RPMs
1965 * doc/manuals/abipkgdiff.rst: Add documentation for the new
1966 --private-dso option.
1967 * include/abg-tools-utils.h (execute_command_and_get_output)
1968 (execute_command_and_get_output, remove_trailing_white_spaces):
1969 Declare new functions.
1970 * src/abg-tools-utils.cc (execute_command_and_get_output)
1971 (get_dsos_provided_by_rpm, remove_trailing_white_spaces): Define
1973 * tests/test-diff-pkg.cc (in_out_specs): Add the new --private-dso
1974 option where it makes sense.
1975 * tools/abipkgdiff.cc (options::compare_private_dsos): Add new
1977 (options::options): Initialize it.
1978 (package::public_dso_sonames_): Add new data member.
1979 (package::public_dso_sonames): Add new accessors pair.
1980 (display_usage): Add a help string for the new --private-dso
1982 (maybe_create_public_dso_sonames_set)
1983 (must_compare_public_dso_only): Define new static functions.
1984 (create_maps_of_package_content): Call the new
1985 maybe_create_public_dso_sonames_set. Skip packages which SONAME
1986 is not in the set of public SONAMES.
1987 (parse_command_line): Parse the new --private-dso option.
1989 2018-03-16 Dodji Seketeli <dodji@redhat.com>
1991 Skip changes to function *types* in the leaf reporter
1992 * src/abg-leaf-reporter.cc
1993 (leaf_reporter::report_changes_from_diff_maps): Don't report
1994 function type changes.
1996 2018-03-16 Dodji Seketeli <dodji@redhat.com>
1998 Report change locations in leaf reports
1999 * src/abg-leaf-reporter.cc (report_diffs): Report the source
2000 location of the diff.
2001 * tests/data/test-diff-filter/test42-leaf-report-output-0.txt:
2002 Update test reference output.
2003 * tests/data/test-diff-pkg/spice-server-0.12.4-19.el7.x86_64-0.12.8-1.el7.x86_64-report-3.txt:
2005 * tests/data/test-diff-suppr/test35-leaf-report-0.txt: Likewise.
2006 * tests/data/test-diff-suppr/test36-leaf-report-0.txt: Likewise.
2008 2018-03-06 Dodji Seketeli <dodji@redhat.com>
2010 Make the "upload-release" target be usable in parallel
2011 * Makefile.am: Re-arrange the upload-release target to make it
2012 usable with 'make upload-release -jN'.
2014 2018-03-06 Dodji Seketeli <dodji@redhat.com>
2016 Bump version number to 1.3
2017 * configure.ac: Now that 1.2 is out of the door, bump version
2020 2018-03-06 Dodji Seketeli <dodji@redhat.com>
2022 Update website for 1.2
2023 * doc/website/mainpage.txt: Update link to download the tarball,
2026 2018-03-06 Dodji Seketeli <dodji@redhat.com>
2028 Update ChangeLog for 1.2
2029 * ChangeLog: Updated automatically by running make update-changelog.
2031 2018-03-06 Dodji Seketeli <dodji@redhat.com>
2033 Update NEWS file for 1.2
2034 * NEWS: Update for 1.2
2036 2018-01-31 Dodji Seketeli <dodji@redhat.com>
2038 Fix typo in abipkgdiff documenation
2039 * doc/manuals/abipkgdiff.rst: Fix a typo
2041 2018-01-31 Dodji Seketeli <dodji@redhat.com>
2043 Update abipkgdiff documentation wrt suppression specifications
2044 * doc/manuals/abipkgdiff.rst: Mention the .abignore file that is
2045 read by the tool and considered as a suppression specification
2048 2018-03-06 Dodji Seketeli <dodji@redhat.com>
2050 Fix indentation in the DWARF reader
2051 * src/abg-dwarf-reader.cc (build_subrange_type): Fix indentation.
2053 2018-03-02 Dodji Seketeli <dodji@redhat.com>
2055 Fix the output indentation of abidiff --help
2056 * tools/abidiff.cc (display_usage): Fix indentation of the help
2057 string for the --drop-private-types option.
2059 2018-03-02 Dodji Seketeli <dodji@redhat.com>
2061 Bug 22913 - Correctly de-duplicate pointers to anonymous structs inside a given
2062 * src/abg-dwarf-reader.cc
2063 (pointer_or_qual_die_of_anonymous_class_type)
2064 (die_is_qualified_type): Define new functions.
2065 (compare_dies): If pointers, reference or qualified type have an
2066 anonymous struct as their underlying type, then we need to
2067 structurally compare the underlying anonymous struct.
2068 * tests/data/test-diff-dwarf/libtest43-PR22913-v{0,1}.so: New
2069 binary test input files.
2070 * tests/data/test-diff-dwarf/test43-PR22913-report-0.txt: New
2071 reference output of the comparison of the two binaries above.
2072 * tests/data/test-diff-dwarf/test43-PR22913-v{0,1}.c: Source code
2073 of the binaries above.
2074 * tests/test-diff-dwarf.cc (in_out_specs): Make the test harness
2075 compare the two binaries above.
2076 * tests/data/Makefile.am: Add the new test files above to the
2077 source distribution.
2079 2018-02-27 Dodji Seketeli <dodji@redhat.com>
2081 Initial support for Ada ranges
2082 * include/abg-ir.h (type_maps::subrange_types): Declare new
2084 (is_ada_language, is_subrange_type): Declare new functions.
2085 (class array_type_def::subrange_type): Make this extend type_base
2087 (array_type_def::subrange_type::{get_language, operator==,
2088 get_pretty_representation, traverse}): Declare new member
2090 (ir_node_visitor::visit_begin): Add new overloads for
2091 array_type::def::subrange_type.
2092 * src/abg-dwarf-reader.cc (build_subrange_type): Define new static
2094 (build_subranges_from_array_type_die): Cleanup the parameters of
2096 (build_array_type): Adjust.
2097 (build_ir_node_from_die): Support free-form DW_TAG_subrange_type.
2098 (read_context::odr_is_relevant): Handle Ada.
2099 (die_qualified_type_name): Support DW_TAG_subrange_type.
2100 (die_pretty_print_type): Likewise. Make the handling of
2101 DW_TAG_subrange_type use die_qualified_type_name. Adjust the use
2102 of build_subranges_from_array_type_die.
2103 (get_scope_die): a DW_TAG_array_type cannot be a scope. Rather,
2104 it's its scope that can be a scope.
2105 * src/abg-ir.cc (type_maps::priv::subrange_types_): New data
2107 (type_maps::empty): Adjust.
2108 (type_maps::subrange_types): Define new accessors.
2109 (is_ada_language, is_subrange_type): Define new functions.
2110 (odr_is_relevant): Support Ada.
2111 (maybe_update_types_lookup_map): Add an overload for
2112 array_type_def::subrange_type. In the decl_base_sptr overload,
2113 add support for the array_type_def::subrange_type type.
2114 (struct array_type_def::subrange_type::priv::location_): Remove
2115 this as it's now carried by the parent decl_base type.
2116 (array_type_def::subrange_type::subrange_type): Adjust. Take an
2117 environement pointer, a name, an underlying type and a language.
2118 (array_type_def::subrange_type::{g,s}et_underlying_type): Define
2120 (array_type_def::subrange_type::{get_language,
2121 get_pretty_representation, traverse}): Define new member
2123 (array_type_def::subrange_type::as_string): Add a representation
2125 (equals): Define new overload for array_type_def::subrange_type.
2126 (array_type_def::subrange_type::operator==): Define three new
2127 overloads for decl_base, type_base and subrange_type.
2128 (array_type_def::subrange_type::operator!=): Define new operator.
2129 (get_type_representation): In the overload for array_type_def,
2131 (array_type_def::get_language): Define new member function.
2132 (ir_node_visitor::visit_{begin,end}): Define new overloads for
2133 array_type_def::subrange_type.
2134 * src/abg-reader.cc (build_subrange_type): Adjust documentation.
2135 Support the new 'id', 'name', and 'type-id' properties.
2136 * src/abg-writer.cc (write_array_subrange_type): Define new static
2138 (write_array_type_def): Use the new write_array_subrange_type
2140 * tests/data/test-abidiff/test-PR18166-libtirpc.so.abi: Adjust.
2141 * tests/data/test-annotate/libtest23.so.abi: Likewise.
2142 * tests/data/test-annotate/libtest24-drop-fns-2.so.abi: Likewise.
2143 * tests/data/test-annotate/libtest24-drop-fns.so.abi: Likewise.
2144 * tests/data/test-annotate/test13-pr18894.so.abi: Likewise.
2145 * tests/data/test-annotate/test14-pr18893.so.abi: Likewise.
2146 * tests/data/test-annotate/test15-pr18892.so.abi: Likewise.
2147 * tests/data/test-annotate/test17-pr19027.so.abi: Likewise.
2148 * tests/data/test-annotate/test18-pr19037-libvtkRenderingLIC-6.1.so.abi: Likewise.
2149 * tests/data/test-annotate/test19-pr19023-libtcmalloc_and_profiler.so.abi: Likewise.
2150 * tests/data/test-annotate/test20-pr19025-libvtkParallelCore-6.1.so.abi: Likewise.
2151 * tests/data/test-annotate/test21-pr19092.so.abi: Likewise.
2152 * tests/data/test-annotate/test7.so.abi: Likewise.
2153 * tests/data/test-read-dwarf/PR22015-libboost_iostreams.so.abi: Likewise.
2154 * tests/data/test-read-dwarf/PR22122-libftdc.so.abi: Likewise.
2155 * tests/data/test-read-dwarf/libtest23.so.abi: Likewise.
2156 * tests/data/test-read-dwarf/libtest24-drop-fns-2.so.abi: Likewise.
2157 * tests/data/test-read-dwarf/libtest24-drop-fns.so.abi: Likewise.
2158 * tests/data/test-read-dwarf/test10-pr18818-gcc.so.abi: Likewise.
2159 * tests/data/test-read-dwarf/test11-pr18828.so.abi: Likewise.
2160 * tests/data/test-read-dwarf/test12-pr18844.so.abi: Likewise.
2161 * tests/data/test-read-dwarf/test13-pr18894.so.abi: Likewise.
2162 * tests/data/test-read-dwarf/test14-pr18893.so.abi: Likewise.
2163 * tests/data/test-read-dwarf/test15-pr18892.so.abi: Likewise.
2164 * tests/data/test-read-dwarf/test16-pr18904.so.abi: Likewise.
2165 * tests/data/test-read-dwarf/test17-pr19027.so.abi: Likewise.
2166 * tests/data/test-read-dwarf/test18-pr19037-libvtkRenderingLIC-6.1.so.abi: Likewise.
2167 * tests/data/test-read-dwarf/test19-pr19023-libtcmalloc_and_profiler.so.abi: Likewise.
2168 * tests/data/test-read-dwarf/test20-pr19025-libvtkParallelCore-6.1.so.abi: Likewise.
2169 * tests/data/test-read-dwarf/test21-pr19092.so.abi: Likewise.
2170 * tests/data/test-read-dwarf/test22-pr19097-libstdc++.so.6.0.17.so.abi: Likewise.
2171 * tests/data/test-read-dwarf/test7.so.abi: Likewise.
2172 * tests/data/test-read-dwarf/test9-pr18818-clang.so.abi: Likewise.
2173 * tests/data/test-read-write/test25.xml: Likewise.
2175 2018-02-06 Dodji Seketeli <dodji@redhat.com>
2177 Add newline at end of version string display
2178 * tools/abidiff.cc (main): Add a newline at the end of the version
2180 * tools/abidw.cc (main): Likewise.
2181 * tools/abipkgdiff.cc (main): Likewise.
2182 * tools/kmidiff.cc (main): Likewise.
2184 2018-01-31 Dodji Seketeli <dodji@redhat.com>
2186 Bump version number to 1.2
2187 * configure.ac: Bump version number to 1.2
2189 2018-01-25 Dodji Seketeli <dodji@redhat.com>
2191 Update website for 1.1
2192 * doc/website/mainpage.txt: Update for 1.1.
2194 2018-01-25 Dodji Seketeli <dodji@redhat.com>
2196 Update ChangeLog for 1.1
2197 * ChangeLog: Automatically update using 'make update-changelog'.
2199 2018-01-25 Dodji Seketeli <dodji@redhat.com>
2201 Update NEWS file for 1.1
2202 * NEWS: Update for 1.1
2204 2018-01-29 Dodji Seketeli <dodji@redhat.com>
2206 Correctly link with pthread
2207 * src/Makefile.am: use -lpthread, not -pthread.
2209 2018-01-18 Dodji Seketeli <dodji@redhat.com>
2211 Skip class types with changed names in leaf reports
2212 * include/abg-comp-filter.h (has_class_or_union_type_name_change)
2213 (has_basic_or_class_type_name_change): Declare new functions.
2214 * include/abg-comparison.h (is_diff_of_class_or_union_type):
2216 * src/abg-comp-filter.cc (has_class_or_union_type_name_change)
2217 (has_basic_or_class_type_name_change):
2218 * src/abg-comparison.cc
2219 (leaf_diff_node_marker_visitor::visit_begin): Use the new
2220 filtering::has_basic_or_class_type_name_change to test if a basic
2221 or class/union diff type carries a name change. Update comment.
2222 * tests/data/test-diff-pkg/spice-server-0.12.4-19.el7.x86_64-0.12.8-1.el7.x86_64-report-3.txt:
2225 2018-01-16 Dodji Seketeli <dodji@redhat.com>
2227 Only consider local changes when filtering subtype changes
2228 * src/abg-comparison-priv.h
2229 (class_or_union_diff::priv::{count_filtered_subtype_changed_dm,
2230 count_filtered_changed_dm}): Take an additional flag.
2231 * src/abg-comparison.cc
2232 (class_or_union_diff::priv::{count_filtered_subtype_changed_dm,
2233 count_filtered_changed_dm}): Likewise. When asked, only consider
2235 * src/abg-leaf-reporter.cc (leaf_reporter::report): Consider
2236 reporting only the *net local* data member changes.
2238 2018-01-16 Dodji Seketeli <dodji@redhat.com>
2240 Make kmidiff show the wrong option when it complains about it
2241 * tools/kmidiff.cc (parse_command_line): Don't forget to record
2242 the wrong option in options::wrong_option.
2244 2018-01-12 Dodji Seketeli <dodji@redhat.com>
2246 Fix typo in abipkgdiff.cc
2247 * tools/abipkgdiff.cc (compare_task::perform): Fix a typo in a
2250 2018-01-12 Dodji Seketeli <dodji@redhat.com>
2252 Suppress duplicates when listing package content
2253 * tools/abipkgdiff.cc (maybe_update_package_content): Rename
2254 maybe_update_vector_of_package_content into this. Take a set of
2255 strings, rather than a vector of strings.
2256 (get_interesting_files_under_dir): Adjust.
2258 2018-01-12 Dodji Seketeli <dodji@redhat.com>
2260 Fix symlinks paths handling in abipkgdiff
2261 * include/abg-tools-utils.h (real_path): Declare new function.
2262 * src/abg-tools-utils.cc (real_path): Define it.
2263 * tools/abipkgdiff.cc (package::convert_path_to_relative): Use the
2264 new real_path function to consider real path (where symlinks are
2265 resolved) of the extraction directory of the package.
2266 (get_interesting_files_under_dir): Similarly, use the new
2267 real_path function to consider the real path of the directory we
2270 2018-01-12 Dodji Seketeli <dodji@redhat.com>
2272 Fix logic in common_prefix
2273 * src/abg-tools-utils.cc (common_prefix): Fix logic error.
2275 2018-01-12 Dodji Seketeli <dodji@redhat.com>
2277 abipkgdiff --verbose shouldn't trigger --fail-no-dbg
2278 * tools/abipkgdiff.cc (compare): In the overload for elf_files,
2279 separate the effect of --verbose from the one of --fail-no-dbg.
2281 2018-01-10 Dodji Seketeli <dodji@redhat.com>
2283 Bug 22692 - Consider Java as a language that supports the ODR
2284 * include/abg-ir.h (is_java_language): Declare new function.
2285 * src/abg-dwarf-reader.cc (odr_is_relevant): Adjust to consider
2286 that Java also respects the ODR.
2287 * src/abg-ir.cc (is_java_language): Define new function.
2288 (odr_is_relevant): Adjust to consider that Java also respects the
2291 2018-01-09 Dodji Seketeli <dodji@redhat.com>
2293 Fix version revision number printing in tools --help option
2294 * configure.ac: Properly set the VERSION_REVISION macro.
2295 * include/abg-tools-utils.h (get_library_version_string): Declare
2297 * src/abg-tools-utils.cc (get_library_version_string): Define the
2299 (gen_suppr_spec_from_kernel_abi_whitelist): Dis-ambiguate the use
2300 of the 'config' type.
2301 * tools/abicompat.cc (main): Use the new
2302 abigail::tools_utils::get_library_version_string function.
2303 * tools/abidiff.cc (main): Likewise.
2304 * tools/abidw.cc (main): Likewise.
2305 * tools/abilint.cc (main): Likewise.
2306 * tools/abipkgdiff.cc (main): Likewise.
2307 * tools/abisym.cc (main): Likewise.
2308 * tools/kmidiff.cc (main): Likewise.
2310 2018-01-09 Dodji Seketeli <dodji@redhat.com>
2312 Bug 22684 - Add --d{1,2} options to kmidiff
2313 * doc/manuals/kmidiff.rst: Add documentation for the new options.
2314 * tools/kmidiff.cc (options::{di_root_path{1,2}): New data
2316 (display_usage): Add help strings for the new options.
2317 (parse_command_line): Parse the new options.
2318 (main): Pass the debug info root directory to
2319 build_corpus_group_from_kernel_dist_under.
2321 2018-01-08 Dodji Seketeli <dodji@redhat.com>
2323 Update copyright notice for all source files
2324 * update-copyright.sh: New sed-based script to update the year
2325 in the copyright notice.
2326 * include/abg-comp-filter.h: Updated the year in the copyright
2328 * include/abg-comparison.h: Likewise.
2329 * include/abg-config.h: Likewise.
2330 * include/abg-corpus.h: Likewise.
2331 * include/abg-diff-utils.h: Likewise.
2332 * include/abg-dwarf-reader.h: Likewise.
2333 * include/abg-fwd.h: Likewise.
2334 * include/abg-hash.h: Likewise.
2335 * include/abg-ini.h: Likewise.
2336 * include/abg-interned-str.h: Likewise.
2337 * include/abg-ir.h: Likewise.
2338 * include/abg-libxml-utils.h: Likewise.
2339 * include/abg-libzip-utils.h: Likewise.
2340 * include/abg-reader.h: Likewise.
2341 * include/abg-reporter.h: Likewise.
2342 * include/abg-sptr-utils.h: Likewise.
2343 * include/abg-suppression.h: Likewise.
2344 * include/abg-tools-utils.h: Likewise.
2345 * include/abg-traverse.h: Likewise.
2346 * include/abg-viz-common.h: Likewise.
2347 * include/abg-viz-dot.h: Likewise.
2348 * include/abg-viz-svg.h: Likewise.
2349 * include/abg-workers.h: Likewise.
2350 * include/abg-writer.h: Likewise.
2351 * src/abg-comp-filter.cc: Likewise.
2352 * src/abg-comparison-priv.h: Likewise.
2353 * src/abg-comparison.cc: Likewise.
2354 * src/abg-config.cc: Likewise.
2355 * src/abg-corpus-priv.h: Likewise.
2356 * src/abg-corpus.cc: Likewise.
2357 * src/abg-default-reporter.cc: Likewise.
2358 * src/abg-diff-utils.cc: Likewise.
2359 * src/abg-dwarf-reader.cc: Likewise.
2360 * src/abg-hash.cc: Likewise.
2361 * src/abg-ini.cc: Likewise.
2362 * src/abg-internal.h: Likewise.
2363 * src/abg-ir-priv.h: Likewise.
2364 * src/abg-ir.cc: Likewise.
2365 * src/abg-leaf-reporter.cc: Likewise.
2366 * src/abg-libxml-utils.cc: Likewise.
2367 * src/abg-libzip-utils.cc: Likewise.
2368 * src/abg-reader.cc: Likewise.
2369 * src/abg-reporter-priv.cc: Likewise.
2370 * src/abg-reporter-priv.h: Likewise.
2371 * src/abg-sptr-utils.cc: Likewise.
2372 * src/abg-suppression-priv.h: Likewise.
2373 * src/abg-suppression.cc: Likewise.
2374 * src/abg-tools-utils.cc: Likewise.
2375 * src/abg-traverse.cc: Likewise.
2376 * src/abg-viz-common.cc: Likewise.
2377 * src/abg-viz-dot.cc: Likewise.
2378 * src/abg-viz-svg.cc: Likewise.
2379 * src/abg-workers.cc: Likewise.
2380 * src/abg-writer.cc: Likewise.
2381 * tests/print-diff-tree.cc: Likewise.
2382 * tests/test-abicompat.cc: Likewise.
2383 * tests/test-abidiff-exit.cc: Likewise.
2384 * tests/test-abidiff.cc: Likewise.
2385 * tests/test-alt-dwarf-file.cc: Likewise.
2386 * tests/test-core-diff.cc: Likewise.
2387 * tests/test-diff-dwarf-abixml.cc: Likewise.
2388 * tests/test-diff-dwarf.cc: Likewise.
2389 * tests/test-diff-filter.cc: Likewise.
2390 * tests/test-diff-pkg.cc: Likewise.
2391 * tests/test-diff-suppr.cc: Likewise.
2392 * tests/test-diff2.cc: Likewise.
2393 * tests/test-ir-walker.cc: Likewise.
2394 * tests/test-lookup-syms.cc: Likewise.
2395 * tests/test-read-dwarf.cc: Likewise.
2396 * tests/test-read-write.cc: Likewise.
2397 * tests/test-types-stability.cc: Likewise.
2398 * tests/test-utils.cc: Likewise.
2399 * tests/test-utils.h: Likewise.
2400 * tests/test-write-read-archive.cc: Likewise.
2401 * tools/abiar.cc: Likewise.
2402 * tools/abicompat.cc: Likewise.
2403 * tools/abidiff.cc: Likewise.
2404 * tools/abidw.cc: Likewise.
2405 * tools/abilint.cc: Likewise.
2406 * tools/abipkgdiff.cc: Likewise.
2407 * tools/abisym.cc: Likewise.
2408 * tools/binilint.cc: Likewise.
2409 * tools/kmidiff.cc: Likewise.
2411 2017-12-15 Dodji Seketeli <dodji@redhat.com>
2413 Bug 22437 - Make fedabipkgdiff use all debug info RPMs of a sub-RPM
2414 * tools/fedabipkgdiff (RPM::get_all_debuginfo_rpms): Define new
2416 (RPM::generate_comparison_halves): The ancillary debuginfo RPM of
2417 a given RPM now has a list type; there can be more than one
2418 debuginfo RPM associated to a given RPM, especially if the RPM is
2420 (format_debug_info_pkg_options): Define new function.
2421 (abipkgdiff): Use the new function above.
2423 2017-12-15 Dodji Seketeli <dodji@redhat.com>
2425 Improve comments wording in fedabipkgdiff
2426 * tools/fedabipkgdiff (class RPM): Fix wording.
2427 (RPM::__init__): Likewise.
2429 2017-12-11 Dodji Seketeli <dodji@redhat.com>
2431 Update & cleanup the tools manuals summary
2432 * doc/manuals/abidw.rst: Use the same header structure as or the
2434 * doc/manuals/kmidiff.rst: Likewise.
2435 * doc/manuals/libabigail-tools.rst: Add the new kmidiff tool to
2438 2017-12-01 Dodji Seketeli <dodji@redhat.com>
2440 Bug 22488 - Make abipkgdiff handle different binaries with same basename
2441 * include/abg-tools-utils.h (string_suffix)
2442 (sorted_strings_common_prefix): Declare new functions.
2443 (dir_name): Take a new keep_separator_at_end parameter at the end.
2444 * src/abg-tools-utils.cc (dir_name): Take a new
2445 keep_separator_at_end parameter at the end. Add a comment for it
2447 (string_suffix, sorted_strings_common_prefix): Define new
2449 (common_prefix): Define new static function.
2450 * tools/abipkgdiff.cc (get_interesting_files_under_dir): Forward
2451 declare this pre-existing static function.
2452 (package::{common_paths_prefix_, elf_file_paths_}): New data
2454 (package::{common_paths_prefix, elf_file_paths,
2455 convert_path_to_relative, convert_path_to_unique_suffix,
2456 load_elf_file_paths}): New member functions.
2457 (create_maps_of_package_content): Use the new
2458 package::{load_elf_file_paths, convert_path_to_unique_suffix}
2460 (compare_prepared_userspace_packages): Show relative paths of
2461 package elements in reported.
2462 * tests/data/test-diff-pkg/dbus-glib-0.104-3.fc23.x86_64--dbus-glib-0.104-3.fc23.armv7hl-report-0.txt:
2464 * tests/data/test-diff-pkg/libxfce4ui-devel-4.12.1-8.fc27.ppc64-self-report-0.txt:
2467 2017-12-01 Dodji Seketeli <dodji@redhat.com>
2469 Fully report diagnostic about alternate debug info file not found
2470 * src/abg-dwarf-reader.cc (status_to_diagnostic_string): Report
2471 textual diagnostic for the STATUS_ALT_DEBUG_INFO_NOT_FOUND case
2474 2017-11-27 Dodji Seketeli <dodji@redhat.com>
2476 Bug 22436 - make abipkgdiff accept several debuginfo packages
2477 * doc/manuals/abipkgdiff.rst: Document the fact that --d{1,2} can
2478 be provided several times on the command line.
2479 * tools/abipkgdiff.cc (options::debug_packages{1,2}): Rename the
2480 debug_package{1,2} data members into this, and make them be vector
2481 of strings, rather than just strings.
2482 (package::debug_info_packages_): Renamed
2483 package::debug_info_package_ into this and make it be a vector of
2484 package_sptr, rather than just a package_sptr.
2485 (package::debug_info_packages): Renamed the method
2486 package::debug_info_package into this and -- for the getter
2487 overload -- make it return a vector of package_sptr, rather than
2488 just a package_sptr. Likewise for the setter overload. Add a
2489 non-const getter overload.
2490 (package::erase_extraction_directories)
2491 (extract_package_and_map_its_content): Adjust.
2492 (extract_rpm, extract_deb): Do not erase the content of the
2493 extraction directory (if it was pre-existing) prior to extracting
2494 the RPM/deb into it.
2495 (pkg_extraction::pkgs): Renamed pkg_extraction::pkg into this and
2496 make it be a vector of packages, rather than just a package.
2497 (pkg_extraction::pkg_extraction): Adjust to take a package_sptr
2498 rather than just a package. Add an overload to take a vector of
2500 (pkg_extraction::perform): Extract the vector of package that the
2501 task is not responsible for, not just one random package.
2502 (extract_package_and_map_its_content): Adjust.
2503 (prepare_packages): Take smart pointers to package rather than
2504 just packages. Adjust accordingly.
2505 (compare_prepared_package): Make the overload that takes two
2506 packages to take two smart pointers of packages.
2507 (compare): Make the overload that takes two package take two
2509 (parse_command_line): Parse having --d{1,2} several times for a
2510 given input package.
2511 (main): Take several debug info packages for one input file.
2512 * include/abg-tools-utils.h (split_string): Declare ...
2513 * src/abg-tools-utils.cc (split_string): ... new function.
2514 * tests/data/test-diff-pkg/libxfce4ui-debuginfo-4.12.1-8.fc27.ppc64.rpm:
2515 Add a new RPM test input file.
2516 * tests/data/test-diff-pkg/libxfce4ui-devel-4.12.1-8.fc27.ppc64-self-report-ok-0.txt:
2517 new reference output file.
2518 * tests/data/Makefile.am: Add the new test input files above to source
2520 * tests/test-diff-pkg.cc (in_out_spec): Add new test entry to
2521 specify two debug info packages for one input package.
2522 (test_task::perform): Support having several debug info package
2523 paths in the IntOutSpec::{first,second}_in_debug_package_path data
2524 member. The debug info packages paths are separated by either a
2525 white space or commas.
2527 2017-11-22 Dodji Seketeli <dodji@redhat.com>
2529 Update version number to 1.1
2530 * configure.ac: Update version number to 1.1
2532 2017-11-22 Dodji Seketeli <dodji@redhat.com>
2534 Bug 22076 - Disable fedabipkgdiff for old koji clients
2535 * configure.ac: Try to invoke the koji.read_config method. If it
2536 fails then disable the fedabipkgdiff feature.
2538 2017-11-22 Dodji Seketeli <dodji@redhat.com>
2540 Update the release text template after 1.0
2541 * release-text-template.txt: Update some wording.
2543 2017-11-22 Dodji Seketeli <dodji@redhat.com>
2545 Update website for 1.0
2546 * doc/website/mainpage.txt: Update after 1.0 release.
2548 2017-11-21 Dodji Seketeli <dodji@redhat.com>
2550 Update NEWS file for 1.0
2551 * NEWS: Update for 1.0
2553 2017-11-21 Dodji Seketeli <dodji@redhat.com>
2555 Automatically Update ChangeLog for 1.0
2556 * ChangeLog: Automatically update for 1.0
2558 2017-11-21 Dodji Seketeli <dodji@redhat.com>
2560 Bug 22438 - Emit a clear message when debug info is not found
2561 * include/abg-dwarf-reader.h (enum abigail::dwarf_reader::status):
2562 Add a new STATUS_ALT_DEBUG_INFO_NOT_FOUND enumerator there.
2563 (refers_to_alt_debug_info): Declare new function.
2564 * src/abg-dwarf-reader.cc (read_corpus_from_elf): Detect when the
2565 referred-to alternate debug info file is not found and flip the
2566 STATUS_ALT_DEBUG_INFO_NOT_FOUND bit of the status accordingly. If
2567 the debug info was found but not the alternate debug info, then do
2568 not try to read the debug info at all.
2569 (refers_to_alt_debug_info): Define new function.
2570 * tools/abidiff.cc (handle_error): Define new static function.
2571 (main): Use it, rather than handling errors preventing libabigail
2572 from reading the corpus on a case by case basis.
2573 tools/abipkgdiff.cc (compare): Handle the case where no alternate
2574 debug info was found.
2575 * tests/data/test-diff-pkg/libxfce4ui-devel-4.12.1-8.fc27.ppc64-self-report-0.txt:
2576 New test output reference.
2577 * tests/data/test-diff-pkg/libxfce4ui-devel-4.12.1-8.fc27.ppc64.rpm:
2579 * tests/data/test-diff-pkg/libxfce4ui-devel-debuginfo-4.12.1-8.fc27.ppc64.rpm:
2581 * tests/data/Makefile.am: Add the new test files above to source
2583 * tests/test-diff-pkg.cc (in_out_specs): Add a new test case from
2584 the new input files above.
2586 2017-11-13 Dodji Seketeli <dodji@redhat.com>
2588 Support systems where fts.h can't be used with _FILE_OFFSET_BITS set
2589 * configure.ac: Detect if we are on a system where fts.h cannot be
2590 included with _FILE_OFFSET_BITS defined. If that is the case,
2591 then define the BAD_FTS macro.
2592 * src/abg-tools-utils.cc: If BAD_FTS is defined then include fts.h
2593 with _FILE_OFFSET_BITS not defined (that is, before config.h) but
2594 then make sure that open and fopen are 64 bits aware.
2595 * tools/abipkgdiff.cc: Likewise.
2597 2017-11-08 Dodji Seketeli <dodji@redhat.com>
2599 Edit the NEWS file a tiny little bit for 1.0
2602 2017-11-06 Dodji Seketeli <dodji@redhat.com>
2604 Automatically Update ChangeLog for 1.0
2605 * ChangeLog: Update this file by running "make update-changelog".
2607 2017-11-06 Dodji Seketeli <dodji@redhat.com>
2609 Update NEWS file for 1.0 changes
2610 * NEWS: Update for 1.0 changes
2612 2017-11-06 Dodji Seketeli <dodji@redhat.com>
2614 Bump version number to 1.0
2615 * configure.ac: Bump version number to 1.0
2617 2017-11-08 Dodji Seketeli <dodji@redhat.com>
2619 Don't make system headers depend on config.h
2620 * tools/abipkgdiff.cc: Include config.h after system headers and
2621 before libabigail's headers.
2623 2017-11-02 Dodji Seketeli <dodji@redhat.com>
2625 Wire the --no-show-locs option to abidw
2626 * doc/manuals/abidw.rst: Update the documentation.
2627 * tests/test-annotate.cc: Now that --no-show-locs has an effect on
2628 the ABIXML output, let's not use it here, because it changes the
2629 output and we don't want that.
2630 * tools/abidw.cc (display_usage): Fix a typo in the help string.
2631 (load_corpus_and_write_abixml): Set the "show-locs" option to the
2632 write_context object that we use.
2634 2017-11-02 Dodji Seketeli <dodji@redhat.com>
2636 Allow setting options to instances of xml_writer::write_context
2637 * include/abg-writer.h (create_write_context, set_show_locs)
2638 (set_annotate): Declare new functions.
2639 (write_corpus, write_corpus_group): Remove the output stream and
2640 the annotate parameters as these can be retrieved from the
2642 * src/abg-writer.cc (write_context::m_show_locs): New data member.
2643 (write_context::write_context): Initialize it.
2644 (write_context::{get_show_locs, set_show_locs}): Add new member
2646 (write_location): Take a write_context, rather than an output
2647 stream. From the context, we detect if the user did set the "show
2648 loc" option and act accordingly. Write the second overload in
2649 terms of the first one.
2650 (create_write_context, set_show_locs, set_annotate): Define new
2652 (write_type_decl, write_qualified_type_def)
2653 (write_pointer_type_def, write_reference_type_def)
2654 (write_array_type_def, write_enum_type_decl, write_typedef_decl)
2655 (write_var_decl, write_function_decl)
2656 (write_class_decl_opening_tag, write_union_decl_opening_tag)
2657 (write_type_tparameter, write_non_type_tparameter)
2658 (write_function_tdecl, write_class_tdecl): Adjust the invocation
2660 (write_corpus, write_corpus_group): Remove the output stream and
2661 the annotate parameters as these can be retrieved from the
2663 * tools/abidw.c: (load_corpus_and_write_abixml): Create a
2664 write_context object, set the 'annotate' option to it and use that
2665 object to actually write out the corpus.
2667 2017-11-02 Dodji Seketeli <dodji@redhat.com>
2669 Remove useless vertical space from src/abg-writer.cc
2670 * src/abg-writer.cc (class write_context): Remove useless vertical
2671 space near the end of the class definition.
2673 2017-10-16 Dodji Seketeli <dodji@redhat.com>
2675 Add a --suppressions option to fedabipkgdiff
2676 * tools/fedabipkgdiff (abipkgdiff): If a suppression file was
2677 provided, pass it to the underlying abipkgdiff tool.
2678 (build_commandline_args_parser): Parse the new --suppressions
2680 * docs/manuals/fedabipkgdiff.rst: Add documentation for the new
2681 --suppressions option.
2683 2017-10-16 Dodji Seketeli <dodji@redhat.com>
2685 Handle exceptions when global_config is not yet set in fedabipkgdiff
2686 * tools/fedabipkgdiff: When handling an exception, if the
2687 global_config object is not yet set then just let the exception
2690 2017-10-11 Dodji Seketeli <dodji@redhat.com>
2692 Fix a indentation warning from GCC 7.2.1
2693 * tools/abipkgdiff.cc (compare): In the overload of elf_file, fix
2694 a mis-indentation pointed out by a GCC 7.2.1 warning.
2696 2017-10-11 Dodji Seketeli <dodji@redhat.com>
2698 Cleanup a switch-case logic to avoid a GCC 7.2.1 warning
2699 * src/abg-dwarf-reader.cc (die_qualified_type_name): Cleanup a
2700 switch case to make the form support more what we meant, and shut
2701 down a GCC 7.2.1 warning.
2703 2017-10-09 Mark Wielaard <mark@klomp.org>
2705 Fix -Wmisleading-indentation warning in abg-leaf-reporter.cc.
2706 * src/abg-leaf-reporter.cc (leaf_reporter::report): Fix misleading
2709 2017-10-06 Dodji Seketeli <dodji@redhat.com>
2711 Add --impacted-changes option to kmidiff
2712 * doc/manuals/kmidiff.rst: Document the new --impacted-changes
2714 * tools/kmidif.cc (options::show_impacted_interfaces): Add new
2716 (options::options): Initialize the new data member to false.
2717 (display_usage): Add a description string for the new
2718 --impacted-changes option.
2719 (parse_command_line): Parse the new --impacted-changes option.
2720 (set_diff_context): Update the 'show-impacted-interface' property
2723 2017-10-04 Dodji Seketeli <dodji@redhat.com>
2725 Add --full-impact option to kmidiff
2726 * doc/manuals/kmidiff.rst: Add documentation for the new
2727 --full-impact|-f option.
2728 * tools/kmidiff.cc (options::leaf_changes_only): Add new data
2730 (option::option): Initialize the new data member.
2731 (display_usage): Add a documentation string for the new
2732 --full-impact|-f option.
2733 (parse_command_line): Parse the new --full-impact|-f option.
2734 (set_diff_context): Set the diff context appropriately.
2736 2017-09-18 Dodji Seketeli <dodji@redhat.com>
2738 Add a --leaf-changes-only option to abipkgdiff
2739 * doc/manuals/abipkgdiff.rst: Add documentation for the new
2740 --leaf-change-only, --impacted-interfaces and --full-impact
2742 * tools/abipkgdiff.cc (options::{leaf_changes_only,
2743 show_impacted_interfaces, show_full_impact_report): Add new data
2745 (options::options): Initialize them.
2746 (display_usage): Add help strings for the new --leaf-change-only,
2747 --impacted-interfaces and --full-impact|-f options.
2748 (set_diff_context_from_opts): Set the diff context for the
2749 'leaf-changes-only' and 'show-impacted-interfaces' flags.
2750 (parse_command_line): Parse the --leaf-change-only,
2751 --impacted-interfaces and --full-impact options. Handle the case
2752 where the --linux-kernel-abi-whitelist|-w option is given a
2753 whitelist *package*.
2754 * tests/data/test-diff-pkg/spice-server-0.12.4-19.el7.x86_64-0.12.8-1.el7.x86_64-report-3.txt:
2755 New test output reference.
2756 * tests/test-diff-pkg.cc (in_out_spec): Compare
2757 data/test-diff-pkg/spice-server-0.12.4-19.el7.x86_64.rpm and
2758 data/test-diff-pkg/spice-server-0.12.8-1.el7.x86_64.rpm with the
2759 new --leaf-changes-only and --impacted-interfaces options, using
2760 the new output reference above.
2761 * tests/data/Makefile.am: Add the new test material to source
2764 2017-08-02 Dodji Seketeli <dodji@redhat.com>
2766 Initial implementation of a --leaf-changes-only option to abidiff
2767 * doc/manuals/abidiff.rst: Add documentation the new
2768 --leaf-changes-only and --impacted-interfaces options.
2769 * src/abg-leaf-reporter.cc: New file.
2770 * src/Makefile.am: Add the new src/abg-leaf-reporter.cc file to
2771 source distribution.
2772 * include/abg-fwd.h (get_var_size_in_bits)
2773 (function_decl_is_less_than): Declare new functions.
2774 (get_name): Add new overload for type_or_decl_base*.
2775 * include/abg-ir.h (struct type_or_decl_hash, type_or_decl_equal)
2776 (type_or_decl_base_comp): Define new types.
2777 (artifact_sptr_set_type, artifact_ptr_set_type): Define new
2779 * include/abg-comp-filter.h: Update copyright year.
2780 (has_basic_type_name_change): Add new function declaration.
2781 * src/abg-comp-filter.cc (decl_name_changed): Take a
2782 type_or_decl_base rather than just a decl. Add an overload for
2784 (has_basic_type_name_change): Define new function.
2785 * include/abg-comparison.h: Update copyright year.
2786 (string_diff_ptr_map): Define this new typedef.
2787 (class diff_maps): Define this new class.
2788 (diff_context::{set_corpora}): Remove this member function.
2789 (diff_context::{set_corpus_diff, get_corpus_diff,
2790 show_leaf_changes_only, show_impacted_interfaces,
2791 forbid_visiting_a_node_twice_per_interface}): Declare these new
2793 (diff_node_visitor::priv_): Add a new pimpl data member.
2794 (diff_node_visitor::{diff_node_visitor, get_visiting_kind,
2795 set_visiting_kind}): Turn these into out-of-line member functions.
2796 (diff_node_visitor::{set,get}_current_topmost_iface_diff): Add new
2798 (class {scope_diff, function_type_diff, corpus_diff}): Add class
2799 leaf_reporter as a friend.
2800 (corpus_diff::mark_leaf_diff_nodes, get_leaf_diffs): Declare new
2802 (diff::{visiting_a_node_twice_is_forbidden_per_interface,
2803 parent_interface_node}): Define new member functions.
2804 (is_diff_of_basic_type): Return a type_decl_diff* rather than just
2806 (is_enum_diff, is_array_diff, is_function_type, is_typedef_diff)
2807 (is_corpus_diff): Declare new functions.
2808 (corpus_diff::diff_stats::{num_leaf_changes,
2809 num_leaf_changes_filtered_out, net_num_leaf_changes}): Add new
2811 (is_distinct_diff): Declare new function.
2812 * include/abg-reporter.h: Forward-declare "class diff_maps".
2813 (reporter_base::diff_to_be_reported): Declare a new virtual member
2815 (reporter_base::{report_local_typedef_changes,
2816 report_local_reference_type_changes,
2817 report_local_function_type_changes}): Declare new member
2819 (class leaf_reporter): Define new type.
2820 * src/abg-comparison-priv.h (struct diff_hash, diff_equal): Define
2822 (diff_artifact_set_map_type): Define new typedef.
2823 (diff_context::priv::{first_corpus_, second_corpus_}): Remove
2825 (diff_context::priv::{corpus_diff_, leaf_changes_only_,
2826 reset_visited_diffs_for_each_interface_,
2827 show_impacted_interfaces_}): Add new data members.
2828 (diff_context::priv::priv): Adjust.
2829 (corpus_diff::priv::{leaf_diffs_, parent_interface_}): Add new
2831 (corpus_diff::diff_stats::priv::{num_leaf_changes,
2832 num_leaf_changes_filtered_out}): Add new data members.
2833 (corpus_diff::priv::count_leaf_changes): Define new member
2835 (sort_artifacts_set, get_fn_decl_or_var_decl_diff_ancestor)
2836 (is_diff_of_global_decls): Declare new functions.
2837 (function_comp::operator()): Factorize this out into the new
2838 function abigail::ir::function_decl_is_less_than.
2839 * src/abg-ir.cc (get_var_size_in_bits)
2840 (function_decl_is_less_than): Define new functions.
2841 (get_name): Define new overload for type_or_decl_base*.
2842 * src/abg-comparison.cc (is_enum_diff, is_typedef_diff)
2843 (is_array_diff, is_function_type_diff, is_corpus_diff)
2844 (is_distinct_diff, sort_artifacts_set, is_diff_of_global_decls):
2845 Define new functions.
2846 (is_union_diff): Fix comment.
2847 (diff_context::forbid_visiting_a_node_twice_per_interface): Define
2848 new member functions.
2849 (diff_context::set_corpus_diff, get_corpus_diff)
2850 (diff_context::show_leaf_changes_only)
2851 (diff_context::visiting_a_node_twice_is_forbidden_per_interface)
2852 (diff_context::show_impacted_interfaces): Define new member
2854 (diff_context::get_reporter): Create the reporter that matches
2855 what diff_context::show_leaf_changes_only says.
2856 (diff_node_visitor::priv): Define a new type.
2857 (diff_node_visitor::{diff_node_visitor, get_visiting_kind,
2858 set_visiting_kind, or_visiting_kind,
2859 set_current_topmost_iface_diff, get_current_topmost_iface_diff}):
2860 Define new out-of-line member functions.
2861 (struct diff_maps::priv): Define new type.
2862 (diff_maps::{diff_maps, get_type_decl_diff_map,
2863 get_type_decl_diff_map, get_enum_diff_map, get_class_diff_map,
2864 get_union_diff_map, get_typedef_diff_map, get_array_diff_map,
2865 get_function_type_diff_map, get_function_decl_diff_map,
2866 get_var_decl_diff_map, get_reference_diff_map,
2867 get_fn_parm_diff_map, get_distinct_diff_map, insert_diff_node,
2868 lookup_impacted_interfaces}): Define member functions.
2869 (corpus_diff::{mark_leaf_diff_nodes, get_leaf_diffs}): Define new
2871 (struct leaf_diff_node_marker_visitor): Define new type.
2872 (corpus_diff::apply_filters_and_suppressions_before_reporting):
2873 Mark diff nodes in here.
2874 (corpus_diff::traverse): Appropriately set the current topmost
2875 interface into the visitor before visiting a diff node.
2876 (compute_diff): In the overload for corpus_sptr, adjust to reflect
2877 that we are now storing the corpus_diff in the diff context.
2878 (is_diff_of_basic_type): Return a type_decl_diff*, not just a
2880 (corpus_diff::priv::count_leaf_changes): Define a new member
2882 (corpus_diff::diff_stats::{num_leaf_changes,
2883 num_leaf_changes_filtered_out, net_num_leaf_changes}): Define new
2885 (corpus_diff::priv::apply_filters_and_compute_diff_stats): Use the
2886 new corpus_diff::priv::count_leaf_changes to compute the number of
2888 (corpus_diff::priv::emit_diff_stats): Emit the report about leaf
2889 type changes when necessary.
2890 * src/abg-reporter-priv.h (report_mem_header): Declare new
2892 (maybe_show_relative_offset_change,): Pass the var_diff_sptr
2893 parameter by const reference.
2894 (represent): Pass the var_diff_sptr parameter by const reference
2895 and take a new "local-only" flag.
2896 (maybe_show_relative_size_change)
2897 (maybe_report_interfaces_impacted_by_diff): Declare new functions.
2898 * src/abg-default-reporter.cc: Adjust copyright year.
2899 (default_reporter::{report_local_typedef_changes,
2900 report_local_qualified_type_changes,
2901 report_local_reference_type_changes,
2902 report_local_function_type_changes}): Define new member functions.
2903 (default_reporter::report): Adjust. Add an overload for
2904 function_type_diff&. In the overload for qualified_type_diff, if
2905 the name of the underlying type changed, do not detail the changes
2906 any further. In the overload for function_decl_diff, Adjust to
2907 use the new diff_context::get_{first, second}_corpus member
2908 function. In the overload for enum_diff, call the new
2909 maybe_report_interfaces_impacted_by_diff that is advertised below.
2910 * src/abg-reporter-priv.cc (represent): Adjust the overload for
2912 (report_mem_header): Define new overload.
2913 (maybe_show_relative_size_change)
2914 (maybe_report_interfaces_impacted_by_diff): Define new functions.
2915 (reporter_base::diff_to_be_reported): Define new member function.
2916 (maybe_show_relative_offset_change): Pass the var_diff_sptr
2917 parameter by const reference.
2918 (represent): In the overload for var_diff_sptr, pass the
2919 var_diff_sptr parameter by reference. Take a 'local_only' flag.
2920 Iisplay type changes only if we are not displaying "local changes
2921 only". Display size changes of data members too, when in
2923 * src/abg-suppression.cc (sonames_of_binaries_match)
2924 (names_of_binaries_match): Adjust.
2925 * tools/abidiff.cc (options::{leaf_changes_only,
2926 show_impacted_interfaces}): Add new data members.
2927 (display_usage): Emit usage string for the new --leaf-changes-only
2928 and --impacted-interfaces options.
2929 (parse_command_line): Parse the new --leaf-changes-only and the
2930 --impacted-interfaces options.
2931 (set_diff_context_from_opts): Set the 'show-leaf-changes' and the
2932 'show-impacted-interfaces' flags.
2933 * tests/data/test-diff-filter/libtest42-leaf-report-v{0,1}.so: New
2935 * tests/data/test-diff-filter/test42-leaf-report-output-0.txt: New
2936 test reference output.
2937 * tests/data/test-diff-filter/test42-leaf-report-v{0,1}.cc: Source
2938 code of the new test inputs.
2939 * tests/test-diff-filter.cc (in_out_specs): Use the new test
2940 inputs above in this harness.
2941 * tests/data/test-diff-suppr/libtest35-leaf-v0.so: New test input.
2942 * tests/data/test-diff-suppr/test35-leaf-report-0.txt: New test
2944 * tests/data/test-diff-suppr/test35-leaf-v{0,1}.cc: Source code of
2945 the new test inputs.
2946 * tests/data/test-diff-suppr/test35-leaf.suppr: Suppression
2947 specification to use for the test35 test.
2948 * tests/data/test-diff-suppr/libtest36-leaf-v0.so: New test input.
2949 * tests/data/test-diff-suppr/libtest36-leaf-v1.so: Likewise.
2950 * tests/data/test-diff-suppr/test36-leaf-report-0.txt: New
2951 reference test output.
2952 * tests/data/test-diff-suppr/test36-leaf-v0.cc: Source code of
2954 * tests/data/test-diff-suppr/test36-leaf-v1.cc: Likewise.
2955 * tests/test-diff-suppr.cc (in_out_specs): Use the new test inputs
2956 above in this harness.
2957 * tests/data/Makefile.am: Add the new test inputs above to source
2960 2017-07-17 Dodji Seketeli <dodji@redhat.com>
2962 Allow several kinds of reports to be emitted
2963 * include/Makefile.am: Add the new abg-reporter.h header file to
2964 source distribution.
2965 * include/abg-comparison.h: Include the new abg-reporter.h header
2967 (diff_context::{g,s}et_reporter): Declare new accessors.
2968 ({type_diff_base, decl_diff_base, corpus_diff}::priv): Make this
2969 be a struct rather than a class.
2970 ({decl_diff_base, class_diff, scope_diff, function_type_diff,
2971 corpus_diff}): Declare default_reporter a friend class of these.
2972 * include/abg-reporter.h: New file.
2973 * src/Makefile.am: Add abg-comparison-priv.h,
2974 abg-reporter-priv.{h,cc} and abg-default-reporter.cc files to
2975 source distribution.
2976 * src/abg-comparison-priv.h: New file.
2977 * src/abg-comparison.cc (sort_enumerators)
2978 (sort_changed_enumerators, sort_data_members)
2979 (sort_string_function_ptr_map)
2980 (sort_string_function_decl_diff_sptr_map)
2981 (sort_string_var_diff_sptr_map, sort_string_elf_symbol_map)
2982 (sort_string_var_ptr_map, sort_string_data_member_diff_sptr_map)
2983 (sort_unsigned_data_member_diff_sptr_map)
2984 (sort_string_diff_sptr_map, sort_string_base_diff_sptr_map)
2985 (sort_string_base_sptr_map, sort_string_fn_parm_diff_sptr_map)
2986 (sort_string_parm_map, get_leaf_type, sort_enumerators)
2987 (sort_changed_enumerators): Make these functions non-static and
2988 move them at the beginning of the file. These functions are now
2989 declared in abg-compared-priv.h so they can be shared privately
2990 with other files in src/.
2991 (diff_context::{g,s}et_reporter): Define new accessors.
2992 ({diff_context, diff, type_diff_base, decl_diff_base,
2993 distinct_diff, pointer_diff, array_diff, reference_diff,
2994 qualified_type_diff, enum_diff, class_or_union_diff, class_diff,
2995 base_diff, scope_diff, fn_parm_diff, function_type_diff,
2996 function_decl_diff, type_decl_diff, typedef_diff,
2997 translation_unit_diff, corpus_diff::diff_stats,
2999 (diff_less_than_functor, enumerator_value_comp)
3000 (changed_enumerator_comp, base_spec_comp, base_diff_comp)
3001 (data_member_diff_comp, diff_comp, fn_parm_diff_comp, parm_comp)
3002 (elf_symbol_comp, function_comp, function_decl_diff_comp)
3003 (var_diff_sptr_comp): Move these type definitions to
3004 abg-comparison-priv.h
3005 (report_size_and_alignment_changes, report_loc_info)
3006 (maybe_report_diff_for_member, maybe_report_diff_for_symbol)
3007 (represent, represent_data_member)
3008 (maybe_show_relative_offset_change, represent)
3009 (report_size_and_alignment_changes, report_loc_info)
3010 (report_name_size_and_alignment_changes, report_mem_header)
3011 (maybe_report_diff_for_member, maybe_report_diff_for_symbol)
3012 (show_linkage_name_and_aliases): Move these definitions to
3013 abg-reporter-priv.cc.
3014 ({distinct_diff, var_diff, pointer_diff, array_diff,
3015 reference_diff, qualified_type_diff, enum_diff,
3016 class_or_union_diff, class_diff, base_diff, union_diff,
3017 scope_diff, fn_parm_diff, function_type_diff, type_decl_diff,
3018 typedef_diff, corpus_diff}::report): Use the reporter object to
3019 report about the changes carried by the the current diff node.
3020 * src/abg-default-reporter.cc: New file.
3021 * src/abg-reporter-priv.h: Likewise.
3023 2017-10-04 Dodji Seketeli <dodji@redhat.com>
3025 Update copyright year to tools/abidiff.cc
3026 * tools/abidiff.cc: Update copyright year.
3028 2017-10-04 Dodji Seketeli <dodji@redhat.com>
3030 Add missing comment to type declaration
3031 * include/abg-comparison.h (struct diff_sptr_hasher): Add missing
3034 2017-10-04 Dodji Seketeli <dodji@redhat.com>
3036 Misc style fixes in abg-writer.cc
3037 * src/abg-writer.cc (type_hasher): Add comment.
3038 (write_context::record_decl_as_emitted): Remove useless newline.
3040 2017-10-04 Dodji Seketeli <dodji@redhat.com>
3042 Initialize naked canonical type
3043 * src/abg-ir.cc (type_base::priv::priv): Initialize the naked
3044 canonical type data member.
3046 2017-10-04 Dodji Seketeli <dodji@redhat.com>
3048 [abixml writer] Use an unordered set when appropriate
3049 * src/abg-writer.cc (write_context::m_emitted_decl_only_set):
3050 Renamed m_emitted_decl_only_map into this and make the type be a
3051 set, rather than a map.
3052 (write_context::{record_decl_only_type_as_emitted,
3053 decl_only_type_is_emitted}): Adjust.
3055 2017-09-29 Dodji Seketeli <dodji@redhat.com>
3057 [abixml writer] Store pointers to emitted types rather than type-ids
3058 * src/abg-writer.cc (type_ptr_set_type): Declare new typedef.
3059 (writer_context::m_emitted_type_id_map): Remove this data member.
3060 (writer_context::m_emitted_type_set): Add a new data member.
3061 (writer_context::{record_type_id_as_emitted, type_id_is_emitted,
3062 clear_emitted_types_map}): Remove these member functions.
3063 (writer_context::{record_type_as_emitted, type_is_emitted}): Use
3064 the new m_emitted_type_set data member above.
3066 2017-09-27 Dodji Seketeli <dodji@redhat.com>
3068 Use an unordered map for canonical DIE offsets
3069 * src/abg-dwarf-reader.cc
3070 (read_context::canonical_type_die_offsets_): Renamed the
3071 canonical_type_die_vecs_ data member into this.
3072 (read_context::canonical_decl_die_offsets_): Renamed the
3073 canonical_decl_die_vecs_ data member into this.
3074 (read_context::{initialize, compute_canonical_die_offset,
3075 compute_canonical_die, get_canonical_die,
3076 get_or_compute_canonical_die, set_canonical_die_offset,
3077 get_canonical_die_offset}): Adjust.
3079 2017-09-27 Dodji Seketeli <dodji@redhat.com>
3081 Bug 22190 - crash in read_context::get_or_compute_canonical_die
3082 * src/abg-dwarf-reader.cc:
3084 2017-09-27 Dodji Seketeli <dodji@redhat.com>
3086 Remove redundant (useless) typedef declaration
3087 * src/abg-dwarf-reader.cc (dwarf_offsets_type): There are two
3088 instances of this typedef declaration, remove one.
3090 2017-09-27 Dodji Seketeli <dodji@redhat.com>
3092 Renamed offset_offset_map type name into offset_offset_map_type
3093 * src/abg-dwarf-reader.cc (offset_offset_map_type): Renamed
3094 offset_offset_map into this.
3095 (read_context::{primary_die_parent_map_,
3096 alternate_die_parent_map_, type_section_die_parent_map_}): Adjust
3097 the type of these data members.
3098 (read_context::{die_parent_map, type_section_die_parent_map}):
3099 Adjust the type of these member functions.
3100 (read_context::{build_die_parent_relations_under,
3101 get_parent_die}): Adjust for the type name in these functions.
3103 2017-09-27 Dodji Seketeli <dodji@redhat.com>
3105 Add missing newlines to kmidiff's usage strings
3106 * tools/kmidiff.cc (display_usage): Add newlines after the lines
3107 for --vmlinux1 and --vmlinux2.
3109 2017-09-21 Dodji Seketeli <dodji@redhat.com>
3111 22160 - Annotate state flag unitialized in abidw
3112 * tools/abidw.cc (options::options): Initialize the annotate data
3115 2017-09-18 Dodji Seketeli <dodji@redhat.com>
3117 Don't crash on classes that differ in their virtual member fn count
3118 * src/abg-ir.cc (equals): In the overload for class_decl, when we
3119 detect that the virtual member function counts are different, get
3120 out, even when we are being asked about the kind of the change.
3122 2017-09-18 Dodji Seketeli <dodji@redhat.com>
3124 Avoid adding the same data member twice in the DWARF reader
3125 * src/abg-dwarf-reader.cc (add_or_update_class_type): After a we
3126 try to create a data member type, look *again* if the data member
3127 wasn't added recursively by the creation of the data member type.
3129 2017-09-11 Mark Wielaard <mark@klomp.org>
3131 Bug 22075 - data_member_diff_comp forgets data members names
3132 * src/abg-comparison.cc (data_member_diff_comp): Make the
3133 comparison take the qualified name of the data member into
3134 account. Also, if the initial offset and qualified names of the
3135 data members of the diff nodes are equal, consider the offset and
3136 qualified names of the new data members.
3138 2017-09-11 Dodji Seketeli <dodji@redhat.com>
3140 Bug 22122 - Fail to represent 'const array'
3141 * src/abg-dwarf-reader.cc (die_is_array_type): Define new static
3143 (die_is_pointer_or_reference_type): Also test that the DIE can be
3145 * tests/data/test-read-dwarf/PR22122-libftdc.so: New binary test input.
3146 * tests/data/test-read-dwarf/PR22122-libftdc.so.abi: New reference output.
3147 * tests/data/Makefile.am: Add the two new test files above to
3148 source distribution.
3149 * tests/test-read-dwarf.cc (in_out_specs): Run this test harness
3150 over the new test input.
3152 2017-09-08 Dodji Seketeli <dodji@redhat.com>
3154 Finer detection of local changes of var_decl type
3155 * src/abg-ir.cc (equals): In the var_decl overload detect size
3156 changes of type as being a local change.
3158 2017-09-08 Dodji Seketeli <dodji@redhat.com>
3161 * include/abg-fwd.h (get_pretty_representation): Add missing white
3163 * src/abg-ir.cc (get_name): Fix typo in comment.
3165 2017-09-02 Mark Wielaard <mark@klomp.org>
3167 readdir_r() is deprecated, use readdir().
3168 * src/abg-tools-utils.cc (dir_is_empty): Use readdir() instead
3171 2017-09-02 Mark Wielaard <mark@klomp.org>
3173 Declare eval_last_constant_dwarf_sub_expr with [u]int64_t not [s]size_t.
3174 * src/abg-dwarf-reader.cc (eval_last_constant_dwarf_sub_expr):
3175 Declare expr_len as uint64_t and value as int64_t.
3177 2017-08-28 Dodji Seketeli <dodji@redhat.com>
3179 Bug 22015 - Failing to return global scope of a DIE in certain cases
3180 * src/abg-dwarf-reader.cc (get_scope_for_die): If the translation
3181 unit of the parent die hasn't yet been constructed, then return
3182 the global scope of the current translation unit.
3183 * tests/data/test-read-dwarf/PR22015-libboost_iostreams.so: New
3185 * tests/data/test-read-dwarf/PR22015-libboost_iostreams.so.abi:
3186 New reference test output.
3187 * tests/data/Makefile.am: Add the new test materials above to
3188 source distribution.
3189 * tests/test-read-dwarf.cc (in_out_specs): Add the new test input
3192 2017-07-17 Dodji Seketeli <dodji@redhat.com>
3194 Fix some make distcheck failures
3195 * tests/data/Makefile.am: Add
3196 test-diff-dwarf/test42-PR21296-libgcc.so,
3197 test-diff-dwarf/test42-PR21296-libclang.so,
3198 test-diff-dwarf/test42-PR21296-clanggcc-report0.txt to the source
3199 distribution. Also look for test-diff-filter/test39* tests inputs
3200 in the test-diff-filter/test39/ directory.
3202 2017-07-17 Dodji Seketeli <dodji@redhat.com>
3204 Avoid crashing when the elf file could not be read
3205 * src/abg-dwarf-reader.cc
3206 (read_context::elf_architecture_is_ppc64): Do not crash if the elf
3209 2017-07-10 Dodji Seketeli <dodji@redhat.com>
3211 Bug 21730 - Make abipkgdiff compare Linux Kernel packages as expected
3212 * include/abg-tools-utils.h (get_vmlinux_path_from_kernel_dist):
3213 Declare new function.
3214 (get_binary_paths_from_kernel_dist): Re-organize order of
3216 (file_is_kernel_package, file_is_kernel_debuginfo_package): Make
3217 the file_path parameter be const.
3218 (build_corpus_group_from_kernel_dist_under): Take an additional
3219 debug_info_root parameter.
3220 * src/abg-tools-utils.cc (file_is_kernel_package)
3221 (file_is_kernel_debuginfo_package): Const-ify the file_name
3223 (find_vmlinux_path): Define new static function.
3224 (get_binary_paths_from_kernel_dist): Re-organize the order of
3225 parameters. The debug_info_root_path parameter is now an input
3227 (get_vmlinux_path_from_kernel_dist): Define new function.
3228 (get_binary_paths_from_kernel_dist): Adjust invocation of
3229 get_binary_paths_from_kernel_dist.
3230 (build_corpus_group_from_kernel_dist_under): Take an additional
3231 debug_info_root parameter.
3232 * tools/abidw.cc (load_kernel_corpus_group_and_write_abixml):
3233 Adjust invocation to build_corpus_group_from_kernel_dist_under.
3234 * tools/abipkgdiff.cc (create_maps_of_package_content): Don't map
3235 the content of a Linux Kernel package.
3236 (compare_prepared_userspace_packages)
3237 (compare_prepared_linux_kernel_packages, compare_prepared): Define
3239 (compare): Use the new functions above here.
3240 * tools/kmidiff.cc (print_kernel_dist_binary_paths_under): Adjust
3241 the invocation of get_binary_paths_from_kernel_dist.
3242 (main): Adjust the invocation of
3243 build_corpus_group_from_kernel_dist_under. Make sure that a
3244 kernel package is accompanied by a debug info package.
3246 2017-07-11 Dodji Seketeli <dodji@redhat.com>
3248 Support up to two --wp options for abipkgdiff
3249 * doc/manuals/abipkgdiff.rst: Update the documentation to say that
3250 --wp can be provided twice, but not more than that.
3251 * tools/abipkgdiff.cc (options::kabi_whitelist_packages): Rename
3252 kabi_whitelist_package to this, and make be of vector<string>
3254 (package::erase_extraction_directories): Erase the white list
3255 package extracted data.
3256 (maybe_handle_kabi_whitelist_pkg, parse_command_line): Adjust.
3257 (main): Make sure there is no more than 2 --wp on the command
3258 line. Associate a white list package to each kernel package on
3261 2017-07-11 Dodji Seketeli <dodji@redhat.com>
3263 Fix support of the --wp option of abipkgdiff
3264 * tools/abipkgdiff.cc (parse_command_line): Consider the absolute
3265 path of the package given in argument to --wp.
3267 2017-07-11 Dodji Seketeli <dodji@redhat.com>
3269 Use shorter lines in abipkgdiff.cc
3270 * tools/abipkgdiff.cc (parse_command_line): Use shorter lines
3273 2017-07-11 Dodji Seketeli <dodji@redhat.com>
3275 Add missing space in abipkgdiff error message
3276 * tools/abipkgdiff.cc (extract_package): Add missing space here.
3278 2017-07-11 Dodji Seketeli <dodji@redhat.com>
3280 Replace --lkaw with -w and --lkaw-pkg with --wp
3281 * doc/manuals/abipkgdiff.rst: Adjust the documentation.
3282 * tools/abipkgdiff.cc (display_usage): Adjust the usage string.
3283 (parse_command_line): Parse -w instead of --lkaw and --wp
3284 insteadof --lkaw-pkg.
3286 2017-07-11 Dodji Seketeli <dodji@redhat.com>
3288 speed up class type lookup in a corpus
3289 * src/abg-ir.cc (lookup_class_type): In the overload that looks
3290 for a class name denoted by an interned_string in the corpus, do
3291 not look for the class in the translation units when the type
3292 wasn't found in the type map of the corpus.
3293 (maybe_update_types_lookup_map): Remove the
3294 erase_if_exists_already parameter and the code that uses it.
3295 (lookup_class_type_through_translation_units): Remove this
3296 function that is now useless.
3298 2017-07-06 Dodji Seketeli <dodji@redhat.com>
3300 Bug 21644 - abipkgdiff does not emit diagnostics about comparison errors
3301 * include/abg-dwarf-reader.h (status_to_diagnostic_string):
3302 Declare new function.
3303 * src/abg-dwarf-reader.cc (status_to_diagnostic_string): Define
3305 * tools/abipkgdiff.cc (compare): Take a new detailed_error_status
3307 (compare_task::perform): Get the details of the error, in case the
3308 status of the comparison is ABIDIFF_ERROR.
3310 2017-07-05 Dodji Seketeli <dodji@redhat.com>
3312 Bug 21153 - abipkgdiff reports undetermined interface subtype changes
3313 * src/abg-ir.cc (get_name_of_qualified_type): A noop-qualified
3314 type has an empty string as reprsentation for its qualifier.
3315 * src/abg-dwarf-reader.cc (die_qualified_type_name): Adjust to
3316 comply with what is done in get_name_of_qualified_type. Adjust
3318 * tests/data/test-read-dwarf/test22-pr19097-libstdc++.so.6.0.17.so.abi:
3320 * tests/data/test-diff-pkg/libcdio-0.94-1.fc26.x86_64--libcdio-0.94-2.fc26.x86_64-report.1.txt:
3321 New reference test output.
3322 * tests/data/test-diff-pkg/libcdio-0.94-1.fc26.x86_64.rpm: New
3324 * tests/data/test-diff-pkg/libcdio-0.94-2.fc26.x86_64.rpm: Likewise.
3325 * tests/data/test-diff-pkg/libcdio-debuginfo-0.94-1.fc26.x86_64.rpm: Likewise.
3326 * tests/data/test-diff-pkg/libcdio-debuginfo-0.94-2.fc26.x86_64.rpm Likewise.
3327 * tests/data/Makefile.am: Add the new test inputs to source distribution.
3328 * tests/test-diff-pkg.cc (in_out_specs): Make this test harness run on
3329 the new test inputs above.
3331 2017-07-03 Dodji Seketeli <dodji@redhat.com>
3333 Fix typo in comments
3334 * src/abg-ir.cc (type_base::get_canonical_type_for): Fix a typo in
3337 2017-07-03 Dodji Seketeli <dodji@redhat.com>
3339 Fix a typo when reporting size change wrt a decl-only class
3340 * src/abg-comparison.cc (report_size_and_alignment_changes): Fix
3343 2017-07-03 Dodji Seketeli <dodji@redhat.com>
3345 Better handle decl-only classes being different from their definition
3346 * src/abg-comparison.cc (function_decl_diff::report): Don't report
3347 possible vtable changes between a decl-only class and its
3349 * src/abg-ir.cc (type_base::get_canonical_type_for): Consider that
3350 a decl-only class is different from its definition when comparing
3351 types for the purpose of type canonicalization.
3352 (equals): In the class_or_union overload, only consider the global
3353 decl_only_class_equals_definition() property to know when to
3354 consider that a decl-only class is different from its definition
3355 when comparing two classes.
3356 * src/abg-reader.cc (build_class_decl): Read the size property of
3357 a class, even if it's a decl-only class.
3358 * src/abg-writer.cc (write_class_decl_opening_tag): Write size
3359 property of types even if the types are decl-only classes.
3360 * tests/data/test-annotate/test13-pr18894.so.abi: Adjust.
3361 * tests/data/test-annotate/test14-pr18893.so.abi: Likewise.
3362 * tests/data/test-annotate/test15-pr18892.so.abi: Likewise.
3363 * tests/data/test-annotate/test17-pr19027.so.abi: Likewise.
3364 * tests/data/test-annotate/test18-pr19037-libvtkRenderingLIC-6.1.so.abi:
3366 * tests/data/test-annotate/test19-pr19023-libtcmalloc_and_profiler.so.abi:
3368 * tests/data/test-annotate/test20-pr19025-libvtkParallelCore-6.1.so.abi:
3370 * tests/data/test-annotate/test21-pr19092.so.abi: Likewise.
3371 * tests/data/test-diff-dwarf-abixml/test0-pr19026-libvtkIOSQL-6.1.so.1.abi:
3373 * tests/data/test-diff-filter/test31-pr18535-libstdc++-report-0.txt:
3375 * tests/data/test-diff-filter/test31-pr18535-libstdc++-report-1.txt:
3377 * tests/data/test-read-dwarf/test12-pr18844.so.abi: Likewise.
3378 * tests/data/test-read-dwarf/test13-pr18894.so.abi: Likewise.
3379 * tests/data/test-read-dwarf/test14-pr18893.so.abi: Likewise.
3380 * tests/data/test-read-dwarf/test15-pr18892.so.abi: Likewise.
3381 * tests/data/test-read-dwarf/test17-pr19027.so.abi: Likewise.
3382 * tests/data/test-read-dwarf/test18-pr19037-libvtkRenderingLIC-6.1.so.abi:
3384 * tests/data/test-read-dwarf/test19-pr19023-libtcmalloc_and_profiler.so.abi:
3386 * tests/data/test-read-dwarf/test20-pr19025-libvtkParallelCore-6.1.so.abi:
3388 * tests/data/test-read-dwarf/test21-pr19092.so.abi: Likewise.
3389 * tests/data/test-read-dwarf/test22-pr19097-libstdc++.so.6.0.17.so.abi:
3391 * tests/data/test-read-dwarf/test9-pr18818-clang.so.abi: Likewise.
3393 2017-06-28 Dodji Seketeli <dodji@redhat.com>
3395 Don't add empty translation unit to corpus
3396 * src/abg-dwarf-reader.cc (build_translation_unit_and_add_to_ir):
3397 A translation unit DIE that has no child DIE shall not be added to
3398 the current ABI corpus.
3400 2017-06-27 Dodji Seketeli <dodji@redhat.com>
3402 Bug 21631 - Forgot a "break" statement in stv_to_elf_symbol_visibility
3403 * src/abg-dwarf-reader.cc (stv_to_elf_symbol_visibility): Add a
3404 missing break statement.
3406 2017-06-26 Dodji Seketeli <dodji@redhat.com>
3408 Bug 21630 - A this pointer DIE can be const
3409 * src/abg-dwarf-reader.cc (die_this_pointer_is_const): If the DIE
3410 is not a DW_TAG_pointer_type then don't crash.
3412 2017-06-23 Dodji Seketeli <dodji@redhat.com>
3414 Bug 21629 - equivalent DIEs must be of the same DIE source
3415 * src/abg-dwarf-reader.cc (compare_dies): Don't propagate
3416 a canonical DIE to a DIE that comes from a different source.
3418 2017-06-22 Dodji Seketeli <dodji@redhat.com>
3420 Bug 21627 - Libabigail doesn't consider translation unit compile dir
3421 *if* that translation unit has already been seen in the current
3422 binary, instead of creating a new one altogether.
3423 This patch doesn't carry a regression test as the problem was found
3425 https://pagure.io/libabigail-selfcheck/blob/master/f/selfcheck.py
3426 script over the Fedora 25 critpath packages.
3427 The patch does however update existing reference outputs of existings
3428 tests where appropriate.
3429 * include/abg-ir.h (translation_unit::{get_compilation_dir_path,
3430 set_compilation_dir_path, get_absolute_path}):
3431 * src/abg-corpus.cc (corpus::add): Use the new
3432 translation_unit::get_absolute_path() as the key for the tu path
3434 * src/abg-dwarf-reader.cc
3435 (read_context::resolve_declaration_only_classes): Use the new
3436 translation_unit::get_absolute_path().
3437 (build_translation_unit_and_add_to_ir): Set the compilation
3438 directory of the translation unit.
3439 * src/abg-ir-priv.h (translation_unit::priv::{comp_dir_path_,
3441 * src/abg-ir.cc (translation_unit::set_path): Update comment.
3442 (translation_unit::{get_compilation_dir_path,
3443 set_compilation_dir_path, get_absolute_path}): Define new member
3445 * src/abg-reader.cc (read_translation_unit): Take the new
3446 'comp-dir-path' attribute into account.
3447 * src/abg-writer.cc (write_translation_unit): Emit the new
3448 'comp-dir-path' attribute.
3449 * tests/data/test-annotate/libtest23.so.abi: Adjust.
3450 * tests/data/test-annotate/libtest24-drop-fns-2.so.abi: Adjust.
3451 * tests/data/test-annotate/libtest24-drop-fns.so.abi: Adjust.
3452 * tests/data/test-annotate/test0.abi: Adjust.
3453 * tests/data/test-annotate/test1.abi: Adjust.
3454 * tests/data/test-annotate/test13-pr18894.so.abi: Adjust.
3455 * tests/data/test-annotate/test14-pr18893.so.abi: Adjust.
3456 * tests/data/test-annotate/test15-pr18892.so.abi: Adjust.
3457 * tests/data/test-annotate/test17-pr19027.so.abi: Adjust.
3458 * tests/data/test-annotate/test18-pr19037-libvtkRenderingLIC-6.1.so.abi: Adjust.
3459 * tests/data/test-annotate/test19-pr19023-libtcmalloc_and_profiler.so.abi: Adjust.
3460 * tests/data/test-annotate/test2.so.abi: Adjust.
3461 * tests/data/test-annotate/test20-pr19025-libvtkParallelCore-6.1.so.abi: Adjust.
3462 * tests/data/test-annotate/test21-pr19092.so.abi: Adjust.
3463 * tests/data/test-annotate/test3.so.abi: Adjust.
3464 * tests/data/test-annotate/test4.so.abi: Adjust.
3465 * tests/data/test-annotate/test5.o.abi: Adjust.
3466 * tests/data/test-annotate/test6.so.abi: Adjust.
3467 * tests/data/test-annotate/test7.so.abi: Adjust.
3468 * tests/data/test-annotate/test8-qualified-this-pointer.so.abi: Adjust.
3469 * tests/data/test-read-dwarf/libtest23.so.abi: Adjust.
3470 * tests/data/test-read-dwarf/libtest24-drop-fns-2.so.abi: Adjust.
3471 * tests/data/test-read-dwarf/libtest24-drop-fns.so.abi: Adjust.
3472 * tests/data/test-read-dwarf/test0.abi: Adjust.
3473 * tests/data/test-read-dwarf/test1.abi: Adjust.
3474 * tests/data/test-read-dwarf/test10-pr18818-gcc.so.abi: Adjust.
3475 * tests/data/test-read-dwarf/test11-pr18828.so.abi: Adjust.
3476 * tests/data/test-read-dwarf/test12-pr18844.so.abi: Adjust.
3477 * tests/data/test-read-dwarf/test13-pr18894.so.abi: Adjust.
3478 * tests/data/test-read-dwarf/test14-pr18893.so.abi: Adjust.
3479 * tests/data/test-read-dwarf/test15-pr18892.so.abi: Adjust.
3480 * tests/data/test-read-dwarf/test16-pr18904.so.abi: Adjust.
3481 * tests/data/test-read-dwarf/test17-pr19027.so.abi: Adjust.
3482 * tests/data/test-read-dwarf/test18-pr19037-libvtkRenderingLIC-6.1.so.abi: Adjust.
3483 * tests/data/test-read-dwarf/test19-pr19023-libtcmalloc_and_profiler.so.abi: Adjust.
3484 * tests/data/test-read-dwarf/test2.so.abi: Adjust.
3485 * tests/data/test-read-dwarf/test20-pr19025-libvtkParallelCore-6.1.so.abi: Adjust.
3486 * tests/data/test-read-dwarf/test21-pr19092.so.abi: Adjust.
3487 * tests/data/test-read-dwarf/test22-pr19097-libstdc++.so.6.0.17.so.abi: Adjust.
3488 * tests/data/test-read-dwarf/test3.so.abi: Adjust.
3489 * tests/data/test-read-dwarf/test4.so.abi: Adjust.
3490 * tests/data/test-read-dwarf/test5.o.abi: Adjust.
3491 * tests/data/test-read-dwarf/test6.so.abi: Adjust.
3492 * tests/data/test-read-dwarf/test7.so.abi: Adjust.
3493 * tests/data/test-read-dwarf/test8-qualified-this-pointer.so.abi: Adjust.
3494 * tests/data/test-read-dwarf/test9-pr18818-clang.so.abi: Adjust.
3496 2017-05-04 Dodji Seketeli <dodji@redhat.com>
3499 * src/abg-dwarf-reader.cc (read_context::{die_wip_classes_map,
3500 die_wip_function_types_map, types_to_canonicalize,
3501 tu_die_imported_unit_points_map, die_parent_map,
3502 load_kernel_symbol_table}): Add missing space to statement.
3503 (get_parent_die): Likewise.
3504 (build_enum_type): Fix typo in comment.
3505 (e_machine_to_string, get_version_definition_for_versym)
3506 (lookup_public_function_symbol_from_elf)
3507 (lookup_public_variable_symbol_from_elf)
3508 (lookup_data_tag_from_dynamic_segment, die_is_declaration_only)
3509 (die_is_reference_type, die_function_type_is_method_type): Fix
3511 (read_context::{resolve_declaration_only_classes,
3512 fixup_functions_with_no_symbols,
3513 load_symbol_maps_from_symtab_section, load_dt_soname_and_needed,
3514 load_elf_architecture, load_elf_properties,
3515 maybe_adjust_address_for_exec_or_dyn, maybe_adjust_fn_sym_address,
3516 address_is_in_opd_section, load_elf_architecture,
3517 build_die_parent_maps}): Likewise.
3518 (op_pushes_constant_value, op_manipulates_stack): Use the
3519 dwarf_expr_eval_context::push method.
3520 (op_is_control_flow, die_return_and_parm_names_from_fn_type_die)
3521 (die_function_signature, die_pretty_print_type)
3522 (get_default_array_lower_bound)
3523 (build_translation_unit_and_add_to_ir, build_enum_type)
3524 (add_or_update_class_type, build_function_type)
3525 (build_function_decl, build_ir_node_from_die)
3526 (lookup_public_function_symbol_from_elf): Fix indentation.
3527 * src/abg-ir.cc (maybe_update_types_lookup_map): Remove useless space.
3529 2017-05-31 Dodji Seketeli <dodji@redhat.com>
3531 Fix doc glitch in abidiff.rst
3532 * doc/manuals/abidiff.rst: Fix glitch.
3534 2017-06-12 Dodji Seketeli <dodji@redhat.com>
3536 Symbols with the same zero value are not aliases
3537 * src/abg-dwarf-reader.cc (load_symbol_maps_from_symtab_section):
3538 Do not consider symbols with zero value as being aliases.
3539 * tests/data/test-diff-filter/test20-inline-report-0.txt: Adjust.
3540 * tests/data/test-diff-filter/test20-inline-report-1.txt:
3542 * test-diff-filter/test41-PR21486-abg-writer.gcc.o: New test
3544 * tests/data/test-diff-filter/test41-PR21486-abg-writer.llvm.o:
3546 * tests/data/Makefile.am: Add the new test material to source
3548 * tests/test-diff-filter.cc (in_out_specs): Run the test harness
3549 on the new test input above.
3550 * tests/data/test-diff-dwarf/test5-report.txt: Adjust.
3551 * tests/data/test-diff-filter/test9-report.txt: Adjust.
3552 * tests/data/test-diff-filter/test20-inline-report-0.txt: Adjust.
3553 * tests/data/test-diff-filter/test20-inline-report-1.txt: Adjust.
3555 2017-06-12 Dodji Seketeli <dodji@redhat.com>
3557 Support ELF symbol visibility property
3558 * include/abg-ir.h (enum elf_symbol::visibility): Define new enum.
3559 (elf_symbol::{elf_symbol, create}): Take a visibility parameter.
3560 (elf_symbol::{set, get}_visibility): Declare new accessors.
3561 (string_to_elf_symbol_binding): Declare new function.
3562 * src/abg-ir.cc (elf_symbol::priv::visibility_): New data member.
3563 (elf_symbol::priv::priv): Adjust.
3564 (elf_symbol::elf_symbol): Take a visibility parameter.
3565 (elf_symbol::create): Likewise
3566 (elf_symbol::{s,g}et_visibility): Define new accessors.
3567 (elf_symbol::is_public): Adjust.
3568 (operator<<(std::ostream&, elf_symbol::visibility)): Define new
3570 (string_to_elf_symbol_visibility): Define new function.
3571 * src/abg-dwarf-reader.cc (stv_to_elf_symbol_visibility): Define
3572 new static function.
3573 (lookup_symbol_from_sysv_hash_tab)
3574 (lookup_symbol_from_gnu_hash_tab, lookup_symbol_from_symtab)
3575 (create_default_var_sym, create_default_fn_sym): Adjust.
3576 * src/abg-reader.cc (read_elf_symbol_binding): Define new
3578 (build_elf_symbol): Adjust.
3579 * src/abg-writer.cc (write_elf_symbol_visibility): Define new
3581 * tests/data/test-annotate/libtest23.so.abi: Adjust.
3582 * tests/data/test-annotate/libtest24-drop-fns-2.so.abi: Adjust.
3583 * tests/data/test-annotate/libtest24-drop-fns.so.abi: Adjust.
3584 * tests/data/test-annotate/test0.abi: Adjust.
3585 * tests/data/test-annotate/test1.abi: Adjust.
3586 * tests/data/test-annotate/test13-pr18894.so.abi: Adjust.
3587 * tests/data/test-annotate/test14-pr18893.so.abi: Adjust.
3588 * tests/data/test-annotate/test15-pr18892.so.abi: Adjust.
3589 * tests/data/test-annotate/test17-pr19027.so.abi: Adjust.
3590 * tests/data/test-annotate/test18-pr19037-libvtkRenderingLIC-6.1.so.abi:
3592 * tests/data/test-annotate/test19-pr19023-libtcmalloc_and_profiler.so.abi:
3594 * tests/data/test-annotate/test2.so.abi: Adjust.
3595 * tests/data/test-annotate/test20-pr19025-libvtkParallelCore-6.1.so.abi:
3597 * tests/data/test-annotate/test21-pr19092.so.abi: Adjust.
3598 * tests/data/test-annotate/test3.so.abi: Adjust.
3599 * tests/data/test-annotate/test4.so.abi: Adjust.
3600 * tests/data/test-annotate/test5.o.abi: Adjust.
3601 * tests/data/test-annotate/test6.so.abi: Adjust.
3602 * tests/data/test-annotate/test7.so.abi: Adjust.
3603 * tests/data/test-annotate/test8-qualified-this-pointer.so.abi:
3605 * tests/data/test-read-dwarf/libtest23.so.abi: Adjust.
3606 * tests/data/test-read-dwarf/libtest24-drop-fns-2.so.abi: Adjust.
3607 * tests/data/test-read-dwarf/libtest24-drop-fns.so.abi: Adjust.
3608 * tests/data/test-read-dwarf/test0.abi: Adjust.
3609 * tests/data/test-read-dwarf/test1.abi: Adjust.
3610 * tests/data/test-read-dwarf/test10-pr18818-gcc.so.abi: Adjust.
3611 * tests/data/test-read-dwarf/test11-pr18828.so.abi: Adjust.
3612 * tests/data/test-read-dwarf/test12-pr18844.so.abi: Adjust.
3613 * tests/data/test-read-dwarf/test13-pr18894.so.abi: Adjust.
3614 * tests/data/test-read-dwarf/test14-pr18893.so.abi: Adjust.
3615 * tests/data/test-read-dwarf/test15-pr18892.so.abi: Adjust.
3616 * tests/data/test-read-dwarf/test16-pr18904.so.abi: Adjust.
3617 * tests/data/test-read-dwarf/test17-pr19027.so.abi: Adjust.
3618 * tests/data/test-read-dwarf/test18-pr19037-libvtkRenderingLIC-6.1.so.abi:
3620 * tests/data/test-read-dwarf/test19-pr19023-libtcmalloc_and_profiler.so.abi:
3622 * tests/data/test-read-dwarf/test2.so.abi: Adjust.
3623 * tests/data/test-read-dwarf/test20-pr19025-libvtkParallelCore-6.1.so.abi:
3625 * tests/data/test-read-dwarf/test21-pr19092.so.abi: Adjust.
3626 * tests/data/test-read-dwarf/test22-pr19097-libstdc++.so.6.0.17.so.abi:
3628 * tests/data/test-read-dwarf/test3.so.abi: Adjust.
3629 * tests/data/test-read-dwarf/test4.so.abi: Adjust.
3630 * tests/data/test-read-dwarf/test5.o.abi: Adjust.
3631 * tests/data/test-read-dwarf/test6.so.abi: Adjust.
3632 * tests/data/test-read-dwarf/test7.so.abi: Adjust.
3633 * tests/data/test-read-dwarf/test8-qualified-this-pointer.so.abi:
3635 * tests/data/test-read-dwarf/test9-pr18818-clang.so.abi: Adjust.
3636 * tests/data/test-read-write/test26.xml: Adjust.
3637 * tests/data/test-read-write/test27.xml: Adjust.
3638 * tests/data/test-read-write/test28-without-std-fns-ref.xml:
3640 * tests/data/test-read-write/test28-without-std-vars-ref.xml:
3643 2017-06-09 Dodji Seketeli <dodji@redhat.com>
3645 Filter top cv qualifier changes on function parameter types
3646 * include/abg-comparison.h (enum diff_category): Add a new
3647 FN_PARM_TYPE_TOP_CV_CHANGE_CATEGORY enumerator. "Or" the
3648 enumerator to the EVERYTHING_CATEGORY enumerator.
3649 * src/abg-comp-filter.cc (has_fn_parm_type_cv_qual_change): Define
3650 new static function.
3651 (categorize_harmless_diff_node): Categorize changes to top cv
3652 qualifiers on function parameter types into the new
3653 FN_PARM_TYPE_TOP_CV_CHANGE_CATEGORY.
3654 * src/abg-comparison.cc (get_default_harmless_categories_bitmap):
3655 Add the new FN_PARM_TYPE_TOP_CV_CHANGE_CATEGORY category to the
3656 set of harmless categories.
3657 (operator<<(ostream&, diff_category)): Adjust to serialize
3658 the new FN_PARM_TYPE_TOP_CV_CHANGE_CATEGORY.
3659 * tests/data/test-diff-filter/libtest40-v0.so: New test input binary.
3660 * tests/data/test-diff-filter/libtest40-v1.so: Likewise.
3661 * tests/data/test-diff-filter/test40-report-0.txt: New test
3663 * tests/data/test-diff-filter/test40-v0.cc: Source code of the
3665 * tests/data/test-diff-filter/test40-v1.cc: Likewise.
3666 * tests/data/Makefile.am: Add the new test material above to
3667 source distribution.
3668 * tests/test-diff-filter.cc (in_out_specs): Add new binaries to
3670 * tests/data/test-diff-filter/test30-pr18904-rvalueref-report0.txt:
3672 * tests/data/test-diff-filter/test30-pr18904-rvalueref-report1.txt:
3674 * tests/data/test-diff-filter/test35-pr18754-no-added-syms-report-0.txt:
3676 * tests/data/test-diff-filter/test35-pr18754-no-added-syms-report-1.txt:
3679 2017-05-28 Dodji Seketeli <dodji@redhat.com>
3681 Do not report about voffset when it's not set in debug info
3682 * include/abg-ir.h (mem_fn_context_rel::mem_fn_context_rel):
3683 Initialize the virtual offset to -1.
3684 * src/abg-comparison.cc (represent): In the overload to represent
3685 a method_decl, do not represent the vofffset if it's not set.
3686 * src/abg-writer.cc (write_voffset): The virtual offset is signed
3687 because if it's -1, it means no offset is set.
3688 * tests/data/test-annotate/test14-pr18893.so.abi: Adjust.
3689 * tests/data/test-annotate/test18-pr19037-libvtkRenderingLIC-6.1.so.abi:
3691 * tests/data/test-annotate/test19-pr19023-libtcmalloc_and_profiler.so.abi:
3693 * tests/data/test-annotate/test20-pr19025-libvtkParallelCore-6.1.so.abi:
3695 * tests/data/test-diff-dwarf-abixml/test0-pr19026-libvtkIOSQL-6.1.so.1.abi:
3697 * tests/data/test-diff-dwarf/test28-vtable-changes-report-0.txt: Adjust.
3698 * tests/data/test-read-dwarf/test10-pr18818-gcc.so.abi: Adjust.
3699 * tests/data/test-read-dwarf/test11-pr18828.so.abi: Adjust.
3700 * tests/data/test-read-dwarf/test14-pr18893.so.abi: Adjust.
3701 * tests/data/test-read-dwarf/test18-pr19037-libvtkRenderingLIC-6.1.so.abi:
3703 * tests/data/test-read-dwarf/test19-pr19023-libtcmalloc_and_profiler.so.abi:
3705 * tests/data/test-read-dwarf/test20-pr19025-libvtkParallelCore-6.1.so.abi:
3707 * tests/data/test-read-dwarf/test22-pr19097-libstdc++.so.6.0.17.so.abi:
3710 2017-05-17 Dodji Seketeli <dodji@redhat.com>
3712 Allow selective resolution of class declaration
3713 * include/abg-fwd.h (type_base_wptrs_type)
3714 (istring_type_base_wptrs_map_type): Define new typedefs.
3715 (lookup_class_types): Declare new functions.
3717 (environment::decl_only_class_equals_definition): Declare new
3719 (type_maps::{*_types}): Make these accessors return
3720 istring_type_base_wptrs_map_type& instead of
3721 istring_type_base_wptr_map_type&.
3722 * src/abg-dwarf-reader.cc
3723 (read_context::resolve_declaration_only_classes): Implement the
3724 new selective declaration resolution scheme.
3725 * src/abg-ir.cc (type_maps::priv::{*_types_}): Change the type of
3726 these data members from istring_type_base_wptr_map_type to
3727 istring_type_base_wptrs_map_type.
3728 (type_maps::{*_types}): Make these accessors definitions return
3729 istring_type_base_wptrs_map_type& instead of
3730 istring_type_base_wptr_map_type&.
3731 (translation_unit::bind_function_type_life_time): Adjust.
3732 (environment::priv::decl_only_class_equals_definition_): New data
3734 (environment::priv::priv): Initialize it. By default, a decl-only
3735 class is now considered different from its definition.
3736 (environment::decl_only_class_equals_definition): Define new
3738 (lookup_types_in_map, lookup_class_types): Define new functions.
3739 (lookup_type_in_map, lookup_union_type_per_location)
3740 (lookup_basic_type, lookup_basic_type_per_location)
3741 (lookup_class_type, lookup_class_type_per_location)
3742 (lookup_union_type, lookup_enum_type)
3743 (lookup_enum_type_per_location, lookup_typedef_type)
3744 (lookup_typedef_type_per_location, lookup_qualified_type)
3745 (lookup_pointer_type, lookup_reference_type, lookup_array_type)
3746 (lookup_function_type, maybe_update_types_lookup_map)
3747 (maybe_update_types_lookup_map<class_decl>)
3748 (maybe_update_types_lookup_map<function_type>): Adjust.
3749 (type_base::get_canonical_type_for): When doing type comparison
3750 here, we can now consider that an unresolved class declaration
3751 compares different to an incompatible class definition of the same
3752 name. So no need to look through decl-only classes in that case.
3753 (equals): In the overload for class_or_union, if
3754 environment::decl_only_class_equals_definition() is false, then an
3755 unresolved class declaration of name "N" compares different to a
3756 class definition named "N".
3757 * tests/data/test-annotate/test15-pr18892.so.abi: Adjust.
3758 * tests/data/test-read-dwarf/test9-pr18818-clang.so.abi: Adjust
3759 * tests/data/test-read-dwarf/test12-pr18844.so.abi: Adjust.
3760 * tests/data/test-read-dwarf/test15-pr18892.so.abi: Adjust.
3761 * tests/data/test-diff-dwarf/test28-vtable-changes-report-0.txt:
3763 * tests/data/test-diff-pkg/spice-server-0.12.4-19.el7.x86_64-0.12.8-1.el7.x86_64-report-2.txt:
3765 * tests/data/test-diff-filter/test38/Makefile: New test material.
3766 * tests/data/test-diff-filter/test38/test38-a.c: Likewise.
3767 * tests/data/test-diff-filter/test38/test38-b.c: Likewise.
3768 * tests/data/test-diff-filter/test38/test38-c.c: Likewise.
3769 * tests/data/test-diff-filter/test38/test38-report-0.txt: Likewise.
3770 * tests/data/test-diff-filter/test38/test38-v0: Likewise.
3771 * tests/data/test-diff-filter/test38/test38-v1: Likewise.
3772 * tests/data/test-diff-filter/test38/test38.h: Likewise.
3773 * tests/data/test-diff-filter/test39/Makefile: Likewise.
3774 * tests/data/test-diff-filter/test39/test39-a-v0.c: Likewise.
3775 * tests/data/test-diff-filter/test39/test39-a-v1.c: Likewise.
3776 * tests/data/test-diff-filter/test39/test39-b-v0.c: Likewise.
3777 * tests/data/test-diff-filter/test39/test39-b-v1.c: Likewise.
3778 * tests/data/test-diff-filter/test39/test39-c-v0.c: Likewise.
3779 * tests/data/test-diff-filter/test39/test39-c-v1.c: Likewise.
3780 * tests/data/test-diff-filter/test39/test39-main.c: Likewise.
3781 * tests/data/test-diff-filter/test39/test39-report-0.txt: Likewise.
3782 * tests/data/test-diff-filter/test39/test39-v0: Likewise.
3783 * tests/data/test-diff-filter/test39/test39-v1: Likewise.
3784 * tests/data/test-diff-filter/test39/test39.h: Likewise.
3785 * tests/data/Makefile.am: Add the new test material above to the
3786 source distribution.
3787 * tests/test-diff-filter.cc (in_out_specs): Add the new test
3788 inputs above to the test harness.
3790 2017-05-31 Dodji Seketeli <dodji@redhat.com>
3792 Add documentation for the kmidiff tool
3793 * doc/manuals/kmidiff.rst: New doc file.
3794 * doc/manuals/Makefile.am: Add the above file to source
3797 2017-05-31 Dodji Seketeli <dodji@redhat.com>
3799 Allow re-using the ELF/DWARF read_context when loading a corpus group
3800 * include/abg-dwarf-reader.h (reset_read_context): Declare new
3802 * src/abg-dwarf-reader.cc (read_context::elf_paths_): Make this to
3804 (read_context::initialize): New function to initialize all data
3806 (read_context::read_context): Use the new read_context::initialize
3807 function, rather than initializing data members 'inline' here.
3808 (reset_read_context): Define a new function to reset a
3809 read_context so that it can be re-used to load a new corpus.
3811 2017-05-31 Dodji Seketeli <dodji@redhat.com>
3813 Add --vmlinux{1,2} option to abidw and kmidiff
3814 * include/abg-tools-utils.h
3815 (build_corpus_group_from_kernel_dist_under): Add a new
3816 vmlinux_path parameter.
3817 * src/abg-tools-utils.cc (find_vmlinux_and_module_paths): Do not
3818 try to find a vmlinux binary if we already have the path to one.
3819 (build_corpus_group_from_kernel_dist_under): Add a new
3820 vmlinux_path parameter.
3821 * tools/abidw.cc (options::vmlinux): New data member.
3822 (display_usage): Add a usage string for --vmlinux
3823 (parse_command_line): Parse the new --vmlinux option.
3824 (load_kernel_corpus_group_and_write_abixml): Fix some return code
3825 when the function fails. Verify the presence of the vmlinux
3826 binary that was given. Adjust.
3827 * tools/kmidiff.cc (options::{vmlinux1, vmlinux2}): New data
3829 (display_usage): Add a usage string for --vmlinux1 and --vmlinux2.
3830 (parse_command_line): Parse the --vmlinux1 and --vmlinux2
3834 2017-05-18 Dodji Seketeli <dodji@redhat.com>
3836 Cache function type name computation results
3837 * src/abg-ir.cc (get_type_name): Cache function type names.
3839 2017-05-29 Dodji Seketeli <dodji@redhat.com>
3841 Fix innacurate test condition when reading an enum type from abixml
3842 * src/abg-reader.cc (build_enum_type_decl): Do not check for
3843 errno which might have been set earlier by something else.
3844 Rather, check the returned value for overflow or underflow.
3846 2017-05-28 Dodji Seketeli <dodji@redhat.com>
3848 Do not report about voffset when it's not set in debug info
3849 * include/abg-ir.h (mem_fn_context_rel::mem_fn_context_rel):
3850 Initialize the virtual offset to -1.
3851 * src/abg-comparison.cc (represent): In the overload to represent
3852 a method_decl, do not represent the vofffset if it's not set.
3853 * src/abg-writer.cc (write_voffset): The virtual offset is signed
3854 because if it's -1, it means no offset is set.
3855 * tests/data/test-annotate/test14-pr18893.so.abi: Adjust.
3856 * tests/data/test-annotate/test18-pr19037-libvtkRenderingLIC-6.1.so.abi:
3858 * tests/data/test-annotate/test19-pr19023-libtcmalloc_and_profiler.so.abi:
3860 * tests/data/test-annotate/test20-pr19025-libvtkParallelCore-6.1.so.abi:
3862 * tests/data/test-diff-dwarf-abixml/test0-pr19026-libvtkIOSQL-6.1.so.1.abi:
3864 * tests/data/test-diff-dwarf/test28-vtable-changes-report-0.txt: Adjust.
3865 * tests/data/test-read-dwarf/test10-pr18818-gcc.so.abi: Adjust.
3866 * tests/data/test-read-dwarf/test11-pr18828.so.abi: Adjust.
3867 * tests/data/test-read-dwarf/test14-pr18893.so.abi: Adjust.
3868 * tests/data/test-read-dwarf/test18-pr19037-libvtkRenderingLIC-6.1.so.abi:
3870 * tests/data/test-read-dwarf/test19-pr19023-libtcmalloc_and_profiler.so.abi:
3872 * tests/data/test-read-dwarf/test20-pr19025-libvtkParallelCore-6.1.so.abi:
3874 * tests/data/test-read-dwarf/test22-pr19097-libstdc++.so.6.0.17.so.abi:
3877 2017-05-18 Dodji Seketeli <dodji@redhat.com>
3879 Speedup DIE representation computing esp function signature in C
3880 * src/abg-dwarf-reader.cc (die_function_signature): For C DIEs,
3881 just return the (linkage) name of the function.
3882 * tests/data/test-annotate/test15-pr18892.so.abi: Adjust.
3883 * tests/data/test-annotate/test21-pr19092.so.abi: Adjust.
3884 * tests/data/test-read-dwarf/test15-pr18892.so.abi: Adjust.
3885 * tests/data/test-read-dwarf/test21-pr19092.so.abi: Adjust.
3887 2017-05-17 Dodji Seketeli <dodji@redhat.com>
3889 Allow selective resolution of class declaration
3890 * include/abg-fwd.h (type_base_wptrs_type)
3891 (istring_type_base_wptrs_map_type): Define new typedefs.
3892 (lookup_class_types): Declare new functions.
3894 (environment::decl_only_class_equals_definition): Declare new
3896 (type_maps::{*_types}): Make these accessors return
3897 istring_type_base_wptrs_map_type& instead of
3898 istring_type_base_wptr_map_type&.
3899 * src/abg-dwarf-reader.cc
3900 (read_context::resolve_declaration_only_classes): Implement the
3901 new selective declaration resolution scheme.
3902 * src/abg-ir.cc (type_maps::priv::{*_types_}): Change the type of
3903 these data members from istring_type_base_wptr_map_type to
3904 istring_type_base_wptrs_map_type.
3905 (type_maps::{*_types}): Make these accessors definitions return
3906 istring_type_base_wptrs_map_type& instead of
3907 istring_type_base_wptr_map_type&.
3908 (translation_unit::bind_function_type_life_time): Adjust.
3909 (environment::priv::decl_only_class_equals_definition_): New data
3911 (environment::priv::priv): Initialize it. By default, a decl-only
3912 class is now considered different from its definition.
3913 (environment::decl_only_class_equals_definition): Define new
3915 (lookup_types_in_map, lookup_class_types): Define new functions.
3916 (lookup_type_in_map, lookup_union_type_per_location)
3917 (lookup_basic_type, lookup_basic_type_per_location)
3918 (lookup_class_type, lookup_class_type_per_location)
3919 (lookup_union_type, lookup_enum_type)
3920 (lookup_enum_type_per_location, lookup_typedef_type)
3921 (lookup_typedef_type_per_location, lookup_qualified_type)
3922 (lookup_pointer_type, lookup_reference_type, lookup_array_type)
3923 (lookup_function_type, maybe_update_types_lookup_map)
3924 (maybe_update_types_lookup_map<class_decl>)
3925 (maybe_update_types_lookup_map<function_type>): Adjust.
3926 (type_base::get_canonical_type_for): When doing type comparison
3927 here, we can now consider that an unresolved class declaration
3928 compares different to an incompatible class definition of the same
3929 name. So no need to look through decl-only classes in that case.
3930 (equals): In the overload for class_or_union, if
3931 environment::decl_only_class_equals_definition() is false, then an
3932 unresolved class declaration of name "N" compares different to a
3933 class definition named "N".
3934 * tests/data/test-annotate/test15-pr18892.so.abi: Adjust.
3935 * tests/data/test-read-dwarf/test9-pr18818-clang.so.abi: Adjust
3936 * tests/data/test-read-dwarf/test12-pr18844.so.abi: Adjust.
3937 * tests/data/test-read-dwarf/test15-pr18892.so.abi: Adjust.
3938 * tests/data/test-diff-dwarf/test28-vtable-changes-report-0.txt:
3940 * tests/data/test-diff-pkg/spice-server-0.12.4-19.el7.x86_64-0.12.8-1.el7.x86_64-report-2.txt:
3942 * tests/data/test-diff-filter/test38/Makefile: New test material.
3943 * tests/data/test-diff-filter/test38/test38-a.c: Likewise.
3944 * tests/data/test-diff-filter/test38/test38-b.c: Likewise.
3945 * tests/data/test-diff-filter/test38/test38-c.c: Likewise.
3946 * tests/data/test-diff-filter/test38/test38-report-0.txt: Likewise.
3947 * tests/data/test-diff-filter/test38/test38-v0: Likewise.
3948 * tests/data/test-diff-filter/test38/test38-v1: Likewise.
3949 * tests/data/test-diff-filter/test38/test38.h: Likewise.
3950 * tests/data/test-diff-filter/test39/Makefile: Likewise.
3951 * tests/data/test-diff-filter/test39/test39-a-v0.c: Likewise.
3952 * tests/data/test-diff-filter/test39/test39-a-v1.c: Likewise.
3953 * tests/data/test-diff-filter/test39/test39-b-v0.c: Likewise.
3954 * tests/data/test-diff-filter/test39/test39-b-v1.c: Likewise.
3955 * tests/data/test-diff-filter/test39/test39-c-v0.c: Likewise.
3956 * tests/data/test-diff-filter/test39/test39-c-v1.c: Likewise.
3957 * tests/data/test-diff-filter/test39/test39-main.c: Likewise.
3958 * tests/data/test-diff-filter/test39/test39-report-0.txt: Likewise.
3959 * tests/data/test-diff-filter/test39/test39-v0: Likewise.
3960 * tests/data/test-diff-filter/test39/test39-v1: Likewise.
3961 * tests/data/test-diff-filter/test39/test39.h: Likewise.
3962 * tests/data/Makefile.am: Add the new test material above to the
3963 source distribution.
3964 * tests/test-diff-filter.cc (in_out_specs): Add the new test
3965 inputs above to the test harness.
3967 2017-05-04 Dodji Seketeli <dodji@redhat.com>
3969 Avoid de-duplicating different C types that have identical name
3970 * src/abg-dwarf-reader.cc (die_decl_map_type, die_type_map_type):
3971 Remove these typedefs.
3972 (die_artefact_map_type, istring_dwarf_offsets_map_type): New
3974 (die_is_at_class_scope, die_qualified_type_name)
3975 (die_qualified_decl_name, die_qualified_type_name_empty)
3976 (die_return_and_parm_names_from_fn_type_die)
3977 (die_function_type_is_method_type):
3978 Const-ify the read_context& parameter.
3979 (read_context::die_source_dependant_container_set::get_container):
3981 (read_context::{name_artefacts_map_, per_tu_name_artefacts_map_,
3982 die_decl_map_, alternate_die_decl_map_, type_unit_die_decl_map_,
3983 die_type_map_, alternate_die_type_map_, type_unit_die_type_map_}):
3984 Remove data members.
3985 (read_context::{die_decl_map, alternate_die_decl_map,
3986 associate_die_to_decl_primary, associate_die_to_decl_alternate,
3987 associate_die_to_decl_from_type_unit,
3988 lookup_decl_from_die_offset_primary,
3989 lookup_decl_from_die_offset_alternate,
3990 lookup_decl_from_type_unit_die_offset,
3991 lookup_type_artifact_from_die_per_tu,
3992 lookup_artifact_from_per_tu_die_representation,
3993 associate_die_to_artifact_by_repr,
3994 associate_die_to_artifact_by_repr_internal, clear_die_type_maps}):
3995 Remove member functions.
3996 (read_context::{decl_die_repr_die_offsets_maps_,
3997 type_die_repr_die_offsets_maps_, decl_die_artefact_maps_,
3998 type_die_artefact_maps_, dwarf_expr_eval_context_}): Add new data
4000 (read_context::clear_per_translation_unit_data): Don't clear
4001 read_context::per_tu_name_artefacts_map_ data member as it's
4003 (read_context::clear_per_corpus_data): Don't clear
4004 read_context::name_artefacts_map_ and all the other relevant data
4005 members that got removed.
4006 (read_context::{dwarf_per_die_source,
4007 decl_die_repr_die_offsets_maps, type_die_repr_die_offsets_maps,
4008 get_canonical_die, get_die_from_offset, decl_die_artefact_maps,
4009 type_die_artefact_maps, dwarf_expr_eval_ctxt}): Add new member
4011 (compare_dies, compare_as_decl_dies)
4012 (compare_as_type_dies, maybe_finish_function_decl_reading)
4013 (die_is_anonymous): Define new functions.
4014 (read_context::associate_die_to_decl): Remove the
4015 do_associate_by_repr_per_tu parameter. Use the new
4016 read_context::{decl_die_artefact_maps_, get_canonical_die} member
4018 (read_context::lookup_decl_from_die_offset): Use Dwarf_Off rather
4019 than size_t for the type of the die_offset parameter. Use the
4020 lookup_artifact_from_die_offset member function.
4021 (read_context::lookup_type_artifact_from_die): Const-ify. In one
4022 overload, take a new 'die_as_type' parameter. Use the new
4023 get_canonical_die, type_die_artefact_maps and
4024 decl_die_artefact_maps member functions. In the second overload,
4025 use the first overload.
4026 (read_context::odr_is_relevant): Add an overload that takes a DIE.
4027 (read_context::associate_die_to_type): Remove the
4028 do_associate_by_repr and do_associate_per_tu parameters. Use the
4029 new get_canonical_die and type_die_artefact_maps member functions.
4030 (read_context::lookup_type_from_die): Use the new
4031 lookup_artifact_from_die member function.
4032 (read_context::lookup_type_from_die_offset): Use the new
4033 type_die_artefact_maps member function. When the found artifact
4034 is a function_decl, return its type.
4035 (read_context::schedule_type_for_late_canonicalization): Use the
4036 new get_canonical_die and type_die_artefact_maps member functions.
4037 (die_function_signature): Const-ify. Get the scope name right
4038 even for scopes that are not types.
4039 (die_member_offset): Make eval_last_constant_dwarf_sub_expr use
4040 the new cached DWARF expression evalution context.
4041 (get_parent_die): Support where_offset equals to zero. This means
4042 we are looking at a C binary, basically.
4043 (build_enum_type) : Use the new overload of
4044 read_context::odr_is_relevant that takes a DIE. Adjust.
4045 (add_or_update_union_type, add_or_update_class_type): Don't lookup
4046 classes/unions per location anymore. Now that we can compare DIEs
4047 in a fined grain manner, the approximation of the location is not
4049 (build_pointer_type)
4050 (build_function_type): Associate DIE to type if we reuse an
4052 (build_or_get_fn_decl_if_not_suppressed): When re-using a
4053 function decl internal representation from an equivalent DIE that
4054 we've seen before, it can happen that we want to augment that
4055 function decl internal representation with new properties coming
4056 from the DIE we are currently looking at; do that here.
4057 (is_function_for_die_a_member_of_class): Remove the "where_offset"
4059 (add_or_update_member_function): Adjust.
4060 * tests/data/test-annotate/libtest23.so.abi: Adjust.
4061 * tests/data/test-annotate/test13-pr18894.so.abi: Adjust.
4062 * tests/data/test-annotate/test14-pr18893.so.abi: Adjust.
4063 * tests/data/test-annotate/test15-pr18892.so.abi: Adjust.
4064 * tests/data/test-annotate/test17-pr19027.so.abi: Adjust.
4065 * tests/data/test-annotate/test18-pr19037-libvtkRenderingLIC-6.1.so.abi: Adjust.
4066 * tests/data/test-annotate/test19-pr19023-libtcmalloc_and_profiler.so.abi: Adjust.
4067 * tests/data/test-annotate/test20-pr19025-libvtkParallelCore-6.1.so.abi: Adjust.
4068 * tests/data/test-annotate/test21-pr19092.so.abi: Adjust.
4069 * tests/data/test-diff-pkg/libICE-1.0.6-1.el6.x86_64.rpm--libICE-1.0.9-2.el7.x86_64.rpm-report-0.txt: Adjust.
4070 * tests/data/test-diff-pkg/spice-server-0.12.4-19.el7.x86_64-0.12.8-1.el7.x86_64-report-0.txt: Adjust.
4071 * tests/data/test-diff-pkg/spice-server-0.12.4-19.el7.x86_64-0.12.8-1.el7.x86_64-report-1.txt: Adjust.
4072 * tests/data/test-diff-pkg/spice-server-0.12.4-19.el7.x86_64-0.12.8-1.el7.x86_64-report-2.txt: Adjust.
4073 * tests/data/test-read-dwarf/libtest23.so.abi: Adjust.
4074 * tests/data/test-read-dwarf/test10-pr18818-gcc.so.abi: Adjust.
4075 * tests/data/test-read-dwarf/test11-pr18828.so.abi: Adjust.
4076 * tests/data/test-read-dwarf/test12-pr18844.so.abi: Adjust.
4077 * tests/data/test-read-dwarf/test13-pr18894.so.abi: Adjust.
4078 * tests/data/test-read-dwarf/test14-pr18893.so.abi: Adjust.
4079 * tests/data/test-read-dwarf/test15-pr18892.so.abi: Adjust.
4080 * tests/data/test-read-dwarf/test16-pr18904.so.abi: Adjust.
4081 * tests/data/test-read-dwarf/test17-pr19027.so.abi: Adjust.
4082 * tests/data/test-read-dwarf/test18-pr19037-libvtkRenderingLIC-6.1.so.abi: Adjust.
4083 * tests/data/test-read-dwarf/test19-pr19023-libtcmalloc_and_profiler.so.abi: Adjust.
4084 * tests/data/test-read-dwarf/test20-pr19025-libvtkParallelCore-6.1.so.abi: Adjust.
4085 * tests/data/test-read-dwarf/test21-pr19092.so.abi: Adjust.
4086 * tests/data/test-read-dwarf/test22-pr19097-libstdc++.so.6.0.17.so.abi: Adjust.
4087 * tests/data/test-read-dwarf/test9-pr18818-clang.so.abi: Adjust.
4089 2017-04-14 Dodji Seketeli <dodji@redhat.com>
4091 Speedup access to unreferenced symbols when loading corpus_group
4092 * src/abg-corpus.cc (corpus_group::unrefed_{fun, var}_symbol_map):
4094 (corpus_group::priv::priv): Adjust.
4095 (corpus_group::priv::add_unref_{fun,var}_symbols): Define new
4097 (corpus_group::add_corpus): Update the map of unreferenced
4099 (corpus_group::get_unreferenced_{function,variable}_symbols)
4102 2017-04-07 Dodji Seketeli <dodji@redhat.com>
4104 Initial support of de-serializing the KMI of a Linux Kernel Tree
4105 * include/abg-libxml-utils.h (advance_to_next_sibling_element):
4106 Declare new function.
4107 * src/abg-libxml-utils.cc (go_to_next_sibling_element_or_stay)
4108 (advance_to_next_sibling_element): Define new functions.
4109 * include/abg-reader.h (read_corpus_group_from_input)
4110 (read_corpus_group_from_native_xml)
4111 (read_corpus_group_from_native_xml_file): Declare new functions.
4112 * src/abg-reader.cc (read_context::m_corpus_group): New data
4114 (read_context::{get_corpus_group, set_corpus_group}): Define new
4116 (read_translation_unit_from_input): Cleanup logic.
4117 (read_corpus_from_input): Don't assume that the document is
4118 starting with an 'abi-corpus' element. Support the mode where a
4119 caller called the xmlTextReaderExpand function (and so we are
4120 given an expanded xmlNodePtr) and the mode where we need to use
4121 the xmlTextReader API to walk through the 'abi-corpus' element.
4122 Also, if we are building a corpus group, do not clear what used to
4123 be 'per-corpus' data. That data must be shared by all the corpora
4124 of a given abi-corpus-group.
4125 (read_corpus_group_from_input, read_corpus_group_from_native_xml)
4126 (read_corpus_group_from_native_xml_file): Define new functions.
4127 * include/abg-tools-utils.h (FILE_TYPE_XML_CORPUS_GROUP): New
4128 enumerator of the file_type enum.
4129 * src/abg-tools-utils.cc (operator<<): In the overload for
4130 file_type, add a case for the new FILE_TYPE_XML_CORPUS_GROUP.
4131 (guess_file_type): Dectect abi-corpus-group xml element.
4132 * tools/abidiff.cc (adjust_diff_context_for_kmidiff): Define new
4134 (main): Adjust to handle the new FILE_TYPE_XML_CORPUS_GROUP. That
4135 is, compare two FILE_TYPE_XML_CORPUS_GROUP if they are present.
4136 * tools/abilint.cc (main): Likewise.
4137 * tools/kmidiff.cc (main): Detect that one of two .kmi files are
4138 passed. In that case, load the .kmi file(s), build a corpus_group
4139 of it and use it in the comparison.
4141 2017-04-06 Dodji Seketeli <dodji@redhat.com>
4143 Initial support of the serialization of the KMI of a Linux Kernel Tree
4144 * include/abg-tools-utils.h (check_dir)
4145 (get_binary_paths_from_kernel_dist)
4146 (build_corpus_group_from_kernel_dist_under): Declare new
4147 functions. The last two functions are being moved from
4148 tools/kmidiff.cc so that they can be re-used.
4149 * include/abg-writer.h (write_corpus): Declare one overload that
4150 takes a write_context parameter.
4151 (write_corpus_group): Declare three overloads of this new function.
4152 * src/abg-tools-utils.cc (check_dir): Define new function.
4153 (load_generate_apply_suppressions, is_vmlinux, is_kernel_module)
4154 (find_vmlinux_and_module_paths)
4155 (get_binary_paths_from_kernel_dist)
4156 (build_corpus_group_from_kernel_dist_under): Define new functions.
4157 * src/abg-writer.cc (write_context::set_annotate): Define new
4159 (write_corpus): Add an overload that takes a write_context. Adapt
4160 the existing overload to make it use this new one.
4161 (write_corpus_group): Define this new function and two additional
4163 * tools/kmidiff.cc (set_suppressions, is_vmlinux)
4164 (is_kernel_module, find_vmlinux_and_module_paths)
4165 (get_binary_paths_from_kernel_dist)
4166 (build_corpus_group_from_kernel_dist_under): Remove.
4167 (main): Adjust the call to
4168 build_corpus_group_from_kernel_dist_under as its arguments are now
4169 adapted since it's been factorized out into abg-tools-utils.h.
4170 * tools/abidw.cc (options::corpus_group_for_linux): Define new
4172 (options::options): Adjust.
4173 (display_usage): Add help strings for the new --linux-tree option.
4174 (load_corpus_and_write_abixml): Factorize this function out of the
4176 (load_kernel_corpus_group_and_write_abixml): Define new function.
4177 (main): Use the factorized load_corpus_and_write_abixml and the
4178 new load_corpus_and_write_abixml functions.
4179 * tests/test-read-write.cc: Adjust.
4180 * doc/manuals/abidw.rst: Add documentation for the new
4181 --linux-tree option.
4183 2017-04-06 Dodji Seketeli <dodji@redhat.com>
4185 Adjust test reference outputs after changes in abg-writer.cc
4186 * tests/data/test-annotate/test13-pr18894.so.abi: Adjust.
4187 * tests/data/test-annotate/test14-pr18893.so.abi: Adjust.
4188 * tests/data/test-annotate/test15-pr18892.so.abi: Adjust.
4189 * tests/data/test-annotate/test17-pr19027.so.abi: Adjust.
4190 * tests/data/test-annotate/test19-pr19023-libtcmalloc_and_profiler.so.abi: Adjust.
4191 * tests/data/test-read-dwarf/test13-pr18894.so.abi: Adjust.
4192 * tests/data/test-read-dwarf/test14-pr18893.so.abi: Adjust.
4193 * tests/data/test-read-dwarf/test15-pr18892.so.abi: Adjust.
4194 * tests/data/test-read-dwarf/test16-pr18904.so.abi: Adjust.
4195 * tests/data/test-read-dwarf/test17-pr19027.so.abi: Adjust.
4196 * tests/data/test-read-dwarf/test19-pr19023-libtcmalloc_and_profiler.so.abi:
4199 2017-04-06 Dodji Seketeli <dodji@redhat.com>
4201 Fix indentation glitch before the </abi-corpus> tag in abixml
4202 * src/abg-writer.cc (write_corpus): Indent before emitting the
4203 closing </abi-corpus> tag.
4205 2017-04-06 Dodji Seketeli <dodji@redhat.com>
4207 Avoid emitting some empty translation units to abixml
4208 * src/abg-writer.cc (write_corpus): Do not emit a translation
4209 unit that appears empty beforehand.
4211 2017-04-06 Dodji Seketeli <dodji@redhat.com>
4213 Avoid emitting duplicated decls in abixml
4214 * src/abg-writer.cc (write_context::m_emitted_decls_map): New data
4216 (write_context::{decl_name_is_emitted, record_decl_as_emitted}):
4217 Define new memeber functions.
4218 (write_translation_unit): Do not emit a decl that has already been
4220 (write_var_decl, write_function): Record the decl as emitted.
4222 2017-04-04 Dodji Seketeli <dodji@redhat.com>
4224 Rename write_corpus_to_native_xml into write_corpus
4225 * include/abg-writer.h (write_corpus): Rename
4226 write_corpus_to_native_xml to this.
4227 * src/abg-writer.cc (write_corpus): Rename
4228 write_corpus_to_native_xml to this.
4229 * tests/test-read-dwarf.cc (test_task::perform): Adjust.
4230 * tests/test-read-write.cc: Remove a useless "using
4231 abigail::xml_writer::write_corpus_to_native_xml".
4232 * tools/abidw.cc (main): Adjust.
4233 * tools/abilint.cc (main): Adjust.
4235 2017-04-04 Dodji Seketeli <dodji@redhat.com>
4237 Update the reference output of regression tests after kabidiff work
4238 * tests/data/test-annotate/test0.abi: Adjust.
4239 * tests/data/test-annotate/test13-pr18894.so.abi: Adjust.
4240 * tests/data/test-annotate/test14-pr18893.so.abi: Adjust.
4241 * tests/data/test-annotate/test15-pr18892.so.abi: Adjust.
4242 * tests/data/test-annotate/test17-pr19027.so.abi: Adjust.
4243 * tests/data/test-annotate/test18-pr19037-libvtkRenderingLIC-6.1.so.abi: Adjust.
4244 * tests/data/test-annotate/test19-pr19023-libtcmalloc_and_profiler.so.abi: Adjust.
4245 * tests/data/test-annotate/test20-pr19025-libvtkParallelCore-6.1.so.abi: Adjust.
4246 * tests/data/test-annotate/test21-pr19092.so.abi: Adjust.
4247 * tests/data/test-diff-filter/test30-pr18904-rvalueref-report1.txt: Adjust.
4248 * tests/data/test-diff-pkg/spice-server-0.12.4-19.el7.x86_64-0.12.8-1.el7.x86_64-report-0.txt: Adjust.
4249 * tests/data/test-diff-pkg/spice-server-0.12.4-19.el7.x86_64-0.12.8-1.el7.x86_64-report-1.txt: Adjust.
4250 * tests/data/test-diff-pkg/spice-server-0.12.4-19.el7.x86_64-0.12.8-1.el7.x86_64-report-2.txt: Adjust.
4251 * tests/data/test-diff-pkg/tbb-4.1-9.20130314.fc22.x86_64--tbb-4.3-3.20141204.fc23.x86_64-report-0.txt: Adjust.
4252 * tests/data/test-diff-pkg/tbb-4.1-9.20130314.fc22.x86_64--tbb-4.3-3.20141204.fc23.x86_64-report-1.txt: Adjust.
4253 * tests/data/test-read-dwarf/test0.abi: Adjust.
4254 * tests/data/test-read-dwarf/test10-pr18818-gcc.so.abi: Adjust.
4255 * tests/data/test-read-dwarf/test11-pr18828.so.abi: Adjust.
4256 * tests/data/test-read-dwarf/test12-pr18844.so.abi: Adjust.
4257 * tests/data/test-read-dwarf/test13-pr18894.so.abi: Adjust.
4258 * tests/data/test-read-dwarf/test14-pr18893.so.abi: Adjust.
4259 * tests/data/test-read-dwarf/test15-pr18892.so.abi: Adjust.
4260 * tests/data/test-read-dwarf/test16-pr18904.so.abi: Adjust.
4261 * tests/data/test-read-dwarf/test17-pr19027.so.abi: Adjust.
4262 * tests/data/test-read-dwarf/test18-pr19037-libvtkRenderingLIC-6.1.so.abi: Adjust.
4263 * tests/data/test-read-dwarf/test19-pr19023-libtcmalloc_and_profiler.so.abi: Adjust.
4264 * tests/data/test-read-dwarf/test20-pr19025-libvtkParallelCore-6.1.so.abi: Adjust.
4265 * tests/data/test-read-dwarf/test21-pr19092.so.abi: Adjust.
4266 * tests/data/test-read-dwarf/test22-pr19097-libstdc++.so.6.0.17.so.abi: Adjust.
4267 * tests/data/test-read-dwarf/test9-pr18818-clang.so.abi: Adjust.
4269 2017-06-12 Dodji Seketeli <dodji@redhat.com>
4271 Introduce the --kmi-whitelist option to abidiff
4272 * doc/manuals/abidiff.rst: Add documentation for the
4273 --kmi-whitelist option.
4274 * tools/abidiff.cc (display_usage): Emit help string for the
4275 --kmi-whitelist option
4276 (parse_command_line): Parse the new --kmi-whitelist option, of the
4279 2017-04-04 Dodji Seketeli <dodji@redhat.com>
4281 Make abidw support the --kmi-whitelist option
4282 * tools/abidw.cc (options::{kabi_whitelist_paths,
4283 kabi_whitelist_supprs}): New data members.
4284 (display_usage): Add a help string for the new --kmi-whitelist
4286 (parse_command_line): Parse the new --kmi-whitelist option.
4287 (maybe_check_suppression_files): Check the presence of the linux
4288 kernel abi white list passed by the option --kmi-whitelist.
4289 (main): Ignore loading the symbol table if the kernel abi white
4291 * doc/manuals/abidw.rst: Add documentation for the new option.
4293 2017-04-03 Dodji Seketeli <dodji@redhat.com>
4295 Make abipkgdiff compare two kernel packages
4296 * include/abg-suppression.h
4297 (variable_suppression::variable_suppression): Add default arguments
4299 * include/abg-tools-utils.h (dir_exists, dir_is_empty)
4300 (string_begins_with, get_rpm_name, get_rpm_arch, get_deb_name)
4301 (file_is_kernel_package, file_is_kernel_debuginfo_package):
4302 Declare new functions.
4303 * src/abg-tools-utils.cc (dir_exists, dir_is_empty)
4304 (string_begins_with, get_deb_name, get_rpm_name, get_rpm_arch)
4305 (file_is_kernel_package, file_is_kernel_debuginfo_package): Define
4307 (gen_suppr_spec_from_kernel_abi_whitelist): The kernel ABI
4308 whitelist is made of ELF symbols names that ought to match
4309 functions *and* variables that have ELF symbols with those names.
4310 So generate variable suppression specifications as well. Not just
4311 function suppression specifications.
4312 * tools/abipkgdiff.cc (options::{kabi_whitelist_package,
4313 show_symbols_not_referenced_by_debug_info, kabi_whitelist_paths,
4314 kabi_suppressions}): New data members.
4315 (options::options): Adjust.
4316 (package::KIND_KABI_WHITELISTS): New enumerator in the
4318 (package::kabi_whitelist_package_): New data member.
4319 (package::{base_name, kabi_whitelist_package, }): New member
4321 (display_usage): Add a help string to the new
4322 --linux-kernel-abi-whitelist and --no-unreferenced-symbols
4324 (parse_command_line): Parse the new --no-unreferenced-symbols,
4325 --linux-kernel-abi-whitelist and --lkaw-pkg options.
4326 (maybe_check_suppression_files): Check the presence of kabi
4328 (set_diff_context_from_opts): Consider (not) showing symbols not
4329 referenced by debug info.
4330 (compare): If we are looking at linux kernel packages, take the
4331 kernel abi whitelist into account, apply the suppressions
4332 resulting from the kabi whitelists to the ELF read context.
4333 (maybe_collect_kabi_whitelists)
4334 (get_kabi_whitelists_from_arch_under_dir)
4335 (maybe_handle_kabi_whitelist_pkg, maybe_collect_kabi_whitelists)
4336 (get_interesting_files_under_dir): Define new functions.
4337 (maybe_update_vector_of_package_content): Take a new
4338 file_name_to_look_for parameter.
4339 (create_maps_of_package_content)
4340 (extract_package_and_map_its_content): Consider the case of the
4341 package being a linux kernel package.
4342 (main): Take the potential --lkaw-pkg into account.
4343 * doc/manuals/abipkgdiff.rst: Add documentation for options
4344 --linux-kernel-abi-whitelist, --lkaw-pkg and
4345 --no-unreferenced-symbols.
4347 2017-04-03 Dodji Seketeli <dodji@redhat.com>
4349 Avoid loading a translation unit twice from abixml
4350 * src/abg-reader.cc (read_translation_unit): Take (in parameter) a
4351 reference as the resulting translation unit.
4352 (get_or_read_and_add_translation_unit): Define new static
4354 (read_context::get_scope_for_node)
4355 (read_translation_unit_from_input): Use the new
4356 get_or_read_and_add_translation_unit.
4358 2017-04-03 Dodji Seketeli <dodji@redhat.com>
4360 Support loading and comparing two kernel trees
4361 * include/abg-dwarf-reader.h (set_read_context_corpus_group)
4362 (read_and_add_corpus_to_group_from_elf, set_ignore_symbol_table)
4363 (get_ignore_symbol_table): Declare new functions.
4364 * abg-dwarf-reader.cc (read_context::options_type): Define new
4366 (die_dependant_container_set::clear): Define new member function.
4367 (read_context::{bss, tesxt, rodata, data, data1}_section_): Add
4369 (read_context::{symbol_versionning_sections_loaded_,
4370 symbol_versionning_sections_found_}): Likewise.
4371 (read_context::corpus_group_): Likewise.
4372 (read_context::{load_in_linux_kernel_mode, load_all_types,
4373 show_stats, do_log_}): Replace these options by ..
4374 (read_context::options_): ... this instance of the new
4375 read_context:options_type.
4376 (read_context::read_context): Adjust.
4377 (read_context::{clear_alt_debug_info_data, clear_per_corpus_data,
4378 env, get_data_section_for_variable_address, load_all_types,
4379 load_in_linux_kernel_mode, show_stats, do_log}): Adjust.
4380 (create_read_context): Adjust.
4381 (read_context::~read_context): Define destructor.
4382 (read_context::{options, bss_section, text_section,
4383 rodata_section, data_section, data1_section, current_corpus_group,
4384 has_corpus_group, main_corpus_from_current_group,
4385 main_corpus_from_current_group,
4386 current_corpus_is_main_corpus_from_current_group,
4387 should_reuse_type_from_corpus_group}): Define new member
4389 (read_context::get_die_qualified_type_name): Handle the name of
4390 the current translation unit.
4391 (read_context::load_symbol_maps): Really don't load (linux kernel
4392 specific) symbol maps if we were told to ignore the ELF symbol
4394 (set_ignore_symbol_table, get_ignore_symbol_table)
4395 (create_default_var_sym, create_default_fn_sym, add_symbol_to_map)
4396 (set_read_context_corpus_group)
4397 (read_and_add_corpus_to_group_from_elf): Define new functions.
4398 (build_type_decl, build_typedef_type, build_enum_type)
4399 (add_or_update_class_type)
4400 (add_or_update_union_type): Reuse the type being built, from the
4401 main corpus of the corpus group.
4402 (build_qualified_type): Cleanup logic.
4403 (build_var_decl, build_function_decl): Create a default symbol for
4404 the variable or function if we are supposed to ignore the symbol
4405 table of the current binary. Add that symbol to the symbol table
4406 that is created in the read context.
4407 (read_debug_info_into_corpus): Don't load the ELF symbol table
4408 information if we are asked to ignore the symbol table. But set
4409 the symbol table that we built artificially while loading
4410 functions and variables, into the ABI corpus being built.
4411 (read_context::maybe_adjust_var_sym_address): Adjust.
4412 (build_ir_node_from_die): Add ir node to its logical scope. For
4413 the C language, the scope of a type is the global scope.
4414 (read_corpus_from_elf): Don't load ELF properties if we were asked
4415 to avoid the ELF symbol table.
4416 * include/abg-comparison.h (compute_diff): Declare ...
4417 * src/abg-comparison.cc (compute_diff): ... an overload to compare
4419 * tools/kmidiff.cc: New tool.
4421 2017-03-31 Dodji Seketeli <dodji@redhat.com>
4423 Initial support to lookup types per location
4424 * include/abg-fwd.h (get_name_of_qualified_type)
4425 (get_name_of_reference_to_type, lookup_basic_type_per_location)
4426 (lookup_class_type_per_location, lookup_union_type_per_location)
4427 (lookup_enum_type_per_location, lookup_typedef_type)
4428 (lookup_typedef_type_per_location, lookup_pointer_type)
4429 (lookup_reference_type, lookup_type_per_location)
4430 (lookup_type_through_translation_units)
4431 (lookup_type_from_translation_unit, odr_is_relevant): Declare new
4432 functions or new function overloads.
4433 * include/abg-ir.h (location::expand): Declare new member
4435 (type_maps::empty): Likewise.
4436 (operator|=): Declare an overload for qualified_type_def::CV.
4437 (get_string_representation_of_cv_quals)
4438 (get_name_of_qualified_type, lookup_qualified_type): Declare new functions.
4439 * src/abg-ir.cc (location::expand): Define new member function.
4440 (type_maps::empty): Likewise.
4441 (odr_is_relevant): Likewise.
4442 (get_string_representation_of_cv_quals)
4443 (get_name_of_reference_to_type, get_name_of_qualified_type)
4444 (lookup_union_type_per_location): Define new functions or overloads.
4445 (lookup_basic_type, lookup_enum_type, lookup_typedef_type)
4446 (lookup_qualified_type, lookup_pointer_type)
4447 (lookup_reference_type, lookup_type_from_translation_unit)
4448 (lookup_basic_type_per_location, lookup_basic_type_per_location)
4449 (lookup_class_type_per_location, lookup_class_type_per_location)
4450 (lookup_enum_type_per_location, lookup_enum_type_per_location)
4451 (lookup_typedef_type_per_location)
4452 (lookup_typedef_type_per_location, lookup_type_per_location):
4453 Define new overloads.
4454 (maybe_update_types_lookup_map)
4455 (maybe_update_types_lookup_map<class_decl>)
4456 (maybe_update_types_lookup_map<function_type>): Add a new
4457 use_type_name_as_key parameter. If it's false, then associates
4458 the type to its location rather than to its name.
4459 (maybe_update_types_lookup_map): In the overloads for type_decl,
4460 class_decl, union_decl, enum_type, typedef_decl, array_type_def,
4461 record the type in the lookup map per location, in addition to the
4463 (qualified_type_def::build_name): Use the new
4464 get_name_of_qualified_type.
4465 (qualified_type_def::get_cv_quals_string_prefix): Use the new
4466 get_string_representation_of_cv_quals.
4467 (operator|=): Define a new overload for qualified_type_def::CV.
4468 (pointer_type_def::get_qualified_name): Use the new
4469 get_name_of_pointer_to_type.
4470 (reference_type_def::get_qualified_name): Use the new
4471 get_name_of_reference_to_type.
4473 2017-03-30 Dodji Seketeli <dodji@redhat.com>
4475 Create a Corpus Group API extension
4476 * include/abg-corpus.h (corpus::{find_translation_unit,
4477 get_type_per_loc_map}): Declare new member functions.
4478 (corpus::{get_architecture_name, is_empty}): Make these member functions
4480 (corpus::{get_sorted_fun_symbols, get_functions, get_variables,
4481 get_unreferenced_function_symbols,
4482 get_unreferenced_variable_symbols}): Make these member functions
4484 (class corpus_group): Declare a new type.
4485 * include/abg-fwd.h (corpus_sptr, corpus_group_sptr)
4486 (string_tu_map_type, istring_var_decl_ptr_map_type)
4487 (istring_function_decl_ptr_map_type): Define new typedefs.
4488 * src/abg-corpus-priv.h (corpus_priv::{path_tu_map,
4489 type_per_loc_map_}): Add new data members.
4490 * src/abg-corpus.cc (corpus_add): Complete the function comment.
4491 Assert that at most one translation unit of a given path can be
4492 added to the corpus.
4493 (corpus::{find_translation_unit, get_type_per_loc_map}): Define
4494 new member functions.
4495 (corpus::{get_architecture_name}): Make this member function
4497 (struct corpus_group::priv): Define new type.
4498 (corpus_group::{corpus_group, ~corpus_group, add_corpus,
4499 get_corpora, is_empty, get_functions, get_variables,
4500 get_var_symbol_map, get_fun_symbol_map, get_sorted_fun_symbols,
4501 get_sorted_var_symbols, get_unreferenced_function_symbols,
4502 get_unreferenced_variable_symbols}): Define member functions of
4503 the new corpus_group type.
4505 2017-07-03 Dodji Seketeli <dodji@redhat.com>
4507 Fix some typos in abidiff.cc
4508 * tools/abidiff.cc (main): Fix typos.
4510 2017-07-03 Dodji Seketeli <dodji@redhat.com>
4512 Avoid comparing kernel.img file from the grub2 package
4513 * default.abignore: Do not compare kernel.img files.
4515 2017-06-14 Dodji Seketeli <dodji@redhat.com>
4517 Bug 21567 - Fedabipkgdiff matches build distro names too tightly
4518 * tools/fedabipkgdiff (get_distro_from_string): Define new function.
4519 (Brew.get_package_latest_build): Also consider builds which distro
4520 property is less than the expected distro string that we were
4523 2017-06-14 Sinny Kumari <sinny@redhat.com>
4525 Check if return_codes list is empty in fedabipkgdiff
4526 * tools/fedabipkgdiff (run_abipkgdiff()): Check if
4527 return_codes list is empty
4529 2017-06-13 Dodji Seketeli <dodji@redhat.com>
4531 Do not forget to erase temporary directories in abipkgdiff
4532 * tools/abipkgdiff.cc (maybe_erase_temp_dirs): Define new static
4534 (compare): Call the new maybe_erase_temp_dirs on all return
4537 2017-05-11 Ben Woodard <woodard@redhat.com>
4539 Fix more clang build warnings
4540 * include/abg-ini.h (config::section::priv): Make this be a class,
4542 * src/abg-dwarf-reader.cc (build_translation_unit_and_add_to_ir)
4543 (build_ir_node_from_die): Add parenthesis around assignment
4544 expressions inside conditional expression.
4545 * src/abg-suppression.cc (read_function_suppression): Likewise.
4547 2017-05-11 Ben Woodard <woodard@redhat.com>
4549 Fix some clang compile problems
4550 * include/abg-comp-filter.h (class filter_base): Declare this as a
4552 * include/abg-comparison.h (class filtering::filter_base):
4554 (struct diff_traversable_base): Declare this as a class.
4555 * include/abg-ir.h (function_decl::parameter): Declare this before
4558 (corpus::priv::build_unreferenced_symbols_tables): Add missing
4559 parenthesis around assignment expressions inside conditional
4562 2017-05-21 Sinny Kumari <sinny@redhat.com>
4564 Add --self-compare option in fedabipkgdiff
4565 * bash-completion/fedabipkgdiff: Add new option --self-compare
4566 * tests/data/Makefile.am: Add new test file
4567 * tests/data/test-fedabipkgdiff/test7-self-compare-from-fc23-dbus-glib-report-0.txt:
4568 New reference output for testing ABI comparison on same package
4569 * tests/runtestfedabipkgdiff.py.in (FEDABIPKGDIFF_TEST_SPECS):
4570 Add test case for --self-compare
4571 * tools/fedabipkgdiff (build_commandline_args_parser()): Add
4572 new option --self-compare
4573 (generate_comparison_halves()): Find second comparision half in same
4574 package list while doing self-compare
4575 (self_compare_rpms_from_distro()): New function to perform ABI
4576 comparision on same pacakge
4577 (main()): Add if condition when --self-compare option is enabled
4579 2017-03-31 Dodji Seketeli <dodji@redhat.com>
4581 Avoid building DIE -> parent DIE map when analyzing a C binary
4582 * include/abg-ir.h (global_scope_sptr): Make this be a share_ptr
4583 of scope_decl, not of global_scope.
4584 (translation_unit::get_global_scope): Return a reference to
4586 * src/abg-ir.cc (translation_unit::get_global_scope): Return a
4587 scope_decl not a global_scope.
4588 * src/abg-dwarf-reader.cc (read_context::nil_scope_): Add new data
4590 (read_context::{global_scope, nil_scope}): Define new member functions.
4591 (read_context::build_die_parent_maps): Do not build the map if we
4592 are looking at a C (or asm) translation unit.
4593 (get_scope_die, get_scope_for_die): If we are looking at a C
4594 translation unit then do return the global scope.
4596 2017-04-06 Dodji Seketeli <dodji@redhat.com>
4598 Speed up access to the definition of a class declaration-only type
4600 (class_or_union::get_naked_definition_of_declaration): Declare a
4601 new member function.
4602 (class_decl::get_naked_definition_of_declaration): Likewise.
4603 * src/abg-ir.cc ({type_decl, qualified_type_def,
4604 array_type_def, enum_type_decl}::operator==): Use the
4605 get_naked_canonical_type and get_naked.
4606 (class_or_union::priv::naked_definition_of_declaration_): Define
4608 (class_or_union::priv::priv): Adjust to initialize the new data
4610 (class_or_union::get_naked_definition_of_declaration): Define new
4612 ({class_or_union, class_decl}::operator==): Use the new
4613 get_naked_definition_of_declaration instead of
4614 get_definition_of_declaration.
4615 (equals): In the overload for class_or_union, do the same.
4616 (class_decl::get_naked_definition_of_declaration): Define new
4618 (hash_type_or_decl): Likewise.
4620 2017-04-06 Dodji Seketeli <dodji@redhat.com>
4622 Speedup comparison of decl-only classes
4623 * src/abg-ir.cc (equals): In the overload for class_decl, if we
4624 are looking at a decl-only class, then directly call the equals
4625 function for class_or_union. That one knows how to perform the
4626 comparison without calling the
4627 class_or_union::priv_->comparison_started function, in that case.
4629 2017-04-04 Dodji Seketeli <dodji@redhat.com>
4631 Update the description of what abipkgdiff does
4632 * tools/abipkgdiff.cc: Update the description of the sequence of
4635 2017-04-06 Dodji Seketeli <dodji@redhat.com>
4637 Misc cleanups in abg-writer.cc
4638 * src/abg-writer.cc (class write_context): Fix indentation.
4639 (write_location, write_visibility, write_binding)
4640 (write_array_size_and_alignment, write_size_and_alignment): Fix
4641 these declarations to use the *_sptr typedefs rather than the
4642 explicit shared_ptr<*> types.
4643 (write_translation_unit): Fix comment.
4645 2017-05-10 Dodji Seketeli <dodji@redhat.com>
4647 Don't consider changes to basic types as being redundant
4648 * include/abg-comparison.h (is_diff_of_basic_type)
4649 (has_basic_type_change_only): Declare these functions ...
4650 * src/abg-comparison.cc (is_diff_of_basic_type)
4651 (has_basic_type_change_only): ... and define them.
4652 (redundancy_marking_visitor::visit_begin): Use the new
4653 has_basic_type_change_only.
4654 * tests/data/test-diff-filter/libtest37-v0.so: New binary test input.
4655 * tests/data/test-diff-filter/libtest37-v1.so: Likewise.
4656 * tests/data/test-diff-filter/test37-report-0.txt: New test
4658 * tests/data/test-diff-filter/test37-v0.cc: Source code of the new
4660 * tests/data/test-diff-filter/test37-v1.cc: Likewise.
4661 * tests/data/Makefile.am: Update to add the new test material to
4662 the source distribution.
4663 * tests/test-diff-filter.cc (in_out_spec): Add the new test input
4664 to this test harness.
4666 2017-05-10 Dodji Seketeli <dodji@redhat.com>
4668 Rename fn_parm_diff::get_type_diff into fn_parm_diff::type_diff
4669 * include/abg-comparison.h (fn_parm_diff::type_diff): Renamed
4670 fn_parm_diff::get_type_diff intot his.
4671 * src/abg-comparison.cc (fn_parm_diff::type_diff): Likewise.
4672 (fn_parm_diff::report): Adjust.
4673 (redundancy_marking_visitor::visit_begin): Likewise.
4674 (is_diff_of_variadic_parameter): Likewise.
4676 2017-05-03 Dodji Seketeli <dodji@redhat.com>
4678 Invalidate function and variable ID cache when invoking ::set_symbol
4679 * src/abg-ir.cc ({function, var}_decl::set_symbol): Invalidate the
4682 2017-05-03 Dodji Seketeli <dodji@redhat.com>
4684 Remove useless overloads of is_type
4685 * include/abg-fwd.h (is_type): Remove the overloads that take
4686 decl_base and type_base types.
4687 * src/abg-ir.cc (is_type): Likewise.
4689 2017-05-04 Dodji Seketeli <dodji@redhat.com>
4691 Ensure build_qualified_type can return non-qualified types
4692 * src/abg-dwarf-reader.cc (build_qualified_type): Return a
4694 (build_ir_node_from_die): Adjust the call to build_qualified_type.
4696 2017-05-04 Dodji Seketeli <dodji@redhat.com>
4698 Fix array subranges (wrongly) having the same lower bound
4699 * src/abg-dwarf-reader.cc (build_subranges_from_array_type_die):
4700 Consider the 'lower_bound' parameter as the default lower bound
4701 for each sub-ranges.
4703 2017-03-31 Dodji Seketeli <dodji@redhat.com>
4705 Fix buffer overrun in 'equals' function for arrays
4706 * src/abg-ir.cc (equals): In the overload for arrays, check for
4707 the end of the subranges of the two arrays, not just for the first
4710 2017-04-18 Dodji Seketeli <dodji@redhat.com>
4712 Fix a race condition in queue::priv::do_bring_workers_down
4713 * src/abg-workers.cc (queue::priv::tasks_todo_mutex): Make this
4714 data member mutable.
4715 (more_tasks_to_execute):
4716 (queue::priv::do_bring_workers_down): Update the
4717 queue::priv::bring_workers_down only in the critical section
4718 defined by queue::priv::queue_cond_mutex.
4719 (worker::wait_to_execute_a_task): Testing for
4720 queue::priv::bring_workers_down is done in the critical section
4721 defined by queue::priv::queue_cond_mutex. The loop over waiting
4722 ont the condition is also in the critical section, as it ought to
4724 * tests/test-read-write.cc (struct test_task): New type.
4725 (main): Express in terms of the new test_task type.
4727 2017-04-12 Ondrej Oprala <ondrej.oprala@gmail.com>
4729 cppcheck: mitigate performance warnings
4730 * include/abg-diff-utils.h (print_snake): pass argument of type
4731 snake by const reference.
4732 * include/abg-ir.h (location::operator{==,<}): Likewise.
4733 * include/abg-viz-dot.h (node_base::{node_base,parent_node,child_node}):
4735 * include/abg-viz-svg.h (svg::svg) Likewise.
4736 * src/abg-config.cc (config::config): Member initialization in ctor body.
4737 * src/abg-dwarf-reader.cc (class_decl_sptr::add_or_update_class_type):
4738 Initial value never used.
4739 * src/abg-ir.cc: (decl_base::priv::priv) Member initialization in ctor body,
4740 pass argument of type location by const reference.
4741 (equals): Variable initial value never used.
4742 * src/abg-reader.cc (read_corpus_from_input): Initial variable
4744 (build_elf_symbol_db): Use pre-increment.
4745 * src/abg-suppression-priv.h
4746 (suppression_matches_type_location): Pass argument of type
4747 location by const reference.
4748 * src/abg-suppression.cc: Likewise.
4750 2017-04-11 Ondrej Oprala <ondrej.oprala@gmail.com>
4752 Fix cppcheck error: "Same iterator is used with different containers"
4753 * src/abg-dwarf-reader.cc
4754 (type_or_decl_base_sptr::lookup_artifact_from_per_tu_die_representation):
4755 Fix an error found by cppcheck.
4757 2017-04-11 Ondrej Oprala <ondrej.oprala@gmail.com>
4760 * scripts/dot_to_png.sh: Clean up the script according to
4761 shellcheck warnings and remarks.
4762 * scripts/dot_to_svg.sh: Likewise.
4763 * scripts/svg_to_plain_svg.sh: Likewise.
4764 * scripts/svg_to_png_and_pdf.sh: Likewise.
4766 2017-04-12 Ondrej Oprala <ondrej.oprala@gmail.com>
4768 Fix comparison used instead of an assignment
4769 * src/abg-ir.cc (parse_integral_type): An attempt at clang
4770 compilation has discovered there to be a comparison with
4771 unused result, that apparently should be an assignment.
4773 2017-04-12 Dodji Seketeli <dodji@redhat.com>
4775 Fix some random deadlock while running fedabipkgidiff in tests
4776 * tools/fedabipkgdiff (abipkgidff): Do not use Popen.communicate()
4777 as it might hang if the data is large. Rather, busy wait for the
4778 abipkgdiff process to finish and then get its output.
4780 2017-03-22 Slava Barinov <v.barinov@samsung.com>
4782 Fix types in header to meet sources
4783 * include/abg-fwd.h: Include stdint.h for uint64_t.
4784 (ir::set_data_member_offset): Take uint64_t rather than size_t.
4785 (ir::get_data_member_offset): Return uint64_t rather than size_t.
4787 2017-03-24 Dodji Seketeli <dodji@redhat.com>
4789 Launch fedabipkgdiff tests first
4790 * tests/Makefile.am: Run the fedabipkgdiff test first.
4792 2017-03-24 Dodji Seketeli <dodji@redhat.com>
4794 Bug 21296 - Reporting diff of const ref against non-const ref aborts
4795 * include/abg-fwd.h (look_through_no_op_qualified_type): Declare
4797 * src/abg-ir.cc (look_through_no_op_qualified_type): Define it.
4798 (compute_diff_for_types): Use the new
4799 look_through_no_op_qualified_type here rather than open-coding it.
4800 (equals): In the overload for function_decl::parameter, use the
4801 new look_through_no_op_qualified_type function.
4802 * tests/data/test-diff-dwarf/test40-PR21296-clanggcc.cc: Source
4803 code of the new test inputs.
4804 * tests/data/test-diff-dwarf/test40-PR21296-clanggcc-report0.txt:
4806 * tests/data/test-diff-dwarf/test40-PR21296-libgcc.so: New binary
4808 * tests/data/test-diff-dwarf/test40-PR21296-libclang.so: Likewise.
4809 * tests/test-diff-dwarf.cc (in_out_specs): Add the new test inputs to
4812 2017-03-05 Chenxiong Qi <cqi@redhat.com>
4814 Bug 20087 - Clean cache before or after ABI comparison
4815 * configure.ac: Require shutil module.
4816 * doc/manuals/fedabipkgdiff.rst: Add document for new option
4817 clean-cache, clean-cache-before, and clean-cache-after.
4818 * tools/fedabipkgdiff (build_commandline_args_parser): Add new
4819 option --clean-cache, --clean-cache-before and
4820 --clean-cache-after.
4821 (diff_local_rpm_with_latest_rpm_from_koji): Delete download
4822 cache directory before or after downloading RPMs.
4823 (diff_latest_rpms_based_on_distros): Likewise.
4824 (diff_two_nvras_from_koji): Likewise.
4825 (diff_from_two_rpm_files): Likewise.
4826 * bash-completion/fedabipkgdiff: Add new options.
4827 * tests/mockfedabipkgdiff.in (get_download_dir): Rewrite to
4828 behave just like the original get_download_dir.
4829 (mock_get_download_dir): Removed.
4830 (DOWNLOAD_CACHE_DIR): New global variable pointing directory
4831 holding packages during tests.
4832 (run_fedabipkgdiff): Mock original get_download_dir with the
4833 rewrite get_download_dir.
4834 * tests/runtestfedabipkgdiff.py.in (run_fedabipkgdiff_tests):
4835 Add --clean-cache to run tests to ensure no regression.
4837 2017-03-17 Dodji Seketeli <dodji@redhat.com>
4839 Shut down a helgrind false positive in the "system" libc call
4840 * tests/test-valgrind-suppressions.supp: Add a suppression that
4841 occurs during an internal libc signal handling occasion.
4843 2017-03-15 Dodji Seketeli <dodji@redhat.com>
4845 Fix data race on worker::queue::priv::bring_workers_down
4846 * src/abg-workers.cc (worker::wait_to_execute_a_task): Protect the
4847 read of the queue::priv::bring_workers_down down variable with the
4848 queue::priv::tasks_todo_mutex.
4850 2017-03-07 Dodji Seketeli <dodji@redhat.com>
4852 Bug 21228 - Handle cloning union member functions
4853 * include/abg-ir.h (class_or_union::add_member_function): Move the
4854 class_decl::add_member_function overload declaration into the
4855 class class_or_union class.
4856 (class class_decl): Make the class class_or_union be a friend of
4858 * src/abg-ir.cc (class_decl::add_member_function): Transform the
4859 definition of this overload into ...
4860 (class_or_union::add_member_function): ... this one. Make sure
4861 that when setting the virtual-ness attributes of the member
4862 function, we are effectively looking at the a function that is a
4864 (function_decl::clone): Do not assert that a member function is
4865 necessarily a member of a class_decl. It can also a member of a
4866 union_decl!. So, rather, assert that the scope of the member
4867 function is of type class_or_union.
4868 * tests/data/test-diff-pkg/tbb-2017-8.20161128.fc26.x86_64.rpm:
4870 * tests/data/test-diff-pkg/tbb-2017-9.20170118.fc27.x86_64.rpm:
4871 * tests/data/test-diff-pkg/tbb-debuginfo-2017-8.20161128.fc26.x86_64.rpm:
4873 * tests/data/test-diff-pkg/tbb-debuginfo-2017-9.20170118.fc27.x86_64.rpm:
4875 * tests/data/test-diff-pkg/tbb-2017-8.20161128.fc26.x86_64--tbb-2017-9.20170118.fc27.x86_64.txt:
4876 New reference test output.
4877 * tests/data/Makefile.am: Add the new test input RPMs to the
4878 source distribution.
4879 * tests/test-diff-pkg.cc (in_out_specs): Take the new input tests
4882 2017-03-03 Dodji Seketeli <dodji@redhat.com>
4884 Consider file path when sorting virtual member functions
4885 * src/abg-ir.cc (virtual_member_function_less_than::operator()):
4886 Take the file path into account in the sorting.
4887 * tests/data/test-read-dwarf/test22-pr19097-libstdc++.so.6.0.17.so.abi:
4890 2017-03-03 Dodji Seketeli <dodji@redhat.com>
4892 Fix virtual members sorting to unbreak the build on EL6
4893 * src/abg-ir.cc (virtual_member_function_less_than::operator()):
4894 Update comment. When two virtual functions have the same virtual
4895 index and one of them has no ELF symbol, then that function is
4896 less than the one with an ELF symbol.
4897 * tests/data/Makefile.am: Remove
4898 test-annotate/{test9-pr18818-clang.so.abi, test11-pr18828.so.abi,
4899 test12-pr18844.so.abi, test16-pr18904.so.abi,
4900 test22-pr19097-libstdc++.so.6.0.17.so.abi}.
4901 * tests/data/test-annotate/test10-pr18818-gcc.so.abi: Remove.
4902 * tests/data/test-annotate/test11-pr18828.so.abi: Likewise.
4903 * tests/data/test-annotate/test12-pr18844.so.abi: Likewise.
4904 * tests/data/test-annotate/test16-pr18904.so.abi: Likewise.
4905 * tests/data/test-annotate/test22-pr19097-libstdc++.so.6.0.17.so.abi:
4907 * tests/test-annotate.cc (in_out_specs): Remove those tests above
4908 which input files have been removed.
4910 2017-03-02 Dodji Seketeli <dodji@redhat.com>
4912 Make Helgrind suppressions less specific to libgcc_s version
4913 * tests/test-valgrind-suppressions.supp: Make Helgrind
4914 suppressions less specific to libgcc_s version.
4916 2017-03-02 Dodji Seketeli <dodji@redhat.com>
4918 More Helgrind suppressions
4919 * tests/test-valgrind-suppressions.supp: More specific suppressions.
4921 2017-03-02 Dodji Seketeli <dodji@redhat.com>
4923 Silence Helgrind reports about exception stack unwinding
4924 * tests/test-valgrind-suppressions.supp: Silence Helgrind reports
4925 about exception stack unwinding.
4927 2017-03-01 Dodji Seketeli <dodji@redhat.com>
4929 Make the helgrind suppressions less specific
4930 * tests/test-valgrind-suppressions.supp: Make the ostream writting
4931 suppressions be less specific so that they can apply to all the
4932 related false positives.
4934 2017-03-01 Dodji Seketeli <dodji@redhat.com>
4936 Move test-read-dwarf.cc to abigail::workers
4937 * tests/test-read-dwarf.cc (iospec, spec_lock, write_lock)
4938 (out_abi_base, in_elf_base, in_abi_base): Remove these global
4940 (handle_in_out_spec): Remove this.
4941 (struct test_task): Write this task that does what
4942 handle_in_out_spec was doing.
4943 (test_task_sptr): Define new typedef.
4944 (main): Remove the pthreads artifacts. Use the new test_task type
4945 along with the abigail::workers interface.
4946 * tests/test-valgrind-suppressions.supp: Add more helgrind
4947 suppressions for ostream writting false positives.
4949 2017-02-28 Dodji Seketeli <dodji@redhat.com>
4951 Display the command that failed the runtestfedabipkgdiff.py test
4952 * tests/runtestfedabipkgdiff.py.in (run_fedabipkgdiff_tests): When
4953 A test fails, display the fedabipkgdiff command that triggered the failure.
4955 2017-02-24 Dodji Seketeli <dodji@redhat.com>
4957 Make abipkgdiff.cc use the abigail::workers interface
4958 * tools/abipkgdiff.cc: Remove ftw.h, pthread.h, unistd.h, add
4959 fts.h and abg-workers.h.
4960 (verbose, elf_file_paths_tls_key, reports_map, env_map, map_lock)
4961 (arg_lock, prog_options): Remove all these global variables.
4962 (struct package_descriptor): Remove this type.
4963 (pthread_routine_extract_package)
4964 (first_package_tree_walker_callback_fn)
4965 (second_package_tree_walker_callback_fn, pthread_routine_compare)
4966 (pthread_join, pthread_routine_extract_pkg_and_map_its_content):
4967 Remove these functions.
4968 (options::{num_workers, verbose}): Define new data members.
4969 (options::options): Initialize the new verbose and num_workers data members.
4970 (package::erase_extraction_directory)
4971 (erase_created_temporary_directories_parent): Take the program
4972 options in parameter. Don't use the global verbose variable
4974 (package::erase_extraction_directories)
4975 (erase_created_temporary_directories, extract_package): Take the
4976 program options in parameter.
4977 (extract_rpm, extract_deb, extract_tar): Likewise. And don't use
4978 the global verbose variable anymore.
4979 (compare): Don't use the global verbose variable anymore. Use the
4980 new compare_task type along with the abigail::workers::queue type.
4981 (pkg_extraction_task, pkg_prepare_task, compare_task)
4982 (comparison_done_notify): Define new classes.
4983 (maybe_update_vector_of_package_content): Define new static
4985 (create_maps_of_package_content): Don't take the ftw_cp_type
4986 anymore. Don't use the global verbose variable anymore. Use the
4987 fts_{open,read,close} functions, rather than the ftw one.
4988 (extract_package_and_map_its_content): Don't use pthreads anymore.
4989 Use the new pkg_extraction_task type created along with the
4990 abigail::workers::queue type.
4991 (prepare_packages): Don't use pthreads anymore. Use the new
4992 pkg_prepare_task type along with the abigail::workers::queue type.
4993 (elf_size_is_greater): Adjust to use
4994 abigail::workers::queue::tasks, rather than the previous
4995 compaer_args_sptr type.
4996 (parse_command_line): Adjust to stop using the global verbose
4998 (main): Remove use of global variables prog_options and also the
5000 * tests/data/test-diff-pkg/dbus-glib-0.104-3.fc23.x86_64--dbus-glib-0.104-3.fc23.armv7hl-report-0.txt:
5002 * tests/data/test-diff-pkg/dirpkg-0-report-0.txt: Likewise.
5003 * tests/data/test-diff-pkg/test-dbus-glib-0.80-3.fc12.x86_64-report-0.txt:
5005 * tests/data/test-diff-pkg/test-rpm-report-0.txt: Likewise.
5006 * tests/data/test-diff-pkg/test-rpm-report-1.txt: Likewise.
5007 * tests/data/test-diff-pkg/test-rpm-report-2.txt: Likewise.
5008 * tests/data/test-diff-pkg/test-rpm-report-3.txt: Likewise.
5009 * tests/data/test-fedabipkgdiff/test0-from-fc20-to-fc23-dbus-glib-report-0.txt:
5011 * tests/data/test-fedabipkgdiff/test1-from-fc20-to-dbus-glib-0.106-1.fc23.x86_64-report-0.txt:
5013 * tests/data/test-fedabipkgdiff/test2-dbus-glib-0.100.2-2.fc20--dbus-glib-0.106-1.fc23-report-0.txt:
5015 * tests/data/test-fedabipkgdiff/test3-dbus-glib-0.100.2-2.fc20.i686--dbus-glib-0.106-1.fc23.i686-report-0.txt:
5017 * tests/data/test-fedabipkgdiff/test4-glib-0.100.2-2.fc20.x86_64.rpm-glib-0.106-1.fc23.x86_64.rpm-report-0.txt:
5020 2017-02-24 Dodji Seketeli <dodji@redhat.com>
5022 Do not ignore valgrind checks returning an error
5023 * autoconf-archive/ax_valgrind_check.m4 (check-valgrind): Don't
5026 2017-02-24 Dodji Seketeli <dodji@redhat.com>
5028 Add a "make check-valgrind-helgrind-recursive" target
5029 * tests/Makefile.am (check-valgrind-helgrind-recursive): New
5030 target to run the tests recursively under the control of
5031 Valgrind's Helgrind tool.
5032 * tests/test-valgrind-suppressions.supp: Update this suppression
5033 file with suppressions for Helgrind.
5035 2017-02-24 Dodji Seketeli <dodji@redhat.com>
5037 Several fixes and enhancements to abigail::workers
5038 * Don't try to schedule a task if the pointer to the task is nil
5039 * Fix a data race when bringing workers (of a queue) down
5040 * Always try to wake up all waiting threads when bringing down queue
5042 * Fix a data race when accessing the queue condition variable
5043 * Fix a data race when notifying listeners about the end of the job
5044 performed by the task.
5047 * Pass the "task done" notifier by reference, to the worker queue.
5048 Without this, the worker queue needs to copy the "task done" notifier
5049 by value. This implies that user code needs to provide task done
5050 notifier instances that come with potentially complicated copy
5051 constructors. By passing it by reference and by just re-using the
5052 notifier from the user code, we do away with the need for copying
5053 altogether. This also fixes some latent copying bugs.
5054 * Add a workers::queue::schedule_tasks() method
5055 This allows user code to schedule a vector of tasks at once.
5056 * make workers::queue::get_completed_tasks() return a non-const vector
5057 This enables user code to sort the completed tasks as they wish.
5058 * include/abg-workers.h (queue::tasks_type): New typedef.
5059 (queue::queue): Pass task_done_notify by reference.
5060 (queue::schedule_tasks): Declare new member function.
5061 (queue::get_completed_tasks): Return non-const vector.
5062 * src/abg-workers.cc (queue::priv::default_notify): New data
5064 (queue::priv::notify): Make this data member be a reference.
5065 (queue::priv::priv): Initialize the notify data member to either
5066 the new default_notify (if no notifier is provided by the
5067 constructor) or to the notifier provided by the constructor.
5068 (queue::priv::schedule_task): Do not schedule a nil task. Update
5070 (queue::priv::schedule_tasks): Add a new member function.
5071 (queue::priv::do_bring_workers_down): Update comment. Protect
5072 access to "bring_workers_down" with tasks_todo_mutex to prevent a
5073 data race. Call pthread_cond_broadcast on the queue_cond
5074 unconditionaly to prevent some worker threads to keep waiting for
5075 ever. Also, protect the access to the queue_cond by the
5076 queue_cond_mutex to precent a data race.
5077 (queue::queue): Pass the notifier by reference. Update comment.
5078 (queue::schedule_task): Update comment.
5079 (queue::schedule_tasks): Define new member function.
5080 (queue::wait_for_workers_to_complete): Update comment.
5081 (queue::get_completed_tasks): Return a non-const vector. Update
5083 (worker::wait_to_execute_a_task): Update several comments. Make
5084 the execution of the notification code to be synchronized (on the
5087 2017-02-14 Dodji Seketeli <dodji@redhat.com>
5089 Fix typo in help string of abipkgdiff
5090 * tools/abipkgdiff.cc (display_usage): Remove erroneous end line.
5092 2017-01-23 Dodji Seketeli <dodji@redhat.com>
5094 fedabipkgdiff refuses to compare packages with the same release number
5095 * tools/fedabipkgdiff (RPM.is_peer): Update comment. Fix logic.
5096 * tests/data/test-fedabipkgdiff/packages/vte291/0.39.1/1.fc22/x86_64/vte291-0.39.1-1.fc22.x86_64.rpm:
5097 New test input file.
5098 * tests/data/test-fedabipkgdiff/packages/vte291/0.39.1/1.fc22/x86_64/vte291-debuginfo-0.39.1-1.fc22.x86_64.rpm: Likewise.
5099 * tests/data/test-fedabipkgdiff/packages/vte291/0.39.1/1.fc22/x86_64/vte291-devel-0.39.1-1.fc22.x86_64.rpm: Likewise.
5100 * tests/data/test-fedabipkgdiff/packages/vte291/0.39.90/1.fc22/x86_64/vte291-0.39.90-1.fc22.x86_64.rpm: Likewise.
5101 * tests/data/test-fedabipkgdiff/packages/vte291/0.39.90/1.fc22/x86_64/vte291-debuginfo-0.39.90-1.fc22.x86_64.rpm: Likewise.
5102 * tests/data/test-fedabipkgdiff/packages/vte291/0.39.90/1.fc22/x86_64/vte291-devel-0.39.90-1.fc22.x86_64.rpm:
5104 * tests/data/test-fedabipkgdiff/vte291-0.39.1-1.fc22.x86_64--vte291-0.39.90-1.fc22.x86_64-report-0.txt: Likewise.
5105 * tests/data/Makefile.am: Add the new test input data to source
5107 * tests/mockfedabipkgdiff.in: Update the package and build
5108 information to add the new vte291-0.39.1-1.fc22.x86_64.rpm and
5109 vte291-0.39.90-1.fc22.x86_64.rpm packages (as well as their devel
5110 and debuginfo packages) into the "mock" Koji build database.
5111 * tests/runtestfedabipkgdiff.py.in: Make this test harness run
5112 over the two aforementioned packages.
5114 2017-01-24 Dodji Seketeli <dodji@redhat.com>
5116 Add missing tests input files to distribution files
5117 * tests/data/Makefile.am: Add three missing test input files to
5118 the source distribution tarball. Renamed
5119 test-fedabipkgdiff/test6-missing-devel-debuginfo-nss-util-3.12.6-1.fc14.x86_64--nss-util-3.24.0-2.0.fc25.x86_64-report-0.txt
5121 test-fedabipkgdiff/test6-nss-util-3.12.6-1.fc14.x86_64--nss-util-3.24.0-2.0.fc25.x86_64-report-0.txt.
5122 * tests/runtestfedabipkgdiff.py.in (FEDABIPKGDIFF_TEST_SPECS):
5124 test6-missing-devel-debuginfo-nss-util-3.12.6-1.fc14.x86_64--nss-util-3.24.0-2.0.fc25.x86_64-report-0.txt
5126 test6-nss-util-3.12.6-1.fc14.x86_64--nss-util-3.24.0-2.0.fc25.x86_64-report-0.txt.
5128 2017-01-24 Dodji Seketeli <dodji@redhat.com>
5130 Add missing new line to an error message of runtestfedabipkgdiff.py
5131 * tests/runtestfedabipkgdiff.py.in (run_fedabipkgdiff_tests): Add
5132 missing new line to an error message.
5134 2017-01-24 Dodji Seketeli <dodji@redhat.com>
5136 Fix silent failure of tests/runtestfedabipkgdiff.py
5137 * tests/mockfedabipkgdiff.in (run_fedabipkgdiff): Patch
5138 fedabipkgdiff.DEFAULT_KOJI_TOPURL instead of
5139 fedabipkgdiff.DEFAULT_KOJI_TOPDIR.
5140 * tests/runtestfedabipkgdiff.py.in (main): Properly return 0 upon
5141 success, 1 otherwise.
5143 2017-01-14 Dodji Seketeli <dodji@redhat.com>
5146 * include/abg-ir.h (class_or_union): Fix indentation.
5147 * src/abg-dwarf-reader.cc (get_die_pretty_representation): Add new
5149 * src/abg-ir.cc (struct class_decl::priv): Fix indentation.
5150 (virtual_member_function_less_than::operator()): Fix a typo in a
5153 2017-01-13 Dodji Seketeli <dodji@redhat.com>
5155 Bug 20476 - Compare virtual member functions when comparing classes
5156 * include/abg-ir.h (class_decl::get_biggest_vtable_offset):
5157 Declare new member function.
5158 * src/abg-ir.cc (virtual_member_function_less_than::operator()):
5159 Either compare the symbol id strings if the functions have
5160 symbols or just compare their pretty representations.
5161 (class_decl::get_biggest_vtable_offset): Define new member
5163 (methods_equal_modulo_elf_symbol)
5164 (method_matches_at_least_one_in_vector): New static methods.
5165 (equals): In the overload for classes, compare the virtual member
5166 functions while comparing classes.
5167 * src/abg-comparison.cc (represent): In the overload for
5168 method_decl_sptr, fix the way we compute the highest vtable offset
5169 number for a give class_decl.
5170 (class_decl::ensure_lookup_tables_populated): Don't forget added
5171 and removed virtual member functions in the report for changed
5173 * tests/data/test-diff-dwarf/libtest41-PR20476-hidden-old.so: New
5174 test binary input file.
5175 * tests/data/test-diff-dwarf/libtest41-PR20476-hidden-new.so: Likewise.
5176 * tests/data/test-diff-dwarf/test41-PR20476-hidden-report-0.txt:
5177 New reference output.
5178 * tests/data/Makefile.am: Add the new test material above to the
5179 source distribution.
5180 * tests/test-diff-dwarf.cc (in_out_spec): Add the new tests
5182 * tests/data/test-annotate/test10-pr18818-gcc.so.abi: Adjust.
5183 * tests/data/test-annotate/test11-pr18828.so.abi: Adjust.
5184 * tests/data/test-annotate/test18-pr19037-libvtkRenderingLIC-6.1.so.abi: Adjust.
5185 * tests/data/test-annotate/test20-pr19025-libvtkParallelCore-6.1.so.abi: Adjust.
5186 * tests/data/test-annotate/test22-pr19097-libstdc++.so.6.0.17.so.abi: Adjust.
5187 * tests/data/test-read-dwarf/test10-pr18818-gcc.so.abi: Adjust.
5188 * tests/data/test-read-dwarf/test11-pr18828.so.abi: Adjust.
5189 * tests/data/test-read-dwarf/test13-pr18894.so.abi: Adjust.
5190 * tests/data/test-read-dwarf/test14-pr18893.so.abi: Adjust.
5191 * tests/data/test-read-dwarf/test15-pr18892.so.abi: Adjust.
5192 * tests/data/test-read-dwarf/test18-pr19037-libvtkRenderingLIC-6.1.so.abi:
5194 * tests/data/test-read-dwarf/test20-pr19025-libvtkParallelCore-6.1.so.abi:
5196 * tests/data/test-read-dwarf/test21-pr19092.so.abi: Adjust.
5197 * tests/data/test-read-dwarf/test22-pr19097-libstdc++.so.6.0.17.so.abi:
5200 2017-02-14 Dodji Seketeli <dodji@redhat.com>
5202 Fix indentation in src/abg-writer.cc
5203 * src/abg-writer.cc (annotate): Fix indentation.
5205 2017-02-13 Dodji Seketeli <dodji@redhat.com>
5207 Adjust reference output of test-annotate
5208 * tests/data/test-annotate/test15-pr18892.so.abi: Adjust this
5211 2017-02-13 Dodji Seketeli <dodji@redhat.com>
5213 Fix help string for --header-dirs
5214 * tools/abidw.cc (display_usage): Fix patch -> path typo.
5216 2017-02-13 Dodji Seketeli <dodji@redhat.com>
5218 Make abidw --headers-dir work with the --out-file option
5219 * tools/abidw.cc (parse_command_line): Don't require an empty
5220 output file when parsing the --headers-dir option. This was a
5223 2017-01-17 Ondrej Oprala <ondrej.oprala@gmail.com>
5225 Bug 20970 - Add a --annotate option to abidw
5226 * doc/manuals/abidiff.rst: Document the '--no-corpus-path'
5228 * doc/manuals/abidw.rst: Document the '--no-corpus-path'
5229 and '--annotate' options.
5230 * include/abg-libxml-utils.h ({un,}escape_xml_comment): Add
5231 new function declarations.
5232 * include/abg-writer.h: Add new annotate functions
5233 (write_{translation_unit,corpus_to_{archive,native_xml_file}}):
5234 Add an optional "annotate" parameter defaulting to "false".
5235 * src/abg-libxml-utils.cc ({un,}escape_xml_comment): Add
5236 new function definitions.
5237 * src/abg-writer.cc (annotate): Define new templatized function
5238 and specialize it for necessary cases.
5239 * tests/Makefile.am: Add runtestannotate as a new test.
5240 * tests/data/Makefile.am: Add paths to below reference test
5242 * tests/data/test-annotate/libtest23.so.abi: New reference test
5244 * tests/data/test-annotate/libtest24-drop-fns-2.so.abi: Likewise.
5245 * tests/data/test-annotate/libtest24-drop-fns.so.abi: Likewise.
5246 * tests/data/test-annotate/test0.abi: Likewise.
5247 * tests/data/test-annotate/test1.abi: Likewise.
5248 * tests/data/test-annotate/test10-pr18818-gcc.so.abi: Likewise.
5249 * tests/data/test-annotate/test11-pr18828.so.abi: Likewise.
5250 * tests/data/test-annotate/test12-pr18844.so.abi: Likewise.
5251 * tests/data/test-annotate/test13-pr18894.so.abi: Likewise.
5252 * tests/data/test-annotate/test14-pr18893.so.abi: Likewise.
5253 * tests/data/test-annotate/test15-pr18892.so.abi: Likewise.
5254 * tests/data/test-annotate/test16-pr18904.so.abi: Likewise.
5255 * tests/data/test-annotate/test17-pr19027.so.abi: Likewise.
5256 * tests/data/test-annotate/test18-pr19037-libvtkRenderingLIC-6.1.so.abi: Likewise.
5257 * tests/data/test-annotate/test19-pr19023-libtcmalloc_and_profiler.so.abi: Likewise.
5258 * tests/data/test-annotate/test2.so.abi: Likewise.
5259 * tests/data/test-annotate/test20-pr19025-libvtkParallelCore-6.1.so.abi: Likewise.
5260 * tests/data/test-annotate/test21-pr19092.so.abi: Likewise.
5261 * tests/data/test-annotate/test22-pr19097-libstdc++.so.6.0.17.so.abi: Likewise.
5262 * tests/data/test-annotate/test3.so.abi: Likewise.
5263 * tests/data/test-annotate/test4.so.abi: Likewise.
5264 * tests/data/test-annotate/test5.o.abi: Likewise.
5265 * tests/data/test-annotate/test6.so.abi: Likewise.
5266 * tests/data/test-annotate/test7.so.abi: Likewise.
5267 * tests/data/test-annotate/test8-qualified-this-pointer.so.abi: Likewise.
5268 * tests/data/test-annotate/test9-pr18818-clang.so.abi: Likewise.
5269 * tests/test-annotate.cc: New test for ABIXML annotations.
5270 * tools/abidiff.cc: Add the new option '--no-corpus-path'.
5271 * tools/abidw.cc: Likewise. Also add the '--annotate' option.
5274 2017-01-20 Dodji Seketeli <dodji@redhat.com>
5276 Fix test-diff-pkg after commit 2dcc606
5277 * tests/test-diff-pkg.cc (in_out_specs): Fix paths to spice-server
5280 2017-01-20 Dodji Seketeli <dodji@redhat.com>
5282 Add --harmless option to abipkgdiff
5283 * doc/manuals/abidiff.rst: Fix a typo.
5284 * doc/manuals/abipkgdiff.rst: Document the --harmless option.
5285 * tools/abipkgdiff.cc: Update copyright year.
5286 (options::show_harmless_changes): Add new data member.
5287 (options::options): Initialize the new data member.
5288 (display_usage): Add a help string for the new --harmless option.
5289 (parse_command_line): Parse the new --harmless option.
5290 (set_diff_context_from_opts): Configure the diff context
5291 accordingly, if the user provided the --harmless option.
5293 2017-01-20 Dodji Seketeli <dodji@redhat.com>
5295 Fix suppression category propagation in diff node graph
5296 * include/abg-comparison.h (diff::get_class_of_equiv_category):
5297 Declare new member function.
5298 * src/abg-comparison.cc: Update copyright year.
5299 (diff::get_class_of_equiv_category): Define new member function.
5300 (suppression_categorization_visitor::visit_end): When considering
5301 children nodes category for propagation, consider the category of
5302 the class of equivalence of children nodes.
5303 * spice-debuginfo-0.12.4-19.el7.x86_64.rpm: New input test package.
5304 * spice-debuginfo-0.12.8-1.el7.x86_64.rpm: Likewise.
5305 * spice-server-0.12.4-19.el7.x86_64.rpm: Likewise.
5306 * spice-server-0.12.8-1.el7.x86_64.rpm: Likewise.
5307 * spice-server-devel-0.12.4-19.el7.x86_64.rpm: Likewise.
5308 * spice-server-devel-0.12.8-1.el7.x86_64.rpm: Likewise.
5309 * spice-server-0.12.4-19.el7.x86_64-0.12.8-1.el7.x86_64-report-0.txt:
5310 New reference test output.
5311 * spice-server-0.12.4-19.el7.x86_64-0.12.8-1.el7.x86_64-report-1.txt: Likewise.
5312 * spice-server-0.12.4-19.el7.x86_64-0.12.8-1.el7.x86_64-report-2.txt: Likewise.
5313 * tests/data/Makefile.am: Add the new test material above to
5314 source distribution.
5315 * tests/test-diff-pkg.cc (in_out_specs): Add the new test inputs
5316 to the list of packages to test.
5318 2017-01-18 Dodji Seketeli <dodji@redhat.com>
5320 Bug 21058 - abipkgdiff wrongly drops non-public types
5321 * doc/manuals/abidiff.rst (--dont-drop-private-types): Remove documentation.
5322 (--drop-private-types): Document this new option.
5323 * src/abg-tools-utils.cc: Update copyright notice
5324 (handle_fts_entry): On the generated suppression specification, do
5325 not set the flag to drop matched types. Also, don't match types
5326 defined in files which patch start with "/usr/include/".
5327 * tools/abidiff.cc (options::options): Initialize the
5328 drop_private_types data member to false.
5329 (display_usage): Remove usage string for
5330 --dont-drop-private-types. Add a new one for
5331 --drop-private-types.
5332 (parse_command_line): Don't part --dont-drop-private-types,
5333 rather, parse --drop-private-types.
5334 (set_suppressions): When the suppression for private types is
5335 generated, if --drop-private-types was provided, then instruct the
5336 suppression to drop matched types.
5337 * tools/abipkgdiff.cc (options::drop_private_types): New option.
5338 (options::options): Initialize the new drop_private_types data
5340 (display_usage): Add a usage string for --drop-private-types.
5341 (parse_command_line): Parse the new --drop-private-types option.
5342 (maybe_create_private_types_suppressions): Don't take just a
5343 package, but a package_descriptor because the latter carries the
5344 options. So when the user used the --drop-private-types option,
5345 make the generated private types suppression to drop matched
5347 * tests/data/test-diff-pkg/tbb-4.1-9.20130314.fc22.x86_64--tbb-4.3-3.20141204.fc23.x86_64-report-1.txt:
5349 * tests/test-diff-suppr.cc (in_out_specs): Likewise.
5351 2017-01-18 Dodji Seketeli <dodji@redhat.com>
5353 Fix some include logic in abg-suppression.cc
5354 * src/abg-suppression.cc: Update copyright notice. Fix include
5357 2017-01-16 Dodji Seketeli <dodji@redhat.com>
5359 Support virtual member functions with vtable offset not yet set
5360 * include/abg-fwd.h (member_function_has_vtable_offset): Declare
5362 (get_member_function_vtable_offset): Return a ssize_t, not a
5364 (set_member_function_vtable_offset): Take a ssize_t, not a size_t.
5365 * include/abg-ir.h (class_decl::virtual_mem_fn_map_type): Adjust
5366 the map typedef to make it take ssize_t as the type of the key.
5367 (mem_fn_context_rel::vtable_offset_in_bits_): Make this data
5368 member be of ssize_t type, not size_t.
5369 (mem_fn_context_rel::mem_fn_context_rel): Initialize the
5370 vtable_offset_in_bits_ data member to -1.
5371 * src/abg-ir.cc (member_function_has_vtable_offset): Define new
5373 (get_member_function_vtable_offset): Return a ssize_t, not a
5375 (set_member_function_vtable_offset): Take a ssize_t, not a size_t.
5376 * src/abg-dwarf-reader.cc (die_virtual_function_index): Take an
5377 int64_t& rather than a uint64_t&.
5378 (finish_member_function_reading): Don't set the vtable offset if
5380 * src/abg-reader.cc (build_class_decl): Likewise.
5382 2017-01-14 Dodji Seketeli <dodji@redhat.com>
5384 [comparison engine] Don't crash when the context is null
5385 * src/abg-comparison.cc
5386 (RETURN_IF_BEING_REPORTED_OR_WAS_REPORTED_EARLIER): Guard against
5388 (diff::is_filtered_out): Likewise.
5390 2017-01-14 Dodji Seketeli <dodji@redhat.com>
5392 [dwarf reader] Don't abort when trying to canonicalize a non-type
5393 * src/abg-dwarf-reader.cc (maybe_canonicalize_type): Don't abort
5394 when trying to canonicalize a decl.
5396 2017-01-14 Dodji Seketeli <dodji@redhat.com>
5398 [dwarf reader] properly separate function decls and types in lookup
5399 * src/abg-dwarf-reader.cc
5400 (read_context::associate_die_to_artifact_by_repr_internal):
5401 Choose the right type of representation depending on if we are
5402 associating a type or a decl.
5403 * tests/data/test-diff-filter/test31-pr18535-libstdc++-report-0.txt: Adjust.
5404 * tests/data/test-diff-filter/test31-pr18535-libstdc++-report-1.txt: Adjust.
5405 * tests/data/test-read-dwarf/test10-pr18818-gcc.so.abi: Adjust.
5406 * tests/data/test-read-dwarf/test11-pr18828.so.abi: Adjust.
5407 * tests/data/test-read-dwarf/test12-pr18844.so.abi: Adjust.
5408 * tests/data/test-read-dwarf/test13-pr18894.so.abi: Adjust.
5409 * tests/data/test-read-dwarf/test14-pr18893.so.abi: Adjust.
5410 * tests/data/test-read-dwarf/test15-pr18892.so.abi: Adjust.
5411 * tests/data/test-read-dwarf/test16-pr18904.so.abi: Adjust.
5412 * tests/data/test-read-dwarf/test17-pr19027.so.abi: Adjust.
5413 * tests/data/test-read-dwarf/test18-pr19037-libvtkRenderingLIC-6.1.so.abi:
5415 * tests/data/test-read-dwarf/test19-pr19023-libtcmalloc_and_profiler.so.abi:
5417 * tests/data/test-read-dwarf/test20-pr19025-libvtkParallelCore-6.1.so.abi:
5419 * tests/data/test-read-dwarf/test21-pr19092.so.abi: Adjust.
5420 * tests/data/test-read-dwarf/test22-pr19097-libstdc++.so.6.0.17.so.abi:
5422 * tests/data/test-read-dwarf/test9-pr18818-clang.so.abi: Adjust.
5424 2017-01-14 Dodji Seketeli <dodji@redhat.com>
5426 [dwarf reader] Allow updating and de-duplicating member functions
5427 * src/abg-dwarf-reader.cc (add_or_update_class_type): Register
5428 member functions for lookup by member function DIE representation.
5430 2017-01-14 Dodji Seketeli <dodji@redhat.com>
5432 [dwarf reader] Do not over de-duplicate function *definitions*
5433 * src/abg-dwarf-reader.cc
5434 (build_or_get_fn_decl_if_not_suppressed): Do try to de-duplicate a
5435 function if it's to be completed.
5437 2017-01-13 Dodji Seketeli <dodji@redhat.com>
5439 [dwarf reader] Fix pretty printing static methods from DWARF
5440 * src/abg-dwarf-reader.cc
5441 (die_return_and_parm_names_from_fn_type_die): Take a new
5442 'is_static' parameter.
5443 (die_qualified_type_name, die_pretty_print_type): Adjust calling
5444 die_return_and_parm_names_from_fn_type_die.
5445 (die_function_signature): Likewise. Also, do not forget to print
5446 the first parameter for a static method.
5448 2017-01-13 Dodji Seketeli <dodji@redhat.com>
5450 Handle several virtual member functions having the same vtable offset
5451 * include/abg-ir.h (class_or_union::virtual_mem_fn_map_type):
5453 (class_decl::get_virtual_mem_fns_map): Declare new accessor.
5454 * src/abg-ir.cc (class_decl::priv::virtual_mem_fns_map_): New data
5456 (class_decl::get_virtual_mem_fns_map): Define new accessor.
5457 (fixup_virtual_member_function): Populate the new virtual member
5459 (class_decl::on_canonical_type_set): Sort the virtual member
5460 function vectors stored in the new virtual member functions map.
5461 (class_decl::add_member_function): Call
5462 set_member_function_is_virtual *after* calling
5463 set_member_function_vtable_offset because the former updates the
5464 virtual function map, so it needs the vtable offset.
5465 * src/abg-dwarf-reader.cc (finish_member_function_reading):
5467 * src/abg-reader.cc (build_class_decl): Likewise.
5469 2017-01-13 Dodji Seketeli <dodji@redhat.com>
5471 Speed up pretty representing (function) types
5472 * include/abg-ir.h (type_base::get_cached_pretty_representation):
5473 Declare new function.
5474 (function_type::get_cached_name): Likewise.
5475 * src/abg-ir.cc (get_method_type_name): Use the new
5476 type_base::get_cached_pretty_representation function.
5477 (type_base::priv::{internal_cached_repr_, cached_repr_}): Add new
5479 (function_type::priv::{internal_cached_name_, cached_name_}):
5481 (type_base::get_cached_pretty_representation): Define new
5483 (function_type::get_cached_name): Likewise.
5484 (type_base::get_canonical_type_for): Call
5485 type_base::get_cached_pretty_representation here, so the internal
5486 representation is cached right before canonicalization.
5487 (function_type::{mark_as_being_compared, unmark_as_being_compared,
5488 comparison_started}): Uset he new type_base::get_cached_name to
5489 speed up function type name retrieval.
5491 2017-01-13 Dodji Seketeli <dodji@redhat.com>
5493 Add missing deep comparison operators for {function, method}_decl_sptr
5494 * include/abg-ir.h (operator==): Declare two new overloads for
5495 function_decl_sptr an method_decl_sptr.
5496 * src/abg-ir.cc (operator==): Define two new overloads for
5497 function_decl_sptr an method_decl_sptr.
5499 2017-01-16 Dodji Seketeli <dodji@redhat.com>
5501 Fix performance regression while analyzing libjvm.so
5502 * include/abg-ir.h ({type_base,
5503 class_decl}::on_canonical_type_set): Declare new virtual member
5505 * src/abg-ir.cc (type_base::on_canonical_type_set): Define new
5506 virtual member function that does nothing.
5507 (class_decl::on_canonical_type_set): Define new virtual member
5508 function that sorts the virtual member functions of class_decl.
5509 (canonicalize): Invoke type_base::on_canonical_type_set when the
5510 canonical type is set.
5511 (fixup_virtual_member_function): Don't sort virtual member
5513 * src/abg-dwarf-reader.cc (finish_member_function_reading): Do not
5514 sort virtual member functions here.
5515 * tests/data/test-read-dwarf/test13-pr18894.so.abi: Adjust.
5516 * tests/data/test-read-dwarf/test14-pr18893.so.abi: Adjust.
5517 * tests/data/test-read-dwarf/test15-pr18892.so.abi: Adjust.
5518 * tests/data/test-read-dwarf/test21-pr19092.so.abi: Adjust.
5519 * tests/data/test-read-dwarf/test22-pr19097-libstdc++.so.6.0.17.so.abi: Adjust.
5521 2017-01-14 Dodji Seketeli <dodji@redhat.com>
5523 Update copyright notice for abg-fwd.h, abg-ir.h and test-abidiff.cc
5524 * include/abg-fwd.h: Adjust copyright.
5525 * include/abg-ir.h: Likewise.
5526 * tests/test-abidiff.cc: Likewise.
5528 2017-01-16 Dodji Seketeli <dodji@redhat.com>
5530 Remove unused functions from abg-ir.cc
5531 * src/abg-ir.cc (convert_node_to_decl): Remove specializations for
5532 class_decl_sptr, type_base_sptr and var_decl_sptr.
5534 2016-11-10 Dodji Seketeli <dodji@redhat.com>
5536 Support Linux Kernel ABI whitelist files
5537 * include/abg-suppression.h
5538 (function_suppression::function_suppression): Make the declaration
5539 of the default constructor public.
5540 * src/abg-suppression-priv.h (function_suppression::priv::priv):
5541 Declare a default constructor.
5542 * src/abg-suppression.cc
5543 (function_suppression::function_suppression): Define default
5545 * include/abg-tools-utils.h
5546 (gen_suppr_spec_from_kernel_abi_whitelist): Declare new function.
5547 * src/abg-tools-utils.cc
5548 (gen_suppr_spec_from_kernel_abi_whitelist): Define new function.
5549 * tools/abidiff.cc (options::kernel_abi_whitelist_paths):
5550 (display_usage): Display a help string for the new
5551 --linux-kernel-abi-whitelist option.
5552 (parse_command_line): Parse the --linux-kernel-abi-whitelist from
5554 (maybe_check_suppression_files): Check the presence of the kernel
5555 abi whitelist files.
5556 (set_suppressions): Generate suppression specifications from the
5559 2016-10-10 Dodji Seketeli <dodji@redhat.com>
5561 Support Linux Kernel binaries
5562 * include/abg-dwarf-reader.h (create_read_context): Take a new
5563 flag to say if the context is to read an ELF binary in linux
5565 * src/abg-dwarf-reader.cc (typedef address_set_type)
5566 (address_set_sptr): New typedefs.
5567 (get_binary_load_address): The load address of the binary is
5568 the load address specified by the program header that is at the
5569 smallest offset; not by the program header that is at offset zero.
5570 (read_context::{ksymtab_section_, ksymtab_gpl_section_,
5571 linux_exported_fn_syms_, linux_exported_var_syms_,
5572 linux_exported_gpl_fn_syms_, linux_exported_gpl_var_syms_,
5573 load_in_linux_kernel_mode_}): New data members.
5574 (read_context::read_context): Initialize ksymtab_section_,
5575 ksymtab_gpl_section_ and load_in_linux_kernel_mode_.
5576 (read_context::{find_symbol_table_section, find_opd_section,
5577 lookup_elf_fn_symbol_from_address,
5578 lookup_elf_var_symbol_from_address, get_function_address,
5579 get_variable_address}): Make these const.
5580 (read_context::{find_ksymtab_section, find_ksymtab_gpl_section,
5581 lookup_elf_symbol_from_address, function_symbol_is_exported,
5582 variable_symbol_is_exported, linux_exported_fn_syms,
5583 create_or_get_linux_exported_fn_syms, linux_exported_var_syms,
5584 create_or_get_linux_exported_var_syms, linux_exported_gpl_fn_syms,
5585 linux_exported_gpl_var_syms,
5586 create_or_get_linux_exported_gpl_fn_syms,
5587 linux_exported_gpl_var_syms,
5588 create_or_get_linux_exported_gpl_var_syms, architecture_word_size,
5589 load_kernel_symbol_table, load_ksymtab_symbols,
5590 load_ksymtab_gpl_symbols,
5591 load_linux_specific_exported_symbol_maps,
5592 load_in_linux_kernel_mode}): New member functions.
5593 (read_context::read_int_from_array_of_bytes): Factorize this
5594 new member function out of ...
5595 (read_context::{lookup_ppc64_elf_fn_entry_point_address}):
5596 ... this. Make this function const too.
5597 (read_context::read_uint64_from_array_of_bytes): New function.
5598 Uses read_int_from_array_of_bytes above.
5599 (read_context::{fun_entry_addr_sym_map_sptr}): Try to load symbol
5600 maps only when it's necessary.
5601 (read_context::elf_architecture_is_big_endian): Fix logic.
5602 (read_context::{var_addr_sym_map}): Express the const variant in
5603 terms of the non-const one. In the non-const one, load the map
5604 only when necessary.
5605 (read_context::load_symbol_maps_from_symtab_section): Renamed
5606 load_symbol_maps into this.
5607 (read_context::is_linux_kernel_binary): Define new member
5609 (read_context::{function, variable}_symbol_is_exported): If we are
5610 not prevented from considering loading in linux kernel mode, then
5611 just looking at a linux kernel binary makes us consider the
5612 special kernel sections.
5613 (read_debug_info_into_corpus): Likewise.
5614 (build_ir_node_from_die): Take a new flag that says if the ir node
5615 is a declaration required by another concrete IR node.
5616 (enum read_context::kernel_symbol_table_kind): New enum.
5617 (read_context::load_symbol_maps): Support loading linux kernel
5618 specific sections too.
5619 (build_var_decl): Use the new
5620 read_context::variable_symbol_is_exported.
5621 (function_is_suppressed): Suppress non-member functions or
5622 variables that are not declarations and that have no symbol.
5623 (variable_is_suppressed, build_var_decl_if_not_suppressed): Take a
5624 new flag that says if the variable is a declaration required by a
5625 concrete variable. If non member variable that is a declaration
5626 is not the specification of another concrete variable, then it's
5628 (add_fn_symbols_to_map, add_var_symbols_to_map): New function
5630 (read_debug_info_into_corpus): If we are reading linux kernel or
5631 linux kernel modules, only set explicitely exported symbols (in
5632 the linux kernel binary sense) as exported function or variable
5634 (create_read_context): Take a new flag to say if the context is to
5635 read an ELF binary in linux kernel mode.
5636 * tools/abidiff.cc (options::options): Initialize
5637 options::linux_kernel_mode to true.
5638 (display_usage): Display usage of the --no-linux-kernel-mode option.
5639 (parse_command_line): Parse the --no-linux-kernel-mode option.
5640 * tools/abidw.cc (options::options): Initialize
5641 options::linux_kernel_mode to true.
5642 (display_usage): Display usage of --no-linux-kernel-mode option.
5643 (parse_command_line): Parse the --no-linux-kernel-mode option.
5644 * doc/manuals/abidiff.rst: Document the new --no-linux-kernel-mode
5646 * doc/manuals/abidw.rst: Likewise.
5647 * tests/data/test-diff-dwarf-abixml/test0-pr19026-libvtkIOSQL-6.1.so.1.abi:
5649 * tests/data/test-read-dwarf/test9-pr18818-clang.so.abi: Adjust.
5650 * tests/data/test-read-dwarf/test10-pr18818-gcc.so.abi: Adjust.
5651 * tests/data/test-read-dwarf/test11-pr18828.so.abi: Adjust.
5652 * tests/data/test-read-dwarf/test12-pr18844.so.abi: Likewise.
5653 * tests/data/test-read-dwarf/test13-pr18894.so.abi: Likewise.
5654 * tests/data/test-read-dwarf/test14-pr18893.so.abi: Likewise.
5655 * tests/data/test-read-dwarf/test15-pr18892.so.abi: Likewise.
5656 * tests/data/test-read-dwarf/test16-pr18904.so.abi: Likewise.
5657 * tests/data/test-read-dwarf/test17-pr19027.so.abi: Likewise.
5658 * tests/data/test-read-dwarf/test18-pr19037-libvtkRenderingLIC-6.1.so.abi:
5660 * tests/data/test-read-dwarf/test19-pr19023-libtcmalloc_and_profiler.so.abi:
5662 * tests/data/test-read-dwarf/test20-pr19025-libvtkParallelCore-6.1.so.abi:
5664 * tests/data/test-read-dwarf/test21-pr19092.so.abi: Likewise.
5665 * tests/data/test-read-dwarf/test22-pr19097-libstdc++.so.6.0.17.so.abi: Likewise.
5666 * tests/data/test-read-dwarf/libtest23.so.abi: Adjust.
5667 * tests/data/test-read-dwarf/libtest24-drop-fns-2.so.abi: Adjust.
5668 * tests/data/test-read-dwarf/libtest24-drop-fns.so.abi: Adjust.
5670 2017-01-06 Dodji Seketeli <dodji@redhat.com>
5672 Add debug routines to dump locations to a stream
5673 * src/abg-writer.cc (dump_location): Define new function and one
5675 (dump_decl_location): Re-write in terms of the new dump_location.
5677 2017-01-06 Dodji Seketeli <dodji@redhat.com>
5679 Better de-duplicate classes, unions, enums in non-odr contexts
5680 * src/abg-dwarf-reader.cc (build_enum_type)
5681 (add_or_update_class_type, add_or_update_union_type): When the ODR
5682 is not relevant, use the location of the type to detect if two
5683 enum, class or union types of the same name actually represent the
5686 2017-01-06 Dodji Seketeli <dodji@redhat.com>
5688 Adjust some reference outputs of the test-read-dwarf test harness
5689 * tests/data/test-read-dwarf/test12-pr18844.so.abi: Adjust.
5690 * tests/data/test-read-dwarf/test9-pr18818-clang.so.abi: Adjust.
5692 2017-01-04 Ondrej Oprala <ondrej.oprala@gmail.com>
5694 Bug 18754 - Add the "--no-added-syms" option to abidiff
5695 * doc/manuals/abidiff.rst: Document the new --no-added-syms
5697 * tools/abidiff.cc (struct options): Add show_added_syms and
5698 set it to true by default.
5699 (display_usage): Document the new options --no-added-syms. If
5700 this is the only suppression option specified, it is equivalent
5701 to specifying --show_{changed,deleted}_{fns,vars} as arguments
5702 to abidiff. If any of those options are specified before
5703 --no-added-syms, then it has no effect.
5704 (parse_command_line): Parse the new option and set
5705 show_added_{fns,vars,syms} and show_all_{fns,vars} to false if
5706 --no-added-syms is specified.
5707 * tests/test-diff-filter.cc: Add a test for the new option.
5708 * tests/data/test-diff-filter/test35-pr18754-no-added-syms-report-0.txt:
5709 Reference results for the new test.
5710 * tests/data/test-diff-filter/test35-pr18754-no-added-syms-report-1.txt:
5712 * tests/data/Makefile.am: Add the above test files to the list of
5715 2017-01-05 Dodji Seketeli <dodji@redhat.com>
5717 Update copyright year on a bunch of files
5718 * include/abg-corpus.h: Update copyright year to 2017.
5719 * src/abg-dwarf-reader.cc: Likewise.
5720 * src/abg-ir.cc: Likewise.
5721 * src/abg-reader.cc: Likewise.
5722 * src/abg-writer.cc: Likewise.
5723 * tools/abicompat.cc: Likewise.
5724 * tools/abidw.cc: Likewise.
5726 2017-01-05 Dodji Seketeli <dodji@redhat.com>
5728 [apidoc] Allow brief description at the top of class description pages
5729 * doc/api/libabigail.doxy: Don't disable "brief member desc".
5731 2017-01-05 Dodji Seketeli <dodji@redhat.com>
5734 * include/abg-corpus.h: Remove corpus_sptr typedef. It's in
5736 * src/abg-ir.cc: Remove some unnecessary vertical space.
5737 * src/abg-reader.cc (build_function_decl): Cleanup some asserts.
5738 * src/abg-writer.cc (write_function_type): Each the inspection of
5739 the type id from within the debugger.
5741 2017-01-05 Dodji Seketeli <dodji@redhat.com>
5743 Misc comments and apidoc fixes
5744 * src/abg-dwarf-reader.cc (lookup_symbol_from_gnu_hash_tab): Fix
5746 * tools/abicompat.cc (perform_compat_check_in_weak_mode): Better
5748 * tools/abidw.cc (dislay_usage): Fix white spaces.
5752 2017-01-05 Dodji Seketeli <dodji@redhat.com>
5754 Speedup set_member_is_static
5755 * src/abg-ir.cc (set_member_is_static): When comparing data
5756 members, consider only their names.
5758 2017-01-05 Dodji Seketeli <dodji@redhat.com>
5760 Avoid unnecessary updates to type lookup maps
5761 * src/abg-ir.cc (class_or_union::get_is_declaration_only): Try
5762 to update the type maps only when a declaration-only class
5763 type is now defined.
5765 2017-01-05 Dodji Seketeli <dodji@redhat.com>
5767 Update tests/data/test-read-dwarf/*.abi files
5768 * tests/data/test-read-dwarf/test10-pr18818-gcc.so.abi: Adjust.
5769 * tests/data/test-read-dwarf/test11-pr18828.so.abi: Likewise.
5770 * tests/data/test-read-dwarf/test12-pr18844.so.abi: Likewise.
5771 * tests/data/test-read-dwarf/test13-pr18894.so.abi: Likewise.
5772 * tests/data/test-read-dwarf/test14-pr18893.so.abi: Likewise.
5773 * tests/data/test-read-dwarf/test15-pr18892.so.abi: Likewise.
5774 * tests/data/test-read-dwarf/test16-pr18904.so.abi: Likewise.
5775 * tests/data/test-read-dwarf/test17-pr19027.so.abi: Likewise.
5776 * tests/data/test-read-dwarf/test18-pr19037-libvtkRenderingLIC-6.1.so.abi: Likewise.
5777 * tests/data/test-read-dwarf/test19-pr19023-libtcmalloc_and_profiler.so.abi: Likewise.
5778 * tests/data/test-read-dwarf/test20-pr19025-libvtkParallelCore-6.1.so.abi: Likewise.
5779 * tests/data/test-read-dwarf/test21-pr19092.so.abi: Likewise.
5780 * tests/data/test-read-dwarf/test22-pr19097-libstdc++.so.6.0.17.so.abi: Likewise.
5781 * tests/data/test-read-dwarf/test9-pr18818-clang.so.abi: Likewise.
5783 2017-01-05 Dodji Seketeli <dodji@redhat.com>
5785 Update tests/data/test-diff-dwarf-abixml/test0-pr19026-libvtkIOSQL-6.1.so.1.abi
5786 * tests/data/test-diff-dwarf-abixml/test0-pr19026-libvtkIOSQL-6.1.so.1.abi:
5789 2017-01-05 Dodji Seketeli <dodji@redhat.com>
5791 [abixml writer] Make sure all function types are emitted
5792 * src/abg-writer.cc (write_translation_unit): Fix logic to avoid
5793 forgetting referenced function types.
5795 2017-01-05 Dodji Seketeli <dodji@redhat.com>
5797 [abixml writer] Fix comparison of pointer to types
5798 * src/abg-writer.cc (type_ptr_comp::operator()): Do not add an
5799 empty type id string to the type -> type id map when the entry for
5800 a given type is empty.
5802 2017-01-05 Dodji Seketeli <dodji@redhat.com>
5804 [dwarf-reader] Don't early canonicalize function types
5805 * src/abg-dwarf-reader.cc (maybe_canonicalize_type):
5806 Late-canonicalize function types.
5807 signed-off-by: Dodji Seketeli <dodji@redhat.com>
5809 2017-01-05 Dodji Seketeli <dodji@redhat.com>
5811 Fix qualified name caching for some types
5812 * src/abg-ir.cc ({qualified, pointer,
5813 array}_type_def::get_qualified_name): Don't cache internal and
5814 non-internal qualified name when the type is not canonicalized.
5816 2017-01-04 Dodji Seketeli <dodji@redhat.com>
5818 Cleanup ODR-based type canonicalization optimization gating logic
5819 * src/abg-ir.cc (type_base::get_canonical_type_for): Make it clear
5820 that the ODR-based optimization is allowed only on C++ ABI
5823 2017-01-04 Dodji Seketeli <dodji@redhat.com>
5825 Fix a typo in method name computation
5826 * src/abg-ir.cc (get_method_type_name): Really return the method
5829 2017-01-05 Dodji Seketeli <dodji@redhat.com>
5831 Update tests/data/test-diff-pkg/libICE-1.0.6-1.el6.x86_64.rpm--libICE-1.0.9-2.el7.x86_64.rpm-report-0.txt
5832 * tests/data/test-diff-pkg/libICE-1.0.6-1.el6.x86_64.rpm--libICE-1.0.9-2.el7.x86_64.rpm-report-0.txt: Adjust.
5834 2017-01-05 Dodji Seketeli <dodji@redhat.com>
5836 Update tests/data/test-read-write/test27.xml
5837 * tests/data/test-read-write/test27.xml: Adjust.
5839 2017-01-04 Dodji Seketeli <dodji@redhat.com>
5841 [dwarf-reader] Handle per translation-unit type de-duplication
5842 * src/abg-dwarf-reader.cc
5843 (read_context::per_tu_name_artefacts_map_): New data member.
5844 (read_context::clear_per_translation_unit_data): Clear the new
5845 read_context::per_tu_name_artefacts_map_.
5846 (read_context::associate_die_to_decl): Take a flag to say if we
5847 should associate a DIE to its representation and another one to
5848 say if the association should be done per-tu or per-corpus.
5849 (read_context::lookup_{type_artifact, artifact}_from_die): Update
5851 (read_context::lookup_artifact_from_die_representation): Likewise.
5852 (read_context::{associate_die_to_artifact_by_repr,
5853 associate_die_to_artifact_by_repr_internal,
5854 associate_die_to_type}): Take a flag to say if the associating
5855 should be done on a per-tu basis.
5856 (read_context::lookup_{type_artifact, artifact}_from_die_per_tu):
5857 New member functions.
5858 (read_context::{lookup_artifact_from_per_tu_die_representation,
5859 odr_is_relevant}): Likewise.
5860 (build_enum_type, add_or_update_class_type)
5861 (add_or_update_union_type): If ODR is not relevant, do not perform
5862 per-corpus de-duplication.
5863 (build_pointer_type_def, build_typedef_type): Do not associate the
5864 type to its representation as these kinds of typs are not
5866 (build_function_type): If ODR is not relevant, perform per-tu
5867 de-duplication. When ODR is relevant, per-corpus de-duplication
5869 (build_or_get_fn_decl_if_not_suppressed): Function decls are
5870 always de-duplicated per-corpus.
5871 (build_ir_node_from_die): For data members, do not update the die
5872 representation map as data members are not de-duplicated. Do not
5873 do it for function decls either.
5874 [1]: https://en.wikipedia.org/wiki/One_Definition_Rule
5876 2017-01-02 Dodji Seketeli <dodji@redhat.com>
5878 Handle per translation unit and per corpus types maps
5879 * include/abg-fwd.h (lookup_type_in_corpus): Remove. This is to
5880 be replaced by the new lookup_type below.
5881 (lookup_{basic, class, union, enum, typedef, qualified, pointer,
5882 reference, array, function, class_or_typedef,
5883 class_typedef_or_enum}_type):
5884 (lookup_class_type_through_scopes, lookup_type)
5885 (lookup_type_through_scopes, lookup_or_synthesize_fn_type)
5886 * src/abg-ir-priv.h (struct translation_unit::priv): Move this
5887 private type here, from abg-ir.h.
5888 (synthesize_type_from_translation_unit): Declare new functions.
5889 * include/abg-ir.h (class type_maps): Define new type.
5890 (translation_unit::get_function_types): Remove.
5891 (translation_unit::get_types): Now return a type_maps.
5892 (translation_unit::get_live_fn_types): Declare new type.
5893 (class decl_base): Make canonicalize be a friend of this class.
5894 * src/abg-ir.cc (struct translation_unit::priv): Move this to
5896 (struct type_maps::priv): Define new type.
5897 (type_maps::{basic, class, union, enum, typedef, qualified,
5898 pointer, reference, array, function}_types): Define new accessors.
5899 (translation_unit::bind_function_type_life_time): Adjust.
5900 (translation_unit::get_function_types): Remove accessor.
5901 (translation_unit::get_types, get_live_fn_types): Define new
5903 (lookup_type_in_translation_unit)
5904 (lookup_class_type_in_translation_unit)
5905 (lookup_function_type_in_translation_unit)
5906 (synthesize_type_from_translation_unit)
5907 (synthesize_function_type_from_translation_unit)
5908 (lookup_class_type_in_translation_unit) Remove function
5910 (lookup_type_in_map): Define function template.
5911 (lookup_{basic, class, union, typedef, class_or_typedef,
5912 class_typedef_or_enum, qualified, pointer, reference, array,
5913 function}_type): Define functions.
5914 (lookup_function_type, lookup_type_through_scopes)
5915 (lookup_class_type_through_scopes)
5916 (lookup_basic_type_through_translation_units)
5917 (lookup_union_type_through_translation_units)
5918 (lookup_enum_type_through_translation_units)
5919 (lookup_class_type_through_translation_units)
5920 (lookup_typedef_type_through_translation_units)
5921 (lookup_qualified_type_through_translation_units)
5922 (lookup_pointer_type_through_translation_units)
5923 (lookup_reference_type_through_translation_units)
5924 (lookup_array_type_through_translation_units)
5925 (lookup_function_type_through_translation_units)
5926 (lookup_type_through_translation_units)
5927 (lookup_or_synthesize_fn_type, lookup_type): Likewise.
5928 (maybe_update_types_lookup_map)
5929 (maybe_update_types_lookup_map<class_decl>)
5930 (maybe_update_types_lookup_map<function_type>): Define function
5931 template, specilizations and functions.
5932 (synthesize_type_from_translation_unit)
5933 (synthesize_function_type_from_translation_unit): Define
5935 * include/abg-corpus.h (corpus::get_types): Declare new accessor.
5936 * src/abg-corpus.cc (corpus::priv::get_types): Define new
5938 (corpus::get_types): Likewise.
5939 (lookup_type_in_corpus, lookup_class_type_in_corpus)
5940 (lookup_type_in_corpus, lookup_function_type_in_corpus)
5941 (maybe_update_types_lookup_map)
5942 (maybe_update_types_lookup_map<class_decl>)
5943 (maybe_update_types_lookup_map<function_type>): Remove.
5944 (lookup_{basic, class, union, enum, typedef, qualified, pointer,
5945 reference, array, function, class_or_typedef,
5946 class_typedef_or_enum}_type): Likewise.
5947 * src/abg-corpus-priv.h (corpus::priv::{basic, class, union,
5948 typedef, qualified, pointer, reference, array, function}_types):
5949 Remove these data members.
5950 (corpus::priv::get_scopes): Remove member function.
5951 (corpus::priv::get_{basic, class, union, enum, typedef, qualified,
5952 pointer, reference, array, function}_types): Remove member
5953 function declarations.
5954 (corpus::priv::types_): New data member.
5955 (corpus::priv::get_types): Declare new member function.
5956 (lookup_{basic, class, enum, typedef, class_or_typedef, qualified,
5957 pointer, reference, array, function}_type): Declare new functions.
5958 * src/abg-dwarf-reader.cc
5959 (read_context::resolve_declaration_only_classes)
5960 (build_translation_unit_and_add_to_ir): Adjust use of
5962 * src/abg-reader.cc (read_context::type_is_from_translation_unit):
5963 Adjust to the use of lookup_function_type_in_translation_unit that
5964 got renamed into lookup_function_type.
5965 * src/abg-writer.cc (type_ptr_cmp::operator()): New operator
5967 (read_context::sort_type): Add new overloads.
5968 (write_translation_unit): Adjust to get the function types from
5969 the new translation_unit::get_live_fn_types and sort them.
5970 * tools/abicompat.cc (perform_compat_check_in_weak_mode): Adjust
5971 to use the new lookup_or_synthesize_fn_type, in lieu of
5972 lookup_function_type_in_corpus. Adjust to use lookup_type in lieu
5973 of lookup_type_in_corpus.
5975 2016-12-21 Dodji Seketeli <dodji@redhat.com>
5977 Make abg-fwd.h use *_sptr typedefs
5978 * include/abg-ir.h: Move convience typedef declarations and some
5979 necessary forward declarations to ...
5980 * include/abg-fwd.h: ... here.
5981 (is_enum_type, is_var_decl): Take a pointer to type_or_decl_base.
5982 (lookup_type_in_scope): Return a type_base_sptr.
5983 (lookup_type_through_scopes): Introduce this to later replace the
5984 overload of lookup_type_in_translation_unit that takes a list of
5986 (lookup_type_in_scope): Return a type_base_sptr, not a
5988 * src/abg-ir.cc (lookup_type_in_scope, lookup_node_in_scope)
5989 (lookup_var_decl_in_scope): Adjust.
5990 (is_enum_type, is_var_decl): Take a pointer to type_or_decl_base.
5991 (lookup_node_in_scope): Return a type_or_decl_base_sptr.
5992 (lookup_type_in_scope): Return a type_base_sptr.
5993 (lookup_node_in_translation_unit): Return a
5994 type_or_decl_base_sptr.
5995 (lookup_type_through_scopes): Replace
5996 lookup_type_in_translation_unit.
5998 2016-12-18 Chenxiong Qi <cqi@redhat.com>
6000 Fix wrong variable name
6001 * tools/fedabipkgdiff: (diff_latest_rpms_based_on_distros): Fix
6002 wrong variable name distro.
6004 2016-12-18 Chenxiong Qi <cqi@redhat.com>
6006 Warn properly when cannot find peer RPM
6007 * tools/fedabipkgdiff: (RPMCollection.get_peer_rpm): Return None
6008 when cannot find peer RPM due to nonexistent arch.
6010 2016-12-19 Chenxiong Qi <cqi@redhat.com>
6012 Read Koji config via Koji API
6013 * tools/fedabipkgdiff: Read DEFAULT_KOJI_TOPURL and
6014 DEFAULT_KOJI_SERVER from Koji config via Koji API read_config.
6015 (build_commandline_args_parser): --topdir is renamed to
6017 * doc/manuals/fedabipkgdiff.rst: Rename --topdir to --topurl.
6019 2016-12-19 Chenxiong Qi <cqi@redhat.com>
6021 Follow moved packages when download
6022 * tools/fedabipkgdiff: (download_rpm) Add --location to curl
6025 2016-12-13 Chenxiong Qi <cqi@redhat.com>
6027 More document for local RPMs comparison
6028 * doc/manuals/fedabipkgdiff.rst: Add more document for local RPMs
6029 comparison. Also fixed a typo.
6031 2016-12-15 Ondrej Oprala <ondrej.oprala@gmail.com>
6033 Properly report missing files for abipkgdiff
6034 * tools/abipkgdiff.cc: (class options): Add the "nonexistent_file" flag
6035 (parse_command_line): Check if the files given exist.
6036 (main): Check the nonexistent_file flag. If any of the input
6037 files don't exist, report it and exit. Also, for present and future test
6038 uniformity, only show the base names of the packages when using their
6039 names in error output.
6040 * tests/test-diff-pkg.cc: Add a new regression test.
6041 * tests/data/test-diff-pkg/test-nonexistent-report-0.txt: The
6042 expected output of the above regression test.
6043 * tests/data/Makefile.am: Add the above file to the list.
6045 2016-12-15 Dodji Seketeli <dodji@redhat.com>
6048 * src/abg-dwarf-reader.cc (build_function_type): Remove
6049 unnecessary new line.
6051 2016-12-15 Dodji Seketeli <dodji@redhat.com>
6053 make is_anonymous_type work for unions and classes
6054 * src/abg-ir.cc (is_anonymous_type): Make this work for class or
6055 union types, no only classes.
6057 2016-12-15 Dodji Seketeli <dodji@redhat.com>
6059 Naming typedefs of classes are not read properly from abixml
6060 * src/abg-reader.cc (build_class_decl): Use
6061 read_context::build_or_get_type_decl rather than
6062 read_context::get_type_decl to build the naming typedef referred
6063 to by the class being built. Move the handling of naming typedefs
6064 after the class is marked as WIP and keyed.
6066 2016-12-15 Dodji Seketeli <dodji@redhat.com>
6068 Don't early-canonicalize function types when reading abixml
6069 * src/abg-reader.cc (read_context::maybe_canonicalize_type):
6070 late-canonicalize function types too.
6072 2016-12-12 Ondrej Oprala <ondrej.oprala@gmail.com>
6074 Check --enable-rpm dependencies more rigorously
6075 * configure.ac: Check if both rpm2cpio and cpio
6076 exist on the system. If not, disable the option and fail the
6077 configuration if --enable-rpm was specified explicitly.
6079 2016-12-12 Ondrej Oprala <ondrej.oprala@gmail.com>
6081 abipkgdiff doesn't mention --no-default-suppression in help
6082 * tools/abipkgdiff.cc (display_usage): Mention
6083 --no-default-suppression as one of the options.
6085 2016-12-12 Ondrej Oprala <ondrej.oprala@gmail.com>
6087 Fix a few remarks made by cppcheck
6088 * src/abg-comparison.cc (types_or_decls_equal::operator()): Pass
6089 arguments by reference.
6090 (class_diff::ensure_lookup_tables_populated): Expression
6091 !A || (A && B) can be reduced to !A || B.
6092 * src/abg-suppression.cc (suppression_matches_type_no_name):
6095 2016-12-09 Ondrej Oprala <ondrej.oprala@gmail.com>
6097 Bug 19272 - abipkgdiff doesn't report arch change
6098 * src/abg-comparison.cc (corpus_diff::has_incompatible_changes):
6099 The architecture change into account.
6100 (corpus_diff::has_net_changes): Take architecture and soname
6101 changes into account.
6102 * tools/abicompat.cc (perform_compat_check_in_normal_mode): Use
6103 corpus_diff::{has_net_changes, has_incompatible_changes}.
6104 * tests/data/test-diff-pkg/dbus-glib-0.104-3.fc23.armv7hl.rpm: New
6106 * tests/data/test-diff-pkg/dbus-glib-0.104-3.fc23.x86_64--dbus-glib-0.104-3.fc23.armv7hl-report-0.txt:
6107 New test reference output.
6108 * tests/data/Makefile.am: Add the new test material above to
6109 source distribution.
6110 * tests/test-diff-pkg.cc (in_out_spec): Compare the new package
6111 above against an x86_64 one.
6113 2016-08-11 Chenxiong Qi <cqi@redhat.com>
6115 Bug 20380 - Compare two local RPMs
6116 * configure.ac: add dependent mimetype module.
6117 * doc/manuals/fedabipkgdiff.rst: Update to add document for the
6118 new use case of comparing two local RPMs.
6119 * tests/data/Makefile.am: Include new RPMs for tests.
6120 * tests/data/test-fedabipkgdiff/dbus-glib/dbus-glib-0.100.2-2.fc20.x86_64.rpm:
6121 New RPM for running test.
6122 * tests/data/test-fedabipkgdiff/dbus-glib/dbus-glib-0.106-1.fc23.x86_64.rpm:
6124 * tests/data/test-fedabipkgdiff/nss-util/nss-util-3.12.6-1.fc14.x86_64.rpm:
6126 * tests/data/test-fedabipkgdiff/nss-util/nss-util-3.24.0-2.0.fc25.x86_64.rpm:
6128 * tests/data/test-fedabipkgdiff/nss-util/nss-util-devel-3.24.0-2.0.fc25.x86_64.rpm:
6130 * tests/data/test-fedabipkgdiff/test4-glib-0.100.2-2.fc20.x86_64.rpm-glib-0.106-1.fc23.x86_64.rpm-report-0.txt:
6131 Rename filename by adding .rpm extension.
6132 * tests/data/test-fedabipkgdiff/test5-same-dir-dbus-glib-0.100.2-2.fc20.x86_64--dbus-glib-0.106-1.fc23.x86_64-report-0.txt:
6133 New reference output for testing comparing local RPMs.
6134 * tests/data/test-fedabipkgdiff/test6-missing-devel-debuginfo-nss-util-3.12.6-1.fc14.x86_64--nss-util-3.24.0-2.0.fc25.x86_64-report-0.txt:
6135 New reference output for testing comparison without non-existent
6136 debuginfo or development package.
6137 * tests/runtestfedabipkgdiff.py.in (FEDABIPKGDIFF_TEST_SPECS):
6138 Rename filename for test4. Add two new test cases.
6139 (run_fedabipkgdiff_tests): Remove semicolon and trailing
6142 (ensure_output_dir_created): Likewise.
6143 * tools/fedabipkgdiff: Require some new modules.
6145 (PkgInfo): Renamed to ComparisonHalf.
6146 (match_nvr): New method to determine if a string matches format
6148 (match_nvra): New method to determine if a string matches format
6150 (is_rpm_file): New method to guess if a file is a RPM file.
6151 (RPM.is_peer): New method to determine if current RPM is a peer
6153 (RPM.filename): Use Koji module API to construct the filename.
6154 (RPM.nvra): Get nvra from filename instead of constructing
6155 manually that is duplicated with Koji module API.
6156 (RPMCollection): New class to represent a set of RPMs.
6157 (generate_pkg_info_pair_for_abipkgdiff): New method working as a
6158 generator to yeild comparison halves for running abipkgdiff.
6159 (Brew.getRPM): Fix string format with incorrect argument.
6160 (Brew.select_rpms_from_a_build): Return instance of
6162 (abipkgdiff): If there is no debuginfo or development package,
6163 just ignore it and leave a warning. If --error-on-warning is
6164 specified, raise an exception instead. Arguments are modified
6165 to represent the new name ComparisonHalf, and relative docstring
6167 (magic_construct): Removed.
6168 (run_abipkgdiff): Rewrite.
6169 (make_rpms_usable_for_abipkgdiff): Removed.
6170 (diff_local_rpm_with_latest_rpm_from_koji): Rewrite by using
6172 (diff_latest_rpms_based_on_distros): Likewise.
6173 (diff_two_nvras_from_koji): Likewise.
6174 (diff_from_two_rpm_files): New method to compare two local RPMs.
6175 (build_commandline_args_parser): Add new option
6177 (main): Add support to compare local RPMs.
6179 2016-12-12 Dodji Seketeli <dodji@redhat.com>
6181 Fix template_decl::hash::operator()
6182 * src/abg-hash.cc (template_decl::hash::operator()): Combine the
6183 contribution of the qualified name to the contribution of the type
6186 2016-12-09 Dodji Seketeli <dodji@redhat.com>
6188 Fix aborting when reading .foo symbols from a ppc64 binary
6189 * abg-dwarf-reader.cc (read_context::find_opd_section): Fix
6191 (read_context::load_symbol_maps): If for a given function entry
6192 point (that we got by looking at the ".opd" section for a given
6193 function pointer value) we already had an entry in the
6194 function_entry_address -> symbol, maybe it means that the previous
6195 entry that we had was from an entry in the symbol table which
6196 value was directly the entry point address of a function. In that
6197 case, if the name of the symbol is "foo", the name of the symbol
6198 which value is directly the entry point address is ".foo". What
6199 we do in this case is that we just keep the reference to the "foo"
6200 symbol in the function_entry_address -> symbol map.
6201 (read_context::address_is_in_opd_section): Define new member
6203 * tests/data/test-diff-pkg/gmp-4.3.1-10.el6.ppc64.rpm: New test input.
6204 * tests/data/test-diff-pkg/gmp-4.3.1-7.el6_2.2.ppc64.rpm: Likewise.
6205 * tests/data/test-diff-pkg/gmp-debuginfo-4.3.1-10.el6.ppc64.rpm: Likewise.
6206 * tests/data/test-diff-pkg/gmp-debuginfo-4.3.1-7.el6_2.2.ppc64.rpm: Likewise.
6207 * tests/data/test-diff-pkg/gmp-4.3.1-7.el6_2.2.ppc64--gmp-4.3.1-10.el6.ppc64-report-0.txt:
6208 New test reference output.
6209 * tests/data/Makefile.am: Add the new test input and reference
6210 output to source distribution.
6211 * tests/test-diff-pkg.cc (in_out_specs): Add the new test inputs
6212 and reference output to the set of inputs that are compared.
6214 2016-12-05 Dodji Seketeli <dodji@redhat.com>
6216 Bug 20927 - Segfault when $HOME is not set
6217 * src/abg-tools-utils.cc
6218 (get_default_user_suppression_file_path): Handle the case where
6219 the HOME environment variable is not set.
6220 * tools/abipkgdiff.cc (package::extracted_packages_parent_dir):
6221 Likewise. When $HOME is empty set then use $TMPDIR. If it's
6222 empty too then use "/tmp".
6224 2016-12-02 Dodji Seketeli <dodji@redhat.com>
6226 Bug 20887 - Show relative change of offsets
6227 * doc/manuals/abidiff.rst: Document the new
6228 --no-show-relative-offset-changes.
6229 * doc/manuals/abipkgdiff.rst: Likewise.
6230 * include/abg-comparison.h
6231 (diff_context::show_relative_offset_changes): New accessors.
6232 * include/abg-ir.h ({set,get}_data_member_offset): Return uint64_t
6233 instead of the less portable size_t.
6234 * src/abg-comparison.cc
6235 (diff_context::priv::show_relative_offset_changes_): New data
6237 (dif_context::show_relative_offset_changes): Define accessor.
6238 (maybe_show_relative_offset_change): Define new function.
6239 (represent): In the overload for var_diff, call the new
6240 maybe_show_relative_offset_change.
6241 (report_size_and_alignment_changes): If the size of the type
6242 didn't change then say it now.
6243 * src/abg-ir.cc (set_data_member_offset, get_data_member_offset):
6244 Take or return a uint64_t instead of a size_t.
6245 * tools/abidiff.cc (options::show_relative_offset_changes): New
6247 (options::options): Initialize it.
6248 (display_usage): Display help string for the new
6249 --no-show-relative-offset-changes.
6250 (parse_command_line): Parse the new
6251 --no-show-relative-offset-changes options.
6252 (set_diff_context_from_opts): Set the
6253 "show-relative-offset-changes" flag according to the new option.n
6254 * tools/abipkgdiff.cc (options::show_relative_offset_changes): New
6256 (options::options): Initialize it.
6257 (display_usage): Add help string for the new
6258 --no-show-relative-offset-changes option.
6259 (set_diff_context_from_opts): Set the
6260 "show-relative-offset-changes" flag according to the new option.
6261 (parse_command_line): Parse the new command line option.
6262 * tests/data/test-diff-dwarf/test40-report-0.txt: Add new
6264 * tests/data/test-diff-dwarf/test40-v0.c: Source code of the first
6266 * tests/data/test-diff-dwarf/test40-v1.c: Source code of the
6268 * tests/data/test-diff-dwarf/libtest40-v0.so: New first test binary.
6269 * tests/data/test-diff-dwarf/libtest40-v1.so: New second test binary.
6270 * tests/test-diff-dwarf.cc (in_out_spec): Add the new test
6271 binaries above to the set of binaries that are compared.
6272 * tests/data/Makefile.am: Add the new test material to source
6274 * tests/data/test-abicompat/test7-fn-changed-report-0.txt: Adjust.
6275 * tests/data/test-abidiff/test-PR18791-report0.txt: Likewise.
6276 * tests/data/test-abidiff/test-enum0-report.txt: Likewise.
6277 * tests/data/test-abidiff/test-enum1-report.txt: Likewise.
6278 * tests/data/test-abidiff/test-struct1-report.txt: Likewise.
6279 * tests/data/test-diff-dwarf/test0-report.txt: Likewise.
6280 * tests/data/test-diff-dwarf/test1-report.txt: Likewise.
6281 * tests/data/test-diff-dwarf/test10-report.txt: Likewise.
6282 * tests/data/test-diff-dwarf/test11-report.txt: Likewise.
6283 * tests/data/test-diff-dwarf/test13-report.txt: Likewise.
6284 * tests/data/test-diff-dwarf/test15-enum-report.txt: Likewise.
6285 * tests/data/test-diff-dwarf/test27-local-base-diff-report.txt: Likewise.
6286 * tests/data/test-diff-dwarf/test32-fnptr-changes-report-0.txt: Likewise.
6287 * tests/data/test-diff-dwarf/test33-fnref-changes-report-0.txt: Likewise.
6288 * tests/data/test-diff-dwarf/test38-union-report-0.txt: Likewise.
6289 * tests/data/test-diff-dwarf/test4-report.txt: Likewise.
6290 * tests/data/test-diff-dwarf/test5-report.txt: Likewise.
6291 * tests/data/test-diff-dwarf/test6-report.txt: Likewise.
6292 * tests/data/test-diff-dwarf/test8-report.txt: Likewise.
6293 * tests/data/test-diff-filter/test0-report.txt: Likewise.
6294 * tests/data/test-diff-filter/test01-report.txt: Likewise.
6295 * tests/data/test-diff-filter/test1-report.txt: Likewise.
6296 * tests/data/test-diff-filter/test13-report.txt: Likewise.
6297 * tests/data/test-diff-filter/test16-report-2.txt: Likewise.
6298 * tests/data/test-diff-filter/test16-report.txt: Likewise.
6299 * tests/data/test-diff-filter/test17-0-report.txt: Likewise.
6300 * tests/data/test-diff-filter/test17-1-report.txt: Likewise.
6301 * tests/data/test-diff-filter/test18-report.txt: Likewise.
6302 * tests/data/test-diff-filter/test19-enum-report-1.txt: Likewise.
6303 * tests/data/test-diff-filter/test2-report.txt: Likewise.
6304 * tests/data/test-diff-filter/test23-redundant-fn-parm-change-report-0.txt:
6306 * tests/data/test-diff-filter/test24-compatible-vars-report-1.txt:
6308 * tests/data/test-diff-filter/test25-cyclic-type-report-0.txt:
6310 * tests/data/test-diff-filter/test25-cyclic-type-report-1.txt:
6312 * tests/data/test-diff-filter/test26-qualified-redundant-node-report-0.t:
6314 * tests/data/test-diff-filter/test26-qualified-redundant-node-report-1.txt:
6316 * tests/data/test-diff-filter/test27-redundant-and-filtered-children-nodes-report-1.txt:
6318 * tests/data/test-diff-filter/test27-redundant-and-filtered-children-nodes-report-2.txt:
6320 * tests/data/test-diff-filter/test29-finer-redundancy-marking-report-0.txt:
6322 * tests/data/test-diff-filter/test3-report.txt: Likewise.
6323 * tests/data/test-diff-filter/test30-pr18904-rvalueref-report0.txt:
6325 * tests/data/test-diff-filter/test30-pr18904-rvalueref-report1.txt:
6327 * tests/data/test-diff-filter/test31-pr18535-libstdc++-report-0.txt:
6329 * tests/data/test-diff-filter/test31-pr18535-libstdc++-report-1.txt:
6331 * tests/data/test-diff-pkg/libICE-1.0.6-1.el6.x86_64.rpm--libICE-1.0.9-2.el7.x86_64.rpm-report-0.txt: Likewise.
6332 * tests/data/test-diff-pkg/libsigc++-2.0-0c2a_2.4.0-1_amd64--libsigc++-2.0-0v5_2.4.1-1ubuntu2_amd64-report-0.txt: Likewise.
6333 * tests/data/test-diff-pkg/tbb-4.1-9.20130314.fc22.x86_64--tbb-4.3-3.20141204.fc23.x86_64-report-0.txt: Likewise.
6334 * tests/data/test-diff-pkg/tbb-4.1-9.20130314.fc22.x86_64--tbb-4.3-3.20141204.fc23.x86_64-report-1.txt: Likewise.
6335 * tests/data/test-diff-suppr/test0-type-suppr-report-0.txt: Likewise.
6336 * tests/data/test-diff-suppr/test0-type-suppr-report-3.txt: Likewise.
6337 * tests/data/test-diff-suppr/test0-type-suppr-report-5.txt: Likewise.
6338 * tests/data/test-diff-suppr/test0-type-suppr-report-7.txt: Likewise.
6339 * tests/data/test-diff-suppr/test1-typedef-suppr-report-0.txt: Likewise.
6340 * tests/data/test-diff-suppr/test1-typedef-suppr-report-2.txt: Likewise.
6341 * tests/data/test-diff-suppr/test10-changed-parm-c-report-0.txt: Likewise.
6342 * tests/data/test-diff-suppr/test2-struct-suppr-report-0.txt: Likewise.
6343 * tests/data/test-diff-suppr/test23-alias-filter-report-0.txt: Likewise.
6344 * tests/data/test-diff-suppr/test23-alias-filter-report-2.txt: Likewise.
6345 * tests/data/test-diff-suppr/test3-struct-suppr-report-0.txt: Likewise.
6346 * tests/data/test-diff-suppr/test3-struct-suppr-report-1.txt: Likewise.
6347 * tests/data/test-diff-suppr/test3-struct-suppr-report-2.txt: Likewise.
6348 * tests/data/test-diff-suppr/test30-report-0.txt: Likewise.
6349 * tests/data/test-diff-suppr/test4-local-suppr-report-0.txt: Likewise.
6350 * tests/data/test-diff-suppr/test4-local-suppr-report-1.txt: Likewise.
6351 * tests/data/test-diff-suppr/test5-fn-suppr-report-0.txt: Likewise.
6352 * tests/data/test-diff-suppr/test5-fn-suppr-report-1.txt: Likewise.
6353 * tests/data/test-diff-suppr/test5-fn-suppr-report-2.txt: Likewise.
6354 * tests/data/test-diff-suppr/test5-fn-suppr-report-3.txt: Likewise.
6355 * tests/data/test-diff-suppr/test5-fn-suppr-report-4.txt: Likewise.
6356 * tests/data/test-diff-suppr/test5-fn-suppr-report-5.txt: Likewise.
6357 * tests/data/test-diff-suppr/test6-fn-suppr-report-0-1.txt: Likewise.
6358 * tests/data/test-diff-suppr/test6-fn-suppr-report-0.txt: Likewise.
6359 * tests/data/test-diff-suppr/test6-fn-suppr-report-1.txt: Likewise.
6360 * tests/data/test-diff-suppr/test6-fn-suppr-report-2.txt: Likewise.
6361 * tests/data/test-diff-suppr/test6-fn-suppr-report-3.txt: Likewise.
6362 * tests/data/test-diff-suppr/test7-var-suppr-report-0.txt: Likewise.
6363 * tests/data/test-diff-suppr/test7-var-suppr-report-1.txt: Likewise.
6364 * tests/data/test-diff-suppr/test7-var-suppr-report-2.txt: Likewise.
6365 * tests/data/test-diff-suppr/test7-var-suppr-report-3.txt: Likewise.
6366 * tests/data/test-diff-suppr/test7-var-suppr-report-4.txt: Likewise.
6367 * tests/data/test-diff-suppr/test7-var-suppr-report-7.txt: Likewise.
6368 * tests/data/test-diff-suppr/test7-var-suppr-report-8.txt: Likewise.
6370 2016-12-02 Dodji Seketeli <dodji@redhat.com>
6372 Rename tests/update-test-read-dwarf-output.py
6373 * tests/update-test-output.py: renamed
6374 tests/update-test-read-dwarf-output.py into this. Update its
6375 comments. Make this script executable.
6377 2016-11-30 Dodji Seketeli <dodji@redhat.com>
6379 Add tests/data/test-diff-suppr/test33-report-0.txt to tarball
6380 * tests/data/Makefile.am: Add test-diff-suppr/test33-report-0.txt.
6382 2016-11-30 Dodji Seketeli <dodji@redhat.com>
6384 Bug 20670 - abipkgdiff aborts if $XDG_CACHE_HOME does not exist
6385 * tools/abipkgdiff.cc (package::extracted_packages_parent_dir):
6386 Ensure that the cache directory is created, even when
6387 XDG_CACHE_HOME is set. Also, remove the now useless "using
6388 abigail::tools_utils::get_random_number_as_string" statement.
6390 2016-11-09 Dodji Seketeli <dodji@redhat.com>
6392 Very light speed improvements
6393 * include/abg-comp-filter.h (has_harmless_name_change): Pass smart
6394 pointers by reference.
6395 * src/abg-comp-filter.cc (access_changed)
6396 (function_name_changed_but_not_symbol)
6397 (non_static_data_member_type_size_changed)
6398 (static_data_member_type_size_changed, is_compatible_change)
6399 (decl_name_changed, has_harmless_name_change): Pass smart
6400 pointers by reference.
6401 * include/abg-ir.h (decl_base::set_context_rel): Take a bare
6402 pointer, not a smart pointer.
6403 * src/abg-ir.cc (decl_base::priv::context_): Make this data member
6404 be a naked pointer, not a smart pointer.
6405 (decl_base::priv::priv): Initialize it.
6406 (decl_base::priv::~priv): New constructor.
6407 (decl_base::{get_context_rel, set_scope}): Adjust.
6408 (class_decl::method_decl::{method_decl, set_scope}): Likewise.
6409 (equals): In the overload for var_decl, compare the type of the
6410 var first as that might be faster (to detect var_decls with
6411 different types) in the general case where types are
6414 2016-11-08 Dodji Seketeli <dodji@redhat.com>
6416 Introduce on-the-fly type canonicalization
6417 * include/abg-ir.h (environment::do_on_the_fly_canonicalization):
6418 Declare new member functions.
6419 ({type_base, function_type}::priv_): Make this public so that
6420 static non-member functions defined in abg-ir.cc can access it.
6422 (environment::priv::do_on_the_fly_canonicalization_): New data
6424 (environment::priv::priv): Initialize it.
6425 (environment::do_on_the_fly_canonicalization): Define new member
6427 (type_base::get_canonical_type_for): Trigger on-the-fly
6428 canonicalization during comparison of the type being canonicalized
6429 and an already canonicalized type.
6430 (types_are_being_compared, maybe_propagate_canonical_type): Define
6431 new static functions.
6432 (equals): In overloads for class_decl and function_type, call
6433 maybe_propagate_canonical_type when the two types compare equal.
6434 * tests/data/test-diff-pkg/tbb-4.1-9.20130314.fc22.x86_64--tbb-4.3-3.20141204.fc23.x86_64-report-0.txt:
6436 * tests/data/test-read-dwarf/test9-pr18818-clang.so.abi: Likewise.
6438 2016-11-06 Dodji Seketeli <dodji@redhat.com>
6440 Fix pretty representation of array types
6441 * include/abg-ir.h (array_type_def::is_infinite): Fix indentation.
6442 * src/abg-ir.cc (qualified_type_def::build_name): An empty set of
6443 sub-ranges for a vector is represented by "[]".
6444 (array_type_def::is_infinite): If a vector has no sub-range, that
6445 means it has an infinite size. Adjust comment.
6446 * tests/data/test-diff-filter/test33-report-0.txt: Adjust.
6447 * tests/data/test-read-dwarf/libtest23.so.abi: Adjust.
6448 * tests/data/test-read-dwarf/libtest24-drop-fns-2.so.abi: Adjust.
6449 * tests/data/test-read-dwarf/libtest24-drop-fns.so.abi: Adjust.
6450 * tests/data/test-read-dwarf/test10-pr18818-gcc.so.abi: Adjust.
6451 * tests/data/test-read-dwarf/test11-pr18828.so.abi: Adjust.
6452 * tests/data/test-read-dwarf/test14-pr18893.so.abi: Adjust.
6453 * tests/data/test-read-dwarf/test19-pr19023-libtcmalloc_and_profiler.so.abi:
6455 * tests/data/test-read-dwarf/test22-pr19097-libstdc++.so.6.0.17.so.abi:
6457 * tests/data/test-read-dwarf/test9-pr18818-clang.so.abi: Adjust.
6459 2016-10-11 Dodji Seketeli <dodji@redhat.com>
6461 Support naming typedef and use them to speed up type canonicalization
6462 * include/abg-ir.h (typedef_decl_wptr): New typedef.
6463 (class_decl::{g,s}et_naming_typedef): Declare new member
6465 * src/abg-dwarf-reader.cc (build_typedef_type): When the
6466 underlying type of a typedef is an anonymous class, the class type
6467 is said to have a naming typedef.
6468 * src/abg-ir.cc (is_anonymous_type): An anonymous class that has
6469 a naming typedef is said to not be anonymous anymore.
6470 (class_decl::priv::naming_typedef): New data member.
6471 (class_decl::{g,s}et_naming_typedef): Define new member functions.
6472 (class_decl::get_pretty_representation): When called for internal
6473 purposes (e.g, for type canonicalization) compute the pretty
6474 representation of the class by using its typedef name, when class
6475 is anonymous and has a naming typedef.
6476 * src/abg-reader.cc (build_class_decl): Read the new
6477 "naming-typedef-id" attribute.
6478 * src/abg-writer.cc (write_naming_typedef): New function.
6479 (write_class_decl_opening_tag): Use the new write_naming_typedef
6481 * tests/data/test-read-dwarf/libtest23.so.abi: Adjust.
6482 * tests/data/test-read-dwarf/libtest24-drop-fns-2.so.abi:
6484 * tests/data/test-read-dwarf/libtest24-drop-fns.so.abi: Likewise.
6485 * tests/data/test-read-dwarf/test10-pr18818-gcc.so.abi: Likewise.
6486 * tests/data/test-read-dwarf/test11-pr18828.so.abi: Likewise.
6487 * tests/data/test-read-dwarf/test12-pr18844.so.abi: Likewise.
6488 * tests/data/test-read-dwarf/test13-pr18894.so.abi: Likewise.
6489 * tests/data/test-read-dwarf/test14-pr18893.so.abi: Likewise.
6490 * tests/data/test-read-dwarf/test15-pr18892.so.abi: Likewise.
6491 * tests/data/test-read-dwarf/test16-pr18904.so.abi: Likewise.
6492 * tests/data/test-read-dwarf/test21-pr19092.so.abi: Likewise.
6493 * tests/data/test-read-dwarf/test22-pr19097-libstdc++.so.6.0.17.so.abi:
6495 * tests/data/test-read-dwarf/test9-pr18818-clang.so.abi: Likewise.
6497 2016-11-02 Dodji Seketeli <dodji@redhat.com>
6499 Implement de-duplication for types and decls at DWARF loading time
6500 * include/abg-ir.h (method_type::priv_): Introduce new pimpl
6502 (method_type::class_type_): Move this into the pimpl idiom.
6503 (method_type::method_type): Take a new is_const flag.
6504 (method_type::get_class_type): Make this method out-of-line.
6505 (method_type::{s,g}et_is_const): Declare new member functions.
6506 (get_method_type_name): Declare this function as a friend of
6507 the method_type type.
6508 * src/abg-dwarf-reader.cc: Include the new abg-ir-priv.h and
6510 (typedef die_tu_map_type): Fix comment.
6511 (typedef die_istring_map_type): New typedef.
6512 (class read_context::die_source_dependant_container_set): New
6514 (read_context::{die_qualified_name_maps_, die_pretty_repr_maps_,
6515 die_pretty_type_repr_maps_}): Define new data members.
6516 (read_context::{get_die_qualified_name, get_die_qualified_name,
6517 get_die_qualified_type_name, get_die_pretty_type_representation,
6518 get_die_pretty_representation, lookup_type_artifact_from_die,
6519 lookup_artifact_from_die, lookup_artifact_from_die_representation,
6520 associate_die_to_artifact_by_repr,
6521 associate_die_to_artifact_by_repr_internal,
6522 lookup_type_from_die}): Define new member functions.
6523 (read_context::lookup_type_from_die_offset): Fix comment.
6524 (get_parent_die, get_scope_die, die_is_decl)
6525 (die_is_namespace, die_is_unspecified, die_is_void_type)
6526 (die_is_pointer_type, die_is_reference_type)
6527 (die_is_pointer_or_reference_type, die_is_class_type)
6528 (die_has_object_pointer, die_this_pointer_from_object_pointer)
6529 (die_this_pointer_is_const, is_decl_tag)
6530 (die_object_pointer_is_for_const_method, die_is_at_class_scope)
6531 (die_name, die_qualified_type_name, die_qualified_decl_name)
6532 (die_qualified_name, die_qualified_type_name_empty)
6533 (die_return_and_parm_names_from_fn_type_die)
6534 (die_function_signature, die_peel_qual_ptr)
6535 (die_function_type_is_method_type, die_pretty_print_type)
6536 (die_pretty_print_decl, die_pretty_print)
6537 (build_subranges_from_array_type_die)
6538 (build_or_get_fn_decl_if_not_suppressed)
6539 (lookup_class_or_typedef_type)
6540 (lookup_class_typedef_or_enum_type_from_corpus)
6541 (is_function_for_die_a_member_of_class)
6542 (add_or_update_member_function): Define new static functions.
6543 (read_context::associate_die_to_decl): Call
6544 associate_die_to_artifact_by_repr.
6545 (read_context::{associate_die_to_type,
6546 schedule_type_for_late_canonicalization}): Take just one "die"
6547 parameter rather than taking a die offset and a die source; adjust
6549 (maybe_canonicalize_type): Likewise.
6550 (finish_member_function_reading): Take a const reference to
6552 (die_loc_and_name): Use the new die_name function.
6553 (die_is_type): Rename is_type_die into this.
6554 (build_type_decl): Take a new "where_offset" parameter. Adjust.
6555 If a type of the same name as the one for the current DIE is is
6556 already present, do not create a new type; just return the
6557 already-existing one.
6558 (build_enum_type): Take a new "where_offset" parameter. Adjust.
6559 (finish_member_function_reading): Pass two smart pointers by const
6560 reference. Assert that the type of the member function is a
6561 method_type. Some light cleanups.
6562 (add_or_update_class_type): Rename build_class_type_and_add_to_ir.
6563 If a DIE defining the same class has already been seen, then
6564 return that class; don't construct any other internal
6565 representation for the same class. Better handle the updating of
6566 member data and functions. Do not duplicate member types.
6567 (build_qualified_type, build_pointer_type_def)
6568 (build_reference_type): Support de-duplication here.
6569 (build_function_type): Likewise. Support detection and building
6570 of method type. This also supports *const* method type building.
6571 (build_array_type): Use the new
6572 build_subranges_from_array_type_die.
6573 (build_type_decl): Cleanup logic.
6574 (build_or_get_var_decl_if_not_suppressed): Renamed
6575 build_var_decl_if_not_suppressed into this. Perform
6576 de-duplication for data members.
6577 (build_function_decl): Don't set an empty source location. If the
6578 function type cannot be constructed, do not construct the function
6579 decl either. Adjust.
6580 (build_ir_node_from_die): Adjust. When building a function for a
6581 DW_TAG_subroutine_type DIE, use the new
6582 build_or_get_fn_decl_if_not_suppressed.
6583 * src/abg-ir.cc (translation_unit::bind_function_type_life_time):
6585 (strip_typedef): Adjust.
6586 (qualified_type_def::build_name): Set the prefix name of a the
6587 name of a noop qualifier to "noop-qual", just like what is done in
6588 the new die_qualified_name function.
6589 (struct method_type::priv): New priv type for the method_type
6591 (method_type::method_type): Take a new 'is_const' parameter.
6592 Adjust as the method_type is now pimpl'ed.
6593 (method_type::{get_class_type, set_is_const, get_is_const}):
6594 Define new member functions.
6595 (function_decl::get_pretty_representation_of_declarator): Better
6596 detecter of const-ness.
6597 (class_decl::insert_member_decl): Better setting of the
6599 (class_decl::method_decl::method_decl): Adjust. Deduce the
6600 const-ness of the method_decl from the const-ness of its
6602 (copy_member_function): Adjust.
6603 (set_member_is_static): Do not assume a non-nil scope anymore
6604 because member_decl can now be scope-less, at least for a little
6606 * src/abg-reader.cc (push_decl_to_current_scope): Adjust.
6607 (build_function_decl): Style adjustment. Adjust for method_type
6609 (build_function_type): Likewise. Also, support the new
6610 "method-class-id" property that flags a function type as being a
6612 * src/abg-writer.cc (write_function_decl): Style fixes.
6613 (write_function_type): Likewise. Emit a new "method-class-id"
6614 property for function type that is actually a method type. That
6615 property's value is the id of the class of the method type.
6616 * tests/data/test-diff-dwarf-abixml/test0-pr19026-libvtkIOSQL-6.1.so.1.abi: Adjust.
6617 * tests/data/test-diff-dwarf/test0-report.txt: Adjust.
6618 * tests/data/test-diff-filter/test0-report.txt: Adjust.
6619 * tests/data/test-diff-filter/test01-report.txt: Adjust.
6620 * tests/data/test-diff-filter/test30-pr18904-rvalueref-report0.txt: Adjust.
6621 * tests/data/test-diff-filter/test30-pr18904-rvalueref-report1.txt: Adjust.
6622 * tests/data/test-diff-filter/test31-pr18535-libstdc++-report-0.txt: Adjust.
6623 * tests/data/test-diff-filter/test31-pr18535-libstdc++-report-1.txt: Adjust.
6624 * tests/data/test-diff-pkg/libICE-1.0.6-1.el6.x86_64.rpm--libICE-1.0.9-2.el7.x86_64.rpm-report-0.txt: Adjust.
6625 * tests/data/test-diff-pkg/libsigc++-2.0-0c2a_2.4.0-1_amd64--libsigc++-2.0-0v5_2.4.1-1ubuntu2_amd64-report-0.txt: Adjust.
6626 * tests/data/test-diff-pkg/tbb-4.1-9.20130314.fc22.x86_64--tbb-4.3-3.20141204.fc23.x86_64-report-0.txt: Adjust.
6627 * tests/data/test-diff-pkg/tbb-4.1-9.20130314.fc22.x86_64--tbb-4.3-3.20141204.fc23.x86_64-report-1.txt: Adjust.
6628 * tests/data/test-read-dwarf/libtest23.so.abi: Adjust.
6629 * tests/data/test-read-dwarf/libtest24-drop-fns-2.so.abi: Adjust.
6630 * tests/data/test-read-dwarf/libtest24-drop-fns.so.abi: Adjust.
6631 * tests/data/test-read-dwarf/test10-pr18818-gcc.so.abi: Adjust.
6632 * tests/data/test-read-dwarf/test11-pr18828.so.abi: Adjust.
6633 * tests/data/test-read-dwarf/test12-pr18844.so.abi: Adjust.
6634 * tests/data/test-read-dwarf/test13-pr18894.so.abi: Adjust.
6635 * tests/data/test-read-dwarf/test14-pr18893.so.abi: Adjust.
6636 * tests/data/test-read-dwarf/test15-pr18892.so.abi: Adjust.
6637 * tests/data/test-read-dwarf/test16-pr18904.so.abi: Adjust.
6638 * tests/data/test-read-dwarf/test17-pr19027.so.abi: Adjust.
6639 * tests/data/test-read-dwarf/test18-pr19037-libvtkRenderingLIC-6.1.so.abi: Adjust.
6640 * tests/data/test-read-dwarf/test19-pr19023-libtcmalloc_and_profiler.so.abi: Adjust.
6641 * tests/data/test-read-dwarf/test20-pr19025-libvtkParallelCore-6.1.so.abi: Adjust.
6642 * tests/data/test-read-dwarf/test21-pr19092.so.abi: Adjust.
6643 * tests/data/test-read-dwarf/test22-pr19097-libstdc++.so.6.0.17.so.abi: Adjust.
6644 * tests/data/test-read-dwarf/test8-qualified-this-pointer.so.abi: Adjust.
6645 * tests/data/test-read-dwarf/test9-pr18818-clang.so.abi: Adjust.
6647 2016-11-01 Dodji Seketeli <dodji@redhat.com>
6649 Setup per-corpus type maps indexed by type names
6650 * include/abg-corpus.h (corpus::priv_): Make this public so that
6651 functions from outside of the class can access it. These
6652 functions are meant to be used only by code that is *inside*
6653 libabigail.so, though.
6654 * src/abg-corpus-priv.h: New file.
6655 * src/abg-corpus.cc: Include the new abg-corpus-priv.h file.
6656 (struct regex_t_deleter): Move this to abg-sptr-utils.h.
6657 (build_sptr<regex_t>): Move the declaration of this function
6658 template specialization to abg-sptr-utils.h and its definition to
6660 (typedef regex_t_sptrs_type, typedef str_var_ptr_map_type)
6661 (struct corpus::exported_decls_builder::priv, struct
6662 corpus::priv): Move these declarations to the new
6664 (maybe_update_types_lookup_map): Define overloads of this (one per
6666 (lookup_{basic, class, enum, typedef, class_or_typedef,
6667 class_typedef_or_enum, qualified, pointer, reference, array,
6668 function}_type): Define new functions.
6669 * include/abg-ir.h (typedef istring_type_base_wptr_map_type)
6670 (typedef istring_type_or_decl_base_sptr_map_type): Declare new
6672 (class_decl::find_member_function_from_signature): Declare new
6674 * src/abg-ir.cc: Include the new abg-corpus-priv.h file.
6675 (maybe_update_types_lookup_map): Remove this initial function.
6676 There are now new overloads in abg-corpus.cc for it.
6677 (scope_decl::{add_member_decl, insert_member_decl}): Adjust.
6678 (class_decl::{set_is_declaration_only, find_member_function,
6679 add_member_function}): Adjust.
6680 (class_decl::find_member_function_from_signature): Define new
6682 * include/abg-sptr-utils.h (struct regex_t_deleter): Declare new
6684 (build_sptr<regex_t>): New build function template
6686 * src/abg-sptr-utils.cc: New file.
6687 * src/Makefile.am: Add src/abg-sptr-utils.cc and
6688 src/abg-corpus-priv.h to the build system.
6690 2016-11-01 Dodji Seketeli <dodji@redhat.com>
6692 Allow pretty printing function decls for internal purposes
6694 (function_decl::get_pretty_representation_of_declarator): Take an
6697 (function_decl::get_pretty_representation_of_declarator): Take an
6699 (function_decl::get_pretty_representation): Pass the "internal"
6700 flag to the function
6701 function_decl::get_pretty_representation_of_declarator.
6702 (function_decl::parameter::get_type_name): Better handle variadic
6704 (function_decl::parameter::get_type_pretty_representation):
6707 2016-11-26 Dodji Seketeli <dodji@redhat.com>
6709 Make bash completion files non-executable
6710 * bash-completion/abicompat: Make this be non-executable.
6711 * bash-completion/abidiff: Likewise.
6712 * bash-completion/abidw: Likewise.
6713 * bash-completion/abilint: Likewise.
6714 * bash-completion/abinilint: Likewise.
6715 * bash-completion/abipkgdiff: Likewise.
6716 * bash-completion/abisym: Likewise.
6717 * bash-completion/fedabipkgdiff: Likewise.
6719 2016-11-26 Dodji Seketeli <dodji@redhat.com>
6721 A suppressed diff node implies suppressing all equivalent nodes too
6722 *class of equivalence* is visited once. This is not only a way to
6723 prevent infinite loops while visiting the graph, but also an
6724 optimization as it avoids walking two equivalent diff nodes.
6725 But then it can happen that we forget to categorize some diff nodes
6726 inside a given class of equivalence, even though we categorized some
6728 This patch makes it so that when a diff node inside a class of
6729 equivalence is categorized as SUPPRESSED, the canonical diff node of
6730 that class of equivalence is categorized as SUPPRESSED too. That way,
6731 to know if a diff node is suppressed, we just need to look at its
6732 canonical diff node.
6733 While doing this, I noticed that abidiff and abipkgdiff are not
6734 dropping private types from libabigail's internal representation, even
6735 though the Library now has that capability. The patch fixes that.
6736 But then the patch adds a --dont-drop-private-types option to abidiff
6737 to avoid dropping those private types from the IR, so that regression
6738 tests can make sure that a suppressed diff node implies suppression
6739 all equivalent nodes too.
6740 * doc/manuals/abidiff.rst b/doc/manuals/abidiff.rst: Document the
6741 new --dont-drop-private-types option.
6742 * src/abg-comparison.cc (diff::is_filtered_out): If the canonical
6743 type was suppressed then the current diff node is filtered out.
6744 (suppression_categorization_visitor::visit_{begin,end}):
6745 Categorized the canonical node as SUPPRESSED if the current node
6747 * tools/abidiff.cc (options::drop_private_types): New data member.
6748 (options::options): Initialize it.
6749 (display_usage): Add new help string for the new
6750 --dont-drop-private-types option.
6751 (parse_command_line): Parse the new --dont-drop-private-types
6753 (set_suppressions): Generate suppression specification from header
6754 directories given in parameter and stick them to the read context.
6755 * tools/abipkgdiff.cc (compare): Likewise.
6756 * tests/data/test-diff-suppr/libtest34-v0.so: New test input.
6757 * tests/data/test-diff-suppr/libtest34-v1.so: Likewise.
6758 * tests/data/test-diff-suppr/test34-report-0.txt: New reference
6760 * tests/data/test-diff-suppr/test34-v0.c: Source code for the new
6762 * tests/data/test-diff-suppr/test34-v1.c: Likewise.
6763 * tests/data/test-diff-suppr/test34-priv-include-dir-v0/test34-priv-include-v0.h:
6765 * tests/data/test-diff-suppr/test34-priv-include-dir-v1/test34-priv-include-v1.h:
6767 * tests/data/test-diff-suppr/test34-pub-include-dir-v0/test34-pub-include-v0.h:
6769 * tests/data/test-diff-suppr/test34-pub-include-dir-v1/test34-pub-include-v1.h:
6771 * tests/data/Makefile.am: Add new test input material above to
6772 source distribution.
6773 * tests/test-diff-suppr.cc (in_out_spec): Compare the two new test
6774 library provided. Add --dont-drop-private-types to test30*.
6775 signed-off-by: Dodji Seketeli <dodji@redhat.com>
6777 2016-11-26 Dodji Seketeli <dodji@redhat.com>
6779 Forgot to consider libtest33-v{0,1}.so in test-diff-suppr.cc
6780 * tests/data/test-diff-suppr/test33-report-0.txt: New refernce report.
6781 * tests/test-diff-suppr.cc (in_out_specs): Compare libtest33-v0.so
6782 and libtest33-v1.so.
6784 2016-11-24 Dodji Seketeli <dodji@redhat.com>
6786 Bump version number to 1.0.rc7
6789 2016-11-24 Dodji Seketeli <dodji@redhat.com>
6791 Update website for 1.0.rc6
6792 * doc/website/mainpage.txt: Update for 1.0.rc6 release
6794 2016-11-23 Dodji Seketeli <dodji@redhat.com>
6796 Update NEWS and ChangeLog for 1.0.rc6
6797 * ChangeLog: Update this automatically using "make
6799 * NEWS: update this by editing the output of 'git shortlog
6800 libabigail-1.0.rc5..HEAD'.
6802 2016-11-24 Dodji Seketeli <dodji@redhat.com>
6804 Avoid using size_t to get DWARF data
6805 * src/abg-dwarf-reader.cc (die_size_in_bits, die_location_expr):
6806 Take uint64_t rather than size_t and adjust.
6807 (expr_result::const_value_): Make this be int64_t rather than
6809 (expr_result::expr_result): Take int64_t rather than ssize_t.
6810 (expr_result::const_value): Return int64_t rather than ssize_t.
6811 (expr_result::{operator(), operator=, operator+=}): Make these
6812 operators return or take int64_t.
6814 (op_pushes_constant_value, op_manipulates_stack)
6815 (op_is_arith_logic, op_is_control_flow)
6816 (eval_last_constant_dwarf_sub_expr, die_member_offset)
6817 (die_virtual_function_index): Take
6818 uint64_t rather than size_t, or int64_t rather than ssize_t.
6819 (finish_member_function_reading, build_class_type_and_add_to_ir)
6820 (build_union_type_and_add_to_ir): Adjust.
6822 2016-11-24 Dodji Seketeli <dodji@redhat.com>
6824 Fix a compiler warning issued by GCC 6.2.1
6825 * src/abg-dwarf-reader.cc (find_import_unit_point_between_dies):
6826 Parameter 5 of find_import_unit_point_between_dies is not of type
6829 2016-11-24 Dodji Seketeli <dodji@redhat.com>
6831 Fix offset type mismatch
6832 * src/abg-dwarf-reader.cc (die_member_offset): The last two
6833 parameters of die_unsigned_constant_attribute must be of type
6836 2016-11-24 Dodji Seketeli <dodji@redhat.com>
6838 Fix indentation in abg-writer.cc
6839 * src/abg-writer.cc (write_union_decl_opening_tag): Fix
6842 2016-11-23 Dodji Seketeli <dodji@redhat.com>
6844 Support reading data member offset from DW_AT_bit_offset
6845 * src/abg-dwarf-reader.cc (die_member_offset): Better comments.
6846 Support reading the bit offset also from the DW_AT_bit_offset
6847 attribute when it's present. Make sure this always returns a
6849 (build_class_type_and_add_to_ir): No need to multiply (by 8) the
6850 value returned by die_member_offset anymore because it's now in
6852 * tests/data/test-diff-filter/test30-pr18904-rvalueref-report0.txt: Adjust.
6853 * tests/data/test-diff-filter/test30-pr18904-rvalueref-report1.txt: Adjust.
6854 * tests/data/test-read-dwarf/test1.abi: Adjust.
6855 * tests/data/test-read-dwarf/test11-pr18828.so.abi: Adjust.
6856 * tests/data/test-read-dwarf/test12-pr18844.so.abi: Adjust.
6857 * tests/data/test-read-dwarf/test13-pr18894.so.abi: Adjust.
6858 * tests/data/test-read-dwarf/test14-pr18893.so.abi: Adjust.
6859 * tests/data/test-read-dwarf/test15-pr18892.so.abi: Adjust.
6860 * tests/data/test-read-dwarf/test16-pr18904.so.abi: Adjust.
6861 * tests/data/test-read-dwarf/test17-pr19027.so.abi: Adjust.
6862 * tests/data/test-read-dwarf/test19-pr19023-libtcmalloc_and_profiler.so.abi:
6864 * tests/data/test-read-dwarf/test21-pr19092.so.abi: Adjust.
6865 * tests/data/test-read-dwarf/test22-pr19097-libstdc++.so.6.0.17.so.abi:
6868 2016-11-23 Dodji Seketeli <dodji@redhat.com>
6870 Lexicographically sort union data members in change reports
6871 * src/abg-comparison.cc (data_member_comp::operator()): Data
6872 members with the same offset are sorted lexicographically, by
6873 taking their name into account.
6874 * tests/data/test-diff-filter/test30-pr18904-rvalueref-report0.txt:
6876 * tests/data/test-diff-filter/test30-pr18904-rvalueref-report1.txt:
6879 2016-11-23 Dodji Seketeli <dodji@redhat.com>
6881 Better diagnostics when wget is missing
6882 * configure.ac: When wget is missing then make the disabling of
6883 the building of the fedabipkgdiff tool show up in the
6884 configuration summary and emit a notice.
6886 2016-11-15 Dodji Seketeli <dodji@redhat.com>
6889 * include/abg-fwd.h (class_or_union, union_decl): Forward-declare
6891 (is_class_or_union_type, is_union_type): Declare new functions.
6892 * include/abg-ir.h (method_type::class_type_): Make this be of
6893 class_or_union_wptr type.
6894 (method_type::method_type): Make the class_type parameter be of
6895 class_or_union_wptr type.
6896 (method_type::{g,s}et_class_type): Take or return a
6897 class_or_union_sptr.
6898 (member_base, method_decl, member_function_template)
6899 (member_class_template, member_base::hash)
6900 (member_function_template::hash, member_class_template::hash):
6901 Take these class types out of the class_decl scope.
6902 (is_method_decl): Adjust.
6903 (operator==, opertor!=): Adjust overloads for
6904 member_function_template_sptr and member_class_template_sptr.
6905 (class class_or_union): Declare new type.
6906 (class class_decl): Make this class inherit class_or_union class.
6907 (class_decl::{add_member_decl, insert_member_decl,
6908 remove_member_decl, set_size_in_bits, get_size_in_bits,
6909 get_alignment_in_bits, set_alignment_in_bits,
6910 get_is_declaration_only, set_is_declaration_only,
6911 set_definition_of_declaration, get_definition_of_declaration,
6912 get_earlier_declaration, set_earlier_declaration,
6913 insert_member_type, add_member_type, remove_member_type,
6914 get_member_type, find_member_type, add_data_member,
6915 get_data_members, find_data_member, get_non_static_data_members,
6916 add_member_function, get_member_functions, find_member_function,
6917 add_member_function_template, get_member_function_templates,
6918 add_member_class_template, get_member_class_templates): Move these
6919 to the parent class class_or_union.
6920 (copy_member_function, equals): Add overloads for class_or_union.
6921 (struct class_or_union::hash): Declare new type.
6922 (class union_decl): Declare new type.
6923 (equals, copy_member_function): New overloads for class union_decl
6925 (ir_node_visitor::visit): Add new overloads for union_decl* and
6927 * src/abg-ir.cc (get_member_function_is_ctor)
6928 (set_member_function_is_ctor, get_member_function_is_dtor)
6929 (set_member_function_is_dtor, get_member_function_is_const)
6930 (set_member_function_is_const, get_member_function_vtable_offset)
6931 (set_member_function_vtable_offset)
6932 (get_member_function_is_virtual, set_member_function_is_virtual)
6933 (maybe_update_types_lookup_map, get_location)
6934 (get_method_type_name, is_at_global_scope, is_at_class_scope):
6936 (is_class_or_union_type, is_union_type): Define new functions.
6937 (type_base::get_canonical_type_for, maybe_adjust_canonical_type)
6938 (method_type::method_type, method_type::set_class_type)
6939 (function_decl::get_pretty_representation)
6940 (function_decl::get_first_non_implicit_parm)
6941 (function_decl::clone): Adjust.
6942 (equals): Adjust the overload for function_type.
6943 (struct class_or_union::priv): Define new type.
6944 (class::priv::{declaration_, definition_of_declaration_,
6945 member_types_, data_members_, non_static_data_members_,
6946 member_functions_, mem_fns_map_, member_function_templates_,
6947 member_class_templates_, is_declaration_only_}): Move these data
6948 member into class_or_union::priv.
6949 (class_priv::{mark_as_being_compared, unmark_as_being_compared,
6950 comparison_started}): Moved these member functions to
6951 class_or_union::priv.
6952 (class_or_union::{class_or_union, traverse, ~class_or_union,
6953 add_member_decl, remove_member_decl, insert_member_type,
6954 add_member_type, get_size_in_bits, remove_member_type,
6955 get_alignment_in_bits, set_alignment_in_bits, set_size_in_bits,
6956 get_is_declaration_only, set_is_declaration_only,
6957 set_definition_of_declaration, get_definition_of_declaration,
6958 get_earlier_declaration, set_earlier_declaration,
6959 get_member_types, find_member_type, add_data_member,
6960 get_data_member, find_data_member, add_member_function,
6961 get_member_functions, find_member_function,
6962 add_member_function_template, get_member_function_templates,
6963 add_member_class_template, get_member_class_templates,
6964 has_no_member, insert_member_decl, operator==}): Define new member
6966 (class_decl::{add_member_decl, remove_member_decl,
6967 insert_member_type, add_member_type, get_size_in_bits,
6968 remove_member_type, get_alignment_in_bits, set_alignment_in_bits,
6969 set_size_in_bits, get_is_declaration_only,
6970 set_is_declaration_only, set_definition_of_declaration,
6971 get_earlier_declaration, set_earlier_declaration,
6972 get_member_types, find_member_type, add_data_member,
6973 get_data_member, find_data_member, add_member_function,
6974 get_member_functions, find_member_function,
6975 add_member_function_template, get_member_function_templates,
6976 add_member_class_template, get_member_class_templates): Move these
6977 member functions into class_or_union.
6978 (class_decl::{class_decl, get_definition_of_declaration,
6979 insert_member_decl, add_member_function, has_no_base_nor_member}):
6981 (equals, copy_member_function): Define new overloads for
6983 (equals): Adjust the overload for class_decl.
6984 (method_decl::{method_decl, set_linkage_name, ~method_decl,
6985 get_type, set_scope}): Remove from the class_decl scope.
6986 (member_base::operator==, member_function_template::operator==):
6988 (member_function_template::traverse)
6989 (member_class_template::operator==)
6990 (member_class_template::traverse): Likewise.
6991 (operator==, operator!=): Adjust the overlod for
6992 member_function_template_sptr.
6993 (is_method_decl, fixup_virtual_member_function)
6994 (set_member_is_static): Adjust.
6995 (virtual_member_function_less_than::operator()): Likewise.
6996 (union_decl::{union_decl, get_pretty_representation, operator==,
6997 traverse}): Define new member functions.
6998 (equals, copy_member_function): Define new overloads for
7000 (hash_type_or_decl): Adjust.
7001 (ir_node_visitor::visit_{begin, end}): Adjust. Add new overloads
7002 for class_or_union* and union_decl*.
7003 * include/abg-comparison.h (changed_member_function_sptr)
7004 (string_member_function_sptr_map): Adjust these typedefs.
7005 (class class_or_union_diff): Declare new type.
7006 (class_diff): Adjust to make this inherit the new
7007 class_or_union_diff type.
7008 (class_diff::{get_priv, member_types_changes,
7009 data_members_changes, inserted_data_members, deleted_data_members,
7010 member_fn_tmpls_changes, member_fn_tmpls_changes,
7011 member_class_tmpls_changes}): These member functions got moved
7012 into -- and shared with -- class_or_union_diff class.
7013 (class union_diff): Declare new type.
7014 (typedef union_diff_sptr): New typedef.
7015 (compute_diff): New overload for union_diff
7016 (is_class_diff, is_union_diff): Declare new functions.
7017 * src/abg-comparison.cc (is_class_diff, is_union_diff): Define new
7019 (compute_diff_for_types): Support union_decl.
7020 (represent): Adjust.
7021 (represent_data_member): Do not show offset information for data
7022 members of unions as all union data members are at offset 0.
7023 (struct class_or_union_diff::priv): New type.
7024 (class_or_union_diff::priv::{member_type_has_changed,
7025 subtype_changed_dm, member_class_tmpl_has_changed,
7026 get_deleted_non_static_data_members_number,
7027 get_inserted_non_static_data_members_number,
7028 count_filtered_subtype_changed_dm, count_filtered_changed_dm,
7029 count_filtered_changed_mem_fns, count_filtered_inserted_mem_fns,
7030 count_filtered_deleted_mem_fns}): Define new member functions.
7031 (class_or_union_diff::{class_or_union_diff, finish_diff_type,
7032 lookup_tables_empty, lookup_tables_empty,
7033 ensure_lookup_tables_populated, allocate_priv_data, get_priv,
7034 ~class_or_union_diff, first_class_or_union, second_class_or_union,
7035 member_types_changes, member_types_changes, data_members_changes,
7036 inserted_data_members, deleted_data_members, member_fns_changes,
7037 changed_member_fns, member_fns_changes, inserted_member_fns,
7038 member_fn_tmpls_changes, member_fn_tmpls_changes,
7039 member_class_tmpls_changes, member_class_tmpls_changes,
7040 has_changes, has_local_changes, report, chain_into_hierarchy}):
7041 Define new member functions.
7042 (class_diff::priv::{member_types_changes_, data_members_changes,
7043 member_fn_tmpls_changes_, member_class_tmpls_changes_,
7044 deleted_member_types_, inserted_member_types_,
7045 changed_member_types_, sorted_changed_member_types_,
7046 deleted_data_members_, deleted_dm_by_offset_,
7047 inserted_data_members_, inserted_dm_by_offset_,
7048 subtype_changed_dm_, sorted_subtype_changed_dm_, changed_dm_,
7049 sorted_changed_dm_, deleted_member_functions_,
7050 inserted_member_functions_, changed_member_functions_,
7051 sorted_changed_member_functions_, deleted_member_class_tmpls_,
7052 inserted_member_class_tmpls_, changed_member_class_tmpls_,
7053 sorted_changed_member_class_tmpls_}): Move these data members into
7054 class_or_union_diff::priv.
7055 (class_diff::{clear_lookup_tables, lookup_tables_empty,
7056 ensure_lookup_tables_populate}): Adjust.
7057 (class_diff::allocate_priv_data): Define new function.
7058 (class_diff::priv::{count_filtered_changed_mem_fns,
7059 count_filtered_inserted_mem_fns, count_filtered_deleted_mem_fns,
7060 chain_into_hierarchy, class_diff}): Likewise.
7061 (class_diff::{member_types_changes, data_members_changes,
7062 inserted_data_members, deleted_data_members,
7063 member_fn_tmpls_changes, member_fn_tmpls_changes,
7064 member_class_tmpls_changes}): These are deleted as they got moved
7065 to class_or_union_diff.
7066 (class_diff::report): Adjust.
7067 (union_diff::{clear_lookup_tables, lookup_tables_empty,
7068 ensure_lookup_tables_populated, allocate_priv_data, union_diff,
7069 finish_diff_type, first_union_decl, second_union_decl,
7070 get_pretty_representation, report}): Define new functions.
7071 (compute_diff): Define an overload for union_decl_sptr.
7072 (function_decl_diff::report): Adjust.
7073 (corpus_diff::priv::apply_suppressions_to_added_removed_fns_vars):
7075 (corpus_diff::report): Adjust.
7076 * src/abg-hash.cc (member_base::hash::operator)
7077 (member_function_template::hash::operator)
7078 (member_class_template::hash::operator): Move these out of the
7080 (class_or_union::hash::operator): Define new member function.
7081 (class_decl::hash::operator): Adjust.
7082 (type_base::dynamic_hash::operator): Support hashing of
7084 * src/abg-suppression.cc (type_suppression::suppresses_diff):
7086 * src/abg-dwarf-reader.cc (typedef die_class_or_union_map_type):
7088 (read_context::{die_wip_classes_map_,
7089 alternate_die_wip_classes_map_, type_unit_die_wip_classes_map_):
7090 Make these data member have type die_class_or_union_map_type.
7091 (read_context::{lookup_type_from_die_offset, die_wip_classes_map,
7092 is_wip_class_die_offset, resolve_declaration_only_classes}):
7094 (finish_member_function_reading, build_class_type_and_add_to_ir)
7095 (build_function_type, build_function_decl, build_reference_type)
7096 (type_is_suppressed, build_function_decl)
7097 (maybe_canonicalize_type, maybe_set_member_type_access_specifier):
7099 (build_union_type_and_add_to_ir): Define new static function.
7100 (build_ir_node_from_die): Support DW_TAG_union_type DIE tag.
7101 * src/abg-reader.cc (handle_element_node): Handle union_decl.
7102 (build_function_decl, build_function_decl_if_not_suppressed):
7104 (build_union_decl_if_not_suppressed, build_union_decl)
7105 (handle_union_decl): Define new functions.
7106 (build_class_decl): Adjust.
7107 * src/abg-writer.cc (record_decl_only_type_as_emitted): Adjust.
7108 (write_decl): Adjust. Support writting union_decl type.
7109 p (write_class_decl_opening_tag, write_class_decl): Adjust. Call
7110 the new write_class_or_union_is_declaration_only.
7111 (write_union_decl_opening_tag, write_union_decl): Define new
7113 (write_member_tpe): Support writting union decl.
7114 * tests/test-diff-dwarf.cc (in_out_specs): Add new tests for this
7116 * tests/data/test-diff-dwarf/libtest37-union-v0.so: New test input.
7117 * tests/data/test-diff-dwarf/libtest37-union-v1.so: Likewise.
7118 * tests/data/test-diff-dwarf/libtest38-union-v0.so: Likewise.
7119 * tests/data/test-diff-dwarf/libtest38-union-v1.so: Likewise.
7120 * tests/data/test-diff-dwarf/libtest39-union-v0.so: Likewise.
7121 * tests/data/test-diff-dwarf/libtest39-union-v1.so: Likewise.
7122 * tests/data/test-diff-dwarf/test37-union-report-0.txt: Likewise.
7123 * tests/data/test-diff-dwarf/test38-union-report-0.txt: Likewise.
7124 * tests/data/test-diff-dwarf/test39-union-report-0.txt: Likewise.
7125 * tests/data/test-diff-dwarf/test37-union-v0.cc: Source code for
7127 * tests/data/test-diff-dwarf/test37-union-v1.cc: Likewise.
7128 * tests/data/test-diff-dwarf/test38-union-v0.cc: Likewise.
7129 * tests/data/test-diff-dwarf/test38-union-v1.cc: Likewise.
7130 * tests/data/test-diff-dwarf/test39-union-v0.cc: Likewise.
7131 * tests/data/test-diff-dwarf/test39-union-v1.cc: Likewise.
7132 * tests/data/test-diff-dwarf-abixml/test0-pr19026-libvtkIOSQL-6.1.so.1.abi:
7133 Update test reference.
7134 * tests/data/test-diff-filter/test30-pr18904-rvalueref-report0.txt:
7136 * tests/data/test-diff-filter/test30-pr18904-rvalueref-report1.txt:
7138 * tests/data/test-read-dwarf/libtest23.so.abi: Likewise.
7139 * tests/data/test-read-dwarf/libtest24-drop-fns-2.so.abi:
7141 * tests/data/test-read-dwarf/libtest24-drop-fns.so.abi: Likewise.
7142 * tests/data/test-read-dwarf/test10-pr18818-gcc.so.abi: Likewise.
7143 * tests/data/test-read-dwarf/test11-pr18828.so.abi: Likewise.
7144 * tests/data/test-read-dwarf/test12-pr18844.so.abi: Likewise.
7145 * tests/data/test-read-dwarf/test13-pr18894.so.abi: Likewise.
7146 * tests/data/test-read-dwarf/test14-pr18893.so.abi: Likewise.
7147 * tests/data/test-read-dwarf/test15-pr18892.so.abi: Likewise.
7148 * tests/data/test-read-dwarf/test16-pr18904.so.abi: Likewise.
7149 * tests/data/test-read-dwarf/test17-pr19027.so.abi: Likewise.
7150 * tests/data/test-read-dwarf/test18-pr19037-libvtkRenderingLIC-6.1.so.abi:
7152 * tests/data/test-read-dwarf/test19-pr19023-libtcmalloc_and_profiler.so.abi:
7154 * tests/data/test-read-dwarf/test20-pr19025-libvtkParallelCore-6.1.so.abi:
7156 * tests/data/test-read-dwarf/test21-pr19092.so.abi: Likewise.
7157 * tests/data/test-read-dwarf/test22-pr19097-libstdc++.so.6.0.17.so.abi:
7159 * tests/data/test-read-dwarf/test9-pr18818-clang.so.abi:
7162 2016-11-10 Dodji Seketeli <dodji@redhat.com>
7164 Support empty properties in INI files
7165 * include/abg-ini.h (simple_property::simple_property): Add a new
7166 constructor for empty values.
7167 (simple_property::has_empty_value): Declare new member function.
7168 * src/abg-ini.cc (simple_property::{simple_property,
7169 has_empty_value}): Define new member functions.
7170 (read_context::read_property): Support reading a property with no
7172 (write_property_value, write_property): Support writting a
7173 property with empty value.
7175 2016-11-10 Dodji Seketeli <dodji@redhat.com>
7177 Rename config::property_vector into config::properties_type
7178 * include/abg-ini.h (config::properties_type): Rename the typedef
7179 config::property_vector into this.
7180 (config::section::{section, get_properties, set_properties}):
7182 * src/abg-ini.cc (config::section::priv::properties_): Adjust the
7184 (config::section::{section, get_properties, set_properties,
7185 find_property}): Adjust.
7186 (write_section): Adjust.
7187 * src/abg-suppression.cc (read_function_suppression): Adjust.
7189 2016-11-09 Dodji Seketeli <dodji@redhat.com>
7191 Apply harmless and harmful filters in one pass
7192 * include/abg-comp-filter.h (class harmless_harmful_filter):
7194 (typedef harmless_harmful_filter_sptr): Declare new typedef.
7195 (class harmless_filter, class harmful_filter): Remove these class
7197 (typedef harmful_filter_sptr, harmless_filter_sptr): Remove these
7199 * src/abg-comp-filter.cc (categorize_harmless_diff_node)
7200 (categorize_harmful_diff_node): Define new static functions.
7201 ({harmless, harmful}_filter::{visit, visit_end}): Remove these
7203 (harmless_harmful_filter::{visit, visit_end}): Define new member
7205 * src/abg-comparison.cc (diff_context::diff_context): Register the
7206 new harmless_harmful_filter, and remove the premier
7207 harmless_filter and harmful_filter.
7208 # Please enter the commit message for your changes. Lines starting
7209 # with '#' will be ignored, and an empty message aborts the
7210 commit. # On branch kabidiff-dedup # Changes to be committed: #
7211 (use "git reset HEAD <file>..." to unstage) # # modified:
7212 include/abg-comp-filter.h # modified: src/abg-comp-filter.cc #
7213 modified: src/abg-comparison.cc # # Untracked files: # (use "git
7214 add <file>..." to include in what will be committed) # # diff.txt
7215 # prtests/ # tests/data/test-read-dwarf/libtest23.so.abi.conflict
7217 2016-11-08 Dodji Seketeli <dodji@redhat.com>
7219 Avoid stripping typedefs too much
7220 * src/abg-ir.cc (types_are_compatible)
7221 (is_compatible_with_class_type): Do not strip typedefs. Just get
7224 2016-11-08 Dodji Seketeli <dodji@redhat.com>
7226 Misc style cleanups in abg-ir.cc
7227 * src/abg-ir.cc (equals): In overloads for function_type and
7228 class_decl, avoid returning a constant when we can return a
7229 variable like in the rest of the code.
7231 2016-11-01 Dodji Seketeli <dodji@redhat.com>
7233 Factorize out string representation of array_type_def::subrange_type
7234 * src/abg-ir.cc (array_type_def::subrange_type::{as_string,
7235 vector_as_string}): Define methods.
7236 (array_type_def::get_subrange_representation): Use the new
7237 vector_as_string method.
7239 2016-11-01 Dodji Seketeli <dodji@redhat.com>
7241 Factorize out parsing of integral types
7242 * src/abg-ir-priv.h: New file.
7243 * src/Makefile.am: Add abg-ir-priv.h to the build system.
7244 * src/abg-ir.cc: Include the new abg-ir-priv.h header file.
7245 (class_integral_type): Move this type
7246 declaration to the new abg-ir-priv.h header.
7247 (integral_type::modifiers_type): Make this non-static.
7248 (parse_integral_type): This new overload is a factorized out of
7250 (integral_type::integral_type): ... here.
7252 2016-10-31 Dodji Seketeli <dodji@redhat.com>
7254 Misc style fixes in abg-ir.cc
7255 * src/abg-ir.cc (get_function_type_name,
7256 get_pretty_representation): Misc style fixes.
7258 2016-10-31 Dodji Seketeli <dodji@redhat.com>
7260 Consider a method_decl as always being a member decl
7261 * src/abg-ir.cc (is_member_decl): Consider a method decl as always
7262 being a member decl.
7263 (is_member_function): Use is_member_decl.
7265 2016-10-31 Dodji Seketeli <dodji@redhat.com>
7267 Cleanup void and variadic parameter type interfaces
7268 * include/abg-ir.h (environment::{get_void_type,
7269 get_variadic_parameter_type}): Renamed get_void_type_decl and
7270 get_variadic_parameter_type_decl to these.
7271 (environment::is_void_type): Remove the overload that takes a bare
7273 (environment::is_variadic_parameter_type): Declare new member
7275 * src/abg-ir.cc (environment::void_type_): Renamed the data member
7276 void_type_decl_ into this.
7277 (environment::variadic_marker_type_): Renamed the data member
7278 variadic_marker_type_decl_ into this.
7279 (environment::{get_void_type, get_variadic_parameter_type}):
7280 Renamed get_void_type_decl and get_variadic_parameter_type_decl to
7282 (environment::is_void_type): Take a smart pointer now.
7283 (environment::is_variadic_parameter_type): Define new member
7285 (synthesize_function_type_from_translation_unit): Adjust.
7286 (function_decl::parameter::get_pretty_representation): Likewise.
7287 * src/abg-comparison.cc (is_diff_of_variadic_parameter_type):
7289 * src/abg-dwarf-reader.cc (build_function_type)
7290 (build_ir_node_for_void_type): Likewise.
7291 * src/abg-reader.cc (build_function_parameter)
7292 (build_function_decl, build_function_type): Likewise.
7294 2016-10-31 Dodji Seketeli <dodji@redhat.com>
7296 Cleanup some entry points in abg-fwd.h
7297 * include/abg-fwd.h (add_decl_to_scope): Pass the scope smart
7298 pointer by reference.
7299 (is_member_type): pass the type smart pointer by reference.
7300 (is_function_decl, is_pointer_type, is_reference_type)
7301 (is_qualified_type, is_function_type, is_method_type)
7302 (is_array_type): Take a type_or_decl base pointer, rather than
7303 either a decl_base or type_base pointer.
7304 * include/abg-ir.h (translation_unit::set_corpus): Take a pointer
7305 to non-const corpus.
7306 (translation_unit::get_corpus): Add a non-const overload.
7307 (type_or_decl_base::get_corpus): Likewise.
7308 (type_or_decl_base::set_translation_unit): Take a pointer to
7309 non-corpus translation_unit.
7310 (type_or_decl_base::get_translation_unit): Add a non-const
7312 (scope_decl::{add_member_decl, insert_member_decl}): Pass the
7313 member smart pointer by reference.
7314 (scope_decl::remove_member_decl): Take a non-const smart pointer.
7315 (class_decl::add_member_decl): Pass the decl smart pointer by
7317 (is_method_decl): Take pointer or reference to type_or_decl_base
7318 rather than function_decl.
7319 * src/abg-ir.cc (translation_unit::priv::corpus): Make this a
7320 pointer to non-const corpus.
7321 (translation_unit::set_corpus): Take a pointer to non-const
7323 (translation_unit::get_corpus): Add a non-const overload.
7324 (translation_unit::get_global_scope): Adjust.
7325 (translation_unit::bind_function_type_life_time): Adjust.
7326 (type_or_decl_base::translation_unit): Make this a pointer to
7327 non-const translation_unit.
7328 (type_or_decl_base::get_corpus): Likewise.
7329 (type_or_decl_base::set_translation_unit): Take a pointer to
7330 non-corpus translation_unit.
7331 (type_or_decl_base::get_translation_unit): Add a non-const
7333 (is_member_type): pass the type smart pointer by reference.
7334 (scope_decl::{add_member_decl, insert_member_decl}): Take a
7335 reference to the member decl smart pointer. Adjust.
7336 (class_decl::add_member_decl): Likewise.
7337 (scope_decl::remove_member_decl): Take a non-const smart pointer.
7338 (add_decl_to_scope): Pass the scope smart pointer by reference.
7339 (is_decl, is_function_decl, is_pointer_type, is_reference_type)
7340 (is_qualified_type, is_function_type, is_method_type)
7341 (is_method_decl, is_array_type): Take a type_or_decl base pointer,
7342 rather than either a decl_base or type_base pointer.
7344 2016-10-31 Dodji Seketeli <dodji@redhat.com>
7346 Fix abigail::ir::get_type_scope()
7347 * src/abg-ir.cc (get_type_scope): Do not always return nil.
7349 2016-10-27 Dodji Seketeli <dodji@redhat.com>
7351 Bug 20740 Broken check for dwarf_getalt in configure.ac
7352 * configure.ac: Add missing spaces around the "=" of a conditional
7355 2016-10-11 Dodji Seketeli <dodji@redhat.com>
7357 Canonicalize function types when reading from DWARF
7358 * src/abg-dwarf-reader.cc (build_function_decl): Canonicalize
7361 2016-10-11 Dodji Seketeli <dodji@redhat.com>
7363 Misc cleanups here and there
7364 * src/abg-dwarf-reader.cc (canonicalize_types_scheduled): Fix
7366 * src/abg-reader.cc (build_class_decl): Use class_decl_sptr rather
7367 than shared_ptr<class_decl>.
7368 * src/abg-writer.cc (write_class_is_declaration_only)
7369 (write_is_struct, write_decl, write_decl_in_scope)
7370 (write_type_decl, write_qualified_type_def)
7371 (write_pointer_type_def, write_reference_type_def)
7372 (write_array_type_def, write_enum_type_decl, write_typedef_decl)
7373 (write_elf_symbol, write_var_decl, write_function_decl)
7374 (write_member_type_opening_tag, write_member_type)
7375 (write_class_decl_opening_tag, write_class_decl): Cleanup
7376 parameters to use the right typedef, rather than the long
7377 shared_ptr<*> form. Pass the shared pointers by reference as
7380 2016-10-10 Dodji Seketeli <dodji@redhat.com>
7382 Cleanup namespace importing in abg-interned-str.h
7383 * include/abg-interned-str.h: Inject std::tr1::shared_ptr,
7384 std::string and std::ostream inside the abigail namespace.
7385 (interned_string::{interned_string, raw, operator==, operator!=,
7387 (operator==, operator!=, operator<<, operator+): Adjust.
7389 2016-10-07 Dodji Seketeli <dodji@redhat.com>
7391 Cleanup functions to detect infinite comparison of class_decl
7392 * src/abg-ir.cc (class_decl::priv::unmark_as_being_compared): In
7393 the overload that takes a pointer to class_decl, re-use the
7394 overload that takes a reference.
7395 (class_decl::priv::comparison_started): Do not crash if the klass
7397 (equals): In the overload for class_decl&, undef the RESULT macro
7398 when it's not used anymore.
7400 2016-10-07 Dodji Seketeli <dodji@redhat.com>
7402 Cleanup class_decl inifite comparison detection
7403 * src/abg-ir.cc (environment::priv::classes_being_compared_): Make
7404 this use the new interned_string_set_type type.
7405 (class_decl::priv::{mark_as_being_compared, comparison_started}):
7408 2016-10-10 Dodji Seketeli <dodji@redhat.com>
7410 Apply ODR-based type comparison optimization to function types
7411 * src/abg-ir.cc (type_eligible_for_odr_based_comparison):
7412 Factorize this out of type_base::get_canonical_type_for. Also,
7413 add function types to the set of types to use the ODR-based
7414 comparison optimization on.
7415 (type_base::get_canonical_type_for): Use the new
7416 type_eligible_for_odr_based_comparison function.
7418 2016-10-07 Dodji Seketeli <dodji@redhat.com>
7420 Prevent infinite loops while comparing two function_type
7421 * include/abg-ir.h (class environment): Make class function_type
7422 be a friend of this class.
7423 (class function_type): Make the equality function for
7424 function_types be a friend of this class.
7425 * src/abg-ir.cc (environment::priv::fn_types_being_compared_): New
7427 (function_type::priv::{mark_as_being_compared,
7428 unmark_as_being_compared, comparison_started}): Define new member
7430 (equals): In the overload for function_types, if any of the the
7431 function_type being compared is already being compared, return
7432 early saying that the two function_types are equal. This avoids
7434 2016-10-06 Dodji Seketeli <dodji@redhat.com>
7436 Define a new interned_string_set_type typedef
7437 * include/abg-interned-str.h (interned_string_set_type): Define a new
7438 typedef for unordered_set<interned_string>.
7440 2016-09-23 Dodji Seketeli <dodji@redhat.com>
7442 Update reference output of runtestreaddwarf
7443 * tests/data/test-read-dwarf/test10-pr18818-gcc.so.abi: Adjust.
7444 * tests/data/test-read-dwarf/test12-pr18844.so.abi: Adjust.
7445 * tests/data/test-read-dwarf/test17-pr19027.so.abi: Adjust.
7446 * tests/data/test-read-dwarf/test20-pr19025-libvtkParallelCore-6.1.so.abi: Adjust.
7447 * tests/data/test-read-dwarf/test9-pr18818-clang.so.abi: Adjust.
7449 2016-09-21 Matthias Klose <doko@debian.org>
7451 Fix typo in abipkgdiff
7452 * tools/abipkgdiff.cc (extract_deb): Fix typo.
7454 2016-09-12 Dodji Seketeli <dodji@redhat.com>
7456 Better handle fedabipkgdiff dependencies detection
7457 * configure.ac: It's only when --enable-fedabipkgdiff is provided
7458 that a missing dependency of the fedabipkgdiff program results in
7459 a fatal error. Otherwise, building fedabipkgdiff is just
7462 2016-09-16 Dodji Seketeli <dodji@redhat.com>
7464 Add default suppression specifications for C++ binaries
7465 * default.abignore: Add suppressions for non-libstdc++ and
7466 non-boost C++ libraries.
7468 2016-09-20 Dodji Seketeli <dodji@redhat.com>
7470 Add default suppression specification for webkitgtk
7471 * default.abignore: New suppression specifications for webkitgtk.
7473 2016-09-19 Dodji Seketeli <dodji@redhat.com>
7475 Drop suppressed ABI artifacts from the IR
7476 * doc/manuals/abidw.rst: Document the new --suppressions and
7477 --headers-dir options off the abidw tool.
7478 * doc/manuals/abilint.rst: Document the new --suppressions and
7479 --headers-dir options on the abilint tool.
7480 * doc/manuals/libabigail-concepts.rst: Document the new "drop" and
7481 "name_not_regexp" properties on suppression directives.
7482 * include/abg-corpus.h (corpus::corpus): Add a default argument to
7484 * src/abg-suppression-priv.h: New private header file.
7485 * src/Makefile.am: Add the new abg-suppression-priv.h file to
7486 source distribution.
7487 * include/abg-suppression.h ({suppression_base, type_suppression,
7488 function_suppression, variable_suppression}::priv): Make these
7490 (suppression_base::{g,s}et_drops_artifact_from_ir): Declare new
7492 (type_suppression::{suppressed_type}): Likewise.
7493 (suppression_base::{names,sonames}_of_binaries_match): Remove
7495 (function_suppression::{get_name, set_name, get_name_regex_str,
7496 set_name_regex_str}): Renamed get_function_name,
7497 set_function_name, get_function_name_regex_str,
7498 set_function_name_regex_str into these.
7499 ({variable,function}_suppression::{g,s}et_name_not_regex_str):
7500 Declare new member functions.
7501 * src/abg-suppression.cc: Include the new abg-suppression-priv.h
7503 (class suppression_base::priv, class type_suppression::priv, class
7504 function_suppression::parameter_spec::priv, class
7505 function_suppression::priv, class variable_suppression::priv):
7506 Move these types to that new private header.
7507 (suppression_base::{g,s}et_drops_artifact_from_ir)
7508 (function_suppression::{g,s}et_name_not_regex_str)
7509 (variable_suppression::{g,s}et_name_not_regex_str): New member
7511 (sonames_of_binaries_match): New static function, taken from
7512 suppression_base::sonames_of_binaries_match.
7513 (names_of_binaries_match): New static function, taken from
7514 suppression_base::names_of_binaries_match.
7515 (suppression_matches_type_no_name): New static function.
7516 (type_suppression::suppresses_type): Adjust
7517 (function_suppression::suppresses_function)
7518 (variable_suppression::suppresses_variable): Adjust. Evaluate the
7519 new "name_not_regexp" property.
7520 (suppression_matches_type_name)
7521 (suppression_matches_type_location)
7522 (suppression_matches_type_name_or_location)
7523 (suppression_matches_function_name)
7524 (suppression_matches_function_sym_name)
7525 (suppression_matches_variable_name)
7526 (suppression_matches_variable_sym_name, suppression_matches_type):
7528 (read_type_suppression): Support the new "drop_artifacts" and
7530 (read_function_suppression, read_variable_suppression): Support
7531 the new "drop_artifacts", "drop", and "name_not_regexp"
7533 (function_suppression::{g,s}et_name): Renamed
7534 {g,s}et_function_name into these.
7535 (function_suppression::set_name_not_regex_str): Renamed
7536 {g,s}et_name_regex_str into this.
7537 (function_suppression::suppresses_function_symbol): Adjust.
7538 * include/abg-dwarf-reader.h (add_read_context_suppressions):
7539 Declare new function.
7540 * src/abg-dwarf-reader.cc: Use the new private
7541 abg-suppression-priv.h header file.
7542 (read_context::supprs_): New data member.
7543 (read_context::get_suppressions): New member function.
7544 (read_context::get_die_source): Make this const.
7545 (read_context::tu_die_imported_unit_points_map): Add a const
7547 (read_context::cur_transl_unit): Renamed current_translation_unit
7549 (read_context::cur_tu): Remove or rename into cur_transl_unit.
7550 (get_scope_for_die, build_translation_unit_and_add_to_ir)
7551 (build_enum_type, build_pointer_type_def, build_reference_type)
7552 (build_function_type, build_array_type, build_function_decl):
7554 (read_context::{suppression_can_match,
7555 suppression_matches_function_sym_name,
7556 suppression_matches_function_name,
7557 suppression_matches_variable_sym_name,
7558 suppression_matches_variable_name,
7559 suppression_matches_type_name_or_location,
7560 suppression_matches_type_name}): Add member functions.
7561 (die_signed_constant_attribute): Remove this as dead code.
7562 (die_location, die_loc_and_name)
7563 (find_import_unit_point_between_dies)
7564 (find_import_unit_point_before_die, get_parent_die): Make the
7565 read_context& parameter be const and adjust as required.
7566 (build_var_decl_if_not_suppressed, function_is_suppressed)
7567 (variable_is_suppressed, type_is_suppressed): Define new static
7569 (add_read_context_suppressions): Define new function.
7570 (build_class_type_and_add_to_ir): Do not add suppressed static
7571 data members to the IR.
7572 (build_ir_node_from_die): Do not add suppressed enum types, class
7573 types, variables or functions to the IR. Adjust for the
7574 read_context::cur_tu -> read_context::cur_transl_unit rename.
7575 * include/abg-reader.h (read_context_sptr): Declare new type.
7576 (create_native_xml_read_context, read_corpus_from_input)
7577 (add_read_context_suppressions): Declare new functions.
7578 * src/abg-reader.cc: Include the new private
7579 abg-suppression-priv.h header file.
7580 (read_context::m_exported_decls_builder): Renamed
7581 m_exported_decls_builder_ into this.
7582 (read_context::get_exported_decls_builder): Adjust.
7583 (read_context::get_cur_scope): Make this const.
7584 (read_location): Take a const read_context and adjust.
7585 (read_corpus_from_input): Make this non-static.
7586 (build_namespace_decl): Don't abort if trying to add an artifact
7587 to the IR doesn't succeed. It might be suppressed now.
7588 (read_context::{m_path, m_supprs}): New data members.
7589 (read_context::{g,s}et_path): New member functions.
7590 (read_context::{get_suppressions,
7591 suppression_matches_function_name, suppression_can_match,
7592 suppression_matches_function_name,
7593 suppression_matches_function_sym_name,
7594 suppression_matches_variable_name,
7595 suppression_matches_variable_sym_name,
7596 suppression_matches_type_name_or_location}): Likewise.
7597 (add_read_context_suppressions, create_native_xml_read_context)
7598 (read_corpus_from_native_xml): New functions.
7599 (build_function_decl_if_not_suppressed, function_is_suppressed)
7600 (type_is_suppressed, build_var_decl_if_not_suppressed)
7601 (variable_is_suppressed, build_enum_type_decl_if_not_suppressed)
7602 (build_class_decl_if_not_suppressed): New static functions.
7603 (build_class_decl): Add member types that are being built early,
7604 so that their sub-types can be evaluated for suppression. Do not
7605 add suppressed static data members or suppressed member functions
7607 (build_type): Do not add an enum type or a class type to the IR if
7608 they are suppressed.
7609 (handle_enum_type_decl): Do not add an enum type to the IR if its
7611 (handle_var_decl): Likewise for a variable decl.
7612 (handle_function_decl): Likewise for a function decl.
7613 (handle_class_decl): Likewise for a class decl.
7614 * src/abg-tools-utils.cc (handle_fts_entry): Drop suppressed ABI
7616 * tools/abidiff.cc (display_usage): Fix help strings for
7617 --headers-dirs{1,2}.
7618 (set_suppressions): New static function.
7619 (main): Adjust. Release the memory used by read_context early.
7620 * tools/abidw.cc (options::{headers_dir, suppression_paths}):
7621 (display_usage): New help strings for the new --header-dir and
7622 --suppressions options.
7623 (parse_command_line): Parse the new --header-dir and
7624 --suppressions options.
7625 (maybe_check_suppression_files, set_suppressions): New static
7627 (main): Use the two new functions above. Free the memory used by
7628 the read context before working with the corpus.
7629 * tools/abilint.cc (options::suppression_paths):
7630 (display_usage): New help strings for the new --header-dir and
7631 --suppressions options.
7632 (parse_command_line): Parse the new --header-dir and
7633 --suppressions options.
7634 (maybe_check_suppression_files, set_suppressions): New static
7636 (main): Use the two new functions above. Free the memory used by
7637 the read context before working with the corpus.
7638 * tests/data/test-diff-suppr/test24-soname-suppr-{2,3].txt:
7640 * tests/data/test-diff-suppr/test29-suppr-6.txt: Likewise.
7641 * tests/data/test-diff-suppr/test29-suppr-8.txt: Likewise.
7642 * tests/data/test-diff-suppr/libtest31-v{0,1}.so: New test input.
7643 * tests/data/test-diff-suppr/libtest31.suppr: Likewise
7644 * tests/data/test-diff-suppr/libtest32-v{0,1}.so: Likewise.
7645 * tests/data/test-diff-suppr/libtest32-0.suppr: Likewise.
7646 * tests/data/test-diff-suppr/libtest33-v{0,1}.so: Likewise.
7647 * tests/data/test-diff-suppr/test31-report-{0,1}.txt: Likewise.
7648 * tests/data/test-diff-suppr/test31-v{0,1}.cc: Likewise.
7649 * tests/data/test-diff-suppr/test32-report-{0,1}.txt: Likewise.
7650 * tests/data/test-diff-suppr/test32-v{0,1}.c: Likewise.
7651 * tests/data/test-diff-suppr/test33-suppr-1.txt: Likewise.
7652 * tests/data/test-diff-suppr/test33-v{0,1}.cc: Likewise.
7653 * tests/data/test-diff-suppr/test33-v{0,1}.h: Likewise.
7654 * tests/data/test-read-dwarf/libtest24-drop-fns-2.so.abi:
7656 * tests/data/test-read-dwarf/libtest24-drop-fns.so: Likewise.
7657 * tests/data/test-read-dwarf/libtest24-drop-fns.so.abi: Likewise.
7658 * tests/data/test-read-dwarf/test24-drop-fns-0.suppr: Likewise.
7659 * tests/data/test-read-dwarf/test24-drop-fns.cc: Likewise.
7660 * tests/data/test-read-write/test28-drop-std-fns.abignore:
7662 * tests/data/test-read-write/test28-drop-std-vars.abignore:
7664 * tests/data/test-read-write/test28-without-std-fns-ref.xml:
7666 * tests/data/test-read-write/test28-without-std-fns.xml: Likewise.
7667 * tests/data/test-read-write/test28-without-std-vars-ref.xml:
7669 * tests/data/test-read-write/test28-without-std-vars.xml:
7671 * tests/data/test-read-write/test28.xml: Likewise.
7672 * tests/data/Makefile.am: Add the new test artifacts to source
7674 * tests/test-diff-suppr.cc (in_out_spec): Take the new test inputs
7676 * tests/test-read-dwarf.cc (Inoutspec::in_suppr_spec_path): New
7678 (in_out_spec): Adjust. The new test inputs into account.
7679 (set_suppressions): New static function.
7680 (handle_in_out_spec): Adjust.
7681 * tests/test-read-write.cc (Inoutspec::{in_suppr_spec_path,
7682 ref_out_path}): New data members.
7683 (in_out_spec): Adjust. Take new test inputs into account.
7686 2016-09-19 Dodji Seketeli <dodji@redhat.com>
7688 Pimplify the abigail::ir::scope_decl type
7689 * include/abg-ir.h (scope_decl::{priv, priv_sptr}) Declare new types.
7690 (scope_decl::priv_): New pimpl data member.
7691 (scope_decl::{member_, member_scopes}): Move this as data member
7692 of the new scope_decl::priv type in the abg-ir.cc file.
7693 (scope_decl::{scope_decl, get_member_decls, get_member_scopes,
7694 is_empty}): Make these inline member functions be out-of-line.
7695 * src/abg-ir.cc (struct scope_decl::priv): Define new type.
7696 (scope_decl::{scope_decl, get_member_decls, get_member_scopes,
7697 is_empty}): Define these new member functions here. They were
7698 inline in the include/abg-ir.h header files before.
7699 (scope_decl::{add_member_decl, insert_member_decl,
7700 remove_member_decl}): Adjust.
7702 2016-09-19 Dodji Seketeli <dodji@redhat.com>
7704 Add new helper functions
7705 * include/abg-fwd.h (get_location, build_qualified_name): Declare
7707 * include/abg-ir.h (is_method_decl): Declare two new overloads of
7709 * src/abg-ir.cc (get_location, build_qualified_name)
7710 (is_method_decl): Define these functions declared above.
7712 2016-09-19 Dodji Seketeli <dodji@redhat.com>
7714 Do not emit empty namespaces in abixml
7716 (namespace_decl::is_empty_or_has_empty_sub_namespaces): Declare
7719 (namespace_decl::is_empty_or_has_empty_sub_namespaces): ... and
7721 * src/abg-writer.cc (write_namespace_decl): Do not write empty
7722 namespaces or namespaces containing empty namespaces.
7723 * tests/data/test-read-dwarf/test9-pr18818-clang.so.abi: Adjust.
7724 * tests/data/test-read-dwarf/test11-pr18828.so.abi: Adjust.
7725 * tests/data/test-read-dwarf/test12-pr18844.so.abi: Adjust.
7726 * tests/data/test-read-dwarf/test15-pr18892.so.abi: Adjust.
7727 * tests/data/test-read-dwarf/test16-pr18904.so.abi: Adjust.
7728 * tests/data/test-read-dwarf/test17-pr19027.so.abi: Adjust.
7729 * tests/data/test-read-dwarf/test18-pr19037-libvtkRenderingLIC-6.1.so.abi: Adjust.
7730 * tests/data/test-read-dwarf/test19-pr19023-libtcmalloc_and_profiler.so.abi: Adjust.
7731 * tests/data/test-read-dwarf/test20-pr19025-libvtkParallelCore-6.1.so.abi: Adjust.
7732 * tests/data/test-read-dwarf/test21-pr19092.so.abi: Adjust.
7733 * tests/data/test-read-dwarf/test22-pr19097-libstdc++.so.6.0.17.so.abi: Adjust.
7734 * tests/data/test-read-dwarf/libtest23.so.abi: Adjust.
7736 2016-09-21 Dodji Seketeli <dodji@redhat.com>
7738 Fix misleading indentation issues
7739 * tools/abipkgdiff.cc (compare): Likewise.
7740 * tools/abisym.cc (main): Fix misleading indentation.
7742 2016-08-30 Dodji Seketeli <dodji@redhat.com>
7744 Bug 20534 - abipkgdiff wrongly displays the name of added binary files
7745 * tools/abipkgdiff.cc (compare): Show the name of the added
7746 binary, rather than its address.
7748 2016-08-24 Dodji Seketeli <dodji@redhat.com>
7750 Bug 20420 - Wrong ODR-based type comparison optimization on qualified type
7753 2016-08-23 Dodji Seketeli <dodji@redhat.com>
7755 Don't walk diff trees indefinitely when applying suppressions
7756 * src/abg-comparison.cc:
7758 2016-07-27 Dodji Seketeli <dodji@redhat.com>
7760 Control symbols exported from libabigail.so
7761 * VISIBILITY: New documentation about this visiblity business.
7762 * CONTRIBUTING: Update the "contributing guide" to refer to symbol
7764 * configure.ac: Define a variable VISIBILITY_FLAGS that is set to
7765 the -fvisibility=hidden flag to pass to GCC, when its available.
7766 * src/Makefile.am: Add VISIBILITY to source distribution. Also
7767 add COMPILING and COMMIT-LOG-GUIDELINES that were missing.
7768 * src/Makefile.am: Use the new $(VISIBILITY_FLAGS) when buiding
7770 * tests/Makefile.am: Use the new $(VISIBILITY_FLAGS) when buiding
7772 * tools/Makefile.am: Use the new $(VISIBILITY_FLAGS) when buiding
7774 * src/abg-comp-filter.cc: Enclose inclusion of public headers in
7775 ABG_BEGIN_EXPORT_DECLARATIONS and ABG_END_EXPORT_DECLARATIONS to
7776 export the symbols of entities declared in there.
7777 * src/abg-comparison.cc: Likewise.
7778 * src/abg-config.cc: Likewise.
7779 * src/abg-corpus.cc: Likewise.
7780 * src/abg-diff-utils.cc: Likewise.
7781 * src/abg-dwarf-reader.cc: Likewise.
7782 * src/abg-hash.cc: Likewise.
7783 * src/abg-ini.cc: Likewise.
7784 * src/abg-ir.cc: Likewise.
7785 * src/abg-libxml-utils.cc: Likewise.
7786 * src/abg-libzip-utils.cc: Likewise.
7787 * src/abg-reader.cc: Likewise.
7788 * src/abg-suppression.cc: Likewise.
7789 * src/abg-tools-utils.cc: Likewise.
7790 * src/abg-traverse.cc: Likewise.
7791 * src/abg-viz-common.cc: Likewise.
7792 * src/abg-viz-dot.cc: Likewise.
7793 * src/abg-viz-svg.cc: Likewise.
7794 * src/abg-workers.cc: Likewise.
7795 * src/abg-writer.cc: Likewise.
7797 2016-07-26 Dodji Seketeli <dodji@redhat.com>
7799 Support DW_TAG_type_unit
7800 * src/abg-dwarf-reader.cc (TYPE_UNIT_DIE_SOURCE): New enumerator
7802 (read_context::{type_unit_die_decl_map_, type_unit_die_type_map_,
7803 type_unit_die_wip_classes_map_,
7804 type_unit_die_wip_function_types_map_,
7805 type_unit_types_to_canonicalize_,
7806 type_units_tu_die_imported_unit_points_map_,
7807 type_section_die_parent_map_}): New data members.
7808 (read_context::{get_die_source, associate_die_to_decl,
7809 lookup_decl_from_die_offset, die_type_map, clear_die_type_maps,
7810 die_wip_classes_map, die_wip_function_types_map,
7811 types_to_canonicalize, clear_types_to_canonicalize,
7812 tu_die_imported_unit_points_map, die_parent_map}): Support
7813 TYPE_UNIT_DIE_SOURCE.
7814 (get_parent_die, get_scope_for_die): Likewise.
7815 (read_context::{lookup_decl_from_type_unit_die_offset,
7816 type_section_die_parent_map}): Define new member functions.
7817 (read_context::build_die_parent_maps): Build a DIE -> parent map
7818 for DIEs coming from the .debug_types section.
7819 * tests/data/test-read-dwarf/libtest23.so: New test input.
7820 * tests/data/test-read-dwarf/libtest23.so.abi: New reference output.
7821 * tests/data/test-read-dwarf/test23-first-tu.cc: Source code of
7822 the new binary above.
7823 * tests/data/test-read-dwarf/test23-second-tu.cc: Likewise.
7824 * tests/data/Makefile.am: Add the new test material above to
7825 source distribution.
7826 * tests/test-read-dwarf.cc (in_out_specs): Make this test harness
7827 execute over the new test input and reference output.
7829 2016-07-26 Dodji Seketeli <dodji@redhat.com>
7832 * src/abg-dwarf-reader.cc (build_function_decl): Use the more
7833 readable is_class_type rather than a dynamic_cast.
7835 2016-07-26 Dodji Seketeli <dodji@redhat.com>
7837 Generalize DIE source concept in DWARF reader
7838 * src/abg-dwarf-reader.cc (enum die_source): Define new enum.
7839 (operator++): Define new prefix increment operator for the
7841 (imported_unit_point::imported_unit_from_alt_di): Remove this
7843 (imported_unit_point::imported_unit_die_source):
7844 New data member of type die_source.
7845 (read_context::primary_die_parent_map_): Renamed
7846 die_parent_map_ data member into this.
7847 (read_context::clear_per_corpus_data): Use the new
7848 clear_die_type_maps function, not die_type_map. Also use the
7849 new clear_types_to_canonicalize overload that takes no
7851 (read_context::{get_die_source, clear_die_type_maps,
7852 clear_types_to_canonicalize}): New member functions.
7853 (build_ir_node_from_die, die_die_attribute, get_parent_die)
7854 (get_scope_for_die, build_namespace_decl_and_add_to_ir)
7855 (build_type_decl, build_enum_type)
7856 (build_class_type_and_add_to_ir, build_qualified_type)
7857 (build_pointer_type_def, build_reference_type)
7858 (build_function_type, build_array_type, build_typedef_type)
7859 (build_var_decl, build_function_decl): Remove the boolean
7860 parameter that was designating the source of the DIE. If
7861 necessary, get the source of the DIE from inside the function
7862 using the new read_context::get_die_source.
7863 (read_debug_info_into_corpus): Adjust.
7864 (maybe_canonicalize_type, find_import_unit_point_between_dies)
7865 (maybe_canonicalize_type, read_context::{associate_die_to_decl,
7866 lookup_decl_from_die_offset, die_type_map, associate_die_to_type,
7867 lookup_type_from_die_offset, die_wip_classes_map,
7868 die_wip_function_types_map, is_wip_class_die_offset,
7869 is_wip_function_type_die_offset, types_to_canonicalize,
7870 schedule_type_for_late_canonicalization,
7871 canonicalize_types_scheduled, add_late_canonicalized_types_stats,
7872 perform_late_type_canonicalizing}): Take a die_source as the
7873 source of the DIE, not a boolean. Adjust the code of the function
7875 (read_context::{tu_die_imported_unit_points_map}): Modified
7876 this to make it take a die_source and return the appropriate
7877 map depending on the source.
7878 (read_context::build_die_parent_relations_under): Turn the
7879 non-member static function build_die_parent_relations_under
7880 into a member function.
7881 (read_context::build_die_parent_maps): Turn the non-member
7882 static function build_die_parent_maps into a member function.
7883 Make this function build a DIE -> parent map also for type
7884 DIEs that are in the .type_units section.
7886 2016-07-25 Dodji Seketeli <dodji@redhat.com>
7888 Cleanup is_class and is_compatible_with_class_type
7889 * include/abg-fwd.h (is_class): Remove the overloads that take a
7890 decl_base or a type_base. Add one that takes a type_or_decl_base.
7891 (is_compatible_with_class_type): Make this take a reference to
7892 smart pointer, not just the smart pointer.
7893 * src/abg-ir.cc (is_class): Do the same as in the header file.
7894 (is_compatible_with_class_type): Likewise.
7896 2016-07-22 Dodji Seketeli <dodji@redhat.com>
7898 Add ABG_ASSERT_NOT_REACHED macro
7899 * include/abg-tools-utils.h (ABG_ASSERT_NOT_REACHED): New macro.
7900 * src/abg-dwarf-reader.cc (stt_to_elf_symbol_type)
7901 (stb_to_elf_symbol_binding, get_elf_class_size_in_bytes)
7902 (build_ir_node_from_die): Use the new ABG_ASSERT_NOT_REACHED macro
7903 in lieu of just calling abort().
7905 2016-07-22 Dodji Seketeli <dodji@redhat.com>
7907 Prepare support for symbol visibility control
7908 * configure.ac: Detect compiler support for
7909 __attribute__((visibility("hidden")) and define the
7910 HAS_GCC_VISIBILITY_ATTRIBUTE macro accordingly. Update the
7911 configuration report.
7912 * src/abg-internal.h: New internal header file that defines macros
7913 to be used in the source code to control declaration visibility.
7914 * src/Makefile.am: Add abg-internal.h to source distribution. Add
7915 src/ to the include search path.
7917 2016-07-06 Chenxiong Qi <cqi@redhat.com>
7919 Make fedabipkgdiff consistent with Libabigail's other tests
7920 * configure.ac: Do not require Python dependencies itertools,
7921 unittest and StringIO anymore as they are not used anymore.
7922 Require new module tempfile now. Generate new executable script
7923 tests/mockfedabipkgdiff from tests/mockfedabipkgdiff.in.
7924 * doc/manuals/abipkgdiff.rst: Add doc for new option
7925 --show-identical-binaries to abipkgdiff
7926 * doc/manuals/fedabipkgdiff.rst: Add doc for new options
7927 --show-identical-binaries to fedabipkgdiff.
7928 * tools/abipkgdiff.cc (options::show_identical_binaries): New data
7930 (options::options): Initialize new data member.
7931 (display_usage): Add a new help string for the new
7932 --show-identical-binaries option.
7933 (parse_command_line): Parse the newq --show-identical-binaries
7934 command line switch.
7935 (pthread_routine_compare): When the comparison of two binaries is
7936 empty, if --show-identical-binaries was provided, then emit some
7937 output saying the comparison did yield the empty set.
7938 * tools/fedabipkgdiff (DEFAULT_ABIPKGDIFF): Store the default path
7939 to abipkgdiff in this new global variable. Naming this default
7940 path is useful because it can then be cleanly overloaded when
7942 (build_path_to_abipkgdiff): Return the new DEFAULT_ABIPKGDIFF
7944 (cmd): Parse the new --show-identical-binaries command line
7946 * tests/data/test-diff-pkg/test-dbus-glib-0.80-3.fc12.x86_64-report-0.txt:
7947 New reference output.
7948 * tests/data/test-fedabipkgdiff/test0-from-fc20-to-fc23-dbus-glib-report-0.txt:
7950 * tests/data/test-fedabipkgdiff/test1-from-fc20-to-dbus-glib-0.106-1.fc23.x86_64-report-0.txt:
7952 * tests/data/test-fedabipkgdiff/test2-dbus-glib-0.100.2-2.fc20--dbus-glib-0.106-1.fc23-report-0.txt:
7954 * tests/data/test-fedabipkgdiff/test3-dbus-glib-0.100.2-2.fc20.i686--dbus-glib-0.106-1.fc23.i686-report-0.txt:
7956 * tests/mockfedabipkgdiff.in: New uninstalled script template.
7957 * tests/runtestfedabipkgdiff.py.in (counter)
7958 (temp_file_or_dir_prefix, UtilsTest, RPMTest, LocalRPMTest)
7959 (RunAbipkgdiffTest, GetPackageLatestBuildTest, DownloadRPMTest)
7960 (BrewListRPMsTest, AssertionHelper, MockGlobalConfig)
7961 (BUILT_ABIPKGDIFF, CompareABIFromCommandLineTest): Remove these
7962 classes, global variables and functions.
7963 (FEDABIPKGDIFF, TEST_SRC_DIR, TEST_BUILD_DIR, INPUT_DIR)
7964 (OUTPUT_DIR, FEDABIPKGDIFF_TEST_SPECS): New global variables.
7965 (ensure_output_dir_created, run_fedabipkgdiff_tests, main): New
7967 * tests/test-diff-pkg.cc (in_out_specs): Add
7968 tests/data/test-diff-pkg/test-dbus-glib-0.80-3.fc12.x86_64-report-0.txt
7969 to the set of reference outputs to consider.
7970 * tests/Makefile.am: Add non-installed script mockfedabipkgdiff to
7971 source distribution. Also added
7972 tests/data/test-diff-pkg/test-dbus-glib-0.80-3.fc12.x86_64-report-0.txt,
7973 tests/data/test-fedabipkgdiff/test0-from-fc20-to-fc23-dbus-glib-report-0.txt,
7974 tests/data/test-fedabipkgdiff/test1-from-fc20-to-dbus-glib-0.106-1.fc23.x86_64-report-0.txt,
7975 tests/data/test-fedabipkgdiff/test2-dbus-glib-0.100.2-2.fc20--dbus-glib-0.106-1.fc23-report-0.txt
7977 tests/data/test-fedabipkgdiff/test3-dbus-glib-0.100.2-2.fc20.i686--dbus-glib-0.106-1.fc23.i686-report-0.txt
7978 to source distribution.
7980 2016-07-13 Dodji Seketeli <dodji@redhat.com>
7982 Fix spurious type size change report for distinct_diff
7983 * src/abg-comparison.cc (report_size_and_alignment_changes):
7984 Report size change only when the sizes are different.
7985 * tests/data/test-diff-filter/test33-report-0.txt: Adjust.
7987 2016-07-13 Dodji Seketeli <dodji@redhat.com>
7989 Bug 20199 - Consider integral type synonyms as being equal
7990 * src/abg-ir.cc (class integral_type): New class declaration and
7992 (operator|, operator&, operator&=): New non-member bitwise
7993 operators for integral_type.
7994 (parse_integral_type_modifier, parse_base_integral_type)
7995 (parse_integral_type_modifier): New static function definitions.
7996 (type_decl::type_decl): Use the parse_integral_type to parse an
7997 integral type out of the current type_decl being built and
7998 transform the current type name into a canonical form.
7999 * tests/data/test-abidiff/test-PR18791-v0.so.abi: Adjust.
8000 * tests/data/test-abidiff/test-PR18791-v1.so.abi: Likewise.
8001 * tests/data/test-diff-filter/test30-pr18904-rvalueref-report0.txt: Likewise.
8002 * tests/data/test-diff-filter/test30-pr18904-rvalueref-report1.txt: Likewise.
8003 * tests/data/test-diff-filter/test33-report-0.txt: Likewise.
8004 * tests/data/test-diff-filter/test34-report-0.txt: Likewise.
8005 * tests/data/test-diff-pkg/libICE-1.0.6-1.el6.x86_64.rpm--libICE-1.0.9-2.el7.x86_64.rpm-report-0.txt: Likewise.
8006 * tests/data/test-read-dwarf/test10-pr18818-gcc.so.abi: Likewise.
8007 * tests/data/test-read-dwarf/test11-pr18828.so.abi: Likewise.
8008 * tests/data/test-read-dwarf/test12-pr18844.so.abi: Likewise.
8009 * tests/data/test-read-dwarf/test13-pr18894.so.abi: Likewise.
8010 * tests/data/test-read-dwarf/test14-pr18893.so.abi: Likewise.
8011 * tests/data/test-read-dwarf/test15-pr18892.so.abi: Likewise.
8012 * tests/data/test-read-dwarf/test16-pr18904.so.abi: Likewise.
8013 * tests/data/test-read-dwarf/test17-pr19027.so.abi: Likewise.
8014 * tests/data/test-read-dwarf/test18-pr19037-libvtkRenderingLIC-6.1.so.abi: Likewise.
8015 * tests/data/test-read-dwarf/test19-pr19023-libtcmalloc_and_profiler.so.abi: Likewise.
8016 * tests/data/test-read-dwarf/test20-pr19025-libvtkParallelCore-6.1.so.abi: Likewise.
8017 * tests/data/test-read-dwarf/test21-pr19092.so.abi: Likewise.
8018 * tests/data/test-read-dwarf/test22-pr19097-libstdc++.so.6.0.17.so.abi: Likewise.
8019 * tests/data/test-read-dwarf/test9-pr18818-clang.so.abi: Likewise.
8021 2016-07-08 Dodji Seketeli <dodji@redhat.com>
8023 Bug 20332 - too many ...'s counted as parameters
8024 * src/abg-dwarf-reader.cc (build_function_type): Create a variadic
8025 parameter just for the first DW_TAG_unspecified_parameters seen.
8026 * tests/data/test-diff-filter/test30-pr18904-rvalueref-report0.txt: Adjust.
8027 * tests/data/test-diff-filter/test30-pr18904-rvalueref-report1.txt: Adjust.
8028 * tests/data/test-read-dwarf/test16-pr18904.so.abi: Adjust.
8030 2016-07-06 Dodji Seketeli <dodji@redhat.com>
8032 Better recognize qualified void type
8033 * include/abg-ir.h (environment::is_void_type): Declare new member
8035 * src/abg-ir.cc (environment::is_void_type): Define new member
8037 * src/abg-dwarf-reader.cc (maybe_strip_qualification): Strip const
8038 qualifier from const void.
8039 * tests/data/test-diff-filter/test34-libjemalloc.so.2-gcc-6.1.0:
8041 * tests/data/test-diff-filter/test34-libjemalloc.so.2-intel-16.0.3: Likewise.
8042 * tests/data/test-diff-filter/test34-report-0.txt: New reference output.
8043 * tests/data/Makefile.am: Add the new files above to the source
8045 * tests/test-diff-filter.cc (in_out_specs): Compare the two new
8047 * tests/data/test-diff-filter/test30-pr18904-rvalueref-report0.txt: Adjust.
8048 * tests/data/test-diff-filter/test30-pr18904-rvalueref-report1.txt: Adjust.
8049 * tests/data/test-diff-pkg/tbb-4.1-9.20130314.fc22.x86_64--tbb-4.3-3.20141204.fc23.x86_64-report-0.txt: Adjust.
8050 * tests/data/test-diff-pkg/tbb-4.1-9.20130314.fc22.x86_64--tbb-4.3-3.20141204.fc23.x86_64-report-1.txt: Adjust.
8051 * tests/data/test-read-dwarf/test1.abi: Adjust.
8052 * tests/data/test-read-dwarf/test10-pr18818-gcc.so.abi: Adjust.
8053 * tests/data/test-read-dwarf/test11-pr18828.so.abi: Adjust.
8054 * tests/data/test-read-dwarf/test12-pr18844.so.abi: Adjust.
8055 * tests/data/test-read-dwarf/test13-pr18894.so.abi: Adjust.
8056 * tests/data/test-read-dwarf/test14-pr18893.so.abi: Adjust.
8057 * tests/data/test-read-dwarf/test15-pr18892.so.abi: Adjust.
8058 * tests/data/test-read-dwarf/test16-pr18904.so.abi: Adjust.
8059 * tests/data/test-read-dwarf/test17-pr19027.so.abi: Adjust.
8060 * tests/data/test-read-dwarf/test18-pr19037-libvtkRenderingLIC-6.1.so.abi: Adjust.
8061 * tests/data/test-read-dwarf/test19-pr19023-libtcmalloc_and_profiler.so.abi: Adjust.
8062 * tests/data/test-read-dwarf/test20-pr19025-libvtkParallelCore-6.1.so.abi: Adjust.
8063 * tests/data/test-read-dwarf/test21-pr19092.so.abi: Adjust.
8064 * tests/data/test-read-dwarf/test22-pr19097-libstdc++.so.6.0.17.so.abi: Adjust.
8065 * tests/data/test-read-dwarf/test9-pr18818-clang.so.abi: Adjust.
8067 2016-07-05 Dodji Seketeli <dodji@redhat.com>
8069 Bug 20194 - Fail to recognize void type represented by DW_TAG_base_type
8070 * src/abg-dwarf-reader.cc (build_type_decl): Recognize a
8071 DW_TAG_base_type of size zero and of name "void" as a void
8073 * tests/data/test-diff-filter/test33-libelf.so.0.8.13-gcc: New
8075 * tests/data/test-diff-filter/test33-libelf.so.0.8.13-intel16.0.3: Likewise.
8076 * tests/data/test-diff-filter/test33-report-0.txt: New reference output.
8077 * tests/data/Makefile.am: Add the new files above to source
8079 * tests/test-diff-filter.cc (in_out_specs): Make this test harness
8080 run over the new test inputs above.
8082 2016-07-04 Dodji Seketeli <dodji@redhat.com>
8084 Add a new overload for is_type_decl
8085 * include/abg-fwd.h (is_type_decl): Declare a new overload
8086 * src/abg-ir.cc (is_type_decl): Define a new overload.
8087 (function_decl::parameter::get_pretty_representation): Adjust.
8089 2016-06-29 Chenxiong Qi <cqi@redhat.com>
8091 Add --abipkgdiff option in manual and bash completion
8092 * doc/manuals/fedabipkgdiff.rst: Add description of --abipkgdiff
8093 option. Reformat paragraph.
8094 * bash-completion/fedabipkgdiff: Add --abipkgdiff
8096 2016-06-29 Chenxiong Qi <cqi@redhat.com>
8098 Add fedabipkgdiff bash completion to dist
8099 * bash-completion/Makefile.am: Add fedabipkgdiff
8100 * bash-completion/fedabipkgdiff: Change mode to 775
8102 2016-06-29 Chenxiong Qi <cqi@redhat.com>
8104 Update bash completion for fedabipkgdiff
8105 * bash-completion/fedabipkgdiff: New bash completion file.
8107 2016-06-29 Dodji Seketeli <dodji@redhat.com>
8109 Bump version number to 1.0.rc6
8110 * configure.ac: Bump version number to 1.0.rc6
8112 2016-06-29 Dodji Seketeli <dodji@redhat.com>
8114 Update web page for 1.0.rc5
8115 * doc/website/mainpage.txt: Update web page.
8117 2016-06-27 Dodji Seketeli <dodji@redhat.com>
8119 Update ChangeLog for 1.0.rc5
8120 * ChangeLog: Update by doing "make update-changelog" in the build
8123 2016-06-27 Dodji Seketeli <dodji@redhat.com>
8125 Update NEWS file in preparation for 1.0.rc5
8126 * NEWS: update with the edited content of the command:
8127 git shortlog libabigail-1.0.rc4..HEAD
8129 2016-06-27 Dodji Seketeli <dodji@redhat.com>
8131 Fix python interpreter path for el6
8132 * tests/runtestdefaultsupprs.py.in: Use the python interpreter at
8133 /usr/bin/python, not the one at /bin/python.
8135 2016-06-24 Dodji Seketeli <dodji@redhat.com>
8137 Misc cleanup in abg-reader.cc
8138 * src/abg-reader.cc (read_context::push_decl_to_current_scope):
8139 Pass the decl smart pointer by value.
8141 2016-06-22 Dodji Seketeli <dodji@redhat.com>
8143 Use ODR-based optimization on C/C++ translation unit only
8144 * src/abg-ir.cc (strip_typedef): Set the translation unit of the
8146 (type_base::get_canonical_type_for): Perform the ODR-based
8147 optimization only for ABI artifact in C and C++ language
8149 * src/abg-dwarf-reader.cc (build_ir_node_from_die): Assert that
8150 the new ABI artifact has its translation unit set.
8151 * src/abg-reader.cc (read_context::{push_decl_to_current_scope,
8152 push_and_key_type_decl}): Set the translation unit of the current
8153 decl, irrespective of if it was added to the current scope or not.
8154 Assert that the decl that was newly pushed to the current scope is
8155 added to the current translation unit.
8157 2016-06-10 Dodji Seketeli <dodji@redhat.com>
8159 Misc white space and comment cleanups
8160 * include/abg-ir.h (typedef type_or_decl_base): Cleanup comment.
8161 * src/abg-ir.cc (struct type_or_decl_base::priv): Fix comment.
8163 2016-06-10 Dodji Seketeli <dodji@redhat.com>
8165 Cleanup function_decl::parameter::get_pretty_representation
8167 (function_decl::parameter::get_pretty_representation): Assert that
8168 the environment is always non-nil. Then no needs to check for it
8169 being non-nil anymore. Use is_type_decl instead of
8170 dynamic_pointer_cast.
8172 2016-06-07 Chenxiong Qi <cqi@redhat.com>
8174 Fix package NVR comparison in fedabipkgdiff
8175 * configure.ac: Add new dependency.
8176 * tests/runtestfedabipkgdiff.py.in (builds): Add new builds for
8177 running tests to test selecting latest build from a package.
8178 (packages): Add new package gnutls.
8179 (GetPackageLatestBuildTest.{test_get_latest_one,
8180 test_cannot_find_a_latest_build_with_invalid_distro}): Use new
8181 builds of package gnutls to run tests.
8182 * tools/fedabipkgdiff (cmp_nvr): New function used to compare nvrs
8183 by Python built-in function sorted.
8184 (Brew.listBuilds): Use the new cmp_nvr function.
8186 2016-06-06 Chenxiong Qi <cqi@redhat.com>
8188 Bug 20135 - Make fedabipkgdiff compare ABIs using devel packages
8189 * doc/manuals/fedabipkgdiff.rst: Add documentation for the new
8190 --no-devel-pkg command line option, as well as for the new default
8191 behaviour of taking devel packages into account during ABI
8193 * tools/fedabipkgdiff (PkgInfo): Add new attribute
8195 (RPM.is_devel): New property to determine if rpm is a
8196 development package.
8197 (LocalRPM._find_rpm): New method to find a specific rpm.
8198 (LocalRPM.find_debuginfo): Use new method _find_rpm to find
8200 (LocalRPM.find_devel): New method to find an associated
8201 development package.
8202 (Brew.select_rpms_from_a_build): RPMs selector method is
8203 changed to select development package also.
8204 (abipkgdiff): Construct and run abipkgdiff with and without
8205 --devel-pkg[12] options.
8206 (magic_construct): Construct PkgInfo with development package.
8207 (run_abipkgdiff): Run abipkgdiff against rpms with development
8209 (diff_local_rpm_with_latest_rpm_from_koji): Find development
8210 package, and call method abipkgdiff with development package.
8211 (build_commandline_args_parser): add new option --no-devel-pkg.
8212 * tests/runtestfedabipkgdiff.py.in (packages): Add new package
8214 (builds): Add new builds of nss-utils, nss-util-3.12.6-1.fc14
8215 and nss-util-3.24.0-2.0.fc25.
8216 (rpms): Add new associated rpms of the two new builds.
8217 (AssertionHelper.assert_functions_changes_summary): New method
8218 to match and assert functions changes summary.
8219 (AssertionHelper.assert_abi_comparison_result): Changed to
8220 support to help assert functions changes summary.
8221 (MockGlobalConfig.{no_devel_pkg, check_all_subpackages}): New
8222 fake options with default value for running tests.
8223 (RPMTest.setUp): add new development package for running test
8225 (RPMTest.test_is_devel): New test to test is_devel property.
8226 (RunAbipkgdiffTest.setUp): Add new development packages for
8228 (RunAbipkgdiffTest.{test_all_success, test_all_failure,
8229 test_partial_failure}): Mock global config.
8230 (RunAbipkgdiffWithDSOOnlyOptionTest): Removed.
8231 (CompareABIFromCommandLineTest.test_compare_with_no_devel_pkg):
8232 New test to test fedabipkgdiff with or without --no-devel-pkg
8234 * tests/data/Makefile.am: Add new rpms.
8235 * tests/data/test-fedabipkgdiff/packages/nss-util/3.12.6/1.fc14/
8236 x86_64/nss-util-3.12.6-1.fc14.x86_64.rpm: New rpm for running
8238 * tests/data/test-fedabipkgdiff/packages/nss-util/3.12.6/1.fc14/
8239 x86_64/nss-util-debuginfo-3.12.6-1.fc14.x86_64.rpm: New rpm for
8241 * tests/data/test-fedabipkgdiff/packages/nss-util/3.12.6/1.fc14/
8242 x86_64/nss-util-devel-3.12.6-1.fc14.x86_64.rpm: New rpm for
8244 * tests/data/test-fedabipkgdiff/packages/nss-util/3.24.0/2.0.fc25/
8245 x86_64/nss-util-3.24.0-2.0.fc25.x86_64.rpm: New rpm for running
8247 * tests/data/test-fedabipkgdiff/packages/nss-util/3.24.0/2.0.fc25/
8248 x86_64/nss-util-debuginfo-3.24.0-2.0.fc25.x86_64.rpm: New rpm
8250 * tests/data/test-fedabipkgdiff/packages/nss-util/3.24.0/2.0.fc25/
8251 x86_64/nss-util-devel-3.24.0-2.0.fc25.x86_64.rpm: New rpm for
8254 2016-06-03 Dodji Seketeli <dodji@redhat.com>
8256 Improve python modules detection
8257 * configure.ac: Include
8258 autoconf-archive/ax_check_python_modules.m4 rather than
8259 autoconf-archive/ax_python_module.m4. Use AX_CHECK_PYTHON_MODULES
8260 rather than AX_PYTHON_MODULE.
8261 * Makefile.am: Add the new file
8262 autoconf-archive/ax_check_python_modules.m4 to source distribution
8263 and remove the older autoconf-archive/ax_python_module.m4 one.
8264 * autoconf-archive/ax_check_python_modules.m4: New file.
8265 * autoconf-archive/ax_python_module.m4: Remove.
8267 2016-05-30 Chenxiong Qi <cqi@redhat.com>
8269 Add integration tests for fedabipkgdiff
8270 * configure.ac: do not detect shutil module.
8271 * tests/runtestfedabipkgdiff.py.in: do not import shutil
8273 (BUILT_ABIPKGDIFF): new global variable to reference the
8274 abipkgdiff built from source code, as the new test case' tests
8275 require this command directly rather than mocking the
8277 (test_data_dir): convert variable name to uppercase,
8278 reference to the test data directory by absolute path instead of
8280 (TEST_TOPDIR): new global variable to use data directory as the
8281 topdir passed to fedabpkgdiff to download rpms.
8282 (TEST_DOWNLOAD_CACHE_DIR): new global variable referencing a
8283 fake download cache directory for tests only.
8284 (packages, builds, rpms): new global variables as a fake
8285 storage holding packages, builds and rpms.
8286 (AssertionHelper): new class helping to assert abipkgdiff
8288 (MockClientSession): new class to mock koji.ClientSession.
8289 (MockGlobalConfig.abipkgdiff): set this option to global
8290 variable BUILT_ABIPKGDIFF.
8291 (MockKojiClientSessin): removed.
8292 (mock_get_session): removed.
8293 (GetPackageLatestBuildTest.{test_get_latest_one,
8294 test_cannot_find_a_latest_build_with_invalid_distro,
8295 test_cannot_find_a_latest_build_with_invalid_distro}): mock
8296 koji.ClientSession with new class MockClientSession. Remove
8297 invalid documentation from docstring. Use new package rather
8299 (DownloadRPMTest.setUp): remove self.download_dir and use global
8300 TEST_DOWNLOAD_CACHE_DIR.
8301 (DownloadRPMTest.tearDown): do not remove download cache
8303 (DownloadRPMTest.make_remote_file_url): do not omit positional
8304 argument specifiers in string format.
8305 (DownloadRPMTest.{test_succeed_to_download_a_rpm,
8306 test_failed_to_download_a_rpm}): set fake download cache
8307 directory to mocked get_download_dir in mock.patch decorator.
8308 (BrewListRPMsTest.test_select_specific_rpms): use new
8309 MockClientSession to mock koji.ClientSession. Rewrite test by
8310 using the new package listed in global variable packages.
8311 (RunAbipkgdiffWithDSOOnlyOptionTest.{test_abipkgdiff_with_dso_only,
8312 test_abipkgdiff_without_dso_only}): set fake download cache
8313 directory to mocked get_download_dir in mock.patch decorator.
8314 (CompareABIFromCommandLineTest): new integration test case.
8315 * tests/data/test-fedabipkgdiff/packages/dbus-glib/0.100.2/2.fc20/
8316 i686/dbus-glib-0.100.2-2.fc20.i686.rpm: new rpm for running tests.
8317 * tests/data/test-fedabipkgdiff/packages/dbus-glib/0.100.2/2.fc20/
8318 i686/dbus-glib-debuginfo-0.100.2-2.fc20.i686.rpm: new rpm for
8320 * tests/data/test-fedabipkgdiff/packages/dbus-glib/0.100.2/2.fc20/
8321 i686/dbus-glib-devel-0.100.2-2.fc20.i686.rpm: new rpm for
8323 * tests/data/test-fedabipkgdiff/packages/dbus-glib/0.100.2/2.fc20/
8324 x86_64/dbus-glib-0.100.2-2.fc20.x86_64.rpm: new rpm for running
8326 * tests/data/test-fedabipkgdiff/packages/dbus-glib/0.100.2/2.fc20/
8327 x86_64/dbus-glib-debuginfo-0.100.2-2.fc20.x86_64.rpm: new rpm
8329 * tests/data/test-fedabipkgdiff/packages/dbus-glib/0.100.2/2.fc20/
8330 x86_64/dbus-glib-devel-0.100.2-2.fc20.x86_64.rpm: new rpm for
8332 * tests/data/test-fedabipkgdiff/packages/dbus-glib/0.106/1.fc23/
8333 i686/dbus-glib-0.106-1.fc23.i686.rpm: new rpm for running tests.
8334 * tests/data/test-fedabipkgdiff/packages/dbus-glib/0.106/1.fc23/
8335 i686/dbus-glib-debuginfo-0.106-1.fc23.i686.rpm: new rpm for
8337 * tests/data/test-fedabipkgdiff/packages/dbus-glib/0.106/1.fc23/
8338 i686/dbus-glib-devel-0.106-1.fc23.i686.rpm: new rpm for running
8340 * tests/data/test-fedabipkgdiff/packages/dbus-glib/0.106/1.fc23/
8341 x86_64/dbus-glib-0.106-1.fc23.x86_64.rpm: new rpm for running
8343 * tests/data/test-fedabipkgdiff/packages/dbus-glib/0.106/1.fc23/
8344 x86_64/dbus-glib-debuginfo-0.106-1.fc23.x86_64.rpm: new rpm for
8346 * tests/data/test-fedabipkgdiff/packages/dbus-glib/0.106/1.fc23/
8347 x86_64/dbus-glib-devel-0.106-1.fc23.x86_64.rpm: new rpm for
8349 * tests/data/Makefile.am: add new rpms.
8351 2016-05-31 Dodji Seketeli <dodji@redhat.com>
8353 Bug 19967 - System-level suppressions for glibc
8354 * default.abignore: Add initial suppression specifications for
8357 2016-05-31 Dodji Seketeli <dodji@redhat.com>
8359 Escape all characters when reading a string in ini files
8360 * src/abg-ini.cc (read_context::peek): Take an output parameter to
8361 tell the caller when this function escaped the returned
8362 character. Added an overload without this new parameter.
8363 (read_context::read_string): Accept all characters as part of the
8365 * tests/data/test-diff-suppr/test7-var-suppr-9.suppr: New test
8367 * tests/data/test-diff-suppr/test7-var-suppr-report-9.txt: New
8368 test reference output.
8369 * tests/data/Makefile.am: Add the files above to source
8371 * tests/test-diff-suppr.cc (in_out_spec): Run a new comparison of
8372 libtest7-var-suppr-v{0,1}.so this time using the new
8373 test7-var-suppr-9.suppr specification that exercices a string with
8374 the escaped characters that we were having difficulty with.
8376 2016-05-31 Dodji Seketeli <dodji@redhat.com>
8378 Don't require all version symbol sections to present
8379 * src/abg-dwarf-reader.cc (get_symbol_versionning_sections): Allow
8380 returning just some of the three version-related section, not
8381 necessarily all of them. Adjust comment.
8382 (get_version_for_symbol): Be ready to not necessarily having the
8383 three version-related sections available.
8385 2016-05-30 Dodji Seketeli <dodji@redhat.com>
8387 Bug 20180 - Support system-wide suppression specifications
8388 * doc/manuals/abidiff.rst: Document the default suppression
8389 scheme, its interaction with the --supprs option and the new
8390 --no-default option.
8391 * doc/manuals/abipkgdiff.rst: Likewise.
8392 * doc/manuals/fedabipkgdiff.rst: Likewise.
8393 * configure.ac: Generate the tests/runtestdefaultsupprs.py file
8394 from the new tests/runtestdefaultsupprs.py.in template.
8395 * default.abignore: New file.
8396 * Makefile.am: Add it to source distribution.
8397 * src/Makefile.am: Define the ABIGAIL_ROOT_SYSTEM_LIBDIR
8398 preprocessor macro that is set the value of the $libdir autotools
8400 * include/abg-tools-utils.h: Update copyright years.
8401 (get_system_libdir, get_default_system_suppression_file_path)
8402 (get_default_user_suppression_file_path)
8403 (load_default_system_suppressions)
8404 (load_default_user_suppressions): Declare new functions
8405 * src/abg-tools-utils.cc (get_system_libdir)
8406 (get_default_system_suppression_file_path)
8407 (get_default_user_suppression_file_path)
8408 (load_default_system_suppressions)
8409 (load_default_user_suppressions): Define new functions.
8410 (is_regular_file): Amend this so that it return true for symlinks
8411 to regular files too.
8412 (is_dir): Amend this so that it returns true for symlinks to
8414 * tools/abidiff.cc (options::no_default_supprs): New data member.
8415 (options::options): Initialize the new data member.
8416 (display_usage): Display a new help string for the new
8417 --no-default-suppression command line option.
8418 (parse_command_line): Parse this new command line option.
8419 (set_diff_context_from_opts): Load the default suppression
8420 specifications, unless --no-default-suppression or --supprs was
8422 * tools/abipkgdiff.cc (options::no_default_supprs): New data
8424 (options::options): Initialize the new data member.
8425 (parse_command_line): Parse the new --no-default-suppression
8426 command line option.
8427 (main): Load the default suppression specifications, unless
8428 --no-default-suppression or --supprs was provided.
8429 * tools/fedabipkgdiff (abipkgdiff): Add --no-default-suppression
8430 to the invocation of abipkgdiff if it was provided on the command
8432 (build_commandline_args_parser): Parse the new
8433 --no-default-suppression command line option.
8434 * tests/runtestdefaultsupprs.py.in: New test harness template.
8435 * tests/Makefile.am: Add the new runtestdefaultsupprs.py to the
8437 * tests/data/test-default-supprs/test0-type-suppr-0.suppr: New
8439 * tests/data/test-default-supprs/test0-type-suppr-report-0.txt: Likewise.
8440 * tests/data/test-default-supprs/test0-type-suppr-v0.o: Likewise.
8441 * tests/data/test-default-supprs/test0-type-suppr-v1.o: Likewise.
8442 * tests/data/test-default-supprs/dirpkg-1-dir-report-0.txt:
8444 * tests/data/test-default-supprs/dirpkg-1-dir1: Likewise.
8445 * tests/data/test-default-supprs/dirpkg-1-dir2: Likewise.
8446 * tests/data/Makefile.am: Add new the new tests input above to
8448 * tests/runtestcanonicalizetypes.sh.in: Pass
8449 --no-default-suppression to abidiff invocations.
8450 * tests/runtestdefaultsupprs.py.in: Likewise.
8451 * tests/test-abidiff-exit.cc: Likewise.
8452 * tests/test-diff-dwarf-abixml.cc: Likewise.
8453 * tests/test-diff-filter.cc: Likewise.
8454 * tests/test-diff-suppr.cc: Likewise.
8455 * tools/abidiff.cc: Likewise.
8457 2016-05-30 Dodji Seketeli <dodji@redhat.com>
8459 Add --abipkgdiff option to fedabipkgdiff
8460 * tools/fedabipkgdiff (build_path_to_abipkgdiff): Define new
8462 (abipkgdiff): Invoke the new build_path_to_abipkgdiff() here.
8463 (build_commandline_args_parser): Parse the new --abipkgdiff
8466 2016-05-28 Dodji Seketeli <dodji@redhat.com>
8468 Better diagnostics when abipkgdiff has an extra argument
8469 * tools/abipkgdiff.cc (options::wrong_arg): New data member.
8470 (parse_command_line): Set options::wrong_arg
8471 to the wrong argument passed.
8472 (main): Tell wrong argument case apart, and report it.
8474 2016-05-26 Dodji Seketeli <dodji@redhat.com>
8476 Fix suppr spec wording in abipkgdiff manual
8477 * doc/manuals/abipkgdiff.rst: Fix the wording for the --suppr
8480 2016-05-26 Dodji Seketeli <dodji@redhat.com>
8482 Update reference to tools in libabigail-concepts manual
8483 * doc/manuals/libabigail-concepts.rst: Do not refer just to
8484 abidiff when talking about suppression specification. Also
8485 refer to abipkgdiff and other tools.
8487 2016-05-30 Dodji Seketeli <dodji@redhat.com>
8489 Fix some wording in the Libabigail overview manual page
8490 * doc/manuals/libabigail-overview.rst: Cleanup some confusion
8491 about Abigail-the-framework and libabigail-the-library.
8493 2016-05-25 Dodji Seketeli <dodji@redhat.com>
8495 Add test data for tests/runtestfedabipkgdiff.py
8496 * tests/data/test-fedabipkgdiff/dbus-glib-0.104-3.fc23.x86_64.rpm:
8498 * tests/data/test-fedabipkgdiff/dbus-glib-0.80-3.fc12.x86_64.rpm: Likewise.
8499 * tests/data/test-fedabipkgdiff/dbus-glib-debuginfo-0.104-3.fc23.x86_64.rpm:
8501 * tests/data/test-fedabipkgdiff/dbus-glib-debuginfo-0.80-3.fc12.x86_64.rpm:
8504 2016-05-25 Dodji Seketeli <dodji@redhat.com>
8506 Add a 'check-valgrind' target to the top-most Makefile.am
8507 * Makefile.am (check-valgrind): Add this new target here.
8509 2016-05-21 Chenxiong Qi <cqi@redhat.com>
8511 Bug 20085 - Add --dso-only option to fedabipkgdiff
8512 * tools/fedabipkgdiff: Do not import shlex anymore.
8513 (ABIDIFF_OK, ABIDIFF_ERROR, ABIDIFF_USAGE_ERROR)
8514 (ABIDIFF_ABI_CHANGE): New global constant variables.
8515 (abipkgdiff): Pass the --dso-only option to the abipkgdiff command
8516 line tool, if that option was passed to fedabipkgdiff. Build this
8517 abipkgdiff command invocation from an array of strings, rather
8518 than from formatting a string. This makes us get rid of the shlex
8519 module. Fix typo in dry-run logged string. If there was an
8520 internal error reported by abipkgdiff, report it to stderr.
8521 (build_commandline_args_parser): Parse the --dso-only command line
8523 * tests/runtestfedabipkgdiff.py.in (fedabipkgdiff_mod): Fix a typo
8524 in initializing this global variable.
8525 (test_data_dir): New global variable, that is used to reference
8526 tests/data/test-fedabipkgdiff/.
8527 (RunAbipkgdiffTest.{test_all_success, test_partial_failure}): Fix
8529 (Mockglobalconfig.{koji_topdir, dso_only}): New data members.
8530 (GetPackageLatestBuildTest.{test_get_latest_one,
8531 test_cannot_find_a_latest_build_with_invalid_distro,
8532 test_succeed_to_download_a_rpm, test_failed_to_download_a_rpm}):
8534 (BrewListRPMsTest.test_select_specific_rpms): Fix typo.
8535 (RunAbipkgdiffWithDSOOnlyOptionTest): New test case class.
8536 * doc/manuals/fedabipkgdiff.rst: update document for this new
8538 * tests/data/test-fedabipkgdiff/dbus-glib-0.104-3.fc23.x86_64.rpm:
8539 New symbolic link to
8540 test-diff-pkg/dbus-glib-0.104-3.fc23.x86_64.rpm.
8541 * tests/data/test-fedabipkgdiff/dbus-glib-0.80-3.fc12.x86_64.rpm:
8542 New symbolic link to
8543 test-diff-pkg/dbus-glib-0.80-3.fc12.x86_64.rpm.
8544 * tests/data/test-fedabipkgdiff/dbus-glib-debuginfo-0.104-3.fc23.x86_64.rpm:
8545 New symbolic link to
8546 test-diff-pkg/dbus-glib-debuginfo-0.104-3.fc23.x86_64.rpm.
8547 * tests/data/test-fedabipkgdiff/dbus-glib-debuginfo-0.80-3.fc12.x86_64.rpm:
8548 New symbolic link to
8549 test-diff-pkg/dbus-glib-debuginfo-0.80-3.fc12.x86_64.rpm.
8550 * tests/data/Makefile.am: add tests/data/test-fedabipkgdiff so
8551 that this data directory and all things within it can be included
8554 2016-05-24 Sinny Kumari <sinny@redhat.com>
8556 Change parent directory for keeping extracted packages in abipkgdiff
8557 * tools/abipkgdiff.cc (extracted_packages_parent_dir): Change
8558 TMPDIR environment variable to XDG_CACHE_HOME and default
8559 temporary parent directory to $HOME/.cache/libabigail/
8561 2016-05-20 Dodji Seketeli <dodji@redhat.com>
8563 Make abi{pkg}diff filter out changes about private types
8564 * include/abg-comp-filter.h: Update copyright year.
8565 * src/abg-comp-filter.cc (has_virtual_mem_fn_change): Make this
8566 static function become exported.
8567 (has_virtual_mem_fn_change): Declare new function.
8568 * include/abg-suppression.h
8569 (suppression_base::{get,set}_is_artificial): Declare new
8571 (type_suppression::get_source_locations_to_keep): Return an
8572 unordered set of strings, not a vector. Add a non-const overload.
8573 (type_suppression::set_source_locations_to_keep): Set an unordered
8574 set of strings, not a vector.
8575 * src/abg-suppression.cc (suppression_base::priv::is_artificial_):
8577 (suppression_base::priv::priv): Initialize the new data member.
8578 (suppression_base::{get,set}_is_artificial): Define new accessors.
8579 (type_suppression::priv::source_locations_to_keep_): Change the
8580 vector of strings representing source file names into unordered
8582 (type_suppression::get_source_locations_to_keep): Return an
8583 unordered set of strings, not a vector. Define a non-const
8585 (type_suppression::set_source_locations_to_keep): Set an unordered
8586 set of strings, not a vector.
8587 (type_suppression::suppresses_diff): Make this suppress virtual
8588 member function diffs if the enclosing type of the changed virtual
8589 member is suppressed by the current type_suppression.
8590 (read_type_suppression): Adjust to use the fact that the source
8591 locations are not stored in an unordered set, not in a vector
8592 anymore. Otherwise, using a vector here make things too slow.
8593 (type_suppression::suppresses_type): Likewise. Also, If the type
8594 we are looking at has no location because it's a true opaque type
8595 and if the current suppression is an artificial suppression that
8596 is meant to suppress change reports about non-public types, then
8598 * include/abg-tools-utils.h (gen_suppr_spec_from_headers): Declare
8599 new public function.
8600 * src/abg-tools-utils.cc (PRIVATE_TYPES_SUPPR_SPEC_NAME): Define a
8601 new constant variable.
8602 (handle_fts_entry): Define new static function.
8603 (gen_suppr_spec_from_headers): Define new public function.
8604 * src/abg-comparison.cc
8605 (corpus_diff::priv::apply_suppressions_to_added_removed_fns_vars):
8606 If a type suppression suppresses a given class C, make it change
8607 added/removed virtual functions whose enclosing type is C.
8608 * tools/abidiff.cc (options::{headers_dir1, headers_dir2}): New
8610 (display_usage): Add help strings for --headers-dir1 and
8612 (parse_command_line): Parse the new --headers-dir1 and
8613 --headers-dir2 options.
8614 (set_diff_context_from_opts): Generate suppression specifications
8615 to filter out changes on private types, if --headers-dir1 or
8616 --headers-dir2 is given.
8617 * tools/abipkgdiff.cc (options::{devel_package1, devel_package2}):
8619 (typedef package_sptr): New typedef.
8620 (enum package::kind): New enum.
8621 (package::kind_): New data member. This replaces ...
8622 (package::is_debug_info_): ... this data member.
8623 (package::{devel_package_, private_types_suppressions_}): New data
8625 (package::package): Adjust.
8626 (package::get_kind): Define new member function. This replaces
8628 (package::is_debug_info): ... this member function overload.
8629 (package::set_kind): Define new member functin. It replaces ...
8630 (package::is_debug_info): ... this member function overload.
8631 (package::{devel_package, private_types_suppressions}): Define new
8633 (package::erase_extraction_directies): Erase the sub-directory
8634 where development packages are extracted to.
8635 (compare_args::private_types_suppr{1,2}): New data members.
8636 (compare_args::compare_args): Adjust.
8637 (display_usage): Add help strings for --devel-pkg1/--devel-pkg2.
8638 (compare): Make the overload that compares elf files take private
8639 types suppressions. Add the private types suppressions to the
8641 (pthread_routine_compare): Adjust the call to compare.
8642 (maybe_create_private_types_suppressions): Define new static
8644 (pthread_routine_extract_pkg_and_map_its_content): If a devel
8645 package was specified for the main package then extract it in
8646 parallel with the other package extraction. When the extraction
8647 is done, create private types suppressions by visiting the
8648 directories that contain the header files.
8649 (compare): In the overload that compares packages by scheduling
8650 comparison of individual elf files that are in the packages, pass
8651 in the private type suppressions too.
8652 (parse_command_line): Parse the new --devel-pkg{1,2} command line
8654 (main): Associate the devel package to the main package, if the
8656 * doc/manuals/abidiff.rst: Add documentation about the new
8657 --headers-dir1 and --headers-dir2 options.
8658 * doc/manuals/abipkgdiff.rst: Likewise, add documentation about
8659 the new --devel-pkg1 and --devel-pkg2 libraries.
8660 * tests/data/test-diff-pkg/tbb-4.1-9.20130314.fc22.x86_64--tbb-4.3-3.20141204.fc23.x86_64-report-1.txt:
8661 New test reference output.
8662 * tests/data/test-diff-pkg/tbb-devel-4.1-9.20130314.fc22.x86_64.rpm:
8663 New test input package.
8664 * tests/data/test-diff-pkg/tbb-devel-4.3-3.20141204.fc23.x86_64.rpm: Likewise.
8665 * tests/test-diff-pkg.cc b/tests/test-diff-pkg.cc
8666 (InOutSpec::{first,second}_in_devel_package_path): New data
8668 (in_out_specs): Adjust. Also, add a new entry describing the new
8670 (test_task::perform): When the new test entry contains devel
8671 packages, pass them to abipkgdiff using the --devel1 and --devel2
8673 * tests/data/test-diff-suppr/test30-include-dir-v0/test30-pub-lib-v0.h:
8674 A new test input source code.
8675 * tests/data/test-diff-suppr/test30-include-dir-v1/test30-pub-lib-v1.h: Likewise.
8676 * tests/data/test-diff-suppr/test30-priv-lib-v0.cc: Likewise.
8677 * tests/data/test-diff-suppr/test30-priv-lib-v0.h: Likewise.
8678 * tests/data/test-diff-suppr/test30-priv-lib-v1.cc: Likewise.
8679 * tests/data/test-diff-suppr/test30-priv-lib-v1.h: Likewise.
8680 * tests/data/test-diff-suppr/test30-pub-lib-v0.cc: Likewise.
8681 * tests/data/test-diff-suppr/test30-pub-lib-v0.so: Add new test
8683 * tests/data/test-diff-suppr/test30-pub-lib-v1.cc: Add new test
8685 * tests/data/test-diff-suppr/test30-pub-lib-v1.so: Add new test
8687 * tests/data/test-diff-suppr/test30-report-0.txt: Add new test
8689 * tests/data/test-diff-suppr/test30-report-1.txt: Add new test
8691 * tests/test-diff-suppr.cc (InOutSpec::headers_dir{1,2}): New data
8693 (InOutSpec::abidiff_options): Renamed the bidiff_options data
8695 (in_out_specs): Adjust. Also, added the new test input above to
8697 (main): Adjust to invoke abidiff with the new --hd1 and --hd2
8698 options if the input specs for the tests has the new
8699 InOutSpec::headers_dir{1,2} data member set. Renamed bidiff into
8701 * tests/data/Makefile.am: Add the new test inputs to the source
8704 2016-05-24 Dodji Seketeli <dodji@redhat.com>
8706 Fix the number of removed functions in change report
8707 * src/abg-suppression.cc (corpus_diff::report): Show the net
8708 number of removed functions, not the total number of the removed
8711 2016-05-23 Dodji Seketeli <dodji@redhat.com>
8713 Document how to handle regression tests in CONTRIBUTING
8714 * CONTRIBUTING: Add a section about regression tests.
8715 * Makefile.am: Add a check-valgrind-recursive target.
8717 2016-05-21 Dodji Seketeli <dodji@redhat.com>
8719 Fix whitespaces in autotools files
8720 * configure.ac: Fix some white spaces.
8721 * tests/Makefile.am: Likewise.
8723 2016-05-22 Dodji Seketeli <dodji@redhat.com>
8725 Fix white space in abg-comparison.cc
8726 * src/abg-comparison.cc (struct diff_context::priv): Fix indentation.
8728 2016-05-21 Dodji Seketeli <dodji@redhat.com>
8730 Fix bash completion configure status
8731 * configure.ac: If bash completion is disabled, say so.
8733 2016-05-22 Dodji Seketeli <dodji@redhat.com>
8735 Enhance API doc for diff_context::add_diff
8736 * src/abg-comparison.cc (diff_context::add_diff): Enhance the API
8739 2016-05-20 Dodji Seketeli <dodji@redhat.com>
8741 Add missing API doc strings
8742 * src/abg-comparison.cc (diff::diff)
8743 (decl_diff_base::decl_diff_base, distinct_diff::distinct_diff)
8744 (base_diff::base_diff, scope_diff::scope_diff)
8745 (fn_parm_diff::fn_parm_diff)
8746 (function_type_diff::function_type_diff)
8747 (type_decl_diff::type_decl_diff, typedef_diff::typedef_diff)
8748 (translation_unit_diff::translation_unit_diff)
8749 (corpus_diff::corpus_diff): Add missing API doc strings.
8751 2016-05-20 Dodji Seketeli <dodji@redhat.com>
8753 Optimize out some shared_ptr use
8754 * include/abg-ir.h (pointer_type_def::get_naked_pointed_to_type):
8755 Declare new member function.
8756 * src/abg-ir.cc (pointer_type_def::priv::naked_pointed_to_type_):
8758 (pointer_type_def::priv::priv): Adjust to initialize the new data
8760 (pointer_type_def::pointer_type_def): Adjust to use the
8761 constructor pointer_type_def::priv::priv to initialize the
8762 pointed-to type (including its new naked pointer variant). So we
8763 do not have to initialize the priv_->pointed_to_type_ explicitely
8764 in the constructor anymore.
8765 (pointer_type_def::get_naked_pointed_to_type): Define new data
8767 (pointer_type_def::get_qualified_name): Use a naked pointer to the
8768 pointed-to type, rather than a smart pointer.
8770 2016-05-20 Dodji Seketeli <dodji@redhat.com>
8772 Light optimizations by passing reference to smart pointers around
8773 * include/abg-fwd.h (get_type_name): Take a reference to type_sptr.
8774 * src/abg-ir.cc (get_type_name): Take a reference to type_sptr.
8775 (suppression_base::priv::{get_file_name_regex,
8776 get_file_name_not_regex, get_soname_regex, get_soname_not_regex}):
8777 Return a reference to regex_t_sptr.
8779 2016-05-20 Dodji Seketeli <dodji@redhat.com>
8781 Minimize number of string::length calculation
8782 * src/abg-tools-utils.cc (string_ends_with): Call string::length
8783 just once on each instance of string that matters.
8785 2016-05-20 Dodji Seketeli <dodji@redhat.com>
8787 Avoid unnecessary computation of type name in suppression evaluation
8788 * src/abg-suppression.cc (type_suppression::suppresses_type): If
8789 neither the type suppression "name" or "name_regex" properties
8790 where provided in the suppression specification, then do not try
8791 to look at the type name.
8793 2016-05-22 Dodji Seketeli <dodji@redhat.com>
8795 Plug leak of diffs of member variables of class type
8796 * include/abg-comparison.h (diff_wptr, unordered_diff_sptr_set): New typedefs.
8797 (struct diff_sptr_hasher): Define new type.
8798 (diff_context::keep_diff_alive): Declare new member function.
8799 (diff::children_nodes): Return a vector of diff*, rather than a
8800 vector of diff_sptr.
8801 * src/abg-comparison.cc (diff_context::priv::live_diffs_): New
8803 (diff_context::keep_diff_alive): Define new data member.
8804 (diff::priv::children_): Make this be a vector of diff*, rather
8805 than a vector of diff_sptr.
8806 (diff_less_than_functor::operator()): Add a new overload for
8807 diff*. Make the existing overload of diff_sptr use the new one.
8808 (diff::children_nodes): Adjust;
8809 (diff::append_child_node): Make sure the child node is kept
8810 alive. Only add the naked pointer to the child node to the vector
8812 (diff::traverse): Adjust.
8813 (var_diff::priv::type_diff_): Make this be a weak pointer, rather
8814 than a shared pointer.
8815 (var_diff::type_diff): The var_diff::priv::type_diff_ data member
8816 is now a weak pointer, so make this accessor convert it to a
8818 (corpus_diff::priv::children_): Turn this into a vector of diff*,
8819 rather than a vector of diff_sptr.
8820 (corpus_diff::children_nodes): Adjust.
8821 (corpus_diff::append_child_node): Make sure the child node is kept
8822 alive. Only add the naked pointer to the child node to the vector
8824 (category_propagation_visitor::visit_end): Adjust.
8825 (suppression_categorization_visitor::visit_end): Adjust.
8826 (redundancy_marking_visitor::{visit_begin, visit_end}): Adjust.
8828 2016-05-20 Dodji Seketeli <dodji@redhat.com>
8830 Speedup diff node child insertion
8831 * src/abg-comparison.cc (corpus_diff::append_child_node): Insert
8832 the new child at the right point in the vector of children, so
8833 that it remains sorted.
8835 2016-05-21 Dodji Seketeli <dodji@redhat.com>
8837 Fix invocation of delete operator in test-read-dwarf.cc
8838 * tests/test-read-dwarf.cc (main): Call delete[], not delete.
8840 2016-05-22 Dodji Seketeli <dodji@redhat.com>
8842 Plug leak of debug info handles
8843 * configure.ac: Check the presence of dwarf_getalt in libdw. If
8844 it's present, define the preprocessor macro
8845 LIBDW_HAS_DWARF_GETALT. Update the autoconf configuration
8847 * src/abg-dwarf-reader.cc: Add config.h.
8848 (find_alt_debug_info_location): Factorize this out of ...
8849 (find_alt_debug_info): ... this function. Use dwarf_getalt if
8850 present, otherwise, keep using dwfl_standard_find_debuginfo. In
8851 the later case, return the file descriptor opened to access the
8852 alternate debug info, by parameter, so that the caller can fclose
8854 (read_context::alt_fd_): New data member.
8855 (read_context::read_context): Initialize the new alt_fd_ data
8857 (read_context::load_debug_info): Store the file descriptor used to
8858 access the alternate debug info into the new alt_fd_ data member.
8859 (read_context::~read_context): New desctructor.
8860 (get_soname_of_elf_file, get_type_of_elf_file): Free the elf
8862 (read_context::load_debug_info): Be paranoid in making sure we
8863 never override alt_dwarf_.
8864 * tests/data/test-alt-dwarf-file/test0-report.txt: Adjust.
8866 2016-05-22 Dodji Seketeli <dodji@redhat.com>
8868 Plug leak of shared private data of class_diff type
8869 * include/abg-comparison.h (class_diff::get_priv): Declare new
8871 (class_diff::get_priv): Define new member function.
8872 (class_diff::{chain_into_hierarchy, base_changes, deleted_bases,
8873 inserted_bases, changed_bases, base_changes, member_types_changes,
8874 member_types_changes, data_members_changes, inserted_data_members,
8875 deleted_data_members, member_fns_changes, changed_member_fns,
8876 member_fns_changes, deleted_member_fns, inserted_member_fns,
8877 member_fn_tmpls_changes, member_class_tmpls_changes,
8878 member_class_tmpls_changes, report}): Rather than accessing
8879 class_diff::priv directly, use the new class_diff::get_priv.
8881 2016-05-21 Dodji Seketeli <dodji@redhat.com>
8883 Remove circular ref from class_decl::priv::definition_of_declaration
8884 * include/abg-ir.cc (class_decl::get_definition_of_declaration):
8885 Return a shared pointer, rather than a reference to a shared pointer.
8886 * src/abg-ir.cc (class_decl::priv::definition_of_declaration_):
8887 Make this be a weak pointer.
8888 (class_decl::get_definition_of_declaration):
8889 Likewise. And return the shared pointer built out of the weak
8890 pointer we have in there now.
8892 2016-05-21 Dodji Seketeli <dodji@redhat.com>
8894 Plug leak of regex_t in suppression engine
8895 * include/abg-sptr-utils.h (build_sptr<T>): Declare an overload that
8896 allocates a T* and wraps it into a shared_ptr<T>.
8897 (build_sptr<regex_t>): Declare a specialization for regex_t.
8898 * src/abg-corpus.cc (build_sptr<regex_t>()): Define the
8899 specialization here.
8900 * src/abg-suppression.ccp
8901 (suppression_base::priv::{get_file_[not]_name_regex,
8902 get_soname_[not]_regex}): Use the new build_sptr<regex_t>().
8903 (type_suppression::priv::{get_type_name_regex,
8904 get_source_location_to_keep_regex}): Likewise.
8905 (function_suppression::parameter_spec::priv::get_type_name_regex):
8907 (function_suppression::priv::{get_name_regex,
8908 get_return_type_regex, get_symbol_name_regex,
8909 get_symbol_version_regex}): Likewise.
8910 (variable_suppression::priv::{get_name_regex,
8911 get_symbol_name_regex, get_symbol_version_regex,
8912 get_type_name_regex}): Likewise.
8914 2016-05-18 Dodji Seketeli <dodji@redhat.com>
8916 Plug leak of diff_context_sptr after calling compute_diff
8917 * src/abg-comparison.cc (diff::priv::ctxt_): Make this a weak_ptr.
8918 (diff::priv::get_context): Convert the weak pointer to the context
8919 into a shared_ptr and return it.
8920 (diff::priv::is_filtered_out): Adjust to use
8921 diff::priv::get_context() to access the context.
8922 (diff::context): Likewise.
8923 (corpus_diff::priv::ctxt_): Make this a weak_ptr.
8924 (corpus_diff::priv::priv): Add a new overload that takes two
8925 corpora and a diff context.
8926 (corpus_diff::priv::get_context): Convert the weak pointer to the
8927 context into a shared_ptr and return it.
8928 (corpus_diff::priv::ensure_lookup_tables_populated): Adjust to use
8929 the new corpus_diff::priv::get_context to get the context.
8930 (variable_is_suppressed): Likewise.
8931 (corpus_diff::priv::{apply_suppressions_to_added_removed_fns_vars,
8932 apply_filters_and_compute_diff_stats, emit_diff_stats,
8933 categorize_redundant_changed_sub_nodes,
8934 clear_redundancy_categorization}): Likewise.
8935 (corpus_diff::{corpus_diff, context,
8936 apply_filters_and_suppressions_before_reporting}): Adjust.
8937 * tools/abipkgdiff.cc (compare): Make the overload that compares
8938 elf binaries take a diff context output parameter. After the
8939 context is created by this function, it's return to the caller, so
8940 that it's life time is bound to the scope this function was
8942 (pthread_routine_compare): Create a shared pointer to hold a
8943 reference on a diff context. Pass that shared pointer by
8944 reference to the compare function that compares elf binaries.
8945 Rather than storing corpora in the reports_map, (as those corpora
8946 would then out-live the diff context and thus create memory
8947 corruption issues), emit the report directly into an ostringstream
8948 and store that stream in reports_map.
8949 (compare): In the overoad that compares packages, rather than
8950 trying to get corpora from the report_map, just emit the content
8951 of the ostringstream that is now there.
8953 2016-05-22 Dodji Seketeli <dodji@redhat.com>
8955 Fix a read passed-the-end in abg-dwarf-reader.cc
8956 * src/abg-dwarf-reader.cc (lookup_symbol_from_gnu_hash_tab): Do
8957 not read passed the end of the array.
8959 2016-05-21 Dodji Seketeli <dodji@redhat.com>
8961 Support running "make check-valgrind"
8962 * autoconf-archive/ax_valgrind_check.m4: Add new file. Copied it
8963 from http://www.gnu.org/software/autoconf-archive/ax_valgrind_check.html.
8964 * configure.ac: Include the new ax_valgrind_check.m4 file.
8965 Initialize the valgrind checking on tests. Update the configure
8967 * tests/test-valgrind-suppressions.supp: New valgrind suppression
8968 file to silence memcheck leak errors from python.
8969 * tests/Makefile.am: Add test-valgrind-suppressions.supp to source
8970 distribution. Add check-valgrind-memcheck-recursive target.
8972 2016-05-22 Dodji Seketeli <dodji@redhat.com>
8974 Update the CONTRIBUTING file
8975 * CONTRIBUTING: Cleanup.
8977 2016-05-22 Dodji Seketeli <dodji@redhat.com>
8979 Update the COMMIT-LOG-GUIDELINES file
8980 * COMMIT-LOG-GUIDELINES: Various enhancements.
8982 2016-05-16 Dodji Seketeli <dodji@redhat.com>
8984 Do not run fedabipkgdiff tests if --enable-fedabipkgdiff is turned off
8985 * tests/Makefile.am: Make running runtestfedabipkgdiff be
8986 dependent on ENABLE_FEDABIPKGDIFF.
8988 2016-05-13 Chenxiong Qi <cqi@redhat.com>
8991 * tools/fedabipkgdiff (build_commandline_args_parser): Fix
8992 PEP8 error, line is too long.
8994 2016-05-13 Chenxiong Qi <cqi@redhat.com>
8996 Use consistent string format
8997 * tools/fedabipkgdiff (download_rpm): do not omit positional
8998 argument specifiers in string format.
9000 2016-05-16 Dodji Seketeli <dodji@redhat.com>
9002 Remove config.h.in from the repository
9003 * config.h.in: Remove from repository.
9005 2016-02-09 Chenxiong Qi <cqi@redhat.com>
9007 Bug 19428 - New fedabipkgdiff utility
9008 * autoconf-archive/ax_compare_version.m4: New file copied from the
9009 autoconf-archive project.
9010 * autoconf-archive/ax_prog_python_version.m4: Likewise.
9011 * autoconf-archive/ax_python_module.m4: Likewise.
9012 * Makefile.am: Add the new files above to the source distribution.
9013 * configure.ac: Include the new m4 macros from the autoconf
9014 archive. Add a new --enable-fedabipkgdiff option. Update the
9015 report at the end of the configure process to show the status of
9016 the fedabipkgdiff feature. Add check for prerequisite python
9017 modules argparse, glob, logging, os, re, shlex, subprocess, sys,
9018 itertools, urlparse, itertools, shutil, unittest, xdg, koji and
9019 mock. These are necessary for the unit test of
9020 fedabipkgdiff. Generate tests/runtestfedabipkgdiff.py into the
9021 build directory, from the tests/runtestfedabipkgdiff.py.in input
9023 * tools/Makefile.am: Include the fedabipkgdiff to the source
9024 distribution and install it if the "fedabipkgdiff" feature is
9026 * tests/Makefile.am: Rename runtestfedabipkgdiff.sh into
9027 runtestfedabipkgdiff.py. Add the new runtestfedabipkgdiff.py.in
9028 autoconf template file in here.
9029 * tests/runtestfedabipkgdiff.py.in: New unit test file.
9030 * tools/fedabipkgdiff: New fedabipkgdiff tool.
9031 * doc/manuals/fedabipkgdiff.rst: New manual.
9033 2016-05-07 Dodji Seketeli <dodji@redhat.com>
9035 Implement a [suppress_file] suppression directive
9036 * doc/manuals/libabigail-concepts.rst: Document the new
9037 'suppress_file' directive.
9038 * include/abg-suppression.h (file_suppression): Define new class.
9039 (file_suppression_sptr): Define new typedef.
9040 (is_file_suppression, file_is_suppressed): Declare new functions.
9041 * src/abg-suppression.cc ():
9042 (read_file_suppression, is_file_suppression, file_is_suppressed):
9043 Define new functions.
9044 (file_suppression::{file_suppression, suppresses_file,
9045 ~file_suppression}): Define new member functions.
9046 * tools/abidiff.cc (main): If a suppression specification
9047 suppresses one of the input files, then do not perform the
9049 * tools/abipkgdiff.cc (compare): If a suppression specification
9050 suppresses a file that is to be compared, then do not perform the
9052 * tools/abicompat.cc (create_diff_context): New static function.
9053 (perform_compat_check_in_normal_mode)
9054 (perform_compat_check_in_weak_mode): Adjust to take a context in
9055 parameter. Do not create a diff context here anymore, do not load
9056 suppression files here either.
9057 (main): Use the new create_diff_context to create a diff context
9058 and initialize it, including loading suppression specifications.
9059 If any suppression specification suppresses a file to load, then
9060 do not load perform any compatibility checking. Adjust
9061 invocations of perform_compat_check_in_weak_mode and
9062 perform_compat_check_in_normal_mode to pass the diff context.
9063 * tests/data/test-diff-suppr/test0-type-suppr-3.suppr: New test
9065 * tests/data/test-diff-suppr/test0-type-suppr-4.suppr: Likewise.
9066 * tests/data/test-diff-suppr/test0-type-suppr-report-4.txt: Likewise.
9067 * tests/data/test-diff-suppr/test0-type-suppr-5.suppr: Likewise.
9068 * tests/data/test-diff-suppr/test0-type-suppr-report-5.txt:
9070 * tests/data/test-diff-suppr/test0-type-suppr-6.suppr: Likewise.
9071 * tests/data/test-diff-suppr/test0-type-suppr-report-6.txt:
9073 * tests/data/test-diff-suppr/test0-type-suppr-report-7.txt:
9075 * tests/test-diff-suppr.cc (in_out_specs): Use the new test
9077 * tests/data/test-abicompat/test0-fn-changed-1.suppr: New test
9079 * tests/data/test-abicompat/test0-fn-changed-report-3.txt:
9081 * tests/test-abicompat.cc (in_out_specs):: Use the new test
9083 * tests/data/Makefile.am: Add the new test material to source
9086 2016-05-07 Dodji Seketeli <dodji@redhat.com>
9088 Split suppression engine off of abg-comparison.{cc,h}
9089 * include/Makefile.am: Add abg-suppression.h to source
9091 * include/abg-comparison.h: Remove abg-ini.h include directive.
9092 (suppression_sptr, suppressions_type): Move these typedefs to
9094 (class suppression_base, type_suppression)
9095 (type_suppression::insertion_range)
9096 (type_suppression::insertion_range::boundary)
9097 (type_suppression::insertion_range::integer_boundary)
9098 (type_suppression::insertion_range::fn_call_expr_boundary)
9099 (function_suppression, function_suppression::parameter_spec)
9100 (variable_suppression): Move these type definitions to the new
9102 (read_suppressions, is_type_suppression, is_integer_boundary)
9103 (is_fn_call_expr_boundary, is_function_suppression)
9104 (is_variable_suppression, operator&)
9105 (operator|): Move these function declarations to the new
9107 (type_suppression, type_suppression_sptr, type_suppression_type)
9108 (function_suppression, function_suppression_sptr)
9109 (function_suppressions_type, variable_suppression)
9110 (variable_suppression_sptr, variable_suppressions_type): Move
9111 these forward declaration and typedefs to the new
9113 (diff_context::suppressions): Adjust return type to
9114 suppr::suppressions_type&.
9115 (diff_context::add_suppression): Adjust parameter type to
9116 suppr::suppressions_sptr.
9117 (diff_context::add_suppressions): Adjust parameter type
9118 suppr::suppressions_type&.
9119 (is_type_diff, is_decl_diff, is_var_diff, is_function_decl_diff)
9120 (is_pointer_diff, is_reference_diff, is_fn_parm_diff)
9121 (is_base_diff, is_child_node_of_function_parm_diff)
9122 (is_child_node_of_base_diff): Declare these new functions. They
9123 were previously static, local to abg-comparison.cc only. Now they
9124 need to be exported because they are used by the suppression
9125 engine's code that now lives in its one files.
9126 * include/abg-fwd.h (suppr::{suppression_base, suppression_sptr,
9127 suppressions_type}): Forward declare these here.
9128 * include/abg-suppression.h (class suppression_base)
9129 (type_suppression, type_suppression::insertion_range)
9130 (type_suppression::insertion_range::boundary)
9131 (type_suppression::insertion_range::integer_boundary)
9132 (type_suppression::insertion_range::fn_call_expr_boundary)
9133 (function_suppression, function_suppression::parameter_spec)
9134 (variable_suppression): Move these type definitions here, in the
9136 (read_suppressions, is_type_suppression, is_integer_boundary)
9137 (is_fn_call_expr_boundary, is_function_suppression)
9138 (is_variable_suppression, operator&)
9139 (operator|): Move these function decalration here, in the
9141 (type_suppression_sptr, type_suppressions_type)
9142 (function_suppression_sptr, function_suppressions_type)
9143 (variable_suppression_sptr, variable_suppressions_type): Move
9144 these typedefs here, in the namespace suppr.
9145 * src/Makefile.am: add src/abg-suppression.cc to source
9147 * src/abg-comparison.cc (is_type_diff, is_decl_diff, is_var_diff)
9148 (is_function_decl_diff, is_pointer_diff, is_reference_diff)
9149 (is_reference_or_pointer_diff, is_fn_parm_diff, is_base_diff)
9150 (is_child_node_of_function_parm_diff, is_child_node_of_base_diff):
9151 Export these functions.
9152 (*suppression*): Move all the suppression-related definitions to
9153 the new abg-suppression.cc.
9154 * src/abg-suppression.cc: New file. Contains all the *suppression*
9155 definitions from src/abg-comparison.cc, that are put in the suppr
9157 * tools/abicompat.cc: Adjust.
9158 * tools/abidiff.cc: Likewise.
9159 * tools/abipkgdiff.cc: Likewise.
9161 2016-05-08 Dodji Seketeli <dodji@redhat.com>
9163 Fix indentation for abidiff manual
9164 * doc/manuals/abidiff.rst: Fix indentation for the --suppression
9167 2016-05-08 Dodji Seketeli <dodji@redhat.com>
9169 Add several shortcuts to options for abicompat
9170 * doc/manuals/abicompat.rst: Update documentation.
9171 * tools/abicompat.cc (display_usage): Update help strings.
9172 (parse_command_line): Add shortcuts --suppr, --appd, --libd1 and
9175 2016-05-08 Dodji Seketeli <dodji@redhat.com>
9177 Update copyright year in tools/abicompat.cc
9178 * tools/abicompat.cc: Update copyright years to 2016.
9180 2016-05-07 Dodji Seketeli <dodji@redhat.com>
9182 Fix mention of tool's name in abidiff error message
9183 * src/abg-tools-utils.cc (emit_prefix): Try to emit the prefix
9184 only if the program name was provided.
9185 * abidiff.cc (maybe_check_suppression_files): Pass the name of the
9186 tool to the check_file function.
9188 2016-05-07 Dodji Seketeli <dodji@redhat.com>
9190 Update copyright year on abg-comparison.h
9191 * include/abg-comparison.h: Update copyright year.
9193 2016-05-08 Dodji Seketeli <dodji@redhat.com>
9195 Doc not show classes' inherited members in apidoc
9196 * doc/api/libabigail.doxy: Don't show inherited member functions
9197 or variables of a given class.
9199 2016-05-08 Dodji Seketeli <dodji@redhat.com>
9201 Fix typo in concept manual
9202 * doc/manuals/libabigail-concepts.rst: Do not refer to abidiff
9203 specifically for suppressions because several tools use
9206 2016-05-08 Dodji Seketeli <dodji@redhat.com>
9208 Fix indentation in concepts manual
9209 * doc/manuals/libabigail-concepts.rst: Fix indentation.
9211 2016-05-06 Dodji Seketeli <dodji@redhat.com>
9213 Add some apidoc to dwarf_reader
9214 * include/abg-dwarf-reader.h (namespace dwarf_reader): Add apidoc.
9215 (enum elf_type): Add an apidoc for each enumerator.
9216 * src/abg-dwarf-reader.cc (get_type_of_elf_file): Add an apidoc
9217 for the 'type' parameter.
9219 2016-04-28 Dodji Seketeli <dodji@redhat.com>
9221 [abipkgdiff] Show SONAME of removed/added libraries
9222 * tools/abipkgdiff.cc (abi_diff::{added,removed}_binaries): Change
9223 the type of these data member from vector<string> to
9224 vector<elf_file_sptr>.
9225 (compare): Adjust. Show the soname of added/removed binaries.
9227 2016-04-27 Dodji Seketeli <dodji@redhat.com>
9229 Bug 20015 - support file_name_not_regexp and soname_not_regexp in suppr specs
9230 * include/abg-comparison.h
9231 (suppression_base::{get,set}_file_name_not_regex_str): Declare new
9233 (suppression_base::{get,set}_soname_not_regex_str): Likewise.
9234 (suppression_base::{names,sonames}_of_binaries_match): Likewise.
9235 * src/abg-comparison.cc
9236 (suppression_base::priv::get_file_name_regex): Fix comment.
9237 (suppression_base::priv::get_file_name_not_regex): New member
9239 (suppression_base::priv::get_soname_regex): Fix comment.
9240 (suppression_base::priv::get_soname_not_regex): New member
9242 (suppression_base::{get,set}_file_name_not_regex_str): Define new
9244 (suppression_base::{get,set}_soname_not_regex_str): Likewise.
9245 (suppression_base::{names,sonames}_of_binaries_match): Likewise.
9246 These got factorized out of type_suppression::suppresses_type,
9247 function_suppression::suppresses_function,
9248 function_suppression::suppresses_function_symbol,
9249 variable_suppression::suppresses_variable,
9250 variable_suppression::suppresses_variable_symbol.
9251 (type_suppression::suppresses_type): Use the new
9252 suppression_base::{names,sonames}_of_binaries_match.
9253 (read_type_suppression): Read the new file_name_not_regexp and
9254 soname_not_regexp properties.
9255 (function_suppression::{suppresses_function,
9256 suppresses_function_symbol}): Use the new
9257 suppression_base::{names,sonames}_of_binaries_match.
9258 (read_function_suppression): Read the new file_name_not_regexp and
9259 soname_not_regexp properties.
9260 (variable_suppression::{suppresses_variable,
9261 variable_suppression::suppresses_variable_symbol}): Use the new
9262 suppression_base::{names,sonames}_of_binaries_match.
9263 (read_variable_suppression): Use the new
9264 suppression_base::{names,sonames}_of_binaries_match.
9265 * doc/manuals/libabigail-concepts.rst: Document the new
9266 file_name_not_regexp and soname_not_regexp suppression properties.
9267 * tests/data/test-diff-suppr/test24-soname-report-10.txt: New test
9269 * tests/data/test-diff-suppr/test24-soname-report-11.txt: Likewise.
9270 * tests/data/test-diff-suppr/test24-soname-report-12.txt: Likewise.
9271 * tests/data/test-diff-suppr/test24-soname-report-13.txt: Likewise.
9272 * tests/data/test-diff-suppr/test24-soname-report-14.txt: Likewise.
9273 * tests/data/test-diff-suppr/test24-soname-report-15.txt: Likewise.
9274 * tests/data/test-diff-suppr/test24-soname-report-16.txt: Likewise.
9275 * tests/data/test-diff-suppr/test24-soname-report-9.txt: Likewise.
9276 * tests/data/test-diff-suppr/test24-soname-suppr-10.txt: New test input.
9277 * tests/data/test-diff-suppr/test24-soname-suppr-11.txt: Likewise.
9278 * tests/data/test-diff-suppr/test24-soname-suppr-12.txt: Likewise.
9279 * tests/data/test-diff-suppr/test24-soname-suppr-13.txt: Likewise.
9280 * tests/data/test-diff-suppr/test24-soname-suppr-14.txt: Likewise.
9281 * tests/data/test-diff-suppr/test24-soname-suppr-15.txt: Likewise.
9282 * tests/data/test-diff-suppr/test24-soname-suppr-16.txt: Likewise.
9283 * tests/data/test-diff-suppr/test24-soname-suppr-9.txt: Likewise.
9284 * tests/data/test-diff-suppr/test29-soname-report-2.txt: New test
9286 * tests/data/test-diff-suppr/test29-soname-report-3.txt: Likewise.
9287 * tests/data/test-diff-suppr/test29-soname-report-4.txt: Likewise.
9288 * tests/data/test-diff-suppr/test29-soname-report-5.txt: Likewise.
9289 * tests/data/test-diff-suppr/test29-soname-report-6.txt: Likewise.
9290 * tests/data/test-diff-suppr/test29-soname-report-7.txt: Likewise.
9291 * tests/data/test-diff-suppr/test29-soname-report-8.txt: Likewise.
9292 * tests/data/test-diff-suppr/test29-suppr-2.txt: New test input.
9293 * tests/data/test-diff-suppr/test29-suppr-3.txt: Likewise.
9294 * tests/data/test-diff-suppr/test29-suppr-4.txt: Likewise.
9295 * tests/data/test-diff-suppr/test29-suppr-5.txt: Likewise.
9296 * tests/data/test-diff-suppr/test29-suppr-6.txt: Likewise.
9297 * tests/data/test-diff-suppr/test29-suppr-7.txt: Likewise.
9298 * tests/data/test-diff-suppr/test29-suppr-8.txt: Likewise.
9299 * tests/data/Makefile.am: Add the new test material to source
9301 * tests/test-diff-suppr.cc (in_out_specs): Make this test harness
9302 run over the new test inputs.
9304 2016-04-27 Dodji Seketeli <dodji@redhat.com>
9306 Make API documentation of thread pools visible
9307 * include/abg-workers.h: Document the workers namespace, the task,
9308 queue and queue::task_done_notify types.
9309 * src/abg-workers.cc: Move the documentation of the thread_pool
9310 module inside the abigail::worker namespace, so that references to
9311 task and queue types (which are also in the abigail::worker
9312 namespace) can be resolved in the apidoc.
9314 2016-04-27 Dodji Seketeli <dodji@redhat.com>
9316 Update documentation to require doxygen and python-sphinx for building
9317 * COMPILING: Add python-sphinx to the set of required packages to
9318 build the documentation.
9319 * doc/website/mainpage.txt: Update the website to mention doxygen
9320 and python-sphinx for documentation.
9322 2016-04-27 Dodji Seketeli <dodji@redhat.com>
9324 Add doc, info, man and html-doc targets to generate documentation
9325 * Makefile.am: Add info, man and html-doc targets to generate
9326 documentation in info, man and html formats. If you want to
9327 generate them all, then the doc target is the one to be used.
9328 * COMPILING: Add documentation for the above.
9330 2016-04-25 Dodji Seketeli <dodji@redhat.com>
9332 Bug 19964 - Cannot load function aliases on ppc64
9333 * src/abg-dwarf-reader.cc (read_context::load_symbol_maps): While
9334 filling the ppc64-specific "function-entry-address => symbol" map,
9335 if we stumble accross a function-entry-address that belongs to an
9336 alias of 'symbol', then assume the alias must have been registered
9337 as an alias already, by the platform-agnostic code. Do not try to
9338 register the alias again.
9339 * tests/data/Makefile.am: Add the new test input binaries to the
9340 source distribution.
9341 * tests/data/test-diff-dwarf/libtest36-ppc64-aliases-v0.so: New
9343 * tests/data/test-diff-dwarf/libtest36-ppc64-aliases-v1.so: Likewise.
9344 * tests/data/test-diff-dwarf/test36-ppc64-aliases-report-0.txt:
9345 New test reference output.
9346 * tests/data/test-diff-dwarf/test36-ppc64-aliases-v0.cc: Source
9347 code for the new binary test input above.
9348 * tests/data/test-diff-dwarf/test36-ppc64-aliases-v1.cc: Likewise.
9349 * tests/test-diff-dwarf.cc: Add the new test input to the list of
9350 test inputs considered by this test harness.
9352 2016-04-20 Sinny Kumari <sinny@redhat.com>
9354 Bug 19961 - Distinguish between PI executable and shared library
9355 * include/abg-dwarf-reader.h (elf_type): Add new enumerator
9357 * src/abg-dwarf-reader.cc
9358 (lookup_data_tag_from_dynamic_segment): New function for
9359 data tag lookup in dynamic segment of an elf
9360 (elf_file_type): Return ELF_TYPE_PI_EXEC file type for
9362 (get_elf_file_type): Change this to take an elf handle.
9363 (get_type_of_elf_file): New function that got factorized out of ...
9364 (load_dt_soname_and_needed): ... this one.
9365 * tools/abipkgdiff.cc (create_maps_of_package_content): Also
9366 consider ELF_TYPE_PI_EXEC file type.
9367 (compare): Likewise.
9368 * tests/test-diff-pkg.cc (in_out_specs): Test case additions
9369 * tests/data/Makefile.am: Include test files
9370 * tests/data/test-diff-pkg/tarpkg-1-dir1.tar.gz: New test data
9371 * tests/data/test-diff-pkg/tarpkg-1-dir2.tar.gz: New test data
9372 * tests/data/test-diff-pkg/tarpkg-1-report-0.txt: New test result
9374 2016-04-17 Dodji Seketeli <dodji@redhat.com>
9376 Update website to 1.0.rc4
9377 * doc/website/mainpage.txt: Update tarball reference to 1.0.rc4
9379 2016-04-17 Dodji Seketeli <dodji@redhat.com>
9381 Bump current version number to 1.0.rc5
9382 * configure.ac: Bump current version number to 1.0.rc5
9384 2016-04-17 Dodji Seketeli <dodji@redhat.com>
9386 Add a 'release' target to main Makefile
9387 * Makefile.am: Add tarball, upload-release-only, upload-release
9388 and release targets.
9390 2016-04-11 Dodji Seketeli <dodji@redhat.com>
9392 Update ChangeLog for 1.0.rc4
9393 * ChangeLog: Update automatically by running "make
9396 2016-04-11 Dodji Seketeli <dodji@redhat.com>
9398 Update NEWS for 1.0.rc4
9399 * NEWS: Update for 1.0.rc4
9401 2016-04-16 Dodji Seketeli <dodji@redhat.com>
9403 Fix typos in the suppression specifications manual
9404 * doc/manuals/libabigail-concepts.rst: Fix typos.
9406 2016-04-16 Dodji Seketeli <dodji@redhat.com>
9408 Ease use of soname_regexp/file_name_regexp in suppr specs
9409 * doc/manuals/libabigail-concepts.rst: Update the manual to
9410 reflect the changes in the suppression_type, suppress_function and
9411 suppress_variable directives.
9412 * src/abg-comparison.cc (read_type_suppression): Accept that
9413 the suppress_type directive contains only file_name_regexp
9414 or the soname_regexp property.
9415 (read_function_suppression): Likewise for the suppress_function
9417 (read_variable_suppression): Likewise for the suppress_variable
9419 * tests/data/test-diff-suppr/libtest29-soname-v0.so: New binary
9421 * tests/data/test-diff-suppr/libtest29-soname-v1.so: Likewise.
9422 * tests/data/test-diff-suppr/test24-soname-report-5.txt: New
9423 reference test output.
9424 * tests/data/test-diff-suppr/test24-soname-report-6.txt: Likewise.
9425 * tests/data/test-diff-suppr/test24-soname-report-7.txt: Likewise.
9426 * tests/data/test-diff-suppr/test24-soname-report-8.txt: Likewise.
9427 * tests/data/test-diff-suppr/test24-soname-suppr-5.txt: New test
9429 * tests/data/test-diff-suppr/test24-soname-suppr-6.txt: Likewise.
9430 * tests/data/test-diff-suppr/test24-soname-suppr-7.txt: Likewise.
9431 * tests/data/test-diff-suppr/test24-soname-suppr-8.txt: Likewise.
9432 * tests/data/test-diff-suppr/test29-soname-report-0.txt: New
9433 reference test output.
9434 * tests/data/test-diff-suppr/test29-soname-report-1.txt: Likewise.
9435 * tests/data/test-diff-suppr/test29-soname-v0.cc: Source code for
9436 the new binary output above.
9437 * tests/data/test-diff-suppr/test29-soname-v1.cc: Likewise.
9438 * tests/data/test-diff-suppr/test29-suppr-0.txt: New test
9440 * tests/data/test-diff-suppr/test29-suppr-1.txt: Likewise.
9441 * tests/data/Makefile.am: Add the new test material above to
9442 source distribution.
9443 * tests/test-diff-suppr.cc (in_out_specs): Make this test harness
9444 run over the new test input above.
9446 2016-03-31 Dodji Seketeli <dodji@redhat.com>
9448 Fix comments in tests/test-diff-pkg.cc
9449 * tests/test-diff-pkg.cc: Fix the wording of the introductory
9452 2016-03-30 Dodji Seketeli <dodji@redhat.com>
9454 Bug 19885 - Cannot associates a function DIE to a symbol on powerpc64
9455 *from* the address of its entry point.
9456 More precisely, on ppc64, the address of a function is the address of
9457 a function descriptor. The function descriptor is a set of three 64
9458 bits addresses. The first element of the triplet is the function
9459 entry pointer address. So to get the symbol a given function entry
9460 point address belongs to, one must get to the function descriptor
9461 which contains said function entry point address. And function
9462 descriptors are in the ".opd" special section.
9463 Unfortunately, Libabigail's ELF/DWARF reader has no knowledge of all
9464 this. So it cannot get the symbol of a given function DWARF
9465 description. So it considers all functions as having no ELF symbols.
9466 So it shows no ABI change pertaining to function sub-types on ppc64.
9467 This patch makes Libabigail support function descriptors on ppc64 so
9468 it can detect changes on function sub-types there.
9469 * src/abg-dwarf-reader.cc (read_context::{opd_section_,
9470 fun_entry_addr_sym_map_}): New data members.
9471 (read_context::read_context): Initialize the new opd_section_ data
9473 (read_context::{find_opd_section,
9474 lookup_ppc64_elf_fn_entry_pointer_address,
9475 fun_entry_addr_sym_map_sptr, fun_entry_addr_sym_map,
9476 elf_architecture_is_ppc64, elf_architecture_is_big_endian}): New
9478 (read_context::lookup_elf_fn_symbol_from_address): Adjust to use
9479 the new read_context::fun_entry_addr_sym_map() function.
9480 (read_context::load_symbol_maps): Populate the function entry
9481 addresses -> symbol map, for ppc64 ELFv1.
9482 (read_context::load_elf_properties): Renamed
9483 read_context::load_remaining_elf_data into this.
9484 (read_corpus_from_elf): Load elf properties before trying to load
9485 elf symbols information.
9486 * tests/data/test-diff-filter/libtest32-struct-change-v0.so: New
9487 binary test input, compiled for ppc64le.
9488 * tests/data/test-diff-filter/libtest32-struct-change-v1.so: Likewise.
9489 * tests/data/test-diff-filter/test32-ppc64le-struct-change-report0.txt:
9490 New test reference output.
9491 * tests/data/test-diff-filter/test32-ppc64le-struct-change-v0.c:
9492 Source code of the new binary test input above.
9493 * tests/data/test-diff-filter/test32-ppc64le-struct-change-v1.c:
9495 * tests/data/Makefile.am: Add the new test material above to
9496 source distribution.
9497 * tests/test-diff-filter.cc (in_out_spec): Make this test harness
9498 run over the new test input binaries above.
9500 2016-03-25 Dodji Seketeli <dodji@redhat.com>
9502 Fix logs in abipkgdiff and add some more
9503 * tools/abipkgdiff.cc (compare): Fix logs to make them more
9504 readable in a multithreaded context.
9505 (create_maps_of_package_content): Likewise. Add logs about the
9506 number of elf files found in a given directory. Add logs about
9509 2016-03-25 Dodji Seketeli <dodji@redhat.com>
9511 Bug 19867 - abipkgdiff skips symbolic links
9512 * include/abg-tools-utils.h (maybe_get_symlink_target_file_path):
9513 Declare new function.
9514 * src/abg-tools-utils.cc (get_stat): Use lstat here, not stat.
9516 * tools/abipkgdiff.cc (first_package_tree_walker_callback_fn)
9517 (second_package_tree_walker_callback_fn): Follow symbolic links to
9518 elf files to get their target paths, and only work with that
9520 (maybe_get_symlink_target_file_path): Define new function.
9521 * test-diff-pkg/symlink-dir-test1-report0.txt New test material.
9522 * test-diff-pkg/symlink-dir-test1/dir1/symlinks/foo.o: Likewise.
9523 * test-diff-pkg/symlink-dir-test1/dir1/symlinks/libfoo.so: Likewise.
9524 * test-diff-pkg/symlink-dir-test1/dir1/targets/foo.c: Likewise.
9525 * test-diff-pkg/symlink-dir-test1/dir1/targets/foo.o: Likewise.
9526 * test-diff-pkg/symlink-dir-test1/dir1/targets/libfoo.so: Likewise.
9527 * test-diff-pkg/symlink-dir-test1/dir2/symlinks/foo.o: Likewise.
9528 * test-diff-pkg/symlink-dir-test1/dir2/symlinks/libfoo.so: Likewise.
9529 * test-diff-pkg/symlink-dir-test1/dir2/targets/foo.c: Likewise.
9530 * test-diff-pkg/symlink-dir-test1/dir2/targets/foo.o: Likewise.
9531 * test-diff-pkg/symlink-dir-test1/dir2/targets/libfoo.so: Likewise.
9532 * tests/data/Makefile.am: Add the new test material to source
9534 * tests/test-diff-pkg.cc (in_out_spec): Run this test harness
9535 over the new test material above.
9537 2016-03-21 Dodji Seketeli <dodji@redhat.com>
9539 Fix typo on the web page
9540 * doc/website/mainpage.txt: Fix typo.
9542 2016-03-18 Roland McGrath <roland@hack.frob.com>
9544 Fix typo in configure --enable-deb help text
9545 * configure.ac: Fix typo in --enable-deb usage text.
9547 2016-03-18 Dodji Seketeli <dodji@redhat.com>
9549 Bug 19846 - variable decl associated with the wrong debug info section
9550 * src/abg-dwarf-reader.cc (build_ir_node_from_die): Associate the
9551 decl of the variable to the same debug info file (alternate or
9552 not) as the DIE, not as its specification DIE.
9554 2016-03-18 Dodji Seketeli <dodji@redhat.com>
9556 Fix typo in the manual of abidiff
9557 * doc/manuals/abidiff.rst: Fix typo.
9559 2016-03-18 Dodji Seketeli <dodji@redhat.com>
9561 Fix typos in comments in src/abg-dwarf-reader.cc
9562 * src/abg-dwarf-reader.cc (read_context::{die_type_map,
9563 is_wip_class_die_offset, is_wip_function_type_die_offset}): Fix
9566 2016-03-18 Dodji Seketeli <dodji@redhat.com>
9568 Bug 19844 - Cannot try to canonicalize a type that is being constructed
9569 * src/abg-dwarf-reader.cc
9570 (read_context::{alternate_die_wip_classes_map_,
9571 alternate_die_wip_function_types_map_}): New data members.
9572 (read_context::lookup_type_from_die_offset): Lookup WIP class and
9574 (read_context::{die_wip_classes_map, die_wip_function_types_map}):
9575 Take a flag saying if we should get the map for the alternate
9576 debug info section or not.
9577 (read_context::{is_wip_class_die_offset,
9578 is_wip_function_type_die_offset}): Take a flagy saying if the DIE
9579 is in the alternate debug info section or not.
9580 (build_class_type_and_add_to_ir, build_function_type)
9581 (maybe_canonicalize_type): Adjust.
9582 (build_ir_node_from_die): Do not call maybe_canonicalize_type on
9583 type DIEs which no type has been constructed for.
9584 * tests/data/test-diff-pkg/gtk2-debuginfo-2.24.22-5.el7.i686.rpm:
9586 * tests/data/test-diff-pkg/gtk2-debuginfo-2.24.28-8.el7.i686.rpm:
9588 * tests/data/test-diff-pkg/gtk2-immodule-xim-2.24.22-5.el7.i686.rpm:
9590 * tests/data/test-diff-pkg/gtk2-immodule-xim-2.24.28-8.el7.i686.rpm:
9592 * tests/data/test-diff-pkg/gtk2-immodule-xim-2.24.22-5.el7.i686--gtk2-immodule-xim-2.24.28-8.el7.i686-report-0.txt:
9593 New test reference output.
9594 * tests/data/Makefile.am: Add the new test material to the source
9596 * tests/test-diff-pkg.cc (in_out_spec): Make this test harness run
9597 on the new test input above.
9599 2016-03-16 Dodji Seketeli <dodji@redhat.com>
9601 Fix a typo in include/abg-tools-utils.h
9602 * include/abg-tools-utils.h (enum abidiff_status): Fix typo in
9605 2016-03-16 Dodji Seketeli <dodji@redhat.com>
9607 Update copyright dates for the manuals
9608 * doc/manuals/conf.py: Update copyright years.
9610 2016-03-16 Dodji Seketeli <dodji@redhat.com>
9612 More docs about ABIDIFF_ABI_INCOMPATIBLE_CHANGE
9613 * doc/manuals/abidiff.rst: Explain the kind of changes that flip
9614 the ABIDIFF_ABI_INCOMPATIBLE_CHANGE flag.
9616 2016-03-09 Dodji Seketeli <dodji@redhat.com>
9618 Fix typos on the web page
9619 * doc/website/mainpage.txt: Fix typos.
9621 2016-03-08 Dodji Seketeli <dodji@redhat.com>
9623 Bump version number to 1.0.rc4
9624 * configure.ac: Bump version number to 1.0.rc4
9626 2016-03-08 Dodji Seketeli <dodji@redhat.com>
9628 Fix potential race condition in test-diff-pkg.cc
9629 * tests/test-diff-pkg.cc (in_out_spec): Make the tar format tests
9630 output have different names.
9632 2016-03-08 Dodji Seketeli <dodji@redhat.com>
9634 Updated website to point to 1.0.rc3 tarball
9635 * doc/website/mainpage.txt: Updated website to point to 1.0.rc3
9638 2016-03-08 Dodji Seketeli <dodji@redhat.com>
9640 Update ChangeLog before 1.0.rc3
9641 * ChangeLog: Update for 1.0.rc3
9643 2016-03-08 Dodji Seketeli <dodji@redhat.com>
9645 Update NEWS file for 1.0.rc3
9646 * NEWS: update for 1.0.rc3
9648 2016-03-07 Dodji Seketeli <dodji@redhat.com>
9650 Walk function_type_diff tree in a deterministic way
9651 * src/abg-comparison.cc
9652 (function_type_diff::priv::{sorted_subtype_changed_parms_,
9653 sorted_changed_parms_by_id_}): Add two data members.
9654 (function_type_diff::ensure_lookup_tables_populated): Sort the
9655 changed parameters here ...
9656 (function_type_diff::report): ... not here.
9657 (function_type_diff::chain_into_hierarchy): Chain the *sorted*
9660 2016-03-07 Dodji Seketeli <dodji@redhat.com>
9662 Fix reference to test file in Makefile.am
9663 * tests/data/Makefile.am: Fix bogus reference to
9664 libICE-1.0.6-1.el6.x86_64.rpm--libICE-1.0.9-2.el7.x86_64.rpm-report-0.txt.
9666 2016-03-07 Dodji Seketeli <dodji@redhat.com>
9668 Bug 19780 - abipkgdiff doesn't support parallel execution
9669 * tools/abipkgdiff.cc: Update copyright notice.
9670 (package::extracted_packages_parent_dir): Use mkdtemp to generate
9671 the unique root directory under which packages are extracted.
9672 * tests/test-diff-pkg.cc (struct test_task): New type.
9673 (main): Use worker threads to run abipkgdiff in parallel,
9674 depending on the number of CPUs advertised by the underlying
9677 2016-03-07 Dodji Seketeli <dodji@redhat.com>
9679 Bug 19778 - diff_has_ancestor_filtered_out() loops forever
9680 * src/abg-comparison.cc (diff_has_ancestor_filtered_out): Add an
9681 overload that takes an additional map of pointer values. Make the
9682 older overload call the new one.
9683 * tests/data/test-diff-pkg/libICE-1.0.6-1.el6.x86_64.rpm: New test material.
9684 * tests/data/test-diff-pkg/libICE-1.0.6-1.el6.x86_64.rpm--libICE-1.0.9-2.el7.x86_64.rpm-report-0.txt:
9685 New reference output.
9686 * tests/data/test-diff-pkg/libICE-1.0.9-2.el7.x86_64.rpm: New test material.
9687 * tests/data/test-diff-pkg/libICE-debuginfo-1.0.6-1.el6.x86_64.rpm: New test material.
9688 * tests/data/test-diff-pkg/libICE-debuginfo-1.0.9-2.el7.x86_64.rpm:
9690 * tests/data/Makefile.am: Add the new test material to source distribution.
9691 * tests/test-diff-pkg.cc (in_out_specs): Run this test harness
9692 over the new tests material above.
9694 2016-03-07 Dodji Seketeli <dodji@redhat.com>
9696 Forgot to add test2-filtered-removed-fns-v{0,1}.o
9697 * test2-filtered-removed-fns-v{0,1}.o: Add these test input files.
9699 2016-03-03 Dodji Seketeli <dodji@redhat.com>
9701 Bug 19596 - Suppressed removed symbol changes still considered incompatible
9702 * src/abg-comparison.cc (corpus_diff::has_incompatible_changes):
9703 Consider the *net* number of removed function and variable
9704 symbols. Also, if all function sub-type changes have been
9705 suppressed, then no virtual offset change should be considered
9707 * tests/data/test-abidiff-exit/test1-voffset-change-report1.txt
9708 * tests/data/test-abidiff-exit/test1-voffset-change.abignore
9709 * tests/data/test-abidiff-exit/test2-filtered-removed-fns-report0.txt
9710 * tests/data/test-abidiff-exit/test2-filtered-removed-fns-report1.txt
9711 * tests/data/test-abidiff-exit/test2-filtered-removed-fns-v0.c
9712 * tests/data/test-abidiff-exit/test2-filtered-removed-fns-v1.c
9713 * tests/data/test-abidiff-exit/test2-filtered-removed-fns.abignore
9714 * tests/data/Makefile.am: Add the new test material above to
9715 source distribution.
9716 * tests/test-abidiff-exit.cc (InOutSpec::in_suppr_path): New data
9718 (in_out_specs): Adjust. Add new test inputs.
9721 2016-02-25 Dodji Seketeli <dodji@redhat.com>
9723 Fixup virtual member functions with linkage and no underlying symbol
9724 * src/abg-dwarf-reader.cc (die_function_decl_map_type): New
9726 (read_context::die_function_with_no_symbol_map_): New data member.
9727 (read_context::die_function_decl_with_no_symbol_map): New
9729 (read_context::fixup_functions_with_no_symbols): New member
9731 (finish_member_function_reading): Take a read_context. Schedule
9732 virtual member functions with linkage and no underlying symbol to
9733 be fixed up after all the debug info is read.
9734 (build_function_decl): After a virtual member function_decl has
9735 been updated, if it has its underlying symbol and was scheduled
9736 for fixup, then de-schedule it.
9737 (build_class_type_and_add_to_ir, build_ir_node_from_die): Adjust
9738 call to finish_member_function_reading.
9739 (read_corpus_from_elf): Move the pure ELF (symbol and other mundane
9740 information) information reading ...
9741 (read_debug_info_into_corpus): ... here. Make it happen *before*
9742 actual reading of DWARF information. We need symbol information
9743 to be present and fully set before we start reading debug info.
9744 This is so that we can know when a virtual member function doesn't
9745 need to be fixed up. Also, perform the fixup after the debug
9746 information was read.
9747 * tests/data/test-read-dwarf/test22-pr19097-libstdc++.so.6.0.17.so.abi: Adjust.
9749 2016-02-25 Dodji Seketeli <dodji@redhat.com>
9751 Add --verbose to abidw
9752 * doc/manuals/abidw.rst: Update the manual for the new --verbose
9754 * tools/abidw.cc (options::do_log): New data member.
9755 (options::options): Initialize it.
9756 (display_usage): New string for --verbose.
9757 (parse_command_line): Parse the --verbose option.
9758 (main): Set the the logging option.
9760 2016-02-25 Dodji Seketeli <dodji@redhat.com>
9762 Update copyright information
9763 * tools/abidiff.cc: Update copyright info for 2016.
9764 * tools/abidw.cc: Likewise.
9766 2016-02-24 Dodji Seketeli <dodji@redhat.com>
9768 Make libabigail link with pthread
9769 * src/Makefile.am: Add -pthread to libabigail_la_LDFLAGS.
9770 * tools/Makefile.am: Do not use abinilint_LDFLAGS when it should
9771 be abinilint_LDADD. This one was fixed by Michi Henning.
9773 2016-02-24 Dodji Seketeli <dodji@redhat.com>
9775 Update mentions to the build dependencies in the doc
9776 * COMPILING: Mention elfutils, libtool, autoconf, automake and
9778 * doc/website/mainpage.txt: Mention automake and libtool. Fix a typo.
9780 2016-02-24 Dodji Seketeli <dodji@redhat.com>
9782 Bug 19706 - Core dump from abidiff with suppression
9783 * src/abg-comparison.cc
9784 (function_suppression::suppresses_function): Make sure a function
9785 has a symbol before (de)referencing it.
9787 2016-02-24 Dodji Seketeli <dodji@redhat.com>
9789 Some small speed optimizations
9790 * include/abg-ir.h (var_decl::get_naked_type): Declare new member function.
9791 * src/abg-ir.cc (var_decl::get_naked_type): Define it.
9792 (equals): For the var_decl overload, avoid copying symbol
9793 smart pointers. Likewise for variable type smart pointers.
9794 (hash_type_or_decl): Avoid accessing canonical type smart pointer.
9796 2016-02-24 Dodji Seketeli <dodji@redhat.com>
9799 * include/abg-ir.h: Add missing comments. Space cleanups. Use
9800 shorter typedefs rather than long template instantiation names.
9801 Use string rather than the longer std::string.
9802 * src/abg-ir.cc: Space cleanups. Add missing comments. User
9804 * src/abg-reader.cc: Likewise.
9805 * src/abg-writer.cc: Likewise.
9807 2016-02-24 Dodji Seketeli <dodji@redhat.com>
9809 Implement string interning for Libabigail
9810 * include/Makefile.am: Add the new abg-interned-str.h file to
9811 source distribution.
9812 * include/abg-corpus.h (corpus::corpus): Re-arrange the order of
9814 (corpus::exported_decls_builder::priv::get_id): Return
9815 interned_string rather than std::string.
9816 (corpus::corpus): Re-arrange the order of parameters: take an
9817 environment as first parameter. parameters: take an environment
9819 * include/abg-dwarf-reader.h (lookup_symbol_from_elf)
9820 (lookup_public_function_symbol_from_elf): Likewise.
9821 * src/abg-dwarf-reader.cc (lookup_symbol_from_sysv_hash_tab)
9822 (lookup_symbol_from_gnu_hash_tab)
9823 (lookup_symbol_from_elf_hash_tab, lookup_symbol_from_symtab)
9824 (lookup_symbol_from_elf, lookup_public_function_symbol_from_elf)
9825 (lookup_public_variable_symbol_from_elf, lookup_symbol_from_elf)
9826 (lookup_public_function_symbol_from_elf): Take an environment as
9827 first parameter and adjust.
9828 (build_translation_unit_and_add_to_ir)
9829 (build_namespace_decl_and_add_to_ir, build_type_decl)
9830 (build_enum_type, finish_member_function_reading)
9831 (build_class_type_and_add_to_ir, build_function_type)
9832 (read_debug_info_into_corpus, read_corpus_from_elf): Adjust.
9833 * include/abg-fwd.h: Include abg-interned-str.h
9834 (get_type_name, get_function_type_name, get_method_type_name):
9835 Return a interned_string, rather than a std::string.
9836 * include/abg-interned-str.h: New declarations for interned strings
9838 * include/abg-ir.h (environment::intern): Declare new method.
9839 (elf_symbol::{g,s}et_environment): Likewise.
9840 (type_or_decl_base::type_or_decl_base): Make the default
9841 constructor private.
9842 ({translation, type_or_decl_base}::set_environment)
9843 (set_environment_for_artifact): Take a const environment*.
9844 (elf_symbol::elf_symbol)
9845 (elf_symbol::create)
9846 (type_or_decl_base::type_or_decl_base)
9847 (translation::translation, decl_base::decl_base)
9848 (scope_decl::scope_decl, type_base::type_base)
9849 (type_decl::type_decl, scope_type_decl::scope_type_decl)
9850 (namespace_decl::namespace_decl)
9851 (enum_type_decl::enumerator::enumerator)
9852 (function_type::function_type, method_type::method_type)
9853 (template_decl::template_decl, function_tdecl::function_tdecl)
9854 (class_tdecl::class_tdecl, class_decl::class_decl): Take an
9856 (type_or_decl_base::operator=)
9857 (enum_type_decl::enumerator::get_environment): Declare new method.
9858 (decl_base::{peek_qualified_name, peek_temporary_qualified_name,
9859 get_qualified_name, get_name, get_qualified_parent_name,
9860 get_linkage_name}, qualified_type_def::get_qualified_name)
9861 (reference_type_def::get_qualified_name)
9862 (array_type_def::get_qualified_name)
9863 (enum_type_decl::enumerator::{get_name, get_qualified_name})
9864 ({var,function}_decl::get_id)
9865 (function_decl::parameter::{get_type_name, get_name_id}): Return
9866 an interned_string, rather than a std::string.
9867 (decl_base::{set_qualified_name, set_temporary_qualified_name,
9868 get_qualified_name, set_linkage_name})
9869 (qualified_type_def::get_qualified_name)
9870 (reference_type_def::get_qualified_name)
9871 (array_type_def::get_qualified_name)
9872 (function_decl::parameter::get_qualified_name): Take an
9873 interned_string, rather than a std::string.
9874 (class_decl::member_{class,function}_template::member_{class,function}_template):
9876 * src/abg-ir.cc (environment_setter::env_): Make this be a pointer
9877 to const environment.
9878 (environment_setter::visit_begin): Adjust.
9879 (interned_string_pool::priv): Define new type.
9880 (interned_string_pool::*): Define the method declared in
9881 abg-interned-str. h.
9882 (operator==, operator!=, operator+): Define operator for interned_string and
9884 (operator<<): Define for interned_string.
9885 (translation_unit::priv::env_): Make this be a pointer to const
9887 (translation_unit::priv::priv): Take a pointer to const
9889 (elf_symbol::priv::env_): New data member.
9890 (elf_symbol::priv::priv): Adjust. Make an overoad take an
9892 (translation_unit::{g,s}et_environment): Adjust.
9893 (interned_string_bool_map_type): New typedef.
9894 (environment::priv::classes_being_compared_): Make this hastable
9895 of string be a hashtable of interned_string.
9896 (environment::priv::string_pool_): New data member.
9897 (environment::{get_void_type_decl,
9898 get_variadic_parameter_type_decl}): Adjust.
9899 (type_or_decl_base::priv::env_): Make this be a pointer to const
9901 (type_or_decl::base::priv::priv): Adjust.
9902 (type_or_decl_base::set_environment)
9903 (set_environment_for_artifact): Take a pointer to const
9905 (elf_symbol::{g,s}et_environment, environment::intern)
9906 (type_or_decl_base::operator=): Define new methods.
9907 (decl_base::priv::{name_, qualified_parent_name_,
9908 temporary_qualified_name_, qualified_name_, linkage_name_}): Make
9909 these data member be of tpe interned_string.
9910 (decl_base::priv::priv): Make this take an environment. Adjust.
9911 (decl_base::{peek_qualified_name, peek_temporary_qualified_name,
9912 get_linkage_name, get_qualified_parent_name, get_name,
9913 get_qualified_name}, get_type_name, get_function_type_name)
9914 (get_method_type_name, get_node_name)
9915 (qualified_type_def::get_qualified_name)
9916 (pointer_type_def::get_qualified_name)
9917 (array_type_def::get_qualified_name)
9918 (enum_type_decl::enumerator::get_qualified_name)
9919 (var_decl::get_id, function_decl::get_id)
9920 (function_decl::parameter::get_{name_id, type_name}): Return an
9922 (decl_base::{set_qualified_name, set_temporary_qualified_name})
9923 (qualified_type_def::get_qualified_name)
9924 (pointer_type_def::get_qualified_name)
9925 (reference_type_def::get_qualified_name)
9926 (array_type_def::get_qualified_name)
9927 (function_decl::parameter::get_qualified_name): Take an
9929 (decl_base::{set_name, set_linkage_name}): Intern the std::string
9930 passed in parameter.
9931 (equals): In the overload for decl_base, adjust for a little speed
9932 optimization that is justified by profiling.
9933 (pointer_type_def::priv::{internal_qualified_name_,
9934 temp_internal_qualified_name_}): Make these data member be
9936 (enum_type_decl::enumerator::priv::env_): New data member.
9937 (enum_type_decl::enumerator::priv::{name_, qualified_name}): Make
9938 these data member be of type interned_string.
9939 (enum_type_decl::enumerator::get_environment): New method.
9940 (enum_type_decl::enumerator::priv::priv) Adjust.
9941 (typedef_decl::operator==): Implement a little speed optimization.
9942 (var_decl::priv::nake_type_): New data member.
9943 (var_decl::priv::id_): Make this data member be of type
9945 (equals): In the overload for var_decl, function_type,
9946 function_decl, adjust for the use of interned_string.
9947 (function_decl::priv::id_): Make this be of type interned_string.
9948 (scope_decl::{add_member_decl, insert_member_decl})
9949 (lookup_function_type_in_translation_unit)
9950 (synthesize_type_from_translation_unit, lookup_node_in_scope)
9951 (lookup_type_in_scope, scope_decl::scope_decl)
9952 (qualified_type_def::qualified_type_def)
9953 (qualified_type_def::get_qualified_name)
9954 (pointer_type_def::pointer_type_def)
9955 (reference_type_def::reference_type_def)
9956 (array_type_def::array_type_def, array_type_def::append_subrange)
9957 (array_type_def::get_qualified_name)
9958 (enum_type_decl::enum_type_decl)
9959 (enum_type_decl::enumerator::get_qualified_name)
9960 (enum_type_decl::enumerator::set_name)
9961 (typedef_decl::typedef_decl, var_decl::var_decl)
9962 (function_type::function_type, method_type::method_type)
9963 (function_decl::function_decl)
9964 (function_decl::parameter::parameter)
9965 (class_decl::priv::comparison_started)
9966 (class_decl::add_base_specifier)
9967 (class_decl::base_spec::base_spec)
9968 (class_decl::method_decl::method_decl)
9969 (type_tparameter::type_tparameter)
9970 (non_type_tparameter::non_type_tparameter)
9971 (template_tparameter::template_tparameter)
9972 (type_composition::type_composition)
9973 (function_tdecl::function_tdecl, class_tdecl::class_tdecl)
9974 (qualified_name_setter::do_update): Adjust.
9975 (translation_unit::translation_unit, elf_symbol::elf_symbol)
9976 (elf_symbol::create, type_or_decl_base::type_or_decl_base)
9977 (decl_base::decl_base, type_base::type_base)
9978 (type_decl::type_decl, scope_type_decl::scope_type_decl)
9979 (namespace_decl::namespace_decl)
9980 (enum_type_decl::enumerator::enumerator, class_decl::class_decl)
9981 (template_decl::template_decl, function_tdecl::function_tdecl)
9982 (class_tdecl::class_tdecl): Take an environment.
9983 * src/abg-comparison.cc
9984 (function_suppression::suppresses_function): Adjust.
9985 * src/abg-reader.cc (read_translation_unit)
9986 (read_corpus_from_input, build_namespace_decl, build_elf_symbol)
9987 (build_function_parameter, build_function_decl, build_type_decl)
9988 (build_function_type, build_enum_type_decl, build_enum_type_decl)
9989 (build_class_decl, build_function_tdecl, build_class_tdecl)
9990 (read_corpus_from_native_xml): Likewise.
9991 * src/abg-writer.cc (id_manager::m_cur_id): Make this mutable.
9992 (id_manager::m_env): New data member.
9993 (id_manager::id_manager): Adjust.
9994 (id_manager::get_environment): New method.
9995 (id_manager::{get_id, get_id_with_prefix}): Return an
9997 (type_ptr_map): Make this be a hash map of type_base* ->
9998 interned_string, rather a type_base* -> string.
9999 (write_context::m_env): New data member.
10000 (write_context::m_type_id_map): Make this data member be mutable.
10001 (write_context::m_emitted_type_id_map): Make this be a hash map of
10002 interned_string -> bool, rather than string -> bool.
10003 (write_context::write_context): Take an environment and adjust.
10004 (write_context::get_environment): New method.
10005 (write_context::get_id_manager): New const overload.
10006 (write_context::get_id_for_type): Return an interned_string; adjust.
10007 (write_context::{record_type_id_as_emitted,
10008 record_type_as_referenced}): Adjust.
10009 (write_context::type_id_is_emitted): Take an interned_string.
10010 (write_context::{type_is_emitted,
10011 record_decl_only_type_as_emitted}): Adjust.
10012 (write_translation_unit, write_corpus_to_native_xml, dump):
10014 * tools/abisym.cc (main): Adjust.
10015 * tests/data/test-read-write/test22.xml: Adjust.
10016 * tests/data/test-read-write/test23.xml: Adjust.
10017 * tests/data/test-read-write/test26.xml: Adjust.
10019 2016-02-24 Dodji Seketeli <dodji@redhat.com>
10021 Update copyright notice
10022 * include/abg-corpus.h: Update copyright notice.
10023 * include/abg-dwarf-reader.h: Likewise.
10024 * src/abg-comparison.cc: Likewise.
10025 * src/abg-corpus.cc: Likewise.
10026 * src/abg-ir.cc: Likewise.
10028 2016-02-23 Dodji Seketeli <dodji@redhat.com>
10030 Fix crash when handling templates with empty patterns
10031 * src/abg-ir.cc (function_tdecl::traverse): Do not crash when
10032 traversing a template with empty pattern.
10033 (class_tdecl::operator==): Do not crash when comparing templates
10034 with empty patterns.
10036 2016-02-23 Dodji Seketeli <dodji@redhat.com>
10038 Add missing inequality operators for ABI artifacts
10039 * include/abg-ir.h ({translation_unit, elf_symbol::version,
10040 context_rel, decl_base, type_base, type_decl,
10041 array_type_def::subrange_type, enum_type_def::enumerator,
10042 dm_context_rel, template_parameter}::operator!=): Declare.
10043 (operator==): Make the overload form translation_unit_sptr,
10044 scope_decl_sptr, class_decl::base_spec_sptr,
10045 class_decl::member_function_template_sptr,
10046 class_decl::member_class_template_sptr take const references.
10047 (operator!=): Declare an an overload for the non-member operator
10048 != of translation_unit_sptr, elf_symbol_sptr,
10049 type_or_decl_base_sptr, type_base_sptr, scope_decl_sptr,
10050 type_decl, qualified_type_def_sptr, pointer_type_def_sptr,
10051 reference_type_def_sptr, enum_type_decl_sptr, class_decl_sptr,
10052 class_decl::base_spec_sptr,
10053 class_decl::member_function_template_sptr,
10054 class_decl::member_class_template_sptr.
10055 * src/abg-ir.cc ({translation_unit, elf_symbol::version,
10056 context_rel, decl_base, type_base, type_decl,
10057 array_type_def::subrange_type, enum_type_def::enumerator,
10058 dm_context_rel, template_parameter}::operator!=): Define.
10059 (operator==): Make the overload for translation_unit_sptr,
10060 scope_decl_sptr, class_decl::base_spec_sptr,
10061 class_decl::member_function_template_sptr,
10062 class_decl::member_class_template_sptr take const references.
10063 (operator!=): Define an an overload for the non-member operator !=
10064 of translation_unit_sptr, elf_symbol_sptr, type_or_decl_base_sptr,
10065 type_base_sptr, scope_decl_sptr, type_decl,
10066 qualified_type_def_sptr, pointer_type_def_sptr,
10067 reference_type_def_sptr, enum_type_decl_sptr, class_decl_sptr,
10068 class_decl::base_spec_sptr,
10069 class_decl::member_function_template_sptr,
10070 class_decl::member_class_template_sptr.
10072 2016-02-20 Dodji Seketeli <dodji@redhat.com>
10074 Make the tree pass distcheck again.
10075 * tests/data/Makefile.am: Add file
10076 test-diff-suppr/test28-add-aliased-function-report-0.txt to source
10079 2016-02-18 Dodji Seketeli <dodji@redhat.com>
10081 Bug 19658 - Type canonicalization slow for the 2nd binary loaded
10082 * include/abg-corpus.h (corpus::{record_canonical_type,
10083 lookup_canonical_type}): Declare new member functions.
10084 * src/abg-corpus.cc (corpus::priv::canonical_types_): New data
10086 (corpus::{record_canonical_type, lookup_canonical_type}): Define
10087 new member functions.
10088 * src/abg-ir.cc (type_base::get_canonical_type_for): Cache the
10089 canonical type inside the corpus of the type being canonicalized.
10090 Then later when canonicalizing another type, lookup in the cache
10091 inside its corpus to see if there is a type with the same name.
10092 * tests/data/test-diff-pkg/tbb-4.1-9.20130314.fc22.x86_64--tbb-4.3-3.20141204.fc23.x86_64-report-0.txt:
10095 2016-02-18 Dodji Seketeli <dodji@redhat.com>
10097 Add --verbose option to abidiff
10098 * doc/manuals/abidiff.rst: Add documentation for new --verbose
10100 * include/abg-dwarf-reader.h (set_do_log): Declare new function.
10101 * src/abg-dwarf-reader.cc (read_context::do_log_): New data
10103 (read_context::read_context): Initialize the new data member.
10104 (read_context::do_log): Define accessors.
10105 (set_do_log): Define new function;
10106 (read_context::canonicalize_types_scheduled)
10107 (read_debug_info_into_corpus): Add logs.
10108 * tools/abidiff.cc (options::do_log): New data member.
10109 (options::options): Initialize it.
10110 (display_usage): Add an usage string for --verbose.
10111 (parse_command_line): Parse the new --verbose option.
10112 (main): Set the dwarf reader's context wrt presence of the
10115 2016-02-18 Dodji Seketeli <dodji@redhat.com>
10118 * tools/abipkgdiff.cc (parse_command_line): Fix a wrong indentation.
10120 2016-02-17 Dodji Seketeli <dodji@redhat.com>
10122 Bug 19638 - DWARF reader fails to link clone function to its declaration
10123 * include/abg-ir.h (decl_base::set_linkage_name): Make this member
10125 (class_decl::string_mem_fn_ptr_map_type): Define new member type.
10126 (class_decl::find_member_function): Declare new member function.
10127 (copy_member_function): Declare new function. Declare it as
10128 friend of class_decl.
10129 (method_decl::set_linkage_name): Declare an overload for this
10131 * src/abg-dwarf-reader.cc (build_function_decl): Allow updating of
10132 linkage_name even if the linkage_name was already defined.
10133 (build_ir_node_from_die): In the case DW_TAG_subprogram, make the
10134 lookup of scope of the DIE work even if it has both an abstract
10135 origin and a specification (DW_AT_abstract_origin and
10136 DW_AT_specification).
10137 * src/abg-ir.cc (maybe_adjust_canonical_type): Define new
10139 (canonicalize): Use it.
10140 (function_decl::get_id): Return the linkage name first, if it
10142 (class_decl::priv::mem_fns_map_): New data member.
10143 (class_decl::find_member_function): Define new member function.
10144 (class_decl::method_decl::set_linkage_name): Likewise.
10145 (class_decl::add_member_function): Update the new data member
10146 class_decl::priv::mem_fns_map_.
10147 (copy_member_function): Define new static function.
10148 * tests/data/test-abidiff/test-PR18791-report0.txt: Adjust.
10149 * tests/data/test-read-dwarf/test10-pr18818-gcc.so.abi: Adjust.
10150 * tests/data/test-read-dwarf/test12-pr18844.so.abi: Adjust.
10151 * tests/data/test-read-dwarf/test16-pr18904.so.abi: Adjust.
10152 * tests/data/test-read-dwarf/test18-pr19037-libvtkRenderingLIC-6.1.so.abi: Adjust.
10153 * tests/data/test-read-dwarf/test19-pr19023-libtcmalloc_and_profiler.so.abi: Adjust.
10154 * tests/data/test-read-dwarf/test20-pr19025-libvtkParallelCore-6.1.so.abi: Adjust.
10155 * tests/data/test-read-dwarf/test22-pr19097-libstdc++.so.6.0.17.so.abi: Adjust.
10156 * tests/data/test-read-dwarf/test9-pr18818-clang.so.abi: Adjust.
10158 2016-02-17 Dodji Seketeli <dodji@redhat.com>
10160 Add function lookup by linkage name to libabigail::corpus
10161 * include/abg-corpus.h (corpus::lookup_functions): Declare new
10163 * src/abg-corpus.cc (class corpus::exported_decls_builder::priv):
10164 Make class corpus be a friend of this type.
10165 (corpus::exported_decls_builder::priv::add_fn_to_id_fns_map): Fix
10166 a thinko that was preventing the fn_id -> functions map from ever
10167 being filled. Fix this function to make it associate each aliases
10168 of a given function to the function, in the hash table.
10169 (corpus::lookup_functions): Define new member function.
10171 2016-02-17 Dodji Seketeli <dodji@redhat.com>
10174 * include/abg-ir.h (method_type::{method_type, set_class_type,
10175 get_type, set_type}): Use type_base_sptr and class_decl_sptr
10176 instead of the full non-typedefed name.
10177 (method_type):Do some cleanups in the definition of the
10178 convenience typedefs.
10179 * src/abg-ir.cc (method_type::{method_type, set_class_type,
10180 get_type, set_type}): Use type_base_sptr and class_decl_sptr
10181 instead of the full non-typedefed name.
10182 * src/abg-writer.cc (write_class_decl): Add a comment.
10184 2016-02-13 Dodji Seketeli <dodji@redhat.com>
10186 Bug 19619 - failing to suppress added aliased function reports for C++
10187 * src/abg-comparison.cc
10188 (function_suppression::suppresses_function): Make the evaluation
10189 of the "name" and "name_regexp" consider the cases of languages in
10190 which the function name is the same as the symbol name and the
10191 case of languages in which it is not. In the former case, all
10192 symbol alias names must be matched. In the latter case, if "name"
10193 and "name_regexp" match the function name, the suppression
10194 specification is considered to match the report about the function
10195 change. Also, use the elf_symbol::is_main_symbol() predicate to
10196 test for the symbol being a main symbol, rather than using
10197 error-prone pointer equality.
10198 * tests/data/test-diff-suppr/test27-add-aliased-function-0.suppr:
10200 * tests/data/test-diff-suppr/test27-add-aliased-function-1.suppr: Likewise.
10201 * tests/data/test-diff-suppr/test27-add-aliased-function-2.suppr: Likewise.
10202 * tests/data/test-diff-suppr/test27-add-aliased-function-3.suppr: Likewise.
10203 * tests/data/test-diff-suppr/test27-add-aliased-function-4.suppr: Likewise.
10204 * tests/data/test-diff-suppr/test27-add-aliased-function-report-0.txt: Likewise.
10205 * tests/data/test-diff-suppr/test27-add-aliased-function-report-1.txt: Likewise.
10206 * tests/data/test-diff-suppr/test27-add-aliased-function-report-2.txt: Likewise.
10207 * tests/data/test-diff-suppr/test27-add-aliased-function-report-3.txt: Likewise.
10208 * tests/data/test-diff-suppr/test27-add-aliased-function-report-4.txt: Likewise.
10209 * tests/data/test-diff-suppr/test27-add-aliased-function-report-5.txt: Likewise.
10210 * tests/data/test-diff-suppr/test27-add-aliased-function-v0.cc: Likewise.
10211 * tests/data/test-diff-suppr/test27-add-aliased-function-v0.o: Likewise.
10212 * tests/data/test-diff-suppr/test27-add-aliased-function-v1.cc: Likewise.
10213 * tests/data/test-diff-suppr/test27-add-aliased-function-v1.o: Likewise.
10214 * tests/data/test-diff-suppr/test28-add-aliased-function-0.suppr: Likewise.
10215 * tests/data/test-diff-suppr/test28-add-aliased-function-1.suppr: Likewise.
10216 * tests/data/test-diff-suppr/test28-add-aliased-function-2.suppr: Likewise.
10217 * tests/data/test-diff-suppr/test28-add-aliased-function-3.suppr: Likewise.
10218 * tests/data/test-diff-suppr/test28-add-aliased-function-4.suppr: Likewise.
10219 * tests/data/test-diff-suppr/test28-add-aliased-function-5.suppr: Likewise.
10220 * tests/data/test-diff-suppr/test28-add-aliased-function-report-0.txt: Likewise.
10221 * tests/data/test-diff-suppr/test28-add-aliased-function-report-1.txt: Likewise.
10222 * tests/data/test-diff-suppr/test28-add-aliased-function-report-2.txt: Likewise.
10223 * tests/data/test-diff-suppr/test28-add-aliased-function-report-3.txt: Likewise.
10224 * tests/data/test-diff-suppr/test28-add-aliased-function-report-4.txt: Likewise.
10225 * tests/data/test-diff-suppr/test28-add-aliased-function-report-5.txt: Likewise.
10226 * tests/data/test-diff-suppr/test28-add-aliased-function-report-6.txt: Likewise.
10227 * tests/data/test-diff-suppr/test28-add-aliased-function-v0.c: Likewise.
10228 * tests/data/test-diff-suppr/test28-add-aliased-function-v0.o: Likewise.
10229 * tests/data/test-diff-suppr/test28-add-aliased-function-v1.c: Likewise.
10230 * tests/data/test-diff-suppr/test28-add-aliased-function-v1.o: Likewise.
10231 * tests/data/Makefile.am: Add the new test material above to the
10232 source distribution.
10233 * tests/test-diff-suppr.cc: Add the new test inputs above to this
10236 2016-02-12 Dodji Seketeli <dodji@redhat.com>
10238 Emit more informational messages on unrecognized options
10239 * tools/abicompat.cc (options::prog_name): New data member.
10240 (display_help, perform_compat_check_in_normal_mode)
10241 (perform_compat_check_in_weak_mode, main): Prefix error messages
10242 with the name of the program.
10243 * tools/abidw.cc (options::wrong_option): New data member.
10244 (display_help): Prefix error messages with the name of the
10246 (parse_command_line): Record the name of the unrecognized option.
10247 (main): Tell the name of the unrecognized option. Prefix error
10248 messages with the name of the program.
10249 * tools/abilint.cc (optionqs::wrong_option): New data member
10250 (display_usage): Prefix error messages with the name of the
10252 (parse_command_line): Record the name of the unrecognized option.
10253 (main): Tell the name of the unrecognized option. Prefix error
10254 messages with the name of the program.
10255 * tools/abipkgdiff.cc (options::{wrong_option, prog_name}): New
10257 (package::erase_extraction_directory, display_usage, extract_rpm)
10258 (extract_deb, extract_tar)
10259 (erase_created_temporary_directories_parent, extract_package)
10260 (compare, create_maps_of_package_content): Prefix error messages
10261 with the name of the program.
10262 (maybe_check_suppression_files): Adjust.
10263 (parse_command_line): Record the name of the unrecognized option,
10264 and the name of option which lacks an operand.
10265 (main): Give the name of the unrecognized option. Prefix error
10266 messages with the name of the program.
10268 2016-02-12 Dodji Seketeli <dodji@redhat.com>
10270 Prefix abidiff error message with the 'abidiff' program name
10271 * include/abg-tools-utils.h (emit_prefix): Declare new function.
10272 (check_file): Add a new parameter with a default value, so that
10273 existing code keeps compiling.
10274 * src/abg-tools-utils.cc (emit_prefix): Define new function.
10275 (check_file): Use the emit_prefix function and give it the program
10276 name passed as a new parameter.
10277 * tools/abidiff.cc (display_usage, main): Use the new emit_prefix
10278 to prefix error messages.
10280 2016-02-11 Dodji Seketeli <dodji@redhat.com>
10282 Bug 19606 - Need better error message for invalid options
10283 * tools/abidiff.cc (options::wrong_option): New data member.
10284 (parse_command_line): Record the name of the unknown option and of
10285 the option which value is missing.
10287 2016-02-11 Dodji Seketeli <dodji@redhat.com>
10289 Add a comment about libabigail needing elfutils 0.159 at least.
10290 * configure.ac: Add a comment saying that we require at least
10293 2016-02-11 Dodji Seketeli <dodji@redhat.com>
10295 Talk about mandatory properties in suppress_* directives
10296 * doc/manuals/libabigail-concepts.rst: Talk about the mandatory
10297 properties for suppress_type, suppress_function and
10298 suppress_variable directives.
10300 2016-02-11 Dodji Seketeli <dodji@redhat.com>
10302 Make abipkgdiff check for the presence of suppression spec files
10303 * tools/abipkgdiff.cc (maybe_check_suppression_files): Define new
10307 2016-02-11 Dodji Seketeli <dodji@redhat.com>
10309 Make abipkgdiff return correct exit code on usage error
10310 * tools/abipkgdiff.cc (main): Return the correct error code on
10313 2016-02-11 Dodji Seketeli <dodji@redhat.com>
10315 Bug 19604 - abidiff --suppressions doesn't complain about invalid file name
10316 * tools/abidiff.cc (maybe_check_suppression_files): Define new
10320 2016-02-10 Dodji Seketeli <dodji@redhat.com>
10322 Use proper WIFEXITED and WEXITSTATUS macros to get exit code
10323 * tests/test-diff-dwarf-abixml.cc (main): Use WIFEXITED and
10324 WEXITSTATUS macros to get the return code of the abidiff program.
10325 * tests/test-diff-filter.cc (test_task::perform): Likewise.
10326 * tests/test-diff-pkg.cc (main): Likewise.
10327 * tests/test-diff-suppr.cc (main): Likewise.
10329 2016-02-10 Dodji Seketeli <dodji@redhat.com>
10331 Bug 19596 - Incorrect exit status for incompatible ABI change
10332 * include/abg-comparison.h (enum diff_category): Adjust the
10333 comment for enumerator VIRTUAL_MEMBER_CHANGE_CATEGORY; changes of
10334 this category are incompatible ABI changes.
10335 (corpus_diff::diff_stats::num_func_with_virtual_offset_changes):
10336 Declare new accessors.
10337 * src/abg-comparison.cc
10338 (corpus_diff::diff_stats::priv::num_func_with_virt_offset_changes):
10340 (corpus_diff::diff_stats::priv::priv): Initialize the new data
10342 (corpus_diff::diff_stats::num_func_with_virtual_offset_changes):
10343 Define new accessors.
10344 (corpus_diff::priv::apply_filters_and_compute_diff_stats): Use the
10345 new accessor to set the number of functions with virtual offset
10346 changes onto the stats data structure.
10347 (corpus_diff::has_incompatible_changes): Take functions with
10348 virtual offset changes into account.
10349 * tests/test-abidiff-exit.cc: New test harness to test for exit
10351 * tests/Makefile.am: Build the new test harness runtestabidiff
10352 from the test-abidiff-exit.cc source file.
10353 * tests/data/test-abidiff-exit/test1-voffset-change-report0.txt:
10354 New reference test output.
10355 * tests/data/test-abidiff-exit/test1-voffset-change-v0.cc: New
10356 test input source code.
10357 * tests/data/test-abidiff-exit/test1-voffset-change-v0.o: New test input.
10358 * tests/data/test-abidiff-exit/test1-voffset-change-v1.cc: New
10359 test input source code.
10360 * tests/data/test-abidiff-exit/test1-voffset-change-v1.o: New test input.
10361 * tests/data/Makefile.am: tests/data/Makefile.am: Add the new test
10362 inputs above to the source distribution.
10364 2016-02-04 Dodji Seketeli <dodji@redhat.com>
10366 Fix synthesizing of reference type
10367 * src/abg-ir.cc (synthesize_type_from_translation_unit): Support
10368 synthesizing reference types.
10369 * tests/data/test-abicompat/libtest9-fn-changed-v0.so: Add new
10371 * tests/data/test-abicompat/libtest9-fn-changed-v1.so: Likewise.
10372 * tests/data/test-abicompat/test9-fn-changed-app: Likewise.
10373 * tests/data/test-abicompat/test9-fn-changed-app.cc: : Likewise.
10374 * tests/data/test-abicompat/test9-fn-changed-report-0.txt: Likewise.
10375 * tests/data/test-abicompat/test9-fn-changed-v0.cc: Likewise.
10376 * tests/data/test-abicompat/test9-fn-changed-v0.h: Likewise.
10377 * tests/data/test-abicompat/test9-fn-changed-v1.cc: Likewise.
10378 * tests/data/test-abicompat/test9-fn-changed-v1.h: Likewise.
10379 * tests/data/Makefile.am: Add the new material to source
10381 * tests/test-abicompat.cc (in_out_specs): Add the new test inputs
10382 to the test harness.
10384 2016-02-03 Dodji Seketeli <dodji@redhat.com>
10386 Fix synthesizing of pointer type
10387 * include/abg-ir.h: Update copyright.
10388 * src/abg-ir.cc (synthesize_type_from_translation_unit): Support
10389 synthesizing pointer types.
10390 * tests/data/test-abicompat/libtest8-fn-changed-libapp-v0.so: New
10392 * tests/data/test-abicompat/libtest8-fn-changed-libapp-v1.so: Likewise.
10393 * tests/data/test-abicompat/test8-fn-changed-app: Likewise.
10394 * tests/data/test-abicompat/test8-fn-changed-app.c: Likewise.
10395 * tests/data/test-abicompat/test8-fn-changed-libapp-v0.c: Likewise.
10396 * tests/data/test-abicompat/test8-fn-changed-libapp-v0.h: Likewise.
10397 * tests/data/test-abicompat/test8-fn-changed-libapp-v1.c: Likewise.
10398 * tests/data/test-abicompat/test8-fn-changed-libapp-v1.h: Likewise.
10399 * tests/data/test-abicompat/test8-fn-changed-report-0.txt: Likewise.
10400 * tests/data/Makefile.am: Add the new test input files to source
10402 * tests/test-abicompat.cc (in_out_specs): Add the new test inputs
10403 above to the test harness.
10405 2016-01-26 Mark Wielaard <mjw@redhat.com>
10407 Remove defined but not used functions pointed out by GCC6.
10408 * src/abg-ir.cc (convert_node_to_decl(decl_base_sptr)): Remove
10410 (get_node_name(decl_base_sptr)): Likewise.
10412 2016-01-26 Mark Wielaard <mjw@redhat.com>
10414 Make make more silent.
10415 * Makefile.am (AM_MAKEFLAGS): Set --no-print-directory.
10417 2016-01-26 Mark Wielaard <mjw@redhat.com>
10419 Fix GCC6 -Wmisleading-indentation warnings.
10420 * src/abg-dwarf-reader.cc (find_import_unit_point_before_die):
10421 Properly indent code after if clause.
10422 * src/abg-ini.cc (write_property_value): Properly indent return
10423 statement after else clause.
10425 2016-01-27 Dodji Seketeli <dodji@redhat.com>
10427 Fix abicompat's handling of library types not used by the application
10428 * tools/abicompat.cc (perform_compat_check_in_weak_mode): If the
10429 application doesn't use a given type defined and exported by the
10430 library, then skip it.
10432 2016-01-27 Dodji Seketeli <dodji@redhat.com>
10434 Do not crash when looking up a type from global scope
10435 * src/abg-ir.cc (lookup_type_in_scope): Gently Handle empty access
10438 2016-01-25 Dodji Seketeli <dodji@redhat.com>
10440 Comparing aliases of the same symbol must be done by pointer
10441 * src/abg-ir.cc (elf_symbol::operator==): Fix thinko and
10442 indentation. What was I thinking ...
10443 (elf_symbol::add_alias)
10444 (compute_aliases_for_elf_symbol): Do not compare aliases using the
10445 equality operator, because it considers all aliases of a given
10446 symbol as equal. Rather, use elf_symbol::is_main_symbol() to test
10447 if an alias is the main symbol alias.
10448 * src/abg-comp-filter.cc (function_name_changed_but_not_symbol):
10450 * src/abg-corpus.cc
10451 (corpus::priv::build_unreferenced_symbols_tables): Likewise.
10452 * src/abg-writer.cc (write_elf_symbol_aliases): Likewise.
10454 2016-01-21 Dodji Seketeli <dodji@redhat.com>
10456 Bug 19204 - libabigail aborts on DWARF referencing non-existing DIE
10457 * src/abg-dwarf-reader.cc (get_parent_die): If we couldn't find
10458 the parent of a given DIE, return false, do not abort. Also,
10459 assert that if we don't find the parent of a DIE in the main debug
10460 info, we don't find it in the alternate debug info either (and
10461 vice versa). This is because I'd like to abort on cases where we
10462 look for a DIE in the wrong debug info; those cases are likely to
10463 be hint that the DWARF reader is doing something wrong which ought
10464 to be investigated and fixed.
10465 (get_scope_for_die): If we couldn't get the parent of the DIE,
10466 then return a nil scope.
10467 * tests/data/test-types-stability/pr19204-libtcmalloc.so.4.2.6-xlc:
10468 New test binary input.
10469 * tests/data/Makefile.am: Add the new binary test input to the
10470 source distribution.
10471 * tests/test-types-stability.cc (elf_paths): Account for the new
10474 2016-01-20 Dodji Seketeli <dodji@redhat.com>
10476 Pass parm of elf_symbol::add_alias by reference
10477 * include/abg-ir.h (elf_symbol::add_alias): Pass parameter by
10479 * src/abg-ir.cc (elf_symbol::add_alias): Likewise.
10481 2016-01-20 Dodji Seketeli <dodji@redhat.com>
10483 Bug 19141 - Libabigail doesn't support common ELF symbols
10484 * include/abg-ir.h (elf_symbol::elf_symbol): Take a new flag to
10485 say if the symbol is common.
10486 (elf_symbol::{is_common_symbol, has_other_common_instances,
10487 get_next_common_instance, add_common_instance}): New member functions.
10488 * src/abg-ir.cc (elf_symbol::priv::{is_common_,
10489 next_common_instance_): New data members.
10490 (elf_symbol::priv::priv): Adjust.
10491 (elf_symbol::{elf_symbol, create}): Take a new flag to say if the
10493 (textually_equals): Adjust to account for symbol common-ness.
10494 (elf_symbol::{is_common_symbol, has_other_common_instances,
10495 get_next_common_instance, add_common_instance}): Define new member
10497 (elf_symbol::add_alias): Drive-by fix; compare symbols using
10498 pointer value. Value comparison is not necessary.
10499 * src/abg-dwarf-reader.cc (lookup_symbol_from_sysv_hash_tab)
10500 (lookup_symbol_from_gnu_hash_tab, lookup_symbol_from_symtab)
10501 (read_context::lookup_elf_symbol_from_index): Adjust the creation
10502 of the symbol to account for common-ness.
10503 (read_context::load_symbol_maps): Recognize instances of a given
10504 common symbol and represent them as such. Do not mistake this
10505 with symbol aliases.
10506 * src/abg-reader.cc (build_elf_symbol): Adjust the creation of the
10507 symbol to account for common-ness.
10508 * src/abg-writer.cc (write_elf_symbol): Adjust symbol
10509 serialization to account common-ness.
10510 * tests/data/test-types-stability/pr19141-get5d.o: Add new test
10512 * tests/data/test-types-stability/pr19142-topo.o: Likewise.
10513 * tests/data/Makefile.am: Add the new test inputs to source distribution.
10514 * tests/test-types-stability.cc (elf_paths): The the new test
10515 inputs into account.
10517 2016-01-13 Dodji Seketeli <dodji@redhat.com>
10519 Bug 19434 - invalid character in attribute value
10520 * include/abg-tools-utils.h (string_is_ascii_identifier): Declare
10522 * src/abg-tools-utils.cc (string_is_ascii_identifier): Define new function.
10523 * src/abg-dwarf-reader.cc (build_function_type): Discard parameter
10524 name if it's made of non-identifier ascii characters.
10525 * tests/data/test-types-stability/pr19434-elf0: New test binary input file.
10526 * tests/data/Makefile.am: Add the new test input to source distribution.
10527 * tests/test-types-stability.cc: Test the new test input into account.
10529 2016-01-18 Dodji Seketeli <dodji@redhat.com>
10531 Sort the tests run in tests/ by running the slowest ones first
10532 * tests/Makefile.am: Sort the tests by running the slowest ones
10535 2016-01-15 Dodji Seketeli <dodji@redhat.com>
10537 Use worker threads pattern to speed up some tests
10538 * include/Makefile.am: Add the new abg-workers.h to source
10540 * include/abg-workers.h: New file.
10541 * src/Makefile.am: Add the new abg-worker.cc to source
10543 * src/abg-workers.cc: New file.
10544 * tests/test-utils.cc: Update copyright. Make get_src_dir() and
10545 get_build_dir() return a const char*, as opposed to returning a
10546 string. Make that const char reside in thread local storage, so
10547 that two concurrent threads can safely call these functions in
10548 parallel, without any race.
10549 * tests/test-utils.h: Make get_src_dir() and get_build_dir()
10550 return a const char*, as opposed to returning a string.
10551 * tests/test-abicompat.cc: Update copyright. Adjust for
10552 get_src_dir() and get_build_dir() change.
10553 * tests/test-abidiff.cc: Likewise.
10554 * tests/test-alt-dwarf-file.cc: Likewise.
10555 * tests/test-core-diff.cc: Likewise.
10556 * tests/test-diff-dwarf-abixml.cc: Likewise.
10557 * tests/test-diff-dwarf.cc: Likewise.
10558 * tests/test-diff-pkg.cc: Likewise.
10559 * tests/test-diff-suppr.cc: Likewise.
10560 * tests/test-lookup-syms.cc: Likewise.
10561 * tests/test-read-dwarf.cc: Likewise.
10562 * tests/test-read-write.cc: Likewise.
10563 * tests/test-types-stability.cc: Likewise. Use the new task queue
10564 type to run these tests in parallel.
10565 * tests/test-diff-filter.cc: Likewise.
10567 2016-01-18 Ondrej Oprala <ooprala@redhat.com>
10569 Escape the value of the filepath attribute.
10570 * src/abg-writer.cc (write_location): Sanitize the filepath with
10571 xml::escape_xml_string().
10572 (write_translation_unit): Likewise.
10573 (write_corpus_to_native_xml): Likewise.
10574 * tests/data/test-types-stability/pr19433-custom0: Add a new test file.
10575 * tests/test-types-stability.cc: Add the test file to the test harness.
10576 * tests/data/Makefile.am: Add the new test file to the list.
10578 2016-01-09 Dodji Seketeli <dodji@redhat.com>
10580 Make enum values take 64 bits on all platforms
10581 * include/abg-ir.h: Include stdint.h for int64_t.
10582 (enumerator::enumerator): Take an int64_t value for the value of
10584 (enumerator::{s,g}et_value): Take/return an int64_t value.
10585 * src/abg-ir.cc (enum_type_decl::enumerator::priv): Store the
10586 value in an int64_t.
10587 (enumerator::priv::priv): Take a int64_t for the value.
10588 (enum_type_decl::enumerator::enumerator): Likewise.
10589 (enum_type_decl::enumerator::{s,g}et_value): Take/returnan int64_t
10591 * src/abg-dwarf-reader.cc (die_unsigned_constant_attribute): Take
10593 (die_signed_constant_attribute): Take an int64_t value.
10594 (die_location, die_size_in_bits, die_access_specifier)
10595 (die_virtuality, die_is_virtual, die_is_declared_inline)
10596 (build_translation_unit_and_add_to_ir, build_type_decl)
10597 (build_enum_type, build_pointer_type_def, build_array_type):
10599 * src/abg-reader.cc (build_enum_type_decl): Adjust.
10600 * src/abg-writer.cc (write_enum_type_decl): Do not cast the result
10601 of enumerator::get_value() anymore, it's value is now a int64_t.
10603 2016-01-08 Dodji Seketeli <dodji@redhat.com>
10605 Include missing <algorithm> to abg-dwarf-reader.cc
10606 * src/abg-dwarf-reader.cc: Add missing <algorithm> include file.
10608 2016-01-08 Dodji Seketeli <dodji@redhat.com>
10610 Bug 19138 - Failure to relate variables address from DWARF and ELF
10611 * include/abg-dwarf-reader.h (elf_type::ELF_TYPE_RELOCATABLE): New
10613 * src/abg-dwarf-reader.cc (find_section): Factorize this from ...
10614 (find_text_section, find_bss_section): ... these.
10615 (find_rodata_section, find_data_section, find_data1_section):
10616 Define new static functions.
10617 (elf_file_type): Move this static function definition up.
10618 (read_context::{get_elf_file_type, address_is_in_section,
10619 get_data_section_for_variable_address}): New member functions.
10620 (read_context::maybe_adjust_fn_sym_address): Adjust comment.
10621 Adjust to use the new
10622 read_context::get_data_section_for_variable_address().
10623 * tests/data/test-types-stability/pr19138-elf0: New test input
10625 * tests/data/Makefile.am: Add the new test input binary to the
10627 * tests/test-types-stability.cc (elf_paths): Take it into account.
10629 2016-01-08 Dodji Seketeli <dodji@redhat.com>
10631 Bump version revision to 1.0.rc3
10632 * configure.ac: Change version_revision to rc3
10634 2016-01-08 Dodji Seketeli <dodji@redhat.com>
10636 Add a release announcement text pattern
10637 * release-text-template.txt: New file.
10639 2016-01-08 Dodji Seketeli <dodji@redhat.com>
10641 Upate build instructions on the website
10642 * doc/website/mainpage.txt: Add instruction about how to build
10645 2016-01-07 Dodji Seketeli <dodji@redhat.com>
10647 Update website link for 1.0.rc2
10648 * doc/website/mainpage.txt: Update tarball link for 1.0.rc2
10650 2016-01-07 Dodji Seketeli <dodji@redhat.com>
10652 Update ChangeLog before 1.0.rc2
10653 * ChangeLog: Update with make update-changelog
10655 2016-01-07 Dodji Seketeli <dodji@redhat.com>
10657 Update NEWS for 1.0.rc2
10660 2016-01-07 Dodji Seketeli <dodji@redhat.com>
10662 Fix tests/data/Makefile.am glitch
10663 * tests/data/Makefile.am: Fix a faulty file path.
10665 2016-01-07 Dodji Seketeli <dodji@redhat.com>
10667 Lexicographically sort added/removed base classes in change report
10668 * src/abg-comparison.cc (sort_string_base_diff_sptr_map): Define
10669 new static function.
10670 (struct base_spec_comp): Define new type.
10671 (class_diff::priv::sorted_{deleted,inserted}_bases_): New data
10673 (class_diff::ensure_lookup_tables_populated): Sort the deleted and
10674 inserted base classes.
10675 (class_diff::report): Use the sorted set of deleted/inserted base
10676 classes in the report.
10677 * tests/data/test-diff-pkg/tbb-4.1-9.20130314.fc22.x86_64--tbb-4.3-3.20141204.fc23.x86_64-report-0.txt: Adjust.
10679 2016-01-06 Dodji Seketeli <dodji@redhat.com>
10681 Fix regression on the support for alternate debug info files
10682 * src/abg-dwarf-reader.cc
10683 (imported_unit_point::imported_unit_from_alt_di): New data member.
10684 (imported_unit_point::imported_unit_point): Adjust.
10685 (read_context::alt_tu_die_imported_unit_points_map_): New data
10687 (read_context::alt_tu_die_imported_unit_points_map): New accessor.
10688 (die_die_attribute): Remove the overload which doesn't say if the
10689 resulting DIE comes from alternate debug info.
10690 (build_die_parent_relations_under): Take a new flag which says if
10691 we are building the relations about DIEs in the alternate debug
10692 info section or not. Use that flag to know if the imported unit
10693 trace we are building is for an alternate debug info file or not.
10694 (build_die_parent_maps): Build two different imported unit point
10695 trace vectors: one for the main debug info file, and another one
10696 for the alternate debug info file.
10697 (find_import_unit_point_between_dies): Take a flag that says if
10698 the beginning of the search is a DIE in the alternate debug info
10699 file or not. Use it to know if we should use the import point
10700 trace vectors from alternate debug info or from the main debug
10701 info file. When the import point trace vector is empty, return
10703 (get_parent_die): If the parent DIE is a DW_TAG_partial_unit which
10704 hasn't been imported into this TU, then assume the logical parent
10705 is the DIE for the current translation unit.
10706 * tests/data/test-diff-pkg/tbb-4.1-9.20130314.fc22.x86_64--tbb-4.3-3.20141204.fc23.x86_64-report-0.txt:
10707 Reference test output.
10708 * tests/data/test-diff-pkg/tbb-4.1-9.20130314.fc22.x86_64.rpm: New
10710 * tests/data/test-diff-pkg/tbb-4.3-3.20141204.fc23.x86_64.rpm:
10712 * tests/data/test-diff-pkg/tbb-debuginfo-4.1-9.20130314.fc22.x86_64.rpm:
10714 * tests/data/test-diff-pkg/tbb-debuginfo-4.3-3.20141204.fc23.x86_64.rpm:
10716 * tests/data/Makefile.am: Add the new test materials to the source
10718 * tests/test-diff-pkg.cc (int_out_specs): Add the new rpms to the
10719 list of rpms to test against.
10721 2016-01-06 Dodji Seketeli <dodji@redhat.com>
10723 Bump revision number to 1.0.rc2
10724 * configure.ac: Bump revision number to 1.0.rc2
10726 2016-01-05 Dodji Seketeli <dodji@redhat.com>
10728 Update link to the 1.0.rc1 tarball
10729 * doc/website/mainpage.txt: Update the "Getting source code"
10732 2016-01-05 Dodji Seketeli <dodji@redhat.com>
10734 Update ChangeLog before 1.0.rc1
10735 * ChangeLog: Update automatically with make update-changelog
10737 2016-01-05 Dodji Seketeli <dodji@redhat.com>
10740 * tools/abidw.cc (parse_command_line): Simplify logic.
10743 2016-01-05 Dodji Seketeli <dodji@redhat.com>
10747 * Makefile.am: Add NEWS file to source distribution.
10749 2016-01-04 Dodji Seketeli <dodji@redhat.com>
10751 Bug 19355 - Libabigail slow on r300_dri.so
10752 * src/abg-dwarf-reader.cc (struct imported_unit_point): Define new
10754 (operator<(const imported_unit_point&, const
10755 imported_unit_point&)): Define less-than operator for new
10756 imported_unit_point& type.
10757 (imported_unit_points_type, tu_die_imported_unit_points_map_type):
10759 (find_lower_bound_in_imported_unit_points): Define new static function.
10760 (read_context::tu_die_imported_unit_points_map_): New data member.
10761 (read_context::tu_die_imported_unit_points_map): New getter.
10762 (die_die_attribute): Define new overload.
10763 (build_die_parent_relations_under): Take imported_unit_points_type
10764 output parameter and populate it along the way. Remove the
10765 overload that takes a read_context as a parameter.
10766 (build_primary_die_parent_relations_under)
10767 (build_alternate_die_parent_relations_under): Remove.
10768 (build_die_parent_maps): Pass an instance of
10769 imported_unit_points_type to build_die_parent_relations_under.
10770 (find_import_unit_point_between_dies): Rename one overload of
10771 find_last_import_unit_point_before_die into this. Adjust to make
10772 it find the import point between two offsets.
10773 (find_import_unit_point_before_die): Rename the other overload of
10774 find_last_import_unit_point_before_die into this. Adjust to use
10775 find_import_unit_point_between_dies.
10776 (get_parent_die): Adjust to use find_import_unit_point_before_die.
10778 2016-01-04 Dodji Seketeli <dodji@redhat.com>
10780 Support two different variables having the same underlying symbol
10781 * src/abg-ir.cc (var_decl::get_id()): Include the name of the
10782 variable in the ID.
10784 2016-01-04 Dodji Seketeli <dodji@redhat.com>
10786 Avoid adding the same base class twice
10787 * src/abg-dwarf-reader.cc:
10788 * src/abg-reader.cc:
10790 2016-01-04 Dodji Seketeli <dodji@redhat.com>
10792 Speed up class_decl::find_base_class
10793 * src/abg-ir.cc (class_decl::priv::bases_map_): New data member.
10794 (class_decl::add_base_specifier): Add the new base specifier to
10795 the new class_decl::priv::bases_map_ data member.
10796 (class_decl::find_base_class): Use the new
10797 class_decl::priv::bases_map_ data member to speed up finding the
10800 2016-01-04 Dodji Seketeli <dodji@redhat.com>
10802 Make class_decl::base_spec class follow the pimpl pattern
10803 * include/abg-ir.h (class_decl::base_spec::priv): Declare new
10805 (class_decl::base_spec::priv_): Declare new pimpl data member.
10806 (class_decl::base_spec::{base_class_, offset_in_bits_,
10807 is_virtual_}): Remove.
10808 (class_decl::base_spec::{get_base_class, get_is_virtual,
10809 get_offset_in_bits}): Make these member functions out of line.
10810 * src/abg-ir.cc (struct class_decl::base_spec::priv): New type.
10811 (class_decl::base_spec::{get_base_class, get_is_virtual,
10812 get_offset_in_bits}): Define these functions here.
10813 (class_decl::base_spec::base_spec): Adjust because now there is
10814 only one pimpl data member to initialize.
10816 2015-11-16 Ondrej Oprala <ooprala@redhat.com>
10818 Add the option of printing the file, line and column information about a type being reported.
10819 * bash-completion/abicompat: Complete the new "--no-show-locs" option.
10820 * bash-completion/abidiff: Likewise.
10821 * bash-completion/abidw: Likewise.
10822 * bash-completion/abipkgdiff: Likewise.
10823 * doc/manuals/abicompat.rst: Mention the new "--no-show-locs" option.
10824 * doc/manuals/abidiff.rst: Likewise.
10825 * doc/manuals/abidw.rst: Likewise.
10826 * doc/manuals/abipkgdiff.rst: Likewise.
10827 * include/abg-comparison.h (show_locs): Add declarations.
10828 * src/abg-comparison.cc: (diff_context::priv): Add a new switch
10829 called "show_locs_" and set its default value to false.
10830 (report_loc_info): New function. Outputting the extra information
10831 is conditionalized based on the associated diff contexts settings.
10832 (show_locs): define a getter/setter for
10833 diff_context::priv::show_locs_.
10834 ({distinct,pointer,reference,qualified_type,enum,class,scope,fn_parm,
10835 typedef,corpus}_diff::report): Call report_loc_info when
10837 (maybe_report_diff_for_member): Likewise.
10838 (represent): Accept a const reference to a diff_context_sptr as a first
10839 argument and call report_loc_info on its second argument.
10840 * src/abg-dwarf-reader.cc:
10841 * tests/data/Makefile.am: Add the new test reference files.
10842 * tests/data/test-abicompat/test0-fn-changed-report-2.txt: New test
10844 * tests/data/test-abicompat/test5-fn-changed-report-1.txt: Likewise.
10845 * tests/data/test-abicompat/test6-var-changed-report-1.txt: Likewise.
10846 * tests/data/test-abicompat/test7-fn-changed-report-2.txt: Likewise.
10847 * tests/data/test-diff-filter/test30-pr18904-rvalueref-report1.txt:
10849 * tests/data/test-diff-filter/test31-pr18535-libstdc++-report-1.txt:
10851 * tests/data/test-diff-pkg/dirpkg-3-report-2.txt: Likewise.
10852 * tests/data/test-diff-suppr/test6-fn-suppr-report-0-1.txt: Likewise.
10853 * tests/test-abidiff.cc: Explicitly create a diff context and turn off
10855 * tests/test-diff-dwarf.cc: Likewise.
10856 * tests/test-abicompat.cc: Add --no-show-locs to all existing test
10857 arguments. Run a few of the existing tests again, but without this
10859 * tests/test-diff-filter.cc: Likewise.
10860 * tests/test-diff-pkg.cc: Likewise.
10861 * tests/test-diff-suppr.cc: Likewise.
10862 * tools/abicompat.cc: Handle the new "--no-show-locs" option.
10863 * tools/abidiff.cc: Likewise.
10864 * tools/abidw.cc: Likewise.
10865 * tools/abipkgdiff.cc: Likewise.
10867 2015-11-16 Ondrej Oprala <ooprala@redhat.com>
10870 * src/abg-ir.cc: (location_manager::expand_location): Fix a factual
10871 error in the function documentation.
10873 2015-12-11 Dodji Seketeli <dodji@redhat.com>
10875 [PERF] Speedup comparing declaration-only class_decls
10876 * src/abg-ir.cc (equals): In the overload for class_decl, avoid
10877 calling class_decl::get_is_declaration_only() several times.
10878 Avoid copying the qualified name of the class_decl. Also, use the
10879 == operator to compare strings, rather than the != one.
10881 2015-12-11 Dodji Seketeli <dodji@redhat.com>
10883 [PERF] Access naked pointers for canonical types and function types
10884 * include/abg-ir.h (type_base::get_naked_canonical_type): Declare
10886 (function_decl::get_naked_canonical_type): Likewise.
10887 (function_decl::set_type): Pass a reference to the shared_ptr.
10888 * src/abg-ir.cc (type_base::priv::naked_canonical_type): New data
10890 (type_base::priv::priv): Initialize it.
10891 (canonicalize): Set the naked canonicalize type when we set its
10893 (type_base::get_naked_canonical_type): Define new accessor.
10894 ({pointer_type_def,reference_type_def,function_type,class_decl}::operator==):
10895 Use naked canonical pointers rather than the slower shared_ptr to
10896 canonical pointers.
10897 (function_decl::priv::naked_type_): New data member.
10898 (function_decl::priv::priv): Initialize it.
10899 (function_decl::get_naked_type): Define new accessor.
10900 (function_decl::set_type): Pass a reference to the shared_ptr .
10901 (equals): In the overload for function_decl, use the faster naked
10902 pointers to the type of the function.
10904 2015-12-11 Dodji Seketeli <dodji@redhat.com>
10906 [PERF] Turn some pimpl pointers into naked pointers
10907 * include/abg-ir.h ({decl_base, type_base, function_decl}::priv_)
10908 Make this a naked pointer to priv, rather than a shared_ptr<priv>.
10909 * src/abg-ir.cc (decl_base::~decl_base): Destroy the private data
10910 pointer, aka pimpl pointer.
10911 (type_base::~type_base): Likewise.
10912 (function_decl::~function_decl): Likewise.
10913 (class_decl::~class_decl): Likewise.
10915 2015-12-11 Dodji Seketeli <dodji@redhat.com>
10917 [PERF] Pass a bunch of perf-sensitive smart pointers by reference
10918 * include/abg-fwd.h (lookup_type_in_corpus, lookup_type_in_scope)
10919 (lookup_var_decl_in_scope): Pass the decls smart pointers by
10921 * src/abg-ir.cc (lookup_type_in_corpus, lookup_type_in_scope)
10922 (lookup_var_decl_in_scope): Pass the decls smart pointers by
10923 reference, for performance reasons.
10925 2015-12-10 Dodji Seketeli <dodji@redhat.com>
10927 Bug 19126 - abidw segv on a dwz compressed version of r300_dri.so
10928 * include/abg-ir.h (class location_manager): Forward declare it
10929 before class location.
10930 (location::loc_manager_): New data member.
10931 (location::location): Take the location manager in one overload
10932 and initialize the new loc_managers_ in all the overloads.
10933 (location::get_location_manager): New getter.
10934 (location::expand): New member function.
10935 (location::*): Add API doc to all entry points.
10936 (location_manager::expand_location): Take a const location.
10937 (type_or_decl_base::set_corpus): Remove.
10938 (type_or_decl_base::{get,set}_translation): New accessors.
10939 (decl_base::{decl_base,get_location}): Take or return a reference
10941 (scope_decl::scope_decl): Likewise.
10942 (type_decl::type_decl): Likewise.
10943 (namespace_decl::namespace_decl): Likewise.
10944 (qualified_type_def::qualified_type_def): Likewise.
10945 (pointer_type_def::pointer_type_def): Likewise.
10946 (reference_type_def::reference_type_def): Likewise.
10947 (array_type_def::subrange_type::{subrange_type,
10948 get_location}): Likewise.
10949 (enum_type_decl::enum_type_decl): Likewise.
10950 (typedef_decl::typedef_decl): Likewise.
10951 (var_decl::var_decl): Likewise.
10952 (function_decl::function_decl): Likewise.
10953 (function_decl::parameter::parameter): Likewise.
10954 (template_decl::template_decl): Likewise.
10955 (type_tparameter::type_tparameter): Likewise.
10956 (non_type_tparameter::non_type_tparameter): Likewise.
10957 (function_tdecl::function_tdecl): Likewise.
10958 (class_tdecl::class_tdecl): Likewise.
10959 (class_decl::class_decl): Likewise.
10960 (class_decl::method_decl::method_decl): Likewise.
10961 * src/abg-ir.cc (location::expand_location): Define new member
10963 (type_or_decl_base::priv::corpus_): Remove.
10964 (type_or_decl_base::priv::translation_unit_): New data member.
10965 (type_or_decl_base::priv::priv): Adjust.
10966 (type_or_decl_base::set_corpus): Remove.
10967 (type_or_decl_base::get_corpus): Adjust.
10968 (type_or_decl_base::{get,set}_translation_unit): New member
10970 (decl_base::priv::priv): Take a reference to location.
10971 (decl_base::decl_base): Likewise.
10972 (decl_base::get_location): Return a reference to location.
10973 (location_manager::create_new_location): Adjust.
10974 (location_manager::expand_location): Take a reference to location.
10975 (translation_unit::get_global_scope()): Adjust.
10976 (translation_unit::bind_function_type_life_time): Likewise.
10977 (scope_decl::{add,insert}_member_decl): Adjust.
10978 (get_translation_unit): Likewise.
10979 (type_decl::type_decl): Take a reference to location.
10980 (namespace_decl::namespace_decl): Likewise.
10981 (qualified_type_def::qualified_type_def): Likewise.
10982 (pointer_type_def::pointer_type_def): Likewise.
10983 (reference_type_def::reference_type_def): Likewise.
10984 (array_type_def::subrange_type::priv::priv): Likewise.
10985 (array_type_def::subrange_type::{subrange_type,
10986 get_location}): Likewise.
10987 (enum_type_decl::enum_type_decl): Likewise.
10988 (typedef_decl::typedef_decl): Likewise.
10989 (var_decl::var_decl): Likewise.
10990 (function_decl::function_decl): Likewise.
10991 (function_decl::parameter::parameter): Likewise.
10992 (template_decl::template_decl): Likewise.
10993 (type_tparameter::type_tparameter): Likewise.
10994 (non_type_tparameter::non_type_tparameter): Likewise.
10995 (function_tdecl::function_tdecl): Likewise.
10996 (class_tdecl::class_tdecl): Likewise.
10997 (class_decl::class_decl): Likewise.
10998 (class_decl::method_decl::method_decl): Likewise.
10999 * src/abg-writer.cc (write_location): Take a reference to
11000 location and adjust.
11001 (write_array_type_def, write_function_decl, dump_decl_location):
11004 2015-12-08 Dodji Seketeli <dodji@redhat.com>
11006 Fix some white space nits
11007 * src/abg-comparison.cc (class_diff::report): Remove a useless
11008 horizontal white space.
11009 * src/abg-ir.cc (operator==): Add a vertical space.
11011 2015-12-08 Dodji Seketeli <dodji@redhat.com>
11013 Filter out harmless diagnostics glitches due to some ODR violation
11014 * src/abg-comp-filter.cc
11015 (class_diff_has_harmless_odr_violation_change): New static
11017 (harmless_filter::visit): Call it.
11019 2015-12-08 Dodji Seketeli <dodji@redhat.com>
11021 Fix internal name for pointers, typedefs and arrays
11022 * include/abg-ir.h (pointer_type_def::priv_): New data structure.
11023 The type is now pimpled.
11024 (typedef_decl::priv_): Likewise.
11025 * src/abg-ir.cc (struct pointer_type_def::priv): New struct.
11026 (pointer_type_def::pointer_type_def): Adjust.
11027 (pointer_type_def::get_pointed_to_type): Likewise.
11028 (pointer_type_def::get_qualified_name): Store temporary/internal
11029 names into different caches.
11030 (array_type_def::priv::{temp_internal_qualified_name_,
11031 internal_qualified_name_}): New data members.
11032 (get_type_representation): In the overload for array_type_def,
11033 take requests for internal names into account.
11034 (array_type_def::get_qualified_name): Take requests for internal
11035 names into account. Store temporary/internal names into different
11037 (typedef_decl::priv): New struct.
11038 (typedef_decl::typedef_decl): Adjust.
11039 (typedef_decl::get_underlying_type): Likewise.
11041 2015-12-08 Dodji Seketeli <dodji@redhat.com>
11043 Avoid try/catch code paths when that is possible
11044 * src/abg-ir.cc (is_type, equals): Do not use try/catch based
11047 2015-12-08 Dodji Seketeli <dodji@redhat.com>
11049 Fix comparison in qualified_type_diff::has_changes
11050 * src/abg-comparison.cc (qualified_type_diff::has_changes): Make
11051 this stupid and simple, now that we have (fast) canonical type
11053 * include/abg-ir.h (qualified_type_diff::operator==): Add an
11054 overload for qualified_type_diff here.
11055 (operator==): Likewise.
11056 * src/abg-ir.cc (qualified_type_diff::operator==): Define it.
11057 (operator==): Likewise.
11059 2015-12-06 Dodji Seketeli <dodji@redhat.com>
11061 Bug 19336 - Better handle redundantly qualified reference types
11062 * src/abg-dwarf-reader.cc (maybe_strip_qualification): Do not nuke
11063 the qualified type. Rather, just turn the redundant const
11064 qualifier into a no-op one.
11065 * src/abg-comparison.cc (compute_diff_for_types): Look through
11066 no-op qualified types.
11068 (decl_base::{peek,set}_temporary_qualified_name): Declare new
11070 * src/abg-ir.cc (decl_base::priv::temporary_qualified_name_): New
11072 (decl_base::{peek,set}_temporary_qualified_name): Define new
11074 (qualified_type_def::priv::{temporary_internal_name_,
11075 internal_name}): New data members.
11076 (qualified_type_def::build_name): For a no-op qualified type, the
11077 internal name (which contains the 'none' qualifier) is different
11078 from the non-internal name.
11079 (qualified_type_def::get_qualified_name): Handle temporary names
11080 and non-temporary names in two different caches. Also handle
11081 internal and non-internal names in two different caches. This
11082 makes four different caches.
11083 (qualified_name_setter::do_update): Do not touch the non-internal,
11084 non-temporary qualified name cache if the qualified parent name is
11086 * tools/abidw.cc (main): change --check-alternate-debug-info to
11087 make it *not* display the name/path to the alternate debug info,
11088 when it's found. Rather, only
11089 --check-alternate-debug-info-base-name keeps displaying the base
11090 name of the alternate debug info.
11091 * tests/data/test-alt-dwarf-file/test1-libgromacs-debug-dir/*: New
11093 * tests/data/Makefile.am: Add the new test material to the build
11095 * tests/test-alt-dwarf-file.cc (in_out_specs): Take the new test
11096 input into account.
11097 * tests/data/test-read-dwarf/test1.abi: Adjust.
11098 * tests/data/test-read-dwarf/test7.so.abi: Likewise.
11099 * tests/data/test-read-dwarf/test10-pr18818-gcc.so.abi: Likewise.
11100 * tests/data/test-read-dwarf/test11-pr18828.so.abi: Likewise.
11101 * tests/data/test-read-dwarf/test14-pr18893.so.abi: Likewise.
11102 * tests/data/test-read-dwarf/test15-pr18892.so.abi: Likewise.
11103 * tests/data/test-read-dwarf/test16-pr18904.so.abi: Likewise.
11104 * tests/data/test-read-dwarf/test17-pr19027.so.abi: Likewise.
11105 * tests/data/test-read-dwarf/test18-pr19037-libvtkRenderingLIC-6.1.so.abi:
11107 * tests/data/test-read-dwarf/test19-pr19023-libtcmalloc_and_profiler.so.abi:
11109 * tests/data/test-read-dwarf/test20-pr19025-libvtkParallelCore-6.1.so.abi:
11111 * tests/data/test-read-dwarf/test22-pr19097-libstdc++.so.6.0.17.so.abi:
11114 2015-12-06 Dodji Seketeli <dodji@redhat.com>
11116 Do not forget to peel qualified type off when peeling types
11117 * include/abg-fwd.h (peel_qualified_type): Declare new function
11119 * src/abg-ir.cc (peel_qualified_type): ... and define it.
11120 (peel_typedef_pointer_or_reference_type): Peel qualified types
11123 2015-12-06 Dodji Seketeli <dodji@redhat.com>
11125 Find more spots where to discriminate internal and non-internal names
11126 * src/abg-ir.cc (get_type_name, get_method_type_name)
11127 ({typedef_decl,var_decl,function_decl,class_decl}::get_pretty_representation):
11128 Propagate the internal-ness to the call to get_qualified_name().
11130 2015-12-06 Dodji Seketeli <dodji@redhat.com>
11132 Constify is_qualified_type()
11133 * include/abg-fwd.h (is_qualified_type): Make this take a const
11135 * src/abg-ir.cc (is_qualified_type): Likewise.
11137 2015-11-28 Dodji Seketeli <dodji@redhat.com>
11139 Add missing new line to abidiff help message
11140 * tools/abidiff.cc (display_usage): Add missing new line.
11142 2015-11-26 Dodji Seketeli <dodji@seketeli.org>
11144 Do not abort when there is no binary to compare in a package
11145 * tests/data/test-diff-pkg/empty-pkg-libvirt-0.9.11.3-1.el7.ppc64.rpm:
11146 New input test package.
11147 * tests/data/test-diff-pkg/empty-pkg-libvirt-1.2.17-13.el7_2.2.ppc64.rpm:
11149 * tests/data/test-diff-pkg/empty-pkg-report-0.txt: New test
11151 * data/Makefile.am: Add the new test material above to the build system.
11152 * tests/test-diff-pkg.cc (int_out_specs): Add the new test inputs
11153 to the set of tests.
11154 * tools/abipkgdiff.cc (compare): Do not abort if there is no
11157 2015-11-14 Ondrej Oprala <ooprala@redhat.com>
11159 Abidiff: Remove doubled line in help.
11160 * tools/abidiff.cc (display_usage): Remove a doubled help message.
11162 2015-11-14 Ondrej Oprala <ooprala@redhat.com>
11164 Add bash-completion scripts for the libabigail tools
11165 * Makefile.am: include bash-completion/Makefile.am
11166 * bash-completion/Makefile.am: New makefile for the bash-completion
11168 * bash-completion/abicompat: New completion script.
11169 * bash-completion/abidiff: Likewise.
11170 * bash-completion/abidw: Likewise.
11171 * bash-completion/abilint: Likewise.
11172 * bash-completion/abinilint: Likewise.
11173 * bash-completion/abipkgdiff: Likewise.
11174 * bash-completion/abisym: Likewise.
11175 * configure.ac: Check for the bash-completion package. Handle
11176 the new --enable-bash-completion[=WHEN] configure option.
11177 * manuals/libabigail-tools.rst: Mention the scripts.
11179 2015-11-17 Dodji Seketeli <dodji@redhat.com>
11181 Read enum values in the size_t and write them in ssize_t
11182 * include/abg-ir.h (enum_type_def::enumerator::get_value): Return
11184 * src/abg-ir.cc (enum_type_decl::enumerator::get_value): Likewise.
11185 * src/abg-dwarf-reader.cc (die_signed_constant_attribute): #if-out
11186 this static function that is not used anymore.
11187 (build_enum_type): Read the value of the enumerator using a size_t
11189 * src/abg-reader.cc (build_enum_type_decl): Read the enum value
11190 using a long long int.
11191 * src/abg-writer.cc (write_enum_type_decl): Write using a ssize_t.
11193 2015-11-17 Dodji Seketeli <dodji@redhat.com>
11195 Bump version to release candidate 1.0.rc1
11196 * configure.ac: Bump version to release candidate 1.0.rc1
11198 2015-11-17 Dodji Seketeli <dodji@redhat.com>
11200 Do not use designated initializers in abipkgdiff.cc
11201 * tools/abipkgdiff.cc (prepare_packages): Do not use designated
11202 initializers syntax.
11204 2015-11-16 Dodji Seketeli <dodji@redhat.com>
11206 Update ChangeLog for 1.0.rc0
11207 * ChangeLog: Udpate using make update-changelog
11209 2015-11-16 Dodji Seketeli <dodji@redhat.com>
11211 Fix doxygen configuration file paths in doc/Makefile.am
11212 * doc/Makefile.am: There was an extra "/doc" in the path.
11214 2015-11-16 Dodji Seketeli <dodji@redhat.com>
11216 Update ChangeLog file in preparation of 1.0.rc0 release
11217 * ChangeLog: Update using make update-changelog.
11219 2015-11-16 Dodji Seketeli <dodji@redhat.com>
11221 Add --version option to several libabigail tools
11222 * configure.ac: Set the version revision to "rc0".
11223 * doc/manuals/abicompat.rst: Adjust manual for new --version
11225 * doc/manuals/abidiff.rst: Likewise.
11226 * doc/manuals/abidw.rst: Likewise.
11227 * doc/manuals/abilint.rst: Likewise.
11228 * doc/manuals/abipkgdiff.rst: Likewise.
11229 * include/abg-config.h (config::{m_format_minor, m_format_major}):
11230 Make these be strings.
11231 (config::{get,set}_format_minor_version_number): Make these return
11233 (config::{get,set}_format_major_version_number): Make these return
11235 (abigail_get_library_version): Make this take strings.
11236 * src/abg-config.cc (config::config): Adjust.
11237 (config::{get,set}_format_major_version_number): Make these return
11239 (config::{get,set}_format_minor_version_number): Make these return
11241 (abigail_get_library_version): Make this take strings.
11242 * include/abg-version.h.in: Make the version variables be strings.
11243 * src/abg-writer.cc (write_translation_unit): The version numbers
11244 are now strings so adjust.
11245 * tools/{abicompat,abidiff,abidw,abilint,abipkgdiff,abisym}.cc
11246 (options::display_version): New data member.
11247 (options::options): Initialize it.
11248 (display_usage): Add documentation for new --version option.
11249 (parse_command_line): Parse new --version option.
11250 (main): Support --version.
11252 2015-11-12 Dodji Seketeli <dodji@redhat.com>
11254 Correctly handle fn DIE with abstract_origin in alt debug info
11255 * src/abg-dwarf-reader.cc (build_ir_node_from_die): Consider that
11256 the function decl is for a DIE in the alternate debug info file only if
11257 the DIE itself comes from the alternate debug info file, not if
11258 the specification or the origin of the function comes from the
11259 alternate debug info file.
11260 * tests/data/test-diff-pkg/qemu-img-rhev-2.3.0-20.el7.ppc64.rpm:
11261 New test input rpm.
11262 * tests/data/test-diff-pkg/qemu-img-rhev-2.3.0-7.el7.ppc64.rpm: Likewise.
11263 * tests/data/test-diff-pkg/qemu-kvm-rhev-debuginfo-2.3.0-20.el7.ppc64.rpm: Likewise.
11264 * tests/data/test-diff-pkg/qemu-kvm-rhev-debuginfo-2.3.0-7.el7.ppc64.rpm: Likewise.
11265 * tests/data/test-diff-pkg/qemu-img-rhev-2.3.0-7.el7.ppc64--qemu-img-rhev-2.3.0-20.el7.ppc64-report-0.txt:
11266 New test reference output.
11267 * tests/data/Makefile.am: Add the new test material to the source
11269 * tests/test-diff-pkg.cc (in_out_specs): Use the new test rpm
11272 2015-11-09 Ondrej Oprala <ooprala@redhat.com>
11274 Bug 19081 - abipkgdiff parallelization
11275 * doc/manuals/abipkgdiff.rst: Mention the new --no-parallel option.
11276 * tools/Makefile.am: Add -pthread to abipkgdiffs link options.
11277 * tools/abipkgdiff.cc (elf_file_paths_tls_key): New key for the
11278 thread-local vector of ELF filepaths.
11279 (reports_map): A map of the path of the first ELF of a compared pair
11280 and a corpus representing the difference.
11281 (env_map): A map of the corpus difference and a corresponding
11282 environment needed to be kept alive until the diff is reported.
11283 ({arg,map}_lock): mutexes to control access to the comparison argument
11284 list and the {reports,env}_map respectively.
11285 (options): Add a new member "parallel" and set it to true in the ctor.
11286 (elf_file): Add a new "size" member and set it in the ctor.
11287 (package descriptor): Arguments passed to extract_package_set.
11288 (compare_args): Arguments passed to the ELF comparison function.
11289 (display_usage): Mention the new "--no-parallel" option.
11290 (pthread_routine_extract_package): A wrapper function around
11291 extract_package to be used in a multi-threaded environment.
11292 ({first_second}_package_tree_walker_callback_fn): Add the new ELF file
11293 paths to a thread-specific vector.
11294 (compare): In an overload of compare, verbose output is updated to
11295 always mention the ELF files being compared for each reported stage.
11296 Reporting is no longer done in this function, the resulting difference
11297 is instead passed back to the calling function for reporting in the
11298 main thread, along with a corresponding environment.
11299 (pthread_routine_compare): Accept a pointer to a vector of comparison
11300 arguments. This function is to be called NTHREAD times and share the
11301 vector passed to it with its other invocations. Create the environment
11302 for compare() and store its output in a map if there is a difference.
11303 (create_maps_of_package_content): Allocate memory for a thread local
11304 vector of ELF paths and dispose of it before returning.
11305 (pthread_routine_extract_pkg_and_map_its_content): Renamed from
11306 extract_package_and_map_its_content. Extract the debuginfo as well as
11307 the regular package in this function. Spawn a separate thread for the
11308 extraction of the debug package.
11309 (pthread_join): A function handling thread joining throughout package
11311 (prepare_packages): Spawn a thread to extract each set of packages.
11312 (elf_size_is_greater): New comparison function used to order ELF pairs
11314 (compare): In the overload of compare, pass through the ELF path
11315 vectors and identify pairs to be diffed. Put them in a vector and sort
11316 it by the summed ELF pair size. Spawn comparison threads and safely
11317 check for results in the proper order of the ELF pairs. Report any
11318 differences ASAP and collect the threads after all the reporting is
11319 done, checking their return status.
11320 (parse_command_line): Check for the "--no-parallel" option.
11322 2015-11-10 Dodji Seketeli <dodji@redhat.com>
11324 Fix typo in test-diff-dwarf-abixml.cc
11325 * tests/test-diff-dwarf-abixml.cc (main): Fix typo.
11327 2015-10-14 Ondrej Oprala <ooprala@redhat.com>
11329 Document abipkgdiff's option --no-abignore
11330 * doc/manuals/abipkgdiff.rst: Mention the new option.
11331 * tools/abipkgdiff.cc: Likewise.
11333 2015-11-09 Dodji Seketeli <dodji@redhat.com>
11335 Avoid canonicalizing function types too early
11336 * src/abg-dwarf-reader.cc (die_function_type_map_type): New
11339 (read_context::die_wip_function_types_map_): New data member.
11340 (read_context::{die_wip_function_types_map,
11341 is_wip_function_type_die_offset}): New methods.
11342 (build_function_type): Mark the function being built as "work in
11344 (maybe_canonicalize_type): Do not early-canonicalize WIP function
11346 * src/abg-reader.cc (build_function_type): Mark the function being
11347 built as "work in progress".
11348 * tests/test-diff-dwarf-abixml.cc: New test harness.
11349 * tests/Makefile.am: Add new test harness runtestdiffdwarfabixml
11350 to the build system.
11351 * tests/data/test-diff-dwarf-abixml/test0-pr19026-libvtkIOSQL-6.1.so.1:
11352 New test binary input.
11353 * tests/data/test-diff-dwarf-abixml/test0-pr19026-libvtkIOSQL-6.1.so.1.abi:
11355 * tests/data/Makefile.am: Add new test inputs to source
11357 * tests/data/test-read-dwarf/test17-pr19027.so.abi: Adjust.
11359 2015-11-09 Dodji Seketeli <dodji@redhat.com>
11361 Propagate environment property to base specifiers
11362 * src/abg-comparison.cc (compute_diff): In the overload for
11363 class_decl::base_spec_sptr, assert that the environment of the
11364 base classes are equal and that the environment the base class is
11365 the same as the environment of the base specifier.
11366 * src/abg-ir.cc (add_base_specifier): Propagate the environment of
11367 the class to its base specifiers.
11368 * tests/data/test-types-stability/pr19026-libvtkIOSQL-6.1.so.1:
11369 New test binary input.
11370 * tests/data/Makefile.am: Add the new test input to the build
11372 * tests/test-types-stability.cc (elf_paths): Add new binary to the
11375 2015-11-09 Dodji Seketeli <dodji@redhat.com>
11378 * src/abg-comparison.cc (diff_context::mark_diff_as_visited): Add
11380 (corpus_diff::priv::ensure_lookup_tables_populated): Likewise.
11381 * src/abg-dwarf-reader.cc (lookup_symbol_from_elf): Likewise.
11382 (get_soname_of_elf_file, get_type_of_elf_file): Likewise.
11383 * src/abg-ir.cc (var_decl::get_pretty_representation): Likewise.
11385 2015-11-07 Dodji Seketeli <dodji@redhat.com>
11387 Support DW_AT_count DWARF attribute
11388 * src/abg-dwarf-reader.cc (get_default_array_lower_bound): Define
11389 new static function.
11390 (build_array_type): Support the DW_AT_count attribute.
11391 * tests/data/test-diff-dwarf/test35-pr19173-libfoo-long-clang.so:
11392 New test binary input.
11393 * tests/data/test-diff-dwarf/test35-pr19173-libfoo-long-clang2.so: Likewise.
11394 * tests/data/test-diff-dwarf/test35-pr19173-libfoo-long-clang-report-0.txt:
11395 New test reference output.
11396 * tests/data/test-diff-dwarf/test35-pr19173-libfoo-long-gcc.so:
11397 New test binary input.
11398 * tests/data/test-diff-dwarf/test35-pr19173-libfoo-long-gcc2.so:
11399 New test binary input.
11400 * tests/data/test-diff-dwarf/test35-pr19173-libfoo-long-gcc-report-0.txt:
11401 New test reference output.
11402 * tests/data/test-diff-dwarf/test35-pr19173-libfoo-long.c: Source
11403 code for the binaries above.
11404 * tests/data/Makefile.am: Add the new test material to the build
11406 * tests/test-diff-dwarf.cc (in_out_specs): Add the new test inputs
11409 2015-11-07 Dodji Seketeli <dodji@redhat.com>
11411 Bug 19173 - Abidiff doesn't detect symbol size change in library
11412 * include/abg-ir.h (elf_symbol::{elf_symbol, create}): Take a size
11414 (elf_symbol::{get,set}_size): New accessors.
11415 * src/abg-ir.cc (elf_symbol::priv::size_): New data member.
11416 (elf_symbol::priv::priv): Initialize it.
11417 (elf_symbol::{elf_symbol, create}) Take a size parameter.
11418 (textually_equals): Compare the size of variable symbols.
11419 (elf_symbol::{get, set}_size): New accessors.
11420 * src/abg-comparison.cc (maybe_report_diff_for_symbol): New static
11422 ({function_decl_diff,var_diff}::report): Use it.
11423 * src/abg-dwarf-reader.cc (lookup_symbol_from_sysv_hash_tab)
11424 (lookup_symbol_from_gnu_hash_tab, lookup_symbol_from_symtab)
11425 (read_context::lookup_elf_symbol_from_index): Set the size of the
11426 elf symbols' internal representation.
11427 * src/abg-reader.cc (build_elf_symbol): Read the size attribute if
11429 * src/abg-writer.cc (write_elf_symbol): Write the size attribute
11430 for variable symbols, if it's not zero.
11431 * tests/data/test-diff-dwarf/test34-pr19173-libfoo.so: New test
11433 * tests/data/test-diff-dwarf/test34-pr19173-libfoo2.so: Likewise.
11434 * tests/data/test-diff-dwarf/test34-pr19173-libfoo-report-0.txt:
11435 New reference test output.
11436 * tests/data/Makefile.am: Add the new test input binaries to the
11438 * tests/test-diff-dwarf.cc (in_out_specs): Add the new test input
11439 above to the test harness.
11440 * tests/data/test-diff-dwarf/test9-report.txt: Adjust.
11441 * tests/data/test-diff-filter/test30-pr18904-rvalueref-report0.txt: Likewise.
11442 * tests/data/test-read-dwarf/test0.abi: Likewise.
11443 * tests/data/test-read-dwarf/test1.abi: Likewise.
11444 * tests/data/test-read-dwarf/test10-pr18818-gcc.so.abi: Likewise.
11445 * tests/data/test-read-dwarf/test11-pr18828.so.abi: Likewise.
11446 * tests/data/test-read-dwarf/test12-pr18844.so.abi: Likewise.
11447 * tests/data/test-read-dwarf/test15-pr18892.so.abi: Likewise.
11448 * tests/data/test-read-dwarf/test16-pr18904.so.abi: Likewise.
11449 * tests/data/test-read-dwarf/test18-pr19037-libvtkRenderingLIC-6.1.so.abi: Likewise.
11450 * tests/data/test-read-dwarf/test19-pr19023-libtcmalloc_and_profiler.so.abi:
11452 * tests/data/test-read-dwarf/test20-pr19025-libvtkParallelCore-6.1.so.abi:
11454 * tests/data/test-read-dwarf/test21-pr19092.so.abi: Likewise.
11455 * tests/data/test-read-dwarf/test22-pr19097-libstdc++.so.6.0.17.so.abi:
11457 * tests/data/test-read-dwarf/test6.so.abi: Likewise.
11458 * tests/data/test-read-dwarf/test9-pr18818-clang.so.abi: Likewise.
11460 2015-11-07 Dodji Seketeli <dodji@redhat.com>
11462 Add some needed vertical space
11463 * src/abg-dwarf-reader.cc (build_array_type): Add a new line after
11466 2015-11-07 Dodji Seketeli <dodji@redhat.com>
11468 Pass a bunch of parameters by reference as they ought to be
11469 * include/abg-ir.h (operator==): In the overload for
11470 elf_symbol_sptr, pass the parameters by reference.
11471 * src/abg-ir.cc (operator==): Do the same at definition site.
11472 * src/abg-comparison.cc (maybe_report_diff_for_member): Pass
11473 parameters by reference.
11475 2015-11-05 Dodji Seketeli <dodji@redhat.com>
11477 Bug 19139 - DWARF reader doesn't handle garbage in function names
11478 * include/abg-tools-utils.h (string_is_ascii): Declare new
11480 * src/abg-tools-utils.cc (string_is_ascii): ... and define it.
11481 * src/abg-writer.cc (write_function_type): Escape forbidden XML
11482 characters in function type names.
11483 * src/abg-dwarf-reader.cc (build_function_type): If a parameter
11484 name is not ascii, drop it on the floor.
11485 * tests/data/test-types-stability/pr19139-DomainNeighborMapInst.o:
11486 New test input binary.
11487 * tests/data/test-types-stability/pr19202-libmpi_gpfs.so.5.0:
11489 * tests/data/Makefile.am: Add the new binaries above to the build
11491 * tests/test-types-stability.cc: New test harness.
11492 * tests/Makefile.am: Add the new test harness to the build system.
11494 2015-11-05 Dodji Seketeli <dodji@redhat.com>
11496 Introduce the name abixml in some comments
11497 * src/abg-reader.cc: Mention abixml in the comment at the top of
11499 * src/abg-writer.cc: Likewise.
11501 2015-10-17 Dodji Seketeli <dodji@redhat.com>
11503 Bug 19026 - Types with same name and different size considered equivalent
11504 * src/abg-ir.cc (type_base::get_canonical_type_for): Really
11505 compare the size of the type to be canonicalized against the size
11506 of the *current* potential canonical type of the same name.
11508 2015-10-17 Dodji Seketeli <dodji@redhat.com>
11510 Add a script to update the reference output of runtestreaddwarf
11511 * tests/update-test-read-dwarf-output.py: New helper python program.
11513 2015-10-17 Dodji Seketeli <dodji@redhat.com>
11515 Style fixes in the abixml writer.
11516 * src/abg-writer.cc (write_var_decl): Use the var_decl_sptr
11518 (write_class_decl): Indent.
11520 2015-10-17 Dodji Seketeli <dodji@redhat.com>
11522 Fix typo in test-read-dwarf.cc
11523 * tests/test-read-dwarf.cc (for test test21-pr19092.so.abi): Fix
11524 typo in the output path of that test.
11526 2015-10-17 Dodji Seketeli <dodji@redhat.com>
11528 Adjust regression tests reference output for the current patch set
11529 * tests/data/test-read-dwarf/test22-pr19097-libstdc++.so.6.0.17.so:
11530 New test input binary.
11531 * tests/data/test-read-dwarf/test22-pr19097-libstdc++.so.6.0.17.so.abi:
11532 New test reference output.
11533 * tests/data/Makefile.am: Add the new test files above to the
11534 source distribution.
11535 * tests/test-read-dwarf.cc (in_out_specs): Add the two new test
11536 files above to the set of test input files.
11537 * tests/data/test-read-dwarf/test10-pr18818-gcc.so.abi: Adjust.
11538 * tests/data/test-read-dwarf/test12-pr18844.so.abi: Adjust.
11539 * tests/data/test-read-dwarf/test13-pr18894.so.abi: Adjust.
11540 * tests/data/test-read-dwarf/test14-pr18893.so.abi: Adjust.
11541 * tests/data/test-read-dwarf/test15-pr18892.so.abi: Adjust.
11542 * tests/data/test-read-dwarf/test16-pr18904.so.abi: Adjust.
11543 * tests/data/test-read-dwarf/test17-pr19027.so.abi: Adjust.
11544 * tests/data/test-read-dwarf/test18-pr19037-libvtkRenderingLIC-6.1.so.abi: Adjust.
11545 * tests/data/test-read-dwarf/test19-pr19023-libtcmalloc_and_profiler.so.abi: Adjust.
11546 * tests/data/test-read-dwarf/test20-pr19025-libvtkParallelCore-6.1.so.abi: Adjust.
11547 * tests/data/test-read-dwarf/test21-pr19092.so.abi: Adjust.
11548 * tests/data/test-read-dwarf/test9-pr18818-clang.so.abi: Adjust.
11550 2015-10-17 Dodji Seketeli <dodji@redhat.com>
11552 Use abidw --abidiff in test-read-dwarf.cc
11553 * tests/test-read-dwarf.cc (handle_in_out_spec): Rather than
11554 calling abilint on the abixml and abidiff-ing the .so file against
11555 its .so.abi, call abidw --abidiff on the .so file and voila. Ok,
11556 it does one extra save of abixml, but then that won't hurt. And
11557 things are faster now than what they were anyway :-)
11559 2015-10-17 Dodji Seketeli <dodji@redhat.com>
11561 Fix emitting of referenced type in abixml writer
11562 * Use of canonical pointers in the hash map of referenced types
11563 The abixml writer was using canonical types pointer values to hash
11564 referenced types in a map. It was doing so "by hand"; and it was thus
11565 messing things up for types without canonical types (like some class
11567 This patch changes that by using the generic solution of
11568 abigail::ir::hash_type_or_decl(), which also uses the same canonical
11569 pointer type values. For types with no canonical types, that
11570 functions knows has to gracefully fallback. At worst, it will just
11571 make things slower, not wrong.
11572 * Sorting of referenced types
11573 The patch also changes the sorting function used for the hash map of
11574 referenced types. The previous solution was sorting the pretty
11575 representation of types; but then when two types have the same pretty
11576 representation (think, typedefs, for instance) then their relative
11577 position in the sorted result was random. This causes some stability
11578 issues, in that emitting the abixml for the same binary several times
11579 can lead to the some types being sorted differently -- they have the
11580 same name, but not necessarily the same type *IDs*, as they are
11582 The new sorting code handles this better; it also uses the pretty
11583 representations of types, when they are equal, it uses the type IDs to
11584 tell the types apart. At least this brings stability in the abixml
11585 output, for a given binary.
11586 * Avoiding duplicating declaration-only types when emitting the
11587 context of referenced member types.
11588 We don't keep track of declaration-only classes that are emitted.
11589 This is because we allow a given class declaration (that carries no
11590 definition) to appear several times in a given ABI corpus. So when a
11591 referenced type is a class declaration, it always appears as if that
11592 referenced type has not been emitted. So when we specifically emit
11593 the not-emitted referenced types, it can happen that declaration-only
11594 classes can appear a lot of times. This is unnecessary duplication,
11596 This patch thus introduces a new hash map that tracks emitted
11597 declaration-only classes, so that we can allow duplication of class
11598 declarations when they follow what's done in the IR read from DWARF,
11599 and disallow that duplication when it's totally artificial and
11601 * Better tracking of referenced types
11602 We were blatantly forgetting to mark some referenced types as such.
11603 So those were missing in some abixml output.
11604 This patch fixes the spots where we were forgetting that important
11606 * Better representation of the scopes of the referenced types that
11607 were specifically emitted.
11608 The previous code was failing at properly representing the class scope
11609 of some referenced types that were specifically emitted, or sometimes,
11610 for member types, representing the scope would be so screwed that the
11611 (referenced) member type itself wouldn't be emitted at all.
11612 This is because I thought that to emit a given member type, just
11613 emitting its parent scope would be enough. I thought that would
11614 automatically trigger emitting the member type itself. First, that
11615 would emit too much information at times; the other members of the
11616 scope are not necessarily needed. And second the "duplication
11617 detection code" would sometime refuse to emit the scope class, because
11618 it has already been emitted earlier! But the incarnation that got
11619 emitted didn't have this member type as member, then. Yes, in DWARF,
11620 the same class A can be declared several times with different member
11621 types in it. The complete representation of A would be a union of all
11622 those declarations of A that are seen.
11623 This patch addresses this issue by carefully emitting just the
11624 information that is needed from the scope of the referenced type.
11625 Basically the scope is declared just to declare/define the type we are
11626 interested in; period. The abixml reader is now properly geared to
11627 re-construct the scope by merging its different parts that are now
11628 scattered around, in the ABI corpus. That support is part of this
11630 instance, a member typedef would be emitted with the information of
11631 its parent class badly formatted.
11632 * src/abg-writer.cc (struct type_ptr_comp_functor): Remove this.
11633 (sort_type_ptr_map): Likewise.
11634 (write_context::record_type_as_referenced): Do not add the
11635 canonical type of the type to record as referenced directly.
11636 (write_context::type_is_referenced): Adjust accordingly.
11637 (struct write_context::type_ptr_cmp): New comparison functor.
11638 (write_context::sort_types): New sorting function.
11639 (write_context::{record_decl_only_type_as_emitted,
11640 decl_only_type_is_emitted}): New member functions.
11641 (write_member_type_opening_tag): Factorize out of ...
11642 (write_member_type): ... here.
11643 (write_class_decl_opening_tag): Factorize out of ...
11644 (write_class_decl): ... here. Now, keep track also of
11645 declaration-only classes that are emitted.
11646 (write_decl_in_scope): Use the new write_member_type_opening_tag
11647 and write_class_decl_opening_tag. Now write class scopes
11648 ourselves; they only contain the type declarations that we are
11650 (write_translation_unit): Use the new sorting code to sort the
11651 referenced types to emit. Do not emit referenced types that are
11652 declaration-only classes that have already been emitted. Handle
11653 the fact that emitting the referenced types might make those
11654 emitted type *reference* other types too! So handle those new
11655 referenced types as such, and emit them too.
11656 (write_qualified_type_def, write_typedef_decl, write_var_decl): Do
11657 not forget to mark referenced types as such.
11659 2015-10-17 Dodji Seketeli <dodji@redhat.com>
11661 Support updating a class in the abixml reader
11662 * include/abg-ir.h (class_decl::{find_base_class,
11663 find_member_type, find_data_member}): Declare new member functions ..
11664 * src/abg-ir.cc (class_decl::{find_base_class,
11665 find_member_type, find_data_member}): ... and define them.
11666 * src/abg-reader.cc (build_class_decl): Add the ability to update
11667 a class to add new data members, member types and base classes to
11670 2015-10-17 Dodji Seketeli <dodji@redhat.com>
11672 Don't canonicalize types not added to their context in abixml reader
11673 * src/abg-reader.cc (read_context::maybe_canonicalize_type):
11674 Assert that a class type that is scheduled for canonicalization
11675 must be in a scope. We do this only for classes, for now. The
11676 assert here helped to spot (and fix) a lot of places where we
11677 were canonicalizing types without scope.
11678 (read_context::build_or_get_type_decl): Canonicalize types here,
11679 when they are built and (hopefully) added to their scope. There
11680 might be cases here where we try to canonicalize types that are
11681 not added to their scope. That should bomb in the assert above,
11682 at least for class types, for now. We'll then fix the places where
11683 the types are created, to make them properly scoped.
11684 (build_type_decl, build_qualified_type_decl)
11685 (build_pointer_type_def, build_reference_type_def)
11686 (build_array_type_def, build_enum_type_decl, build_typedef_decl):
11687 Do not try to canonicalize the types early, right when they are
11688 created. Canonicalization should happen at the point where (or
11689 after) they are added to their scope.
11690 (build_class_decl): Likewise. Also, schedule member types for
11691 canonicalization once they've been added to their scope.
11692 (build_class_tdecl): Schedule the pattern of the class template
11693 for canonicalization once it has been added to its scope. I am
11694 not sure I should do this, as the pattern is not yet a real type,
11695 but I am taking my bet.
11696 (build_type_composition): Schedule the composed type for
11697 canonicalization once it's been added to its scope.
11698 (handle_type_decl, handle_qualified_type_decl)
11699 (handle_pointer_type_def, handle_reference_type_def)
11700 (handle_function_type, handle_array_type_def)
11701 (handle_enum_type_decl, handle_typedef_decl, handle_class_decl):
11702 At this point, we should know if the type is to be added to a
11703 scope or not. If it's in a scope, then schedule for
11706 2015-10-15 Dodji Seketeli <dodji@redhat.com>
11708 Bug 19092 - abidw aborts on types that violate the ODR
11709 * src/abg-ir.cc (type_base::get_canonical_type_for): Look at the
11710 size of types with the same name which could be considered
11711 ODR-equal, to spot possible violations that would induce a type
11712 canonicalization error.
11713 * tests/data/test-read-dwarf/test21-pr19092.so: New test input
11715 * tests/data/test-read-dwarf/test21-pr19092.so.abi: New reference
11716 abixml for the binary above.
11717 * tests/data/Makefile.am: Add the new test input above to source
11719 * tests/data/test-read-dwarf/test9-pr18818-clang.so.abi: Adjust.
11720 * tests/data/test-read-dwarf/test12-pr18844.so.abi: Likewise.
11721 * tests/data/test-read-dwarf/test20-pr19025-libvtkParallelCore-6.1.so.abi:
11723 * tests/test-read-dwarf.cc (int_out_specs): Add the two test input
11726 2015-10-15 Dodji Seketeli <dodji@redhat.com>
11728 Fix activation of Debian package support
11729 * configure.ac: If we cannot activate Debian package support, then
11732 2015-10-15 Dodji Seketeli <dodji@redhat.com>
11735 * include/abg-fwd.h: Remove unnecessary declaration of class
11737 * src/abg-ir.cc: Remove trailing space in a comment.
11738 * src/abg-reader.cc: Fix a comment.
11740 2015-10-15 Dodji Seketeli <dodji@redhat.com>
11742 Emit statistics about resolved class declarations
11743 * src/abg-dwarf-reader.cc
11744 (read_context::resolve_declaration_only_classes): Emit statistics
11745 about resolved classes and the missed ones.
11747 2015-10-15 Dodji Seketeli <dodji@redhat.com>
11749 Add a missing xml text reader call
11750 * src/abg-reader.cc (read_corpus_from_input): Add the necessary
11751 call to xmlTextReaderNext call after the xmlTextReaderExpand call.
11753 2015-10-15 Dodji Seketeli <dodji@redhat.com>
11755 Pass some more parameters in reference
11756 * include/abg-ir.h (operator==): For the type_base_sptr and
11757 decl_base_sptr overloads, pass the parameters by reference.
11758 ({var,function}_decl::{set,get}_symbol): Pass the elf_symbol_ptr
11760 * src/abg-ir.cc (operator==): For the type_base_sptr and
11761 decl_base_sptr overloads, pass the parameters by reference, now in
11763 ({var,function}_decl::{set,get}_symbol): Pass the elf_symbol_ptr
11764 by reference, now in the definition.
11766 2015-10-15 Dodji Seketeli <dodji@redhat.com>
11768 Adjust tests for the patchset
11769 * tests/data/test-read-dwarf/test10-pr18818-gcc.so.abi: Adjust.
11770 * tests/data/test-read-dwarf/test12-pr18844.so.abi: Likewise.
11771 * tests/data/test-read-dwarf/test13-pr18894.so.abi: Likewise.
11772 * tests/data/test-read-dwarf/test14-pr18893.so.abi: Likewise.
11773 * tests/data/test-read-dwarf/test15-pr18892.so.abi: Likewise.
11774 * tests/data/test-read-dwarf/test16-pr18904.so.abi: Likewise.
11775 * tests/data/test-read-dwarf/test17-pr19027.so.abi: Likewise.
11776 * tests/data/test-read-dwarf/test18-pr19037-libvtkRenderingLIC-6.1.so.abi: Likewise.
11777 * tests/data/test-read-dwarf/test19-pr19023-libtcmalloc_and_profiler.so.abi: Likewise.
11778 * tests/data/test-read-dwarf/test20-pr19025-libvtkParallelCore-6.1.so.abi: Likewise.
11779 * tests/data/test-read-dwarf/test9-pr18818-clang.so.abi: Likewise.
11781 2015-10-15 Dodji Seketeli <dodji@redhat.com>
11783 Make abidw --abidiff not show definitely harmless changes
11784 * tools/abidw.cc (set_diff_context): New function.
11785 (main): Use that new function. Do not show any output for
11786 --abidiff if only compatible changes were detected. Also, do not
11787 abort if no input binary was giving.
11789 2015-10-15 Dodji Seketeli <dodji@redhat.com>
11791 Allow only one definition of a given type per corpus in abixml
11792 * src/abg-writer.cc (write_translation_unit): Do not clear some
11793 important per-translation unit maps here. There are needed to
11794 keep track of the emitted and referenced types through the entire
11795 corpus. Avoid (wrongly) recording function types twice.
11796 (write_array_type_def, write_function_decl, write_function_type):
11797 Record referenced types.
11798 (write_class_decl): Record referenced types, and, allow only
11799 declarations to be duplicated in a corpus.
11801 2015-10-15 Dodji Seketeli <dodji@redhat.com>
11803 A series of small speed optimizations here and there
11804 * src/abg-comparison.cc (var_diff::has_changes): Just compare the
11805 two var_decl. It's (way) faster now than using recursive hashing
11807 * src/abg-ir.cc (elf_symbol::does_alias): Get out early if the two
11808 main symbols are equal.
11809 (equals): In the overload for function_decl, start by comparing
11810 types. This can be very fast for functions with different types,
11811 as it amounts to a pointer comparison. In the overload for
11812 class_decl, avoid a map lookup when it's not necessary.
11814 2015-10-15 Dodji Seketeli <dodji@redhat.com>
11816 Accelerate a slow path in hash_type_or_decl()
11817 * include/abg-ir.h (is_function_parameter, is_class_base_spec):
11818 Declare new functions.
11819 * src/abg-ir.cc (is_function_parameter, is_class_base_spec):
11821 (hash_type_or_decl): Handle hashing of function parameters are
11822 class base specifications with the fast path of type hashing.
11824 2015-10-15 Dodji Seketeli <dodji@redhat.com>
11826 Implement fast type lookup in a corpus
11827 * include/abg-fwd.h (components_to_type_name): Declare new
11829 * include/abg-ir.h (string_type_base_wptr_map_type): New typedef.
11830 (translation_unit::{get,set}_types): Declare new member functions.
11831 * src/abg-ir.cc (translation_unit::priv::types_): New data member.
11832 (translation_unit::{get,set}_types): Define these member
11834 (maybe_update_types_lookup_map): Define new static function.
11835 (components_to_type_name): Define new function.
11836 (scope_decl::{add_member_decl, insert_member_decl}): Call the new
11837 maybe_update_types_lookup_map.
11838 (scope_decl::find_iterator_for_member): Fix logic.
11839 (class_decl::set_is_declaration_only): When a class declaration
11840 becomes a definition, update the name -> type map maintained in
11841 the scope of the class.
11842 (lookup_type_in_translation_unit): Use the hash map of qualified
11843 name -> types that is now maintained in the translation unit.
11844 This is way faster than the previous walking algorithm.
11845 * src/abg-dwarf-reader.cc (build_translation_unit_and_add_to_ir):
11846 When fixing up global variable declarations that need to be
11847 re-added to the translation unit, use the new fast type lookup
11850 2015-10-15 Dodji Seketeli <dodji@redhat.com>
11852 Set the corpus of all ABI artifact reads from abixml
11853 * src/abg-reader.cc (read_translation_unit): Set the current
11854 corpus to the current translation unit being built.
11856 2015-10-14 Dodji Seketeli <dodji@redhat.com>
11858 Make canonicalization non sensitive to struct-ness of subtypes
11859 * include/abg-fwd.h (get_type_name, get_function_type_name)
11860 (get_method_type_name, get_pretty_representation): Add an
11861 "internal" flag to all overoads.
11863 ({type_or_decl_base, decl_base, type_decl, scope_type_decl,
11864 qualified_type_def, array_type_def, enum_type_decl, typedef_decl,
11865 var_decl, function_decl, function_decl::parameter, function_type,
11866 method_type, class_decl}::get_pretty_representation): Add an
11868 ({decl_base, qualified_type_def, pointer_type_def,
11869 reference_type_def, array_type_def, enum_type_decl::enumerator,
11870 function_decl::parameter}::get_qualified_name): Likewise.
11871 (qualified_type_def::build_name): Likewise.
11872 * src/abg-ir.cc ({decl_base, qualified_type_def, pointer_type_def,
11873 reference_type_def, array_type_def, enum_type_decl,
11874 enum_type_decl::enumerator,
11875 function_decl::parameter}::get_qualified_name): Take an "internal"
11877 (qualified_type_def::build_name): Likewise.
11878 ({decl_base, type_decl, namespace_decl, array_type_def,
11879 enum_type_decl, typedef_decl, var_decl, function_type,
11880 method_type, function_decl,
11881 class_decl}::get_pretty_representation): Likewise.
11882 (get_type_name, get_function_type_name, get_method_type_name)
11883 (get_pretty_representation): Likewise.
11884 (type_base::get_canonical_type_for): Call
11885 get_pretty_representation() with the "internal" flag set to
11886 "true", to get a pretty representation that is independant from
11887 the struct-ness of the subtypes of the type being canonicalized.
11889 2015-10-14 Dodji Seketeli <dodji@redhat.com>
11891 Handle aliased function decls when comparing decls in general
11892 * include/abg-ir.h (is_function_decl): Add a const to the
11893 reference parameter, making it comply with the definition.
11894 * src/abg-ir.cc (equals): In the overload for decl_base, when the
11895 two linkage names are different, consider the case of the decls
11896 being aliased functions.
11898 2015-10-14 Dodji Seketeli <dodji@redhat.com>
11900 Fix const-ness of a function parameter
11901 * include/abg-fwd.h (is_function_decl): Add a const to the
11902 parameter to make it comply with the definition in abg-ir.cc.
11905 2015-10-14 Dodji Seketeli <dodji@redhat.com>
11907 Fix "is-anonymous" abixml property impact on some tests
11908 * tests/data/test-abidiff/test-PR18166-libtirpc.so: New file.
11909 * tests/data/test-abidiff/test-PR18166-libtirpc.so.abi: Likewise.
11910 * tests/data/test-abidiff/test-corpus0-report0.txt: Renamed into
11911 tests/data/test-abidiff/test-PR18166-libtirpc.so.report.txt.
11912 * tests/data/test-abidiff/test-corpus0-v{0,1}.so.abi: Removed.
11913 * tests/data/Makefile.am: Renamed test-corpus0-* files into
11914 test-PR18166-libtirpc.so-* files.
11915 * tests/test-abidiff.cc (specs): Adjust.
11917 2015-10-14 Dodji Seketeli <dodji@redhat.com>
11919 Do not compare access specs for member types & functions
11920 * include/abg-fwd.h (is_function_decl): Declare a new overload.
11921 * src/abg-ir.cc (is_function_decl): Define a new overload.
11922 (equals): In the overload for decl_base, do not compare access
11923 specifiers when comparing member functions and types.
11924 * tests/data/test-diff-dwarf/test0-report.txt: Adjust.
11925 * tests/data/test-diff-filter/test0-report.txt: Likewise.
11926 * tests/data/test-diff-filter/test01-report.txt: Likewise.
11927 * tests/data/test-diff-filter/test30-pr18904-rvalueref-report0.txt: Likewise.
11928 * tests/data/test-diff-filter/test31-pr18535-libstdc++-report-0.txt: Likewise.
11929 * tests/data/test-diff-filter/test4-report.txt: Likewise.
11931 2015-10-14 Dodji Seketeli <dodji@redhat.com>
11933 Fix strip_typedef issues
11934 * src/abg-ir.cc (strip_typedef): Do not canonicalize
11935 the return type of the method type to typedef-strip.
11936 Acknowledge that the return type can be nil.
11938 2015-10-14 Dodji Seketeli <dodji@redhat.com>
11940 Force late canonicalizing of function types read from abixml
11941 * src/abg-reader.cc (build_function_type): Late-canonicalize
11944 2015-10-13 Ondrej Oprala <ooprala@redhat.com>
11946 Bug 19082 - Recognize suppression spec files
11947 * tests/data/Makefile.am: Add new test material to the build system.
11948 * tests/data/test-diff-pkg/dirpkg-{0-dir1,{1,2}-dir2}/dir.abignore:
11949 A test suppression specification.
11950 * tests/data/test-diff-pkg/dirpkg-{2,3}-dir2/.abignore: Likewise.
11951 * tests/data/test-diff-pkg/dirpkg-3.suppr: Likewise.
11952 * tests/data/test-diff-pkg/dirpkg-{1,2,3}-dir{1,2}/libobj-v0.so: New
11953 binary test inputs.
11954 * tests/data/test-diff-pkg/dirpkg-{1,2,3}-dir{1,2}/obj-v0.cc: New test
11956 * tests/data/test-diff-pkg/dirpkg-{1,2,3}-report-{0,1}.txt: New
11958 * tests/test-diff-pkg.cc: Adjust to run the new tests.
11959 * tools/abipkgdiff.cc (prog_options): New static pointer to struct
11961 (file_tree_walker_callback_fn): Rename to
11962 first_package_tree_walker_callback_fn.
11963 (second_package_tree_walker_callback_fn): Check for ELF files just
11964 like the previous function but additionally check for files
11965 ending with ".abignore", unless disabled from the command line.
11966 ({create_maps_of_package,extract_package_and_map_its}_content):
11967 Add a callback as a new argument.
11968 (main) handle the new "--no-abignore" option, which turns off
11969 the search for suppression files within the new package.
11971 2015-10-08 Dodji Seketeli <dodji@redhat.com>
11973 Bug 19024 - Failing to flag underlying type of enums as anonymous
11974 * src/abg-dwarf-raeder.cc (build_enum_type): Set the is-anonymous
11975 flag on the underlying type of the enum.
11976 * tests/data/test-read-dwarf/test0.abi: Adjust.
11977 * tests/data/test-read-dwarf/test9-pr18818-clang.so.abi: Likewise.
11978 * tests/data/test-read-dwarf/test10-pr18818-gcc.so.abi: Likewise.
11979 * tests/data/test-read-dwarf/test11-pr18828.so.abi: Likewise.
11980 * tests/data/test-read-dwarf/test12-pr18844.so.abi: Likewise.
11981 * tests/data/test-read-dwarf/test13-pr18894.so.abi: Likewise.
11982 * tests/data/test-read-dwarf/test14-pr18893.so.abi: Likewise.
11983 * tests/data/test-read-dwarf/test15-pr18892.so.abi: Likewise.
11984 * tests/data/test-read-dwarf/test16-pr18904.so.abi: Likewise.
11985 * tests/data/test-read-dwarf/test17-pr19027.so.abi: Likewise.
11986 * tests/data/test-read-dwarf/test18-pr19037-libvtkRenderingLIC-6.1.so.abi: Likewise.
11987 * tests/data/test-read-dwarf/test19-pr19023-libtcmalloc_and_profiler.so.abi: Likewise.
11988 * tests/data/test-read-dwarf/test20-pr19025-libvtkParallelCore-6.1.so.abi: Likewise.
11990 2015-10-08 Dodji Seketeli <dodji@redhat.com>
11992 Bug 19025 - abixml writer forgets to emit some member types
11993 * include/abg-fwd.h (is_namespace): Fix prototype.
11994 * src/abg-writer.cc (struct type_ptr_comp_functor): New internal
11996 (sort_type_ptr_map): New static function.
11997 (write_context::m_referenced_types_map): Renamed
11998 m_referenced_fntypes_map data member into this.
11999 (write_context::get_referenced_types): New member function.
12000 (write_context::record_type_as_referenced): Renamed
12001 record_fntype_as_referenced member function into this. Adjust.
12002 (write_context::type_is_referenced): Renamed fntype_is_referenced
12004 (write_context::clear_referenced_types_map): Renamed
12005 clear_referenced_fntypes_map member function into this. Adjust.
12006 (write_decl_in_scope): New static function.
12007 (write_translation_unit): Use it here to emit types that are
12008 referenced by other types in the TU, but that are not emitted.
12010 (write_pointer_type_def, write_reference_type_def)
12011 (write_typedef_decl): Record the underlying types referenced by
12012 the emitted types as being, well, referenced.
12013 * tests/data/test-read-dwarf/test20-pr19025-libvtkParallelCore-6.1.so:
12014 New test binary input.
12015 * tests/data/test-read-dwarf/test20-pr19025-libvtkParallelCore-6.1.so.abi:
12016 New reference output of the binary input above.
12017 * tests/data/Makefile.am: Add the new test material above to the
12018 source distribution.
12019 * tests/test-read-dwarf.cc (in_out_spec): Add the new test inputs.
12020 * tests/data/test-read-dwarf/test9-pr18818-clang.so.abi: Adjust.
12021 * tests/data/test-read-dwarf/test10-pr18818-gcc.so.abi: Likewise.
12022 * tests/data/test-read-dwarf/test12-pr18844.so.abi: Likewise.
12023 * tests/data/test-read-dwarf/test13-pr18894.so.abi: Likewise.
12024 * tests/data/test-read-dwarf/test14-pr18893.so.abi: Likewise.
12025 * tests/data/test-read-dwarf/test15-pr18892.so.abi: Likewise.
12026 * tests/data/test-read-dwarf/test16-pr18904.so.abi: Likewise.
12027 * tests/data/test-read-dwarf/test17-pr19027.so.abi: Likewise.
12028 * tests/data/test-read-dwarf/test18-pr19037-libvtkRenderingLIC-6.1.so.abi:
12030 * tests/data/test-read-dwarf/test19-pr19023-libtcmalloc_and_profiler.so.abi:
12033 2015-10-06 Ondrej Oprala <ooprala@redhat.com>
12035 Parallelize test read-dwarf.
12036 * tests/Makefile.am: Link runtestreaddwarf with libpthread.
12037 * tests/test-read-dwarf.cc (main) Create worker threads corresponding
12038 to the number of CPUs online, add a "--no-parallel" option and move
12040 (handleInOutSpec) ...here.
12042 2015-10-07 Dodji Seketeli <dodji@redhat.com>
12044 Bug 19023 - Type canonicalization is sensitive to struct-ness
12045 * include/abg-ir.h (class_decl::is_struct): Declare a setter for the
12046 "is-struct" property.
12047 * src/abg-ir.cc (class_decl::is_struct): And define that setter
12049 (type_base::get_canonical_type_for): Temporarily set the
12050 'is-struct' flag of the class type to 'false' before building its
12051 pretty representation.
12052 * tests/data/test-read-dwarf/test19-pr19023-libtcmalloc_and_profiler.so:
12053 New test input binary.
12054 * tests/data/test-read-dwarf/test19-pr19023-libtcmalloc_and_profiler.so.abi:
12055 New test reference output.
12056 * tests/data/Makefile.am: Add the new test material above to the
12057 source distribution.
12058 * tests/test-read-dwarf.cc (in_out_specs): Add the two new test
12059 inputs to the list of test inputs to consider.
12060 * tests/data/test-read-dwarf/test14-pr18893.so.abi: Adjust.
12062 2015-10-06 Dodji Seketeli <dodji@redhat.com>
12064 Style adjustment in abg-corpus.cc
12065 * src/abg-corpus.cc (corpus::exported_decls_builder::id_var_map_):
12066 Renamed data member vars_map_ into this.
12067 (corpus::exported_decls_builder::id_var_map): Renamed vars_map
12069 (corpus::exported_decls_builder::var_id_is_in_id_var_map): Renamed
12070 var_is_in_map into this.
12071 (corpus::exported_decls_builder::{add_var_to_map,
12072 add_var_to_exported, maybe_add_var_to_exported_vars}): Adjust.
12074 2015-10-06 Dodji Seketeli <dodji@redhat.com>
12076 Bug 19037 - Make ABI corpus support several functions with same symbol
12077 * include/abg-corpus.h
12078 (corpus::exported_decls_builder::str_{fn,var}_ptr_map_type):
12079 Remove these typedefs from here as they only used internally in
12080 abg-corpus.cc. So we move them there instead.
12081 * src/abg-corpus.cc (str_fn_ptrs_map_type): New typedef.
12082 (str_var_ptr_map_type): Moved the typedef that was in
12083 corpus::exported_decls_builder here.
12084 (corpus::exported_decls_builder::id_fns_map_): Rename the fns_
12085 data member into this. Make it have a str_fn_ptrs_map_type as a
12087 (corpus::exported_decls_builder::id_fns_map): Renamed the
12088 fns_map() accessor into this one.
12089 (corpus::exported_decls_builder::{fn_id_is_in_id_fns_map,
12090 fn_is_in_fns}): New member functions.
12091 (corpus::exported_decls_builder::fn_is_in_id_fns_map): Rename
12092 fn_is_in_map into this.
12093 (corpus::exported_decls_builder::add_fn_to_id_fns_map): Rename
12094 add_fn_to_map into this.
12095 (corpus::exported_decls_builder::add_fn_to_exported): Adjust.
12096 (corpus::exported_decls_builder::maybe_add_fn_to_exported_fns):
12098 * src/abg-comparison.cc (function_decl_diff::report): Emit reports
12099 about function name changes (for a given function ID) only if
12100 there are sub-type changes to be reported for the function. In
12101 that case, do not forget to emit the sub-type changes after the
12102 name changes have been reported.
12103 (corpus_diff::priv::ensure_lookup_tables_populated): Several
12104 functions of the same ID can be removed or added from/to the
12106 * tests/data/test-read-dwarf/test18-pr19037-libvtkRenderingLIC-6.1.so:
12107 New test input binary.
12108 * tests/data/test-read-dwarf/test18-pr19037-libvtkRenderingLIC-6.1.so.abi:
12109 New test output reference.
12110 * tests/data/Makefile.am: Add the new test materials to the source
12112 * tests/test-read-dwarf.cc (in_out_specs): Adjust to add the new
12115 2015-10-05 Ondrej Oprala <ooprala@redhat.com>
12117 Do not imply private access when building a struct from ABIXML.
12118 * src/abg-reader.cc (read_context): Abort if we run into an
12119 unsupported access specifier.
12120 (build_class_decl) Default to public access for the children
12123 2015-10-05 Ondrej Oprala <ooprala@redhat.com>
12125 Fix minor warnings when building documentation.
12126 * manuals/abilint.rst: Fix the "Literal block expected" warning.
12127 * manuals/abipkgdiff.rst: Fix the "Title underline too short" warning.
12129 2015-10-05 Ondrej Oprala <ooprala@redhat.com>
12131 Fix an "Unknown target name" error during make info.
12132 * doc/manuals/libabigail-overview.rst: Fix the reference to
12135 2015-10-05 Ondrej Oprala <ooprala@redhat.com>
12137 Fix a path in doc/Makefile.am
12138 * doc/Makefile.am: Prefix the path for DOXY_WEBSITE_SRC_CFG and
12139 DOXY_WEBSITE_BLD_{CFG,DIR} with "/doc" to protect it against make
12142 2015-10-04 Dodji Seketeli <dodji@redhat.com>
12144 Misc style cleanups
12145 * src/abg-reader.cc (read_is_struct): Fix comment.
12146 (build_type_decl): Use type_decl_sptr rather than
12147 shared_ptr<type_decl>.
12148 (build_type_decl): Use typedef_decl_sptr rather than
12149 shared_ptr<typedef_decl>.
12151 2015-10-04 Dodji Seketeli <dodji@redhat.com>
12153 Use the ODR to speed up type canonicalization
12154 * include/abg-fwd.h (class corpus): Forward-declare this.
12155 (is_anonymous_type): Declare this new function.
12156 * include/abg-ir.h (corpus_sptr, corpus_wptr): Declare these
12158 (translation_unit::{g,s}et_corpus): Declare new member functions.
12159 (type_or_decl_base::{g,s}et_corpus): Likewise.
12160 * src/abg-ir.cc (translation_unit::priv::corpus): New data member.
12161 (translation_unit::priv::priv): Initialize it.
12162 (translation_unit::{g,s}et_corpus): Define new accessors.
12163 (translation_unit::get_global_scope): Propagate the corpus of the
12164 translation unit to its newly created global scope.
12165 (translation_unit::bind_function_type_life_time): Propagate the
12166 corpus of the translation_unit to the added function type.
12167 (type_or_decl_base::priv::corpus_): Add new data member.
12168 (type_or_decl_base::priv::priv): Initialize it.
12169 (type_or_decl_base::{g,s}et_corpus): Define new accessors.
12170 (scope_decl::{add,insert}_member_decl): Propagate the context's
12171 corpus to the member added to the context.
12172 (decl_base::priv::is_anonymous_): Add new data member.
12173 (decl_base::priv::priv): Initialize it.
12174 (decl_base::{s,g}et_is_anonymous): Define accessors.
12175 (is_anonymous_type): Define a new test function.
12176 (decl_base::set_name): Update the "is_anonymous" property.
12177 (type_base::get_canonical_type_for): Implement the ODR-based
12178 optimization to type canonicalization.
12179 * src/abg-corpus.cc (corpus::add): When a translation unit is
12180 added to a corpus, set the corpus of the translation unit.
12181 * src/abg-dwarf-reader.cc (build_enum_type)
12182 (build_class_type_and_add_to_ir): Set the "is_anonymous" flag on
12183 anonymous enums and classes.
12184 * src/abg-reader.cc (read_is_anonymous): Define new static
12186 (build_type_decl, build_enum_type, build_class_decl): Call the new
12187 read_is_anonymous function and set the "is_anonymous" property on
12188 the built type declaration.
12189 * src/abg-writer.cc (write_is_anonymous): Define new static
12191 (write_type_decl, write_enum_type_decl, write_class_decl): Write
12192 the "is_anonymous" property.
12193 * tests/data/test-diff-filter/test31-pr18535-libstdc++-report-0.txt:
12195 * tests/data/test-read-dwarf/test9-pr18818-clang.so.abi: Likewise.
12196 * tests/data/test-read-dwarf/test10-pr18818-gcc.so.abi: Likewise.
12197 * tests/data/test-read-dwarf/test11-pr18828.so.abi: Likewise.
12198 * tests/data/test-read-dwarf/test12-pr18844.so.abi: Likewise.
12199 * tests/data/test-read-dwarf/test13-pr18894.so.abi: Likewise.
12200 * tests/data/test-read-dwarf/test14-pr18893.so.abi: Likewise.
12201 * tests/data/test-read-dwarf/test15-pr18892.so.abi: Likewise.
12202 * tests/data/test-read-dwarf/test16-pr18904.so.abi: Likewise.
12203 * tests/data/test-read-dwarf/test17-pr19027.so.abi: Likewise.
12205 2015-10-04 Dodji Seketeli <dodji@redhat.com>
12207 Late canonicalize all types that reference classes when reading DWARF
12208 * include/abg-fwd.h (peel_array_type): Declare new function.
12209 * src/abg-ir.cc (peel_array_type): Define it.
12210 (peel_typedef_pointer_or_reference_type): Peel arrays too, to get
12211 the type of its element.
12212 * src/abg-dwarf-reader.cc (maybe_canonicalize_type): If a pointer,
12213 reference, array or typedef references a class, then do
12214 late-canonicalize this type.
12216 2015-10-04 Dodji Seketeli <dodji@redhat.com>
12218 Fix infinite loop in peel_typedef_pointer_or_reference_type
12219 * src/abg-ir.cc (peel_typedef_pointer_or_reference_type): Make
12220 sure the variable tested in the condition is the one updated by
12223 2015-10-02 Dodji Seketeli <dodji@redhat.com>
12225 Try harder to hash_type_or_decl avoid the slow path
12226 * src/abg-ir.cc (hash_type_or_decl): When a declaration-only
12227 class has a definition, then use the canonical type of that
12228 definition as a hash value. If the class no definition, only
12229 then, use the slow patfh of computing the recursive progressive
12230 hash value of the type.
12232 2015-10-02 Dodji Seketeli <dodji@redhat.com>
12234 Do not use recursive type hashing when writing out function types
12235 * src/abg-writer.cc (typedef fn_shared_ptr_map): Remove.
12236 (write_context::m_referenced_fntypes_map): Change the type of this
12238 (write_context::{record_fntype_as_referenced,
12239 fntype_is_referenced}): Use the pointer value of the canonical
12240 type of the referenced type as key for the map.
12242 2015-10-02 Dodji Seketeli <dodji@redhat.com>
12244 Prevent build_function_type from not canonicalizing certain types
12245 * src/abg-dwarf-reader.cc (build_function_type): Associate the
12246 type being built with its DIE, before starting to build the
12247 sub-types. The current type is then amended with the sub-types
12248 that are built later.
12249 (build_ir_node_from_die): In the case for DW_TAG_subroutine_type,
12250 do not associate the type to the DIE here, as it's been done in
12251 build_function_type.
12252 * src/abg-ir.cc (function_type::set_parameters): Adjust the index
12253 of the parameters being set to the function: they start at 1,
12254 unless the first parameter is artificial, in which case its index
12255 starts at zero. This is just like what is done when the function
12256 type is constructed directly with the parameters passed as an
12257 argument to the constructor.
12259 2015-10-02 Dodji Seketeli <dodji@redhat.com>
12261 Fix detection of changes in pointer diff in the comparison engine
12262 * src/abg-comparison.cc (pointer_diff::has_changes): Just
12263 comparing the underlying type might not be enough. Let's just
12264 compare the pointer itself. Now that we have canonical types,
12265 comparing the pointer itself is not slower.
12267 2015-10-02 Dodji Seketeli <dodji@redhat.com>
12269 Do not overly canonicalize types during typedef stripping
12270 * src/abg-ir.cc (strip_typedef): Do not canonicalize the stripped
12271 type if the input one is not canonicalized.
12273 2015-10-02 Dodji Seketeli <dodji@redhat.com>
12275 Cleanup some IR type comparison operators
12276 * include/abg-ir.h (operator==): In the overloads for type_decl,
12277 enum and class_decl, turn the shared_ptr parameter into a const
12278 reference to the shared_ptr.
12279 * src/abg-ir.cc (operator==): Do the same in the definitions.
12281 2015-10-02 Dodji Seketeli <dodji@redhat.com>
12283 Add missing deep equality operator for pointer and reference types
12284 * include/abg-ir.h (pointer_type_def::operator==): Add an overload
12285 for pointer_type_def.
12286 (reference_type_def::operator==) Add an overload for
12287 reference_type_def.
12288 (operator==): Add an overload for pointer_type_def_sptr and
12289 reference_type_def_sptr.
12290 * src/abg-ir.cc (pointer_type_def::operator==): Make the overload
12291 for type_base& use the overload for decl_base&. Add a new
12292 overload for pointer_type_def& and make is use the overload for
12294 (operator==): Add free form overloads for pointer_type_def& and
12295 reference_type_def&.
12296 (reference_type_def::operator==): Add comments. Add an overload
12297 for reference_type_def&.
12299 2015-10-02 Dodji Seketeli <dodji@redhat.com>
12301 constify is_class_type()
12302 * include/abg-fwd.h (is_class_type): Take a pointer to const.
12303 * src/abg-ir.cc (is_class_type): Adjust.
12305 2015-10-01 Ondrej Oprala <ooprala@redhat.com>
12307 Bug 19027 - ABI asymmetry with enums over INT_MAX
12308 * src/abg-reader.cc (build_enum_type_decl): Use strtol
12309 instead of atoi to parse the values and check for overflow.
12310 * tests/data/Makefile.am: Add the new test material to the build
12312 * tests/data/test-read-dwarf/test17-pr19027.so: New test file.
12313 * tests/data/test-read-dwarf/test17-pr19027.so.abi: Likewise.
12314 * tests/test-read-dwarf.cc: Adjust to launch the new test.
12316 2015-10-01 Dodji Seketeli <dodji@redhat.com>
12318 Encourage people to use autoreconf -i
12319 * COMPILING: Mention autoreconf -i, rather than just autoreconf.
12321 2015-09-23 Ondrej Oprala <ooprala@redhat.com>
12323 Bug 17340 - Support pointers and references to functions
12324 * include/abg-comparison.h (compute_diff_for_distinct_kinds): Take the
12325 first two arguments of type const type_or_decl_base_sptr instead.
12326 * include/abg-ir.h (translation_unit::get_function_types): Declare new
12328 (function_types): Declare new typedef.
12329 * src/abg-comparison.cc (compute_diff_for_types): Take the first two
12330 arguments of type const type_or_decl_base_sptr instead of a const
12332 (try_to_diff): Likewise.
12333 (try_to_diff<class_decl>): Likewise.
12334 (try_to_diff_distinct_kinds): Likewise.
12335 (compute_diff_for_distinct_kinds): Likewise. Also remove a variant
12336 accepting arguments of type const type_base_sptr.
12337 * src/abg-dwarf-reader.cc (build_class_type_and_add_to_ir): Skip
12338 building a pointer if it points to the beginning of a vptr.
12339 (build_pointer_type_def): Declare utype_decl of type
12340 type_or_decl_base_sptr and adjust assignments to it accordingly.
12341 (build_function_type): New function definition.
12342 (build_function_decl): Call build_function_type instead of building
12344 (build_ir_node_from_die): Amend case DW_TAG_subroutine_type with
12345 appropriate calls to build a function type.
12346 * src/abg-ir.cc (translation_unit::get_function_types): New method
12348 ({pointer,reference}_type_def::pointer_type_def): Expect that
12349 pointed_to might not have an accompanying declaration and set a type's
12350 name in this case as well.
12351 ({pointer,reference}_type_def::get_qualified_name): Generate a
12352 qualified name even if the pointed-to type has no declaration.
12353 * src/abg-reader.cc (build_function_type): New function definition.
12354 (handle_element_node): Return a type_or_decl_base_sptr instead and
12355 try calling handle_function_type in addition to others.
12356 (handle_function_type): New function definition that calls
12357 build_function_type.
12358 (build_type): Try calling build_function_type as well.
12359 * src/abg-writer.cc (fn_shared_ptr_map): Declare new typedef.
12360 (write_context::{clear_referenced_fntypes_map,fntype_is_referenced,
12361 record_fntype_as_referenced}): New member functions.
12362 (write_translation_unit): Call the new clear_referenced_fntypes_map.
12363 * tests/data/Makefile.am: Add the new test material to the build
12365 (write_translation_unit): Separately write function types that have
12366 been recorded to emit by write_{pointer,reference}_type_def.
12367 (write_{pointer,reference}_type_def): Record the type pointed to as
12368 a type to be emitted if type == function type.
12369 (write_function_type): Write the details of a function type in the
12370 abixml format and unmark the type.
12371 * tests/data/test-diff-dwarf/test32-fnptr-changes-report-0.txt: New
12372 test reference report.
12373 * tests/data/test-diff-dwarf/test32-fnptr-changes-v{0,1}.cc: New test
12375 * tests/data/test-diff-dwarf/test32-fnptr-changes-v{0,1}.o: New binary
12377 * tests/data/test-diff-dwarf/test33-fnref-changes-report-0.txt: New
12378 test reference report.
12379 * tests/data/test-diff-dwarf/test33-fnref-changes-v{0,1}.cc: New test
12381 * tests/data/test-diff-dwarf/test33-fnref-changes-v{0,1}.o: New binary
12383 * tests/data/test-diff-filter/test30-pr18904-rvalueref-report0.txt:
12385 * tests/data/test-diff-filter/test31-pr18535-libstdc++-report-0.txt:
12387 * tests/data/test-read-dwarf/test10-pr18818-gcc.so.abi: Likewise.
12388 * tests/data/test-read-dwarf/test11-pr18828.so.abi: Likewise.
12389 * tests/data/test-read-dwarf/test12-pr18844.so.abi: Likewise.
12390 * tests/data/test-read-dwarf/test13-pr18894.so.abi: Likewise.
12391 * tests/data/test-read-dwarf/test14-pr18893.so.abi: Likewise.
12392 * tests/data/test-read-dwarf/test15-pr18892.so.abi: Likewise.
12393 * tests/data/test-read-dwarf/test16-pr18904.so.abi: Likewise.
12394 * tests/data/test-read-dwarf/test9-pr18818-clang.so.abi: Likewise.
12395 * tests/data/test-read-write/test27.xml: New test source file.
12396 * tests/test-diff-dwarf.cc: Adjust to launch the new tests.
12397 * tests/test-read-write.cc: Likewise.
12399 2015-09-09 Ondrej Oprala <ooprala@redhat.com>
12401 Generalize some dwarf-reader functions to generate and return instances of type_or_decl_base_stpr to be able to propagate types occurring without an accompanying declaration.
12402 * src/abg-dwarf-reader.cc (build_ir_node_from_die): Return
12403 a type_or_decl_base_sptr instead.
12404 (get_scope_for_die): Likewise.
12405 (build_class_type_and_add_to_ir): Typecast the assignment from
12406 build_ir_node_from_die properly.
12407 (build_{qualified,reference,array,typedef}_type): Likewise.
12408 (build_pointer_type_def): Likewise.
12409 (build_{var,function}_decl): Likewise.
12411 2015-09-29 Ondrej Oprala <ooprala@redhat.com>
12413 Move a constructor declaration
12414 * include/abg-ir.h (decl_base): Change the decl_base() declaration's
12415 visibility to private.
12417 2015-09-24 Dodji Seketeli <dodji@redhat.com>
12419 Bug 18535 - abidiff reports false positive ABI difference for libstdc++
12420 *non-static* data member; a static data member only is not enough to
12421 make the class declaration become a definition.
12422 * src/abg-dwarf-reader.cc (build_class_type_and_add_to_ir): The
12423 presence of a data member shouldn't make a declaration-only class
12424 loose its declaration-only-ness; the presence of a enon-static*
12425 data member should.
12426 * tests/data/test-read-dwarf/test15-pr18892.so.abi: Adjust.
12427 * tests/data/test-read-dwarf/test16-pr18904.so.abi: Likewise.
12428 * tests/data/test-diff-filter/test31-pr18535-libstdc++-4.8.3.so:
12429 New binary test input.
12430 * tests/data/test-diff-filter/test31-pr18535-libstdc++-4.9.2.so:
12432 * tests/data/test-diff-filter/test31-pr18535-libstdc++-report-0.txt:
12433 New test reference output.
12434 * tests/data/Makefile.am: Add the new test material to the build
12436 * tests/test-diff-filter.cc (in_out_specs): Add the new test
12437 inputs to the set of inputs to consider.
12439 2015-09-21 Dodji Seketeli <dodji@redhat.com>
12441 Remove duplicated runtestreaddwarf test
12442 * tests/Makefile.am: Remove one copy of the runtestreaddwarf test
12443 that is present twice.
12445 2015-09-21 Dodji Seketeli <dodji@redhat.com>
12447 Add a missing function declaration
12448 * include/abg-tools-utils.h (dir_name): Add missing function
12451 2015-09-21 Dodji Seketeli <dodji@redhat.com>
12453 Remove some dead code in abilint
12454 * tools/abilint.cc (options::bidiff): Remove.
12455 (options::options): Adjust.
12456 (display_usage): Remove usage string for --bidiff
12457 (parse_command_line): Remove parsing of un-implemented option
12460 2015-09-21 Dodji Seketeli <dodji@redhat.com>
12462 Add a new --abidiff option to abidw
12463 * tools/abidw.cc (options::abidiff): New data member.
12464 (options::options): Initialize it.
12465 (display_usage): Add a usage string for the new --abidiff option.
12466 (parse_command): Parse the new --abidiff options.
12467 (main): Save the abi of the input elf in a temporary abixml file;
12468 read it back and compare both.
12470 2015-09-21 Dodji Seketeli <dodji@redhat.com>
12473 * src/abg-hash.cc (class_decl::hash::operator()): Use a temporary
12474 variable to ease debugging.
12475 * src/abg-reader.cc (read_context::is_wip_type): Make this
12477 * src/abg-writer.cc (write_context): Move data members at the top.
12479 2015-09-21 Dodji Seketeli <dodji@redhat.com>
12481 Speed up type canonicalization by avoiding recursive hashing
12482 * include/abg-ir.h (canonical_types_map_type): Adjust this typedef
12483 to make it point to an unordered_map which the key is now a string
12484 and the value is a vector of types.
12485 (type_or_decl_base::{get_cached_hash_value, set_cached_hash_value,
12486 cached_hash}): Remove these member functions and type.
12487 (struct type_base::cached_hash): Remove.
12488 * src/abg-ir.cc (struct type_or_decl_base::priv::hash_): Remove.
12489 (type_or_decl_base::priv::priv): Adjust.
12490 (type_or_decl_base::{g,s}et_cached_hash_value): Remove.
12491 (type_base::get_canonical_type_for): For declaration-only classes,
12492 look at their definition for the canonical_type. Do not use
12493 recursive type hashing anymore. Rather, use the pretty
12494 representation string, and hash that.
12495 (class_decl::base_spec::get_hash): Do away with hash value caching
12497 (class_decl::operator==): For decl-only classes, look at their
12498 definitions for canonical types.
12499 (hash_type_or_decl): Adjust comment. Use the canonical type
12500 pointer value for type hash. That's the fast path. Otherwise, if
12501 not available, fall back to a slow path which is the recursive
12502 type hash we were using before.
12503 * src/abg-dwarf-reader.cc (maybe_canonicalize_type): Schedule all
12504 classes and typedef to classes for late canonicalization.
12505 * src/abg-hash.cc (type_base::dynamic_hash::operator()): There is
12506 no hash value cashing anymore.
12507 (type_base::cached_hash::operator()): Remove.
12508 * src/abg-reader.cc (read_context::get_type): Slight style
12510 (read_translation_unit_from_file)
12511 (read_translation_unit_from_buffer): Do not forget to canonicalize
12512 types when reading just one translation unit.
12513 (build_type_tparameter, build_template_tparameter): Canonicalize
12515 * src/abg-writer.cc (struct type_hasher): New hasher type.
12516 (type_ptr_map): Use a deep pointer comparison equal operator
12517 functor, and canonical types as type hash values.
12518 (write_class_decl): Do not write size and alignment on decl-only
12519 classes. Do not record decl-only classes as being emitted. Their
12520 definition must be emitted before.
12521 * tests/test-read-write.cc (main): Do not do abi testing on
12522 translation units (as opposed to doing it on abi corpora) as that
12523 code is not wet yet. We need to know how to diff namespaces.
12524 * tests/data/test-abidiff/test-PR18791-report0.txt: Adjust.
12525 * tests/data/test-read-dwarf/test9-pr18818-clang.so.abi: Likewise.
12526 * tests/data/test-read-dwarf/test10-pr18818-gcc.so.abi: Likewise.
12527 * tests/data/test-read-dwarf/test12-pr18844.so.abi: Likewise.
12528 * tests/data/test-read-dwarf/test13-pr18894.so.abi: Likewise.
12529 * tests/data/test-read-dwarf/test14-pr18893.so.abi: Likewise.
12530 * tests/data/test-read-dwarf/test15-pr18892.so.abi: Likewise.
12531 * tests/data/test-read-dwarf/test16-pr18904.so.abi: Likewise.
12533 2015-09-21 Dodji Seketeli <dodji@redhat.com>
12535 Update qualified name of a decl when it's added to its context
12536 * include/abg-ir.h (decl_base::priv_): Make this be public, so
12537 that the qualified name updater function can access it.
12538 (class class_decl): Make set_member_is_static() a friend function.
12539 * src/abg-ir.cc (class ::qualified_name_setter): New tree walking
12541 (decl_base::get_qualified_parent_name): Do not do any computation
12542 here. Just return the pre-computed qualified parent name string.
12543 (decl_base::get_qualified_name): Likewise, for qualified name.
12544 (scope_decl::{add,insert}_member_decl): Update the qualified name of the
12545 newly added member. Set the scope of the member here. It's not
12546 going to be set elsewhere, from now on.
12547 (add_decl_to_scope): Do not set the scope here anymore. Just call
12548 scope_decl::add_member_decl and let it do the work.
12549 (insert_decl_into_scope): Likewise, just call
12550 scope_decl::insert_member_decl and let it do the work.
12551 (class_decl::{add_data_member, add_member_function}): Do not
12552 handle details of context setting at this point. Let
12553 scope_decl::add_member_decl do it. Adjust the properties of the
12554 context relation afterwards. In add_data_member, when a data
12555 member changes its static-ness, move the data member into the
12556 class_decl::priv::non_static_data_members_ or out of it, as
12558 (class_decl::insert_member_decl): By default, a data member is
12560 (set_member_is_static): Move this definition after the definitions
12561 of class_decl, so that this function can see those. Also, when a
12562 data member changes its static-ness, move the data member into the
12563 class_decl::priv::non_static_data_members_ or out of it, as
12565 (class_decl::add_member_function_template): As we the
12566 underlying function template decl to the context, do not do any
12567 scope adding for it here.
12568 (::qualified_name_setter::{do_update, visit_begin}): Define new
12570 (update_qualified_name): Define new static function.
12571 * src/abg-reader.cc (build_class_decl): Make build_function_decl,
12572 build_var_decl, build_function_tdecl and build_class_tdecl
12573 automatically add the created decl to their context, and then
12574 update the properties of the resulting member decl later, just
12575 like what we do in the DWARF reader.
12577 2015-09-21 Dodji Seketeli <dodji@redhat.com>
12579 Add new test functions
12580 * include/abg-fwd.h (is_function_decl, is_decl, is_namespace)
12581 (is_scope_decl): Declare new function overloads.
12582 * src/abg-ir.cc (is_function_decl, is_decl, is_namespace)
12583 (is_scope_decl): Define them.
12585 2015-09-21 Dodji Seketeli <dodji@redhat.com>
12587 Constify some diff-utils functor operators
12588 * include/abg-diff-utils.h (deep_ptr_eq_functor::operator()): Make
12589 the overloads be const.
12591 2015-09-16 Dodji Seketeli <dodji@redhat.com>
12593 Support source_location_not_in and source_location_not_regexp suppressions
12594 * include/abg-ini.h (enum property_value::value_kind): Add a
12595 LIST_PROPERTY_VALUE kind.
12596 (class {list_property_value, list_property}): Declare new types.
12597 (is_list_property, is_list_property_value): Declare new functions.
12598 * src/abg-ini.cc (struct list_property_value::priv): Define new
12600 (list_property_value::{list_property_value, get_content,
12601 set_content, as_string}): Define new member functions.
12602 (is_list_property_value): Define new function.
12603 (struct list_property::priv): Define new type.
12604 (list_property::{list_property, get_value, set_value,
12605 handle_escape}): Define new member functions.
12606 (is_list_property): Define new function.
12607 (read_context::buf_): New data member.
12608 (read_context::{peek, get, put_back, good, eof, read_string,
12609 read_list_property_value}): New member functions.
12610 (read_context::read_next_char): Use the new read_context::{get,
12611 good, eof} member function, rather than using the input stream
12613 (read_context::{skip_white_spaces, skip_comments,
12614 skip_white_spaces_or_comments, read_property_name,
12615 read_function_name, read_function_argument,
12616 read_function_call_expr, read_property_value,
12617 read_tuple_property_value, read_section_name, read_section}):
12618 Adjust to use the new member functions of read_context rather than
12619 using the input stream directly.
12620 (read_context::read_string_property_value): Likewise. Use the new
12621 read_context::read_string() method.
12622 (read_context::{read, write}_property): Support reading list_property.
12623 * include/abg-comparison.h
12624 (type_suppression::{get_source_locations_to_keep,
12625 set_source_locations_to_keep,
12626 set_source_location_to_keep_regex_str,
12627 get_source_location_to_keep_regex_str}): Add new member functions.
12628 * src/abg-comparison.cc
12629 (type_suppression::priv::{source_location_to_keep_,
12630 source_location_to_keep_regex_str_,
12631 source_location_to_keep_regex_}): Add new data members.
12632 (type_suppression::priv::{g,s}et_source_location_to_keep_regex):
12633 Define new member functions.
12634 (type_suppression::{g,s}et_source_locations_to_keep): Define new
12636 (type_suppression::{g,s}et_source_location_to_keep_regex_str):
12638 (type_suppression::suppresses_type): Support
12639 "source_location_not_regexp" and "source_location_not_in"
12640 properties of suppression specifications.
12641 (read_type_suppression): Likewise. Also adjust to the fact that
12642 ta tuple property value that is a list of strings is not a list
12644 * doc/manuals/libabigail-concepts.rst: Add documentation for
12645 source_location_not_in and source_location_not_regexp.
12646 * tests/data/test-diff-suppr/libtest26-loc-suppr-v{0,1}.so: New
12647 binary test inputs.
12648 * tests/data/test-diff-suppr/test26-loc-suppr-{0,1,2}.suppr: New
12649 suppression specification test inputs.
12650 * tests/data/test-diff-suppr/test26-loc-suppr-report-{0,1,2,3}.txt:
12651 New test reference reports.
12652 * tests/data/test-diff-suppr/test26-loc-suppr-v{0,1}.cc: Source
12653 code of the test binary input above.
12654 * tests/data/test-diff-suppr/test26-loc-suppr.h: Likewise.
12655 * tests/data/Makefile.am: Add the new test material to source
12657 * tests/test-diff-suppr.cc (in_out_specs): Add the new test inputs above.
12659 2015-09-16 Dodji Seketeli <dodji@redhat.com>
12661 Pass simple property data by reference
12662 * include/abg-ini.h (simple_property::{simple_property,
12663 set_value}): Pass the value shared pointer by reference.
12664 * src/abg-ini.cc (simple_property::{simple_property, set_value):
12665 Pass the value shared pointer by reference.
12667 2015-09-15 Dodji Seketeli <dodji@redhat.com>
12669 Make string_ends_with() allow long suffixes
12670 * src/abg-tools-utils.cc (string_ends_with): Allow suffixes of the
12671 same size as the input string.
12673 2015-09-13 Dodji Seketeli <dodji@redhat.com>
12675 Add missing 'break' keyword in e_machine_to_string()
12676 * src/abg-dwarf-reader.cc (e_machine_to_string): Add missing
12677 'break' keywords in switch/case statement.
12679 2015-09-09 Dodji Seketeli <dodji@redhat.com>
12681 Fix compilation warnings in abipkgdiff.cc
12682 * tools/abipkgdiff.cc (package::erase_extraction_directory)
12683 (extract_rpm, extract_deb, extract_tar)
12684 (erase_created_temporary_directories_parent): Check the return
12685 value of the system() function.
12686 (extract_package): Add necessary white space.
12688 2015-09-09 Dodji Seketeli <dodji@redhat.com>
12690 Fix spurious errors in the install-man-and-info-doc target
12691 * doc/manuals/Makefile.am (install-man-and-info-doc): Don't check
12692 for abidiff.info, that thing doesn't exist. Rather, check for
12693 abigail.info. Use gzip -f in case the zipped file exists already.
12695 2015-09-09 Dodji Seketeli <dodji@redhat.com>
12697 Compare qualified name in decl_base comparison operator
12698 * src/abg-ir.cc (equals): In the overload for decl_base, compare
12699 qualified names, not just names.
12700 * tests/data/test-abidiff/test-PR18791-report0.txt: Adjust.
12702 2015-09-08 Dodji Seketeli <dodji@redhat.com>
12704 Fix a stupid typo in function sorting code
12705 * src/abg-comparison.cc (function_comp::operator()): Fix a typo
12706 preventing the proper sorting of function name when their
12707 declarator names are equal. Oops.
12708 * tests/data/test-diff-filter/test30-pr18904-rvalueref-report0.txt: Adjust.
12710 2015-09-08 Dodji Seketeli <dodji@redhat.com>
12712 Update manual for abipkgdiff
12713 * doc/manuals/abipkgdiff.rst: Say we support tarballs and plain
12716 2015-09-07 Dodji Seketeli <dodji@redhat.com>
12718 Adjust {s,g}et_show_stats() to use a reference
12719 * include/abg-dwarf-reader.h ({s,g}et_show_stats): Use a reference
12721 * tools/abidiff.cc (main): Adjust.
12722 * tools/abidw.cc (main): Likewise.
12724 2015-09-07 Dodji Seketeli <dodji@redhat.com>
12726 Use cache type hash values only after type canonicalization is done
12727 *when* we request that hash value. If we are computing the hash value
12728 of struct list itself, then the temporary value of "struct list" is
12729 zero. But then once we are done computing the hash value of "struct
12730 list", that value becomes non-zero.
12731 Hence, the hash value of a type depends on when that value is
12733 But then if we want to cache that hash value and re-use it later,
12734 which value should we cache? Definitely not the zero value!
12735 So in other words, we can use (and thus cache) the hash value of a
12736 given type T only after the hash values of all types which use T have
12738 To satisfy that condition, we decide to use the (cached) hash value of
12739 each type only after we've computed all the hash values of all types
12741 So, during type canonicalization, when a type T is canonicalized, this
12742 patch stores the hash value of T. But then it's only when all types
12743 are canonicalized that the hashing code is allowed to re-use the
12744 cached value of types.
12745 This fixes the issues of spurious type differences introduced when the
12746 same type was read either from DWARF or from abixml. Those
12747 differences where introduced by differences in the order of hashing
12748 types which sub-types refer to themselves. The patch also updates
12749 regression tests accordingly.
12750 * src/abg-dwarf-reader.cc (read_debug_info_into_corpus): Before we
12751 read debug info and build the IR, set a flag in the environment
12752 saying that type canonicalization isn't finished yet. But then,
12753 after type canonicalization is done, flip that flag to say that
12754 type canonicalization is done.
12755 * src/abg-reader.cc (read_corpus_from_input): Likewise.
12756 * src/abg-ir.cc (type_base::get_canonical_type_for): Once a type
12757 has been canonicalized, cache its hash value.
12758 * src/abg-hash.cc (type_base::dynamic_hash::operator()): If type
12759 canonicalization has been done and if the type has a cached value,
12761 * tests/data/test-read-dwarf/test2.so.abi: Adjust.
12762 * tests/data/test-read-dwarf/test9-pr18818-clang.so.abi: Likewise.
12763 * tests/data/test-read-dwarf/test10-pr18818-gcc.so.abi: Likewise.
12764 * tests/data/test-read-dwarf/test12-pr18844.so.abi: Likewise.
12765 * tests/data/test-read-dwarf/test13-pr18894.so.abi: Likewise.
12766 * tests/data/test-read-dwarf/test14-pr18893.so.abi: Likewise.
12767 * tests/data/test-read-dwarf/test15-pr18892.so.abi: Likewise.
12768 * tests/data/test-read-dwarf/test16-pr18904.so.abi: Likewise.
12770 2015-09-07 Dodji Seketeli <dodji@redhat.com>
12772 Introduce the concept of environment
12773 * include/abg-ir.h: Adjust note about memory management.
12774 (class environment): Declare new class.
12775 (translation_unit::translation_unit): Take an environment in
12777 (translation_unit::{g,s}et_environment): Declare new member
12779 (type_or_decl_base::{g,s}et_environment): Likewise.
12780 (type_or_decl_base::{get_cached_hash_value,
12781 set_cached_hash_value}): Change the name of
12782 decl_base::peek_hash_value() and decl_base::set_hash() here into
12783 these and move them here.
12784 (type_or_decl_base::hashing_started): Move
12785 decl_base::hashing_started() here.
12786 ({g,s}et_environment_for_artifact): Declare new functions.
12787 (class decl_base): Move member functions hashing_started(),
12788 peek_hash_value() and set_hash() on to the type_or_decl_base base
12790 (scope_decl::scope_decl): Initialize the virtual member
12791 type_or_decl_base().
12792 (type_decl::{get_void_type_decl,
12793 get_variadic_parameter_type_decl}): Remove these static member
12794 functions. They are now non-static member functions of the new
12796 * src/abg-ir.cc (class environment_setter): New internal class.
12797 (get_canonical_types_map): Remove. This now becomes a member
12798 function of the environment type.
12799 (class usage_watchdog): Remove.
12800 (usage_watchdog_{s,w}ptr): Remove these typedefs.
12801 (get_usage_watchdog_wptr, ref_usage_watchdog)
12802 (maybe_cleanup_type_system_data): Remove these functions.
12803 (translation_unit::priv::usage_watchdog_): Remove data member.
12804 (translation_unit::priv::env_): New data member.
12805 (translation_unit::priv::priv): Take an environment and initialize
12806 the new env_ data member. Do not initialize the removed
12808 (translation_unit::translation_unit): Take an environment
12810 (translation_unit::get_global_scope): Set the environment of a new
12812 (translation_unit::{g,s}et_environment): New accessors.
12813 (translation_unit::bind_function_type_life_time): Set the
12814 environment of the function type.
12815 (struct environment::priv): New class.
12816 (environment::{environment, ~environment, get_canonical_types_map,
12817 get_variadic_parameter_type_decl, canonicalization_is_done}): New
12819 (struct type_or_decl_base::priv): New class.
12820 (type_or_decl_base::{type_or_decl_base, hashing_started,
12821 get_cached_hash_value, set_cached_hash_value, set_environment,
12822 get_environment, traverse}): New member functions.
12823 ({s,g}get_environment_for_artifact): New functions.
12824 (decl_base::priv::{hash_, hashing_started}): Remove.
12825 (decl_base::priv::priv): Adjust.
12826 (decl_base::decl_base): In the copy constructor, initialize the
12827 virtual base type_or_decl_base. Do not initialize hash_ and
12828 hashing_started data member that got removed.
12829 (decl_base::{hashing_started, peek_hash_value, set_hash}): Remove
12831 (strip_typedef): Set the environment of the new type which has its
12832 typedefs stripped off. Adjust the call to type_or_void().
12833 (scope_decl::{add, insert}_member_decl): Set the environment of
12834 the new member decl to the environment of its scope.
12835 (synthesize_type_from_translation_unit)
12836 (synthesize_function_type_from_translation_unit): Set the
12837 environment for the newly synthesized type. Adjust calls to
12839 (type_or_void): Take an environment in parameter. Get the void
12840 type from the environment.
12841 (get_canonical_types_map): Remove.
12842 (type_base::get_canonical_type_for): Get the canonical types map
12843 from the environment, not from a global variable.
12844 (type_decl::{get_void_type_decl,
12845 get_variadic_parameter_type_decl}): Remove.
12846 (pointer_type_def::pointer_type_def): Adjust call to type_or_void.
12847 (reference_type_def::reference_type_def): Likewise.
12848 (function_decl::parameter::get_pretty_representation): Get the
12849 variadic parameter type decl from the environment.
12850 (class_decl::priv::classes_being_compared_): Remove static data
12852 (class_decl::priv::{mark_as_being_compared,
12853 unmark_as_being_compared, comparison_started): Use the "classes
12854 being compared" map from the environment.
12855 (class_decl::base_spec::get_hash): Adjust.
12856 (keep_type_alive): Get the alive types array from the environment)
12857 not from a global variable anymore.
12858 (get_next_string): Put the counter in thread-local storage.
12859 * src/abg-hash.cc (scope_decl::hash::operator())
12860 (function_decl::hash::operator()): Do not handle caching (here).
12861 * include/abg-corpus.h (corpus::{g,s}et_environment): Declare new
12863 * src/abg-corpus.cc (corpus::priv::env): New data member.
12864 (corpus::priv::priv): Initialize it.
12865 (corpus::corpus): Take an environment in parameter.
12866 (corpus::{g,s}et_environment): Define new member functions
12867 (corpus::add): Set the environment of the newly added translation
12868 unit, if it's not set already set. In any case, assert that the
12869 translation unit must use the same environment as the corpus.
12870 * include/abg-dwarf-reader.h (create_read_context)
12871 (read_corpus_from_elf): Take an environment parameter.
12872 ({s,g}et_debug_info_root_path, {s,g}et_environment): Declare new
12874 * src/abg-dwarf-reader.cc (read_context::{env_,
12875 offline_callbacks_}): New data members.
12876 (read_context::read_context): Initialize them.
12877 (read_context::clear_per_translation_unit_data): Do not touch the
12878 void type declaration, it doesn't belong to the translation unit.
12879 (read_context::{env, offline_callbacks}): New accessors.
12880 (read_context::{create_default_dwfl}): New member function.
12881 (read_context::dwfl_handle): Add a setter overload.
12882 ({s,g}et_debug_info_root_path): Define new accessors.
12883 (create_default_dwfl, create_dwfl_sptr, create_default_dwfl_sptr):
12885 (build_translation_unit_and_add_to_ir): Adjust to pass the
12886 environment to the newly created translation unit.
12887 (build_function_decl): Adjust to pass the environment to the
12888 created function and parameter types. Get variadic parameter type
12889 node from the current environment, not from a global variable.
12890 And do not try to canonicalize function types here.
12891 (read_debug_info_into_corpus): Set the environment of the newly
12893 (build_ir_node_for_void_type): Get the void type node from the
12894 current environment, rather than from a global variable.
12895 (create_read_context): Take the environment in parameter.
12896 Create the default dwarf front end library handle using the new
12897 member function of the read context. Set the current environment
12898 used by the reader.
12899 (read_corpus_from_elf): Take an environment in
12900 parameter. Overhaul. This is now simpler.
12901 (has_alt_debug_info): Adjust the call to create_read_context() to
12902 make it pass an empty environment.
12903 * include/abg-fwd.h (class environment): Forward declare.
12904 * include/abg-reader.h (read_translation_unit_from_file)
12905 (read_translation_unit_from_buffer)
12906 (read_translation_unit_from_istream)
12907 (read_corpus_from_native_xml): Take an environment in parameter.
12908 * src/abg-reader.cc (read_context::m_env): New data member.
12909 (read_context::read_context): Initialize it.
12910 (read_context::{get_environment, set_environment}): New data
12912 (read_translation_unit): Set environment of the new translation
12914 (read_corpus_from_input): Set the environment of the new corpus.
12915 (read_translation_unit_from_file)
12916 (read_translation_unit_from_buffer)
12917 (read_translation_unit_from_istream, read_corpus_from_native_xml):
12918 Take an environment in parameter.
12919 (build_function_parameter): Get variadic parameter type from the environment.
12920 * src/abg-comparison.cc (compute_diff): Add asserts in all the
12921 overloads to ensure that the artifact being compared come from the
12923 * tests/print-diff-tree.cc (main): Create an env for the ABI
12925 * tests/test-abidiff.cc (main): Likewise.
12926 * tests/test-diff-dwarf.cc (main): Likewise.
12927 * tests/test-ir-walker.cc (main): Likewise.
12928 * tests/test-read-dwarf.cc (main): Likewise.
12929 * tests/test-read-write.cc (main): Likewise.
12930 * tools/abicompat.cc (main): Likewise.
12931 * tools/abidiff.cc (main): Likewise.
12932 * tools/abidw.cc (main): Likewise.
12933 * tools/abilint.cc (main): Likewise.
12934 * tools/abipkgdiff.cc (main): Likewise.
12936 2015-09-07 Dodji Seketeli <dodji@redhat.com>
12938 Fix redundant const qualifier stripping
12939 * include/abg-ir.h (operator&, operator~): Add overloaded bitwise
12940 operators for qualified_type_def::CV.
12941 * src/abg-ir.cc (operator&, operator~): Define them.
12942 * src/abg-dwarf-reader.cc (maybe_strip_qualification): Fix
12943 comment. If there are multiple qualifiers, only strip the const
12945 (build_ir_node_from_die): Once we've built a qualified type, if
12946 the 'const' qualifier is stripped, then add the new (stripped)
12947 type to the set of new types.
12949 2015-09-05 Dodji Seketeli <dodji@redhat.com>
12951 Fix wording in README
12952 * README: Fix wording.
12954 2015-09-02 Dodji Seketeli <dodji@redhat.com>
12957 * src/abg-hash.cc (class_decl::hash::operator()): Remove some dead
12959 * src/abg-ir.cc (equals): In the overload for class_decl,
12962 2015-09-02 Dodji Seketeli <dodji@redhat.com>
12964 Re-arrange some regression tests order
12965 * tests/Makefile.am: Run runtestreaddwarf and
12966 runtestcanonicalizetypes at the beginning.
12968 2015-09-02 Dodji Seketeli <dodji@redhat.com>
12970 Bug 18904 - Fix support for C++ rvalue references
12971 * src/abg-comparison.cc (reference_diff::has_changes): Just
12972 compare the references, rather than assuming that the change can
12973 only be on underlying types.
12974 (reference_diff::report): Describe lvalue/rvalue changes for
12976 * src/abg-ir.cc (reference_type_def::reference_type_def): Properly
12977 set the name for an rvalue reference.
12978 (equals): For references, compare lvalue-ness too.
12979 (reference_type_def::get_qualified_name): Properly set rvalue
12981 * tests/data/test-diff-filter/test30-pr18904-rvalueref-liba.so:
12983 * tests/data/test-diff-filter/test30-pr18904-rvalueref-libb.so:
12985 * tests/data/test-diff-filter/test30-pr18904-rvalueref-report0.txt:
12986 New test reference output.
12987 * tests/data/Makefile.am: Add the new files to source
12989 * tests/test-diff-filter.cc (in_out_specs): Run the new tests.
12991 2015-09-02 Dodji Seketeli <dodji@redhat.com>
12993 More type degradation fixes (from DWARF to abixml)
12994 * include/abg-fwd.h (get_type_scope): Declare new function.
12995 * src/abg-hash.cc (var_decl::hash::operator()): Do not cache the
12996 hash because that can alter the hash computing of a larger type
12997 which embeds a var decl as a member declaration. This is
12998 especially true if the var decl indirectly references the larger
12999 type. The only way to cache the value of a var decl would be to
13000 wait after all canonical types have been computed. We'd then seal
13001 all types. After that sealing happens, we can cache var decls
13002 starting from the top-level ones.
13003 (function_decl::hash::operator()): Likewise.
13004 * src/abg-ir.cc (get_type_scope): Define new functions.
13005 * src/abg-reader.cc (read_is_declaration_only): Declare this
13007 (typedef const_types_map_it): Adjust this to make it point to a
13008 map of string and vector of types, as opposed to a map to string
13009 and type as it was before.
13010 (typedef types_map_it): New typedef.
13011 (read_context::map_id_and_node): Map a type id to the last
13012 xmlNodePtr that represent a *declaration*. That gives more leeway
13013 to the declaration resolution code to choose the right definition
13014 later. Otherwise, there are cases where the wrong definition. By
13015 wrong definition, I mean a definition that is different from the
13016 one chosen by the DWARF reading code, for a given declaration.
13017 Basically for a given ABI corpus, a type declaration resolve to
13018 the first definition seen in the corpus.
13019 (read_context::get_all_type_decls): Define new member function.
13020 (read_context::types_equal): Use qualified names only if both
13021 types have a scope.
13022 (read_context::key_type_decl): Now a given ID is associated to
13023 *all* the declarations and definition that have that ID.
13024 (read_translation_unit_from_input): Make sure the current corpus
13025 node points to the right node.
13026 (build_class_decl): Resolve class declarations to the first
13027 definition seen in the corpus. Key a type decl before reading its
13028 members as a reading a member can request the current decl. No
13029 need to try and canonicalize a member type, as build_class_decl()
13031 * tests/data/test-read-dwarf/test16-pr18904.so: New test binary
13033 * tests/data/test-read-dwarf/test16-pr18904.so.abi: New test
13035 * tests/test-read-dwarf.cc: Run the test above.
13036 * tests/data/Makefile.am: Add the new test input to source
13038 * tests/data/test-abidiff/test-PR18791-report0.txt: Adjust.
13039 * tests/data/test-read-dwarf/test13-pr18894.so.abi: Likewise.
13040 * tests/data/test-read-dwarf/test14-pr18893.so.abi: Likewise.
13041 * tests/data/test-read-dwarf/test15-pr18892.so.abi: Likewise.
13043 2015-08-30 Dodji Seketeli <dodji@redhat.com>
13045 Bug 18892 - type degradation from DWARF to abixml on libtsan.so
13046 * src/abg-reader.cc (read_context::maybe_canonicalize_type): Late
13047 canonicalize enum types.
13048 (build_enum_type_decl): Read the linkage name of the enum type.
13049 * src/abg-writer.cc (write_enum_type_decl): Emit the linkage name
13051 * tests/data/test-read-dwarf/test15-pr18892.so: New binary test
13053 * tests/data/test-read-dwarf/test15-pr18892.so.abi: New test
13055 * tests/data/Makefile.am: Add the new test inputs above to source
13057 * tests/test-read-dwarf.cc (in_out_specs): Run the two tests above.
13059 2015-08-30 Dodji Seketeli <dodji@redhat.com>
13061 Bug 18893 - type degradation from dwarf to abixml on libGLU.so
13062 * src/abg-dwarf-reader.cc (build_class_type_and_add_to_ir): Do not
13063 consider that virtual member functions disqualify a class from
13064 being declaration-only.
13065 * src/abg-hash.cc (var_decl::hash::operator()): Do not cache the
13066 result of hashing before we are done building the type of the
13068 (function_decl::hash::operator()): Likewise, do not cache the
13069 result of hashing before we are done building the type of the
13071 * src/abg-reader.cc (build_class_decl): Build the link between a
13072 class declaration and its definition. If there are several
13073 definitions of a class in the corpus, keep just one.
13074 * src/abg-writer.cc (write_class_is_declaration_only): Emit the
13075 link between a class declaration and its definition.
13076 (write_class_decl): Emit a class declaration even if it has a
13077 definition. The definition is going to be emitted
13079 * tests/data/test-read-dwarf/test14-pr18893.so: New binary test
13081 * tests/data/test-read-dwarf/test14-pr18893.so.abi: New test
13083 * tests/data/Makefile.am: Add the new test input files to source
13085 * tests/test-read-dwarf.cc (in_out_specs): Run the new tests.
13086 * tests/data/test-abidiff/test-PR18791-report0.txt: Adjust.
13087 * tests/data/test-read-dwarf/test9-pr18818-clang.so.abi: Likewise.
13088 * tests/data/test-read-dwarf/test10-pr18818-gcc.so.abi: Likewise.
13089 * tests/data/test-read-dwarf/test11-pr18828.so.abi: Likewise.
13090 * tests/data/test-read-dwarf/test12-pr18844.so.abi: Likewise.
13091 * tests/data/test-read-dwarf/test13-pr18894.so.abi: Likewise.
13093 2015-08-30 Dodji Seketeli <dodji@redhat.com>
13095 Use common canonicalization oracle when reading class type from dwarf
13096 * src/abg-dwarf-reader.cc (build_ir_node_from_die):
13097 (maybe_canonicalize_type): Move the specific logic that was in
13098 build_ir_node_from_die (for class types) here.
13100 2015-08-30 Dodji Seketeli <dodji@redhat.com>
13102 Fix crash in file type guessing
13103 * src/abg-tools-utils.cc (string_ends_with): Handle the case where
13104 the string suffix is longer than the string itself.
13106 2015-08-29 Dodji Seketeli <dodji@redhat.com>
13108 Bug 18894 - Fix representation of enumerators in abixml format
13109 * include/abg-ir.h (enum_type_decl::enumerator::get_value()):
13110 Change the type of this from size_t to ssize_t.
13111 * src/abg-ir.cc (enum_type_decl::enumerator::get_value): Do the
13112 same on the definition side.
13113 (non_canonicalized_subtype_detector::visit_begin): If a type
13114 refers to itself, late canonicalize it to have a similar hashing
13115 result as what the abixml reader does.
13116 * src/abg-reader.cc (build_enum_type_decl): Use ssize_t to read
13117 the value of enumerators.
13118 * tests/data/test-read-dwarf/test13-pr18894.so.abi: New test input.
13119 * tests/data/Makefile.am: Add the new test inputs above to source
13121 * tests/test-read-dwarf.cc (in_out_specs): Add new test inputs.
13122 * tests/data/test-read-dwarf/test9-pr18818-clang.so.abi: Adjust.
13123 * tests/data/test-read-dwarf/test10-pr18818-gcc.so.abi: Likewise.
13124 * tests/data/test-read-dwarf/test11-pr18828.so.abi: Likewise.
13125 * tests/data/test-read-dwarf/test12-pr18844.so.abi: Likewise.
13127 2015-08-29 Dodji Seketeli <dodji@redhat.com>
13129 Detect vtable changes from member function changes
13130 * include/abg-ir.h (class_decl::{has_virtual_base, has_vtable}):
13131 Declare new member functions.
13132 * src/abg-comp-filter.cc (has_virtual_mem_fn_change): New overload
13133 for function_decl_diff.
13134 (has_virtual_mem_fn_change): In the overload for diff*, support
13135 virtual member function changes detection for function_decl_diff*.
13136 * src/abg-comparison.cc (function_decl_diff::report): Detect and
13137 report changes to a vtable by looking a changes that can happen to
13138 a given member function.
13139 (corpus_diff::report): Detect and report changes to vtables by
13140 looking at changes change to member functions.
13141 * tests/data/test-diff-dwarf/test29-vtable-changes-report-0.txt:
13143 * tests/data/test-diff-dwarf/test29-vtable-changes-v{0,1}.cc: Source
13144 code of new test input binaries.
13145 * tests/data/test-diff-dwarf/test29-vtable-changes-v{0,1}.o: New
13146 test input binaries.
13147 * tests/data/test-diff-dwarf/test30-vtable-changes-report-0.txt:
13149 * tests/data/test-diff-dwarf/test30-vtable-changes-v{0,1}.cc: New
13151 * tests/data/test-diff-dwarf/test30-vtable-changes-v{0,1}.o: New
13152 test input binaries.
13153 * tests/data/test-diff-dwarf/test31-vtable-changes-report-0.txt:
13155 * tests/data/test-diff-dwarf/test31-vtable-changes-v{0,1}.cc:
13156 Source code of new test input binary.
13157 * tests/data/test-diff-dwarf/test31-vtable-changes-v{0,1}.o: New
13159 * tests/data/Makefile.am: Add the new test input files above to
13160 source distribution.
13161 * tests/test-diff-dwarf.cc (in_out_specs): Consume the new test
13164 2015-08-29 Dodji Seketeli <dodji@redhat.com>
13166 Do not hash or compare virtual member functions as par of classes
13167 * src/abg-ir.cc (equals): When comparing two classes, do not
13168 compare their virtual member functions.
13169 * src/abg-hash.cc (class_decl::hash::operator()): Do not hash
13170 virtual member functions when hashing a class.
13171 * tests/data/test-read-dwarf/test10-pr18818-gcc.so.abi: Adjust.
13173 2015-08-29 Dodji Seketeli <dodji@redhat.com>
13176 * src/abg-ir.cc (qualified_type_def::get_qualified_name): Fix
13178 (class_decl::member_class_template::operator==): Add comments.
13179 (operator==): Add comment for the overload of
13180 class_decl::member_class_template_sptr.
13181 (function_tdecl::operator==): Add comments.
13183 2015-08-29 Dodji Seketeli <dodji@redhat.com>
13185 Adjust many reference output for the non-regression test suite
13186 * tests/data/test-abidiff/test-enum0-report.txt: Adjust.
13187 * tests/data/test-abidiff/test-enum1-report.txt: Adjust.
13188 * tests/data/test-abidiff/test-qual-type0-report.txt: Adjust.
13189 * tests/data/test-abidiff/test-struct0-report.txt: Adjust.
13190 * tests/data/test-read-dwarf/test10-pr18818-gcc.so.abi: Adjust.
13191 * tests/data/test-read-dwarf/test11-pr18828.so.abi: Adjust.
13192 * tests/data/test-read-dwarf/test12-pr18844.so.abi: Adjust.
13193 * tests/data/test-read-dwarf/test9-pr18818-clang.so.abi: Adjust.
13194 * tests/data/test-read-write/test17.xml: Adjust.
13196 2015-08-29 Dodji Seketeli <dodji@redhat.com>
13198 Make test-read-dwarf.cc and test-read-write.cc abidiff the ABIs
13199 * tests/test-read-dwarf.cc (main): Use abidiff to compare the
13200 input elf file with the XML emitted. That should yield the empty
13202 * tests/test-read-write.cc (main): Likewise, use abidiff to
13203 compare the input abixml file with the one that is emitted.
13205 2015-08-29 Dodji Seketeli <dodji@redhat.com>
13207 Add a new --noout option to abidw
13208 * tools/abidw.cc (options::noout): New data member.
13209 (options::options): Initialize it.
13210 (display_usage): Add a usage string for the new option.
13211 (parse_command_line): Parse the new option.
13212 (main): If --noout is provided, do not emit the XML form.
13213 * doc/manuals/abidw.rst: Document the new option.
13215 2015-08-29 Dodji Seketeli <dodji@redhat.com>
13217 Add a --no-architecture option to abidiff
13218 * tools/abidiff.cc (options::no_arch): New data member.
13219 (options::options): Initialize it.
13220 (display_usage): Display a help string for the new options.
13221 (parse_command_line): Parse the new options.
13222 (main): If --no-architecture is provided, set the corpus
13223 architecture to "".
13224 * doc/manuals/abidiff.rst: Document the new options.
13226 2015-08-29 Dodji Seketeli <dodji@redhat.com>
13228 Read abixml as a whole file and fix lots discrepancies with dwarf
13229 * src/abg-reader.cc (class read_context): Move data member at
13230 the top of the class like what is done elsewhere in the code
13232 (read_context::m_corp_node): New data member.
13233 (read_context::read_context): Initialize it.
13234 (read_context::{get,set}_corpus_node): New accessors.
13235 (read_context::map_id_and_node): Accept that a node id previously
13236 defined is defined again. In that case we just remember the first
13237 mapping id -> xml-node. That seems to work for now.
13238 (read_context::get_translation_unit): Fix the logic.
13239 (read_context::m_wip_types_map): Rename
13240 read_context::m_wip_classes_map into this.
13241 (read_context::clear_wip_types_map): Rename
13242 read_context::clear_wip_classes into this.
13243 (read_context::mark_type_as_wip): Rename
13244 read_context::mark_class_as_wip into this.
13245 (read_context::unmark_type_as_wip): Rename
13246 read_context::unmark_type_as_wip into this.
13247 (read_context::is_wip_type): Rename read_context::is_wip_class
13249 (read_context::types_equal): New member function.
13250 (read_context::clear_per_translation_unit_data): Do not clear
13251 anything anymore as the previous data that were per-tu are now
13253 (read_context::clear_per_corpus_data): Clear here the previous
13254 data that were per-tu.
13255 (read_context::maybe_canonicalize_type): Add a new force_delay
13256 flag that forces the type to be late-canonicalized. Also force
13257 late-canonicalize references, pointers, qualified-type and typedef
13258 because they must be canonicalized once they've been added to
13259 their context; but then this function might be called too early,
13260 before they are added to their context.
13261 (read_context::type_id_new_in_translation_unit): Remove this
13263 (read_translation_unit_from_input): Be able to either use the
13264 xmlTextReader interface, or get the current 'abi-instr' xml
13265 element node. If using the xmlTextReader interface, use it to
13266 move to the 'abi-instr' node, expand it and then use that. In
13267 either case, call read_translation_unit() with the 'abi-instr' xml
13269 (read_translation_unit): Take an 'abi-instr' XML element in
13270 argument now, use that to read the translation unit, as opposed to
13271 using the xmlTextReader interface we where using before to walk
13272 the sub-tree of the abi-instr xml node.
13273 (read_context::get_scope_for_node): If the scope is a new
13274 translation unit, then build the new translation unit.
13275 (read_symbol_db_from_input): Take the function and variable symbol
13276 data bases, and read the current xml element node (do not use the
13277 xmlTextReader interface anymore) to populate the function and
13279 (read_elf_needed_from_input): Do not use the xmlTextReader
13280 interface anymore. Rather, use the current xml element node, look
13281 for the 'elf-needed' xml element node and use it to populate the
13282 set of elf dependencies.
13283 (read_corpus_from_input): Rework to expand the contents of the
13284 corpus node and use the result, rather than just exclusively
13285 relying on the xmlTextReader interface.
13286 (build_function_parameter): Build a proper IR node for variadic
13287 parameters. Build function type node *after* having built all the
13288 parameters IR, so that parameter indexing is the same as what is
13289 done in the DWARF reader. Also, if the function is not being
13290 added to its context yet, then delay the canonicalizing of its
13291 type, just like what is done by the DWARF reader.
13292 (build_qualified_type_decl, build_pointer_type_def)
13293 (build_reference_type_def, build_enum_type_decl, build_type_decl):
13294 Adjust. Do not enforce anymore that the ID of this type be new in
13295 the current TU. Delay canonicalizing if the type is not being
13296 added to its context. For typedefs, use an adapted way of
13297 checking the consistency of the underlying type.
13298 (build_array_type_def): Do not enforce anymore that the ID of this
13299 type be new in the current TU. Support the fact that the array
13300 might not have any DW_AT_byte_size attribute. Force late
13301 canonicalizing if the array is not being added to its context.
13302 (build_class_decl): Adjust. Reuse the
13303 read_context::maybe_canonicalize_type() function rather than
13304 trying to determine locally when to canonicalize.
13305 (build_template_tparameter): Adjust
13307 2015-08-29 Dodji Seketeli <dodji@redhat.com>
13309 Fix handling of class declaration during DWARF reading
13310 *virtual* member functions, data members, base classes or a
13311 DW_AT_byte_size as being conditions for being defined.
13312 * src/abg-dwarf-reader.cc (read_context::decl_only_classes_map_):
13313 Remove this data member.
13314 (read_context::{declaration_only_classes_to_force_defined,
13315 schedule_declaration_only_class_for_forced_resolution}): Remove
13316 these member functions.
13317 (read_context::resolve_declaration_only_classes): Do not force
13318 resolution of class declaration.
13319 (build_class_type_and_add_to_ir): Do not schedule classes for
13320 forced-resolution when they are used as base classes. The
13321 presence of a member function is not enough to make the class be
13322 defined. It needs to be a virtual member function.
13324 2015-08-28 Dodji Seketeli <dodji@redhat.com>
13326 Fix important hashing issues
13327 * src/abg-hash.cc (class_decl::hash::operator()): Do not force
13328 base classes to have definitions anymore. GCC and Clang (at
13329 least) some time emits debug info in which the definition of some
13330 base classes are missing, especially when those base classes have
13331 vtables. In that case, the definition of the class might it's in
13332 the binary where the vtable is emitted, which might not be the
13333 binary we are looking at. So let's relax the assertion we had
13334 here for base classes. For hashing virtual member functions,
13335 directly walk the virtual member functions by looking at
13336 class_decl::get_virtual_mem_fns() rather than walking all
13337 member functions and looking for the virtual ones. This is a
13338 speed optimization but it also helps during debugging.
13340 2015-08-28 Dodji Seketeli <dodji@redhat.com>
13342 Fix template comparison operators
13343 * include/abg-ir.h (function_tdecl::operator==): Introduce a new
13344 virtual member operator that takes a function_tdecl&.
13346 (class_decl::member_function_template::operator==): Avoid the
13347 static cast in the overload for member_base. In the overload for
13348 member_class_template, avoid infinite recursion.
13349 (function_tdecl::operator==): In the overload for decl_base, do
13350 not do the real work here in the overload for decl_base Rather,
13351 the real work is done in the new overload for function_tdecl, and
13352 all other overloads call that one.
13354 2015-08-28 Dodji Seketeli <dodji@redhat.com>
13356 Use size/alignment of class definition when requested on declaration
13357 * include/abg-ir.h (type_base::{set_size_in_bits,
13358 set_alignment_in_bits}): Make these member functions virtual.
13359 (class_decl::{set_size_in_bits, get_size_in_bits,
13360 get_alignment_in_bits, set_alignment_in_bits}): Declare these
13361 virtual member functions.
13362 * src/abg-ir.cc (class_decl::{set_size_in_bits, get_size_in_bits,
13363 get_alignment_in_bits, set_alignment_in_bits}): Define these
13366 2015-08-28 Dodji Seketeli <dodji@redhat.com>
13368 Fix type lookup algorithm
13369 * src/abg-ir.cc (find_next_delim_in_cplus_type): Define new static
13371 (fqn_to_components): Use the new function above to break up a
13372 fully qualified name into components, rather than the too simple
13373 string::find_first_of() we were using previously.
13374 (lookup_node_in_scope): If the found type (class) is a
13375 declaration-only and if it has a definition, then return it.
13377 2015-08-26 Dodji Seketeli <dodji@redhat.com>
13379 Make decl hashing always take qualified name into account
13380 * src/abg-hash.cc (decl_base::hash::operator()(const decl_base&)):
13381 Always hash the qualified name of the decl.
13383 2015-08-26 Dodji Seketeli <dodji@redhat.com>
13385 Accept base classes which types are compatible with class type
13386 * include/abg-fwd.h (is_compatible_with_class_type): Declare a new
13388 * src/abg-dwarf-reader.cc (build_class_type_and_add_to_ir): Rather
13389 than requiring that base classes be of class type, just require
13390 that they be compatible with class types.
13391 * src/abg-ir.cc (is_compatible_with_class_type): Define a new
13394 2015-08-26 Dodji Seketeli <dodji@redhat.com>
13396 Harden function_decl::get_pretty_representation()
13397 * src/abg-ir.cc (function_decl::get_pretty_representation): Make
13398 sure the function type is a member function before calling
13399 get_member_function_is_{virtual,ctor,dtor,const}.
13401 2015-08-25 Dodji Seketeli <dodji@redhat.com>
13403 Don't cache type qualified name before canonicalization
13404 * src/abg-ir.cc (decl_base::{get_qualified_parent_name,
13405 get_qualified_name}): Use the qualified name cache only if the
13406 type is fully built, i.e, when its canonical type is present.
13407 (qualified_type_def::get_qualified_name): Likewise.
13408 (pointer_type_def::get_qualified_name): Likewise.
13409 (reference_type_def::get_qualified_name): Likewise.
13410 (array_type_def::get_qualified_name): Likewise.
13412 2015-08-22 Dodji Seketeli <dodji@redhat.com>
13414 Misc style cleanups
13415 * configure.ac: Fix some spelling typos.
13416 * src/abg-tools-utils.cc (guess_file_type): Fix indentation.
13417 * tests/test-diff-pkg.cc (int_out_specs): Add some vertical spaces
13418 for better legibility.
13419 * tools/abidiff.cc (main): Add a missing space.
13420 * tools/abipkgdiff.cc (extract_deb): Fix a typo in the comment.
13422 2015-08-22 Dodji Seketeli <dodji@redhat.com>
13424 Make abipkgdiff compare tar archives containing binaries
13425 * config.h.in (WITH_TAR): New configuration preprocessor macro.
13426 * configure.ac: Add a new --enable-tar option. It's turned on
13427 automatically if the tar program is found in the PATH. Adjust the
13428 build configuration report to add the tar archive support.
13429 * include/abg-tools-utils.h (string_ends_with): Declare new
13431 (enum file_type): Add a new FILE_TYPE_TAR enumerator.
13432 * src/abg-tools-utils.cc (string_ends_with): Define new function.
13433 (operator<<(ostream&, file_type)): Serialize the new FILE_TYPE_TAR
13435 (guess_file_type): Detect UStar format file by reading its magic
13436 number. Detect compressed tar files based on the file path
13438 * tools/abipkgdiff.cc (extract_tar): Define new function.
13439 (extract_package): Handle tar packages.
13440 (main): Handle tar archives.
13441 * tools/abidiff.cc (main): Handle the new FILE_TYPE_TAR
13443 * tools/abilint.cc (main): Likewise.
13444 * tests/data/test-diff-pkg/tarpkg-0-dir{1,2}.ta{,r,.bz2, gz}: New
13445 test input tarballs.
13446 * tests/data/test-diff-pkg/tarpkg-0-report-0.txt: New test output
13448 * tests/data/Makefile.am: Add the new test data file above to
13449 source distribution.
13450 * tests/test-diff-pkg.cc (in_out_specs): Add new tests cases.
13452 2015-08-22 Dodji Seketeli <dodji@redhat.com>
13454 Misc style fixes in abipkgdiff
13455 * include/abg-tools-utils.h (enum file_type): Fix the comment for
13456 for the FILE_TYPE_DEB enumerator.
13457 * tools/abipkgdiff.cc (main): Fix the style of the conditions.
13458 Also, fix the text emitted.
13460 2015-08-22 Dodji Seketeli <dodji@redhat.com>
13462 Make abipkgdiff compare directories containing binaries
13463 * include/abg-tools-utils.h (enum file_type): Add a new
13464 FILE_TYPE_DIR enumerator.
13465 * src/abg-tools-utils.cc (operator<<(ostream&, file_type)):
13466 Support serialization of the new FILE_TYPE_DIR enumerator.
13467 (guess_file_type): Detect that the path given is a directory.
13468 * tools/abipkgdiff.cc (package::package): If the package is a
13469 directory, then set its extracted directory path to the path of
13471 (package::erase_extraction_directory): Do not erase the extraction
13472 directory if the package is a directory provided by the user.
13473 (extract_package): If the package is a directory provided by the
13474 user, then there is nothing to extract.
13475 (main): If the first package is a directory, then the second one
13476 should be a directory as well.
13477 * tools/abidiff.cc (main): Support directories as input.
13478 * tools/abilint.cc (main): Likewise.
13479 * tests/data/test-diff-pkg/dirpkg-0-dir{1,2}/libobj-v0.so: New
13480 binary test inputs.
13481 * test/data/test-diff-pkg/dirpkg-0-report-0.txt: New input test
13483 * tests/data/test-diff-pkg/dirpkg-1-dir{1,2}/obj-v0.cc: Source
13484 code of the binary test inputs above.
13485 * tests/data/Makefile.am: Add the new files above to the source
13487 * tests/test-diff-pkg.cc (in_out_specs): Add the new test input
13488 files above to the set of tests this harness has to run over.
13490 2015-08-22 Dodji Seketeli <dodji@redhat.com>
13492 [dwarf reader] Support reference types without explicit DW_AT_byte_size
13493 * src/abg-dwarf-reader.cc (build_reference_type): If the type DIE
13494 has no DW_AT_byte_size, assume the type size is the translation
13495 unit's address size.
13496 * tests/data/test-read-dwarf/test9-pr18818-clang.so.abi: Adjust.
13497 * tests/data/test-read-dwarf/test12-pr18844.so.abi: Adjust.
13499 2015-08-21 Dodji Seketeli <dodji@redhat.com>
13501 [dwarf reader] Support pointer types without explicit DW_AT_byte_size
13502 * abg-dwarf-reader.cc (build_pointer_type_def): If the type DIE
13503 has no DW_AT_byte_size, assume the type size is the translation
13504 unit's address size.
13505 * tests/data/test-read-dwarf/test9-pr18818-clang.so.abi: Adjust.
13506 * tests/data/test-read-dwarf/test12-pr18844.so.abi: Adjust.
13508 2015-08-21 Dodji Seketeli <dodji@redhat.com>
13510 make abipkgdiff compile with GCC 4.4.7
13511 * tools/abipkgdiff.cc (package::extracted_packages_parent_dir):
13512 The string holding the dir name is no more __thread, as this won't
13513 compile with GCC 4.4.7
13515 2015-08-21 Dodji Seketeli <dodji@redhat.com>
13518 * src/abg-dwarf-reader.cc (read_context::die_type_map): Fix typo
13520 * src/abg-ir.cc (peel_typedef_type): Fix typo in the comment.
13521 * src/abg-reader.cc
13522 (read_context::perform_late_type_canonicalizing): Fix a type in
13525 2015-08-21 Dodji Seketeli <dodji@redhat.com>
13527 Make get_pretty_representation work on method types
13528 * include/abg-fwd.h (is_method_type): Declare new overloads for
13530 (get_method_type_name): Declare new functions.
13531 (get_pretty_representation): Declare new overloads for
13533 * src/abg-ir.cc (get_function_type_name): If the function type is
13534 a method type, handle it as such.
13535 (get_method_type_name): Define new functions.
13536 (get_pretty_representation): If the function type is a method
13537 type, handle it as such.
13538 (get_pretty_representation): Define new overloads for method_type
13539 and pointer/reference to method_type.
13540 (is_method_type): Add overloads for naked pointers.
13542 2015-08-21 Dodji Seketeli <dodji@redhat.com>
13544 Hash a class declaration the same as its definition
13545 * src/abg-hash.cc (class_decl::hash::operator()(const class_decl&)):
13546 If the class declaration has a definition, hash its definition
13547 instead. Otherwise, if the class declaration has no definition,
13548 just return a zero hash, like what we were doing before.
13549 * src/abg-reader.cc (read_context::maybe_canonicalize_type): Do
13550 not early canonicalize method types because most of the time, when
13551 this function is called, the method hasn't been added to its
13552 parent class yet. So wait until late before canonicalizing.
13553 * src/abg-writer.cc (write_class_is_declaration_only): Do not emit
13554 the "is-declaration-only" property if the declaration has a
13556 (write_class_decl): If the class declaration has a definition,
13557 emit the definition instead.
13558 * tests/data/test-read-dwarf/test10-pr18818-gcc.so.abi: Adjust.
13559 * tests/data/test-read-dwarf/test12-pr18844.so.abi: Likewise.
13560 * tests/data/test-read-dwarf/test9-pr18818-clang.so.abi: Likewise.
13561 * tests/data/test-read-write/test18.xml: Likewise.
13562 * tests/data/test-read-write/test20.xml: Likewise.
13563 * tests/data/test-read-write/test21.xml: Likewise.
13565 2015-08-20 Dodji Seketeli <dodji@redhat.com>
13567 Add a --stats to abidiff and abidw
13568 * include/abg-dwarf-reader.h (get_show_stats)
13569 (set_show_stats): New accessors for a new "show_stats" property of
13570 the dwarf reader context.
13571 * src/abg-dwarf-reader.cc: Include iostream to use std::cerr.
13572 (dwarf_reader::show_stats_): New data member.
13573 (dwarf_reader::dwarf_reader): Initialize it.
13574 (dwarf_reader::show_stats)
13576 (set_show_stats): Define new accessors.
13577 (dwarf_reader::die_type_map): Add const overload to this accessor.
13578 (dwarf_reader::lookup_type_from_die_offset): Make this accessor
13580 (dwarf_reader::add_late_canonicalized_types_stats): New member
13582 (dwarf_reader::perform_late_type_canonicalizing): Emit the
13583 statistics about late-canonicalized types if the user asked for
13585 * tools/abidiff.cc (options::show_stats): New data member.
13586 (options::options): Initialize it.
13587 (display_usage): Document it.
13588 (parse_command_line): Parse the new --stats option.
13589 (main): Create a dwarf reader context, set the show_stats to it
13590 and then use that context to read the corpora before diffing them.
13591 * tools/abidw.cc (options::show_stats): New data member.
13592 (options::options): Initialize it.
13593 (display_usage): Document it.
13594 (parse_command_line): Parse the new --stats option.
13595 (main): Set the show_stats to the dwarf reader context before
13597 * doc/manuals/abidiff.rst: Update the manual.
13598 * doc/manuals/abidw.rst: Update the manual.
13600 2015-08-19 Dodji Seketeli <dodji@redhat.com>
13602 Canonicalize all types that got scheduled for late canonicalization
13603 * src/abg-dwarf-reader.cc
13604 (read_context::canonicalize_types_scheduled): Canonicalize all
13605 types scheduled for late canonicalization.
13606 * tests/data/test-read-dwarf/test9-pr18818-clang.so.abi: Adjust.
13607 * tests/data/test-read-dwarf/test9-pr18818-clang.so.abi: Adjust.
13609 2015-08-19 Dodji Seketeli <dodji@redhat.com>
13611 Propagate canonical type of a class definition to its declaration
13612 * src/abg-ir.cc: (canonicalize): Propagate the canonical type of
13613 the type definition to its declaration.
13614 (class_decl::set_definition_of_declaration): Likewise.
13616 2015-08-19 Dodji Seketeli <dodji@redhat.com>
13618 Make type_has_non_canonicalized_subtype() tighter
13619 * include/abg-fwd.h (is_typedef, is_pointer_type)
13620 (is_reference_type): Declare new overloads.
13621 (peel_typedef_type): Renamed get_typedef_underlying_type into
13623 (peel_pointer_type, peel_reference_type)
13624 (peel_typedef_pointer_or_reference_type): Declare new functions.
13625 * src/abg-ir.cc (peel_typedef_type): Renamed
13626 get_typedef_underlying_type into this.
13627 (is_typedef, is_pointer_type, is_reference_type): Define new
13629 (peel_pointer_type, peel_reference_type)
13630 (peel_typedef_pointer_or_reference_type): Define new functions.
13631 (non_canonicalized_subtype_detector::has_non_canonical_type_):
13632 Make the type of this data member be a type_base*, not a bool.
13633 This is so that we can return the first non-canonicalized subtype
13634 of the type we are looking at.
13635 (non_canonicalized_subtype_detector::non_canonicalized_subtype_detector):
13636 Adjust the data member initialization.
13637 (non_canonicalized_subtype_detector::visit_begin): Add an overload
13638 for function_decl*, to avoid looking into non-virtual member
13640 In the overload for type_base*, peel typedefs, pointers and
13641 reference of each sub-type that has no canonical type, to see if
13642 refers to the type we are actually walking. If yes, then keep
13644 (type_has_non_canonicalized_subtype): Return the non-canonicalized
13646 * src/abg-comparison.cc (type_suppression::suppresses_diff):
13647 Adjust for the get_typedef_underlying_type -> peel_typedef_type
13650 2015-08-19 Dodji Seketeli <dodji@redhat.com>
13652 Make decl_base::get_qualified_name() work when decl context changes
13653 * include/abg-ir.h (class decl_base): Make class scope_decl a
13654 friend of decl_base.
13655 (type_base::priv_): Make this protected, rather than private.
13656 * src/abg-ir.cc (scope_decl::add_member_decl)
13657 (scope_decl::insert_member_decl): Reset the cache of the result of
13658 decl_base::get_qualified_name().
13659 * tests/data/test-abidiff/test-PR18791-report0.txt: Adjust.
13661 2015-08-18 Dodji Seketeli <dodji@redhat.com>
13663 Bug 18844 - assert failure in abidw at abg-dwarf-reader.cc:6537
13664 * src/abg-dwarf-reader.cc (build_class_type_and_add_to_ir):
13665 Schedule declaration-only class resolution before the class
13666 appears as usable as to other types being built.
13667 * tests/data/test-read-dwarf/test12-pr18844.so: Add a new binary
13669 * tests/data/test-read-dwarf/test12-pr18844.so.abi: The reference
13670 ABI XML output for the binary above.
13671 * tests/data/Makefile.am: Add the new test inputs above to the
13672 source distribution.
13673 * tests/test-read-dwarf.cc (in_out_specs): Add the new test inputs
13674 above to the set of input this test harness has to run over.
13676 2015-08-18 Dodji Seketeli <dodji@redhat.com>
13678 Fix a little glitch in the test suite
13679 * test-read-dwarf.cc (in_out_specs): Emit the output of the test11
13680 to output/test-read-dwarf/test11-pr18828.so.abi, not
13681 output/test-read-dwarf/test10-pr18828.so.abi.
13683 2015-08-18 Dodji Seketeli <dodji@redhat.com>
13685 Escape XML property names that were not escaped before
13686 * src/abg-writer.cc (write_namespace_decl, write_typedef_decl)
13687 (write_var_decl): Escape the XML characters that are forbidden in
13688 XML properties, and that are emitted as value of the 'name'
13691 2015-08-15 Dodji Seketeli <dodji@redhat.com>
13693 Bug 18828 - Handle force-resolving of multiple declarations-only of the same type
13694 * src/abg-dwarf-reader.cc
13695 (read_context::resolve_declaration_only_classes): Accept that a
13696 class that needs to be force-resolved might have been declared
13697 several times. In that case, some instances of that
13698 declaration-only class might have already been resolved (or
13700 * tests/data/test-read-dwarf/test11-pr18828.so: New binary input.
13701 It comes from bug https://sourceware.org/bugzilla/show_bug.cgi?id=18828.
13702 * tests/data/test-read-dwarf/test11-pr18828.so.abi: The reference
13703 output for the binary above.
13704 * tests/data/Makefile.am: Add the test input files above to source
13706 * tests/test-read-dwarf.cc (in_out_specs): Add the test inputs
13707 above to the set of input this test harness has to run over.
13709 2015-08-15 Dodji Seketeli <dodji@redhat.com>
13711 Avoid declaring a type several times in the same TU in the XML format
13712 * src/abg-writer.cc (write_context::{record_type_id_as_emitted,
13713 record_type_as_emitted, type_id_is_emitted, type_is_emitted,
13714 clear_emitted_types_map}): New member functions.
13715 (write_context::m_emitted_type_id_map): New data member.
13716 (write_translation_unit): Clear the per-translation unit map of
13717 emitted types. Do not emit a type that has already been emitted
13718 in this translation unit.
13719 (write_namespace_decl): Do not emit a type that has already been
13720 emitted in this translation unit.
13721 (write_type_decl, write_qualified_type_def)
13722 (write_pointer_type_def, write_reference_type_def)
13723 (write_array_type_def, write_typedef_decl, write_class_decl)
13724 (write_type_tparameter, write_template_tparameter): Record the
13725 type we've just written as having been written out.
13726 * tests/data/test-read-dwarf/test9-pr18818-clang.so.abi: Adjust as
13727 duplicated declarations got removed.
13729 2015-08-14 Dodji Seketeli <dodji@redhat.com>
13731 Misc style fixes in the XMLABI writer
13732 * src/abg-writer.cc (write_context): Align data members.
13733 (write_translation_unit): Remove useless horizontal white spaces.
13734 (write_decl, write_qualified_type_def, write_pointer_type_def)
13735 (write_reference_type_def, write_array_type_def)
13736 (write_enum_type_decl, write_typedef_decl, write_class_decl)
13737 (write_type_tparameter): Use the *_sptr typedefs rather than the
13738 longer form of shared_ptr<sometype> in function signatures.
13739 (write_enum_type_decl): In this function in particular, indent a
13742 2015-08-14 Dodji Seketeli <dodji@redhat.com>
13744 Fix typos in abipkgdiff
13745 * tools/abipkgdiff.cc (display_usage): s/pompare/compare. Give a
13746 better help message for --help.
13747 (extract_rpm): Insert a space after the path of the package being
13748 extracted, when emitting a verbose message.
13750 2015-08-14 Dodji Seketeli <dodji@redhat.com>
13752 Install the manpage for abipkgdiff
13753 * doc/manuals/Makefile.am (section1_manpages): Add abipkgdiff.1 to
13754 the set of manpages to be install into section 1.
13756 2015-08-12 Dodji Seketeli <dodji@redhat.com>
13758 Bug 18818 - abidw aborts on a class with a non-complete base class
13759 * src/abg-dwarf-reader.cc
13760 (read_context::decl_only_classes_to_force_defined_map_): New data
13762 (read_context::declaration_only_classes_to_force_defined): New
13764 (read_context::schedule_declaration_only_class_for_forced_resolution):
13765 New member function.
13766 (build_class_type_and_add_to_ir): If a base class is a
13767 declaration-only class then mark it as needing to be force-defined
13768 *if* it's still not defined at the end of the abi corpus loading.
13769 (read_context::resolve_declaration_only_classes): If
13770 declaration-only classes that need to force-defined are present
13771 and not defined (when we reach the end of the ABI corpus) then
13772 force-define them as empty classes.
13773 * tests/data/test-read-dwarf/test10-pr18818-gcc.so: New test
13774 binary input file. This comes from a user binary submitted to bug
13775 https://sourceware.org/bugzilla/show_bug.cgi?id=18818. The
13776 original URL to the binary is
13777 https://sourceware.org/bugzilla/attachment.cgi?id=8518.
13778 * tests/data/test-read-dwarf/test9-pr18818-clang.so: New binary
13779 input file. This comes from the same bug report as above. The
13780 original URL to the binary is
13781 https://sourceware.org/bugzilla/attachment.cgi?id=8511.
13782 * tests/data/test-read-dwarf/test10-pr18818-gcc.so.abi: New
13783 reference output file.
13784 * tests/data/test-read-dwarf/test9-pr18818-clang.so.abi: Likewise.
13785 * tests/data/Makefile.am: Add the new files above to the source
13787 * tests/test-read-dwarf.cc (in_out_specs): Add the test inputs
13788 above the set of tests input this harness has to run over.
13790 2015-08-14 Dodji Seketeli <dodji@redhat.com>
13792 Update the abipkgdiff manual to say that .deb files are now supported
13793 * doc/manuals/abipkgdiff.rst: Say that .deb fiel are now supported
13796 2015-08-14 Dodji Seketeli <dodji@redhat.com>
13798 Update comment about the supported formats in abipkgdiff
13799 * tools/abipkgdiff.cc: Now that .deb packages are supported, say
13802 2015-08-14 Dodji Seketeli <dodji@redhat.com>
13804 Make the support of RPM and DEB package formats conditional
13805 * config.h.in: Define WITH_DEB and WITH_RPM pre-processor macros.
13806 * configure.ac: Add --enable-{rpm,deb} switches. Check for
13807 rpm2cpio and cpio programs, unless --disable-rpm was provided. If
13808 they are found and if --enable-rpm=auto was provided, then
13809 consider that --enable-rpm=yes was provided. In that case, set
13810 the WITH_RPM macro to 1. Otherwise, undefine that macro.
13811 Similarly, check for dpkg unless --disable-deb was provided. If
13812 it's found and if --enable-deb=auto was provided, consider that
13813 --enable-deb=yes was provided. In that case, set the WITH_DEB
13814 macro to 1. Otherwise, undefine that macro. Define the
13815 ENABLE_RPM and ENABLE_DEB conditional automake variables, if the
13816 rpm resp. deb support is enabled. Emit a notice about the rpm and
13817 deb features being enabled or not, at the end of the configure
13819 * tests/test-diff-pkg.cc: Include the config.h header.
13820 (in_out_spec): Guard rpm tests by the WITH_RPM macro. Similarly,
13821 guard deb tests by the WITH_DEB macro.
13822 * tools/abipkgdiff.cc: Include the config.h header.
13823 (extract_rpm): Guard this function definition with the WITH_RPM
13825 (extract_deb): Guard this function definition with the WITH_DEB
13827 (extract_package): Guard the handling of rpm packages with the
13828 WITH_RPM macro and the handling of deb package with the WITH_DEB
13829 macro. If a package not-support package format is encountered,
13830 emit an appropriate error message and error out.
13832 2015-08-07 Matthias Klose <doko@debian.org>
13834 Add support for .deb files to abipkgdiff
13835 * include/abg-tools-utils.h (file_type): Add FILE_TYPE_DEB.
13836 * tools/abipkgdiff.cc (extract_deb): New.
13837 (extract_package, main): Handle FILE_TYPE_DEB.
13838 * src/abg-tools-utils.cc (operator<<): Handle FILE_TYPE_DEB.
13839 (guess_file_type): Detect FILE_TYPE_DEB.
13840 * tools/abidiff.cc (main): Handle FILE_TYPE_DEB.
13841 * tools/abilint.cc (main): Handle FILE_TYPE_DEB.
13842 * tests/data/test-diff-pkg/libsigc++-2.0-0c2a-dbgsym_2.4.0-1_amd64.ddeb:
13843 Input debian debug info package; to be compared by the test
13844 harness runtestdiffpkg.
13845 * tests/data/test-diff-pkg/libsigc++-2.0-0c2a_2.4.0-1_amd64.deb:
13846 Input debian package; to be compared by the test harness
13848 * tests/data/test-diff-pkg/libsigc++-2.0-0v5-dbgsym_2.4.1-1ubuntu2_amd64.ddeb:
13849 Input debug info package
13850 * tests/data/test-diff-pkg/libsigc++-2.0-0v5_2.4.1-1ubuntu2_amd64.deb:
13851 Input debian package; to be compared by the test harness
13853 * tests/data/test-diff-pkg/libsigc++-2.0-0c2a_2.4.0-1_amd64--libsigc++-2.0-0v5_2.4.1-1ubuntu2_amd64-report-0.txt:
13854 Reference output for the comparison of the packages above.
13855 * tests/data/Makefile.am: Add the new files above to the source distribution.
13856 * tests/test-diff-pkg.cc (in_out_specs): Add the input packages
13857 above to the set of files to be compared by this test harness.
13859 2015-08-14 Dodji Seketeli <dodji@redhat.com>
13861 Add configure check for rm and mkdir used by abipkgdiff
13862 * configure.ac: Add configure checks for rm and mkdir used by
13865 2015-08-14 Dodji Seketeli <dodji@redhat.com>
13867 Fix a comment in configure.ac
13868 * configure.ac: Fix a comment.
13870 2015-08-14 Dodji Seketeli <dodji@redhat.com>
13872 Do not remove api and website source files by accident
13873 * doc/Makefile.am: Do not remove the entirety of the build dir of
13874 doxygen for the apidoc and the website as these can be also the
13875 source dirs. Rather, remove that is under the html/ sub-directory
13876 of the build dir, as this is always generated by doxygen.
13878 2015-08-13 Dodji Seketeli <dodji@redhat.com>
13880 Add an abipkgdiff --fail-no-dbg command line option
13881 * tools/abipkgdiff.cc (options::fail_if_no_debug_info): New data
13883 (options::options): Initialize it.
13884 (display_usage): Document it.
13885 (compare): If the user asked for it, fail if the we couldn't file
13886 the debug info for the corpus files being compared.
13888 2015-08-13 Dodji Seketeli <dodji@redhat.com>
13890 Add -h and -d option shortcuts to abidw
13891 * tools/abidw.cc (display_usage): Added a documentation string.
13892 (parse_command_line): Parse the new -h and -d shortcuts.
13893 * doc/manuals/abidw.rst: Update the manual.
13895 2015-08-13 Dodji Seketeli <dodji@redhat.com>
13897 Add a -h option shortcut to abidiff
13898 * tools/abidiff.cc (display_usage): Add documentation for the new
13900 (parse_command_line): Parse the -h option.
13901 * doc/manuals/abidiff.rst: Update the manual.
13903 2015-08-13 Dodji Seketeli <dodji@redhat.com>
13905 Add a -h shortcup to abipkgdiff --help
13906 * tools/abipkgdiff.cc (display_usage): Document the -h shortcut.
13907 (parse_command_line): Parse the -h shortcut to --help.
13909 2015-08-09 Dodji Seketeli <dodji@redhat.com>
13911 Bug 18791 - libabigail fails to read the output of abidw
13912 * src/abg-reader.cc (read_context::get_scope_for_node): Take an
13913 access_specifier output parameter to set the access specifier of
13914 the current node in its scope. Update the function to set the
13916 (read_context::build_or_get_type_decl): Adjust to set the access
13917 specifier of the type we are building, in case it's a member type.
13918 * tests/data/test-abidiff/test-PR18791-v{0,1}.so.abi: New test input files.
13919 * tests/data/test-abidiff/test-PR18791-report0.txt: New test
13921 * tests/data/Makefile.am: Add the new test material to the source
13923 * tests/test-abidiff.cc (specs): Add the new test inputs to the set of
13924 input files this test harness has to run over.
13926 2015-08-09 Dodji Seketeli <dodji@redhat.com>
13928 Fix a thinko in language support de-serialization
13929 * src/abg-ir.cc (string_to_translation_unit_language): Fix
13930 thinko. What was I thinking ...
13932 2015-08-06 Dodji Seketeli <dodji@redhat.com>
13934 Add --no-added-syms to abipkgdiff
13935 * tools/abipkgdiff.cc (options::show_added_syms): New data member.
13936 (options::options): Initialize it.
13937 (parse_command_line): Parse the new --no-added-syms option and set
13938 the options::show_added_syms flag accordingly.
13939 (display_usage): Add a help string for the new option.
13940 (set_diff_context_from_opts): Set the diff context according to
13941 the state of the new options::show_added_syms flag.
13942 * doc/manuals/abipkgdiff.rst: Add manual entry for the new
13943 --no-added-syms options.
13944 * tests/data/test-diff-pkg/test-rpm-report-5.txt: New test
13945 reference input file.
13946 * tests/data/Makefile.am: Add the new file above to source
13948 * tests/test-diff-pkg.cc (InOutSpec::prog_options): New data
13950 (in_out_specs): Adjust. Add a new input to run the test again
13951 with --no-added-syms.
13952 (main): Adjust to pass the program options contained in
13953 InOutSpec::prog_options to abipkgdiff.
13954 fixup! Add --no-added-syms to abipkgdiff
13956 2015-08-06 Dodji Seketeli <dodji@redhat.com>
13958 Update diff stats when added symbols are removed from change report
13959 * include/abg-comparison.h (diff_context_wptr)
13960 (corpus_diff::diff_stats_sptr): New typedefs.
13961 (corpus_diff::diff_stats::diff_stats): Make this constructor take
13962 a diff_context_sptr. Make the default constructor private.
13963 * src/abg-comparison.cc (corpus_diff::diff_stats::priv::ctxt_):
13964 New data member. This is a weak pointer to a diff_context.
13965 (corpus_diff::diff_stats::priv::priv): Take a diff_context_sptr
13966 and initialize the weak pointer ctxt_ to it.
13967 (corpus_diff::diff_stats::priv::ctxt): New accessor to the
13968 diff_context hold by the diff_stats.
13969 (corpus_diff::diff_stats::{num_removed_func_filtered_out,
13970 num_added_func_filtered_out, num_removed_vars_filtered_out,
13971 num_added_vars_filtered_out, num_removed_func_syms_filtered_out,
13972 num_added_func_syms_filtered_out,
13973 num_removed_var_syms_filtered_out,
13974 num_added_var_syms_filtered_out}): If the user asked for the added
13975 [or removed] variables/functions/symbols to be ignored, the
13976 accessors for the number of filtered added/removed variables/functions/symbols
13977 return the total number of added/removed
13978 variables/functions/symbols; that is, say that *all* added/removed
13979 variables/functions/symbols got filtered out.
13980 (corpus_diff::priv::diff_stats_): Turn this data member into a
13981 [shared] pointer to diff_stats.
13982 (corpus_diff::priv::filters_and_suppr_applied_): Remove this data
13983 member. Now that diff_stats_ is a pointer, we don't need this
13985 (corpus_diff::apply_filters_and_suppressions_before_reporting):
13986 Adjust to the fact that filters_and_suppr_applied_ is gone, and
13987 that diff_stats_ is now a pointer.
13988 (corpus_diff::report): Control un-referenced added symbols
13990 diff_context::show_added_symbols_unreferenced_by_debug_info()
13992 2015-07-31 Dodji Seketeli <dodji@redhat.com>
13994 Make applying supp specs through pointer access look through typedefs
13995 * include/abg-comparison.h (type_suppression::suppresses_type):
13996 Declare new member function.
13997 (get_typedef_diff_underlying_type_diff): Declare new function.
13998 * include/abg-fwd.h (get_typedef_underlying_type): Likewise.
13999 * src/abg-comparison.cc (type_suppression::suppresses_type):
14000 Define new member function.
14001 (get_typedef_diff_underlying_type_diff): Define new function.
14002 (type_suppression::suppresses_diff): After looking through the
14003 different kind of access methods, use the new
14004 type_suppression::suppresses_type(), rather than doing lots of
14005 stuff ourselves here. But then, if the suppression doesn't apply
14006 to the subjects of the diff, look through typedefs and try to
14007 apply the suppression again.
14008 * src/abg-ir.cc (get_typedef_underlying_type): Define new
14010 * tests/data/test-diff-suppr/libtest25-typedef-v{0,1}.so: New
14011 binary test input files.
14012 * tests/data/test-diff-suppr/test25-typedef-v{0,1}.c: Source code
14013 for the binary test input files above.
14014 * tests/data/test-diff-suppr/test25-typedef-report-{0, 1}.txt: New test
14016 * tests/data/test-diff-suppr/test25-typedef-suppr-0.txt: New test
14018 * tests/data/Makefile.am: Add the new test material to the source
14020 * tests/test-diff-suppr.cc (in_out_specs): Add the test inputs
14021 above to the set of test inputs this harness has to run over.
14023 2015-07-24 Dodji Seketeli <dodji@redhat.com>
14025 Make abipkgdiff erase the *parent* directory of temporary files
14026 * tools/abipkgdiff.cc
14027 (erase_created_temporary_directories_parent): New static function.
14028 (compare): After comparison, erase the temporary parent directory
14031 2015-07-24 Dodji Seketeli <dodji@redhat.com>
14033 Make the name of the removed variable section be consistent
14034 * src/abg-comparison.cc (corpus_diff::report): Introduce the
14035 section of removed variables with the string "Removed variable",
14036 rather than with the string "Deleted variable".
14037 * tests/data/test-abicompat/test2-var-removed-report-0.txt: Adjust.
14038 * tests/data/test-diff-suppr/test18-suppr-removed-var-report-0.txt: Likewise.
14039 * tests/data/test-diff-suppr/test18-suppr-removed-var-report-3.txt: Likewise.
14040 * tests/data/test-diff-suppr/test18-suppr-removed-var-report-5.txt: Likewise.
14042 2015-07-24 Dodji Seketeli <dodji@redhat.com>
14044 Consider default symbol versions when computing added/removed fns/vars
14045 * include/abg-corpus.h (corpus::{lookup_function_symbol,
14046 lookup_variable_symbol}): Take a elf_symbol::version object,
14047 rather than a string representing the version. Add an overload
14048 that takes an elf_symbol.
14049 * src/abg-corpus.cc (find_symbol_by_version): New static function.
14050 (corpus::{lookup_function_symbol, lookup_variable_symbol}): Take a
14051 elf_symbol::version object, rather than a string representing the
14052 version. Add an overload that takes an elf_symbol. If the looked
14053 up symbol has no version and if the corpus contains a symbol with
14054 the same name and with a default version, then return that latter
14055 symbol if the corpus doesn't contain a symbol with the same name
14057 * src/abg-comparison.cc
14058 (class_diff::ensure_lookup_tables_populated): Adjust.
14059 (corpus_diff::priv::ensure_lookup_tables_populated): Before
14060 deciding that a symbol has been added, if the symbol has a default
14061 version, make sure no symbol with the same name and without
14062 version was present in the former corpus. Similarly, before
14063 deciding that a symbol has been removed, if the symbol has no
14064 version, make sure the latter corpus has no symbol with the same
14065 name and with a default version.
14066 * tests/data/test-diff-dwarf/test12-report.txt: Adjust. The
14067 function should not be considered as added, because its symbol
14068 (and version) was already present in the former DSO.
14070 2015-07-24 Dodji Seketeli <dodji@redhat.com>
14072 Fix a thinko in removed variables detection
14073 * src/abg-comparison.cc
14074 (corpus_diff::priv::ensure_lookup_tables_populated): Once we have
14075 computed a set of potentially deleted variables that turned out to
14076 contain variables that were actually *NOT* deleted, really take
14077 these into account by removing these false positives from the set
14078 of deleted *variables*. We were trying to delete these from the
14079 set deleted *functions*; woops, I guess this was a copy & paste
14082 2015-07-24 Dodji Seketeli <dodji@redhat.com>
14084 Fix logic of type_has_non_canonicalized_subtype()
14085 * src/abg-ir.cc (type_has_non_canonicalized_subtype): Once the
14086 type has been traversed, just test if the visitor has accumulated
14087 the 'has_non_canonical_type' property.
14089 2015-07-24 Dodji Seketeli <dodji@redhat.com>
14092 * include/abg-ir.h (struct ir_node_visitor): Fix the wording of
14093 the comment of this type.
14094 * src/abg-dwarf-reader.cc (build_ir_node_from_die): Fix the
14095 filling of the text of the comment of the code that chooses to
14096 perform early canonicalizing.
14098 2015-07-24 Dodji Seketeli <dodji@redhat.com>
14100 Adding member type doesn't reset declaration-only-ness of a class
14101 * src/abg-dwarf-reader.cc (build_class_type_and_add_to_ir):
14102 Adding a new member type shouldn't remove the
14103 declaration-only-ness of the class.
14105 2015-07-22 Dodji Seketeli <dodji@redhat.com>
14107 Extract all packages for a given run of abipkgdiff under the same temp dir
14108 * tools/abipkgdiff.cc (package::{<all data members>}): Make the
14109 data members be private. Make their names end with an underscore.
14110 (package::extracted_package_parent_dir_path): Remove.
14111 (package::extracted_package_dir_path): Rename into
14112 package::extracted_dir_path_.
14113 (package::extracted_packages_parent_dir): New static member
14114 function, accessor.
14115 (package::package): Adjust to the new names of the data members.
14116 Call the new package::extracted_package_parent_dir() static member
14117 function to initial the package::extracted_dir_path_ data member.
14118 (package::{path, extracted_dir_path, type, is_debug,
14119 path_elf_file_sptr_map, debug_info_package}): New accessors for
14121 (package::{erase_extraction_directory,
14122 erase_extraction_directories}): Adjust.
14123 (erase_created_temporary_directories)
14124 (create_maps_of_package_content)
14125 (extract_package_and_map_its_content, prepare_packages, compare)
14128 2015-07-22 Dodji Seketeli <dodji@redhat.com>
14130 Add a --keep-tmp-files option to abipkgidff
14131 * tools/abipkgdiff.cc (options::keep_tmp_files): New data member.
14132 (options::options): Initialize it.
14133 (display_usage): Display a usage string for the new
14134 --keep-tmp-files option.
14135 (parse_command_line): Parse the new --keep-tmp-files option.
14136 (compare): Do not erase temporary directories if the users asked so.
14137 * doc/manuals/abipkgdiff.rst: Document the new --keep-tmp-files
14140 2015-07-21 Dodji Seketeli <dodji@redhat.com>
14142 Show linkage names in abipkgdiff output
14143 * doc/manuals/abipkgdiff.rst: Document the new --no-linkage-name
14145 * tools/abipkgdiff.cc (options::show_linkage_names): New data
14147 (options::options): Initialize it.
14148 (display_usage): Display a usage string for --no-linkage-name.
14149 (parse_command_line): Parse the --no-linkage-name option.
14150 (set_diff_context_from_opts): Set the diff context accordingly.
14151 * tests/data/test-diff-pkg/test-rpm-report-0.txt: Adjust.
14153 2015-07-21 Dodji Seketeli <dodji@redhat.com>
14155 Add --no-added-binaries to abipkgdiff
14156 * tools/abipkgdiff.cc (options::show_added_binaries): New data
14158 (options::options): Initialize it.
14159 (display_usage): Add a help string for --no-added-binaries.
14160 (parse_command_line): Parse the new --no-added-binaries option.
14161 (compare): Do not show added binaries if the user doesn't want to.
14162 * doc/manuals/abipkgdiff.rst: Document the new --no-added-binaries
14165 2015-07-21 Dodji Seketeli <dodji@redhat.com>
14167 make abipkgdiff return a proper exit code
14168 * tools/abipkgdiff.cc (compare): Return an instance
14169 abigail::tools_utils::abidiff_status, just like what we do in
14171 * doc/manuals/abipkgdiff.rst: Document the new exit code.
14173 2015-07-21 Dodji Seketeli <dodji@redhat.com>
14175 Fix logic of determining if changes happened in abidiff
14176 * tools/abidiff.cc (main): Simplify the logic when determining if
14177 the comparison between two corpora yields worthwhile changes.
14179 2015-07-21 Dodji Seketeli <dodji@redhat.com>
14181 Add a new corpus_diff::has_net_changes() entry point
14182 * include/abg-comparison.h (corpus_diff::has_net_changes): Declare
14183 new member function.
14184 * src/abg-comparison.cc (corpus_diff::has_net_changes): Define it.
14186 2015-07-20 Dodji Seketeli <dodji@redhat.com>
14188 Fix type synthesis to fix abicompat weak mode
14189 * include/abg-fwd.h
14190 (synthesize_type_from_translation_unit): Declare new function.
14191 (synthesize_function_type_from_translation_unit): Make the
14192 translation_unit parameter non-const because the function needs to
14193 bind the life time of the synthesized function to the life time of
14194 the translation unit. Make this function be a friend of
14195 abigail::ir::translation_unit.
14196 (synthesize_function_type_from_translation_unit):
14197 * src/abg-ir.cc (translation_unit::priv::synthesized_types_): New
14199 (synthesize_type_from_translation_unit): Define new function.
14200 (synthesize_function_type_from_translation_unit): Make the
14201 translation_unit parameter non-const. If the return is void, then
14202 take that in account carefuly. Rather than just looking up the
14203 type of parameters and return value, synthesize them too,
14204 especially when they are qualified types. Bind the life time of
14205 the synthesized function type to the lifetime of the translation
14207 * tests/data/test-abicompat/test7-fn-changed-report-1.txt: New
14208 test reference output.
14209 * tests/test-abicompat.cc (in_out_spec): Run the harness on the
14210 exisiting test7-fn-changed-app and libtest7-fn-changed-libapp-v1
14211 but in weak mode this time.
14213 2015-07-20 Dodji Seketeli <dodji@redhat.com>
14215 Clean up the output of abicompat weak mode
14216 * tools/abicompat.cc (perform_compat_check_in_weak_mode): Remove
14217 disgracious vertical spaces in the wording.
14218 * tests/data/test-abicompat/test5-fn-changed-report-0.txt: Adjust.
14219 * tests/data/test-abicompat/test6-var-changed-report-0.txt: Adjust.
14221 2015-07-20 Sinny Kumari <sinny@redhat.com>
14223 Display --suppressions|--suppr option in help usage
14224 * tools/abipkgdiff.cc (display_usage): Print
14225 --suppressions|--suppr <path> option in help usage
14227 2015-07-20 Dodji Seketeli <dodji@redhat.com>
14229 Fix computing the set of exported functions and varible symbols
14230 * src/abg-ir.cc (elf_symbol::get_name_and_version_from_id): Always
14231 set the version and name of the symbol.
14232 * src/abg-corpus.cc
14233 (corpus::exported_decls_builder::{keep_wrt_id_of_fns_to_keep,
14234 keep_wrt_id_of_vars_to_keep}): Reset the symbol name *and* version
14235 before passing it. This is redundant with the fix in
14236 elf_symbol::get_name_and_version_from_id() that always set the
14237 symbol name and version now, but I felt it makes it easier to
14238 understand the fix overall.
14239 * tests/data/test-abicompat/libtest7-fn-changed-libapp-v{0,1}.so:
14240 New test input binaries.
14241 * tests/data/test-abicompat/test7-fn-changed-app: Likewise.
14242 * tests/data/test-abicompat/test7-fn-changed-{app, libapp-v0,
14243 libapp-v1}.c: Source code of the binary test inputs above.
14244 * * tests/data/test-abicompat/test7-fn-changed-{libapp-v0,
14245 libapp-v1}.h: Likewise.
14246 * tests/data/test-abicompat/test7-fn-changed-report-0.txt: Test
14248 * tests/data/Makefile.am: Add the new test material above to
14249 source distribution.
14250 * tests/test-abicompat.cc (int_out_specs): Add the test inputs
14251 above to the set of inputs this test harness has to run over.
14253 2015-07-20 Dodji Seketeli <dodji@redhat.com>
14255 Fix the wording of description of abipkgdiff.cc again
14256 * tools/abipkgdiff.cc: Fix the wording again.
14258 2015-07-20 Dodji Seketeli <dodji@redhat.com>
14260 Remove use of tmpnam from abilint
14261 * include/abg-tools-utils.h (abigail::tools_utils::temp_file):
14263 (abigail::tools_utils::temp_file_sptr): New typedef.
14264 * src/abg-tools-utils.cc (temp_file::priv): Define new type.
14265 (temp_file::{temp_file, is_good, get_path, get_stream, create}):
14266 Define new member functions.
14267 * tools/abilint.cc (main): Do not use tmpnam anymore. Use the new
14268 abigail::tools_utils::temp_file type instead.
14270 2015-07-20 Dodji Seketeli <dodji@redhat.com>
14272 Try to avoid a race condition when abipkgdiff extracts packages.
14273 * include/abg-tools-utils.h (get_random_number)
14274 (get_random_number_as_string): Declare new functions.
14275 * src/abg-tools-utils.cc (get_random_number)
14276 (get_random_number_as_string): Define them.
14277 * tools/abipkgdiff.cc
14278 (package::extracted_package_parent_dir_path): New data member.
14279 (package::package): Initialize
14280 package::extracted_package_parent_dir_path to
14281 <tmpdir>/<randomname>, with randomname being a random number
14282 represented as a string.
14283 (extract_rpm): Make sure to create a hierarchy of directories, not
14286 2015-07-19 Dodji Seketeli <dodji@redhat.com>
14288 Fix the wording of the description of the abipkgdiff.cc file
14289 * tools/abipkgdiff.cc: Fix the wording of the description.
14291 2015-07-19 Dodji Seketeli <dodji@redhat.com>
14293 Fix the --suppressions manual doc for abidiff
14294 * doc/manuals/abidiff.rst: Talk about the --suppr shortcut of the
14295 --suppressions option.
14297 2015-07-19 Dodji Seketeli <dodji@redhat.com>
14299 On changed fn, show symbol info when name is different from linkage name in C
14300 * include/abg-ir.h (translation_unit::language): New enum type.
14301 (translation_unit::{get_language, set_language}): Declare new
14303 (translation_unit_language_to_string)
14304 (string_to_translation_unit_language, is_c_language)
14305 (is_cplus_plus_language): Declare new functions.
14306 * src/abg-ir.cc (translation_unit::priv::language_): New data
14308 (translation_unit::priv::language_): Initialize it.
14309 (translation_unit::{set_language, get_language}): Define new
14311 (translation_unit_language_to_string)
14312 (string_to_translation_unit_language, is_c_language)
14313 (is_cplus_plus_language): Define new functions.
14314 * src/abg-dwarf-reader.cc (dwarf_language_to_tu_language): New
14316 (build_translation_unit_and_add_to_ir): Read the language of the
14318 * src/abg-comparison.cc (corpus_diff::report): When reporting a
14319 change in a function sub-type, if we are in C language translation
14320 unit, if the function name is different from its linkage name,
14321 even if the symbol doesn't have any alias, show symbol
14323 * src/abg-reader.cc (read_translation_unit_from_input): Read the
14324 'language' property of the translation unit, if present.
14325 * src/abg-writer.cc (write_translation_unit): Write the 'language'
14326 property to the translation unit, if present.
14327 * tests/data/test-read-dwarf/test0.abi: Adjust for the new
14328 'language' property of the 'abi-instr' element.
14329 * tests/data/test-read-dwarf/test1.abi: Likewise.
14330 * tests/data/test-read-dwarf/test2.so.abi: Likewise.
14331 * tests/data/test-read-dwarf/test3.so.abi: Likewise.
14332 * tests/data/test-read-dwarf/test4.so.abi: Likewise.
14333 * tests/data/test-read-dwarf/test5.o.abi: Likewise.
14334 * tests/data/test-read-dwarf/test6.so.abi: Likewise.
14335 * tests/data/test-read-dwarf/test7.so.abi: Likewise.
14336 * tests/data/test-read-dwarf/test8-qualified-this-pointer.so.abi:
14339 2015-07-19 Dodji Seketeli <dodji@redhat.com>
14341 Add --suppressions to abipkgdiff
14342 * tools/abipkgdiff.cc (options::suppressions): New data member.
14343 (set_diff_context_from_opts): Set the suppression specifications
14344 provided by the user to the diff context.
14345 (parse_command_line): Parse the --suppressions and --suppr command
14347 * doc/manuals/abipkgdiff.rst: Document the --suppressions and
14350 2015-07-18 Dodji Seketeli <dodji@redhat.com>
14352 Support file_name_regexp and soname_regexp in supp-specs
14353 * include/abg-comparison.h (suppression_base::priv_): Make this
14354 pimpl member protected.
14355 (suppression_base::set_file_name_regex_str)
14356 (get_file_name_regex_str, get_soname_regex_str)
14357 (set_soname_regex_str): Declare new accessors.
14358 (function_suppression::{suppresses_function,
14359 suppresses_function_symbol}): Take a diff_context_sptr.
14360 (variable_suppression::{suppresses_variable,
14361 suppresses_variable_symbol}): Take a diff_context_sptr.
14362 * src/abg-comparison.cc
14363 (suppression_base::priv::{file_name_regex_str_, file_name_regex_,
14364 soname_regex_str_, soname_regex_}): Define new data members.
14365 (suppression_base::priv::get_file_name_regex_str)
14366 (get_soname_regex_str): Define new member functions.
14367 (suppression_base::set_file_name_regex_str)
14368 (get_file_name_regex_str, get_soname_regex_str)
14369 (set_soname_regex_str): Define new accessors.
14370 (type_suppression::suppresses_diff): Evaluate file_name_regexp and
14372 (read_type_suppression): Fix the reading of the "label" property.
14373 Read the file_name_regexp and soname_regexp properties.
14374 (function_suppression::{suppresses_function,
14375 suppresses_function_symbol): Take a diff_context_sptr parameter.
14376 Evaluate file_name_regexp and soname_regexp properties.
14377 (function_suppression::suppresses_diff): Adjust for the api change
14378 of function_suppression::suppresses_function().
14379 (read_function_suppression): Read the file_name_regexp and
14380 soname_regexp properties.
14381 (variable_suppression::suppresses_variable): Take a
14382 diff_context_sptr parameter and evaluate file_name_regexp and
14383 soname_regexp properties.
14384 (variable_suppression::suppresses_variable_symbol): Likewise.
14385 (variable_suppression::suppresses_diff): Adjust for the api change
14386 of variable_suppression::suppresses_variable().
14387 (read_variable_suppression): Read the file_name_regexp and
14388 soname_regexp properties.
14389 (function_is_suppressed, variable_is_suppressed): Take a
14390 diff_context_sptr parameter.
14391 (corpus_diff::priv::apply_suppressions_to_added_removed_fns_vars):
14393 * doc/manuals/libabigail-concepts.rst: Document file_name_regexp
14394 and soname_regexp in the manual.
14395 * tests/data/test-diff-suppr/libtest24-soname-v{0,1}.so: New test
14396 binary input files.
14397 * tests/data/test-diff-suppr/test24-soname-report-{0,4}.txt: New
14399 * tests/data/test-diff-suppr/test24-soname-suppr-{0,4}.txt:
14401 * tests/data/test-diff-suppr/test24-soname-v{0,1}.cc: Source code
14402 of the binary test input files above.
14403 * tests/data/Makefile.am: Add the new test material above to
14404 source distribution.
14405 * tests/test-diff-suppr.cc (in_out_spec): Add the new test inputs
14406 to the set of tests this harness has to run over.
14408 2015-07-18 Dodji Seketeli <dodji@redhat.com>
14410 Fix possible crash in suppression evaluation
14411 * src/abg-comparison.cc (type_suppression::suppresses_diff): When
14412 evaluating the reach_kind property, do not crash on diff nodes
14413 that are pointer_diff or reference_diff to something else but a
14416 2015-07-17 Dodji Seketeli <dodji@redhat.com>
14418 Fix '--' being rendered as '-' in html manuals
14419 * doc/manuals/abicompat.rst: Quote options as verbatim.
14420 * doc/manuals/abidiff.rst: Likewise.
14421 * doc/manuals/abidw.rst: Likewise.
14422 * doc/manuals/abilint.rst: Likewise.
14423 * doc/manuals/abipkgdiff.rst: Likewise.
14425 2015-07-17 Dodji Seketeli <dodji@redhat.com>
14427 Fix the --verbose option
14428 * tools/abipkgdiff.cc (compare): In the elf_file overload, do not
14429 emit an error message when a binary could not be analyzed unless
14430 --verbose was provided.
14432 2015-07-16 Dodji Seketeli <dodji@redhat.com>
14434 Cleanup the output for added/removed binaries
14435 * tools/abipkgdiff.cc (compare): In the overload for packages,
14436 indent the content of the "Removed binaries" and "Added binaries"
14439 2015-07-16 Dodji Seketeli <dodji@redhat.com>
14441 Avoid redundant diff report messages by default.
14442 * tools/abipkgdiff.cc (options::show_redundant_changes): New data
14444 (options::options): Initialize it.
14445 (display_usage): Add a help string for the --redundant command
14447 (set_diff_context_from_opts): New static function.
14448 (compare): Take the options variable. Set the diff context from
14449 the options, especially if we should show redundant changes or
14450 not. Use that diff context when comparing ABIs.
14451 (parse_command_line): Parse the new --redundant command line
14453 * doc/manuals/abipkgdiff.rst: Document the new --redundant option.
14455 2015-07-16 Dodji Seketeli <dodji@redhat.com>
14457 Support comparing only shared libraries
14458 * tools/abipkgdiff.cc (options::compare_dso_only): New data
14460 (options::options): Initialize it.
14461 (display_usage): Display a little help string for it.
14462 (create_maps_of_package_content): Take the option variable. Do
14463 not compare non-dso files if the --dso-only option was provided.
14464 (extract_package_and_map_its_content, prepare_packages, compare):
14465 Take the option variable.
14466 (parse_command_line): Parse the new --dso-only option.
14467 * doc/manuals/abipkgdiff.rst: Add documentation for the new
14470 2015-07-15 Dodji Seketeli <dodji@redhat.com>
14472 Comment functions and types of abipkgdiff
14473 * src/abg-dwarf-reader.cc (get_soname_of_elf_file): Better wording
14474 of the apidoc of this function.
14475 * tools/abipkgdiff.cc (verbose, elf_file_paths): Add apidoc for
14476 these global variables.
14477 (struct options, ): Add apidoc for these types.
14478 (options::{erase_extraction_directory,
14479 erase_extraction_directories}, display_usage, extract_rpm)
14480 (erase_created_temporary_directories, extract_package)
14481 (file_tree_walker_callback_fn, compare)
14482 (create_maps_of_package_content)
14483 (extract_package_and_map_its_content, prepare_packages, compare)
14484 (parse_command_line): Add apidoc for these functions.
14486 2015-07-16 Sinny Kumari <sinny@redhat.com>
14488 Add regression tests for abipkgdiff tool
14489 * tests/Makefile.am: Build new runtestdiffpkg regression test
14490 * tests/data/Makefile.am: Add new test files to source
14491 * tests/data/test-diff-pkg/dbus-glib-0.104-3.fc23.x86_64.rpm:
14492 Test data for abipkgdiff tool
14493 * tests/data/test-diff-pkg/dbus-glib-0.80-3.fc12.x86_64.rpm: Likewise
14494 * tests/data/test-diff-pkg/dbus-glib-debuginfo-0.104-3.fc23.x86_64.rpm:
14496 * tests/data/test-diff-pkg/dbus-glib-debuginfo-0.80-3.fc12.x86_64.rpm:
14498 * tests/data/test-diff-pkg/test-rpm-report-0.txt: Expected test output
14499 * tests/data/test-diff-pkg/test-rpm-report-1.txt: Likewise
14500 * tests/data/test-diff-pkg/test-rpm-report-2.txt: Likewise
14501 * tests/data/test-diff-pkg/test-rpm-report-3.txt: Likewise
14502 * tests/data/test-diff-pkg/test-rpm-report-4.txt: Likewise
14503 * tests/test-diff-pkg.cc: New file
14505 2015-07-15 Dodji Seketeli <dodji@redhat.com>
14507 Add a manual for abipkgidiff
14508 * doc/manuals/abipkgdiff.rst: New manual file.
14509 * doc/manuals/libabigail-tools.rst: Refer to the manual for
14511 * doc/manuals/Makefile.am: Add the new manual file to source
14513 * doc/manuals/conf.py: Add the manual for abipkgdiff to section 1.
14515 2015-07-15 Dodji Seketeli <dodji@redhat.com>
14517 Comment functions and types of abipkgdiff
14518 * src/abg-dwarf-reader.cc (get_soname_of_elf_file): Better wording
14519 of the apidoc of this function.
14520 * tools/abipkgdiff.cc (verbose, elf_file_paths): Add apidoc for
14521 these global variables.
14522 (struct options, ): Add apidoc for these types.
14523 (options::{erase_extraction_directory,
14524 erase_extraction_directories}, display_usage, extract_rpm)
14525 (erase_created_temporary_directories, extract_package)
14526 (file_tree_walker_callback_fn, compare)
14527 (create_maps_of_package_content)
14528 (extract_package_and_map_its_content, prepare_packages, compare)
14529 (parse_command_line): Add apidoc for these functions.
14531 2015-07-15 Dodji Seketeli <dodji@redhat.com>
14533 Various style fixes
14534 * abipkgdiff.cc (get_soname_of_elf_file): Fix spacing.
14535 * tools/abipkgdiff.cc (elf_file_paths): Make this global variable
14537 (extract_rpm): Rename parameter pkg_path name into package_path.
14539 2015-07-15 Dodji Seketeli <dodji@redhat.com>
14541 Remove the last direct fiddling with ELF from abipkgdiff.cc
14542 * abg-dwarf-reader.h (enum elf_type): Move this declaration here
14543 from abipkgdiff.cc to here.
14544 (get_type_of_elf_file): Declare this new function.
14545 (get_soname_from_elf): Change this to take a path to the elf file
14546 rather than a Elf* handler. So now to use this, the user doesn't
14547 have to get her hand dirty with elfutils.
14548 * src/abg-dwarf-reader.cc (get_soname_from_elf): Change this to
14549 take a path to the elf file rather than a Elf* handler.
14550 (elf_file_type): Move this static function here, from
14552 (get_type_of_elf_file): New function. This has been factorized
14553 out of create_maps_of_package_content() in abipkgdiff.cc.
14554 * tools/abipkgdiff.cc (class elf_file): Changed struct elf_file
14555 into this. Make the default constructor private.
14556 (elf_file::elf_file): Change the constructor to just take the path
14557 to the elf_file. The base name, soname and elf file type are now
14558 computed from the path file, in the constructor. This makes
14559 instantiation much much easier from the point of view of the user
14561 (struct abi_diff): Renamed struct abi_changes into this.
14562 (abi_diff::has_changes): Define new member function.
14563 (abi_diffs): Remove this global variable.
14564 (package::package): Remove the elf file type from the set of
14565 parameters of this constructor. Rather, compute that elf file
14566 type from the path to the elf file, in the constructor. Again,
14567 this eases the use of the type.
14568 (elf_file_type): Remove this from here, as it got moved to
14569 abg-dwarf-reader.cc.
14570 (compare): In the elf_file overload, return true if the comparison
14571 yields ABI changes.
14572 (create_maps_of_package_content): Do not fiddle with elfutils
14573 stuff here. Rather, just instantiate elf_file and the analyzing
14574 of the file magically happens.
14575 (compare): Make the package overload take an abi_diff as output
14576 parameter, rather than populating a global variable in return.
14577 (compare): Add an other overload for package that doesn't take the
14578 abi_diff as output parameter and write it in terms of the previous
14580 (main): Adjust as the instantiation of package is now simpler.
14582 2015-07-08 Dodji Seketeli <dodji@redhat.com>
14584 Add a --verbose option to abipkgdiff
14585 * tools/abipkgdiff.cc (verbose): Add a new global variable.
14586 (package::erase_extraction_directory, extract_rpm, compare)
14587 (create_maps_of_package_content): Emit verbose information.
14588 (parse_command_line): Parse the --verbose option.
14590 2015-07-08 Dodji Seketeli <dodji@redhat.com>
14592 Use the library to implement ABI comparison in abipkgdiff
14593 * tools/abipkgdiff.cc (compare): In the overload for elf_file, use
14594 abigail::comparison::compute_diff() to compare the ABI of two
14595 corpora. The corpora themselves is read using
14596 abigail::dwarf_reader::read_corpus_from_elf(). This cleans up the
14597 output of the tool because nothing is emitted to standard output
14598 if the two ABI corpora compares equal.
14600 2015-07-08 Dodji Seketeli <dodji@redhat.com>
14602 Fix several string passing issues in abipkgdiff.cc
14603 * tools/abipkgdiff.cc (elf_file::elf_file): Pass the strings by
14604 reference. Also, change the order of the parameters; all the
14605 strings are passed first, then the elf_type is passed last.
14606 (package::package): Likewise, pass the strings by reference, not
14608 (create_maps_of_package_content): Adjust for the change in
14609 parameters order of elf_file::elf_file.
14611 2015-07-08 Dodji Seketeli <dodji@redhat.com>
14613 Only try to compare DSOs or executable binaries in abipkgdiff
14614 * tools/abipkgdiff.cc (compare): In the overload for packages,
14615 only compare binaries that are DSO or executable.
14617 2015-07-08 Dodji Seketeli <dodji@redhat.com>
14619 Avoid flushing the output stream in abipkgdiff.cc
14620 * tools/abipkgdiff.cc (extract_package)
14621 (create_maps_of_package_content, compare, main): Avoid flushing
14622 the output stream arbitrarily.
14624 2015-07-08 Sinny Kumari <sinny@redhat.com>
14626 Move get_soname() function to abg-dwarf-reader.h/cc
14627 * include/abg-dwarf-reader.h (get_soname_from_elf): Declare
14629 * src/abg-dwarf-reader.cc (get_soname_from_elf): Define new
14631 * tools/abipkgdiff.cc (get_soname): Remove function
14632 (pkg_diff): Call get_soname_from_elf() instead of get_soname()
14634 2015-07-07 Dodji Seketeli <dodji@redhat.com>
14636 Important organizational changes in abipkgdiff.cc
14637 * Avoid using shortened names when the line is not too long.
14638 * Use shared_ptr when possible.
14639 * When a function parameter is not meant to be nil, do not pass it
14640 as a pointer; rather, pass it as a reference.
14641 * Avoid doing things that can "fail" in a destructor; e.g, spawning
14642 a process. Also, it's not common practise to cleanup a resource in a
14643 type destructor, when that resource has not been created in one of the
14644 member functions of the type. It eases maintenance when resource
14645 creation and cleanup is performed at the same logical level.
14646 * tools/abipkgdiff.cc (option::package{1,2}): Rename
14647 option::pkg{1,2} into this, to increase legibility.
14648 (option::debug_package{1,2}): Likewise, rename
14649 option::debug_pkg{1,2} into this.
14650 (elf_file::~elf_file): Do not "delete this" in a destructor. This
14651 leads to double free. It's when someone invokes the "delete"
14652 operator on a pointer to the object that the destructor of the
14653 object is executed automatically; so if in the destructor the
14654 delete operator is called again, bad things are going to happen.
14655 As the destructor is now empty, remove it altogether.
14656 (elf_file_sptr): New typedef for shared_ptr<elf_file>.
14657 (package::path): Rename package::pkg_path into this, for better
14659 (package::extracted_package_dir_path): Rename
14660 package::extracted_pkg_dir_path into this.
14661 (package::type): Rename package::pkg_type into this.
14662 (package::is_debug_info): Rename package::is_debuginfo_pkg into
14664 (package::path_elf_file_sptr_map): Rename
14665 package::dir_elf_files_map into this because this is a map of
14666 path -> elf_file_sptr. Also, now the value of the map element is
14667 a elf_file_sptr, no more an elf_file*.
14668 (package::debug_info_package): Rename package::debuginfo_pkg into
14670 (package::package): Adjust for the changes above.
14671 (package::{erase_extraction_directory,
14672 erase_extraction_directories}): New member functions.
14673 (elf_file_paths): Renamed dir_elf_files_path into this.
14674 (erase_created_temporary_directories)
14675 (create_maps_of_package_content)
14676 (extract_package_and_map_its_content, prepare_packages): New
14678 (get_soname, elf_file_type, extract_rpm): Make this static.
14679 (extract_package): Take a const package& rather than a
14680 package_sptr to express that the function really expects a non-nil
14681 object by reference (not by copy) and that the object won't be
14682 modified. Using a reference removes the possibility that the
14683 pointer could be nil, causing crashes in the code where
14684 parameter->something was used. Now only parameter.something can
14685 be used, so no crash possible there. This is more solid code.
14686 (file_tree_walker_callback_fn): Rename callback() into this. It
14687 makes the code more legible and kind of 'self-documented'. At
14688 least you get the hint that this is a callback function for some
14689 file tree walking (ftw) function. Adjust for the relevant names
14691 (compare): Rename compute_abidiff into this; again, this increases
14692 legibility; at least at the point of use of this function. Rename
14693 compare_package() into a an overload of compare() as well.
14694 compare_package() used to take a vector of packages. It was hard
14695 to guess by reading the signature of the function, which element
14696 of the vector is expected to be the first vector of the
14697 comparison, which one is to be the second, etc. Now, this
14698 function takes two packages, named first_package and
14699 second_package. That is more "typed"; that is, the signature is
14700 more meaningful. Greater legibility, hopefully. And in the body
14701 of the function, the debug information packages are now accessed
14702 using the package::debug_info_package data member. Again, this is
14703 less surprising, I believe. Also, explicitly erase the temporary
14704 files that were created during this comparison. All this
14705 simplifies the logic of this function, hopefully.
14706 (parse_command_line): Make this static. Add new --d1 and --d2
14707 command line switches that are shortcuts of --debug-info-pkg1 and
14708 --debug-info-pkg2. Adjust this function for the relevant name
14709 changes above. Make lines be shorter than 80 characters.
14710 (main): Do not create any vector of parameters anymore as the
14711 compare_packages() function don't take any vector of parameter
14712 anymore. Just instantiate first_package and second_package now.
14713 Adjust for the relevant name changes above. This hopefully
14714 simplifies the logic of this function.
14716 2015-07-06 Dodji Seketeli <dodji@redhat.com>
14718 Wording fixes in abipkgdiff.cc
14719 * tools/abipkgdiff.cc (extract_package): Renamed extract_pkg into
14720 this because shortening 'package' into 'pkg' provides no
14721 legibility improvement.
14722 (compare_packages): Renamed pkg_diff() into this, so that the name
14723 of the function starts with a verb, and the shortened 'pkg' word
14724 is renamed back to the 'package' word. This way, the code almost
14725 reads like normal English sentences with verbs and complement,
14726 thus enhancing legibility and easing latter maintenance.
14727 (main): Adjust for the changes above.
14729 2015-07-06 Dodji Seketeli <dodji@redhat.com>
14731 Re-indent tools/abipkgdiff.cc
14732 * tools/abipkgdiff.cc: Re-indent the file properly and fix some
14733 white spacing here and there.
14735 2015-07-06 Dodji Seketeli <dodji@redhat.com>
14737 Some slight typo and wording fixes in abipkgdiff
14738 * tools/abipkgdiff.cc (display_usage): Fixed the typo in
14739 'bi-pacakge.' Also, refer to 'package', not to 'bi-package' that
14740 is surprising to the user at first.
14741 (compute_abidiff): Shorten the size of the introductory line.
14743 2015-07-03 Dodji Seketeli <dodji@redhat.com>
14745 Remove names of unused variables in callback()
14746 * tools/abipkgdiff.cc (callback): Remove the name of parameters st
14749 2015-07-03 Dodji Seketeli <dodji@redhat.com>
14751 Remove useless const from the declaration of extract_rpm()
14752 * tools/abipkgdiff.cc (extract_rpm): Remove useless const qualifier.
14754 2015-07-03 Dodji Seketeli <dodji@redhat.com>
14756 End all branches of get_soname() finish with a return statement
14757 * tools/abipkgdiff.cc (get_soname): Have just one return statement
14758 at the end of this function.
14760 2015-07-03 Dodji Seketeli <dodji@redhat.com>
14762 Fix abipkgdiff compilation issues
14763 * tools/abipkgdiff.cc (elf_file::elf_file): Initialize data member
14764 in the same order as they were declared.
14765 (package::package): Likewise.
14767 2015-06-19 Sinny Kumari <sinny@redhat.com>
14769 Exclude processing symlink, display removed/added binaries between two packages
14770 * tools/abipkgdiff.cc (abi_changes): Declare new struct
14771 (callback): Exclude symbloic link file for durther processing
14772 (compute_abidiff): Consider SONAME if exists as key in map instead
14773 of binary name, else binary as key. Also, print if removed/added
14774 binaries exist between packages
14776 2015-06-09 Sinny Kumari <sinny@redhat.com>
14778 Stdout ABI changes if same binary found in both package
14779 * tools/abipkgdiff.cc (compute_abidiff): New function
14780 tools/abipkgdiff.cc (pkg_diff): Iterate through list of binaries
14781 in both package directory and call compute_diff function if
14782 same binary found in both file.
14783 tools/abipkgdiff.cc (main): Also consider debug-info directories
14784 avilable in debu-info packages.
14786 2015-06-02 Sinny Kumari <sinny@redhat.com>
14788 Save ELF files, their type and SONAME if exist for extracted packages
14789 * tools/abipkgdiff.cc (elf_type): Declare new enum
14790 (elf_file): Declare new struct
14791 (package): Add member variable dir_elf_files_map
14792 (get_soname): Define new function
14793 (elf_file_type): Define new function
14794 (extract_rpm): Iterate over extracted directory files
14795 and filter ELF binary files along with their information
14796 like name, soname, elf_type and save in dir_elf_files_map
14798 2015-05-26 Sinny Kumari <sinny@redhat.com>
14800 Extract packages(RPMs) into temporary directories for further processing
14801 * tools/abipkgdiff.cc (struct package): Declare new struct
14802 (package_sptr): Declare shared_ptr for struct package
14803 (extract_rpm): Define new fuction to extract rpm package
14804 (extract_pkg): Define new function to extract pacakge
14805 (pkg_diff): Define new function to get ABI diff between
14807 (main): Create new object of type pacakge for each binary
14808 and debuginfo pacakge passed in commandline options
14810 2015-05-21 Sinny Kumari <sinny@redhat.com>
14812 Guess RPM file type
14813 * include/abg-tools-utils.h (file_type): Added member
14814 FILE_TYPE_RPM and FILE_TYPE_SRPM
14815 (operator<<): New function declaration.
14816 * src/abg-tools-utils.cc (file_type): Detect RPM and
14818 (operator<<): New function definition
14819 * tools/abidiff.cc (main): Check for RPM and SRPM
14821 * tools/abilint.cci (main): Check for RPM and SRPM file
14823 * tools/abipkgdiff.cc (main): Check whether input files
14824 to abipkgdiff are valid RPM files or not.
14826 2015-05-19 Sinny Kumari <sinny@redhat.com>
14828 Initial skeleton of abipkgdiff tool
14829 * tools/Makefile.am: Include abipkgdiff.cc in compilation and
14830 generate abipkgdiff binary.
14831 * tools/abipkgdiff.cc: New file
14833 2015-07-16 Dodji Seketeli <dodji@redhat.com>
14835 Support reading binaries that do not have a symbol table
14836 * src/abg-dwarf-reader.cc
14837 (read_context::find_symbol_table_section): Allow returning a nil
14838 pointer to symbol table.
14839 (read_context::lookup_elf_symbol_from_index): Return an empty elf
14840 symbol if we got a nil pointer to symbol table.
14841 (read_context::load_symbol_maps): If no symbol table is found then
14842 consider that the symbol maps loading failed.
14844 2015-07-16 Dodji Seketeli <dodji@redhat.com>
14846 Remove extra vertical spaces from diff report
14847 * src/abg-comparison.cc (class_diff::report): Do not emit new line
14848 unless the diff is to be reported.
14849 * tests/data/test-diff-filter/test25-cyclic-type-report-0.txt: Adjust.
14850 * tests/data/test-diff-filter/test26-qualified-redundant-node-report-0.txt: Adjust.
14851 * tests/data/test-diff-filter/test27-redundant-and-filtered-children-nodes-report-1.txt:
14854 2015-07-09 Dodji Seketeli <dodji@redhat.com>
14856 Allow null types in type comparison again
14857 * src/abg-comparison.cc (compute_diff): In the overload of
14858 type_base_sptr accept nil types.
14860 2015-07-08 Dodji Seketeli <dodji@redhat.com>
14862 Handle the life time of the map of canonical types
14863 * include/abg-ir.h (type_base::canonical_types_map_type): Move
14864 this typedef into abg-ir.cc and out of the type_base namespace.
14865 (type_base::get_canonical_types_map): Likewise.
14866 * src/abg-ir.cc (canonical_types_map_type): New typedef that got
14867 moved here from type_base::canonical_types_map_type.
14868 (get_canonical_types_map): Likewise got moved here from
14869 type_base::get_canonical_types_map. Made static in the process.
14870 (class usage_watchdog): New type.
14871 (usage_watchdog_sptr, usage_watchdog_wptr): New typedefs.
14872 (get_usage_watchdog, get_usage_watchdog_wptr, ref_usage_watchdog)
14873 (maybe_cleanup_type_system_data): New static functions.
14874 (translation_unit::priv::usage_watchdog_): Add new data member.
14875 (translation_unit::priv::priv): Get a reference on the usage
14877 (translation_unit::priv::~priv): If the usage watchdog says that
14878 the type system is not used, then cleanup the global data
14879 logically owned by the type system.
14880 * include/abg-dwarf-reader.h (read_corpus_from_elf): Make this
14881 return a corpus and set the status by reference using a parameter.
14882 * src/abg-dwarf-reader.cc (read_corpus_from_elf): Implement the
14884 * include/abg-reader.h (read_translation_unit_from_file)
14885 (read_translation_unit_from_buffer)
14886 (read_translation_unit_from_istream): Remove the overloads that do
14887 not return a translation_unit_sptr and that pass it as a
14888 parameter. Only keep the overloads that return a
14889 translation_unit_sptr, forcing users of the API to own a proper
14890 reference on the resulting translation_unit pointer. That is
14891 important to handle the life time of the global data of the type
14892 system that need to be cleared when the last translation unit is
14894 * src/abg-reader.cc (read_translation_unit_from_input): Make this
14895 return a translation_unit_sptr.
14896 (read_translation_unit_from_file)
14897 (read_translation_unit_from_buffer)
14898 (read_translation_unit_from_istream): Remove the overloads that do
14899 not return a translation_unit_sptr and that pass it as a
14900 parameter. Only keep the overloads that return a
14901 translation_unit_sptr.
14902 (read_to_translation_unit): Make this return a
14903 translation_unit_sptr.
14904 * tests/print-diff-tree.cc (main): Adjust.
14905 * tests/test-diff-dwarf.cc (main): Likewise.
14906 * tests/test-ir-walker.cc (main): Likewise.
14907 * tests/test-read-dwarf.cc (main): Likewise.
14908 * tests/test-read-write.cc (main): Likewise.
14909 * tools/abicompat.cc (main): Likewise.
14910 * tools/abidiff.cc (main): Likewise.
14911 * tools/abidw.cc (main): Likewise.
14912 * tools/abilint.cc (main): Likewise.
14914 2015-07-08 Dodji Seketeli <dodji@redhat.com>
14916 Add --d{1,2} shortcut options for --debug-info-dir{1,2} in abidiff
14917 * tools/abidiff.cc (display_usage): Add the --d{1,2} to the help
14919 (parse_command_line): Parse the new --d1 and --d2 options.
14921 2015-07-08 Dodji Seketeli <dodji@redhat.com>
14923 Factorize incompatible and subtype changes detection
14924 * include/abg-comparison.h (corpus_diff::{has_incompatible_changes,
14925 has_net_subtype_changes}): Declare new member functions.
14926 * src/abg-comparison.cc (corpus_diff::{has_incompatible_changes,
14927 has_net_subtype_changes}): Define them.
14928 * abidiff.cc (main): Use the new member functions above.
14930 2015-07-09 Dodji Seketeli <dodji@redhat.com>
14932 Adjust some tests for output changes
14933 * tests/data/test-abidiff/test-struct1-report.txt: Adjust.
14934 * tests/data/test-diff-dwarf/test10-report.txt: Likewise.
14935 * tests/data/test-diff-dwarf/test11-report.txt: Likewise.
14936 * tests/data/test-diff-dwarf/test13-report.txt: Likewise.
14937 * tests/data/test-diff-filter/test2-report.txt: Likewise.
14938 * tests/data/test-diff-filter/test26-qualified-redundant-node-report-0.txt: Likewise.
14939 * tests/data/test-diff-filter/test26-qualified-redundant-node-report-1.txt: Likewise.
14940 * tests/data/test-diff-filter/test27-redundant-and-filtered-children-nodes-report-1.txt: Likewise.
14941 * tests/data/test-diff-filter/test27-redundant-and-filtered-children-nodes-report-2.txt: Likewise.
14943 2015-07-06 Dodji Seketeli <dodji@redhat.com>
14945 Fix missing newlines in diff report
14946 * src/abg-comparison.cc (class_diff::report): The overload of
14947 represent() for instances of var_decl does not emit new lines. So
14948 the caller must ensure a new line is emitted.
14950 2015-07-02 Dodji Seketeli <dodji@redhat.com>
14952 Support filtering out just one alias of a function
14953 * include/abg-comparison.h (function_suppression::{get,
14954 set}_allow_other_aliases): Declare new member functions.
14955 * src/abg-comparison.cc
14956 (function_suppression::priv::allow_other_aliases_): New data
14958 (function_suppression::priv::priv): Initialize it to 'true'.
14959 (function_suppression::{get, set}_allow_other_aliases): Define new
14961 (read_function_suppression): Parse the new "allow_other_aliases"
14963 (function_suppression::suppresses_function): Update to evaluate
14964 the new 'allow_other_aliases' property when there is a property to
14965 match against some a symbol name of the function.
14966 (corpus_diff::report): Fix the printing of function aliases when
14967 printing sub-type changes to properly emit the plural of the word
14968 'symbol' when the function has several aliases.
14969 * include/abg-ir.h (elf_symbol::get_number_of_aliases): Declare
14970 new member function.
14971 * src/abg-ir.cc (elf_symbol::get_number_of_aliases): Define new
14973 * doc/manuals/libabigail-concepts.rst: Update manual.
14974 * tests/data/test-diff-dwarf/test5-report.txt: Adjust.
14975 * tests/data/test-diff-suppr/libtest23-alias-filter-v0.so: New
14977 * tests/data/test-diff-suppr/libtest23-alias-filter-v1.so: Likewise.
14978 * tests/data/test-diff-suppr/test23-alias-filter-0.suppr: Likewise.
14979 * tests/data/test-diff-suppr/test23-alias-filter-1.suppr: Likewise.
14980 * tests/data/test-diff-suppr/test23-alias-filter-2.suppr: Likewise.
14981 * tests/data/test-diff-suppr/test23-alias-filter-3.suppr: Likewise.
14982 * tests/data/test-diff-suppr/test23-alias-filter-4.suppr: Likewise.
14983 * tests/data/test-diff-suppr/test23-alias-filter-report-0.txt: Likewise.
14984 * tests/data/test-diff-suppr/test23-alias-filter-report-1.txt: Likewise.
14985 * tests/data/test-diff-suppr/test23-alias-filter-report-2.txt: Likewise.
14986 * tests/data/test-diff-suppr/test23-alias-filter-report-3.txt: Likewise.
14987 * tests/data/test-diff-suppr/test23-alias-filter-report-4.txt: Likewise.
14988 * tests/data/test-diff-suppr/test23-alias-filter-report-5.txt: Likewise.
14989 * tests/data/test-diff-suppr/test23-alias-filter-v0.c: Likewise.
14990 * tests/data/test-diff-suppr/test23-alias-filter-v1.c: Likewise.
14991 * tests/data/test-diff-suppr/test23-alias-filter-version-script: Likewise.
14992 * tests/data/Makefile.am: Add the new test stuff to source
14994 * tests/test-diff-suppr.cc (in_out_spec): Add the tests inputs
14995 above to the list of input to run over.
14997 2015-07-01 Dodji Seketeli <dodji@redhat.com>
15000 * src/abg-ir.cc (elf_symbol::get_aliases_id_string): Finish the
15001 incomplete apidoc for this member function.
15003 2015-07-01 Dodji Seketeli <dodji@redhat.com>
15005 Show aliases of functions with changed sub-types
15006 * include/abg-ir.h (elf_symbol::get_aliases_id_string): Declare
15008 * src/abg-ir.cc (elf_symbol::get_aliases_id_string): Define new
15010 * src/abg-comparison.cc (corpus_diff::report): For functions with
15011 sub-type changes report their aliases. Do not do this if the
15012 function is a constructor or destructor because these almost
15013 always have aliases, at least with GCC and the developer most
15014 certainly has not done anything special for that; she would thus
15015 be uselessly surprised by that remote implementation detail.
15016 * tests/data/test-diff-dwarf/test5-report.txt: Adjust test.
15018 2015-06-25 Dodji Seketeli <dodji@redhat.com>
15020 Update ChangeLog file
15021 * ChangeLog: Update automatically using 'make update-changelog'.
15023 2015-06-23 Dodji Seketeli <dodji@redhat.com>
15026 * src/abg-comparison.cc
15027 (corpus_diff::priv::{deleted, added}n_variable_is_suppressed): Fix
15029 * tests/data/test-diff-dwarf/test16-syms-only-v0.cc: Fix a typo in
15031 * tests/data/test-diff-dwarf/test16-syms-only-v1.cc: Likewise.
15033 2015-06-22 Dodji Seketeli <dodji@redhat.com>
15035 Apply suppression specifications to added and removed functions and variables
15036 * include/abg-comparison.h (is_type_suppression)
15037 (is_function_suppression): Declare new functions.
15038 ({function, variable}_suppression::change_kind): Declare new enum.
15039 (function_suppression::{parse_change_kind, get_change_kind,
15040 set_change_kind, suppresses_function,
15041 suppresses_function_symbol}): Declare new member functions.
15042 (variable_suppression::{parse_change_kind, get_change_kind,
15043 set_change_kind, suppresses_variable, suppresses_variable,
15044 suppresses_variable_symbol}): Declare new member functions.
15045 (operator{&,|}): Declare new operators for
15046 function_suppression::change_kind and
15047 variable_suppression::change_kind enums.
15048 (corpus_diff::diff_stats::{num_removed_func_filtered_out,
15049 net_num_func_removed, num_added_func_filtered_out,
15050 net_num_func_added, num_removed_vars_filtered_out,
15051 net_num_vars_removed, num_added_vars_filtered_out,
15052 net_num_vars_added, num_removed_func_syms_filtered_out,
15053 num_added_func_syms_filtered_out, net_num_removed_func_syms,
15054 net_num_added_func_syms, num_added_var_syms_filtered_out,
15055 num_removed_vars_filtered_out, net_num_removed_var_syms,
15056 net_num_added_var_syms}): Declare new member functions.
15057 (corpus_diff::diff_stats::num_changed_vars_filtered_out): Renamed
15058 corpus_diff::diff_stats::num_vars_filtered_out into this.
15059 (corpus_diff::diff_stats::num_changed_func_filtered_out): Renamed
15060 corpus_diff::diff_stats::num_func_filtered_out into this.
15061 * src/abg-comparison.cc (is_type_suppression)
15062 (is_function_suppression): Define new
15064 (function_suppression::priv::change_kind): New data member.
15065 (function_suppression::priv): Initialize it.
15066 (function_suppression::{parse_change_kind, get_change_kind,
15067 set_change_kind, suppresses_function,
15068 suppresses_function_symbol}): Define new member functions.
15069 (operator{&,|}): Define new operators for the new
15070 function_suppression::change_kind enum.
15071 (function_suppression::suppresses_diff): Re-write this in terms of
15072 the new function_suppression::suppresses_function() function.
15073 (read_function_suppression): Support reading the new "change_kind"
15075 (variable_suppression::priv::change_kind_): New data member.
15076 (variable_suppression::priv::priv): Initialize it.
15077 (variable_suppression::{parse_change_kind, get_change_kind,
15078 set_change_kind, suppresses_variable,
15079 suppresses_variable_symbol}): Define new member functions.
15080 (is_variable_suppression): Define new function.
15081 (operator{&,|}): Define new operators for
15082 variable_suppression::change_kind enum.
15083 (variable_suppression::suppresses_diff): Re-write in terms of the
15084 new variable_suppression::suppresses_variable function.
15085 (read_variable_suppression): Support reading the new "change_kind"
15087 (corpus_diff::diff_stats::priv::{num_removed_func_filtered_out,
15088 num_added_func_filtered_out, num_removed_vars_filtered_out,
15089 num_added_vars_filtered_out, num_removed_func_syms_filtered_out,
15090 num_added_func_syms_filtered_out,
15091 num_removed_var_syms_filtered_out,
15092 num_added_var_syms_filtered_out}): New data members.
15093 (corpus_diff::diff_stats::priv::num_changed_func_filtered_out):
15094 Renamed the data member num_func_filtered_out into this.
15095 (corpus_diff::diff_stats::priv::num_changed_vars_filtered_out):
15096 Renamed data member num_vars_filtered_out into this.
15097 (corpus_diff::diff_stats::priv::priv): Initialize the new data
15099 (corpus_diff::diff_stats::{num_removed_func_filtered_out,
15100 num_removed_func_filtered_out, net_num_func_removed,
15101 net_num_func_added, num_added_func_filtered_out,
15102 net_num_func_added, num_removed_vars_filtered_out,
15103 num_removed_vars_filtered_out, net_num_vars_removed,
15104 num_added_vars_filtered_out, net_num_vars_added,
15105 num_removed_func_syms_filtered_out,
15106 num_added_func_syms_filtered_out, net_num_removed_func_syms,
15107 net_num_added_func_syms, num_added_var_syms_filtered_out,
15108 num_removed_vars_filtered_out, net_num_removed_var_syms,
15109 net_num_added_var_syms}): Define new member functions.
15110 (corpus_diff::diff_stats::num_changed_func_filtered_out): Renamed
15111 corpus_diff::diff_stats::num_func_filtered_out into this.
15112 (corpus_diff::diff_stats::num_changed_vars_filtered_out): Renamed
15113 corpus_diff::diff_stats::num_vars_filtered_out into this.
15114 (corpus_diff::diff_stats::{net_num_func_changed,
15115 net_num_vars_changed}): Adjust.
15116 (corpus_diff::priv::{suppressed_deleted_fns_,
15117 suppressed_added_fns_, suppressed_deleted_vars_,
15118 suppressed_added_vars_, suppressed_added_unrefed_fn_syms_,
15119 suppressed_deleted_unrefed_fn_syms_,
15120 suppressed_added_unrefed_var_syms_,
15121 suppressed_deleted_unrefed_fn_syms_}): New data members.
15122 (corpus_diff::priv::{apply_suppressions_to_added_removed_fns_vars,
15123 deleted_function_is_suppressed, added_function_is_suppressed,
15124 deleted_variable_is_suppressed, added_variable_is_suppressed,
15125 added_unrefed_fn_sym_is_suppressed,
15126 deleted_unrefed_fn_sym_is_suppressed,
15127 added_unrefed_var_sym_is_suppressed,
15128 deleted_unrefed_var_sym_is_suppressed}): Define member functions.
15129 (function_is_suppressed, variable_is_suppressed): Define new
15131 (corpus_diff::priv::apply_filters_and_compute_diff_stats): Compute
15132 stats for filtered added or removed functions, variables and their
15134 (corpus_diff::priv::emit_diff_stats): Emit diff stats for filtered
15135 added or removed functions, variables and symbols.
15136 (corpus_diff::report): Support suppressed reports about added or
15137 removed functions, variables and symbols. Fixed a typo that was
15138 in there for a while. Note that that fix requires updating some
15139 regression tests, and the part of this patch that touches
15140 regression tests does that.
15141 (apply_suppressions): In the overload for corpus_diff, apply the
15142 suppression to added or removed functions and variables.
15143 * doc/manuals/libabigail-concepts.rst: Update this manual to
15144 reflect the changes above. Also, perform an extensive cleanup of
15145 the manual to introduce more section titles to make it easier to
15146 navigate the document using the table of content.
15147 * tests/data/test-abicompat/test2-var-removed-report-0.txt:
15149 * tests/data/test-diff-dwarf/test0-report.txt: Likewise.
15150 * tests/data/test-diff-dwarf/test12-report.txt: Likewise.
15151 * tests/data/test-diff-dwarf/test18-alias-sym-report-0.txt:
15153 * tests/data/test-diff-dwarf/test19-soname-report-0.txt: Likewise.
15154 * tests/data/test-diff-dwarf/test7-report.txt: Likewise.
15155 * tests/data/test-diff-dwarf/test8-report.txt: Likewise.
15156 * tests/data/test-diff-dwarf/test9-report.txt: Likewise.
15157 * tests/data/test-diff-dwarf/test16-syms-only-report.txt: Likewise.
15158 * tests/data/test-diff-dwarf/test17-non-refed-syms-report-0.txt:
15160 * tests/data/test-diff-dwarf/test28-vtable-changes-report-0.txt:
15162 * tests/data/test-diff-filter/test0-report.txt: Likewise.
15163 * tests/data/test-diff-filter/test01-report.txt: Likewise.
15164 * tests/data/test-diff-filter/test13-report.txt: Likewise.
15165 * test-diff-suppr/test15-suppr-added-fn-v0.o: Add new test
15167 * tests/data/test-diff-filter/test15-0-report.txt: Likewise.
15168 * tests/data/test-diff-filter/test2-report.txt: Likewise.
15169 * tests/data/test-diff-filter/test21-compatible-vars-report-0.txt:
15171 * tests/data/test-diff-filter/test24-compatible-vars-report-1.txt:
15173 * test-diff-suppr/test15-suppr-added-fn-v1.o: Likewise.
15174 * test-diff-suppr/test15-suppr-added-fn-0.suppr: Likewise.
15175 * test-diff-suppr/test15-suppr-added-fn-1.suppr: Likewise.
15176 * test-diff-suppr/test15-suppr-added-fn-2.suppr: Likewise.
15177 * test-diff-suppr/test15-suppr-added-fn-3.suppr: Likewise.
15178 * test-diff-suppr/test15-suppr-added-fn-4.suppr: Likewise.
15179 * test-diff-suppr/test15-suppr-added-fn-report-0.txt: Likewise.
15180 * test-diff-suppr/test15-suppr-added-fn-report-1.txt: Likewise.
15181 * test-diff-suppr/test15-suppr-added-fn-report-2.txt: Likewise.
15182 * test-diff-suppr/test15-suppr-added-fn-report-3.txt: Likewise.
15183 * test-diff-suppr/test15-suppr-added-fn-report-4.txt: Likewise.
15184 * test-diff-suppr/test15-suppr-added-fn-report-5.txt: Likewise.
15185 * test-diff-suppr/test15-suppr-added-fn-v0.cc: Likewise.
15186 * test-diff-suppr/test15-suppr-added-fn-v1.cc: Likewise.
15187 * test-diff-suppr/test16-suppr-removed-fn-v0.o: Likewise.
15188 * test-diff-suppr/test16-suppr-removed-fn-v1.o: Likewise.
15189 * test-diff-suppr/test16-suppr-removed-fn-0.suppr: Likewise.
15190 * test-diff-suppr/test16-suppr-removed-fn-1.suppr: Likewise.
15191 * test-diff-suppr/test16-suppr-removed-fn-2.suppr: Likewise.
15192 * test-diff-suppr/test16-suppr-removed-fn-3.suppr: Likewise.
15193 * test-diff-suppr/test16-suppr-removed-fn-4.suppr: Likewise.
15194 * test-diff-suppr/test16-suppr-removed-fn-report-0.txt: Likewise.
15195 * test-diff-suppr/test16-suppr-removed-fn-report-1.txt: Likewise.
15196 * test-diff-suppr/test16-suppr-removed-fn-report-2.txt: Likewise.
15197 * test-diff-suppr/test16-suppr-removed-fn-report-3.txt: Likewise.
15198 * test-diff-suppr/test16-suppr-removed-fn-report-4.txt: Likewise.
15199 * test-diff-suppr/test16-suppr-removed-fn-report-5.txt: Likewise.
15200 * test-diff-suppr/test16-suppr-removed-fn-v0.cc: Likewise.
15201 * test-diff-suppr/test16-suppr-removed-fn-v1.cc: Likewise.
15202 * test-diff-suppr/test17-suppr-added-var-v0.o: Likewise.
15203 * test-diff-suppr/test17-suppr-added-var-v1.o: Likewise.
15204 * test-diff-suppr/test17-suppr-added-var-0.suppr: Likewise.
15205 * test-diff-suppr/test17-suppr-added-var-1.suppr: Likewise.
15206 * test-diff-suppr/test17-suppr-added-var-2.suppr: Likewise.
15207 * test-diff-suppr/test17-suppr-added-var-3.suppr: Likewise.
15208 * test-diff-suppr/test17-suppr-added-var-4.suppr: Likewise.
15209 * test-diff-suppr/test17-suppr-added-var-report-0.txt: Likewise.
15210 * test-diff-suppr/test17-suppr-added-var-report-1.txt: Likewise.
15211 * test-diff-suppr/test17-suppr-added-var-report-2.txt: Likewise.
15212 * test-diff-suppr/test17-suppr-added-var-report-3.txt: Likewise.
15213 * test-diff-suppr/test17-suppr-added-var-report-4.txt: Likewise.
15214 * test-diff-suppr/test17-suppr-added-var-report-5.txt: Likewise.
15215 * test-diff-suppr/test17-suppr-added-var-v0.cc: Likewise.
15216 * test-diff-suppr/test17-suppr-added-var-v1.cc: Likewise.
15217 * test-diff-suppr/test18-suppr-removed-var-v0.o: Likewise.
15218 * test-diff-suppr/test18-suppr-removed-var-v1.o: Likewise.
15219 * test-diff-suppr/test18-suppr-removed-var-0.suppr: Likewise.
15220 * test-diff-suppr/test18-suppr-removed-var-1.suppr: Likewise.
15221 * test-diff-suppr/test18-suppr-removed-var-2.suppr: Likewise.
15222 * test-diff-suppr/test18-suppr-removed-var-3.suppr: Likewise.
15223 * test-diff-suppr/test18-suppr-removed-var-4.suppr: Likewise.
15224 * test-diff-suppr/test18-suppr-removed-var-report-0.txt: Likewise.
15225 * test-diff-suppr/test18-suppr-removed-var-report-1.txt: Likewise.
15226 * test-diff-suppr/test18-suppr-removed-var-report-2.txt: Likewise.
15227 * test-diff-suppr/test18-suppr-removed-var-report-3.txt: Likewise.
15228 * test-diff-suppr/test18-suppr-removed-var-report-4.txt: Likewise.
15229 * test-diff-suppr/test18-suppr-removed-var-report-5.txt: Likewise.
15230 * test-diff-suppr/test18-suppr-removed-var-v0.cc: Likewise.
15231 * test-diff-suppr/test18-suppr-removed-var-v1.cc: Likewise.
15232 * tests/data/test-diff-suppr/test19-suppr-added-fn-sym-v0.o: New
15234 * tests/data/test-diff-suppr/test19-suppr-added-fn-sym-v1.o:
15236 * tests/data/test-diff-suppr/test19-suppr-added-fn-sym-0.suppr:
15238 * tests/data/test-diff-suppr/test19-suppr-added-fn-sym-1.suppr:
15240 * tests/data/test-diff-suppr/test19-suppr-added-fn-sym-2.suppr:
15242 * tests/data/test-diff-suppr/test19-suppr-added-fn-sym-3.suppr:
15244 * tests/data/test-diff-suppr/test19-suppr-added-fn-sym-4.suppr:
15246 * tests/data/test-diff-suppr/test19-suppr-added-fn-sym-report-0.txt:
15248 * tests/data/test-diff-suppr/test19-suppr-added-fn-sym-report-1.txt:
15250 * tests/data/test-diff-suppr/test19-suppr-added-fn-sym-report-2.txt:
15252 * tests/data/test-diff-suppr/test19-suppr-added-fn-sym-report-3.txt:
15254 * tests/data/test-diff-suppr/test19-suppr-added-fn-sym-report-4.txt:
15256 * tests/data/test-diff-suppr/test19-suppr-added-fn-sym-report-5.txt:
15258 * tests/data/test-diff-suppr/test19-suppr-added-fn-sym-v0.cc:
15260 * tests/data/test-diff-suppr/test19-suppr-added-fn-sym-v1.cc:
15262 * tests/data/test-diff-suppr/test20-suppr-removed-fn-sym-v0.o:
15264 * tests/data/test-diff-suppr/test20-suppr-removed-fn-sym-v1.o:
15266 * tests/data/test-diff-suppr/test20-suppr-removed-fn-sym-0.suppr:
15268 * tests/data/test-diff-suppr/test20-suppr-removed-fn-sym-1.suppr:
15270 * tests/data/test-diff-suppr/test20-suppr-removed-fn-sym-2.suppr:
15272 * tests/data/test-diff-suppr/test20-suppr-removed-fn-sym-3.suppr:
15274 * tests/data/test-diff-suppr/test20-suppr-removed-fn-sym-4.suppr:
15276 * tests/data/test-diff-suppr/test20-suppr-removed-fn-sym-report-0.txt:
15278 * tests/data/test-diff-suppr/test20-suppr-removed-fn-sym-report-1.txt:
15280 * tests/data/test-diff-suppr/test20-suppr-removed-fn-sym-report-2.txt:
15282 * tests/data/test-diff-suppr/test20-suppr-removed-fn-sym-report-3.txt:
15284 * tests/data/test-diff-suppr/test20-suppr-removed-fn-sym-report-4.txt:
15286 * tests/data/test-diff-suppr/test20-suppr-removed-fn-sym-report-5.txt:
15288 * tests/data/test-diff-suppr/test20-suppr-removed-fn-sym-v0.cc:
15290 * tests/data/test-diff-suppr/test20-suppr-removed-fn-sym-v1.cc:
15292 * tests/data/test-diff-suppr/test21-suppr-added-var-sym-v0.o:
15294 * tests/data/test-diff-suppr/test21-suppr-added-var-sym-v1.o:
15296 * tests/data/test-diff-suppr/test21-suppr-added-var-sym-0.suppr:
15298 * tests/data/test-diff-suppr/test21-suppr-added-var-sym-1.suppr:
15300 * tests/data/test-diff-suppr/test21-suppr-added-var-sym-2.suppr:
15302 * tests/data/test-diff-suppr/test21-suppr-added-var-sym-3.suppr:
15304 * tests/data/test-diff-suppr/test21-suppr-added-var-sym-4.suppr:
15306 * tests/data/test-diff-suppr/test21-suppr-added-var-sym-report-0.txt:
15308 * tests/data/test-diff-suppr/test21-suppr-added-var-sym-report-1.txt:
15310 * tests/data/test-diff-suppr/test21-suppr-added-var-sym-report-2.txt:
15312 * tests/data/test-diff-suppr/test21-suppr-added-var-sym-report-3.txt:
15314 * tests/data/test-diff-suppr/test21-suppr-added-var-sym-report-4.txt:
15316 * tests/data/test-diff-suppr/test21-suppr-added-var-sym-report-5.txt:
15318 * tests/data/test-diff-suppr/test21-suppr-added-var-sym-v0.cc:
15320 * tests/data/test-diff-suppr/test21-suppr-added-var-sym-v1.cc:
15322 * tests/data/test-diff-suppr/test22-suppr-removed-var-sym-v0.o:
15324 * tests/data/test-diff-suppr/test22-suppr-removed-var-sym-v1.o:
15326 * tests/data/test-diff-suppr/test22-suppr-removed-var-sym-0.suppr:
15328 * tests/data/test-diff-suppr/test22-suppr-removed-var-sym-1.suppr:
15330 * tests/data/test-diff-suppr/test22-suppr-removed-var-sym-2.suppr:
15332 * tests/data/test-diff-suppr/test22-suppr-removed-var-sym-3.suppr:
15334 * tests/data/test-diff-suppr/test22-suppr-removed-var-sym-4.suppr:
15336 * tests/data/test-diff-suppr/test22-suppr-removed-var-sym-report-0.txt:
15338 * tests/data/test-diff-suppr/test22-suppr-removed-var-sym-report-1.txt:
15340 * tests/data/test-diff-suppr/test22-suppr-removed-var-sym-report-2.txt:
15342 * tests/data/test-diff-suppr/test22-suppr-removed-var-sym-report-3.txt:
15344 * tests/data/test-diff-suppr/test22-suppr-removed-var-sym-report-4.txt:
15346 * tests/data/test-diff-suppr/test22-suppr-removed-var-sym-report-5.txt:
15348 * tests/data/test-diff-suppr/test22-suppr-removed-var-sym-v0.cc:
15350 * tests/data/test-diff-suppr/test22-suppr-removed-var-sym-v1.cc:
15352 * tests/data/Makefile.am: Add the new test materials above to source
15354 * tests/test-diff-suppr.cc (in_out_specs): Add the new tests
15355 material above to the list of test inputs this harness has to run
15358 2015-06-22 Dodji Seketeli <dodji@redhat.com>
15360 Do not compare static data members when comparing types
15361 * include/abg-ir.h (class_decl::get_non_static_data_members):
15362 Declare new data members.
15363 * src/abg-comparison.cc
15364 (class_diff::ensure_lookup_tables_populated): Only look at
15365 non-static data members.
15366 (compute_diff): In the overload for class_decl, only compare
15367 non-static data members.
15368 * src/abg-hash.cc (class_decl::hash::operator()): Do not hash
15369 static data members members hashing a class_decl.
15370 * src/abg-ir.cc (class_decl::priv::data_members_): New data
15372 (class_decl::priv::priv): When initializing data members, store
15373 the non-static data members on the side, in the new
15374 class_decl::priv::non_static_data_members_ data member.
15375 (class_decl::get_non_static_data_members): Define member function.
15376 (class_decl::add_data_member): Store the non-static data members
15377 on the side in class_decl::priv::non_static_data_members_.
15378 (equals): In the overload for class_decl, do not take in account
15379 static data members when running the comparison.
15380 * tests/data/test-diff-dwarf/test7-report.txt: Adjust.
15381 * tests/data/test-diff-filter/test12-report.txt: Adjust.
15383 2015-06-23 Dodji Seketeli <dodji@redhat.com>
15385 Add a --suppr short alias to the --suppressions option of abidiff
15386 * tools/abidiff.cc (display_usage): Add a help string for the new
15388 (parse_command_line): Support the --suppr option which is an alias
15389 for --suppressions.
15391 2015-06-23 Dodji Seketeli <dodji@redhat.com>
15393 Enable large file support
15394 * configure.ac: Call the AC_SYS_LARGEFILE autoconf macro.
15395 * config.h.in: Update.
15397 2015-06-23 Dodji Seketeli <dodji@redhat.com>
15399 Do not build zip archive support by default
15400 * configure.ac: By default, unconditionally disable the
15401 zip-archive support.
15403 2015-06-23 Dodji Seketeli <dodji@redhat.com>
15405 Put the man pages of the binaries in section 1
15406 * doc/manuals/Makefile.am(section1_manpages, section7_manpages):
15407 Two new variables to contain the man page names per section.
15408 (manpages): Set this variable to $section1_manpages and $section7_manpages.
15409 (install-man-and-info-doc): In this rule, create the destination
15410 directories for section 1 and 7 and copy the right man pages in
15411 their right directory.
15412 * doc/manuals/conf.py (man_pages): Generate the binary man pages
15413 into section 1 and the libabigail man page into section 7.
15415 2015-06-23 Dodji Seketeli <dodji@redhat.com>
15417 Sort deleted/added variables and symbols before emitting report
15418 * src/abg-comparison.cc (sort_string_var_ptr_map)
15419 (sort_string_elf_symbol_map): Define new static functions.
15420 (var_comp, elf_symbol_comp): Define new comparison functors.
15421 (corpus_diff::report): Sort the deleted variables, added
15422 variables, deleted function symbols, added function symbols,
15423 deleted variable symbols, and added variable symbols before
15424 walking them to emit reports.
15426 2015-06-23 Dodji Seketeli <dodji@redhat.com>
15428 Remove useless white space
15429 * src/abg-comparison.cc (sort_string_parm_map): Remove trailing
15430 white space from comment.
15432 2015-06-23 Dodji Seketeli <dodji@redhat.com>
15434 Bug 18580 - abidw ignores --out-file
15435 * tools/abidw.cc (main): Take the argument of --out-file into
15436 account when emitting the serialized form of the ABI.
15438 2015-06-23 Dodji Seketeli <dodji@redhat.com>
15440 Fix a thinko in the comparison code
15441 * src/abg-comparison.cc
15442 (class_diff::ensure_lookup_tables_populated): Ensure that when a
15443 member function is wrongly considered as being added, then either
15444 the new member function doesn't have a symbol name (linkage name)
15445 or it has one, and it was already present in the first version of
15447 # Veuillez saisir le message de validation pour vos
15448 modifications. Les lignes # commençant par '#' seront ignorées, et
15449 un message vide abandonne la validation. # Sur la branche
15450 fix-master # Votre branche est à jour avec 'origin/master'. # #
15451 Modifications qui seront validées : # modified:
15452 src/abg-comparison.cc # # Modifications qui ne seront pas validées
15453 : # modified: tools/abidw.cc # # Fichiers non suivis: # abidw.abi
15454 # build/ # depcomp # missing # patch-edited.txt # patch.txt #
15455 prtests/ # test-driver # # ------------------------ >8
15456 ------------------------ # Ne touchez pas à la ligne ci-dessus #
15457 Tout se qui suit sera éliminé.
15458 diff --git a/src/abg-comparison.cc b/src/abg-comparison.cc
15459 index 14208f5..ef7c6c9 100644
15460 --- a/src/abg-comparison.cc
15461 +++ b/src/abg-comparison.cc
15462 @@ -7419,8 +7419,8 @@ class_diff::ensure_lookup_tables_populated(void) const
15463 inserted_member_fns().begin();
15464 i != inserted_member_fns().end();
15466 - if (i->second->get_symbol()
15467 - && f->lookup_function_symbol(i->second->get_symbol()->get_name(),
15468 + if (!i->second->get_symbol()
15469 + || f->lookup_function_symbol(i->second->get_symbol()->get_name(),
15470 i->second->get_symbol()->get_version().str()))
15471 to_delete.push_back(i->first);
15473 2015-06-07 Dodji Seketeli <dodji@redhat.com>
15475 Build libabigail tests with position-independent code
15476 * tests/Makefile.am: Add -fPIC to the compile flags.
15478 2015-06-07 Dodji Seketeli <dodji@redhat.com>
15480 Build libabigail tools as position-independent code
15481 * tools/Makefile.am: Compile the binaries here with -fPIC. Note
15482 that the library libabigail.la is built with libtool which already
15483 takes care of this, so no need to worry about this for
15486 2015-06-07 Dodji Seketeli <dodji@redhat.com>
15488 Update ChangeLog file
15489 * ChangeLog: Update this automatically by typing make
15492 2015-06-07 Dodji Seketeli <dodji@redhat.com>
15494 Avoid infinite loop in elf_symbol::get_alias_from_name()
15495 * src/abg-ir.cc (elf_symbol::get_alias_from_name)
15496 (elf_symbol::get_alias_which_equals): Test for the next alias
15497 pointing to the main symbol, in the loop exit condition.
15499 2015-06-04 Dodji Seketeli <dodji@redhat.com>
15501 Change the linkage name only when necessary
15502 * include/abg-ir.h (elf_symbol::get_alias_from_name): Declare new
15504 * src/abg-ir.cc (elf_symbol::get_alias_from_name): Define it.
15505 * src/abg-dwarf-reader.cc (build_var_decl, build_function_decl):
15506 Once the linkage name is supposed to contain the value of the
15507 DW_AT_linkage_name attribute, set it the name of the underlying
15508 symbol only if value of DW_At_linkage_name is missing or different
15509 from the names of all the aliases of the underlying symbol.
15510 * tests/data/test-read-dwarf/test2.so.abi: Adjust.
15512 2015-06-04 Dodji Seketeli <dodji@redhat.com>
15514 Various white space cleanups
15515 * include/abg-comparison.h: Remove various useless vertical white
15517 * tests/test-diff-dwarf.cc (in_out_spec): Fix indentation of some
15520 2015-06-04 Dodji Seketeli <dodji@redhat.com>
15522 Fix various comments here and there
15523 * src/abg-comparison.cc
15524 (diff_context::set_or_get_canonical_diff_for, compute_diff)
15525 (redundancy_marking_visitor::visit_begin): Fix comment in these
15527 * src/abg-ir.cc (elf_symbol::is_variable): Likewise.
15529 2015-06-04 Dodji Seketeli <dodji@redhat.com>
15531 Add missing apidoc to elf_symbol type
15532 * src/abg-ir.cc (elf_symbol::{elf_symbol, get_name, set_name,
15533 get_type, set_type, get_binding, set_binding, get_version,
15534 is_defined, is_public, is_function, is_variable}): Add missing
15535 apidoc to these member functions.
15537 2015-06-04 Dodji Seketeli <dodji@redhat.com>
15539 Cleanup logic in class_diff::ensure_lookup_tables_populated()
15540 * src/abg-comparison.cc
15541 (class_diff::ensure_lookup_tables_populated): Remove the code that
15542 tries to lookup allegedly added functions from the set of deleted
15543 ones, by using the pretty printed name of the function. Handling
15544 the case of a function decl not correctly tied to it symbol is
15545 handled my generically a bit later in this function.
15547 2015-06-04 Dodji Seketeli <dodji@redhat.com>
15549 Report possible changes in the set of aliases of a symbol.
15550 * src/abg-comparison.cc (function_decl_diff::report): Report
15551 a change in the aliases of the symbols of a function; note that
15552 everything else but have stayed equal in the function.
15554 2015-06-04 Dodji Seketeli <dodji@redhat.com>
15556 Report vtable changes in top-level function change reports
15557 * src/abg-comparison.cc (function_decl_diff::report): Report about
15558 virtual-ness and vtable offset changes.
15559 * tests/data/test-diff-dwarf/test28-vtable-changes-report-0.txt:
15560 New test input file.
15561 * tests/data/test-diff-dwarf/test28-vtable-changes-v{0,1}.o: New
15562 test input binaries.
15563 * tests/data/test-diff-dwarf/test28-vtable-changes-v{0,1}.cc:
15564 Source code of the input binaries above.
15565 * tests/data/Makefile.am: Add the new test input above to source
15567 * tests/test-diff-dwarf.cc (in_out_specs): Add the new test input
15568 above to the list of input this test harness has to run over.
15570 2015-06-03 Dodji Seketeli <dodji@redhat.com>
15572 Support new 'accessed_through' suppression property
15573 * include/abg-comparison.h (enum type_suppression::reach_kind):
15575 (type_suppression::{get_consider_reach_kind,
15576 set_consider_reach_kind, get_reach_kind,
15577 mark_last_diff_visited_per_class_of_equivalence,
15578 clear_last_diffs_visited_per_class_of_equivalence,
15579 get_last_visited_diff_of_class_of_equivalence}): Declare new
15581 * src/abg-comparison.cc (diff_has_ancestor_filtered_out)
15582 (read_suppression_reach_kind): Define static function.
15583 (type_suppression::priv::{consider_reach_kind_, reach_kind_}):
15584 Define new data members.
15585 (type_suppression::priv::priv): Take a new reach_kind parameter.
15586 (type_suppression::type_suppression): Adjust to new prototype of
15588 (type_suppression::{get_consider_reach_kind,
15589 set_consider_reach_kind, get_reach_kind, set_reach_kind}): Define
15590 new member functions.
15591 (type_suppression::suppresses_diff): Interpret the result of
15592 type_suppression::get_reach_kind() to determine if the suppression
15593 specification suppresses a given diff node.
15594 (read_type_suppression): Support reading the content of the
15595 "accessed_through" property.
15596 (diff_context::priv::last_visited_diff_node_): New data member.
15597 (diff_context::{mark_last_diff_visited_per_class_of_equivalence,
15598 clear_last_diffs_visited_per_class_of_equivalence,
15599 get_last_visited_diff_of_class_of_equivalence}): Define new data
15601 (redundancy_marking_visitor::visit_begin): So if the current diff
15602 node has already been visited, but if the previously visited node
15603 has been filtered out, then do not mark this node as being
15604 redundant. And mark the current diff node as being the last
15605 visited one in its class of equivalence.
15606 (categorize_redundancy): Clear the map of diff nodes visited per
15607 class of equivalence.
15608 * doc/manuals/libabigail-concepts.rst: Document the new
15609 'accessed_through' property.
15610 * tests/data/test-diff-suppr/test13-suppr-through-pointer-0.suppr:
15611 New test input data.
15612 * tests/data/test-diff-suppr/test13-suppr-through-pointer-report-{0,1}.txt:
15614 * tests/data/test-diff-suppr/libtest13-suppr-through-pointer-v{0,1}.so:
15615 New test input binaries.
15616 * tests/data/test-diff-suppr/test13-suppr-through-pointer-v{0,1}.cc:
15617 Source code of the test input binaries above.
15618 * tests/data/test-diff-suppr/test14-suppr-non-redundant-0.suppr:
15619 New test input data.
15620 * tests/data/test-diff-suppr/test14-suppr-non-redundant-report-0.txt:
15622 * tests/data/test-diff-suppr/test14-suppr-non-redundant-v{0,1}.o:
15623 New test input binaries.
15624 * tests/data/test-diff-suppr/test14-suppr-non-redundant-v{0,1}.cc:
15625 Source code of the binaries above.
15627 2015-06-03 Dodji Seketeli <dodji@redhat.com>
15629 Fix redundancy marking for change of types used directly
15630 * include/abg-comparison.h (pointer_map): Make this be a map of
15631 {size_t, size_t} pairs, rather than {size_t, bool}, so that each
15632 pointer in the map can be associated to another one.
15633 (diff_context::diff_has_been_visited): Return the pointer to the
15634 first diff node of the equivalence class that has been visited.
15635 * src/abg-comparison.cc (is_pointer_diff, is_reference_diff)
15636 (is_reference_or_pointer_diff, is_fn_parm_diff, is_base_diff)
15637 (is_child_node_of_function_parm_diff, is_child_node_of_base_diff):
15638 Define new static functions.
15639 (diff_context::diff_has_been_visited): Return the pointer to the
15640 first diff node of the equivalence class that has been visited.
15641 (diff_context::mark_diff_as_visited): Save the pointer to the
15642 first diff node of a given class of equivalence that has been
15644 (redundancy_marking_visitor::visit_begin): If a diff node is a
15645 child node of a function parameter diff or base diff node and if
15646 it's not a pointer or reference diff node, then do not mark it as
15647 redundant. Also, make sure to not mark the first diff node of a
15648 given class of equivalence that has been visited, as redundant;
15649 only the other subsequent nodes should be marked redundant; we
15650 were hitting this case because of an optimization that makes
15651 equivalent class diff nodes to share their private (pimpl) data.
15652 * tests/data/test-diff-filter/test29-finer-redundancy-marking-v{0,1}.o:
15653 New test input binaries.
15654 * tests/data/test-diff-filter/test29-finer-redundancy-marking-v{0,1}.cc:
15655 Source code of the new test input binaries above.
15656 * tests/data/test-diff-filter/test29-finer-redundancy-marking-report-0.txt:
15658 * tests/data/Makefile.am: Add the new test material above to the
15659 source distribution.
15660 * tests/test-diff-filter.cc (in_out_specs): Make this test harness
15661 run over the additional test input above.
15662 * tests/data/test-diff-suppr/test5-fn-suppr-report-0.txt: Adjust.
15664 2015-06-02 Dodji Seketeli <dodji@redhat.com>
15666 Fix detection of local changes in base classes
15667 * abg-ir.cc (equals): In the overload of class_decl::base_spec, if
15668 the underlying class carries changes, then do not flag these
15669 changes as local for the class_decl::base_spec.
15670 * tests/data/test-diff-dwarf/test27-local-base-diff-v{0,1}.o: New
15671 test input binaries.
15672 * tests/data/test-diff-dwarf/test27-local-base-diff-v{0,1}.cc: Source
15673 code for the test input binaries above.
15674 * tests/data/test-diff-dwarf/test27-local-base-diff-report.txt:
15676 * tests/data/Makefile.am: Add the test inputs above to source
15679 2015-06-02 Dodji Seketeli <dodji@redhat.com>
15681 Fix symbols comparison
15682 * include/abg-ir.h (elf_symbol_wptr): New typedef.
15683 (elf_symbol): Make the constructors and assignment operator
15684 private. The type can neither be copied nor created with the new
15686 (elf_symbol::create): New static member function.
15687 (elf_symbol::{get_main_symbol, get_next_alias, add_alias}):
15689 ( compute_aliases_for_elf_symbol): Likewise.
15690 (elf_symbol::operator=): Make this private.
15691 (elf_symbol::get_alias_which_equals): Declare new member function.
15692 * src/abg-comp-filter.cc (function_name_changed_but_not_symbol):
15694 * src/abg-comparison.cc
15695 (class_diff::ensure_lookup_tables_populated): Adjust.
15696 * src/abg-corpus.cc
15697 (corpus::priv::build_unreferenced_symbols_tables): Likewise.
15698 * include/abg-dwarf-reader.h (lookup_symbol_from_elf)
15699 (lookup_public_function_symbol_from_elf): Adjust.
15700 * src/abg-dwarf-reader.cc (lookup_symbol_from_sysv_hash_tab)
15701 (lookup_symbol_from_gnu_hash_tab, lookup_symbol_from_elf_hash_tab)
15702 (lookup_symbol_from_symtab, lookup_symbol_from_elf)
15703 (lookup_public_function_symbol_from_elf)
15704 (lookup_public_variable_symbol_from_elf): Adjust.
15705 (read_context::lookup_elf_symbol_from_index): Likewise.
15706 (read_context::lookup_elf_fn_symbol_from_address): Likewise.
15707 (read_context::lookup_elf_var_symbol_from_address): Likewise.
15708 (read_context::lookup_public_function_symbol_from_elf): Likewise.
15709 (read_context::lookup_public_variable_symbol_from_elf): Likewise.
15710 (read_context::load_symbol_maps): Likewise.
15711 (build_var_decl, build_function_decl): Likewise.
15712 * src/abg-ir.cc (elf_symbol::priv::{main_symbol_, next_alias_}):
15713 Change the type of these from elf_symbol* to elf_symbol_wptr.
15714 (elf_symbol::priv::priv): Adjust.
15715 (elf_symbol::{create, get_alias_which_equals}): Define new functions.
15716 (textually_equals): Likewise.
15717 (elf_symbol::{get_main_symbol, is_main_symbol, get_next_alias,
15718 add_alias}): Adjust to return or take elf_symbol_sptr type, rather
15719 than a elf_symbol* one.
15720 (elf_symbol::{get_aliases_id_string, does_alias}): Adjust.
15721 (compute_alias_for_elf_symbol): Likewise.
15722 (elf_symbol::operator==): Two symbols A and B are now equal if A
15723 has at least one alias that is textually equal to B.
15724 (equals): In the overload for function_decls, in the part where we
15725 compare the decl_base part of the functions without considering
15726 their decl names, we now also omit considering their linkage
15727 names, because we compared they symbols before.
15728 * tools/abisym.cc (main): Adjust.
15729 * tests/data/test-diff-dwarf/test12-report.txt: Adjust.
15730 * tests/data/test-diff-dwarf/test12-report.txt: Adjust.
15731 * tests/data/test-diff-dwarf/test18-alias-sym-report-0.txt: Adjust.
15732 * tests/data/test-diff-dwarf/test8-report.txt: Adjust.
15733 * tests/data/test-diff-filter/test10-report.txt: Adjust.
15734 * tests/data/test-diff-filter/test13-report.txt: Adjust.
15735 * tests/data/test-diff-filter/test2-report.txt: Adjust.
15736 * tests/data/test-diff-filter/test20-inline-report-0.txt: Adjust.
15737 * tests/data/test-diff-filter/test20-inline-report-1.txt: Adjust.
15738 * tests/data/test-diff-filter/test9-report.txt: Adjust.
15740 2015-04-22 Dodji Seketeli <dodji@redhat.com>
15742 Support specifying data member insertion in suppressions
15743 * include/abg-comparison.h (type_suppression::insertion_range):
15745 (type_suppression::insertion_ranges): Declare new typedef.
15746 (type_suppression::{s,g}et_data_member_insertion_ranges): Declare
15747 new member functions.
15748 (is_integer_boundary, is_fn_call_expr_boundary): Declare new
15750 (type_suppression::insertion_range::{boundary, integer_boundary,
15751 fn_call_expr_boundary}): Define new types.
15752 * src/abg-comparison.cc:
15753 (struct type_suppression::insertion_range::priv): New type.
15754 (type_suppression::insertion_range::{insertion_range, begin,
15755 end}): Define new member functions.
15756 (type_suppression::priv::insertion_ranges_): Add data member.
15757 (type_suppression::{s,g}et_data_member_insertion_ranges): Define
15758 new member functions.
15759 (type_suppression::insertion_range::boundary::priv): Define new
15761 (type_suppression::insertion_range::boundary::{boundary,
15762 ~boundary}): Define new member functions.
15763 (type_suppression::insertion_range::integer_boundary::priv):
15765 (type_suppression::insertion_range::integer_boundary::{integer_boundary,
15766 as_integer, operator int, ~integer_boundary}): Define member
15768 (type_suppression::insertion_range::fn_call_expr_boundary::priv):
15770 (type_suppression::insertion_range::fn_call_expr_boundary::{fn_call_expr_boundary,
15771 as_function_call_expr, operator ini::function_call_expr_sptr}):
15772 Define new member functions.
15773 (type_suppression::insertion_range::{create_integer_boundary,
15774 type_suppression::insertion_range::create_fn_call_expr_boundary,
15775 type_suppression::insertion_range::eval_boundary}): Define new
15777 (is_integer_boundary, is_fn_call_expr_boundary): Define new
15779 (read_type_suppression, read_function_suppression)
15780 (read_variable_suppression): Support the new kinds of
15781 property-related types. Aslo, in read_type_suppression, support
15782 the new properties has_data_member_inserted_at,
15783 has_data_member_inserted_between and
15784 has_data_members_inserted_between.
15785 (type_suppression::suppresses_diff): If we are looking at a type
15786 diff node that has inserted data members, evaluate the insertion
15787 ranges of the current type_suppression and see if they match the
15788 inserted data members.
15789 * include/abg-ini.h (property, simple_property, property_value)
15790 (string_property_value, tuple_property_value, function_call_expr):
15792 (property_sptr, property_value_sptr, string_property_value_sptr)
15793 (tuple_property_value_sptr): Declare new typedefs.
15794 (is_string_property_value, is_tuple_property_value)
15795 (is_simple_property, is_tuple_property, read_function_call_expr):
15796 Declare new functions.
15797 * src/abg-ini.cc (char_is_white_space, char_is_comment_start)
15798 (char_is_delimiter, char_is_property_value_char)
15799 (char_is_section_name_char, char_is_property_name_char)
15800 (char_is_comment_start, char_is_white_space)
15801 (remove_trailing_white_spaces, is_string_property_value)
15802 (is_tuple_property_value, is_simple_property, is_tuple_property)
15803 (write_property_value, char_is_function_name_char)
15804 (char_is_function_argument_char): Define new functions.
15805 (property::priv, tuple_property_value::priv)
15806 (simple_property::priv, tuple_property::priv): Define new types.
15807 (property::{property, get_name, set_name, ~property}): Define new
15809 (struct property_value::priv): Define new type.
15810 (property_value::{property_value, get_kind, operator const
15811 string&(), ~property_value}): Define new member functions.
15812 (struct string_property_value::priv): Define new type.
15813 (string_property_value::{string_property_value, set_content,
15814 as_string, operator string()}, ~string_property_value): Define new
15816 (tuple_property_value::{tuple_property_value, get_value_items,
15817 ~tuple_property_value, as_string}): Likewise.
15818 (simple_property::{simple_property, get_value, set_value,
15819 ~simple_property}): Likewise.
15820 (tuple_property::{tuple_property, set_value, get_value}):
15822 (config::section::find_property): Adjust return type.
15823 (read_context::{char_is_delimiter, char_is_property_value_char,
15824 char_is_section_name_char, char_is_property_name_char,
15825 char_is_comment_start, char_is_white_space}): Remove these from
15826 here as they got moved them to be non-member functions above.
15827 (read_context::read_property_value): Return a property_value_sptr
15828 and do not take any parameter anymore.
15829 (read_context::{read_string_property_value,
15830 read_tuple_property_value, read_function_name,
15831 read_function_argument, read_function_call_expr}): Define new
15833 (read_context::read_property): Adjust return type. Also, change to read
15834 the different new kinds of properties values.
15835 (function_call_expr::priv): Define new type.
15836 (function_call_expr::{function_call_expr, get_name,
15837 get_arguments}): New member functions.
15838 (read_context::read_section): Adjust.
15839 (write_property, write_section): Adjust.
15840 * tests/data/test-diff-suppr/libtest{11,12}-add-data-member-v{0,1}.so:
15841 New test input binaries.
15842 * tests/data/test-diff-suppr/test{11,12}-add-data-member-{0,1}.suppr:
15843 New input suppression files.
15844 * tests/data/test-diff-suppr/test11-add-data-member-{2,3,4}.suppr:
15845 Add new test input files.
15846 * tests/data/test-diff-suppr/test{11,12}-add-data-member-report-{0,1}.txt:
15847 New reference output files.
15848 * tests/data/test-diff-suppr/test12-add-data-member-report-2.txt:
15850 * tests/data/test-diff-suppr/test{11,12}-add-data-member-v{0,1}.cc:
15851 Source code for the new binaries above.
15852 * tests/test-diff-suppr.cc (in_out_specs): Add new test inputs.
15853 * tests/data/Makefile.am: Add the new test related files above to
15854 source distribution.
15855 * doc/manuals/libabigail-concepts.rst: Document the new properties
15856 has_data_member_inserted_at, has_data_member_inserted_between and
15857 has_data_members_inserted_between.
15859 2015-05-24 Dodji Seketeli <dodji@redhat.com>
15861 Make indexes of function parameters start at 1
15862 * src/abg-ir.cc (function_type::function_type): Starts the index
15863 of the parameters at 1, unless the firs parameter is an artificial
15864 one, in which case it starts at 0.
15865 * tests/data/test-abicompat/test5-fn-changed-report-0.txt: Adjust.
15866 * tests/data/test-diff-dwarf/test0-report.txt: Adjust.
15867 * tests/data/test-diff-dwarf/test1-report.txt: Adjust.
15868 * tests/data/test-diff-dwarf/test10-report.txt: Adjust.
15869 * tests/data/test-diff-dwarf/test11-report.txt: Adjust.
15870 * tests/data/test-diff-dwarf/test13-report.txt: Adjust.
15871 * tests/data/test-diff-dwarf/test15-enum-report.txt: Adjust.
15872 * tests/data/test-diff-dwarf/test2-report.txt: Adjust.
15873 * tests/data/test-diff-dwarf/test20-add-fn-parm-report-0.txt: Adjust.
15874 * tests/data/test-diff-dwarf/test21-redundant-fn-report-0.txt: Adjust.
15875 * tests/data/test-diff-dwarf/test22-changed-parm-c-report-0.txt: Adjust.
15876 * tests/data/test-diff-dwarf/test24-added-fn-parms-report-0.txt: Adjust.
15877 * tests/data/test-diff-dwarf/test25-removed-fn-parms-report-0.txt: Adjust.
15878 * tests/data/test-diff-dwarf/test26-added-parms-before-variadic-report.txt: Adjust.
15879 * tests/data/test-diff-dwarf/test4-report.txt: Adjust.
15880 * tests/data/test-diff-dwarf/test6-report.txt: Adjust.
15881 * tests/data/test-diff-dwarf/test7-report.txt: Adjust.
15882 * tests/data/test-diff-dwarf/test8-report.txt: Adjust.
15883 * tests/data/test-diff-filter/test0-report.txt: Adjust.
15884 * tests/data/test-diff-filter/test01-report.txt: Adjust.
15885 * tests/data/test-diff-filter/test1-report.txt: Adjust.
15886 * tests/data/test-diff-filter/test10-report.txt: Adjust.
15887 * tests/data/test-diff-filter/test13-report.txt: Adjust.
15888 * tests/data/test-diff-filter/test14-0-report.txt: Adjust.
15889 * tests/data/test-diff-filter/test14-1-report.txt: Adjust.
15890 * tests/data/test-diff-filter/test16-report-2.txt: Adjust.
15891 * tests/data/test-diff-filter/test16-report.txt: Adjust.
15892 * tests/data/test-diff-filter/test17-0-report.txt: Adjust.
15893 * tests/data/test-diff-filter/test17-1-report.txt: Adjust.
15894 * tests/data/test-diff-filter/test18-report.txt: Adjust.
15895 * tests/data/test-diff-filter/test19-enum-report-1.txt: Adjust.
15896 * tests/data/test-diff-filter/test2-report.txt: Adjust.
15897 * tests/data/test-diff-filter/test22-compatible-fns-report-0.txt: Adjust.
15898 * tests/data/test-diff-filter/test23-redundant-fn-parm-change-report-0.txt: Adjust.
15899 * tests/data/test-diff-filter/test25-cyclic-type-report-0.txt: Adjust.
15900 * tests/data/test-diff-filter/test25-cyclic-type-report-1.txt: Adjust.
15901 * tests/data/test-diff-filter/test26-qualified-redundant-node-report-0.txt: Adjust.
15902 * tests/data/test-diff-filter/test26-qualified-redundant-node-report-1.txt: Adjust.
15903 * tests/data/test-diff-filter/test27-redundant-and-filtered-children-nodes-report-1.txt: Adjust.
15904 * tests/data/test-diff-filter/test27-redundant-and-filtered-children-nodes-report-2.txt: Adjust.
15905 * tests/data/test-diff-filter/test28-redundant-and-filtered-children-nodes-report-0.txt: Adjust.
15906 * tests/data/test-diff-filter/test28-redundant-and-filtered-children-nodes-report-1.txt: Adjust.
15907 * tests/data/test-diff-filter/test3-report.txt: Adjust.
15908 * tests/data/test-diff-filter/test9-report.txt: Adjust.
15909 * tests/data/test-diff-suppr/test0-type-suppr-report-0.txt: Adjust.
15910 * tests/data/test-diff-suppr/test0-type-suppr-report-3.txt: Adjust.
15911 * tests/data/test-diff-suppr/test1-typedef-suppr-report-0.txt: Adjust.
15912 * tests/data/test-diff-suppr/test1-typedef-suppr-report-2.txt: Adjust.
15913 * tests/data/test-diff-suppr/test10-changed-parm-c-report-0.txt: Adjust.
15914 * tests/data/test-diff-suppr/test2-struct-suppr-report-0.txt: Adjust.
15915 * tests/data/test-diff-suppr/test3-struct-suppr-report-0.txt: Adjust.
15916 * tests/data/test-diff-suppr/test3-struct-suppr-report-1.txt: Adjust.
15917 * tests/data/test-diff-suppr/test3-struct-suppr-report-2.txt: Adjust.
15918 * tests/data/test-diff-suppr/test4-local-suppr-report-0.txt: Adjust.
15919 * tests/data/test-diff-suppr/test4-local-suppr-report-1.txt: Adjust.
15920 * tests/data/test-diff-suppr/test5-fn-suppr-report-0.txt: Adjust.
15921 * tests/data/test-diff-suppr/test5-fn-suppr-report-1.txt: Adjust.
15922 * tests/data/test-diff-suppr/test5-fn-suppr-report-2.txt: Adjust.
15923 * tests/data/test-diff-suppr/test5-fn-suppr-report-3.txt: Adjust.
15924 * tests/data/test-diff-suppr/test5-fn-suppr-report-4.txt: Adjust.
15925 * tests/data/test-diff-suppr/test5-fn-suppr-report-5.txt: Adjust.
15926 * tests/data/test-diff-suppr/test6-fn-suppr-report-0.txt: Adjust.
15927 * tests/data/test-diff-suppr/test6-fn-suppr-report-1.txt: Adjust.
15928 * tests/data/test-diff-suppr/test6-fn-suppr-report-2.txt: Adjust.
15929 * tests/data/test-diff-suppr/test6-fn-suppr-report-3.txt: Adjust.
15930 * tests/data/test-diff-suppr/test8-redundant-fn-report-0.txt: Adjust.
15931 * tests/data/test-diff-suppr/test8-redundant-fn-report-1.txt: Adjust.
15932 * tests/data/test-diff-suppr/test9-changed-parm-c-report-0.txt: Adjust.
15933 * tests/data/test-diff-suppr/test9-changed-parm-c-report-1.txt: Adjust.
15935 2015-05-22 Dodji Seketeli <dodji@redhat.com>
15937 Some wording fixes to doc/manuals/libabigail-concepts.rst
15938 * doc/manuals/libabigail-concepts.rst: Some light wording fixes.
15940 2015-05-24 Dodji Seketeli <dodji@redhat.com>
15942 Type read from DWARF don't have alignment information
15943 * src/abg-dwarf-reader.cc (build_type_decl)
15944 (build_class_type_and_add_to_ir, build_pointer_type_def)
15945 (build_reference_type, build_function_decl): Set the alignment for
15946 native types, class, reference and function type to zero,
15947 effectively meaning that they don't have alignment information.
15948 * src/abg-hash.cc (var_decl::hash::operator): Take the hash value
15949 of the data member context in account when computing the hash
15950 value of a given data member.
15951 * tests/data/test-diff-dwarf/test-23-diff-arch-report-0.txt:
15953 * tests/data/test-diff-dwarf/test10-report.txt: Likewise.
15954 * tests/data/test-diff-dwarf/test13-report.txt: Likewise.
15955 * tests/data/test-diff-dwarf/test22-changed-parm-c-report-0.txt: Likewise.
15956 * tests/data/test-diff-dwarf/test26-added-parms-before-variadic-report.txt: Likewise.
15957 * tests/data/test-diff-dwarf/test8-report.txt: Likewise.
15958 * tests/data/test-diff-dwarf/test9-report.txt: Likewise.
15959 * tests/data/test-diff-filter/test13-report.txt: Likewise.
15960 * tests/data/test-diff-filter/test6-report.txt: Likewise.
15961 * tests/data/test-diff-suppr/test9-changed-parm-c-report-0.txt: Likewise.
15962 * tests/data/test-read-dwarf/test0.abi: Likewise.
15963 * tests/data/test-read-dwarf/test1.abi: Likewise.
15964 * tests/data/test-read-dwarf/test2.so.abi: Likewise.
15965 * tests/data/test-read-dwarf/test3.so.abi: Likewise.
15966 * tests/data/test-read-dwarf/test4.so.abi: Likewise.
15967 * tests/data/test-read-dwarf/test5.o.abi: Likewise.
15968 * tests/data/test-read-dwarf/test6.so.abi: Likewise.
15969 * tests/data/test-read-dwarf/test7.so.abi: Likewise.
15970 * tests/data/test-read-dwarf/test8-qualified-this-pointer.so.abi: Likewise.
15972 2015-05-06 Dodji Seketeli <dodji@redhat.com>
15974 Better name ID function parameters
15975 * src/abg-ir.cc (function_decl::parameter::get_name_id): Make this
15976 be "parameter-<index>".
15978 2015-05-06 Dodji Seketeli <dodji@redhat.com>
15980 Better detection of parameter sub-type changes
15981 * include/abg-fwd.h (type_has_sub_type_changes): Declare new
15983 * src/abg-ir.cc (type_has_sub_type_changes): Define it.
15984 * src/abg-comparison.cc (fn_parm_diff::report): Use the new
15985 function type_has_sub_type_changes() instead of just looking at
15987 * tests/data/test-diff-dwarf/test4-report.txt: Adjust this
15988 reference test output.
15990 2015-05-06 Dodji Seketeli <dodji@redhat.com>
15992 Fix a potential crash when comparing variadic parameters again
15993 * src/abg-comparison.cc (redundancy_marking_visitor::visit_begin):
15994 Avoid flagging diffs of variadic parameter *types* as redundant as
15997 2015-05-06 Dodji Seketeli <dodji@redhat.com>
15999 Add debugging function for function parameters
16001 (function_decl::parameter::get_pretty_representation): Declare new
16002 virtual member function.
16004 (function_decl::parameter::get_pretty_representation): Define it.
16006 2015-05-06 Dodji Seketeli <dodji@redhat.com>
16009 * src/abg-dwarf-reader.cc (build_function_decl): Add comments when
16010 building the function parameters.
16012 2015-05-06 Dodji Seketeli <dodji@redhat.com>
16014 Add a debugging function for type_or_decl_base*
16015 * include/abg-fwd.h (get_pretty_representation): Declare new
16016 overload for type_or_decl_base*.
16017 * src/abg-ir.cc (get_pretty_representation): Define it and express
16018 the previous overload for type_or_decl_base_sptr in terms of this
16021 2015-05-05 Dodji Seketeli <dodji@redhat.com>
16023 Return a reference to smart pointer for the void type node
16024 * src/abg-ir.h (type_decl::get_void_type_decl): Return a reference
16025 to the smart pointer initially returned.
16026 * src/abg-ir.cc (type_decl::get_void_type_decl): Likewise.
16028 2015-05-05 Dodji Seketeli <dodji@redhat.com>
16030 Bug 18342 - Segmentation fault while comparing functions with variadic parameters
16031 * include/abg-fwd.h (is_array_type): New overload for a naked
16033 * include/abg-ir.h (type_decl::get_variadic_parameter_type_decl): Declare new
16035 * src/abg-ir.cc (is_array_type): Define new function overload for
16037 (type_decl::get_variadic_parameter_type_decl): Define new static
16039 * src/abg-dwarf-reader.cc (build_function_decl): The type of
16040 variadic parameter is now a special type_decl.
16041 * include/abg-comparison.h (is_diff_of_variadic_parameter_type)
16042 (is_diff_of_variadic_parameter): New function declarations.
16043 * src/abg-comparison.cc (is_diff_of_variadic_parameter_type)
16044 (is_diff_of_variadic_parameter): Define new functions.
16045 (compute_diff): Refuse to return a NULL
16046 diff for types. Assert that the parameters are non-NULL.
16047 (report_size_and_alignment_changes): We are comparing arrays only
16048 if the two parameters are arrays.
16049 (fn_parm_diff::fn_parm_diff): Refuse that type diff for this diff
16051 (fn_parm_diff::report): Strengthen an assert. Cleanup a comment.
16052 (redundancy_marking_visitor::visit_begin): Do not mark function
16053 type and variadic parms diff nodes as redundant for local changes.
16054 * tests/data/test-diff-dwarf/libtest26-added-parms-before-variadic-v{0,1}.so:
16055 New test input binaries.
16056 * tests/data/test-diff-dwarf/test26-added-parms-before-variadic-report.txt:
16057 New test output reference.
16058 * tests/data/test-diff-dwarf/test26-added-parms-before-variadic-v{0,1}.c:
16059 Source code of the new test input binaries above.
16060 * tests/data/Makefile.am: Add the new test stuff to source
16062 * tests/test-diff-dwarf.cc (in_out_specs): Add the new test inputs
16063 above to the set of input to run this test harness over.
16065 2015-04-24 Dodji Seketeli <dodji@redhat.com>
16067 Fix archive writing support
16068 * configure.ac: Require libzip 0.10.1 at least.
16069 * src/abg-writer.cc (archive_write_ctxt::serialized_tus): Make
16070 this be a list<string>, rather than a vector<string>.
16071 (create_archive_write_context): Truncate the archive if it exists
16073 (write_translation_unit_to_archive): Do not use the deprecated
16074 zip_add() function anymore. Rather, use zip_file_add().
16075 * tests/test-write-read-archive.cc (main): Double check if the
16076 translation unit we read is empty or not.
16078 2015-04-22 Dodji Seketeli <dodji@redhat.com>
16080 Use a better wording for the COPYING file
16081 * COPYING: Update to a more complete description.
16083 2015-04-20 Dodji Seketeli <dodji@redhat.com>
16085 Update licence texts
16086 * COPYING: Of course we know the licence we want to use now :-)
16087 * COPYING-GPLV3: Add the text of GPLv3.
16088 * Makefile.am: Add the file COPYING-GPLV3 above to source
16091 2015-04-15 Dodji Seketeli <dodji@redhat.com>
16093 18252 - Added parameters are not properly sorted
16094 * src/abg-comparison.cc (sort_string_parm_map): Define new static
16096 (struct parm_comp): Define new type.
16097 (function_type_diff::priv::{sorted_deleted_parms_,
16098 sorted_added_parms_}): New data members that hold sorted
16099 deleted/added parameters.
16100 (function_type_diff::ensure_lookup_tables_populated): Initialize
16101 the two new data members above.
16102 (function_type_diff::report): For the report of parameters that
16103 got added/removed, use the sorted set of added/removed parameters
16105 * tests/data/test-diff-dwarf/test24-added-fn-parms-report-0.txt:
16107 * tests/data/test-diff-dwarf/libtest24-added-fn-parms-v{0,1}.so:
16109 * tests/data/test-diff-dwarf/test25-removed-fn-parms-report-0.txt:
16111 * tests/data/test-diff-dwarf/libtest25-removed-fn-parms-v{0,1}.so:
16113 * tests/data/test-diff-dwarf/test24-added-fn-parms-v{0,1}.c:
16115 * tests/data/test-diff-dwarf/test25-removed-fn-parms-v{0,1}.c:
16117 * tests/data/Makefile.am: Add the new test material above to the
16118 source distribution.
16120 2015-04-14 Dodji Seketeli <dodji@redhat.com>
16122 Misc reporting fixes/improvements
16123 * src/abg-comparison.cc (distinct_diff::report): Remove spurious
16124 vertical space before reporting size and alignment changes here.
16125 (represent): In the variables/data member overload, report type
16126 changes first. Then the other changes.
16127 (report_size_and_alignment_changes): Make this report array size
16128 changes too. Also, make some small adjustments about how type
16129 size/alignment changes are introduced.
16130 (array_diff::report): Now that report_size_and_alignment_changes()
16131 supports size change reporting, just use that function rather than
16133 (corpus_diff::report): Consistently add a space between each
16134 changed function report. Prefix changed variables with a [C],
16135 just like for functions.
16136 * tests/data/test-abicompat/test0-fn-changed-report-0.txt: Adjust.
16137 * tests/data/test-abicompat/test5-fn-changed-report-0.txt: Likewise.
16138 * tests/data/test-abicompat/test6-var-changed-report-0.txt: Likewise.
16139 * tests/data/test-abidiff/test-qual-type0-report.txt: Likewise.
16140 * tests/data/test-abidiff/test-struct0-report.txt: Likewise.
16141 * tests/data/test-abidiff/test-struct1-report.txt: Likewise.
16142 * tests/data/test-abidiff/test-var0-report.txt: Likewise.
16143 * tests/data/test-diff-dwarf/test-23-diff-arch-report-0.txt: Likewise.
16144 * tests/data/test-diff-dwarf/test0-report.txt: Likewise.
16145 * tests/data/test-diff-dwarf/test1-report.txt: Likewise.
16146 * tests/data/test-diff-dwarf/test10-report.txt: Likewise.
16147 * tests/data/test-diff-dwarf/test11-report.txt: Likewise.
16148 * tests/data/test-diff-dwarf/test13-report.txt: Likewise.
16149 * tests/data/test-diff-dwarf/test15-enum-report.txt: Likewise.
16150 * tests/data/test-diff-dwarf/test2-report.txt: Likewise.
16151 * tests/data/test-diff-dwarf/test20-add-fn-parm-report-0.txt: Likewise.
16152 * tests/data/test-diff-dwarf/test21-redundant-fn-report-0.txt: Likewise.
16153 * tests/data/test-diff-dwarf/test22-changed-parm-c-report-0.txt: Likewise.
16154 * tests/data/test-diff-dwarf/test3-report.txt: Likewise.
16155 * tests/data/test-diff-dwarf/test6-report.txt: Likewise.
16156 * tests/data/test-diff-dwarf/test7-report.txt: Likewise.
16157 * tests/data/test-diff-dwarf/test8-report.txt: Likewise.
16158 * tests/data/test-diff-dwarf/test9-report.txt: Likewise.
16159 * tests/data/test-diff-filter/test0-report.txt: Likewise.
16160 * tests/data/test-diff-filter/test01-report.txt: Likewise.
16161 * tests/data/test-diff-filter/test1-report.txt: Likewise.
16162 * tests/data/test-diff-filter/test10-report.txt: Likewise.
16163 * tests/data/test-diff-filter/test11-report.txt: Likewise.
16164 * tests/data/test-diff-filter/test13-report.txt: Likewise.
16165 * tests/data/test-diff-filter/test14-0-report.txt: Likewise.
16166 * tests/data/test-diff-filter/test14-1-report.txt: Likewise.
16167 * tests/data/test-diff-filter/test15-0-report.txt: Likewise.
16168 * tests/data/test-diff-filter/test15-1-report.txt: Likewise.
16169 * tests/data/test-diff-filter/test16-report-2.txt: Likewise.
16170 * tests/data/test-diff-filter/test16-report.txt: Likewise.
16171 * tests/data/test-diff-filter/test17-0-report.txt: Likewise.
16172 * tests/data/test-diff-filter/test17-1-report.txt: Likewise.
16173 * tests/data/test-diff-filter/test18-report.txt: Likewise.
16174 * tests/data/test-diff-filter/test19-enum-report-1.txt: Likewise.
16175 * tests/data/test-diff-filter/test2-report.txt: Likewise.
16176 * tests/data/test-diff-filter/test20-inline-report-1.txt: Likewise.
16177 * tests/data/test-diff-filter/test21-compatible-vars-report-0.txt: Likewise.
16178 * tests/data/test-diff-filter/test22-compatible-fns-report-0.txt: Likewise.
16179 * tests/data/test-diff-filter/test23-redundant-fn-parm-change-report-0.txt: Likewise.
16180 * tests/data/test-diff-filter/test24-compatible-vars-report-1.txt: Likewise.
16181 * tests/data/test-diff-filter/test25-cyclic-type-report-0.txt: Likewise.
16182 * tests/data/test-diff-filter/test25-cyclic-type-report-1.txt: Likewise.
16183 * tests/data/test-diff-filter/test26-qualified-redundant-node-report-0.txt: Likewise.
16184 * tests/data/test-diff-filter/test26-qualified-redundant-node-report-1.txt: Likewise.
16185 * tests/data/test-diff-filter/test27-redundant-and-filtered-children-nodes-report-0.txt: Likewise.
16186 * tests/data/test-diff-filter/test27-redundant-and-filtered-children-nodes-report-1.txt: Likewise.
16187 * tests/data/test-diff-filter/test27-redundant-and-filtered-children-nodes-report-2.txt: Likewise.
16188 * tests/data/test-diff-filter/test28-redundant-and-filtered-children-nodes-report-0.txt: Likewise.
16189 * tests/data/test-diff-filter/test28-redundant-and-filtered-children-nodes-report-1.txt: Likewise.
16190 * tests/data/test-diff-filter/test3-report.txt: Likewise.
16191 * tests/data/test-diff-filter/test6-report.txt: Likewise.
16192 * tests/data/test-diff-filter/test9-report.txt: Likewise.
16193 * tests/data/test-diff-suppr/test0-type-suppr-report-0.txt: Likewise.
16194 * tests/data/test-diff-suppr/test0-type-suppr-report-3.txt: Likewise.
16195 * tests/data/test-diff-suppr/test1-typedef-suppr-report-0.txt: Likewise.
16196 * tests/data/test-diff-suppr/test1-typedef-suppr-report-2.txt: Likewise.
16197 * tests/data/test-diff-suppr/test10-changed-parm-c-report-0.txt: Likewise.
16198 * tests/data/test-diff-suppr/test2-struct-suppr-report-0.txt: Likewise.
16199 * tests/data/test-diff-suppr/test3-struct-suppr-report-0.txt: Likewise.
16200 * tests/data/test-diff-suppr/test3-struct-suppr-report-1.txt: Likewise.
16201 * tests/data/test-diff-suppr/test3-struct-suppr-report-2.txt: Likewise.
16202 * tests/data/test-diff-suppr/test4-local-suppr-report-0.txt: Likewise.
16203 * tests/data/test-diff-suppr/test4-local-suppr-report-1.txt: Likewise.
16204 * tests/data/test-diff-suppr/test5-fn-suppr-report-0.txt: Likewise.
16205 * tests/data/test-diff-suppr/test5-fn-suppr-report-1.txt: Likewise.
16206 * tests/data/test-diff-suppr/test5-fn-suppr-report-2.txt: Likewise.
16207 * tests/data/test-diff-suppr/test5-fn-suppr-report-3.txt: Likewise.
16208 * tests/data/test-diff-suppr/test5-fn-suppr-report-4.txt: Likewise.
16209 * tests/data/test-diff-suppr/test5-fn-suppr-report-5.txt: Likewise.
16210 * tests/data/test-diff-suppr/test6-fn-suppr-report-0.txt: Likewise.
16211 * tests/data/test-diff-suppr/test6-fn-suppr-report-1.txt: Likewise.
16212 * tests/data/test-diff-suppr/test6-fn-suppr-report-2.txt: Likewise.
16213 * tests/data/test-diff-suppr/test6-fn-suppr-report-3.txt: Likewise.
16214 * tests/data/test-diff-suppr/test7-var-suppr-report-0.txt: Likewise.
16215 * tests/data/test-diff-suppr/test7-var-suppr-report-1.txt: Likewise.
16216 * tests/data/test-diff-suppr/test7-var-suppr-report-2.txt: Likewise.
16217 * tests/data/test-diff-suppr/test7-var-suppr-report-3.txt: Likewise.
16218 * tests/data/test-diff-suppr/test7-var-suppr-report-4.txt: Likewise.
16219 * tests/data/test-diff-suppr/test7-var-suppr-report-7.txt: Likewise.
16220 * tests/data/test-diff-suppr/test7-var-suppr-report-8.txt: Likewise.
16221 * tests/data/test-diff-suppr/test8-redundant-fn-report-0.txt: Likewise.
16222 * tests/data/test-diff-suppr/test8-redundant-fn-report-1.txt: Likewise.
16223 * tests/data/test-diff-suppr/test9-changed-parm-c-report-0.txt: Likewise.
16224 * tests/data/test-diff-suppr/test9-changed-parm-c-report-1.txt: Likewise.
16226 2015-04-10 Dodji Seketeli <dodji@redhat.com>
16228 Make abidiff and abicompat return meaningful exit codes
16229 * doc/manuals/abicompat.rst: Update documentation for abicompat
16231 * doc/manuals/abidiff.rst: Likewise for abidiff exit codes.
16232 * include/abg-tools-utils.h (enum abidiff_status): Declare new
16234 (operator{|,&,|=}): Declare new operators for the new enum
16236 (abidiff_status_has_error, abidiff_status_has_abi_change)
16237 (abidiff_status_has_incompatible_abi_change): Declare new
16239 * src/abg-tools-utils.cc (operator{|,&,|=}): Define these new
16241 (abidiff_status_has_error, abidiff_status_has_abi_change)
16242 (abidiff_status_has_incompatible_abi_change): Define new
16244 * tests/test-diff-filter.cc (main): Adjust for the new exit code
16246 * tests/test-diff-suppr.cc (main): Likewise.
16247 * tests/test-abicompat.cc (main): Likewise.
16248 * tools/abicompat.cc (enum abicompat_status): Remove.
16249 (operator{|,&,|=}): Remove these operators for enum
16251 (perform_compat_check_in_normal_mode)
16252 (perform_compat_check_in_weak_mode): Return abidiff_status instead
16253 of abicompat_status. Adjust therefore.
16254 (main): Adjust to return abidiff_status now, instead of a just
16255 zero for all non-error cases.
16256 * tools/abidiff.cc (main): Likewise.
16258 2015-04-01 Dodji Seketeli <dodji@redhat.com>
16260 Add support for abicompat weak mode
16261 * include/abg-fwd.h (class type_or_decl_base): Forward declare
16263 (is_decl, is_type, is_function_type, get_name, get_type_name)
16264 (get_function_type_name, get_pretty_representation)
16265 (lookup_function_type_in_corpus, lookup_type_in_translation_unit)
16266 (lookup_function_type_in_translation_unit)
16267 (synthesize_function_type_from_translation_unit)
16268 (hash_type_or_decl): New function declarations.
16269 * src/abg-corpus.cc (lookup_type_in_corpus)
16270 (lookup_function_type_in_corpus): Define new functions.
16272 (translation_unit::lookup_function_type_in_translation_unit):
16273 Declare new friend function.
16274 (class type_or_decl_base): Declare this.
16275 (operator==(const type_or_decl_base&, const type_or_decl_base&)):
16276 Declare new operator.
16277 (operator==(const type_or_decl_base_sptr&, const
16278 type_or_decl_base_sptr&)): Likewise.
16279 (class {decl_base, type_base}): Make these class inherit
16281 (decl_base::get_member_scopes): New const overload.
16282 (bool operator==(const function_decl::parameter_sptr&,
16283 const function_decl::parameter_sptr&)): New operator.
16284 (function_type::get_parameters): Remove the non-const overload.
16285 (function_type::get_pretty_representation): Declare new member
16287 (method_type::get_pretty_representation): Likewise.
16288 * src/abg-ir.cc (bool operator==(const type_or_decl_base&, const
16289 type_or_decl_base&)): Define new equality operator.
16290 (bool operator==(const type_or_decl_base_sptr&, const
16291 type_or_decl_base_sptr&)): Likewise.
16292 (strip_typedef): Do not expect canonicalized types anymore. Now
16293 the system accepts (and expects) canonicalized types in certain
16294 cases. For instance, non-complete types and aggregated types that
16295 contain non-complete sub-types.
16296 (get_name, get_function_type_name, get_type_name)
16297 (get_pretty_representation, is_decl, is_type, is_function_type)
16298 (lookup_function_type_in_translation_unit)
16299 (synthesize_function_type_from_translation_unit)
16300 (lookup_type_in_scope, lookup_type_in_translation_unit): Define
16301 new functions or new overloads.
16302 (bool operator==(const function_decl::parameter_sptr&,
16303 const function_decl::parameter_sptr& r)): Define
16305 (function_type::get_parameters): Remove non-const overload.
16306 (function_type::get_pretty_representation): Define new function.
16307 (function_type::traverse): Adjust.
16308 (method_type::get_pretty_representation): Likewise.
16309 (function_decl::get_pretty_representation): Avoid emitting the
16311 (hash_type_or_decl): Define new function.
16312 * include/abg-dwarf-reader.h (create_read_context)
16313 (read_corpus_from_elf): Take a new 'read_all_types' flag.
16314 * src/abg-dwarf-reader.cc (read_context::load_all_types_): New
16316 (read_context::read_context): Initialize it.
16317 (read_context::canonical_types_scheduled): If some types still
16318 have non-canonicalized sub-types, then do not canonicalize them.
16319 (read_context::load_all_types): New member functions.
16320 (build_function_decl): Do not represent void return type like
16321 empty type anymore, rather, represent it like a void type node.
16322 (build_ir_node_from_die): When asked, load all types
16323 including those that are not reachable from an exported
16325 (create_read_context, read_corpus_from_elf): Take a new
16326 'load_all_types' flag and honour it.
16327 * src/abg-reader.cc (read_context::type_is_from_translation_unit):
16328 Support looking up function types in the current translation unit,
16329 now that we now how to lookup function types.
16330 * include/abg-comparison.h (diff_context::{has_diff_for, add_diff,
16331 set_canonical_diff_for, set_or_get_canonical_diff_for,
16332 get_canonical_diff_for}): Make these take instances of
16333 type_or_decl_base_sptr, instead of decl_base_sptr.
16334 (diff::diff): Likewise.
16335 (diff::{first_subject, second_subject}): Make these return
16336 type_or_decl_base_sptr instead of decl_base_sptr.
16337 (type_diff_base::type_diff_base): Make these take instances of
16338 type_or_decl_base_sptr instead of decl_base_sptr.
16339 (distinct_diff::distinct_diff): Likewise.
16340 (distinct_diff::{first, second}): Make these return
16341 type_or_decl_base_sptr instead of decl_base_sptr.
16342 (distinct_diff::entities_are_of_distinct_kinds): Make these take
16343 instances of type_or_decl_base_sptr instead of decl_base_sptr.
16344 (class function_type_diff): Create this new type. It's a
16345 factorization of the function_decl_diff type.
16346 * src/abg-comparison.cc ():
16347 * src/abg-comp-filter.cc ({harmless, harmful}_filter::visit):
16348 Adjust as diff::{first,second}_subject() now returns a
16349 type_or_decl_base_sptr, no more a decl_base_sptr.
16350 (decls_type, decls_diff_map_type): Remove these typedefs and replace it with ...
16351 (types_or_decls_type, types_or_decls_diff_map_type): ... these.
16352 (struct {decls_hash, decls_equals): Remove these type sand replace them with ...
16353 (struct {types_or_decls_hash, types_or_decls_equals}): ... these.
16354 ({type_suppression, variable_suppression}::suppresses_diff):
16356 (diff_context::priv::decls_diff_map): Replace this with ...
16357 (diff_context::priv::types_or_decls_diff_map): ... this.
16358 (diff_context::{has_diff_for, add_diff, get_canonical_diff_for,
16359 set_canonical_diff_for, set_or_get_canonical_diff_for}): Take
16360 type_or_decl_base_sptr instead of decl_base_sptr.
16361 (diff::priv::{first, second}_subject): Make the type of these be
16362 type_or_decl_base_sptr, no more decl_base_sptr.
16363 (diff::priv::priv): Adjust for the subjects of the diff being of
16364 type type_or_decl_sptr now, no more decl_base_sptr.
16365 (diff_less_than_functor::operator()(const diff_sptr, const
16366 diff_sptr) const): Adjust.
16367 (diff::diff): djust for the subjects of the diff being of type
16368 type_or_decl_sptr now, no more decl_base_sptr.
16369 (diff::{first,second}_subject): Make the type of these be
16370 type_or_decl_base_sptr, no more decl_base_sptr.
16371 (report_size_and_alignment_changes): Likewise.
16372 (type_diff_base::type_diff_base): Make the type of this be
16373 type_or_decl_base_sptr instead of type_base_sptr.
16374 (distinct_diff::distinct_diff): Make this take instances of
16375 type_or_decl_base_sptr instead of decl_base_sptr.
16376 (distinct_diff::{first, second, entities_are_of_distinct_kinds}):
16378 (distinct_diff::has_changes): Simplify logic.
16379 (distinct_diff::report): Adjust.
16380 (compute_diff_for_types): Add an additional case to support the
16382 (report_size_and_alignment_changes): Make this take instances of
16383 type_or_decl_base_sptr instead of decl_base_sptr.
16384 (class_diff::priv::member_type_has_changed): Return an instance of
16385 type_or_decl_base_sptr rather than a decl_base_sptr.
16386 (class_diff::report): Adjust.
16387 (diff_comp::operator()(const diff&, diff&) const): Adjust.
16388 (enum function_decl_diff::priv::Flags): Remove.
16389 (function_decl_diff::priv::{first_fn_flags_, second_fn_flags_,
16390 fn_flags_changes_}): Remove.
16391 (function_decl_diff::priv::{fn_is_declared_inline_to_flag,
16392 fn_binding_to_flag}): Remove.
16393 (function_decl_diff::{deleted_parameter_at,
16394 inserted_parameter_at}): Remove.
16395 (function_decl_diff::ensure_lookup_tables_populated): Empty this.
16396 (function_decl_diff::chain_into_hierarchy): Adjust.
16397 (function_decl_diff::function_decl_diff): This now only takes the
16398 subjects. It's body is now empty.
16399 (function_decl_diff::{return_type_diff, subtype_changed_parms,
16400 removed_parms, added_parms, type_diff}): Remove these member
16402 (function_decl_diff::type_diff): Define new member function.
16403 (function_decl_diff::report): Simplify logic by using the
16404 reporting of the child type diff node.
16405 (compute_diff): Likewise, in the overload for function_decl_sptr
16406 simplify logic by using the child type diff object.
16407 (function_type_diff::priv): Define new type.
16408 (function_type_diff::{function_type_diff,
16409 ensure_lookup_tables_populated, deleted_parameter_at,
16410 inserted_parameter_at, finish_diff_type, first_function_type,
16411 second_function_type, return_type_diff, subtype_changed_parms,
16412 removed_parms, added_parms, get_pretty_representation,
16413 has_changes, has_local_changes, report, chain_into_hierarchy}):
16414 Define new functions.
16415 (compute_diff): Define new overload for function_type_sptr.
16416 * tools/abicompat.cc (options::weak_mode): New data member.
16417 (options::options): Initialize it.
16418 (enum abicompat_status): New enum
16419 (abicompat_status operator|(abicompat_status, abicompat_status))
16420 (abicompat_status& operator|=(abicompat_status &, abicompat_status))
16421 (abicompat_status operator&(abicompat_status, abicompat_status)):
16422 New operators to manipulate the abicompat_status enum.
16423 (display_usage): Add help string for the new --weak-mode option.
16424 (parse_command_line): Add the new --weak-mode command line
16425 argument. If the tool is called with just the application and one
16426 library then assume that we are in the weak mode.
16427 (perform_compat_check_in_normal_mode): Define new function, factorized
16428 from what was in the main function.
16429 (perform_compat_check_in_weak_mode): Define new function.
16430 (struct {fn,var}_change): Define new types.
16431 (main): Use perform_compat_check_in_weak_mode() and
16432 perform_compat_check_in_normal_mode().
16433 * tools/abidiff.cc (main): Adjust.
16434 * tools/abidw.cc: (options::load_all_types): Add new data member.
16435 (options::options): Initialize it.
16436 (display_usage): New help string for --load-all-types.
16437 (parse_command_line): Support the new --load-all-types option.
16438 (main): Adjust and honour the --load-all-types option.
16439 * tools/abilint.cc (main): Adjust.
16440 * doc/manuals/abicompat.rst: Update documentation for the new weak
16441 mode. Also provide stuff that was missing from the examples
16443 * doc/manuals/abidw.rst: Update documentation for the new
16444 --load-all-types option.
16445 * tests/print-diff-tree.cc (main): Adjust.
16446 * tests/test-diff-dwarf.cc (main): Likewise.
16447 * tests/test-read-dwarf.cc (main): Likewise.
16448 * tests/data/test-abicompat/test0-fn-changed-app: Recompile this.
16449 * tests/data/test-abicompat/libtest5-fn-changed-libapp-v{0,1}.so:
16450 New new test input binaries
16451 * tests/data/test-abicompat/test5-fn-changed-app: Likewise.
16452 * tests/data/test-abicompat/test6-var-changed-app: Likewise.
16453 * tests/data/test-abicompat/libtest6-var-changed-libapp-v{0,1}.so:
16455 * tests/data/test-abicompat/test5-fn-changed-report-0.txt:
16456 Reference output for one test above.
16457 * tests/data/test-abicompat/test6-var-changed-report-0.txt:
16459 * tests/data/test-abicompat/test5-fn-changed-app.cc: Source file
16460 for a binary above.
16461 * tests/data/test-abicompat/test5-fn-changed-libapp-v{0,1}.{h,cc}:
16463 * tests/data/test-abicompat/test6-var-changed-libapp-v{0,1}.{cc,h}:
16465 * tests/data/test-abicompat/test6-var-changed-app.cc: Likewise.
16466 * tests/data/Makefile.am: Add the test related files above to the
16467 source distribution.
16468 * tests/test-abicompat.cc (in_out_spec): Add the new test input
16469 above to the list of inputs to feed to this test harness.
16470 (main): Support taking just the app and one library.
16471 * tests/data/test-read-dwarf/test{0, 1, 2.so, 3.so, 5.o,
16472 8-qualified-this-pointer.so,}.abi: Adjust for void type being
16473 really emitted now, as opposed to just being an empty type.
16475 2015-04-01 Dodji Seketeli <dodji@redhat.com>
16477 18186 - Assertion in abigail::ir::class_decl::hash::operator()
16478 * src/abg-dwarf-reader.cc (build_class_type_and_add_to_ir): When
16479 the size of the class is provided then the class is complete, no
16480 matter if this function called to update the class or to build it
16481 for the first time.
16483 2015-03-31 Sinny Kumari <sinny@redhat.com>
16485 Check if EM_AARCH64, EM_TILEPRO and EM_TILEGX macros are defined in elf.h
16486 * config.h.in: Generated autoheader by configure.ac
16488 * configure.ac: Defining HAVE_EM_AARCH64_MACRO,
16489 HAVE_EM_TILEPRO_MACRO and HAVE_EM_TILEGX_MACRO to check
16490 whether EM_AARCH64, EM_TILEPRO and EM_TILEGX macros are defined
16492 * src/abg-dwarf-reader.cc (e_machine_to_string): Look for
16493 EM_AARCH64, EM_TILEPRO and EM_TILEGX macros only
16494 if they are defined in elf.h
16496 2015-03-30 Dodji <dodji@ks305400.kimsufi.com>
16498 PR libabigail/18180
16499 * src/abg-hash.cc (class_decl::hash::operator()(const class_decl&)
16500 const): Return zero only for class declarations that are not
16502 * tests/data/test-read-write/test20.xml: Fix the output to make a
16503 class definition to reference its declaration, when there was a
16504 forward declaration for it.
16506 2015-03-30 Dodji Seketeli <dodji@redhat.com>
16508 18179 - abidiff crashes on libcangjie
16509 * include/abg-fwd.h (lookup_class_type_in_corpus)
16510 (lookup_class_type_in_translation_unit): Declare new functions.
16511 * src/abg-ir.cc (lookup_class_type_in_translation_unit): Define
16513 (get_node, convert_node_to_decl): Define new specializations for
16514 the class_decl type.
16515 * src/abg-corpus.cc (lookup_class_type_in_corpus): Define new
16517 * src/abg-dwarf-reader.cc
16518 (read_context::resolve_declaration_only_classes): Lookup class
16519 types specifically.
16521 2015-03-30 Dodji Seketeli <dodji@redhat.com>
16523 Forgot to initialize a data member
16524 * src/abg-reader.cc (read_context::read_context): Initialize the
16525 new m_exported_decls_builder_ data member.
16527 2015-03-30 Dodji Seketeli <dodji@redhat.com>
16529 18166 - Abidiff fails with internal on Libtirpc ABI in XML format
16530 * src/abg-reader.cc (read_context::m_exported_decls_builder_): New
16532 (read_context::read_context): Initialize it.
16533 (read_context::{type_is_from_translation_unit,
16534 get_exported_decls_builder, set_exported_decls_builder,
16535 maybe_add_fn_to_exported_decls, maybe_add_fn_to_exported_decls,
16536 type_id_new_in_translation_unit}): New member functions.
16537 (read_context::clear_per_translation_unit_data): Clear id->xml
16539 (read_context::clear_per_corpus_data): ... not here.
16540 (read_context::walk_xml_node_to_map_type_ids): Only walk the
16541 sub-tree we are asked to walk.
16542 (read_translation_unit_from_input): Cleanup.
16543 (read_corpus_from_input): Wire populating of exported declarations
16544 of the current corpus.
16545 (build_function_decl, build_var_decl): Populate exported
16546 declarations of the current corpus here.
16547 (build_type_decl, build_qualified_type_decl)
16548 (build_pointer_type_def, build_reference_type_def)
16549 (build_array_type_def, build_enum_type_decl, build_type_decl)
16550 (build_template_tparameter): Adjust assert on ID to make sure
16551 it's the first type it's being defined in the current translation
16553 * tests/data/test-abidiff/test-corpus0-report0.txt: New test
16555 * tests/data/test-abidiff/test-corpus0-v{0,1}.so.abi: New test
16557 * tests/test-abidiff.cc (specs): Add the test inputs above to the
16558 list of inputs over which to run the test harness.
16559 (main): Support reading corpora too, as this test harness was
16560 reading just translation units before.
16561 (tests/data/Makefile.am): Add test material above to source
16564 2015-03-19 Dodji Seketeli <dodji@redhat.com>
16566 Update the CONTRIBUTING file
16567 * CONTRIBUTING: How to check out the web pages.
16569 2015-03-19 Dodji Seketeli <dodji@redhat.com>
16571 Update website documentation
16572 * doc/website/mainpage.txt: Update the web page.
16574 2015-03-18 Dodji Seketeli <dodji@redhat.com>
16576 Cleanup type canonicalizing logic
16577 * src/abg-ir.cc (type_base::get_canonical_type_for): Cleanup the
16578 logic here. Basically since we are not trying to cache the result
16579 of type hashing anymore, this can be simpler.
16581 2015-03-18 Dodji Seketeli <dodji@redhat.com>
16583 Fix redundancy propagation on node with filtered local changes
16584 *NOT* take in account the categories inherited from its children
16585 nodes. That way, it's possible to know if the *local changes* of a
16586 given node have been filtered out.
16587 * include/abg-comparison.h (diff::{get_local_category,
16588 add_to_local_category, add_to_local_and_inherited_categories,
16589 remove_from_local_category, set_local_category,
16590 is_filtered_out_wrt_non_inherited_categories,
16591 has_local_changes_to_be_reported}): Declare new member functions.
16592 * src/abg-comp-filter.cc ({harmless, harmful}_filter::{visit,
16593 visit_end}): Update local category too.
16594 * src/abg-comparison.cc (diff::priv::local_category_): Add new
16596 (diff::priv::priv): Initialize it.
16597 (diff::priv::is_filtered_out): Add new member function. This is
16598 factorized out of diff::is_filtered_out().
16599 (diff::is_filtered_out): Re-write in terms of
16600 diff::priv::is_filtered_out().
16601 (diff::{get_local_category, add_to_local_category,
16602 add_to_local_and_inherited_categories, remove_from_local_category,
16603 set_local_category, is_filtered_out_wrt_non_inherited_categories,
16604 has_local_changes_to_be_reported}): Define new member functions.
16605 (suppression_categorization_visitor::visit_begin): Update local
16607 (redundancy_marking_visitor::visit_end): If all of the children
16608 nodes of the a diff node N are redundant and if N has filtered-out
16609 local changes, then N is redundant too.
16610 * tests/data/test-diff-filter/libtest28-redundant-and-filtered-children-nodes-v{1,2}.so:
16611 New binary test inputs.
16612 * tests/data/test-diff-filter/test28-redundant-and-filtered-children-nodes-v{0,1}.cc:
16613 Source code for the binary test inputs above.
16614 * tests/data/test-diff-filter/test28-redundant-and-filtered-children-nodes-report-{0,1}.txt:
16615 New test output references.
16616 * tests/test-diff-filter.cc (in_out_specs): Add the test inputs
16617 above to the set of inputs this test harness has to run over.
16618 * tests/data/Makefile.am: Add the test materials above to the
16619 source distribution.
16621 2015-03-17 Dodji Seketeli <dodji@redhat.com>
16623 Various style cleanups
16624 * src/abg-hash.cc (class_decl::hash::operator()(const class_decl&
16625 t) const): Fix comment.
16626 * src/abg-ir.cc (lookup_node_in_scope): Likewise.
16627 (class_decl::add_base_specifier): Use base_spec_sptr rather than
16628 shared_ptr<base_spec>.
16629 (class non_canonicalized_subtype_detector): Fix comment.
16631 2015-03-17 Dodji Seketeli <dodji@redhat.com>
16633 Make is_global_scope() return a pointer to the global scope
16634 * include/abg-fwd.h (is_global_scope): Return a global_scope*.
16635 * src/abg-ir.cc (is_global_scope): Likewise.
16637 2015-03-17 Dodji Seketeli <dodji@redhat.com>
16639 Add a useful assert in the comparison engine
16640 * src/abg-comparison.cc (qualified_type_diff::report): Assert that
16641 if the qualified type diff node has changes to be reported and no
16642 local change, then its child node must have changes to be
16645 2015-03-17 Dodji Seketeli <dodji@redhat.com>
16647 Fix diff report about non-static data members.
16648 * src/abg-comparison.cc
16649 (class_diff::priv::{get_deleted_non_static_data_members_number,
16650 get_inserted_non_static_data_members_number}): Define new member
16652 (class_diff::reports): Use the new functions above. Also, add
16653 forgotten new lines where they belong.
16655 2015-03-17 Dodji Seketeli <dodji@redhat.com>
16657 Do not cache hash values in decl_base::get_hash
16658 * src/abg-ir.cc (decl_base::get_hash): Do not cache the hash
16661 2015-03-17 Dodji Seketeli <dodji@redhat.com>
16663 Do not miss early non-complete type resolution when it's possible
16664 * src/abg-dwarf-reader.cc (build_class_type_and_add_to_ir): A type
16665 that has its size defined is not non-complete. Same if it has a
16666 method or a member type.
16668 2015-03-17 Dodji Seketeli <dodji@redhat.com>
16670 Delay non-complete class type resolution up to end of corpus reading
16671 * include/abg-fwd.h (lookup_type_in_corpus): Declare new function.
16672 * src/abg-corpus.cc (lookup_type_in_corpus): Define new function
16674 * include/abg-ir.h (function_types_type): Declare new typedef.
16675 (translation_unit::get_canonical_function_type): Remove member function.
16676 (translation_unit::bind_function_type_life_time): Declare new
16678 (classes_type): New typedef.
16680 (translation_unit::priv::canonical_function_types_): Remove data
16682 (translation_unit::priv::function_types): New data member.
16683 (translation_unit::get_canonical_function_type): Remove this
16684 function definition.
16685 (translation_unit::bind_function_type_life_time): New function
16687 (lookup_node_in_scope): Ensure that the type returned is
16689 * src/abg-dwarf-reader.cc (string_classes_map): New typedef.
16690 (read_context::decl_only_classes_map_): New data member.
16691 (read_context::declaration_only_classes): New accessor.
16692 (read_context::{maybe_schedule_declaration_only_class_for_resolution,
16693 is_decl_only_class_scheduled_for_resolution,
16694 resolve_declaration_only_classes, current_elf_file_is_executable,
16695 current_elf_file_is_dso}): Define new member functions.
16696 (read_context::clear_per_translation_unit_data): Do not clear the
16697 data structures that associate DIEs to decls/types or that contain
16698 the types to canonicalize here. Rather, clear them ...
16699 (read_context::clear_per_corpus_data): ... here instead.
16700 (read_context::build_translation_unit_and_add_to_ir): Do not
16701 perform late type canonicalizing here. Rather, do it ...
16702 (read_debug_info_into_corpus): ... here instead. And before that,
16703 call read_context::clear_per_corpus_data() and the new
16704 read_context::resolve_declaration_only_classes() here.
16705 (build_class_type_and_add_to_ir): Schedule the non-complete types
16706 for resolution to complete types. Assert that base classes that
16707 are non-complete are scheduled to be completed.
16708 (build_function_decl): Do not try to canonicalize function types
16709 this early, systematically. Now, all the non-complete types needs
16710 to be completed before starting canonicalizing. So let function
16711 types go through the normal processes of deciding when to
16712 canonicalize them. But then, bind the life time of the function
16713 type to the life time of the current translation unit.
16714 (maybe_canonicalize_type): If a class type is non-complete,
16715 schedule it for late canonicalizing.
16716 * src/abg-hash.cc (class_decl::hash::operator()(const class_decl&)
16717 const): During hashing, a base class should be complete.
16718 * src/abg-reader.cc
16719 (read_context::clear_per_translation_unit_data): Do not clear
16720 id/xml node, and type maps here. Rather, clear it ...
16721 (read_context::clear_per_corpus_data): ... here instead.
16722 (read_translation_unit_from_input): Do not perform late
16723 canonicalizing here. Rather, do it ...
16724 (read_corpus_from_input): ... here. Also, call the new
16725 read_context::clear_per_corpus_data() here.
16726 (build_function_decl): Do not canonicalize function types here so
16727 early. Rather, bind the life time of the function type to the
16728 life time of the translation unit.
16729 * src/abg-writer.cc (write_translation_unit): Do not clear the
16731 * tests/data/test-read-dwarf/test2.so.abi: Adjust test input.
16733 2015-03-17 Dodji Seketeli <dodji@redhat.com>
16735 Add --no-architecture option to abidw
16736 * tools/abidw.cc (options::write_architecture): New flag.
16737 (options::options): Initialize it.
16738 (display_usage): Add usage string for the new --no-architecture
16740 (parse_command): Parse the new --no-architecture command line
16742 (main): Ignore the architecture name if required by the user.
16744 2015-03-13 Dodji Seketeli <dodji@redhat.com>
16746 We shouldn't build qualified types with empty underlying type
16747 * src/abg-ir.cc (qualified_type_def::qualified_type_def): Assert
16748 that we shouldn't build qualified types with empty underlying
16751 2015-03-13 Dodji Seketeli <dodji@redhat.com>
16753 Add an overload for is_type() that takes naked pointers
16754 * include/abg-fwd.h (is_type): Declare new overload that takes a
16756 * src/abg-ir.cc (is_type): Define new overload that takes a naked
16759 2015-03-13 Dodji Seketeli <dodji@redhat.com>
16761 Declaration-only classes shouldn't have canonical types
16762 * include/abg-fwd.h (keep_type_alive): Declare new function.
16763 * src/abg-ir.cc (strip_typedef): Simplify logic. Support types
16764 that are not canonicalized.
16765 (type_base::get_canonical_type_for): For declaration-only classes,
16766 return an empty canonical class, forcing the class to be compared
16768 (keep_type_alive): Define new function.
16769 * src/abg-hash.cc ({decl_base, type_decl, scope_type_decl,
16770 qualified_type_def, pointer_type_def, reference_type_def,
16771 array_type_def, enum_type_decl, typedef_decl,
16772 class_decl::member_class_template, class_decl, type_tparameter,
16773 template_tparameter, }::hash::operator()): Do not cache the
16776 2015-03-13 Dodji Seketeli <dodji@redhat.com>
16778 Fix redundancy categorization propagation
16779 * src/abg-comparison.cc (redundancy_marking_visitor::visit_end):
16780 Consider the cases of changes that are a filtered out.
16781 * tests/data/test-diff-filter/libtest27-redundant-and-filtered-children-nodes-v{0,1}.so:
16782 New test binaries to use as test input.
16783 * tests/data/test-diff-filter/test27-redundant-and-filtered-children-nodes-report-{0,1,2}.txt:
16784 New test result baselines.
16785 * tests/data/test-diff-filter/test27-redundant-and-filtered-children-nodes-v{0,1}.cc:
16786 Source code for the test input binaries above.
16787 * tests/test-diff-filter.cc (in_out_spec): Add the binaries to the
16788 test inputs used for this test harness.
16789 * tests/data/Makefile.am: Add the new test material above to the
16792 2015-03-13 Dodji Seketeli <dodji@redhat.com>
16794 Fix thinko in has_virtual_mem_fn_change().
16795 * src/abg-comp-filter.cc (has_virtual_mem_fn_change): Fix thinko.
16797 2015-03-13 Dodji Seketeli <dodji@redhat.com>
16799 From inside the comparison engine re-use IR's equality operators
16800 * include/abg-ir.h (operator==(scope_decl_sptr, scope_decl_sptr)):
16802 (operator==(type_decl_sptr, type_decl_sptr)): Likewise.
16803 (operator==(enum_type_decl_sptr, enum_type_decl_sptr)): Likewise.
16804 * src/abg-comparison.cc (diff_length_of_decl_bases)
16805 (diff_length_of_type_bases): Remove these static functions.
16806 (class_diff::has_changes): Re-use the comparison operator for
16808 (type_decl_diff::has_changes): Re-use the comparison operator for
16810 * src/abg-ir.cc (operator==(scope_decl_sptr, scope_decl_sptr)):
16812 (operator==(type_decl_sptr, type_decl_sptr)): Likewise.
16813 (operator==(enum_type_decl_sptr, enum_type_decl_sptr)): Likewise.
16815 2015-03-11 Dodji Seketeli <dodji@redhat.com>
16817 Remove unnecessary vertical white space from diff report
16818 * src/abg-comparison.cc (class_diff::report): When reporting
16819 virtual member functions make sure to emit the newline only if one
16820 report for member function has already been emitted.
16822 2015-03-10 Dodji Seketeli <dodji@redhat.com>
16824 Cleanup array_type_def::is_infinite
16825 * src/abg-ir.cc (array_type_def::is_infinite): Style cleanup.
16827 2015-03-10 Dodji Seketeli <dodji@redhat.com>
16829 Make a function static as it oughts to be
16830 * src/abg-ir.cc (get_type_representation): Make this static.
16832 2015-03-10 Dodji Seketeli <dodji@redhat.com>
16834 Canonicalize function types
16835 * src/abg-dwarf-reader.cc (build_function_decl): Call
16836 maybe_canonicalize_type to canonicalize the function type.
16838 2015-03-10 Dodji Seketeli <dodji@redhat.com>
16840 Use more naked pointers when comparing function types
16841 * src/abg-ir.cc (equals): In the overload for function types, use
16842 more naked pointers, less smart pointers.
16844 2015-03-10 Dodji Seketeli <dodji@redhat.com>
16846 Pass a bunch of smart pointers by reference
16847 * include/abg-fwd.h (get_member_is_static, is_member_function)
16848 (get_member_function_is_ctor, set_member_function_is_ctor)
16849 (get_member_function_is_dtor, set_member_function_is_dtor)
16850 (get_member_function_is_const, set_member_function_is_const)
16851 (get_member_function_vtable_offset)
16852 (set_member_function_vtable_offset)
16853 (get_member_function_is_virtual): Declare the smart pointer
16854 parameter of these as being passed by reference.
16855 * include/abg-ir.h (get_member_access_specifier)
16856 (get_member_is_static, get_member_access_specifier)
16857 (set_member_function_is_ctor, set_member_function_is_const)
16858 (set_member_function_vtable_offset): Likewise, for these friend
16859 declarations to the decl_base type.
16860 * src/abg-ir.cc (get_member_access_specifier)
16861 (get_member_is_static, is_member_function)
16862 (get_member_function_is_ctor, set_member_function_is_ctor)
16863 (get_member_function_is_dtor, set_member_function_is_dtor)
16864 (get_member_function_is_const, set_member_function_is_const)
16865 (get_member_function_vtable_offset)
16866 (set_member_function_vtable_offset)
16867 (get_member_function_is_virtual): In these definitions, the smart
16868 pointer parameter is passed by reference.
16870 2015-03-10 Dodji Seketeli <dodji@redhat.com>
16872 Make decl_base::get_context_rel() return a naked pointer
16873 * include/abg-fwd.h (set_member_is_static): Add an overload that
16874 takes the member as a reference to a smart pointer.
16875 (set_member_function_{is_dtor, is_ctor, is_const, vtable_offset,
16876 is_virtual}): Pass the member function as a reference.
16877 (set_member_function_is_const, set_member_function_is_virtual):
16878 Pass the member function as a non-const reference.
16879 * include/abg-ir.h (decl_base::get_context_rel): Return a naked
16881 (set_member_is_static, set_member_function_is_virtual): Adjust
16882 this friend declaration.
16883 (set_member_access_specifier): Add an overload that takes a
16884 reference to the member. Pass a reference to smart pointer to the
16886 (set_member_function_is_{is_ctor,is_dtor,is_const,is_virtual,vtable_offset}):
16887 Take a non-const reference to function_decl.
16888 * src/abg-ir.cc (decl_base::get_context_rel): Likewise.
16889 (equals(const decl_base&, const decl_base&, change_kind*)):
16891 (equals(const var_decl&, const var_decl&, change_kind*)):
16893 (get_member_access_specifier, get_member_is_static)
16894 (set_data_member_offset, get_data_member_offset)
16895 (set_data_member_is_laid_out, get_data_member_is_laid_out)
16896 (get_member_function_is_ctor, set_member_function_is_ctor)
16897 (get_member_function_is_dtor, set_member_function_is_dtor)
16898 (get_member_function_is_const, set_member_function_is_const)
16899 (get_member_function_vtable_offset)
16900 (set_member_function_vtable_offset)
16901 (get_member_function_is_virtual, set_member_function_is_virtual):
16903 (set_member_access_specifier): Add an overload that takes a
16904 reference to decl_base.
16905 (set_member_is_static, set_member_function_{is_dtor, is_ctor,
16906 is_const, vtable_offset, is_virtual}): Pass the member function as
16907 a reference.): Add an overload that takes the member as a
16908 reference, and write the older overload in terms of the new one.
16910 2015-03-09 Dodji Seketeli <dodji@redhat.com>
16912 Make overloads of decl_base::get_qualified_name() return a reference
16913 * incude/abg-ir.h (decl::get_{qualified_name,
16914 qualified_parent_name}): Return a reference to a string rather
16915 than a copy of a string.
16916 (qualified_type_def::get_qualified_name): Likewise.
16917 (reference_type_def::get_qualified_name): Likewise.
16918 (array_type_def::get_qualified_name): Likewise.
16919 (class enum_type_decl::enumerator): Make this is an out-of-line
16920 pimpled class implementation.
16921 (enum_type_decl::enumerator::{get, set}_enum_type): Declare new
16923 (enum_type_decl::enumerator::get_qualified_name): Change this so
16924 that it doesn't take the name of the enum type anymore.
16925 * src/abg-comparison.cc (enum_diff::report): Adjust for
16926 enum_type_decl::enumerator::get_qualified_name() not taking the
16927 name of the enum type anymore.
16928 * src/abg-ir.cc (decl_base::get_qualified_parent_name): Return a
16929 reference to string.
16930 (decl_base::get_qualified_name): Likewise.
16931 (decl_base::get_qualified_name(string&)): Use the new verson of
16932 decl_base::get_qualified_name() that returns a reference.
16933 ({qualified_type_def, pointer_type_def, reference_type_def,
16934 array_type_def}::get_qualified_name()): Return a string reference.
16935 ({qualified_type_def, pointer_type_def, reference_type_def,
16936 array_type_def}::get_qualified_name(string& qualified_name)
16937 const): Use the new qualified_type_def::get_qualified_name() that
16938 returns a string reference.
16939 (class enum_type_decl::priv): New type.
16940 (enum_type_decl::{get_underlying_type, get_enumerators}): Adjust.
16941 (enum_type_decl::{enumerator::enumerator, enumerator::operator==,
16942 enumerator::get_name, enumerator::get_qualified_name,
16943 enumerator::set_name, enumerator::get_value,
16944 enumerator::set_value, enumerator::get_enum_type,
16945 enumerator::set_enum_type}): Define methodes out-of-line here.
16947 2015-02-24 Dodji Seketeli <dodji@redhat.com>
16949 Harden strip_typedef
16950 * src/abg-ir.cc (strip_typedef): Consider that the underlying type
16953 2015-02-24 Dodji Seketeli <dodji@redhat.com>
16955 When reading DWARF set member type access where the type is built
16956 * include/abg-fwd.h (is_class(decl_base*)): Return a class_decl*
16957 rather than just a bool.
16958 * abg-ir.cc (is_class(decl_base*)): Return a class_decl* rather
16959 than just a bool. Simplify the implementation.
16960 * src/abg-dwarf-reader.cc
16961 (maybe_set_member_type_access_specifier): Define new static
16963 (build_ir_node_from_die): Remove the is_member_type flag. When
16964 building member types set their access specifier. Simplify the
16965 logic of detecting that a type is a member type; basically
16966 delegate taht to the new maybe_set_member_type_access_specifier().
16967 (build_class_type_and_add_to_ir): Do not try to set the member
16968 type access specifiers anymore.
16969 (build_qualified_type, build_pointer_type, build_reference_type)
16970 (build_typedef_type, build_var_decl, build_function_decl): Adjust.
16972 2015-02-24 Dodji Seketeli <dodji@redhat.com>
16974 Fix enum_diff::has_changes()
16975 * src/abg-comparison.cc (enum_diff::has_changes): Just use the
16976 normal comparison operator to compare the two enums here. It's
16979 2015-02-23 Dodji Seketeli <dodji@redhat.com>
16981 Build the set of exported decls directly during DWARF loading
16982 * include/abg-ir.h ({var,function}_decl::get_id): Return a
16984 * src/abg-ir.cc ({var,function}_decl::get_id): Return a reference
16985 to the string rather than copying it over.
16986 * include/abg-corpus.h (class corpus::exported_decls_builder):
16988 (corpus::{sort_functions, sort_variables,
16989 maybe_drop_some_exported_decls, get_exported_decls_builder}):
16990 Declare new methods.
16991 * src/abg-corpus.h (corpus::exported_decls_builder::priv): Define
16993 (class symtab_build_visitor_type): Remove this type that is
16995 (corpus::exported_decls_builder::{exported_decls_builder,
16996 exported_functions, exported_variables,
16997 maybe_add_fn_to_exported_fns, maybe_add_var_to_exported_vars}):
16998 Define new functions.
16999 (corpus::priv::is_public_decl_table_built): Remove this data
17000 member. It's now useless.
17001 (corpus::priv::priv): Adjust.
17002 (corpus::priv::build_public_decl_table): Remove this member
17003 function. It's now useless.
17004 (corpus::{priv::build_unreferenced_symbols_tables, get_functions,
17005 get_variables}): No need to build the public decls table here.
17006 It's already built by the time the corpus is read from DWARF now.
17007 (corpus::{sort_functions, sort_variables,
17008 maybe_drop_some_exported_decls, get_exported_decls_builder}):
17009 Define new member functions.
17010 * src/abg-dwarf-reader.cc (read_context::exported_decls_builder):
17012 (read_context::read_context): Initialize it.
17013 (read_context::{exported_decls_builder,
17014 maybe_add_fn_to_exported_fns, maybe_add_var_to_exported_vars}):
17015 Define new member functions.
17016 (read_debug_info_into_corpus): Get the the new
17017 'exported_decls_builder' object from the corpus and stick it into
17018 the read context so the DWARF reading code can use it to build the
17019 exported decls set. When the DWARF reading is done, sort the set
17020 of exported functions and variables that was built.
17021 (build_ir_node_from_die): When a function or variable is built,
17022 consider putting it into the set of exported decls.
17023 * tools/abicompat.cc (main): Now that the exported decls is built
17024 *before* we had a chance to stick the list of symbol IDs to keep,
17025 call corpus::maybe_drop_some_exported_decls() to update the set of
17026 exported decls we should consider for the corpus.
17027 was applied to that list and the final
17029 2015-02-22 Dodji Seketeli <dodji@redhat.com>
17031 Fix canonicalizing of member types ... *AGAIN*
17032 * src/abg-dwarf-reader.cc (build_ir_node_from_die): For typedefs,
17033 we don't need to test that the current scope is a class to know
17034 that we are looking at a member type. Just looking at the
17035 is_member flag is enough.
17036 So the issue arises when for instance, we are reading a class that
17037 defines a member typedef (or enum) and uses that enum as the type of a
17038 data member. When reading that data member (before reading the
17039 definition of the typedef), we read the type of the data member; so we
17040 hit the typedef. But build_ir_node_from_die() cannot fully construct
17041 the scope of the typedef before handing off the typedef because we are
17042 currently building it! So it hands out a non-complete version of the
17043 class that is being built; 'is_member' is not set to 'true' because
17044 we are getting the type of the data member; it's not *necessarily* a
17045 member type. So we need to check !is_class_type(scope) to know if we
17046 are given a member type. I am now thinking that the "is_member" flag
17047 is actually useless. I think I'll remove it in a later patch.
17048 Anyway, this fixes 'abidiff libabigail.so libabigail.so' again. I
17049 have some stashed patches that brings it's time down to ~ 45 seconds.
17050 So we are getting close to being able to include that *ultimate* test in
17051 regression test suite. Oh well.
17052 * src/abg-dwarf-reader.cc (build_ir_node_from_die): When building
17053 typedefs, enum and memeber classes, check that the scope is a
17054 member class to detect if we are building a member type. In which
17055 case the caller is going to handle the canonicalizing of the
17056 member type *after* it's access specification has been adjusted.
17057 Otherwise, that adjustments happens after the type has been
17058 canonicalized and bad things happen at comparison type.
17060 2015-02-21 Dodji Seketeli <dodji@redhat.com>
17062 Bug 17649 Avoid endless looping on diff graph with cycles
17063 * include/abg-comp-filter.h (harm{less,ful}_filter::visit_end):
17064 Declare new methods.
17065 * include/abg-comparison.h (diff_context::maybe_apply_filters):
17066 Remove the traverse_nodes_once flag.
17067 * src/abg-comp-filter.cc (apply_filter): Force the traversing to
17068 operate in cycle avoidance mode.
17069 (harm{less,ful}_filter::visit): Update the category of the
17070 canonical node too.
17071 (harm{less,ful}_filter::visit_end): Define new method.
17072 * src/abg-comparison.cc (diff_context::maybe_apply_filters):
17073 Remove the traverse_nodes_once flag. Adjust. Simplify logic.
17074 (diff::traverse): Always call diff_node_visitor::{begin,end}. If
17075 the node has already been visited previously then do not call
17076 diff_node_visitor::visit() and do not visit the children nodes.
17077 (category_propagation_visitor::visit_end): If the node has
17078 already been visited, then propagate the category from the
17079 canonical nodes of the children nodes.
17080 (propagate_categories): Force the traversing to operate in cycle
17083 2015-02-20 Dodji Seketeli <dodji@redhat.com>
17085 Add missing new line after reporting alignment changes
17086 * src/abg-comparison.cc (distinct_diff::report): After calling
17087 report_size_and_alignment_changes, one needs to add a new line if
17088 some stuff got emitted out the output stream.
17090 2015-02-20 Dodji Seketeli <dodji@redhat.com>
17092 Add type checking overloads that ease their calling from GDB
17093 * include/abg-fwd.h (is_class_type, is_pointer, is_reference_type)
17094 (is_qualified_type): Declare overloads that take naked (non-smart)
17096 * src/abg-ir.cc (is_class_type, is_pointer, is_reference_type)
17097 (is_qualified_type): Define overloads that take naked (non-smart)
17100 2015-02-20 Dodji Seketeli <dodji@redhat.com>
17102 Remove overly eager assert in distinct_diff::report
17103 * src/abg-comparison.cc (distinct_diff::report): Remove over-eager
17106 2015-02-20 Dodji Seketeli <dodji@redhat.com>
17108 Factorize late canonicalizing code in the dwarf reader
17109 * src/abg-dwarf-reader.cc
17110 (read_context::{canonicalize_types_scheduled,
17111 perform_late_type_canonicalizing}): Factorize these from ...
17112 (build_translation_unit_and_add_to_ir): ... here.
17114 2015-02-20 Dodji Seketeli <dodji@redhat.com>
17116 Rename schedule_type_for_canonicalization -> schedule_type_for_late_canonicalization
17117 * src/abg-dwarf-reader.cc
17118 (read_context::schedule_type_for_late_canonicalization): Renamed
17119 read_context::schedule_type_for_canonicalization into this. Also,
17120 add some sanity checking code in there.
17121 (build_class_type_and_add_to_ir, maybe_canonicalize_type): Adjust.
17123 2015-02-20 Dodji Seketeli <dodji@redhat.com>
17125 Adjust semantics of the 'is_member' flag of build_ir_node_from_die()
17126 * src/abg-dwarf-reader.cc (build_ir_node_from_die): Rename
17127 is_member into is_member_type. Adjust.
17128 (get_scope_for_die, build_translation_unit_and_add_to_ir)
17129 (build_namespace_decl_and_add_to_ir): Adjust.
17130 (build_class_type_and_add_to_ir): Adjust. Adjust set to false
17131 when calling build_ir_node_from_die() to build a function_decl.
17133 2015-02-20 Dodji Seketeli <dodji@redhat.com>
17135 Simplify canonicalizing handling for typedefs
17136 * src/abg-dwarf-reader.cc (build_ir_node_from_die): For typedefs,
17137 we don't need to test that the current scope is a class to know
17138 that we are looking at a member type. Just looking at the
17139 is_member flag is enough.
17141 2015-02-20 Dodji Seketeli <dodji@redhat.com>
17143 Do not miss canonicalizing opportunities on non-member class types
17144 * src/abg-dwarf-reader.cc (build_ir_node_from_die): When a class
17145 is not a member type, then it at least ought to be scheduled for
17146 late canonicalizing.
17148 2015-02-20 Dodji Seketeli <dodji@redhat.com>
17150 Fix handling of canonicalizing of member enum types
17151 * src/abg-dwarf-reader.cc (build_ir_node_from_die): Once we've
17152 built the enum type by calling build_enum_type(), do not try to
17153 canonicalize it here if it's a member type. The calling
17154 build_class_type_and_add_to_ir() must deal with it already.
17156 2015-02-20 Dodji Seketeli <dodji@redhat.com>
17158 Stick qualified, pointer, reference and array types into the global scope
17159 * src/abg-dwarf-reader.cc (build_class_type_and_add_to_ir): Do not
17160 consider qualified, pointer, reference and array types as member
17161 types. Only typedef, class and enum types are.
17162 (build_ir_node_from_die): Stick base, pointer, reference,
17163 qualified and array types into the global scope.
17165 2015-02-20 Dodji Seketeli <dodji@redhat.com>
17167 Avoid creating multiple versions of certain composite types
17168 * src/abg-dwarf-reader.cc (build_qualified_type)
17169 (build_pointer_type_def, build_reference_type, build_array_type)
17170 (build_typedef_type): If the composite type we are about to create
17171 was already created, just return the one that exists already.
17173 2015-02-20 Dodji Seketeli <dodji@redhat.com>
17175 Do not forget to canonicalize enum underlying type and void type
17176 * src/abg-dwarf-reader.cc (build_enum_type): Canoncialize the
17177 underlying type of the enum type.
17178 (build_ir_node_for_void_type): Canonicalize the void type.
17180 2015-02-20 Dodji Seketeli <dodji@redhat.com>
17182 Do not forget to associate DIE to the types they represent
17183 * src/abg-dwarf-reader.cc (build_type_decl, build_enum_type)
17184 (build_qualified_type, build_pointer_type_def)
17185 (build_reference_type, build_typedef_type)
17186 (build_class_type_and_add_to_ir): Take a new flag that says if the
17187 DIE is from the alternate debug info section or not. Perform the
17188 DIE->type association in these functions. Note that in
17189 build_class_type_and_add_to_ir we are now doing the DIE->type
17190 association even for declaration-only classes. And for member
17191 types, do not bother doing the association because it's already
17192 been done by build_ir_node_from_die().
17193 (build_ir_node_from_die): Do not do the DIE->type association here
17194 anymore. Adjust to the new signature of the build_* functions
17195 above that actually build the types.
17197 2015-02-20 Dodji Seketeli <dodji@redhat.com>
17199 Clear per-TU data before reading debub info for a TU
17200 * src/abg-dwarf-reader.cc
17201 (read_context::die_type_map): New accessor for the two DIE->Type
17202 maps we have; the one of the main debug info section and the one
17203 of the alternate debug info section.
17204 (read_context::{associate_die_to_type,
17205 lookup_type_from_die_offset}): use the new die_type_map()
17207 (read_context::clear_per_translation_unit_data): Factorize this
17208 from build_translation_unit_and_add_to_ir(). Also, add code to
17209 clear the DIE->type map as well as the vectors of offsets of the
17210 types of the DIEs to canonicalize after the translation unit has
17213 2015-02-19 Dodji Seketeli <dodji@redhat.com>
17215 Fix the new regression test for type canonicalizing
17216 * tests/runtestcanonicalizetypes.sh.in (binaries): Refer to
17217 abg-tools-utils, not abg-tools-utils.o; the extension is computed
17218 automatically, depending on the underlying platform.
17220 2015-02-19 Dodji Seketeli <dodji@redhat.com>
17222 Make strip_typedef() act on canonical types only
17223 * include/abg-fwd.h (is_compatible_with_class_type): Declare new
17225 (canonicalize): Move the declaration here, from ...
17226 * include/abg-ir.h (canonicalize): ... here.
17227 * src/abg-ir.cc (strip_typedef): Assert that the input type is
17228 canonicalized. Make sure that weak references are on
17229 canonicalized types. Make sure that the returned type is a
17231 (canonicalize): Make this return the canonical type that it has
17233 * src/abg-comp-filter.cc (type_size_changed): Use the new
17234 is_compatible_with_class_type() function, instead of
17237 2015-02-18 Dodji Seketeli <dodji@redhat.com>
17239 Speed up function_decl::get_id() and var_decl::get_id()
17240 * src/abg-ir.cc (var_decl::priv::id_): New data member.
17241 (var_decl::get_id): Cache the result on the first invocation and
17242 and returns it on subsequent invocations.
17243 (function_dec::priv::id_): New data member.
17244 (function_decl::get_id): Cache the result on the first invocation
17245 and and returns it on subsequent invocations.
17247 2015-02-18 Dodji Seketeli <dodji@redhat.com>
17249 Speed up symbol version reading
17250 * src/abg-dwarf-reader.cc (find_symbol_table_section)
17251 (get_symbol_versionning_sections): Forward declare these existing
17253 (read_context::{symtab_section_,
17254 symbol_versionning_sections_loaded_,
17255 symbol_versionning_sections_found_, versym_section_
17256 verdef_section, verneed_section}): New data members.
17257 (read_context::read_context): Initialize them.
17258 (read_context::{find_symbol_table_section,
17259 get_symbol_versionning_sections, get_version_for_symbol}):
17260 Implement a caching version of their exisiting non-caching
17262 (read_context::lookup_elf_symbol_from_index): Use the new caching
17263 functions read_context::find_symbol_table_section and
17264 read_context::get_version_for_symbol.
17265 (read_context::load_symbol_maps): Likewise, use the new caching
17266 function read_context::find_symbol_table_section.
17268 2015-02-17 Dodji Seketeli <dodji@redhat.com>
17270 Stop traversing function/variable node when added to symbol table
17271 * src/abg-corpus.cc (symtab_build_visitor_type::visit_begin):
17272 Replace symtab_build_visitor_type::visit_end with this and return
17275 2015-02-13 Dodji Seketeli <dodji@redhat.com>
17277 Do not apply diff filters sub-tree not carrying changes
17278 * src/abg-comp-filter.cc ({harmless, harmful}_filter::visit): Do
17279 not try to do the categorizing on a diff sub-tree that does
17280 not carry any change.
17281 * src/abg-comparison.cc (diff_context::maybe_apply_filters): Do
17282 not bother trying to apply the filters on a diff sub-tree that
17283 does not carry any change.
17285 2015-02-13 Dodji Seketeli <dodji@redhat.com>
17287 Canonicalize types either early or late after TU reading
17288 * include/abg-fwd.h (is_class_type)
17289 (type_has_non_canonicalized_subtype): Declare new functions.
17290 (is_member_type): Remove the overload that takes a decl_base_sptr.
17291 It's superfluous. We just need the one that takes a
17293 * include/abg-ir.h (translation_unit::{is_constructed,
17294 set_is_constructed}): Add new methods.
17295 (class_decl::has_virtual_member_functions): Likewise.
17296 (class decl_base): Makes it virtually inherit ir_traversable_base.
17297 (class type_base): Make this virtually inherit traversable_base
17299 (type_base::canonicalize): Renamed enable_canonical_equality
17301 (type_base::traverse): Declare new virtual method.
17302 (canonicalize): Renamed enable_canonical_equality into this.
17303 (scope_type_decl::traverse): Declare new virtual method.
17304 (namespace_decl::get_pretty_representation): Declare new virtual
17306 (function_type::traverse): Likewise.
17307 (class_decl::base_spec::traverse): Likewise.
17308 (ir_node_visitor::visit): Remove the overloads and replace each of
17309 them with a pair of ...
17310 (ir_node_visitor::{visit_begin, visit_end}): ... of these.
17311 * include/abg-traverse.h (traversable_base::visiting): New
17313 (traversable_base::visiting_): New data member.
17314 (traversable_base::traversable_base): New constructor.
17315 * src/abg-ir.cc ({scope_decl, type_decl, namespace_decl,
17316 qualified_type_def, pointer_type_def, reference_type_def,
17317 array_type_def, enum_type_decl, typedef_decl, var_decl,
17318 function_decl, function_decl::parameter, class_decl,
17319 class_decl::member_function_template,
17320 class_decl::member_class_template, function_tdecl,
17321 class_tdecl}::traverse): Fix this to properly set the
17322 traversable_base::visiting_ flag and to reflect the new signatures
17323 of the ir_node_visitor methods.
17324 ({type_base, scope_type_decl, function_type,
17325 class_decl::base_spec}::traverse): New method.
17326 (type_base::get_canonical_type_for): Handle the case of the type
17327 already having a canonical type. Properly hash the type using the
17328 dynamic type hasher. Look through declaration-only classes to
17329 consider the definition of the class instead. Fix logic to have a
17330 single pointer of return, to ease debugging.
17331 (canonicalize): Renamed enable_canonical_equality into this.
17332 (namespace_decl::get_pretty_representation): Define new method.
17333 (ir_node_visitor::visit): Replace each of these overloads with a
17334 pair of visit_begin/visit_end ones.
17335 (translation_unit::priv::is_constructed_): New data member.
17336 (translation_unit::priv::priv): Initialize it.
17337 (translation_unit::{is_constructed, set_is_constructed}): Define
17339 (is_member_type(const decl_base_sptr)): Remove.
17340 (is_class_type(decl_base *d)): Define new function.
17341 (class_decl::has_virtual_member_functions): Define new method.
17342 (equals(const class_decl&, const class_decl&, change_kind*)): If
17343 the containing translation unit is not constructed yet, do not
17344 take virtual member functions in account when comparing the
17345 classes. This is because when reading from DWARF, there can be
17346 DIEs that change the number of virtual member functions after the
17347 DIE of the class. So one needs to start taking virtual members
17348 into account only after the translation unit has been constructed.
17349 (class non_canonicalized_subtype_detector): Define new type.
17350 (type_has_non_canonicalized_subtype): Define new function.
17351 * src/abg-corpus.cc (symtab_build_visitor_type::visit): Renamed
17352 this into symtab_build_visitor_type::visit_end.
17353 * src/abg-dwarf-reader.cc (die_type_map_type): New typedef.
17354 (die_class_map_type): This is now a typedef on a map of
17355 Dwarf_Off/class_decl_sptr.
17356 (read_context::{die_type_map_, alternate_die_type_map_,
17357 types_to_canonicalize_, alt_types_to_canonicalize_}): New data
17359 (read_context::{associate_die_to_decl,
17360 associate_die_to_decl_primary}): Make these methods public.
17361 (read_context::{associate_die_to_type,
17362 lookup_type_from_die_offset, is_wip_class_die_offset,
17363 types_to_canonicalize, schedule_type_for_canonicalization}):
17364 Define new methods.
17365 (build_type_decl, build_enum_type)
17366 (build_class_type_and_add_to_ir, build_qualified_type)
17367 (build_pointer_type_def, build_reference_type, build_array_type)
17368 (build_typedef_type, build_function_decl): Do not canonicalize
17370 (maybe_canonicalize_type): Define new function.
17371 (build_ir_node_from_die): Take a new flag that says if the ir node
17372 is a member type/function or not. Early-canonicalize base types.
17373 Canonicalize composite types that have only canonicalized
17374 sub-types. Schedule the other types for late canonicalizing. For
17375 class types, early canonicalize those that are non-member types,
17376 that are fully constructed and that have only canonicalized
17377 sub-types. Adjust to the new signature of build_ir_node_from_die.
17378 (get_scope_for_die, build_namespace_decl_and_add_to_ir)
17379 (build_qualified_type, build_pointer_type_def)
17380 (build_reference_type, build_array_type, build_typedef_type)
17381 (build_var_decl, build_function_decl): Adjust for the new
17382 signature of build_ir_node_from_die.
17383 (build_translation_unit_and_add_to_ir): Likewise. Perform the
17384 late canonicalizing of the types that have been scheduled for
17386 (build_class_type_and_add_to_ir): Return a class_decl_sptr, not a
17387 decl_base_sptr. Adjust for the new signature of
17388 build_ir_node_from_die. Early canonicalize member types that are
17389 created and added to a given class, or schedule them for late
17391 * src/abg-reader.cc (class read_context::{m_wip_classes_map,
17392 m_types_to_canonicalize}): New data members.
17393 (read_context::{clear_types_to_canonicalize,
17394 clear_wip_classes_map, mark_class_as_wip, unmark_class_as_wip,
17395 is_wip_class, maybe_canonicalize_type,
17396 schedule_type_for_late_canonicalizing,
17397 perform_late_type_canonicalizing}): Add new method definitions.
17398 (read_context::clear_per_translation_unit_data): Call
17399 read_context::clear_types_to_canonicalize().
17400 (read_translation_unit_from_input): Call
17401 read_context::perform_late_type_canonicalizing() at the end of the
17403 (build_function_decl): Fix the function type canonicalizing (per
17404 translation) that was already in place. Do the canonicalizing of
17405 these only when the type is fully built. Oops. This was really
17406 brokend. Also, when the function type is constructed, consider it
17407 for type canonicalizing.
17408 (build_type_decl): Early canonicalize basic types.
17409 (build_qualified_type_decl, build_pointer_type_def)
17410 (build_pointer_type_def, build_reference_type_def)
17411 (build_array_type_def, build_enum_type_decl, build_typedef_decl):
17412 Handle the canonicalizing for these composite types: either early
17414 (build_class_decl): Likewise. Also, mark this class a 'being
17415 built' until it's fully built. This helps the canonicalizing code
17416 to know that it should leave a class alone until it's fully built.
17417 * tests/test-ir-walker.cc (struct name_printing_visitor): Adjust
17418 to the visitor methods naming change.
17419 * configure.ac: Generate the tests/runtestcanonicalizetypes.sh
17420 testing script from tests/runtestcanonicalizetypes.sh.in.
17421 * tests/runtestcanonicalizetypes.sh.in: Add the template for the
17422 new runtestcanonicalizetypes.sh script that test for type
17424 * tests/Makefile.am: Add the new runtestcanonicalizetypes.sh
17425 regression testing script to the build system.
17427 2015-02-18 Dodji Seketeli <dodji@redhat.com>
17429 Factorize per TU data clearing in the xml-abi reader
17430 * src/abg-reader.cc
17431 (read_context::clear_per_translation_unit_data): Factorize this
17432 function out of ...
17433 (read_context::read_translation_unit_from_input): ... this one.
17435 2015-02-13 Dodji Seketeli <dodji@redhat.com>
17437 Use the deep type sptr equality operator when possible
17438 * src/abg-ir.cc (equals): On function_decl overload, use the deep
17439 sptr type equality operator when comparing types.
17440 (non_type_tparameter::operator==): Likewise.
17442 2015-02-18 Dodji Seketeli <dodji@redhat.com>
17444 Properly compare virtualness of member functions
17445 * src/abg-ir.cc (equals(const function_decl&, const
17446 function_decl&, change_kind*)): Compare virtualness of member
17447 function before comparing their vtable offsets.
17449 2015-02-13 Dodji Seketeli <dodji@redhat.com>
17452 * include/abg-ir.h (reference_type_def::get_pointed_to_type): use
17453 type_base_sptr, rather than shared_ptr<type_base>
17454 (typdef_decl::get_underlying_type): Likewise.
17455 (function_decl::get_return_type): Likewise.
17456 (function_decl::set_type): Likewise.
17457 (class_decl::member_class_template::as_class_tdecl): Likewise.
17458 * src/abg-comparison.cc (compute_diff): Remove useless vertical
17460 (corpus_diff::traverse): Add a vertical space after this.
17461 * src/abg-dwarf-reader.cc (type_ptr_map): Remove this unused
17463 (get_version_for_symbol)
17464 (finish_member_function_reading): Fix the comments of these
17466 * src/abg-reader.cc (build_function_decl): Return a
17467 function_decl_sptr rather than a shared_ptr<function_decl>.
17468 (build_qualified_type_decl)
17469 (build_pointer_type_def, build_reference_type_def)
17470 (build_array_type_def, build_typedef_decl, build_class_decl): Use
17471 the is_<someking_of_type> functions here, rather than using the
17472 dynamic cast. This increases maintainability.
17474 2015-02-11 Dodji Seketeli <dodji@redhat.com>
17476 Optimize compressed debug info reading for speed
17477 * src/abg-dwarf-reader.cc
17478 (find_last_import_unit_point_before_die): Look for the inclusion
17479 point of the partial unit in reverse topological order.
17481 2015-02-10 Dodji Seketeli <dodji@redhat.com>
17483 Share private data of class_diff nodes
17484 * src/abg-comparison.cc (class_diff::class_diff): Do not
17485 initialize the private data of class_diff here.
17486 (compute_diff): In the overload for class_diff, initialize the
17487 private data of the new instance of class_diff to the private data
17488 of its canonical instance.
17489 (redundancy_marking_visitor::visit_begin): If a node is marked
17490 redundant, do not dare visit its children. In cases of classes
17491 that have members that reference themselves, this prevents us from
17492 wrongly marking some of the data member changes as being
17495 2015-02-10 Dodji Seketeli <dodji@redhat.com>
17497 Do not crash when applying filters to a NULL diff
17498 * src/abg-comparison.cc (diff_context::maybe_apply_filters): Do
17499 not crash when called with a NULL diff.
17501 2015-02-09 Dodji Seketeli <dodji@redhat.com>
17503 Initial implementation of canonical type comparison in the IR
17504 * include/abg-ir.h (class type_base): Pimplify this class.
17505 (type_base::canonical_types_map_type): New typedef.
17506 (type_base::{get_canonical_types_map, get_canonical_type_for,
17507 get_canonical_type}): Declare new member functions.
17508 (enable_canonical_equality): Declare new function.
17509 (struct type_base::hash): Declare this functor here.
17510 * src/abg-ir.cc ():
17511 * src/abg-dwarf-reader.cc (build_type_decl, build_enum_type)
17512 (build_class_type_and_add_to_ir, build_qualified_type)
17513 (build_pointer_type_def, build_reference_type, build_array_type)
17514 (build_typedef_type, build_function_decl): Enable canonical
17515 equality for the resulting type returned by these functions.
17516 * src/abg-hash.cc (type_base::hash::operator()(const type_base&)):
17517 Adjust as this is now out-of-line. Also, add two overloads for
17518 type_base* and type_base_sptr.
17519 (struct type_base::priv): Define new type for private data of
17521 (type_base::{get_canonical_types_map, get_canonical_type_for,
17522 get_canonical_type}): Define new member functions.
17523 (enable_canonical_equality): Define new function
17524 (type_base::{type_base, set_size_in_bits, get_size_in_bits,
17525 set_alignment_in_bits, get_alignment_in_bits}): Adjust.
17526 ({type_decl, scope_type_decl, qualified_type_def,
17527 pointer_type_def, reference_type_def, array_type_def,
17528 enum_type_decl, typedef_decl, function_type,
17529 class_decl}::operator==): If the types being compared have
17530 canonical type then use them for comparison.
17532 2015-02-07 Dodji Seketeli <dodji@redhat.com>
17534 Don't walk the diff tree when there are no suppressions
17535 * src/abg-comparison.cc (apply_suppressions): Do not walk the diff
17536 tree to apply suppressions when there are no suppressions to
17539 2015-02-07 Dodji Seketeli <dodji@redhat.com>
17541 Speedup some diff::has_changes() implementations
17542 * src/abg-comparison.cc ({distinct_diff, var_diff,
17543 class_diff}::has_changes): Use the hash value of the diff subjects
17544 to detect quickly if they differ. If they don't, then go the slow
17545 path of comparing the types.
17547 2015-02-05 Dodji Seketeli <dodji@redhat.com>
17549 Get out as early as possible when comparing different ABI artefacts
17550 * include/abg-ir.h (equal): Turn the last parameter of type
17551 change_kind& into a change_kind*. Do this on all the overloads'
17553 * src/abg-ir.cc (equal): Do the same for the definitions of the
17554 overloads and adapt them to report about the kind of changes makes
17555 the two ABI artifact different -- only if the change_kind pointer
17556 is non-null. That way, callers have a way to choose if they want
17557 to go the expensive route of knowing what kind of changes there
17559 ({decl_base, scope_decl, type_base, scope_type_decl,
17560 qualified_type_def, pointer_type_def, pointer_type_def,
17561 reference_type_def, array_type_def, enum_type_decl, typedef_decl,
17562 var_decl, function_type, function_decl, function_decl::parameter,
17563 class_decl::base_spec, class_decl}::operator==): Adjust to the new
17564 signature of equals; call it with the change_kind* parameter set
17566 * src/abg-comparison.cc ({var_diff, pointer_diff, array_diff,
17567 reference_diff, qualified_type_diff, enum_diff, class_diff,
17568 base_diff, scope_diff, fn_parm_diff, function_decl_diff,
17569 type_decl_diff, typedef_diff}::has_local_changes): Adjust.
17571 2015-02-05 Dodji Seketeli <dodji@redhat.com>
17573 Rename diff::length() into diff::has_changes()
17574 * include/abg-comparison.h (*::has_changes): Rename the ::length()
17575 method of all the diff types that inherit the diff class into
17576 this, in the class declarations.
17577 * src/abg-comparison.cc (*::has_changes): Do the same as in the
17578 declarations, in the definitions.
17579 (diff::to_be_reported, distinct_diff::has_local_changes)
17580 (distinct_diff::report, distinct_diff::, array_diff::has_changes)
17581 (reference_diff::has_changes, qualified_type_diff::has_changes)
17582 (enum_diff::has_changes, translation_unit_diff::has_changes)
17583 (suppression_categorization_visitor::visit_end)
17584 (redundancy_marking_visitor::visit_begin): Adjust.
17585 * tests/test-diff-dwarf.cc (main): Adjust.
17586 * tools/abidiff.cc (main): Likewise.
17588 2015-01-27 Dodji Seketeli <dodji@redhat.com>
17590 Add a method to diff_context to dump a diff tree to error output
17591 * include/abg-comparison.h (diff_context::error_output_stream):
17592 Make this function const.
17593 (diff_context::{do_dump_diff_tree}): Declare new methods.
17594 * src/abg-comparison.cc (diff_context::error_output_stream): Make
17595 this function const.
17596 (diff_context::do_dump_diff_tree): Define new methods.
17598 2015-01-27 Dodji Seketeli <dodji@redhat.com>
17600 Keep children nodes of class_diff and scope_diff sorted
17601 * include/abg-comparison.h (decl_diff_base, type_diff_base):
17602 Forward declare these types.
17603 (diff_sptrs_type, decl_diff_base_sptr, decl_diff_base_sptrs_type)
17604 (type_diff_base_sptr, type_diff_base_sptrs_type)
17605 (base_diff_sptrs_type, string_type_diff_base_sptr_map)
17606 (string_decl_diff_base_sptr_map, string_diff_sptr_map): New
17608 (changed_type_or_decl, changed_parm, changed_parms_type)
17609 (string_changed_type_or_decl_map)
17610 (unsigned_changed_type_or_decl_map, changed_type_or_decl_vector):
17612 (class_diff::changed_base): Make this return a
17613 base_diff_sptrs_type now. No more a string_base_diff_sptr_map.
17614 (class_diff::changed_member_fns): Make this return a
17615 function_decl_diff_sptrs_type, no more a
17616 string_changed_member_function_sptr_map.
17617 (class_diff::changed_types): Make this return a diff_sptrs_type,
17618 not a string_changed_type_or_decl_map anymore.
17619 (class_diff::changed_decls): Make this return a diff_sptrs_type,
17620 not a string_changed_type_or_decl_map anymore.
17621 * src/abg-comp-filter.cc (has_virtual_mem_fn_change)
17622 (has_non_virtual_mem_fn_change): Adjust.
17623 * src/abg-comparison.cc (compute_diff): For the decl_base_sptr and
17624 type_base_sptr overloads, assert that the resulting diff is
17626 (class_diff::priv::{sorted_changed_base_,
17627 sorted_changed_member_types_, sorted_subtype_changed_dm_,
17628 sorted_changed_dm_, sorted_changed_member_functions_,
17629 sorted_changed_member_class_tmpls_}): New data members.
17630 (class_diff::priv::changed_member_types_): Changed the type of
17631 this from string_changed_type_or_decl_map to string_diff_sptr_map.
17632 (class_diff::priv::changed_member_functions_): Changed the type of
17633 this from string_changed_member_function_sptr_map to
17634 string_function_decl_diff_sptr_map.
17635 (class_diff::priv::changed_member_class_tmpls_): Changed the type
17636 of this from string_changed_type_or_decl_map to
17637 string_diff_sptr_map.
17638 (class_diff::ensure_lookup_tables_populated): Adjust. Initialize
17639 the new sorted members class_diff::priv::{sorted_changed_bases_,
17640 sorted_subtype_changed_dm_, sorted_changed_dm_,
17641 sorted_changed_member_functions_, sorted_changed_member_types_}.
17642 (class_diff::priv::{member_type_has_changed,
17643 member_class_tmpl_has_changed, count_filtered_bases,
17644 count_filtered_subtype_changed_dm, count_filtered_changed_mem_fns,
17646 (class_diff::chain_into_hierarchy): Adjust: The children nodes of
17647 class_diff are now laid out in a sorted way.
17648 (class_diff::{changed_bases, changed_member_fns}): Adjust.
17649 (base_diff_comp, virtual_member_function_diff_comp): New types.
17650 (sort_string_base_diff_sptr_map)
17651 (sort_string_virtual_member_function_diff_sptr_map): New static
17653 (data_member_diff_comp): Renamed var_diff_comp into this.
17654 (sort_unsigned_data_member_diff_sptr_map): Renamed sort_var_diffs
17655 into this and adjust.
17656 (class_diff::report): Do not sort the nodes we are about to emit
17657 here. Just use the natural order of the nodes in their parent
17658 tree as they should now be sorted.
17659 (scope_diff::priv::{changed_types_, changed_decls_}): Change the
17660 type of these from string_changed_type_or_decl_map to
17661 string_diff_sptr_map.
17662 (scope_diff::priv::{sorted_changed_types_,
17663 sorted_changed_decls_}): New data members.
17664 (scope_diff::ensure_lookup_tables_populated): Adjust. Initialize
17665 the new scope_diff::priv::sorted_changed_{types_, decls_}.
17666 (scope_diff::chain_into_hierarchy): Adjust. The children of
17667 scope_diff are now sorted.
17668 (scope_diff::changed_{types, decls}): Return the sorted vectors of
17670 (struct changed_type_or_decl_comp): Remove.
17671 (struct diff_comp): New type.
17672 (sort_changed_type_or_decl): Remove.
17673 (sort_string_diff_sptr_map): New static function.
17674 (scope_diff::report): Adjust. Do not sort children nodes here
17675 ourselves before reporting about them. Rather, use the natural
17676 topological order of the children as they are now sorted.
17677 (corpus_diff::priv::sorted_changed_vars_): Renamed
17678 corpus_diff::priv::changed_vars_ into this to make it more
17679 explicit that the things it holds are sorted.
17680 (corpus_diff::changed_variables_sorted): Adjust.
17681 (corpus_diff::priv::ensure_lookup_tables_populated): Likewise.
17682 (corpus_diff::priv::apply_filters_and_compute_diff_stats):
17684 (corpus_diff::priv::categorize_redundant_changed_sub_nodes):
17686 (corpus_diff::priv::clear_redundancy_categorization): Likewise.
17687 (corpus_diff::priv::maybe_dump_diff_tree): Likewise.
17688 (corpus_diff::report): Likewise.
17690 2015-01-26 Dodji Seketeli <dodji@redhat.com>
17692 Hand-code the string representation of GElf_Ehdr::e_machine
17693 * configure.ac: Do not check for elfutils/libebl.h and libebl.a
17695 * src/abg-dwarf-reader.cc: Do not include elfutils/libebl.h
17697 (e_machine_to_string): Define new static
17699 (read_context::::load_elf_architecture): Use the new
17700 e_machine_to_string() function rather than ebl_backend_name() and
17702 * tests/data/test-diff-dwarf/test-23-diff-arch-report-0.txt: Adjust.
17704 2015-01-26 Dodji Seketeli <dodji@redhat.com>
17706 Fix chaining of descendant node of qualified type diff node
17707 * include/abg-comparison.h
17708 (qualified_type_diff::leaf_underlying_type_diff): Declare new
17710 * src/abg-comparison.cc (get_leaf_type): Forward declare this
17712 (qualified_type_diff::priv::leaf_underlying_type_diff): Define new
17714 (qualified_type_diff::leaf_underlying_type_diff): Define this new
17716 (qualified_type_diff::chain_into_hierarchy): Call
17717 leaf_underlying_type_diff() here rather than
17718 underlying_type_diff().
17719 (qualified_type_diff::report): Use leaf_underlying_type_diff()
17720 rather than re-computing the diff between the two leaf underlying
17722 * libtest26-qualified-redundant-node-v{0,1}.so: New binary test
17724 * tests/data/test-diff-filter/test26-qualified-redundant-node-v{0,1}.cc:
17725 Source code for the binary test inputs above.
17726 * tests/test-diff-filter.cc (int_out_spec): Add the new test input
17727 to the vector of test input data over which to run this test
17729 * tests/data/test-diff-filter/test26-qualified-redundant-node-report-{0,1.txt:
17730 New test input file.
17731 * tests/data/Makefile.am: Add the new test input data to the
17732 source distribution.
17734 2015-01-24 Dodji Seketeli <dodji@redhat.com>
17736 Recognize cyclic diff tree nodes as being redundant
17737 * include/abg-comparison.h (enum visiting_kind): Rename
17738 enumerator DO_NOT_MARK_VISITED_NODES_AS_TRAVERSED into
17739 DO_NOT_MARK_VISITED_NODES_AS_VISITED.
17740 (diff_context::diff_has_been_visited): Rename
17741 diff_context::diff_has_been_traversed into this.
17742 (diff_context::mark_diff_as_visited): Rename
17743 diff_context::mark_diff_as_traversed into this.
17744 (diff_context::forget_visited_diffs): Rename
17745 diff_context::forget_traversed_diffs into this.
17746 (diff_context::forbid_visiting_a_node_twice): Rename
17747 diff_context::forbid_traversing_a_node_twice into this.
17748 (diff_context::visiting_a_node_twice_is_forbidden): Rename
17749 diff_context::traversing_a_node_twice_is_forbidden into this.
17750 (diff::is_traversing): Move this from protected to public.
17751 * src/abg-comparison.cc (diff_context::priv::visited_diff_nodes_):
17752 Rename diff_context::priv::traversed_diff_nodes_ into this.
17753 (diff_context::priv::forbid_visiting_a_node_twice_): Rename
17754 diff_context::priv::forbid_traversing_a_node_twice_ into this.
17755 (diff_context::priv::priv): Adjust.
17756 (diff_context::diff_has_been_visited): Rename
17757 diff_context::diff_has_been_traversed into this. Adjust.
17758 (diff_context::mark_diff_as_visited): Rename
17759 diff_context::mark_diff_as_traversed into this. Adjust.
17760 (diff_context::forget_visited_diffs): Rename
17761 diff_context::forget_traversed_diffs into this. Adjust.
17762 (diff_context::forbid_visiting_a_node_twice): Rename
17763 diff_context::forbid_traversing_a_node_twice into this.
17764 (diff_context::visiting_a_node_twice_is_forbidden): Rename
17765 diff_context::traversing_a_node_twice_is_forbidden into this.
17766 (diff_context::maybe_apply_filters): Adjust.
17767 (diff::end_traversing): Remove the 'mark_as_traversed' parameter
17768 of this. Remove the visited-marking code.
17769 (diff::traverse): This is the crux of the changes of this patch.
17770 Avoid traversing a node that is being traversed, but one can visit
17771 a node being visited. Also, traversing a node means visiting it
17772 and visiting its children nodes.
17773 (diff::is_filtered_out): Simplify logic for filtering redundant
17774 code. Basically all nodes that are redundant are filtered. All
17775 the complicated logic that was due when diff nodes were shared is
17776 not relevant anymore.
17777 (corpus_diff::priv::categorize_redundant_changed_sub_nodes)
17778 (propagate_categories, apply_suppressions)
17779 (diff_node_printer::diff_node_printer, print_diff_tree)
17780 (categorize_redundant_changed_sub_nodes)
17781 (clear_redundancy_categorization)
17782 (clear_redundancy_categorization): Adjust.
17783 (redundancy_marking_visitor::visit_begin): Adjust. Also, if the
17784 current diff node is already being traversed (that's a clyclic
17785 node) then mark it as redundant.
17786 * src/abg-comp-filter.cc (apply_filter): Adjust.
17787 * tests/data/test-diff-filter/test16-report-2.txt: New test input data.
17788 * tests/data/test-diff-filter/libtest25-cyclic-type-v{0,1}.so: New
17789 test input binaries.
17790 * tests/data/test-diff-filter/test25-cyclic-type-v{0,1}.cc: Source
17791 code for the test input binaries.
17792 * tests/data/test-diff-filter/test25-cyclic-type-report-0.txt: New
17794 * tests/data/test-diff-filter/test25-cyclic-type-report-1.txt:
17796 * tests/test-diff-filter.cc (in_out_specs): Add the new test
17797 inputs above to the list of test input data over which to run this
17799 * tests/data/Makefile.am: Add the new test files above to source
17801 * tests/data/test-diff-filter/test16-report.txt: Adjust.
17802 * tests/data/test-diff-filter/test17-0-report.txt: Likewise.
17804 2015-01-20 Dodji Seketeli <dodji@redhat.com>
17806 Tighten the condition for creating a cloned function from DWARF
17807 * src/abg-dwarf-reader.cc (build_ir_node): Re-indent. Also,
17808 consider that when a DIE C refers to a DIE A via the
17809 DW_abstract_origin attribute, C represents a clone of A, only if C
17810 and A have *different* linkage names.
17812 2015-01-19 Dodji Seketeli <dodji@redhat.com>
17814 Fix the output of the array diff report
17815 * src/abg-comparison.cc (array_diff::report): Refer to the pretty
17816 representation of the array when talking about changes of the
17817 array element type.
17818 * src/abg-ir.cc (equals): In the overload for array_type, use the
17819 equality operator that knows how to handle null pointers to
17820 element type. This avoids crashes when the pointer to element
17822 * tests/data/test-diff-dwarf/test10-report.txt: Adjust.
17823 * tests/data/test-diff-filter/test24-compatible-vars-report-1.txt:
17826 2015-01-14 Dodji Seketeli <dodji@redhat.com>
17828 Do not install the generated documentation by default
17829 * doc/manuals/Makefile.am: Do not install the generated
17830 documentation by default
17832 2015-01-14 Dodji Seketeli <dodji@redhat.com>
17834 Make sure to install html docs & gziped info on make install
17835 * doc/manuals/Makefile.am: Make sure Make sure to install html
17836 docs & gziped info on make install
17838 2015-01-14 Dodji Seketeli <dodji@redhat.com>
17840 Do not install the abinilint program
17841 * tools/Makefile.am: Add abinilint to the noinst_PROGRAMS primary.
17843 2015-01-13 Dodji Seketeli <dodji@redhat.com>
17845 Small grammar fix in a manpage title
17846 * doc/manuals/conf.py: Fix the grammar of the title of the abidiff
17849 2015-01-13 Dodji Seketeli <dodji@redhat.com>
17851 Generate texinfo documentation properly
17852 * doc/manuals/Makefile.am: Generate texinfo doc, install it and
17854 * doc/manuals/libabigail-tools.rst: Do not use the :doc: syntax to
17855 refer to documents because it doesn't seem to work with sphinx
17856 right now. Rather, use a table of content.
17858 2015-01-13 Dodji Seketeli <dodji@redhat.com>
17860 Fix man pages installation
17861 * doc/manuals/Makefile.am: Install the man pages only if they are
17864 2015-01-13 Dodji Seketeli <dodji@redhat.com>
17866 Bump the candidate version of the library to 1.0
17867 * configure.ac: Bump version to 1.0.0
17869 2015-01-13 Dodji Seketeli <dodji@redhat.com>
17871 Do not forget to install the Manpages
17872 * doc/manuals/Makefile.am: Add the man pages to the man7_MANS
17875 2015-01-13 Dodji Seketeli <dodji@redhat.com>
17877 Adjust archive-related code for the recent addition of tools_utils::*
17878 * tests/Makefile.am: tools/libtoolsutils.la is no more.
17879 * tests/test-write-read-archive.cc (main): Adjust.
17880 * tools/abiar.cc (extract_tus_from_archive): Likewise.
17882 2015-01-13 Dodji Seketeli <dodji@redhat.com>
17884 Generate Manpages for abidiff, abidw, abilint
17885 * doc/manuals/conf.py: Define man pages for abidiff, abidw,
17886 abilint and an introductory one for libabigail.
17888 2015-01-09 Dodji Seketeli <dodji@redhat.com>
17890 Sort functions & variables diff nodes in the diff tree
17891 * include/abg-comparison.h (function_decl_diff_sptrs_type)
17892 (var_diff_sptrs_type): New typedefs.
17893 (corpus_diff::{changed_functions, changed_variables}): Declare new
17895 * src/abg-comparison.cc (sort_string_function_decl_diff_sptr_map)
17896 (sort_string_var_diff_sptr_map): Forward declare these static
17897 functions there were already defined later.
17898 (struct diff_less_than_functor): Define new comparison functor.
17899 (diff::append_child_node): Sort the children diff nodes of a given
17901 (corpus_diff::priv::changed_fns_map_): Renamed the data member
17902 corpus_diff::priv::changed_fns_ into this.
17903 (corpus_diff::priv::changed_fns_): New data member that is a
17904 sorted vector of changed functions.
17905 (corpus_diff::priv::{lookup_tables_empty, clear_lookup_tables}):
17906 Adjust changed_fns_ -> changed_fns_map_ and changed_vars_ ->
17908 (corpus_diff::priv::ensure_lookup_tables_populated): Likewise.
17909 Sort the changed functions and changed variables.
17910 (corpus_diff::priv::apply_filters_and_compute_diff_stats): Adjust
17911 changed_fns_ -> changed_fns_map_ and changed_vars_ ->
17912 changed_vars_map_. Also, walk the changed functions and variables
17913 diff nodes in their sorted order.
17914 (corpus_diff::priv::{categorize_redundant_changed_sub_nodes,
17915 clear_redundancy_categorization, maybe_dump_diff_tree}): Walk the
17916 changed functions and variables diff nodes in their sorted order.
17918 (function_decl::get_pretty_representation_of_declarator):
17921 (function_decl::get_pretty_representation_of_declarator): Define
17922 new function. Its content got split out of ...
17923 (function_decl::get_pretty_representation): ... this one.
17924 * src/abg-comparison.cc (corpus_diff::chain_into_hierarchy):
17925 Consider the sorted the children nodes of a diff tree node.
17926 (corpus_diff::append_child_node): Keep the children nodes of a
17927 diff tree node sorted.
17928 (corpus_diff::{changed_functions, changed_variables, length,
17930 (corpus_diff::{changed_functions_sorted,
17931 changed_variables_sorted}): Define new functions.
17932 (function_comp::operator()): First compare the qualified function
17933 names along with the parameter declarations, then the rest.
17934 (sort_string_function_decl_diff_sptr_map)
17935 (sort_string_var_diff_sptr_map): Adjust.
17936 * tests/data/test-abicompat/test0-fn-changed-report-0.txt: Adjust.
17937 * tests/data/test-diff-suppr/test5-fn-suppr-report-0.txt: Adjust.
17938 * tests/data/test-diff-suppr/test8-redundant-fn-report-0.txt:
17941 2015-01-09 Dodji Seketeli <dodji@redhat.com>
17943 Fix logic of function parmeters diff redundancy detection
17944 * src/abg-comparison.cc (redundancy_marking_visitor::visit_begin):
17945 For a given function parameter diff node N, we were comparing it
17946 against the other parmeter diff nodes of the function. This
17947 change ensures that we do not compare N against itself.
17949 2015-01-09 Dodji Seketeli <dodji@redhat.com>
17951 Update copyright year for tests/test-abicompat.cc
17952 * tests/test-abicompat.cc: Update copyright year.
17954 2015-01-09 Dodji Seketeli <dodji@redhat.com>
17956 Enhance the format of the diff tree dumping report
17957 * src/abg-comparison.cc (diff_node_printer::do_indent): New
17959 (diff_node_printer::visit): Use diff_node_printer::do_indent().
17960 Print the addresses of the diff tree node and its canonical node.
17961 Add some vertical spaces and some indenting to make the report
17964 2015-01-08 Dodji Seketeli <dodji@redhat.com>
17966 Expose a new libabigail::tools_utils namespace
17967 * include/abg-tools-utils.h: Moved tools/abg-tools-utils.h in
17968 here. Renamed the namespace tools into tools_utils. Inject
17969 std::ostream, std::istream, std::ifstream, and std::string types
17970 into the tools_utils namespace. Adjust the function declarations
17971 accordingly. Remove the useless dirname() function declaration.
17972 * include/Makefile.am: Add abg-tools-utils.h to the list of
17974 * src/abg-tools-utils.cc: Moved tools/abg-tools-utils.cc in here.
17975 Renamed the namespace tools into tools_utils.
17976 (get_stat): Add apidoc.
17977 (is_dir): Cleanup apidoc.
17978 (dir_name); Cleanup parameter name.
17979 (guess_file_type): Cleanup parameter type.
17980 * src/Makefile.am: Add abg-tools-utils.cc to the list of exported
17982 * tools/Makefile.am: Do not build the temporary library
17983 libtoolsutils.la anymore as abg-tools-utils.{h,cc} have moved out
17985 * tools/abicompat.cc (parse_command_line, main): Adjust for tools
17986 -> tools_utils namespace change.
17987 * tools/abidiff.cc (parse_command_line, main): Likewise.
17988 * tools/abidw.cc (parse_command_line, main): Likewise.
17989 * tools/abilint.cc (parse_command_line, main): Likewise.
17990 * tests/test-abicompat.cc (main): Adjust for tools -> tools_utils
17992 * tests/test-abidiff.cc (main): Likewise.
17993 * tests/test-alt-dwarf-file.cc (main): Likewise.
17994 * tests/test-core-diff.cc (main): Likewise.
17995 * tests/test-diff-dwarf.cc (main): Likewise.
17996 * tests/test-diff-filter.cc (main): Likewise.
17997 * tests/test-diff-suppr.cc (main): Likewise.
17998 * tests/test-lookup-syms.cc (main): Likewise.
17999 * tests/test-read-dwarf.cc (main): Likewise.
18000 * tests/test-read-write.cc (main): Likewise.
18001 * tests/Makefile.am: Do not reference the libtoolsutils.la private
18004 2015-01-07 Dodji Seketeli <dodji@redhat.com>
18006 Update copyright years
18007 * include/abg-comp-filter.h: Update copyright years.
18008 * include/abg-comparison.h: Likewise.
18009 * include/abg-config.h: Likewise.
18010 * include/abg-corpus.h: Likewise.
18011 * include/abg-diff-utils.h: Likewise.
18012 * include/abg-dwarf-reader.h: Likewise.
18013 * include/abg-fwd.h: Likewise.
18014 * include/abg-hash.h: Likewise.
18015 * include/abg-ini.h: Likewise.
18016 * include/abg-ir.h: Likewise.
18017 * include/abg-libxml-utils.h: Likewise.
18018 * include/abg-libzip-utils.h: Likewise.
18019 * include/abg-reader.h: Likewise.
18020 * include/abg-sptr-utils.h: Likewise.
18021 * include/abg-traverse.h: Likewise.
18022 * include/abg-viz-common.h: Likewise.
18023 * include/abg-viz-dot.h: Likewise.
18024 * include/abg-viz-svg.h: Likewise.
18025 * include/abg-writer.h: Likewise.
18026 * src/abg-comp-filter.cc: Likewise.
18027 * src/abg-comparison.cc: Likewise.
18028 * src/abg-config.cc: Likewise.
18029 * src/abg-corpus.cc: Likewise.
18030 * src/abg-diff-utils.cc: Likewise.
18031 * src/abg-dwarf-reader.cc: Likewise.
18032 * src/abg-hash.cc: Likewise.
18033 * src/abg-ini.cc: Likewise.
18034 * src/abg-ir.cc: Likewise.
18035 * src/abg-libxml-utils.cc: Likewise.
18036 * src/abg-libzip-utils.cc: Likewise.
18037 * src/abg-reader.cc: Likewise.
18038 * src/abg-traverse.cc: Likewise.
18039 * src/abg-viz-common.cc: Likewise.
18040 * src/abg-viz-dot.cc: Likewise.
18041 * src/abg-viz-svg.cc: Likewise.
18042 * src/abg-writer.cc: Likewise.
18043 * tests/print-diff-tree.cc: Likewise.
18044 * tests/test-abidiff.cc: Likewise.
18045 * tests/test-alt-dwarf-file.cc: Likewise.
18046 * tests/test-core-diff.cc: Likewise.
18047 * tests/test-diff-dwarf.cc: Likewise.
18048 * tests/test-diff-filter.cc: Likewise.
18049 * tests/test-diff-suppr.cc: Likewise.
18050 * tests/test-diff2.cc: Likewise.
18051 * tests/test-ir-walker.cc: Likewise.
18052 * tests/test-lookup-syms.cc: Likewise.
18053 * tests/test-read-dwarf.cc: Likewise.
18054 * tests/test-read-write.cc: Likewise.
18055 * tests/test-utils.cc: Likewise.
18056 * tests/test-utils.h: Likewise.
18057 * tests/test-write-read-archive.cc: Likewise.
18058 * tools/abg-tools-utils.cc: Likewise.
18059 * tools/abg-tools-utils.h: Likewise.
18060 * tools/abiar.cc: Likewise.
18061 * tools/abidiff.cc: Likewise.
18062 * tools/abidw.cc: Likewise.
18063 * tools/abilint.cc: Likewise.
18064 * tools/abisym.cc: Likewise.
18065 * tools/binilint.cc: Likewise.
18067 2015-01-07 Dodji Seketeli <dodji@redhat.com>
18069 Detect and report changes in ELF architecture
18070 * configure.ac: Detect the presence of libebl.a and add it to the
18071 list of library we depend on to build libabigail. Report when
18072 libelf.so is not found.
18073 * include/abg-comparison.h:
18074 (diff_context::show_architecture_change): Declare new accessors.
18075 (corpus_diff::architecture_changed): Declare new method.
18076 * include/abg-corpus.h (corpus::{get,set}_architecture_name):
18077 Declare new accessors.
18078 * src/abg-comparison.cc
18079 (diff_context::priv::show_architecture_change_): New data member.
18080 (diff_context::priv::priv): Initialize it.
18081 (diff_context::show_architecture_change): Define new accessors.
18082 (function_decl_diff::report): Report when the size/alignment of
18083 the function address changes.
18084 (corpus_diff::priv::architectures_equal_): New data member.
18085 (corpus_diff::priv::priv): Initialize it.
18086 (corpus_diff::priv::emit_diff_stats): Take in account changes of
18088 (corpus_diff::architecture_changed): Define new method.
18089 (corpus_diff::length): Take in account changes of architecture.
18090 (corpus_diff::report): Report about changes of architecture.
18091 (compute_diff): In the overload for corpus_diff_sptr, detect
18092 changes fo architecture.
18093 * src/abg-corpus.cc (corpus_priv::architecture_name): Define new
18095 (corpus::{get,set}_architecture_name): Define new method.
18096 * src/abg-dwarf-reader.cc: Include elfutils/libebl.h to use
18097 ebl_openbackend() and ebl_backend_name()
18098 (read_context::elf_architecture_): Define new data member.
18099 (read_context::elf_architecture): Define new accessor.
18100 (read_context::{load_elf_architecture, load_remaining_elf_data}):
18101 Define new methods.
18102 (read_corpus_from_elf): Use ctxt.load_remaining_elf_data() in lieu
18103 of ctxt.load_dt_soname_and_needed. Stick the architecture into
18105 * src/abg-reader.cc (read_corpus_from_input): Read the
18106 'architecture' XML property.
18107 * src/abg-writer.cc (write_corpus_to_native_xml): Write the
18108 'architecture' XML property.
18109 * tests/data/test-diff-dwarf/libtest-23-diff-arch-v0-32.so: New
18111 * tests/data/test-diff-dwarf/libtest-23-diff-arch-v0-64.so:
18113 * tests/data/test-diff-dwarf/test-23-diff-arch-report-0.txt:
18115 * tests/data/test-diff-dwarf/test-23-diff-arch-v0.cc: Source code
18116 for the binary test input files above.
18117 * tests/data/Makefile.am: Add the new test input files to the
18118 source distribution.
18119 * tests/test-diff-dwarf.cc (in_out_specs): Add the new test input
18120 data to the set of input data to run this test harness over.
18121 * tests/test-read-dwarf.cc (main): Do not take the architecture in
18122 account during comparisons.
18124 2015-01-05 Sinny Kumari <skumari@redhat.com>
18126 Include libabigail-website.doxy file in EXTRA_DIST
18127 * doc/Makefile.am: Include website/libabigail-website.doxy
18130 2015-01-06 Dodji Seketeli <dodji@redhat.com>
18132 Delete ltsugar.m4 and pkg.m4 files from m4/
18133 * m4/ltsugar.m4: Removed.
18134 * m4/pkg.m4: Likewise.
18136 2014-12-27 Dodji Seketeli <dodji@redhat.com>
18138 Enable parallel tests
18139 * configure.ac (AM_INIT_AUTOMAKE): Enable parallel tests by
18140 switching on the parallel-tests option.
18142 2014-12-27 Dodji Seketeli <dodji@redhat.com>
18144 Add a --dump-diff-tree to abidiff for debugging purposes
18145 * include/abg-comparison.h (enum visiting_kind): Add new
18146 DO_NOT_MARK_VISITED_NODES_AS_TRAVERSED enumerator.
18147 (diff_context::{default_output_stream, error_output_stream,
18148 dump_diff_tree}): Declare new accessors.
18149 (diff::end_traversing): Take a new boolean flag.
18150 (print_diff_tree): Add new overload for diff_sptr.
18151 * src/abg-comparison.cc
18152 (diff_context::priv::{default_output_stream_,
18153 error_output_stream_, dump_diff_tree_}): New data members.
18154 (priv::priv): Initialize them.
18155 (diff_context::{default_output_stream_, error_output_stream_,
18156 dump_diff_tree, dump_diff_tree}): Define new accessors.
18157 (diff::end_traversing): Take a new flag that control whether or
18158 not to mark the current diff node as having been traversed.
18159 (diff::traverse): Take in account the visiting kind carried by the
18160 visitor to determine if the visited node should be marked as being
18162 (corpus_diff::priv::maybe_dump_diff_tree): Define new member
18164 (corpus_diff::report): Call it.
18165 (diff_node_printer::visit): Pretty print the diff node just once.
18166 (print_diff_tree): Define a new overload for diff_sptr.
18167 * tools/abidiff.cc (options::dump_diff_tree): New data member.
18168 (options::options): Initialize it.
18169 (display_usage): Add a help string for the new --dump-diff-tree
18170 command line switch.
18171 (parse_command_line): Parse the new --dump-diff-tree command line
18173 (set_diff_context_from_opts): Set the diff context according to
18174 the --dump-diff-tree presence.
18175 * doc/manuals/abidiff.rst: Add a bullet point for the new
18176 --dump-diff-tree command line switch.
18178 2014-12-27 Dodji Seketeli <dodji@redhat.com>
18180 Fix typos in the abicompat manual
18181 * doc/manuals/abicompat.rst: Fix typos.
18183 2014-12-27 Dodji Seketeli <dodji@redhat.com>
18185 Fix a typo in the abidiff manual
18186 * doc/manuals/abidiff.rst: Fix a typo.
18188 2014-12-27 Dodji Seketeli <dodji@redhat.com>
18190 Fix redundancy in abidiff manual
18191 * doc/manuals/abidiff.rst: Remove the redundant bullet point about
18192 the --drop-fn command line switch.
18194 2014-12-26 Dodji Seketeli <dodji@redhat.com>
18196 Fix the doc string of the CanonicalDiff section of the apidoc
18197 * src/abg-comparison.cc: The summary of the CanonicalDiff should
18198 not be a @par directive, otherwise it won't show up in the summary
18199 field on the html-genereated page.
18201 2014-12-26 Dodji Seketeli <dodji@redhat.com>
18203 Update doc string for new --no-redundant option of abidiff
18204 * doc/manuals/abidiff.rst: Update the documentation string for the
18205 --no-redundant option of abidiff.
18207 2014-12-26 Dodji Seketeli <dodji@redhat.com>
18209 Make abidiff *NOT* show redundant changes by default
18210 * tools/abidiff.cc (options::options): Initialize
18211 options::show_redundant_changes to false.
18213 2014-12-26 Dodji Seketeli <dodji@redhat.com>
18215 Try harder to handle pointer/reference to void
18216 * include/abg-fwd.h (type_or_void): Declare new function.
18217 * src/abg-ir.cc (type_or_void): Define it.
18218 (pointer_type_def::pointer_type_def)
18219 (reference_type_def::reference_type_def)
18220 (reference_type_def::get_qualified_name, strip_typedef): Use it to
18221 ensure that empty pointed-to-type is considered as a void type.
18223 2014-12-26 Dodji Seketeli <dodji@redhat.com>
18225 Do not mark sibling structurally identical nodes as redundant
18226 * include/abg-comparison.h (diff::parent_node): Declare new
18228 * src/abg-comparison.cc (diff::priv::parent_): New data member.
18229 (diff::priv::priv): Initialize it.
18230 (diff::parent_node): Define new accessor.
18231 (diff::append_child_node): Set the diff::priv::parent_ data member
18232 of the added child node.
18233 (redundancy_marking_visitor::visit_begin): If two (logical)
18234 sibbling nodes are structurally equivalent, do not mark them as
18236 * tests/data/test-diff-suppr/libtest10-changed-parm-c-v0.so: New
18238 * tests/data/test-diff-suppr/libtest10-changed-parm-c-v1.so:
18240 * tests/data/test-diff-suppr/test10-changed-parm-c-report-0.txt:
18241 New test input data.
18242 * tests/data/test-diff-suppr/test10-changed-parm-c-v0.c: Source
18243 code for the binary input above.
18244 * tests/data/test-diff-suppr/test10-changed-parm-c-v1.c: Likewise.
18245 * tests/data/Makefile.am: Add the new test files to source
18247 * tests/test-diff-suppr.cc (in_out_specs): Add the new test input
18248 to the vector of test inputs to run this harness over.
18250 2014-12-26 Dodji Seketeli <dodji@redhat.com>
18252 Un-share diff nodes in the comparison IR
18253 * include/abg-ir.h: Prefix the doc string with "///", rather than
18254 writing it inside a /**/ comment.
18255 * include/abg-comparison.h (function_decl_diff)
18256 (function_decl_diff_sptr, fn_parm_diff, fn_parm_diff_sptr)
18257 (var_diff_sptr, base_diff, class_diff, class_diff_sptr): Move
18258 these class & typedef decls to the top of the file.
18259 (string_changed_base_map, string_changed_parm_map)
18260 (unsigned_changed_parm_map, changed_function_ptr)
18261 (string_changed_function_ptr_map): Remove these typedefs.
18262 (string_base_diff_sptr_map, string_fn_parm_diff_sptr_map)
18263 (unsigned_fn_parm_diff_sptr_map, string_var_diff_sptr_map)
18264 (unsigned_var_diff_sptr_map, string_function_decl_diff_sptr_map)
18265 (string_var_diff_ptr_map): New typedefs.
18266 (diff_context::{has_diff_for,add_diff}): Make these member
18268 (diff_context::{set_canonical_diff_for,
18269 set_or_get_canonical_diff_for}): Declare new private member
18271 (diff_context::{get_canonical_diff_for,
18272 initialize_canonical_diff}): New public member functions.
18273 (diff_context::maybe_apply_filters): Set the default value of the
18274 'traverse_nodes_once' parameter to false.
18275 (compute_diff): Make the overload for class_decl_sptr friend of
18276 the diff_context class.
18277 (class diff): Make the diff_context class a friend of this one.
18278 (diff::set_canonical_diff): Declare new private member function.
18279 (diff::get_canonical_diff): Declare new public member function.
18280 (diff::children_nodes): Make this return a vector<diff_sptr>, rather
18281 than a vector<diff*>.
18282 (diff::append_child_node): Make this take a diff_sptr rather than
18284 (class fn_parm_diff): Declare new type.
18285 (compute_diff): Declare new overload for the new
18286 function_decl::parameter_sptr.
18287 (function_decl_diff::subtype_changed_parms): Return a
18288 string_fn_parm_diff_sptr_map rather than a string_changed_parm.
18289 (function_decl_diff::children_nodes): Return a vector<diff_sptr>.
18290 (function_decl_diff::append_child_node): Take a diff_sptr.
18291 (function_decl_diff::changed_functions): Return a
18292 string_function_decl_diff_sptr_map.
18293 (function_decl_diff::changed_variables): Return a
18294 string_var_diff_sptr.
18295 (class function_decl::parameter): Make this a pimpled class.
18296 Also, make it inherit decl_base.
18297 (equals): New overload for function_decl::parameter.
18298 (struct function_decl::parameter::hash): Declare this.
18299 (ir_node_visitor::visit): Declare new overload for
18300 function_decl::parameter.
18301 * src/abg-comparison.cc: Add doc-string about the internal
18302 representation of the comparison engine and also about the concept
18303 of canonical diff of the comparison engine.
18304 (RETURN_IF_BEING_REPORTED_OR_WAS_REPORTED_EARLIER)
18305 (RETURN_IF_BEING_REPORTED_OR_WAS_REPORTED_EARLIER2)
18306 (RETURN_IF_BEING_REPORTED_OR_WAS_REPORTED_EARLIER3): Consider the
18307 canonical diff when trying to know if the current node was
18309 (diff_context::priv::canonical_diffs): New data member.
18310 (diff_context::{get_canonical_diff_for, set_canonical_diff_for,
18311 set_or_get_canonical_diff_for, initialize_canonical_diff}): Define
18312 new member functions.
18313 (diff_context::{diff_has_been_traversed, mark_diff_as_traversed):
18314 Consider canonical diff for these tests and actions.
18315 (diff::priv::children_): Change the type of this to
18317 (diff::canonical_diff_): New data member.
18318 (diff::diff): Initialize the diff::canonical_diff_ data member.
18319 (diff::begin_traversing): Mark the canonical diff node too.
18320 (diff::is_traversing): Consider the canonical diff node in this
18322 (diff::end_traversing): Make the canonical diff node too. Also
18323 mark the current node as having been traversed.
18324 (diff::children_nodes): Return a vector<diff_sptr> type.
18325 (diff::{get_canonical_diff, set_canonical_diff}): Define new
18327 (diff::append_child_node): Take a diff_sptr type parameter.
18328 (diff::{reported_once, currently_reporting}): Flag the canonical
18329 diff node too. And consider the canonical diff node when checking
18331 (diff::traverse): No need to mark the node as being traversed
18332 because the diff::end_traversing() function does it now. Adjust
18333 the code because diff::children_nodes() now returns
18335 ({distinct_diff, var_diff, pointer_diff, array_diff,
18336 reference_diff, qualified_type_diff, enum_diff, class_diff,
18337 base_diff, scope_diff, function_decl_diff, typedef_diff,
18338 corpus_diff}::chain_into_hierarchy): Adjust to the new type that
18339 diff::append_child_node() takes. Also, take into account that the
18340 diff nodes are now un-shared.
18341 (compute_diff_for_distinct_kinds, compute_diff_for_types)
18342 (compute_diff): Do not share diff nodes anymore. Initialize the
18343 canonical diff node for the new created node.
18344 (represent): Take a var_diff_sptr rather than two var_decl_sptr.
18345 Adjust. Also take in account the fact that diff nodes are not
18346 shared anymore, and that they do have canonical diffs.
18347 (var_diff::type_diff): Make the computation of the type_diff of
18348 the var_diff be lazy. This avoids infinite (recursive) creation
18349 of diff nodes when a class diff node has a sub-type of data member
18350 that is a class diff node too.
18351 (var_diff::report): Detect redundant reporting of this kind of
18353 (class_diff::priv::changed_bases_): Change the type of this to
18354 string_base_diff_sptr_map.
18355 (class_diff::priv::subtype_changed_dm_): Change the type of this
18356 to string_var_diff_sptr_map.
18357 (class_diff::priv::changed_dm_): Change the type of this to
18358 unsigned_var_diff_sptr_map.
18359 (class_diff::priv::{count_filtered_subtype_changed_dm,
18360 count_filtered_bases}): Do not take a diff_context_sptr anymore.
18361 (class_diff::ensure_lookup_tables_populated): changed_bases_
18362 subtype_changed_dm_ and changed_dm_ are now *NOT* shared diff
18364 (class_diff::priv::base_has_changed): Adjust.
18365 (class_diff::priv::subtype_changed_dm): Adjust.
18366 (class_diff::priv::count_filtered_bases): Adjust as changed_bases_
18367 is now a map of un-shared diff nodes.
18368 (class_diff::priv::count_filtered_subtype_changed_dm): Adjust as
18369 subtype_changed_dm_ is now a map of un-shared diff nodes.
18370 (class_diff::priv::{count_filtered_changed_mem_fns,
18371 count_filtered_inserted_mem_fns, count_filtered_deleted_mem_fns,
18372 }): Adjust for change of the default parameter value of
18373 diff_context::maybe_apply_filters().
18374 (class_diff::~class_diff): New destructor.
18375 (class_diff::changed_bases): Return a string_base_diff_sptr_map&
18377 (class_diff::{inserted_data_members, deleted_data_members,
18378 changed_member_fns}): Add doc strings.
18379 (struct changed_data_member_comp): Remove.
18380 (struct var_diff_comp): New comparison functor.
18381 (sort_changed_data_members): Remove.
18382 (sort_var_diffs): Define new sorting function.
18383 (class_diff::report): Adjust.
18384 (fn_parm_diff::*): Define member types and functions of the new
18386 (function_decl_diff::priv::{subtype_changed_parms_,
18387 changed_parms_by_id_}): Make these take a map of fn_parm_diff_sptr
18389 (function_decl_diff::ensure_lookup_tables_populated): Adjust to
18390 the fact that priv_->subtype_changed_parms_ and
18391 priv_->priv_->changed_parms_by_id_ now are maps of un-shared
18392 fn_parm_diff_sptr nodes.
18393 (function_decl_diff::subtype_changed_parms): Adjust.
18394 (struct changed_parm_comp): Remove.
18395 (struct fn_parm_diff_comp): New comparison functor.
18396 (sort_changed_parm_map): Remove.
18397 (sort_string_fn_parm_diff_sptr_map): New sorting function.
18398 (function_decl_diff::report): Adjust.
18399 (corpus_diff::priv::children_): Change the type of this to
18401 (corpus_diff::priv::changed_fns_): Changed the type of this to
18402 string_function_decl_diff_sptr_map.
18403 (corpus_diff::priv::changed_vars_): Changed the type of this to
18404 string_var_diff_sptr_map.
18405 (corpus_diff::priv::ensure_lookup_tables_populated): Adjust.
18406 (corpus_diff::priv::apply_filters_and_compute_diff_stats}):
18407 Adjust. Do not need to clear redundancy categorization anymore
18408 because the diff nodes are not shared anymore.
18409 (corpus_diff::priv::categorize_redundant_changed_sub_nodes):
18411 (corpus_diff::priv::clear_redundancy_categorization): Adjust.
18412 (corpus_diff::changed_variables): Adjust.
18413 (struct changed_function_ptr_comp): Remove.
18414 (struct function_decl_diff_comp): New comparison functor.
18415 (sort_string_changed_function_ptr_map): Remove.
18416 (sort_string_function_decl_diff_sptr_map): Define new sorting
18418 (struct changed_vars_comp): Remove.
18419 (struct var_diff_sptr_comp): New comparison functor.
18420 (sort_changed_vars): Remove.
18421 (sort_string_var_diff_sptr_map): Define new sorting function.
18422 (corpus_diff::report): Adjust.
18423 (corpus_diff::traverse): Adjust.
18424 ({category_propagation_visitor,
18425 suppression_categorization_visitor}::visit_end): Adjust.
18426 (clear_redundancy_categorization): Adjust.
18427 * src/abg-hash.cc (function_decl::parameter::hash::operator):
18429 * src/abg-ir.cc (struct function_decl::parameter::priv): Define
18430 here as part of pimpl-ifying the function_decl::parameter type.
18431 (function_decl::parameter::*): Define here the member functions as
18432 part of pimpl-ifying the function_decl::parameter type.
18433 (equals): Define the overload for function_decl::parameter here
18435 (ir_node_visitor::visit(function_decl::parameter*)): Define this.
18436 * tests/data/test-abicompat/test0-fn-changed-report-0.txt: Adjust.
18437 * tests/data/test-diff-suppr/test5-fn-suppr-report-0.txt: Adjust.
18438 * tests/data/test-diff-dwarf/libtest21-redundant-fn-v0.so: New
18440 * tests/data/test-diff-dwarf/libtest21-redundant-fn-v1.so:
18442 * tests/data/test-diff-dwarf/test21-redundant-fn-v0.cc: Source
18443 code for test input binary above.
18444 * tests/data/test-diff-dwarf/test21-redundant-fn-v1.cc: Likewise.
18445 * tests/data/test-diff-dwarf/test21-redundant-fn-report-0.txt: New
18447 * tests/data/test-diff-dwarf/libtest22-changed-parm-c-v0.so: New
18449 * tests/data/test-diff-dwarf/libtest22-changed-parm-c-v1.so:
18451 * tests/data/test-diff-dwarf/test22-changed-parm-c-v0.c: Source
18452 code for test input binary above.
18453 * tests/data/test-diff-dwarf/test22-changed-parm-c-v1.c: Likewise.
18454 * tests/test-diff-dwarf.cc (in_out_spec): Add the new test input
18455 data to the vector the test inputs to run this harness over.
18456 * tests/data/test-diff-suppr/test8-redundant-fn-report-0.txt: New
18458 * tests/data/test-diff-suppr/test8-redundant-fn-report-1.txt:
18460 * tests/data/test-diff-suppr/libtest8-redundant-fn-v0.so: New test
18462 * tests/data/test-diff-suppr/libtest8-redundant-fn-v1.so: Likewise.
18463 * tests/data/test-diff-suppr/test8-redundant-fn-v0.cc: Source code
18464 code for binary test input above.
18465 * tests/data/test-diff-suppr/test8-redundant-fn-v1.cc: Likewise.
18466 * tests/data/test-diff-suppr/test9-changed-parm-c-report-0.txt:
18467 New test input data.
18468 * tests/data/test-diff-suppr/test9-changed-parm-c-report-1.txt:
18470 * tests/data/test-diff-suppr/libtest9-changed-parm-c-v0.so: New
18472 * tests/data/test-diff-suppr/libtest9-changed-parm-c-v1.so: New
18474 * tests/data/test-diff-suppr/test9-changed-parm-c-v0.c: Source
18475 code for binary test input above.
18476 * tests/data/test-diff-suppr/test9-changed-parm-c-v1.c: Likewise.
18477 * tests/test-diff-suppr.cc (in_out_specs): Add the new test input
18478 data to the vector the test inputs to run this harness over.
18479 * tests/data/Makefile.am: Add the new files to the source
18482 2014-12-26 Dodji Seketeli <dodji@redhat.com>
18485 * src/abg-ir.cc (reference_type_def::get_pointed_to_type): Return
18487 * src/abg-comparison.cc (diff::is_filtered_out): Fix a comment.
18489 2014-12-25 Dodji Seketeli <dodji@redhat.com>
18491 Fix pretty printing of pointer_diff node
18492 * src/abg-comparison.cc (pointer_diff::get_pretty_representation):
18493 Add the missing opening square bracket.
18495 2014-12-17 Sinny Kumari <skumari@redhat.com>
18497 Add new methods in corpus_diff class
18498 * include/abg-comparison.h
18499 (corpus_diff::added_unrefed_function_symbols):
18500 Declare new member function
18501 (corpus_diff::added_unrefed_variable_symbols):
18502 Declare new member function
18503 * src/abg-comparison.cc
18504 (corpus_diff::added_unrefed_function_symbols):
18505 Define new member function
18506 (corpus_diff::added_unrefed_variable_symbols):
18507 Define new member function
18509 2014-12-15 Sinny Kumari <sinny@redhat.com>
18511 Add new corpus_diff::added_variables() method
18512 * include/abg-comparison.h (corpus_diff::added_variables):
18513 Declare new member function
18514 * src/abg-comparison.cc (corpus_diff::added_variables):
18515 Define new member function
18517 2014-12-12 Dodji Seketeli <dodji@redhat.com>
18519 Extend detection of compatible types to arrays
18520 * include/abg-fwd.h (is_array_type): Renamed is_array_type_def()
18521 into this for consistency.
18522 * src/abg-comparison.cc (type_suppression::suppresses_diff):
18524 * src/abg-dwarf-reader.cc (build_array_type): Remove useless code
18525 that was trying to read a DW_AT_byte_size attribute from the DIE
18526 of the array, but then wasn't doing anything with the value. But
18527 then if the attribute was not present, the array type wouldn't be
18529 * src/abg-ir.cc (strip_typedef): Strip typedefs from sub-types of
18531 (is_array_type): Rename is_array_def() to this, for consistency.
18532 (var_decl::get_pretty_representation): Adjust.
18533 * tests/data/test-diff-filter/libtest24-compatible-vars-v0.so: New
18535 * tests/data/test-diff-filter/libtest24-compatible-vars-v1.so: Likewise.
18536 * tests/data/test-diff-filter/test24-compatible-vars-report-0.txt:
18538 * tests/data/test-diff-filter/test24-compatible-vars-v0.c: Source
18539 code for the first binary above.
18540 * tests/data/test-diff-filter/test24-compatible-vars-v1.c: Source
18541 code for the second binary above.
18542 * tests/data/Makefile.am: Add the new test input data to source
18544 * tests/test-diff-filter.cc (in_out_specs): Add the new test input
18545 data to the list of input to run this test harness over.
18547 2014-12-12 Dodji Seketeli <dodji@redhat.com>
18549 Improve the doc string for the elf_symbol::get_id_string() method
18550 * src/abg-ir.cc (elf_symbol::get_id_string): Improve doc string.
18551 Talk about the content of the id string of an elf symbol.
18553 2014-12-11 Dodji Seketeli <dodji@redhat.com>
18555 Better handle pointer-to-void in various places of the pipeline
18556 * src/abg-comparison.cc (pointer_diff::report): Handle the case of
18558 * src/abg-dwarf-reader.cc (build_pointer_type_def): Assert that
18559 the underlying pointer is non-null.
18560 * src/abg-ir.cc (pointer_type_def::pointer_type_def): Handle the
18561 case of pointer to void.
18562 (equals): Likewise in the overload for const pointer_type_def.
18563 (pointer_type_def::get_qualified_name): Likewise.
18565 2014-12-11 Dodji Seketeli <dodji@redhat.com>
18567 Try harder to detect a DWARF attribute pointing into alternate DWARF section
18568 * src/abg-dwarf-reader.cc
18569 (is_die_attribute_resolved_through_gnu_ref_alt): Support the case
18570 of the origin function itself having a specification function
18573 2014-12-11 Dodji Seketeli <dodji@redhat.com>
18575 Fix accidentally removing the scope of variables when fixing them up
18576 * src/abg-dwarf-reader.cc (build_translation_unit_and_add_to_ir):
18577 During var decl fixup, remove the scope of a variable only when we
18578 are sure that we want to re-scope it.
18580 2014-12-11 Dodji Seketeli <dodji@redhat.com>
18582 Fix several aborts while diffing libdw.so
18583 * src/abg-corpus.cc
18584 (corpus::priv::build_unreferenced_symbols_tables): Fix wrong
18585 guestimation of the size of the map of unreferenced symbol table.
18586 * src/abg-dwarf-reader.cc (get_version_needed_for_versym): Honour
18587 the conditions of breaking out from walking the verneed table.
18589 2014-12-10 Dodji Seketeli <dodji@redhat.com>
18591 Temporarily disable redundant diff report elimination
18592 * src/abg-comparison.cc
18593 (diff_context::priv::priv): Show redundant changes by default.
18594 (categorize_redundancy): Do not categorize redundancy if the
18595 diff_context says that we shouldn't.
18596 * tools/abicompat.cc (options::show_redundant): New data member.
18597 (options::options): Initialize to true.
18598 (display_usage): Add new help string for new --no-redundant and
18599 --redundant options.
18600 (parse_command_line): Parse new --no-redundant and --redundant
18601 command line options.
18602 (main): Initialize the diff context with respect to the
18603 options::show_redundant property.
18604 * tools/abidiff.cc (options::options): Initialize the
18605 show_redundant_changes data member to true.
18606 (display_usage): Show new help string for the new --no-redundant
18607 command line option.
18608 (parse_command_line): Parse the new --no-redundant command line
18610 * tests/data/test-diff-filter/libtest23-redundant-fn-parm-change-v0.so:
18611 New test data input.
18612 * tests/data/test-diff-filter/libtest23-redundant-fn-parm-change-v1.so:
18614 * tests/data/test-diff-filter/test23-redundant-fn-parm-change-report-0.txt:
18616 * tests/data/test-diff-filter/test23-redundant-fn-parm-change-v0.c:
18617 Source code for the first binary above.
18618 * tests/data/test-diff-filter/test23-redundant-fn-parm-change-v1.c:
18619 Source code for the second binary above.
18620 * tests/data/Makefile.am: Add the new test data input to source
18622 * tests/test-abicompat.cc (in_out_specs): Add --no-redundant to
18623 abicompat when we don't want it to show redundant diff reports.
18624 * test-diff-filter.cc (in_out_specs): Likewise for abidiff.
18625 * test-diff-suppr.cc (in_out_specs): Likewise.
18627 2014-12-10 Jan Engelhardt <jengelh@inai.de>
18629 Fix conditional build wrt zip archives and cx11
18630 * configure.ac: remove (broken) assignment to the
18631 ENABLE_ZIP_ARCHIVE_AND_CXX11 variable
18632 * Makefile.am: replace variable assignments to
18633 ZIP_ARCHIVE_TESTS_FIRST_PART, ZIP_ARCHIVE_TESTS_SECOND_PART
18634 by ZIP_ARCHIVE_TESTS using the "+=" automake operator.
18635 Likewise for CXX11_TESTS.
18637 2014-12-10 Dodji Seketeli <dodji@redhat.com>
18639 Make determining of compatible types complete
18640 * include/abg-fwd.h (is_reference_type, is_function_type)
18641 (is_method_type): Declare new predicates.
18642 * include/abg-ir.h (class qualified_type_def): Pimpl this class.
18643 (qualified_type_def::qualified_type_def): Use the convenience
18644 type_base_sptr typedef.
18645 (qualified_type_def::{get_cv_quals, set_cv_quals}): Use the
18646 qualified_type_def::CV type rather than char.
18647 (qualified_type_def::get_underlying_type): Use the convenience
18648 type_base_sptr typedef.
18649 (pointer_type_def::pointer_type_def): Likewise.
18650 (function_decl::parameter::parameter): Add a new constructor.
18651 * src/abg-ir.cc (is_reference_type, is_function_type)
18652 (is_method_type): Define new predicates.
18653 (class qualified_type_def::priv): Define this new private type,
18654 for the purpose of Pimpl-ifying the qualified_type_def class.
18655 (qualified_type_def::{qualified_type_def, build_name,
18656 get_cv_quals_string_prefix, get_underlying_type}): Adjust for the
18657 purpose of Pimpl-ifying the qualified_type_def class.
18658 (equals): In the qualified_type_def, reference_type_def overloads,
18659 trust the fact that we have operator== overload for the
18660 type_base_sptr. This avoids crashes for when the (possible)
18661 underlying type is null.
18662 (pointer_type_def::operator==): Likewise.
18663 (strip_typedef): Make this recursively strip
18664 typedefs from sub-types.
18665 (types_are_compatible): Handle null types.
18666 (qualified_type_def::{get_cv_quals, set_cv_quals}): Handle
18667 qualified_type_def::CV rather than char.
18668 (pointer_type_def::pointer_type_def): Use the convenience
18669 type_base_sptr typedef.
18670 * include/abg-comparison.h (distinct_diff::compatible_child_diff):
18671 Declare new member function.
18672 * src/abg-comparison.cc (distinct_diff::compatible_child_diff):
18673 Define new member function.
18674 (distinct_diff::chain_into_hierarchy):
18675 Chain the compatible child diff node that might be present.
18676 (distinct_diff::report): Now when a distinct diff carries a
18677 compatible change, mention it in the report.
18678 * src/abg-comp-filter.cc (is_compatible_change): A compatible
18679 change can now involve types that are not typedefs. Only their
18680 sub-types need to be involved with typedef-ness.
18681 * tests/data/test-diff-dwarf/test{2,4,5}-report.txt: Adjust.
18682 * tests/data/test-diff-filter/libtest21-compatible-vars-v0.so: New
18684 * tests/data/test-diff-filter/libtest21-compatible-vars-v1.so: Likewise.
18685 * tests/data/test-diff-filter/test21-compatible-vars-report-0.txt Likewise.
18686 * tests/data/test-diff-filter/test21-compatible-vars-report-1.txt Likewise.
18687 * tests/data/test-diff-filter/test21-compatible-vars-v0.cc: Source
18688 code for the first data input binary above.
18689 * tests/data/test-diff-filter/test21-compatible-vars-v1.cc: Source
18690 code for the second data input binary above.
18691 * tests/data/test-diff-filter/libtest22-compatible-fns-v0.so: New
18693 * tests/data/test-diff-filter/libtest22-compatible-fns-v1.so Likewise.
18694 * tests/data/test-diff-filter/test22-compatible-fns-report-0.txt:
18695 New test data input.
18696 * tests/data/test-diff-filter/test22-compatible-fns-report-1.txt: Likewise.
18697 * tests/data/test-diff-filter/test22-compatible-fns-v0.c: Source
18698 code for the first test data input binary above.
18699 * tests/data/test-diff-filter/test22-compatible-fns-v1.c: Source
18700 code for the second test data input binary above.
18701 * tests/data/Makefile.am: Add the new test input data to source
18703 * tests/test-diff-filter.cc (in_out_specs): Add the new test data
18704 input above to the list of test data this harness has to be run
18707 2014-12-09 Dodji Seketeli <dodji@redhat.com>
18709 Fix classification of parameter addition in C
18710 * src/abg-comp-filter.cc (function_name_changed_but_not_symbol):
18711 Compare the fully qualified name of the functions; not their
18712 pretty representation.
18713 * tests/data/test-diff-dwarf/libtest20-add-fn-parm-v0.so: New test
18715 * tests/data/test-diff-dwarf/libtest20-add-fn-parm-v1.so:
18717 * tests/data/test-diff-dwarf/test20-add-fn-parm-report-0.txt:
18719 * tests/data/test-diff-dwarf/test20-add-fn-parm-v0.c: Source code
18720 for the first shared library above.
18721 * tests/data/test-diff-dwarf/test20-add-fn-parm-v1.c: Source code
18722 for the second shared library above.
18723 * tests/test-diff-dwarf.cc (in_out_specs): Add the test input data
18724 above to the list of test input the harness must run over.
18725 * Makefile.am: Add the new files above to source distribution.
18727 2014-12-08 Dodji Seketeli <dodji@redhat.com>
18729 Wire the soname check into abicompat
18730 * include/abg-comparison.h (corpus_diff::soname_changed): Declare
18731 new member function.
18732 * src/abg-comparison.cc (corpus_diff::soname_changed): Define new
18734 (corpus_diff::length): Use the new corpus_diff::soname_changed()
18736 * tests/data/test-abicompat/libtest4-soname-changed-v0.so: New
18738 * tests/data/test-abicompat/libtest4-soname-changed-v1.so:
18740 * tests/data/test-abicompat/test4-soname-changed-app: Likewise.
18741 * tests/data/test-abicompat/test4-soname-changed-report-0.txt:
18743 * tests/data/test-abicompat/test4-soname-changed-app.cc: Source
18744 code for one of the binaries above.
18745 * tests/data/test-abicompat/test4-soname-changed-v0.cc: Likewise.
18746 * tests/data/test-abicompat/test4-soname-changed-v1.cc: Likewise.
18747 * tests/test-abicompat.cc (in_out_specs): Add the new test input
18748 data to the list of input data to run this harness over.
18749 (main): Take the soname change in account to determine if the
18750 change is ABI incompatible.
18751 * tests/data/Makefile.am: Add the new test input data above to source
18754 2014-12-07 Dodji Seketeli <dodji@redhat.com>
18756 Fixup messed up old runtestdiffdwarf input tests
18757 * tests/data/test-diff-dwarf/test17-non-refed-syms-report-0.txt:
18758 Add this missing reference test output.
18759 * tests/data/Makefile.am: Add the new reference test output to
18760 source distribution.
18761 * tests/data/test-diff-dwarf/test18-alias-sym-report-0.txt: Fix
18762 this output to avoid emitting symbol alias information in it.
18763 * tests/test-diff-dwarf.cc (in_out_specs): Add two missing test
18764 input data to the list of input data this harness is supposed to
18767 2014-12-07 Dodji Seketeli <dodji@redhat.com>
18769 Support reading and comparing soname from ELF files
18770 * include/abg-corpus.h (corpus::{get_needed, set_needed,
18771 get_soname, set_soname}): Declare new accessors.
18772 * src/abg-corpus.cc (corpus::priv::{needed, soname}): New data
18774 (corpus::{get_needed, set_needed, get_soname, set_soname}): Define
18776 (corpus::is_empty): Take dt_needed and dt_soname in account in
18777 computing empty-ness.
18778 * src/abg-dwarf-reader.cc (read_context::{dt_needed_,
18779 dt_soname_}): New data members.
18780 (read_context::{dt_needed, dt_soname}): New accessors.
18781 (read_context::load_dt_soname_and_needed): New member function.
18782 (read_corpus_from_elf): Call the new
18783 read_context::load_dt_soname_and_needed() to read the dt_soname
18784 and dt_needed tags. Set them to the corpus.
18785 * include/abg-comparison.h (diff_context::show_soname_change):
18786 Declare new accessors.
18787 * src/abg-comparison.cc (diff_context::priv::show_soname_change_):
18789 (diff_context::priv::priv): Initialize the new data member
18790 diff_context::priv::show_soname_change_.
18791 (diff_context::show_soname_change): Define new accessors.
18792 (corpus_diff::priv::sonames_equal_): New data member.
18793 (corpus_diff::priv::priv): Initialize the new data member
18794 corpus_diff::priv::sonames_equal_.
18795 (corpus_diff::length): Take the new priv_->sonames_equals_ data
18797 (corpus_diff::{report, priv::emit_diff_stats}): If the sonames
18798 changed and we are allowed to report it, then report it.
18799 (compute_diff): In the variant for corpus_diff, do not forget to
18800 compare the sonames.
18801 * src/abg-reader.cc (build_needed, read_elf_needed_from_input):
18802 Define new static functions.
18803 (read_corpus_from_input): Read the 'soname' attribute from the
18804 'abi-corpus' xml element node.
18805 * src/abg-writer.cc (write_elf_needed): Define new static
18807 (write_corpus_to_native_xml): Write a new 'elf-needed' xml element
18808 node that contains one xml 'dependency' element node per
18809 dependency to emit. This uses the new write_elf_needed() function
18811 * tests/data/test-diff-dwarf/libtest19-soname-v0.so: New test
18813 * tests/data/test-diff-dwarf/libtest19-soname-v1.so: Likewise.
18814 * tests/data/test-diff-dwarf/test19-soname-report-0.txt: Likewise.
18815 * tests/data/test-diff-dwarf/test19-soname-v0.c: Source code of
18816 the first binary above.
18817 * tests/data/test-diff-dwarf/test19-soname-v1.c: Source code of
18818 the second binary above.
18819 * tests/test-diff-dwarf.cc (in_out_specs): Add the test input
18820 above to the list of test input to run this harness on.
18821 * tests/data/Makefile.am: Add the new test input data above.
18822 * tests/data/test-read-dwarf/test{0,1}.abi: Adjust.
18823 * tests/data/test-read-dwarf/test{2,3,4,6,}.so.abi: Adjust.
18825 2014-12-07 Dodji Seketeli <dodji@redhat.com>
18827 Fix some style nits in the native reader and writer
18828 * src/abg-reader.cc (read_symbol_db_from_input): Align parameter
18829 names. Fix indentation of the first line of the function.
18830 * src/abg-writer.cc (write_elf_symbols_table): Align parameter names.
18832 2014-12-07 Dodji Seketeli <dodji@redhat.com>
18834 Fix a crash while writing symbol information
18835 * src/abg-corpus.cc (corpus::{get_fun_symbol_map_sptr,
18836 get_var_symbol_map_sptr}): Make sure the symbol map is always
18837 constructed, even if it's empty.
18838 * tests/data/test-read-write/test26.xml: New test input data.
18839 * tests/test-read-write.cc (in_out_spec): Add this new test input
18840 data to the list of input data to run the harness on.
18841 (main): Support reading and writing corpus files alongside
18842 translation unit files that we were handling already.
18843 * tests/data/Makefile.am: Add the new test input data to source
18846 2014-12-05 Dodji Seketeli <dodji@redhat.com>
18848 Avoid showing ugly version info in the libabigail online manual
18849 * doc/manuals/conf.py: Update copyright mention. Do not show ugly
18850 version information.
18852 2014-11-30 Dodji Seketeli <dodji@redhat.com>
18854 Initial implementation of the abicompat tool
18855 * include/abg-comparison.h
18856 (diff_context::show_added_symbols_unreferenced_by_debug_info):
18857 Declare new accessors.
18858 (corpus_diff::{deleted_variables,
18859 deleted_unrefed_function_symbols,
18860 deleted_unrefed_variable_symbols,
18861 apply_filters_and_suppressions_before_reporting}): Declare new
18863 (corpus_diff::diff_stats): Declare this new type. Actually this
18864 was previously corpus_diff::priv::diff_stats, which was a hidden
18865 internal type.. We are moving it here, in the external API so
18866 that client code can have more information about changes
18867 statistics. Change all the previously publicly accessible data
18868 members into accessor functions.
18869 * src/abg-comparison.cc (class corpus_diff::diff_stats::priv): New
18871 (diff_context::priv::show_added_syms_unreferenced_by_di_): New
18873 (diff_context::priv::priv): Adjust.
18874 (diff_context::show_added_symbols_unreferenced_by_debug_info):
18875 Define this new method.
18876 (corpus_diff::priv::emit_diff_stats): Do not show the diff stat
18877 if the only changes is added function or variables symbols and if
18878 we were instructed to not show added symbols.
18879 (corpus_diff::priv::{diff_stats_, filters_and_suppr_applied_}):
18881 (corpus_diff::priv::priv): Initialize the
18882 filters_and_suppr_applied_ data member.
18883 (corpus_diff::priv::diff_stats): Move this type to
18884 corpus_diff::diff_stats.
18885 (corpus_diff::priv::{apply_filters_and_compute_diff_stats,
18886 emit_diff_stats}): Adjust.
18887 (corpus_diff::apply_filters_and_suppressions_before_reporting):
18888 Define new member function.
18889 (corpus_diff::report): Use the new
18890 apply_filters_and_suppressions_before_reporting() function, rather
18891 than applying the filters and suppressions by ourselves. Also
18892 adjust to the use the accessors of the new corpus_diff::diff_stats
18894 (corpus_diff::{deleted_variables,
18895 deleted_unrefed_function_symbols,
18896 deleted_unrefed_variable_symbols}): Define new accessors.
18897 (corpus_diff::diff_stats::{diff_stats, num_func_removed,
18898 num_func_added, num_func_changed, num_func_filtered_out,
18899 net_num_func_changed, num_vars_removed, num_vars_added,
18900 num_vars_changed, num_vars_filtered_out, net_num_vars_changed,
18901 num_func_sym_removed, num_func_syms_added, num_var_syms_removed,
18902 num_var_syms_added}): Define new member functions.
18903 * include/abg-corpus.h (corpus::{get_sym_ids_of_fns_to_keep,
18904 get_sym_ids_of_vars_to_keep}): Declare new methods.
18905 * src/abg-corpus.cc (corpus::priv::{sym_id_fns_to_keep,
18906 sym_id_vars_to_keep}): Added data members.
18907 (symtab_build_visitor_type::{unrefed_fun_symbols,
18908 unrefed_var_symbols, sym_id_fns_to_keep, sym_id_vars_to_keep}):
18909 Added new data members.
18910 (symtab_build_visitor_type::symtab_build_visitor_type): Take two
18911 additional parameters for the function and variable symbol ids to
18913 (symtab_build_visitor_type::add_fn_to_wip_fns): Take the function
18914 symbols to keep in account when building the exported symbol
18916 (symtab_build_visitor_type::add_var_to_wip_vars): Likewise, take
18917 the variable symbols to keep in account when building the exported
18919 (corpus::priv::build_public_decl_table): Adjust the initialization
18920 of the visitor that walks the ABI artifacts to build the exported
18921 symbol table to know take a list of function/variable symbols to
18923 (corpus::priv::build_unreferenced_symbols_tables): Ensure that the
18924 public table of functions/variables is built before doing the work
18925 of this function. Also, if a list of variable/function symbols to
18926 keep is given, drop all symbols that are not in that list on the
18928 (corpus::{get_sym_ids_of_fns_to_keep,
18929 get_sym_ids_of_vars_to_keep}): Define new accessors.
18930 * tools/abicompat.cc: New abicompat tool.
18931 * doc/manuals/abicompat.rst: New documentation source for
18933 * doc/manuals/libabigail-tools.rst: Add an entry for the abicompat
18935 * tests/test-abicompat.cc: New test harness for the 'abicompat'
18937 * tests/Makefile.am: Build the runtestabicompat test harness and
18938 add it to the list of tests harnesses that are run by make check.
18939 * tests/data/test-abicompat/libtest0-fn-changed-libapp-v0.so: New
18941 * tests/data/test-abicompat/libtest0-fn-changed-libapp-v1.so: Likewise.
18942 * tests/data/test-abicompat/test0-fn-changed-app: Likewise.
18943 * tests/data/test-abicompat/test0-fn-changed-0.suppr: Likewise
18944 * tests/data/test-abicompat/test0-fn-changed-report-0.txt: Likewise.
18945 * tests/data/test-abicompat/test0-fn-changed-report-1.txt: Likewise.
18946 * tests/data/test-abicompat/test0-fn-changed-app.cc: Likewise.
18947 * tests/data/test-abicompat/test0-fn-changed-libapp.h: Likewise.
18948 * tests/data/test-abicompat/test0-fn-changed-libapp-v0.cc: Likewise.
18949 * tests/data/test-abicompat/test0-fn-changed-libapp-v1.cc: Likewise.
18950 * tests/data/test-abicompat/libtest1-fn-removed-v0.so: Likewise.
18951 * tests/data/test-abicompat/libtest1-fn-removed-v1.so: Likewise.
18952 * tests/data/test-abicompat/test1-fn-removed-app: Likewise.
18953 * tests/data/test-abicompat/test1-fn-removed-app.cc: Likewise.
18954 * tests/data/test-abicompat/test1-fn-removed-report-0.txt: Likewise.
18955 * tests/data/test-abicompat/test1-fn-removed-v0.cc: Likewise.
18956 * tests/data/test-abicompat/test1-fn-removed-v1.cc: Likewise.
18957 * tests/data/test-abicompat/libtest2-var-removed-v0.so: Likewise.
18958 * tests/data/test-abicompat/libtest2-var-removed-v1.so: Likewise.
18959 * tests/data/test-abicompat/test2-var-removed-app: Likewise.
18960 * tests/data/test-abicompat/test2-var-removed-app.cc: Likewise.
18961 * tests/data/test-abicompat/test2-var-removed-report-0.txt: Likewise.
18962 * tests/data/test-abicompat/test2-var-removed-v0.cc: Likewise.
18963 * tests/data/test-abicompat/test2-var-removed-v1.cc: Likewise.
18964 * tests/data/test-abicompat/libtest3-fn-removed-v0.so: Likewise.
18965 * tests/data/test-abicompat/libtest3-fn-removed-v1.so: Likewise.
18966 * tests/data/test-abicompat/test3-fn-removed-app: Likewise.
18967 * tests/data/test-abicompat/test3-fn-removed-app.cc: Likewise.
18968 * tests/data/test-abicompat/test3-fn-removed-report-0.txt: Likewise.
18969 * tests/data/test-abicompat/test3-fn-removed-v0.cc: Likewise.
18970 * tests/data/test-abicompat/test3-fn-removed-v1.cc: Likewise.
18971 * tests/data/test-abicompat/test3-fn-removed-version-script-0 Likewise.:
18972 * tests/data/test-abicompat/test3-fn-removed-version-script-1: Likewise.
18973 * tests/data/Makefile.am: Add the new test inputs above to the
18974 source distribution.
18976 2014-11-30 Dodji Seketeli <dodji@redhat.com>
18978 Support reading undefined symbols from an ELF file
18979 * include/abg-corpus.h (corpus::{set_undefined_fun_symbol_map,
18980 set_undefined_var_symbol_map, get_undefined_fun_symbol_map_sptr,
18981 get_undefined_fun_symbol_map, get_sorted_undefined_fun_symbols,
18982 get_undefined_var_symbol_map_sptr, get_undefined_var_symbol_map,
18983 get_sorted_undefined_var_symbols}): Declare new methods ...
18984 * src/abg-corpus.cc (corpus::{set_undefined_fun_symbol_map,
18985 set_undefined_var_symbol_map, get_undefined_fun_symbol_map_sptr,
18986 get_undefined_fun_symbol_map, get_sorted_undefined_fun_symbols,
18987 get_undefined_var_symbol_map_sptr, get_undefined_var_symbol_map,
18988 get_sorted_undefined_var_symbols}): ... and define them.
18989 (struct corpus::priv::{undefined_var_symbol_map,
18990 sorted_undefined_var_symbols, undefined_fun_symbol_map,
18991 sorted_undefined_fun_symbols}): New data members.
18992 * src/abg-dwarf-reader.cc (get_symbol_versionning_sections): Also
18993 return the SHT_GNU_verneed section.
18994 (get_version_needed_for_versym): New static function.
18995 (get_version_definition_for_versym): Factorize this function out
18997 (get_version_for_symbol): ... this one. Take a flag that says if
18998 we want the definition version or the needed version of a symbol.
18999 Extend the implementation using the two new function
19000 get_version_needed_for_versym() and
19001 get_version_definition_for_versym() above. This function now
19002 returns the version either for a defined & exported symbol, or for
19003 an undefined symbol.
19004 (lookup_symbol_from_sysv_hash_tab)
19005 (lookup_symbol_from_gnu_hash_tab, lookup_symbol_from_symtab):
19006 Adjust for the change of signature of get_version_for_symbol().
19007 (read_context::{undefined_fun_syms_, undefined_var_syms_}): New
19009 (read_context::lookup_elf_symbol_from_index): Adjust for
19010 invocation of the new signature of get_version_for_symbol().
19011 (read_context::{undefined_fun_syms_sptr, undefined_fun_syms,
19012 undefined_var_syms_sptr, undefined_var_syms}): Define new methods.
19013 (read_context::load_symbol_maps): Add support for loading
19014 undefined symbols and their versions.
19015 (read_context::maybe_load_symbol_maps): Take in account the need
19016 to load undefined symbols as well.
19017 (read_corpus_from_elf): Once the undefined symbols have been read
19018 from the ELF file, stuff them into the resulting ABI corpus that
19021 2014-11-30 Dodji Seketeli <dodji@redhat.com>
19023 Show the pretty representation of deleted variables in the diff output
19024 * src/abg-comparison.cc (corpus_diff::report): Show the pretty
19025 representation of deleted variables in all cases.
19027 2014-11-30 Dodji Seketeli <dodji@redhat.com>
19029 Fix status checking in abidw
19030 * tools/abidw.cc (main): Fix successful status checking.
19032 2014-11-30 Dodji Seketeli <dodji@redhat.com>
19034 Rename elf_symbol::get_is_defined() to elf_symbol::is_defined()
19035 * include/abg-ir.h (elf_symbol::get_is_defined): Rename into
19036 elf_symbol::is_defined.
19037 (elf_symbol::set_is_defined): Rename into elf_symbol::is_defined.
19038 * src/abg-ir.cc (elf_symbol::get_is_defined): Likewise, rename
19039 this into elf_symbol::is_defined.
19040 (elf_symbol::set_is_defined): Likewise, rename this into
19041 elf_symbol::is_defined.
19042 (elf_symbol::{elf_symbol, is_public}): Adjust.
19043 * src/abg-writer.cc (write_elf_symbol): Adjust.
19045 2014-11-30 Dodji Seketeli <dodji@redhat.com>
19047 Update the copyright years of include/abg-corpus.h
19048 * include/abg-corpus.h: Update the copyright years of this file.
19050 2014-11-20 Dodji Seketeli <dodji@redhat.com>
19052 Make tests/data directory have its own Makefile
19053 * configure.ac(AC_CONFIG_FILE): Generate a new tests/data/Makefile
19055 * tests/Makefile.am: Link the data/ sub-directory from here. Move
19056 the EXTRA_DIST definition to ...
19057 * tests/data/Makefile.am: ... this new file here.
19059 2014-11-20 Dodji Seketeli <dodji@redhat.com>
19061 Hmh, finally EXTRA_DIST was just fine
19062 * tests/Makefile.am: Put EXTRA_DIST back.
19064 2014-11-19 Dodji Seketeli <dodji@redhat.com>
19066 Make sure we don't try to build test data
19067 * tests/Makefile.am: Replace EXTRA_DIST with noinst_DATA.
19069 2014-11-19 Dodji Seketeli <dodji@redhat.com>
19071 Fix manual documentation generation
19072 * doc/manuals/Makefile.am: Trigger the manual generation from the
19073 html-doc target. Add the source files to the distribution. Fix
19076 2014-11-19 Dodji Seketeli <dodji@redhat.com>
19078 Fix apidoc building
19079 * doc/Makefile.am: Trigger the building frm the html-doc target.
19081 2014-11-19 Dodji Seketeli <dodji@redhat.com>
19083 Cleanup of configure.ac
19084 * configure.ac: Remove useless variables and fix a typo.
19086 2014-11-19 Dodji Seketeli <dodji@redhat.com>
19088 Add loads of forgotten test data files to source distribution
19089 * tests/Makefile.am: Add lots of test data file that were
19090 forgotten and then revealed by running make distcheck. Also fix
19091 some wrong paths to test data files.
19093 2014-11-19 Dodji Seketeli <dodji@redhat.com>
19095 Use DESTDIR in doc/manuals/Makefile.am when creating the manuals
19096 * doc/manuals/Makefile.am: Use the DESTDIR variable when
19097 addressing the destination directory of the created manuals.
19099 2014-11-19 Dodji Seketeli <dodji@redhat.com>
19101 Fix a thinko in doc/Makefile.am
19102 * apidoc-install-html-doxygen: Make sure that the directory
19103 $(DESTDIR)$(docdir) does not exist, before trying to create it.
19105 2014-11-19 Dodji Seketeli <dodji@redhat.com>
19107 Add doc/api/libabigail.doxy to source distribution
19108 * doc/Makefile.am: Add the file api/libabigail.doxy to source
19111 2014-11-19 Dodji Seketeli <dodji@redhat.com>
19113 Make the install-html target of apidoc/manual be conditional
19114 * configure.ac: add --enable-apidoc and --enable-manual. Add the
19115 two ENABLE_APIDOC and ENABLE_MANUAL automake conditional
19116 variables. Add the activation of the apidoc and manual into the
19117 final package configuration report.
19118 * doc/Makefile.am: Make the install-html, install-data-local and
19119 uninstall-local targets conditional on the ENABLE_APIDOC
19120 conditional variable.
19121 * doc/manuals/Makefile.am: Likewise, make the install-html,
19122 install-data-local and uninstall-data-local conditional on the
19123 ENABLE_MANUAL conditional variable.
19125 2014-11-19 Dodji Seketeli <dodji@redhat.com>
19127 Make the alt dwarf debug file *not* be a symlink
19128 * tests/data/test-alt-dwarf-file/test0-debug-dir/.build-id/16/7088580c513b439c9ed95fe6a8b29496495f26.debug:
19129 Make this be a real file, no more a symlink to
19130 ../../../test0-common-dwz.debug.
19131 * tests/data/test-alt-dwarf-file/test0-report.txt: Now that the
19132 file above is no more a symlink the message emitted by the test
19133 changes. It now says that the file found is the base name of the
19134 real file. So change the reference report accordingly.
19136 2014-11-19 Dodji Seketeli <dodji@redhat.com>
19138 Use the POSIX 1003.1-1988 tar format for dist tar
19139 * configure.ac: For the tar invocation made by make dist, make
19140 sure to use the POSIX 1003.1-1988 tar format that can support file
19141 names of more than 99 characters. This is useful for the
19142 test-alt-dwarf-file test that has data made of a file which patch
19143 has more than 99 characters.
19145 2014-11-19 Dodji Seketeli <dodji@redhat.com>
19147 Nested automake conditionals don't work
19148 * configure.ac (ENABLE_ZIP_ARCHIVE_AND_CXX11): Define this
19149 automake condition variable that is true if both the zip archive
19150 and c++11 features are enabled. This is important to know if the
19151 test runtestdot is going to be compiled. That test needs both
19152 c++11 and the zip archive features.
19153 * tests/Makefile.am: Do not nest automake conditional statements.
19154 It does not work. Rather, use the new
19155 ENABLE_ZIP_ARCHIVE_AND_CXX11 condition variable.
19157 2014-11-19 Dodji Seketeli <dodji@redhat.com>
19159 INSTALL file is not yet in the distribution
19160 * Makefile.am: Do not say that INSTALL file is in the distribution
19163 2014-11-19 Dodji Seketeli <dodji@redhat.com>
19165 If c++11 is disable do not execute the runtestdot test
19166 * tests/Makefile.am: runtestdot should not be executed if c++11 is
19169 2014-11-18 Dodji Seketeli <dodji@redhat.com>
19171 make html now generates the apidoc, manual and web site
19172 * doc/Makefile.am (html-local): Make the html file generation be
19173 triggered by the html-local target, not the html target. The html
19174 target is a recursive target that calls the the html-local targets
19175 under each directory.
19176 (apidoc-html-doxygen): Rename the doc-html-doxygen target into
19177 (apidoc-install-html-doxygen): Rename doc-install-html-doxygen
19179 (DO_HTML, DO_INSTALL_HTML): Adjust.
19180 (install-data-local): New target.
19181 * doc/manuals/Makefile.am (install-html, install-data-local): New
19184 2014-11-18 Dodji Seketeli <dodji@redhat.com>
19186 Generate the manual html documentation in the proper build directory
19187 * doc/manuals/Makefile.am: Renamed doc/manuals/Makefile into this.
19188 (BUILDDIR): Make this variable point to $(builddir)/_build as
19189 opposed to just _build previously.
19190 (SOURCEDIR): New variable that points to the source dir as known
19191 by the autotools magic.
19192 (ALLSPHINXOPTS): Make the source dir refer to the new
19193 $(SOURCEDIR), rather than just '.' as previously.
19194 * configure.ac (doc/manuals/Makefile): Generate this now.
19195 * doc/Makefile.am: Link the sub-directory doc/manuals.
19197 2014-11-18 Dodji Seketeli <dodji@redhat.com>
19199 Update Makefile.am after the additions related to gen-changelog.py
19200 * Makefile.am: Add ChangeLog and COPYING-LGPLV2 to the source
19202 (update-changelog, tag-release-only tag-release): New Makefile
19205 2014-11-18 Dodji Seketeli <dodji@redhat.com>
19207 Added a ChangeLog that is auto-generated by gen-changelog.py
19208 * ChangeLog: Add this auto-generated file.
19210 2014-11-18 Dodji Seketeli <dodji@redhat.com>
19212 [gen-changelog] Make subject line always come first
19213 * gen-changelog.py (process_commit): In changelog entries with an
19214 empty body, make sure the subject line comes first.
19216 2014-11-18 Dodji Seketeli <dodji@redhat.com>
19218 Try harder to remove timezone info from the date
19219 * gen-changelog.py (process_commit): The timezone shit can start
19220 either with a '+' or a '-'.
19222 2014-11-18 Dodji Seketeli <dodji@redhat.com>
19224 Not all ChangeLog file lines end up with a ':'
19225 * gen-changelog.py (process_commit): When trying to recognize the
19226 beginning of a ChangeLog entry body, do not expect a line that
19227 starts with a '*' to end with a ':' because there can be long file
19228 names that end on the next line.
19230 2014-11-18 Dodji Seketeli <dodji@redhat.com>
19232 Allow introductory text in commit log and ignore it when generating ChangeLog
19233 * gen-changelog.py (process_commit): Everything that comes between
19234 the subject line of the commit and the first \t* sequence is
19235 considered to be introductory text. Ignore it when generating the
19237 * COMMIT-LOG-GUIDELINES: Update the commit log guidelines to
19238 reflect the fact that we can now have introductory text in the
19241 2014-11-18 Dodji Seketeli <dodji@redhat.com>
19243 Initial import of gen-changelog.py
19244 * gen-changelog.py: Copy from
19245 https://github.com/GNOME/gnet/blob/master/gen-changelog.py.
19246 License it under LGPLV v2+ after asking Edward Hervey's kind
19247 permission. Ain't Free Software really great?
19249 2014-11-18 Dodji Seketeli <dodji@redhat.com>
19251 Fix the reference to the IRC channel on the web page
19252 * doc/website/mainpage.txt: The IRC server address is
19253 irc.oftc.net, not just oftc.net.
19254 * include/abg-fwd.h: Likewise.
19256 2014-11-10 Dodji Seketeli <dodji@redhat.com>
19258 Consider enclosing template when comparing template parameters
19259 * src/abg-ir.cc (template_parameter::priv::comparison_started_):
19261 (template_parameter::priv::priv): Initialize it.
19262 (template_parameter::operator==): Compare the enclosing template
19263 too. And avoid infinite recursion.
19265 2014-11-10 Dodji Seketeli <dodji@redhat.com>
19267 Remove mention of libzip from the web page
19268 * doc/website/mainpage.txt: Remove mention of libzip from the list
19271 2014-11-10 Dodji Seketeli <dodji@redhat.com>
19273 Cleanup of the web page
19274 * doc/website/libabigail-website.doxy: Remove the redundant
19275 information that was appearing on the web page.
19276 * doc/website/mainpage.txt: Clean-up the text of the web page, add
19277 information for the new IRC channel #libabigail on oftc.net,
19278 re-organize the content by putting sections where we had
19279 paragraphs. Add a table of content. Also add a web form to
19280 subscribe/unsubscribe to the mailing list.
19282 2014-11-08 Dodji Seketeli <dodji@redhat.com>
19284 Sort functions by the their qualified name
19285 * src/abg-comparison.cc (function_comp::operator()): Sort the
19286 functions by only looking at their qualified name, as opposed to
19287 their return type name.
19289 2014-11-08 Dodji Seketeli <dodji@redhat.com>
19291 Remove too tight assert from de-mangling code
19292 * src/abg-ir.cc (demangle_cplus_mangled_name): The return length
19293 can be zero. That means, no de-mangling was done.
19295 2014-11-08 Dodji Seketeli <dodji@redhat.com>
19297 Sort reported changed declarations & types in a given scope
19298 * src/abg-comparison.cc (struct changed_type_or_decl_comp, struct
19299 changed_vars_comp): New comparison functors.
19300 (sort_changed_type_or_decl, sort_changed_vars): New static
19302 (scope_diff::report): Use the above to sort changed declarations,
19303 and types in a given scope.
19304 (corpus_diff::report): Likewise for the changed variables.
19305 * tests/data/test-abidiff/test-struct1-report.txt: Adjust.
19306 * tests/data/test-diff-suppr/test7-var-suppr-report-0.txt:
19308 * tests/data/test-diff-suppr/test7-var-suppr-report-8.txt:
19311 2014-11-08 Dodji Seketeli <dodji@redhat.com>
19313 Sort elf symbols before serializing them
19314 * include/abg-corpus.h (corpus::{get_sorted_fun_symbols,
19315 get_sorted_var_symbols}): Declare new member functions.
19316 * src/abg-corpus.cc (corpus_priv::{sorted_var_symbols,
19317 sorted_fun_symbols}): New data members.
19318 (struct elf_symbol_comp_functor): Define new comparison functor.
19319 (corpus::{get_sorted_fun_symbols, get_sorted_var_symbols}): Define
19320 new member functions.
19321 * src/abg-writer.cc (write_elf_symbols_table): Take a sorted
19322 vector of symbols in parameters, rather than an unsorted map.
19323 (write_corpus_to_native_xml): Write a sorted vector of symbols,
19324 rather than an unsorted map of symbols.
19325 * tests/data/test-read-dwarf/test0.abi: Adjust.
19326 * tests/data/test-read-dwarf/test1.abi: Likewise.
19327 * tests/data/test-read-dwarf/test2.so.abi: Likewise.
19328 * tests/data/test-read-dwarf/test3.so.abi: Likewise.
19329 * tests/data/test-read-dwarf/test6.so.abi: Likewise.
19331 2014-11-07 Dodji Seketeli <dodji@redhat.com>
19333 Fix template parameter hashing: make it know about enclosing template
19334 * include/abg-ir.h (template_parameter_sptr, template_decl_sptr)
19335 (template_decl_wptr): Declare new typedefs.
19336 (class template_decl): Make this virtually inherit decl_base and
19338 (class template_parameter): Pimpl-ify this. Make the constructor
19339 take the enclosing template parameter.
19340 (struct template_decl::hash): Declare this here, rather than in
19342 (class type_tparameter, non_type_tparameter, template_tparameter)
19343 (class type_composition, function_tdecl, class_tdecl): Pimpl-ify
19345 * src/abg-hash.cc (template_parameter::hash::operator()): Hash the
19346 enclosing template parameter. Avoid infinite recursion due to the
19347 loop hash parameter -> hash template -> hash parameter.
19348 (template_decl::hash::operator()) Define this here, now that it's
19349 declared in abg-ir.h. Also, avoid infinite recursion here; this
19350 is complementary to what is done in the hashing for
19351 template_parameter.
19352 ({type_tparameter, template_tparameter, }::hash::operator()):
19353 Cache the calculated hash just as what is done for other types
19355 (template_decl::priv): Define this new type.
19356 (template_decl::{add_template_parameter, get_template_parameters,
19357 ~template_decl}): Define these here to pimpl-ify template_decl.
19358 (template_parameter::priv): Define this new type.
19359 (template_parameter::template_parameter): Define this here to
19360 pimpl-ify template_parameter. Note also that this now takes the
19361 enclosing template decl.
19362 (template_parameter::{get_index, get_enclosing_template_decl,
19363 get_hashing_has_started, set_hashing_has_started, operator::==}):
19364 Define these here to pimpl-ify template_parameter.
19365 (type_tparameter::priv): Define this new type.
19366 (type_tparameter::type_tparameter): Define this here to pimpl-ify
19367 type_tparameter. Also, not that this constructor now takes the
19368 enclosing template decl.
19369 (class non_type_tparameter::priv): Define new type.
19370 (non_type_tparameter::{non_type_tparameter, get_type}): Define
19371 these here to pimpl-ify non_type_tparameter. The constructor now
19372 takes the enclosing template.
19373 (template_tparameter::priv): Define new type.
19374 (template_tparameter::template_tparameter): Define this here to
19375 pimpl-ify template_tparameter. This constructor now takes the
19376 enclosing template.
19377 (class type_composition::priv): New type.
19378 (type_composition::{type_composition, get_composed_type,
19379 set_composed_type}): Define these here to pimpl-ify
19380 type_composition. The constructor now takes the enclosing
19382 (class function_tdecl::priv): Define new type.
19383 (function_tdecl::{function_tdecl, set_pattern, get_pattern,
19384 get_binding}): Define this here to pimpl-ify function_tdecl.
19385 (class class_tdecl::priv): Define this new type.
19386 (class_tdecl::class_tdecl): Define this here to pimpl-ify
19388 (class_tdecl::set_pattern): Adjust to pimpl-ify.
19389 (class_tdecl::get_pattern): Define new pimpl-ified getter.
19390 * src/abg-reader.cc (build_function_tdecl, build_class_tdecl):
19391 Cleanup. Pass the enclosing template to the template parameters
19393 (build_type_tparameter, build_type_composition)
19394 (build_non_type_tparameter, build_template_tparameter)
19395 (build_template_parameter): Take the enclosing template
19396 declaration and pass it to the template parameter being created.
19397 * tests/data/test-read-write/test12.xml: Fix and Adjust.
19398 * tests/data/test-read-write/test13.xml: Likewise.
19400 2014-11-06 Dodji Seketeli <dodji@redhat.com>
19403 * include/abg-ir.h (class location): Remove useless white space.
19404 * src/abg-writer.cc (type_has_existing_id): Use type_base_sptr
19405 rather than shared_ptr<type_base>.
19406 (write_template_tparameter): Use template_tparameter_sptr rather
19407 than shared_ptr<template_tparameter>.
19409 2014-11-05 Dodji Seketeli <dodji@redhat.com>
19411 Pass -std=gnu++11 to the compiler when --enable-cxx11 for tests
19412 * tests/Makefile.am: Pass -std=gnu++11 to the compiler when
19413 --enable-cxx11 has been used.
19415 2014-11-05 Dodji Seketeli <dodji@redhat.com>
19417 Make the use of a C++-11 compiler optional
19418 * configure.ac: Define a new --enable-cxx11 switch to control the
19419 use of the C++-11 compiler. Define a WITH_CXX11 C macro and an
19420 automake ENABLE_CXX11 variable.
19421 * config.h.in: Initialize the new WITH_CXX11 C macro.
19422 * src/Makefile.am: Include the files coded in C++-11 only if the
19423 ENABLE_CXX11 automake variable is defined.
19424 * tests/Makefile.am: Likewise, build the runtestsvg test program
19425 only if C++-11 usage is enabled.
19426 * include/abg-diff-utils.h (class d_path_vec): Remove useless
19427 usage of the 'typename' keyword.
19428 * include/abg-fwd.h (is_enum_type): Renamed is_enum into this,
19429 because of a name clash with a tr1 function when not using C++-11.
19430 (is_pointer_type): Likewise, renamed is_pointer into this because
19431 of a name clash with a tr1 function when not using C++-11.
19432 * src/abg-comp-filter.cc (has_harmless_name_change): Adjust for
19433 the is_enum -> is_enum_type change.
19434 * src/abg-comparison.cc (type_suppression::suppresses_diff):
19436 (class function_suppression::priv): Add a missing "class" keyword
19437 in friend declaration.
19438 (diff_context::diff_has_been_traversed)
19439 (diff_context::mark_diff_as_traversed): Do not use the C++-11
19440 specific type uintptr_t.
19441 * src/abg-dwarf-reader.cc (create_default_dwfl): Do not use
19442 designated initializers. Sigh. This is handy though.
19443 (expr_result::abs): Cast the argument of std::abs to avoid
19445 (finish_member_function_reading): Adjust for the is_pointer ->
19446 is_pointer_type renaming.
19447 * src/abg-hash.cc (scope_decl::hash::operator)
19448 (class_decl::base_spec::hash::operator)
19449 (type_composition::hash::operator): Use std::tr1::hash string,
19450 rather than the C++-11 specific std::hash function.
19451 * src/abg-ini.cc (read_sections, write_sections): Make
19452 std::ifstream constructor take a const char* rather than a string.
19453 * src/abg-ir.cc (is_enum_type, is_pointer_type): Renamed is_enum
19454 into is_enum_type and is_pointer into is_pointer_type.
19455 * src/abg-writer.cc (write_translation_unit): Remove useless
19456 typename keyword. Make ofstream take a const char* rather than a
19458 (write_namespace_decl): Remove useless typename keyword.
19459 (write_corpus_to_native_xml_file): Make ofstream take a const
19460 char* rather than a string.
19461 * tests/test-abidiff.cc (main): Make ofstream take a const char*
19462 rather than a string.
19463 * tests/test-diff-dwarf.cc (main): Likewise.
19465 2014-11-05 Dodji Seketeli <dodji@seketeli.org>
19467 Remove some m4 auto-generated files from version control
19468 * m4/ltoptions.m4: Remove from version control.
19469 * m4/ltversion.m4: Remove from version control.
19470 * m4/lt~obsolete.m4: Remove from version control.
19472 2014-11-03 Dodji Seketeli <dodji@redhat.com>
19474 Add usage examples to the abidiff manual
19475 * doc/manuals/abidiff.rst: Add a usage example section along with
19476 some small and clean examples.
19478 2014-11-01 Dodji Seketeli <dodji@redhat.com>
19480 Fix the API doc string of the abigail::xml_writer namespace
19481 * src/abg-writer.cc: Fix the API doc of the xml_writer namespace.
19483 2014-11-01 Dodji Seketeli <dodji@redhat.com>
19486 * include/abg-comparison.h (class variable_suppression): Fix a
19487 typo in the doc string.
19489 2014-11-01 Dodji Seketeli <dodji@redhat.com>
19491 Update the manual for variable suppression concepts
19492 * doc/manuals/libabigail-concepts.rst: Add a section for variable
19493 suppression specification in the concepts part of the manual.
19495 2014-11-01 Dodji Seketeli <dodji@redhat.com>
19497 Fix some restructured text doc glitches in the fn suppression manual
19498 * doc/manuals/libabigail-concepts.rst: Fix quoting of the syntax
19499 of parameter specification string, for the function suppression
19502 2014-11-01 Dodji Seketeli <dodji@redhat.com>
19504 Cleanup the mainpage of the API doc
19505 * include/abg-fwd.h: Cleanup text of the API doc mainpage.
19507 2014-11-01 Dodji Seketeli <dodji@redhat.com>
19509 Make get_binary_load_address static
19510 * src/abg-dwarf-reader.cc (get_binary_load_address): Make this
19513 2014-11-01 Dodji Seketeli <dodji@redhat.com>
19515 Initial support for variable suppressions
19516 * include/abg-comparison.h (variable_suppression_sptr)
19517 (variable_suppressions_type): New convenience typedefs.
19518 (class variable_suppression): Declare new type.
19519 * src/abg-comparison.cc (is_var_diff): New predicate.
19520 (read_variable_suppression): Define new static function.
19521 (class variable_suppression::priv): Define type for the private
19522 data of the variable_suppression type.
19523 (variable_suppression::{variable_suppression,
19524 ~variable_suppression, get_name, set_name, get_name_regex_str,
19525 set_name_regex_str, get_symbol_name, set_symbol_name,
19526 get_symbol_name_regex_str, set_symbol_name_regex_str,
19527 get_symbol_version, set_symbol_version,
19528 get_symbol_version_regex_str, set_symbol_version_regex_str,
19529 get_type_name, set_type_name, get_type_name_regex_str,
19530 set_type_name_regex_str, suppresses_diff}): Define new member
19531 functions for the variable_suppression type.
19532 * tests/data/test-diff-suppr/libtest7-var-suppr-v0.so: Add new
19534 * tests/data/test-diff-suppr/libtest7-var-suppr-v1.so: Likewise.
19535 * tests/data/test-diff-suppr/test7-var-suppr-1.suppr: Likewise.
19536 * tests/data/test-diff-suppr/test7-var-suppr-2.suppr: Likewise.
19537 * tests/data/test-diff-suppr/test7-var-suppr-3.suppr: Likewise.
19538 * tests/data/test-diff-suppr/test7-var-suppr-4.suppr: Likewise.
19539 * tests/data/test-diff-suppr/test7-var-suppr-5.suppr: Likewise.
19540 * tests/data/test-diff-suppr/test7-var-suppr-6.suppr: Likewise.
19541 * tests/data/test-diff-suppr/test7-var-suppr-7.suppr: Likewise.
19542 * tests/data/test-diff-suppr/test7-var-suppr-8.suppr: Likewise.
19543 * tests/data/test-diff-suppr/test7-var-suppr-report-0.txt: Likewise.
19544 * tests/data/test-diff-suppr/test7-var-suppr-report-1.txt: Likewise.
19545 * tests/data/test-diff-suppr/test7-var-suppr-report-2.txt: Likewise.
19546 * tests/data/test-diff-suppr/test7-var-suppr-report-3.txt: Likewise.
19547 * tests/data/test-diff-suppr/test7-var-suppr-report-4.txt: Likewise.
19548 * tests/data/test-diff-suppr/test7-var-suppr-report-5.txt: Likewise.
19549 * tests/data/test-diff-suppr/test7-var-suppr-report-6.txt: Likewise.
19550 * tests/data/test-diff-suppr/test7-var-suppr-report-7.txt: Likewise.
19551 * tests/data/test-diff-suppr/test7-var-suppr-report-8.txt:
19553 * tests/data/test-diff-suppr/test7-var-suppr-version-script: Likewise.
19554 * tests/data/test-diff-suppr/test7-var-suppr-v0.cc: Source code
19555 for the librairie above.
19556 * tests/data/test-diff-suppr/test7-var-suppr-v1.cc: Source code
19557 for the librairie above.
19558 * tests/Makefile.am: Add the new test input data to the source
19560 * tests/test-diff-suppr.cc: Update to make this harness to run
19561 over the new test input above.
19563 2014-11-01 Dodji Seketeli <dodji@redhat.com>
19565 Update the suppr-doc.txt file for variable suppressions
19566 * doc/suppr-doc.txt: Add the suppress_variable section example.
19568 2014-11-01 Dodji Seketeli <dodji@redhat.com>
19570 Make var_diff and function_decl_diff extend decl_diff_base
19571 * include/abg-comparison.h (class var_diff, class
19572 function_decl_diff): Make these types inherit the decl_diff_base
19573 class. This is like the fact that all kinds of diff inherit the
19574 type_diff_base class.
19575 * src/abg-comparison.cc (var_diff::var_diff)
19576 (function_decl_diff::function_decl_diff): Adjust to initialize the
19577 sub-object of decl_diff_base;
19578 (is_decl_diff): New predicate to know if a diff is about decls.
19579 (is_function_decl): New predicate to know if a diff is about
19581 (function_suppression::suppresses_diff): Adjust to use the new
19584 2014-11-01 Dodji Seketeli <dodji@redhat.com>
19586 Fix logic of type suppression evaluation
19587 * include/abg-comparison.cc (type_suppression::suppresses_diff):
19588 Try to evaluate the "type_name_regexp" property only if the
19589 "type_name" is empty.
19591 2014-11-01 Dodji Seketeli <dodji@redhat.com>
19593 Remove useless functions from the comparison engine
19594 * include/abg-comparison.h (read_type_suppression): Remove this
19595 function declaration.
19596 * src/abg-comparison.cc (read_type_suppressions): Remove this
19597 static function definition.
19598 (read_function_suppressions): Remove this static function
19601 2014-11-01 Dodji Seketeli <dodji@redhat.com>
19603 Spit and polish variables presentation in diff report
19604 * src/abg-comparison.cc (corpus_diff::report): Show the full
19605 representation of the variable, rather than just its name. Also,
19606 show the new representation of the variable only if it has
19608 * tests/data/test-diff-dwarf/test9-report.txt: Adjust test.
19609 * tests/data/test-diff-filter/test15-0-report.txt: Likewise.
19610 * tests/data/test-diff-filter/test15-1-report.txt: Likewise.
19612 2014-11-01 Dodji Seketeli <dodji@redhat.com>
19614 Fix various apidoc typos
19615 * include/abg-comparison.h (class function_suppression): Fix typo
19617 * src/abg-comparison.cc (is_type_diff, read_suppressions)
19618 (diff::reported_once, typedef_diff::report): Fix the doc string.
19620 2014-11-01 Dodji Seketeli <dodji@redhat.com>
19622 Fix regexp escaping section of manual
19623 * doc/manuals/libabigail-concepts.rst: Re-indent and fix some
19624 typos in the regexp escaping section of the manual.
19626 2014-11-01 Dodji Seketeli <dodji@redhat.com>
19628 Doxygen shouldn't extract doc for static functions or private types
19629 * doc/api/libabigail.doxy: Do not extract doc for static
19630 functions, local classes.
19632 2014-11-01 Dodji Seketeli <dodji@redhat.com>
19635 * .gitignore: Ignore *~ emacs files.
19637 2014-10-29 Dodji Seketeli <dodji@redhat.com>
19639 Separate alias targets with a comma
19640 * src/abg-ir.cc (elf_symbol::get_aliases_id_string): Separate
19641 alias targets by a comma.
19642 * tests/data/test-diff-dwarf/test18-alias-sym-v1.cc: Update test
19643 to add more than one alias to a given symbol.
19645 2014-10-28 Dodji Seketeli <dodji@redhat.com>
19647 Fix a typo in the manual about function suppressions
19648 * doc/manuals/libabigail-concepts.rst: Fix a typo.
19650 2014-10-28 Dodji Seketeli <dodji@redhat.com>
19652 Initial support for function suppressions
19653 * include/abg-comparison.h (enum visiting_kind): Change the
19654 meaning of this. It was to determine if traversal was to be done
19655 in a pre or post manner. But with the recent addition of
19656 diff_node_visitor::visit_{begin,end}() notifiers, the pre/post
19657 handling is taken care of in a different way. So now the meaning
19658 of this enum is changed to handle whether diff node children
19659 should be visited or not. So the enumerators are now
19660 DEFAULT_VISITING_KIND, and SKIP_CHILDREN_VISITING_KIND. And it's
19662 (operator{&,~}): Declare more bit manipulation operators for the
19663 enum visiting_kind.
19664 (function_suppression_sptr, function_suppressions_type): New
19666 (function_suppression, function_suppression::parameter_spec):
19668 (read_function_suppressions): Declare new function.
19669 (diff_node_visitor::diff_node_visitor): Adjust for the enum
19670 visiting_kind change. Value-initialize the visiting_kind_ data
19672 * src/abg-comparison.cc (operator{&,~}): Define these operators
19673 for enum visiting_kind.
19674 (read_type_suppressions): Forward declare this static function.
19675 (read_function_suppression, read_parameter_spec_from_string):
19676 Define new static functions.
19677 (read_suppressions): Update to read function suppressions too,
19678 using the new read_function_suppression function above.
19679 (class function_suppression::parameter_spec::priv): Define new
19681 (function_suppression::parameter_spec::*): Define the member
19682 functions of the new function_suppression::parameter_spec type.
19683 (class function_suppression::priv): Define new type.
19684 (function_suppression::*): Define the member functions of the new
19685 function_suppression type.
19686 (diff::traverse): There is no more {PRE,POST}_VISITING_KIND
19687 enumerator. So nuke the code that was dealing with it.
19688 (redundancy_marking_visitor::skip_children_nodes_): New data
19690 (redundancy_marking_visitor::visit_begin): If the current diff
19691 node is not be reported (is filtered out), do not bother visit its
19692 children nodes for the purpose of marking redundant nodes. So use
19693 the new skip_children_nodes_ flag above to know we are in that case.
19694 (redundancy_marking_visitor::visit_end): Unset the new
19695 skip_children_nodes_ flag above when appropriate.
19696 * include/abg-fwd.h (is_function_decl): Declare new function.
19698 (function_type::get_parm_at_index_from_first_non_implicit_parm):
19699 Declare new member function.
19700 * src/abg-ir.cc (is_function_decl): Define new function.
19701 (function_type::get_parm_at_index_from_first_non_implicit_parm):
19702 Define new member function.
19703 * src/abg-comp-filter.cc (apply_filter): Adjust for the enum
19704 visiting_kind change. No need to set it for filters anymore
19705 * doc/suppr-doc.txt: Update examples of function suppression.
19706 * doc/manuals/libabigail-concepts.rst: Update the manual for the
19707 function suppression addition.
19708 * tests/data/test-diff-suppr/libtest5-fn-suppr-v0.so: New test input.
19709 * tests/data/test-diff-suppr/libtest5-fn-suppr-v1.so: New test input.
19710 * tests/data/test-diff-suppr/libtest6-fn-suppr-v0.so: New test input.
19711 * tests/data/test-diff-suppr/libtest6-fn-suppr-v1.so: New test input.
19712 * tests/data/test-diff-suppr/test5-fn-suppr-0.suppr: New test input.
19713 * tests/data/test-diff-suppr/test5-fn-suppr-1.suppr: New test input.
19714 * tests/data/test-diff-suppr/test5-fn-suppr-2.suppr: New test input.
19715 * tests/data/test-diff-suppr/test5-fn-suppr-3.suppr: New test input.
19716 * tests/data/test-diff-suppr/test5-fn-suppr-4.suppr: New test input.
19717 * tests/data/test-diff-suppr/test5-fn-suppr-report-0.txt: New test input.
19718 * tests/data/test-diff-suppr/test5-fn-suppr-report-1.txt: New test input.
19719 * tests/data/test-diff-suppr/test5-fn-suppr-report-2.txt: New test input.
19720 * tests/data/test-diff-suppr/test5-fn-suppr-report-3.txt: New test input.
19721 * tests/data/test-diff-suppr/test5-fn-suppr-report-4.txt: New test input.
19722 * tests/data/test-diff-suppr/test5-fn-suppr-report-5.txt: New test input.
19723 * tests/data/test-diff-suppr/test5-fn-suppr-v0.cc: Source code for
19725 * tests/data/test-diff-suppr/test5-fn-suppr-v1.cc: Source code for
19727 * tests/data/test-diff-suppr/test6-fn-suppr-0.suppr: New test input.
19728 * tests/data/test-diff-suppr/test6-fn-suppr-1.suppr: New test input.
19729 * tests/data/test-diff-suppr/test6-fn-suppr-2.suppr: New test input.
19730 * tests/data/test-diff-suppr/test6-fn-suppr-3.suppr: New test input.
19731 * tests/data/test-diff-suppr/test6-fn-suppr-report-0.txt: New test input.
19732 * tests/data/test-diff-suppr/test6-fn-suppr-report-1.txt: New test input.
19733 * tests/data/test-diff-suppr/test6-fn-suppr-report-2.txt: New test input.
19734 * tests/data/test-diff-suppr/test6-fn-suppr-report-3.txt: New test input.
19735 * tests/data/test-diff-suppr/test6-fn-suppr-report-4.txt: New test input.
19736 * tests/data/test-diff-suppr/test6-fn-suppr-v0.cc: Source code for
19738 * tests/data/test-diff-suppr/test6-fn-suppr-v1.cc: Source code for
19740 * tests/data/test-diff-suppr/test6-fn-suppr-version-script: New
19742 * tests/Makefile.am: Add the new files above to source
19744 * tests/test-diff-suppr.cc (in_out_specs): Add the test inputs
19745 above to the list of tests to be run by this harness.
19747 2014-10-28 Dodji Seketeli <dodji@redhat.com>
19749 Add missing virtual destructor in comparison engine code
19750 * include/abg-comparison.h (type_suppression::~type_suppression):
19751 Declare missing virtual destructor.
19752 * src/abg-comparison.cc (type_suppression::~type_suppression):
19753 Define missing virtual destructor.
19755 2014-10-27 Dodji Seketeli <dodji@redhat.com>
19757 Pimplify abigail::ir::function_type
19758 * include/abg-ir.h (function_type::priv_): Declare new data
19760 (function_type::<all the methods>): Move the inline methods out of
19761 line in src/abg-ir.cc.
19762 (function_type::{return_type_, parms_}): Move these ...
19763 * src/abg-ir.cc (function_type::priv::{return_type_, parms_}):
19765 (struct function_type::priv): New type for the private data of
19767 (function_type::<all the methods>): Move the previously inline
19768 methods of function_type here. Adjust them to tap into priv_->*
19769 to get the private data members.
19771 2014-10-27 Dodji Seketeli <dodji@redhat.com>
19774 * include/abg-ir.h (function_decl::get_type): Change the return
19775 type from shared_ptr<function_type> to function_type_sptr.
19777 2014-10-27 Dodji Seketeli <dodji@redhat.com>
19779 Allow white spaces in ini file property values
19780 * src/abg-ini.cc (read_context::char_is_property_value_char): New
19782 (read_context::read_next_char): Fix typos. Allow escaping of '['
19784 (read_context::read_property_value): Use the new
19785 read_context::char_is_property_value_char above.
19787 2014-10-27 Dodji Seketeli <dodji@redhat.com>
19789 Fix typo in suppression specification manual
19790 * doc/manuals/libabigail-concepts.rst: Fix name -> name_regexp.
19792 2014-10-22 Dodji Seketeli <dodji@redhat.com>
19794 Support comparing symbols not referenced by debug info
19795 * doc/manuals/abidiff.rst: Adjust intro to mention that w/o debug
19796 info, abidiff now works but just report about added/removed
19797 symbols. Add documentation about the new
19798 --no-unreferenced-symbols option.
19799 * include/abg-comparison.h (string_elf_symbol_map): New typedef.
19800 (diff_context::show_symbols_unreferenced_by_debug_info): Declare
19802 * src/abg-comparison.cc
19803 (diff_context::priv::show_syms_unreferenced_by_di_): New data
19805 (diff_context::priv::priv): Adjust.
19806 (diff_context::show_symbols_unreferenced_by_debug_info): Implement
19808 (corpus_diff::priv::{unrefed_fn_syms_edit_script_,
19809 unrefed_var_syms_edit_script_, added_unrefed_fn_syms_,
19810 deleted_unrefed_fn_syms_, added_unrefed_var_syms_,
19811 deleted_unrefed_var_syms_}): New data members.
19812 (corpus_diff::priv::diff_stats::{num_func_syms_removed,
19813 num_func_syms_added, num_var_syms_removed, num_var_syms_added}):
19815 (corpus_diff::priv::diff_stats::diff_stats): Adjust.
19816 (corpus_diff::ensure_lookup_tables_populated): Populate lookup
19817 tables for added/removed symbols that are not referenced by any
19819 (corpus_diff::priv::apply_filters_and_compute_diff_stats): Compute
19820 stats for the added/removed symbols not referenced by any debug
19822 (corpus_diff::priv::emit_diff_stats): Emit stats about
19823 added/removed symbols that are not referenced by any debug info.
19824 (corpus_diff::length): Adjust to take in account added/removed
19825 symbols not referenced by any debug info.
19826 (show_linkage_name_and_aliases): New static function.
19827 (corpus_diff::report): When emitting a symbol name, emit its
19828 version too, and tell if it aliases other symbols. Avoid emitted
19829 extra new lines. Report added/removed symbols not referenced by
19831 (compute_diff): In the overload for corpus_sptr, compute the diffs
19832 for symbols not referenced by debug info.
19833 * include/abg-corpus.h
19834 (corpus::get_unreferenced_{function,variable}_symbols): Declare
19835 new member functions.
19836 * src/abg-corpus.cc (corpus_priv::{unrefed_fun_symbols,
19837 unrefed_var_symbols}): New data members.
19838 (corpus_priv::build_unreferenced_symbols_tables): Define new
19840 (struct comp_elf_symbols_functor): New functor.
19841 (corpus::is_empty): Adjust to take in account added/removed
19842 symbols not referenced by debug info.
19843 (corpus::{get_unreferenced_function_symbols,
19844 corpus::get_unreferenced_variable_symbols}): Define these
19846 * include/abg-dwarf-reader.h (enum status): Transform this into
19847 bitfields. Add a STATUS_UNKNOWN value that has the value 0.
19848 (operator|(status, status), operator&(status, status))
19849 (operator|=(status&, status), operator&=(status, status)): New
19850 bit-wise operators to manipulate instances of the status bit-field.
19851 * src/abg-dwarf-reader.cc (get_version_for_symbol): Fix this to
19852 avoid returning garbage version sometimes.
19853 (read_debug_info_into_corpus): Fix this to return a non-null but
19854 empty corpus_sptr when there is no debug info available.
19855 (operator|(status, status), operator&(status, status))
19856 (operator|=(status&, status), operator&=(status, status)): Define
19857 these new bitwise operators to manipulate instances of the status
19859 (read_corpus_from_elf): Now that the abigail::dwarf_reader::status
19860 is a bit-field, set it to reflect if debug info and/or symbol
19861 tables have been found. Do not bail out if debug info hasn't been
19862 found. Rather, keep going, and go look for symbols-only; this is
19863 a kind of operating in degraded mode.
19864 * include/abg-ir.h (elf_symbol::get_aliases_id_string): Add a flag
19865 that says if the current instance of elf_symbol should be included
19866 in the list of aliases or not.
19867 * src/abg-ir.cc (elf_symbol::get_aliases_id_string): Define it.
19868 * tests/data/test-diff-dwarf/test16-syms-only-v{0,1}.o: New test
19871 (options::show_symbols_not_referenced_by_debug_info): New data
19873 (options:options): Adjust.
19874 (display_usage): Add an info string for the new
19875 --no-unreferenced-symbols command line option.
19876 (parse_command_line): Parse the new --no-unreferenced-symbols
19878 (set_diff_context_from_opts): Set the diff_context according to
19879 the presence of --no-unreferenced-symbols.
19880 (main): Adjust for the fact that abigail::dwarf_reader::status is
19882 * tools/abilint.cc (main): Adjust for the fact that
19883 abigail::dwarf_reader::status is now a bit-field..
19885 * tests/data/test-diff-dwarf/test16-syms-only-report.txt: New test
19887 * tests/data/test-diff-dwarf/test16-syms-only-v{0,1}.cc: Source code
19888 for new test input.
19889 * tests/data/test-diff-dwarf/test17-non-refed-syms-v{0,1}.o: New
19891 * tests/data/test-diff-dwarf/test17-non-refed-syms-v{0,1}.cc: New
19892 source code for test input.
19893 * tests/data/test-diff-dwarf/libtest18-alias-sym-v{0,1}.so: New
19895 * tests/data/test-diff-dwarf/test18-alias-sym-report-0.txt:
19896 Reference output for new test input.
19897 * tests/data/test-diff-dwarf/test18-alias-sym-v{0,1}.cc: Source
19898 code for new test input.
19899 * tests/data/test-diff-dwarf/test18-alias-sym-version-script:
19900 Source code for new test input.
19901 * tests/Makefile.am: Add the new test materials to the source
19903 * tests/test-diff-dwarf.cc(in_out_specs): Add the new input tests
19904 above to the array of tests to run by this harness.
19905 (main): Emit empty reports for empty resulting diffs.
19906 * tests/data/test-diff-dwarf/test{0,8,9,12,14-inline-report,}-report.txt:
19908 * tests/data/test-diff-filter/test{0,01,2,4,5,7,8,9,10,12,13,15-0,15-1}-report.txt:
19910 * tests/data/test-diff-filter/test{19-enum,20-inline,}-report-0.txt:
19912 * tests/data/test-diff-suppr/test0-type-suppr-report-{1,2}.txt:
19914 * tests/data/test-diff-suppr/test{1,2}-typedef-suppr-report-1.txt:
19917 2014-10-22 Dodji Seketeli <dodji@redhat.com>
19919 Allow comparison of shared_ptr of things
19920 * include/abg-diff-utils.h: Adjust copyright years.
19921 (deep_ptr_eq_functor::operator()(const shared_ptr<T>, const
19922 shared_ptr<T>)): New comparison operator.
19924 2014-10-17 Dodji Seketeli <dodji@redhat.com>
19926 Use the "standard" equality operator when comparing variables
19927 * src/abg-comparison.cc (compute_diff): In the overload for
19928 corpus_sptr, use the diff_utils::deep_ptr_eq_functor that is used
19929 to compare functions too, rather than the ad-hoc early struct
19930 var_eq_type we were using until now.
19932 2014-10-16 Dodji Seketeli <dodji@redhat.com>
19934 Yet another fix to the DWARF method "static-ness" detection heuristic
19935 * include/abg-fwd.h (is_pointer, is_qualified_type): Declare new
19937 * src/abg-ir.cc (is_pointer, is_qualified_type): Implement these
19939 * src/abg-dwarf-reader.cc (finish_member_function_reading):
19940 Sometimes, the this pointer of a non-static method can point to a
19941 *qualified* version of its containing type. I am seeing that when
19942 comparing libstdc++.so from RHEL 6.5 and RHEL 7. Take that in
19943 account when trying to detect that the first parameter of a member
19944 function is the this pointer, and thus detect that the function is
19945 a non static member function.
19946 * tests/data/test-read-dwarf/test8-qualified-this-pointer.so.abi:
19948 * tests/data/test-read-dwarf/test8-qualified-this-pointer.so: New
19950 * tests/data/test-read-dwarf/test8-qualified-this-pointer.cc:
19951 Source code of new test input.
19952 * tests/test-read-dwarf.cc: Update copyright year.
19953 (in_out_spec): Add the new test inputs to this array, so that this
19954 test harness runs on them.
19955 * tests/Makefile.am: Add the new test inputs to the source
19958 2014-10-16 Dodji Seketeli <dodji@redhat.com>
19960 Avoid infinite loops in the comparison code for classes
19961 * src/abg-ir.cc (equals): In the overload for classes, make sure
19962 to store the name of the lhs of the class and the rhs into the
19963 lhs. Also, when we bail out because we detect that there is a
19964 comparison underway, do *not* unmark the current class as not being
19965 involved in the comparison. Also, break at the first lhs virtual
19966 member function that is different from the rhs counter part.
19968 2014-10-15 Dodji Seketeli <dodji@redhat.com>
19970 Update the manual for the suppression specification initial work
19971 * doc/manuals/abidiff.rst: Add documentation for the new
19972 --suppressions command line switch.
19973 (--harmless, --harmful): Refer to the new "concepts" section
19974 below, where harmful/harmless concepts are now explained.
19975 (Notes): Move the content of the notes section where
19976 harmful/harmless concepts were explained, to the newly created
19977 'Concepts' section.
19978 * doc/manuals/index.rst: Limit the depth of the table of content
19979 to 2. Add the new libabigail-concepts.rst stuff in here. Adjust
19980 for the renaming of tools.rst to libabigail-tools.rst.
19981 * doc/manuals/libabigail-concepts.rst: New file.
19983 2014-10-13 Dodji Seketeli <dodji@redhat.com>
19985 Properly propagate {REDUNDANT, SUPPRESSED}_CATEGORY wrt local changes
19986 * src/abg-comparison.cc
19987 (suppression_categorization_visitor::visit_end): If a diff node
19988 carries local changes, then, even if all of its children node have
19989 been suppressed, this diff node shall not be categorized as
19990 suppressed by way of propagation.
19991 (redundancy_marking_visitor::visit_end): If a diff node carries
19992 local changes, then, even if all of its children nodes are
19993 redundant, this diff node shall not be categorized as being
19994 redundant by way of propagation.
19995 * tests/data/test-diff-suppr/libtest4-local-suppr-v{0,1}.so: New test
19997 * tests/data/test-diff-suppr/test4-local-suppr-0.suppr: Likewise.
19998 * tests/data/test-diff-suppr/test4-local-suppr-report-{0,1}.txt:
20000 * tests/data/test-diff-suppr/test4-local-suppr-v{0,1}.{c,h}:
20001 Source code of the new tests inputs.
20002 * tests/Makefile.am: Add the new test material to the source
20004 * tests/test-diff-suppr.cc (in_out_spec): Run this test harness
20005 over the new test input above.
20007 2014-10-13 Dodji Seketeli <dodji@redhat.com>
20009 Gain ability know if a diff node has local changes
20010 * include/abg-comparison.h (diff::has_local_changes): Add new pure
20012 ({decl_diff_base, type_diff_base, distinct_type_diff, var_diff,
20013 pointer_diff, reference_diff, array_diff, qualified_type_diff,
20014 enum_diff, class_diff, base_diff, scope_diff, function_decl_diff,
20015 type_decl_diff, typedef_diff,
20016 translation_unit_diff}::has_local_changes): Declare the
20017 implementation of the pure interface above.
20018 * src/abg-comparison.cc ({decl_diff_base, type_diff_base,
20019 distinct_type_diff, var_diff, pointer_diff, reference_diff,
20020 array_diff, qualified_type_diff, enum_diff, class_diff, base_diff,
20021 scope_diff, function_decl_diff, type_decl_diff, typedef_diff,
20022 translation_unit_diff}::has_local_changes): Define the
20023 implementation of the pure interface above.
20025 2014-10-13 Dodji Seketeli <dodji@redhat.com>
20027 Write comparison functions that hint at the kind of changes they see
20028 * include/abg-ir.h (enum change_kind): Declare new enum.
20029 (operator|(change_kind, change_kind), operator&(change_kind,
20030 change_kind), operator|=(change_kind&, change_kind)): Declare new bit-wise
20031 operators for the new enum change_kind.
20032 (equals): Declare this new comparison function for decl_base,
20033 scope_decl, type_base, type_decl, scope_type_decl,
20034 qualified_type_def, pointer_type_def, reference_type_def,
20035 array_type_def, enum_type_decl, typedef_decl, var_decl,
20036 function_decl, function_type, class_decl, and
20037 class_decl::base_spec.
20038 (class_decl::base_spec::operator(const decl_base&)): Declare new
20040 * src/abg-ir.cc (operator|(change_kind l, change_kind r))
20041 (operator&(change_kind l, change_kind r), operator|=(change_kind&
20042 l, change_kind r), operator&=(change_kind& l, change_kind r)):
20043 Define these new operators.
20044 (equals): Define this new comparison function for decl_base,
20045 scope_decl, type_base, type_decl, scope_type_decl,
20046 qualified_type_def, pointer_type_def, reference_type_def,
20047 array_type_def, enum_type_decl, typedef_decl, var_decl,
20048 function_decl, function_type, class_decl, and
20049 class_decl::base_spec.
20050 ({decl_base, scope_decl, type_base, type_decl, scope_type_decl,
20051 qualified_type_def, pointer_type_def, reference_type_def,
20052 array_type_def, enum_type_decl, typedef_decl, var_decl,
20053 function_decl, function_type, class_decl,
20054 class_decl::base_spec}::operator==): Re-write these comparison
20055 operators in terms of their relevant equal() functions.
20057 2014-09-22 Dodji Seketeli <dodji@redhat.com>
20059 Fix struct type kind suppression support
20060 * src/abg-comparison.cc (type_suppression::suppresses_diff): Do
20061 not crash on diff nodes that are not about struct/classes, when
20062 "type_kind = struct" has been specified.
20063 * tests/data/test-diff-suppr/test2-struct-suppr-{0,1}.suppr: New test input.
20064 * tests/data/test-diff-suppr/test2-struct-suppr-report-{0,1}.txt:
20066 * tests/data/test-diff-suppr/test2-struct-suppr-v{0,1}.o: Likewise
20067 * tests/data/test-diff-suppr/test2-struct-suppr-v{1,0}.cc: Source code
20068 for binary test input.
20069 * tests/test-diff-suppr.cc (in_out_spec): Run this harness on the
20070 new test input above.
20071 * tests/Makefile.am: Add the new test input files to source
20074 2014-09-22 Dodji Seketeli <dodji@redhat.com>
20076 Replace is_typedef by type_kind property in type suppressions
20077 * doc/suppr-doc.txt: Add type_kind property "documentation" in the
20079 * include/abg-comparison.h (type_suppression::type_kind): New
20081 (type_suppression::{get_consider_typedefness,
20082 set_consider_typedefness, get_is_typedef, set_is_typedef}):
20084 (type_suppression::{get_consider_type_kind,
20085 set_consider_type_kind, get_type_kind, set_type_kind}): Declare
20087 * Include/abg-fwd.h (is_type_decl): Declare new function.
20088 (is_enum): Declare new overload that takes a type_base_sptr.
20089 * src/abg-comparison.cc
20090 (type_suppression::priv::{consider_typedefness_, is_typedef_}):
20091 Remove these data members.
20092 (type_suppression::priv::{consider_type_kind_, type_kind_}): New
20094 (type_suppression::priv::priv): Adjust.
20095 (type_suppression::{get_consider_typedefness,
20096 set_consider_typedefness, get_is_typedef, set_is_typedef}): Remove
20097 these member functions.
20098 (type_suppression::{get_consider_type_kind,
20099 set_consider_type_kind, get_type_kind, set_type_kind}): Define
20100 these new member functions.
20101 (type_suppression::suppresses_diff): Adjust to consider the kind
20102 of types more generally than just considering typedef-ness.
20103 (read_type_kind_string): New static function.
20104 (read_type_suppression): Use the above to parse the value of the
20105 new type_kind property. Adjust the creation of the resulting
20106 type_suppression object.
20107 * src/abg-ir.cc (is_type_decl): Define new function.
20108 * tests/data/test-diff-suppr/test1-typedef-suppr-0.suppr: Adjust.
20109 * tests/data/test-diff-suppr/test1-typedef-suppr-1.suppr: Adjust.
20111 2014-09-19 Dodji Seketeli <dodji@redhat.com>
20113 Initial support for type suppressions
20114 * include/abg-comparison.h (diff_category::SUPPRESSED_CATEGORY):
20116 (diff_category::{SIZE_OR_OFFSET_CHANGE_CATEGORY,
20117 VIRTUAL_MEMBER_CHANGE_CATEGORY): Update the enumerator values for
20119 (diff::EVERYTHING_CATEGORY): Adjust.
20120 (suppression_base, type_suppression): Declare new types.
20121 (suppression_ptr, suppressions_type, type_suppression_sptr)
20122 (type_suppressions_type): New typedefs.
20123 (read_type_suppressions, read_suppressions): Declare new
20125 (diff_context::{suppressions, add_suppression, add_suppressions}):
20126 Declare new methods.
20127 (diff::is_suppressed): Declare new member function.
20128 (apply_suppressions): Declare new function & overloads.
20129 * src/abg-comparison.cc (is_type_diff): Define new static
20131 ({suppression_base, type_suppression}::priv): Define new types.
20132 ({suppression_base, type_suppression}::*): Define the methods of the new
20133 suppression_base, type_suppressions types.
20134 (read_type_suppression, read_type_suppressions, read_suppressions)
20135 (read_type_suppressions): Define new static functions.
20136 (diff_context::priv::supprssions_): New data member.
20137 (diff_context::{suppressions, add_suppression, add_suppressions}):
20139 (diff::is_filtered_out): Consider that a diff node that is in the
20140 SUPPRESSED_CATEGORY is filtered out.
20141 (diff::is_suppressed): Define new member function.
20142 (operator<<(ostream& o, diff_category c)): Support the
20143 SUPPRESSED_CATEGORY category.
20144 (corpus_diff::report): Apply suppressions before reporting
20146 (category_propagation_visitor::visit_end): Do not propagate
20147 SUPPRESSED_CATEGORY. This is just like what we do for
20148 REDUNDANT_CATEGORY.
20149 (struct suppression_categorization_visitor): New visitor.
20150 (apply_suppressions): Define function & overloads.
20151 * include/abg-ini.h (config::section::find_property): New method.
20152 (config::section): Fix end of class comment.
20153 * src/abg-ini.cc (config::section::find_property): Define new
20155 * tests/data/test-diff-suppr/test0-type-suppr-{0,1,2}.suppr: New
20157 * tests/data/test-diff-suppr/test0-type-suppr-report-{0,1,2,3}.txt:
20159 * tests/data/test-diff-suppr/test0-type-suppr-v{0,1}.o: Likewise.
20160 * tests/data/test-diff-suppr/test0-type-suppr-v{0,1}.cc: Source code
20161 for new test input.
20162 * tests/data/test-diff-suppr/test1-typedef-suppr-v{0,1}.o: New test
20164 * tests/data/test-diff-suppr/test1-typedef-suppr.h: Source code
20165 for new test input files.
20166 * tests/data/test-diff-suppr/test1-typedef-suppr-v{0,1}.c: Likewise
20167 * tests/data/test-diff-suppr/test1-typedef-suppr-{0,1}.suppr: New
20169 * tests/data/test-diff-suppr/test1-typedef-suppr-report-0.txt: Likewise.
20170 * tests/data/test-diff-suppr/test1-typedef-suppr-report-1.txt: Likewise.
20171 * tests/data/test-diff-suppr/test1-typedef-suppr-report-2.txt: Likewise.
20172 * tests/test-diff-suppr.cc: New test harness to run type suppression tests
20173 using the input files above.
20174 * tests/data/test-diff-suppr/test3-struct-suppr-0.suppr: New test input.
20175 * tests/data/test-diff-suppr/test3-struct-suppr-1.suppr: Likewise.
20176 * tests/data/test-diff-suppr/test3-struct-suppr-report-0.txt: Likewise.
20177 * tests/data/test-diff-suppr/test3-struct-suppr-report-1.txt: Likewise.
20178 * tests/data/test-diff-suppr/test3-struct-suppr-report-2.txt: Likewise.
20179 * tests/data/test-diff-suppr/test3-struct-suppr-v0.cc: Likewise.
20180 * tests/data/test-diff-suppr/test3-struct-suppr-v0.o: Likewise.
20181 * tests/data/test-diff-suppr/test3-struct-suppr-v1.cc: Likewise.
20182 * tests/data/test-diff-suppr/test3-struct-suppr-v1.o: Likewise.
20183 * tests/Makefile.am: Build the new runtestdiffsuppr test harness
20184 from the test-diff-filter.cc file. Add the new test files to the
20185 build system and source distribution.
20186 * tools/bidiff.cc (options::suppressions): New data member.
20187 (display_usage): Add a help string for the new
20188 --suppressions command line switch.
20189 (parse_command_line): Parse the --suppressions command line
20191 (set_diff_context_from_opts): Read the suppressions provided by
20192 the --suppression command line switch and stuff them into the diff
20195 2014-09-19 Dodji Seketeli <dodji@redhat.com>
20197 Make all type diff types extend new type_diff_base type
20198 * include/abg-comparison.h (type_diff_base, decl_diff_base): New
20200 (type_diff_base_sptr): New typedef.
20201 (pointer_diff, reference_diff, array_diff, qualified_type_diff)
20202 (enum_diff, class_diff, type_decl_diff, typedef_diff): Make this
20203 extend the new type_diff_base.
20204 * src/abg-comparison.cc (type_diff_base::priv, type_diff_base):
20205 Define these new types and their methods.
20206 (pointer_diff::pointer_diff, array_diff::array_diff)
20207 (reference_diff::reference_diff)
20208 (qualified_type_diff::qualified_type_diff, enum_diff::enum_diff)
20209 (class_diff::class_diff, type_decl_diff::type_decl_diff)
20210 (typedef_diff::typedef_diff): Adjust.
20212 2014-09-18 Dodji Seketeli <dodji@redhat.com>
20214 Rename abigail::ini::config::section_vector to sections_type
20215 * include/abg-ini.h (abigail::ini::config::sections_type): Renamed
20216 section_vector into this.
20217 (config::{get_sections, set_sections, read_sections,
20218 write_sections}): Adjust.
20219 * src/abg-ini.cc (config::priv::sections_): Adjust.
20220 (config::priv::priv): Likewise.
20221 (config::{config, get_sections}): Likewise.
20222 (read_sections, read_config, write_sections): Likewise.
20224 2014-09-08 Dodji Seketeli <dodji@redhat.com>
20226 Implement the abigail::ini::config abstraction
20227 * include/abg-ini.h (config::config): Add an overload that take a
20229 (config::{get,set}_sections): New accessors.
20230 (read_sections): Rename the previous read_config() functions into
20232 (read_config): Add these function declarations to really act on
20233 instances of abigail::ini::config.
20234 (write_section): Rename the previous write_config functions into
20236 (write_config): Add these function declarations to really act on
20237 instances of abigail::ini::config.
20238 * src/abg-ini.cc (class config::priv): Implement this.
20239 (config::{config, ~config, get_path, set_path, get_sections,
20240 set_sections}): Define these new methods.
20241 (read_sections): Rename the former read_config into this.
20242 (read_config): Add this function definitions to really act on
20243 instances of abigail::ini::config.
20244 (write_sections): Rename the former write_config into this.
20245 (write_config):: Add this function definitions to really act on
20246 instances of abigail::ini::config.
20247 * tools/binilint.cc (main): Adjust.
20249 2014-09-05 Dodji Seketeli <dodji@redhat.com>
20251 Initial support of ini-style file parsing
20252 * include/abg-ini.h: New file.
20253 * include/Makefile.am: Add include/abg-ini.h to the source
20255 * src/abg-ini.cc: New file.
20256 * src/Makefile.am: Add src/abg-ini.cc to the source distribution.
20257 * tools/binilint.cc: New testing tool.
20258 * tools/Makefile.am: Add tools/binilint.cc to the source distribution.
20260 2014-09-03 Dodji Seketeli <dodji@redhat.com>
20262 Initial examples of suppression list specifications
20263 * doc/suppr-doc.txt: New file.
20265 2014-10-11 Dodji Seketeli <dodji@redhat.com>
20267 Put IR artifacts in the abigail::ir namespace
20268 * include/abg-fwd.h: Wrap IR artifacts into abigail::ir namespace.
20269 Inject that new abigail::ir namespace into the abigail namespace.
20270 * include/abg-ir.h: Wrap IR artifacts into abigail::ir namespace.
20271 (function_decl::parameter::get_type_name): Adjust the call to
20272 abigail::get_type_name. It's now a call to
20273 abigail::ir::get_type_name.
20274 * src/abg-ir.cc: Wrap IR artifacts into abigail::ir namespace.
20275 * include/abg-traverse.h: Wrap the ir traversing artifact into the
20276 abigail::ir namespace too.
20277 * src/abg-traverse.cc: Adjust.
20278 * include/abg-corpus.h: Wrap corpus type stuff into abigail::ir.
20279 * include/abg-dwarf-reader.h: Inject namespace abigail::ir stuff
20280 into the abigail::dwarf_reader namespace.
20281 * include/abg-reader.h: Inject namespace abigail::ir stuff into
20282 the abigail::xml_reader namespace.
20283 * src/abg-reader.cc: Adjust.
20284 * include/abg-writer.h: Inject namespace abigail::ir stuff into
20285 the abigail::xml_writer namespace.
20286 * src/abg-writer.cc: Inject namespace abigail::ir stuff into
20287 abigail namespace here too.
20288 * src/abg-hash.cc: Inject the abigail::ir namespace into the
20290 * tools/abg-tools-utils.cc: Adjust for the injection of
20291 abigail::function_decl. It's now abigail::ir::function_decl.
20293 2014-10-13 Dodji Seketeli <dodji@redhat.com>
20295 Misc style cleanups
20296 * src/abg-comparison.cc: ({pointer_diff, reference_diff}::length):
20297 Add some vertical spaces here.
20299 2014-10-13 Dodji Seketeli <dodji@redhat.com>
20301 constify dm_context_rel::operator==
20302 * include/abg-ir.h (dm_context_rel::operator==): Make this const.
20304 2014-10-13 Dodji Seketeli <dodji@redhat.com>
20306 A distinct_diff node has no children node
20307 * src/abg-comparison.cc (distinct_diff::chain_into_hierarchy): Do
20308 not append any children node here.
20310 2014-10-13 Dodji Seketeli <dodji@redhat.com>
20312 Remove useless redundant_filter
20313 * include/abg-comp-filter.h (class redundant_filter): Remove this
20314 now useless type declaration
20315 * src/abg-comparison.cc (filtering::redundant_filter::visit):
20316 Remove this useless member function definition.
20318 2014-10-10 Dodji Seketeli <dodji@redhat.com>
20320 Sort diff reports about function parameters by their indexes
20321 * include/abg-comparison.h (changed_parms_type): New convenience
20323 * src/abg-comparison.cc (struct changed_parm_comp): New comparison
20325 (sort_changed_parm_map): New sorting function.
20326 (function_decl_diff::report): Use the new sort_changed_parm_map to
20327 sort the diffs for function parameters by their indexes.
20329 2014-10-10 Dodji Seketeli <dodji@redhat.com>
20331 Don't be too eager to use distinct_diff
20332 * src/abg-comparison.cc (try_to_diff): For this to actually
20333 select a diff kind, the two diff subject must be of type
20335 (compute_diff_for_types, compute_diff_for_decls): Use
20336 distinct_diff in last resort.
20338 2014-10-10 Dodji Seketeli <dodji@redhat.com>
20340 Implement generic diff tree walking and port categorization over it
20341 * include/abg-comp-filter.h (apply_filter): Declare new overload
20342 that takes a corpus_diff_sptr ...
20343 * src/abg-comp-filter.cc (apply_filter): ... and define it. On
20344 the existing overload for diff_sptr, make sure to traverse all
20345 diff nodes, even those that have already been traversed.
20346 * include/abg-comparison.h (enum diff_category): Remove
20347 NOT_REDUNDANT_CATEGORY, add REDUNDANT_CATEGORY.
20348 (operator&=, +operator<<): Declare new operators for enum diff_category.
20349 (diff_context::{forbid_traversing_a_node_twice,
20350 traversing_a_node_twice_is_forbidden):
20351 (diff_context::categorizing_redundancy): Remove this declaration.
20352 (diff_context::maybe_apply_filters): Declare a new overload that
20353 takes a corpus_diff_sptr. And a take a new flag that says if it
20354 should visit all nodes including those that have already been
20356 (diff::priv_): Make this data member protected.
20357 (diff::{begin_traversing, is_traversing, end_traversing,
20358 finish_diff_type, children_nodes, append_child_node,
20359 get_pretty_representation, chain_into_hierarchy, traverse}):
20360 Declare new member functions.
20361 (distinct_diff::{finish_diff_type, get_pretty_representation,
20362 chain_into_hierarchy}): Likewise.
20363 (distinct_diff::traverse): Remove.
20364 (pointer_diff::pointer_diff): Take the underlying type diff in
20366 (pointer_diff::{finish_diff_type, get_pretty_representation,
20367 chain_into_hierarchy}): Declare new member functions.
20368 (pointer_diff::traverse): Remove.
20369 (reference_type_def::reference_type_def): Take the underlying type
20371 ({array_type_def, reference_type_def}::{finish_diff_type,
20372 get_pretty_representation, chain_into_hierarchy}): Declare new
20374 ({array_type_diff, reference_type_def}::traverse): Remove.
20375 (qualified_type_diff::qualified_type_diff): Take the underlying
20376 type diff in parameter.
20377 ({enum_diff, qualified_type_diff, class_diff}::{finish_diff_type,
20378 get_pretty_representation, chain_into_hierarchy}): Declare new
20380 ({enum_diff, qualified_type_diff, class_diff}::traverse): Remove.
20381 (is_class_diff): Declare new function.
20382 (base_diff::base_diff): Take the underlying type diff in
20384 ({scope_diff, base_diff}::{finish_diff_type, get_pretty_representation,
20385 chain_into_hierarchy}): Declare new member functions.
20386 ({scope_diff, base_diff}::traverse): Remove.
20387 (function_decl_diff::function_decl_diff): Take the return type
20389 ({function_decl_diff, type_decl_diff}::{finish_diff_type,
20390 get_pretty_representation, chain_into_hierarchy}): Declare new
20392 ({function_decl_diff, type_decl_diff}::traverse): Remove.
20393 (typedef_diff::typedef_diff): Take the underlying type diff as
20395 (typedef::{finish_diff_type, get_pretty_representation,
20396 chain_into_hierarchy}): Declare new member functions.
20397 ({typedef, translation_unit_diff}::traverse): Remove member
20399 (corpus_diff::{finish_diff_type, children_nodes,
20400 append_child_node, changed_variables, get_pretty_representation,
20401 chain_into_hierarchy}): Declare new member functions.
20402 (class diff_node_visitor::{visit_begin, visit_end}): Declare new
20404 (propagate_categories, print_diff_tree, categorizing_redundancy)
20405 (clear_redundancy_categorization, apply_filters): New functions
20406 and function overloads.
20407 * src/abg-comparison.cc (TRY_PRE_VISIT, TRY_PRE_VISIT_CLASS_DIFF)
20408 (TRY_POST_VISIT, TRY_POST_VISIT_CLASS_DIFF)
20409 (CATEGORIZE_REDUNDANCY_FROM_CHILD_NODE)
20410 (UPDATE_REDUNDANCY_CATEGORIZATION_FROM_NODE_SUBTREE)
20411 (TRAVERSE_DIFF_NODE_AND_PROPAGATE_CATEGORY)
20412 (TRAVERSE_MEM_DIFF_NODE_AND_PROPAGATE_CATEGORY)
20413 (TRAVERSE_MEM_FN_DIFF_NODE_AND_PROPAGATE_CATEGORY)
20414 (ENSURE_DIFF_NODE_TRAVERSED_ONCE)
20415 (ENSURE_MEM_DIFF_NODE_TRAVERSED_ONCE): Remove these macros.
20417 (diff_context::priv::categorizing_redundancy_): Remove.
20418 (diff_context::priv::forbid_traversing_a_node_twice_): Add new
20420 (diff_context::priv::priv): Adjust.
20421 (diff_context::{forbid_traversing_a_node_twice,
20422 traversing_a_node_twice_is_forbidden}): Define new member
20424 (diff_context::maybe_apply_filters): Once filters are applied (and
20425 categories are set to the relevant diff tree nodes, run a pass
20426 over the diff tree to propagate the categories to the relevant
20427 diff tree parent nodes. Add an overload for corpus_diff_sptr.
20428 (diff_context::categorizing_redundancy): Remove member function.
20429 (diff_context::maybe_apply_filters): Define a new overload for
20431 (struct diff::priv::{finished_, traversing_, children_,
20432 pretty_representation_}): New data members.
20433 (diff::priv::priv): Adjust.
20434 (diff::{begin_traversing, is_traversing, end_traversing,
20435 finish_diff_type, children_nodes, append_child_node, traverse,
20436 set_category, get_pretty_representation, chain_into_hierarchy}):
20437 Define new member functions.
20438 (diff::is_filtered_out): Do not refer to NOT_REDUNDANT_CATEGORY
20439 anymore. Rather, use the new REDUNDANT_CATEGORY.
20440 ({distinct_diff, var_diff, pointer_diff, array_diff,
20441 reference_diff, qualified_type_diff, enum_diff, class_diff,
20442 base_diff, scope_diff, function_decl_diff, type_decl_diff,
20443 typedef_diff}::{get_pretty_representation, chain_into_hierarchy,
20444 finish_diff_type}): Define new member functions.
20445 ({distinct_diff, var_diff, pointer_diff, array_diff,
20446 reference_diff, qualified_type_diff, enum_diff, class_diff,
20447 base_diff, scope_diff, function_decl_diff, type_decl_diff,
20448 typedef_diff, translation_unit_diff}::traverse): Remove member
20450 (operator&=, operator<<): Define new operators for diff_category.
20451 ({function_decl_diff, typedef_diff}::priv::priv): Add a new
20453 (pointer_diff::{priv::priv, pointer_diff})
20454 (reference_diff::{priv::priv, reference_diff})
20455 (qualified_type_diff::{priv::priv, qualified_type_diff})
20456 (enum_diff::{priv::priv, enum_diff}, base_diff::{priv::priv,
20457 base_diff}, function_decl_diff::function_decl_diff): Take the
20458 underlying type diff in parameter.
20459 (compute_diff): Adjust the pointer_diff, reference_diff,
20460 qualified_type_diff, base_diff, function_decl_diff overloads.
20461 (class_diff::priv::{count_filtered_bases,
20462 count_filtered_subtype_changed_dm, count_filtered_changed_dm,
20463 count_filtered_changed_mem_fns, count_filtered_inserted_mem_fns,
20464 count_filtered_deleted_mem_fns}): Adjust for the call to
20465 diff_context::maybe_apply_filters.
20466 (corpus_diff::priv::{finished_, pretty_representation_}): New data
20468 (corpus_diff::priv::priv): New constructor.
20469 (corpus_diff::priv::clear_redundancy_categorization): Define new
20471 (corpus_diff::priv::apply_filters_and_compute_diff_stats):
20472 Adjust for call to diff_context::maybe_apply_filters. Also, call
20473 clear_redundancy_categorization at the end.
20474 (corpus_diff::priv::categorize_redundant_changed_sub_nodes):
20476 (corpus_diff::{chain_into_hierarchy, finish_diff_type,
20477 children_nodes, append_child_node, changed_variables,
20478 get_pretty_representation}): Define new member functions.
20479 (corpus_diff::report): Categorize redundancy for every top level
20480 function/variable diff.
20481 (corpus_diff::traverse): Adjust to the new traversing interface.
20482 (diff_node_visitor::{visit_begin, visit_end}): Define new member
20484 (struct category_propagation_visitor, struct diff_node_printer)
20485 (struct redundancy_marking_visitor, struct
20486 redundancy_clearing_visitor): New diff tree node visitors.
20487 (propagate_categories, print_diff_tree, categorize_redundancy)
20488 (clear_redundancy_categorization, apply_filters): Define new
20490 * tests/Makefile.am: Add the new tests/print-diff-tree.cc to the
20491 source distribution. Build it into a tests/printdifftree binary.
20492 * tools/abidiff.cc (print_diff_tree): Add debugging functions to
20493 call from within the debugger. By default, this function and its
20494 overloads are not compiled.
20496 2014-10-10 Dodji Seketeli <dodji@redhat.com>
20498 Update copyright notice for tests/test-diff2.cc
20499 * tests/test-diff2.cc: Update copyright year.
20501 2014-10-09 Dodji Seketeli <dodji@redhat.com>
20503 Do not crash on function_decl_diff for fns that have no symbol
20504 * src/abg-comparison.cc (function_decl_diff::report): If a
20505 function decl has no associated elf symbol, do not crash while
20506 trying to report about its elf symbol aliases.
20508 2014-10-09 Dodji Seketeli <dodji@redhat.com>
20510 Avoid broken output for virtual member fns w/o symbols
20511 * src/abg-comparison.cc (represent): When a virtual member
20512 function has no associated elf symbol, do not emit garbage in lieu
20513 of the linkage name. Just emit no linkage name;
20514 * tests/data/test-abidiff/test-struct1-report.txt: Adjust.
20516 2014-10-02 Dodji Seketeli <dodji@redhat.com>
20518 Sort added/removed/changed functions reported by the comparison engine
20519 * src/abg-comparison.cc (struct function_comp, struct
20520 changed_function_ptr_comp): New comparison functors.
20521 (sort_string_function_ptr_map)
20522 (sort_string_changed_function_ptr_map): Define new static
20524 (corpus_diff::report): Sort the added/removed/changed functions
20526 * tests/data/test-diff-dwarf/test0-report.txt: Adjust.
20527 * tests/data/test-diff-filter/test01-report.txt: Adjust.
20528 * tests/data/test-diff-filter/test2-report.txt: Adjust.
20529 * tests/data/test-diff-filter/test9-report.txt: Adjust.
20531 2014-10-02 Dodji Seketeli <dodji@redhat.com>
20533 Mention virtual-ness of member function in their pretty representation
20534 * include/abg-fwd.h (get_member_function_is_virtual): Declare new
20535 overload for pointers.
20536 * src/abg-ir.cc (get_member_function_is_virtual): Define it.
20537 (function_decl::get_pretty_representation): Print virtual-ness of
20538 the function_decl being pretty printed.
20540 2014-10-02 Dodji Seketeli <dodji@redhat.com>
20542 Do not crash when reporting diffs about virtual member fns that have no symbol
20543 * src/abg-comparison.cc (represent): If a virtual member function
20544 has no symbol do not crash.
20546 2014-10-02 Dodji Seketeli <dodji@redhat.com>
20548 Fixup member functions which virtual-ness has just been set
20549 * include/abg-ir.h (fixup_virtual_member_function): Declare new
20551 (class_decl): Declare fixup_virtual_member_function() as a member.
20552 * src/abg-ir.cc (set_member_function_is_virtual): Ensure that the
20553 member function that has seen its virtualness set is also put
20554 correctly put in the vector of virtual member functions of its
20557 2014-10-02 Dodji Seketeli <dodji@redhat.com>
20559 Assert that only decls with elf symbols are part of comparison
20560 * src/abg-corpus.cc (corpus::priv::build_public_decl_table): Assert
20561 that when read from DWARF, only decls with elf symbols are part of
20562 the public decls table.
20564 2014-10-02 Dodji Seketeli <dodji@redhat.com>
20566 Emit all virtual member functions in group
20567 * src/abg-writer.cc (write_class_decl): Emit virtual member
20568 functions contiguously.
20570 2014-10-02 Dodji Seketeli <dodji@redhat.com>
20572 Always emit vtable offset for virtual member function
20573 * src/abg-writer.cc (write_voffset): Emit the vtable offset of
20574 virtual function even when the offset is zero.
20576 2014-10-02 Dodji Seketeli <dodji@redhat.com>
20578 Do not forget priv_->in_pub_sym_tab_ when copying decl_base
20579 * src/abg-ir.cc (decl_base::decl_base(const decl_base& d)): Do
20580 not forget to copy priv_->in_pub_sym_tab_.
20582 2014-10-01 Dodji Seketeli <dodji@redhat.com>
20584 Fix reading several clones of the same member function from DWARF
20585 * include/abg-fwd.h (set_member_function_is_ctor)
20586 (set_member_function_is_dtor, set_member_function_is_const)
20587 (set_member_function_vtable_offset): Declare new functions.
20588 * include/abg-ir.h (class_decl::sort_virtual_mem_fns): Declare new
20590 (mem_fn_context_rel::{vtable_offset, is_constructor is_destructor,
20591 is_const}): Add these setters.
20592 (set_member_function_is_ctor, set_member_function_is_dtor)
20593 (set_member_function_is_static, set_member_function_is_const)
20594 (set_member_function_vtable_offset)
20595 (set_member_function_is_virtual): Declare these new friend
20596 function to class class_decl::method_decl.
20597 * src/abg-dwarf-reader.cc (finish_member_function_reading): Split
20598 this out from build_class_type_and_add_to_ir. Use the new setters
20599 for member functions properties introduced above.
20600 (build_class_type_and_add_to_ir): Factorize the creation of member
20601 function by using build_ir_node_from_die. Once that function has
20602 created the member function in a rather generic way, use the new
20603 finish_member_function_reading to set the remaining specific
20604 properties for member functions.
20605 (build_function_decl): When called to read additional properties
20606 of a function_decl, allow this to read and update the elf symbol
20607 properties too. This is useful for building a clone of a function
20608 that already has an elf symbol.
20609 (build_ir_node_from_die): When building a function decl, consider
20610 the case of a DIE that has both DW_AT_specification and
20611 DW_AT_abstract_origin set. That is, DW_AT_abstract_origin is set,
20612 and the origin has DW_AT_specification set. This is basically a
20613 clone of a function that implements an interface (this happens for
20614 destructors, for instance). In this case, really do the cloning
20615 of the interface implementation. If the cloned function happens
20616 to be member function, use finish_member_function_reading to read
20617 the properties relevant to its method-ness.
20618 * src/abg-ir.cc (set_member_function_is_ctor)
20619 (set_member_function_is_dtor, set_member_function_is_const)
20620 (set_member_function_vtable_offset)
20621 (class_decl::sort_virtual_mem_fns): Define new functions.
20622 (sort_virtual_member_functions): Define new static function.
20623 (struct virtual_member_function_less_than): New functor.
20624 (class_decl::add_member_function): Keep virtual member functions
20626 * data/test-read-dwarf/test1.abi: Adjust. Now, both the
20627 cdtor specification and all the clones that implements the
20628 different are emitted.
20629 * data/test-read-dwarf/test2.so.abi: Likewise.
20631 2014-10-01 Dodji Seketeli <dodji@redhat.com>
20633 Do not crash when comparing functions that have no symbol
20634 * src/abg-comparison.cc
20635 (class_diff::ensure_lookup_tables_populated): Just skip functions
20636 that have no ELF symbol.
20638 2014-09-30 Dodji Seketeli <dodji@redhat.com>
20640 Rename member_function_is_virtual to get_member_function_is_virtual
20641 * include/abg-fwd.h (get_member_function_is_virtual): Renamed the
20642 declaration of member_function_is_virtual into this.
20643 * src/abg-ir.cc (get_member_function_is_virtual): Likewise for its
20645 * include/abg-ir.h (class decl_base): Adjust the friend function
20646 member_function_is_virtual references.
20647 * src/abg-comp-filter.cc (has_virtual_mem_fn_change)
20648 (has_non_virtual_mem_fn_change): Adjust.
20649 * src/abg-comparison.cc (represent)
20650 (SKIP_MEM_FN_IF_VIRTUALITY_DISALLOWED, class_diff::report):
20652 * src/abg-hash.cc (class_decl::hash::operator()): Likewise.
20653 (function_decl::clone, class_decl::add_member_function): Adjust.
20655 2014-09-30 Dodji Seketeli <dodji@redhat.com>
20657 Factorize a no-op deleter for shared pointer
20658 * include/abg-sptr-utils.h (struct noop_deleter): Move this here
20660 * src/abg-comparison.cc (struct noop_deleter): ... here.
20662 2014-09-30 Dodji Seketeli <dodji@redhat.com>
20664 Link manuals from the main web page
20665 * doc/website/mainpage.txt: Add a link to the manuals.
20667 2014-09-26 Dodji Seketeli <dodji@redhat.com>
20669 Initial documentation for libabigail
20670 * doc/manuals/Makefile: New file, generated by sphinx-quickstart.
20671 * doc/manuals/abidiff.rst: New manual for abidiff.
20672 * doc/manuals/abidw.rst: New manual for abidw.
20673 * doc/manuals/abilint.rst: New manual for abilint.
20674 * doc/manuals/conf.py: New configuration file generated by sphinx-quickstart.
20675 * doc/manuals/index.rst: The root of the this documentation.
20676 * doc/manuals/libabigail-overview.rst: The overview of libabigail.
20677 * doc/manuals/tools.rst: The root of the tools manuals.
20679 2014-09-26 Dodji Seketeli <dodji@redhat.com>
20681 Do not install the abisym program
20682 * tools/Makefile.am: Do not install abisym. It's really there
20683 just for testing purposes and is of almost no use for generic
20686 2014-09-26 Dodji Seketeli <dodji@redhat.com>
20688 Rename bi* tools to abi* tools
20689 * tests/data/test-bidiff: Rename this directory to
20690 tests/data/test-abidiff.
20691 * tests/test-bidiff.cc: Renamed this to tests/test-abidiff.cc.
20692 * tools/biar.cc: Renamed to tools/abiar.cc
20693 * tools/bidiff.cc: Renamed to tools/abidiff.cc
20694 * tools/bidw.cc: Renamed to tools/abidw.cc
20695 * tools/bilint.cc: Renamed to tools/abilint.cc
20696 * tools/bisym.cc: Renamed to tools/abisym.cc
20697 * tests/test-alt-dwarf-file.cc: Renamed references to bidw* to abidw*.
20698 * tests/test-diff-filter.cc: Renamed references to bidiff to abidiff.
20699 * tests/test-lookup-syms.cc: Renamed references to bisym to abisym.
20700 * tools/Makefile.am: Adjust.
20701 * tests/Makefile.am: Likewise.
20703 2014-09-19 Dodji Seketeli <dodji@redhat.com>
20705 Light cleanup in abg-corpus.cc
20706 * src/abg-corpus.cc
20707 (symtab_build_visitor_type::regex_fns_suppress): use
20708 sptr_utils::build_sptr, rather than building the shared_ptr of
20711 2014-09-18 Dodji Seketeli <dodji@redhat.com>
20713 Pimplify abigail::comparison::diff type
20714 * include/abg-comparison.h (diff::{priv, sptr}): New types.
20715 (diff::priv_): New member.
20716 (diff::*): Remove all the other previous data members and
20717 transform the inline member function definition into declarations
20719 * src/abg-comparison.cc (class diff::priv): New private data type.
20720 (diff::*): Define the previous inline member functions as
20723 2014-09-18 Dodji Seketeli <dodji@redhat.com>
20725 Rename shared_ptr<regex_t> into regex_t_sptr
20726 * include/abg-sptr-utils.h (build_sptr()): Rename the return type
20727 from shared_ptr<regex_t> to regex_t_sptr.
20729 2014-09-19 Dodji Seketeli <dodji@redhat.com>
20731 Fix a comment in abg-comparison.h
20732 * include/abg-comparison.h (class base_diff): Fix comment.
20734 2014-09-05 Dodji Seketeli <dodji@redhat.com>
20736 Light style cleanup in tools/bidiff.cc
20737 * tools/bidiff.cc (display_usage): Remove useless space before '&'.
20739 2014-09-05 Dodji Seketeli <dodji@redhat.com>
20741 src/Makefile.am cleanup
20742 * src/Makefile.am: Remove the unused 'headers' variable.
20744 2014-09-16 Dodji Seketeli <dodji@redhat.com>
20746 Emit reports about not-yet categorized diff nodes
20747 * include/abg-comparison.h (NO_CHANGE_CATEGORY): Better comment
20749 * src/abg-comparison.cc (diff::is_filtered_out): Not-yet
20750 categorized changes are not filtered out anymore.
20751 (distinct_diff::report): Avoid extraneous new line here.
20753 2014-09-16 Dodji Seketeli <dodji@redhat.com>
20755 Better support for inline related diffs
20756 * include/abg-comparison.h
20757 (diff_category::HARMLESS_SYMBOL_ALIAS_CHANGE_CATEORY): New
20759 (diff_category::EVERYTHING_CATEGORY): Adjust.
20760 * include/abg-ir.h (elf_symbol::get_aliases_id_string)
20761 (elf_symbol::does_alias, elf_symbols_alias)
20762 (compute_aliases_for_elf_symbol): Declare new functions ...
20763 * src/abg-ir.cc (elf_symbol::get_aliases_id_string)
20764 (elf_symbol::does_alias, elf_symbols_alias)
20765 (compute_aliases_for_elf_symbol): ... and define them.
20766 (function_decl::operator==): Take in account elf symbol aliases.
20767 * src/abg-comp-filter.cc (function_name_changed_but_not_symbol):
20768 Define new static functions.
20769 (harmless_filter::visit): Categorize function name changes that
20770 n doesn't impact underlying elf symbols (or the fact that two
20771 symbols were aliases and are not anymore) as harmless.
20772 * src/abg-comparison.cc (function_decl_diff::report): Properly
20773 report function name changes, or symbol aliases changes for that
20774 matter. Also report inline-ness declaration changes.
20775 * src/abg-dwarf-reader.cc (die_is_declared_inline): New static
20777 (build_function_decl): Use the above.
20778 * tools/bidiff.cc (set_diff_context_from_opts): Add
20779 abigail::comparison::HARMLESS_SYMBOL_ALIAS_CHANGE_CATEORY into the
20780 harmless change camp.
20781 * tests/data/test-diff-dwarf/test14-inline-report.txt: New test
20783 * tests/data/test-diff-dwarf/test14-inline-v0.o: Likewise.
20784 * tests/data/test-diff-dwarf/test14-inline-v1.o: Likewise.
20785 * tests/data/test-diff-dwarf/test14-inline-v0.cc: Source code for
20787 * tests/data/test-diff-dwarf/test14-inline-v1.cc: Source code for
20789 * tests/test-diff-dwarf.cc: Run this test harness over the new
20791 * tests/data/test-diff-filter/test20-inline-report-0.txt: Likewise.
20792 * tests/data/test-diff-filter/test20-inline-report-1.txt:
20794 * tests/data/test-diff-filter/test20-inline-v0.o: New test input.
20795 * tests/data/test-diff-filter/test20-inline-v1.o: New test input.
20796 * tests/data/test-diff-filter/test20-inline-v0.cc: Source code for
20798 * tests/data/test-diff-filter/test20-inline-v1.cc: Likewise.
20799 * tests/test-diff-filter.cc: Run this test harness over the new
20802 2014-09-16 Dodji Seketeli <dodji@redhat.com>
20804 Better support for enum diffs
20805 * include/abg-comparison.h (changed_enumerator_type): New typedef.
20806 (diff_category::{HARMLESS_ENUM_CHANGE_CATEGORY}): New enumerator.
20807 * src/abg-comp-filter.cc (has_type_size_change)
20808 (has_enumerator_insertion, has_enumerator_removal_or_change)
20809 (has_harmful_enum_change): New functions.
20810 (harmless_filter::visit): Categorize enumerator insertions that
20811 don't change the size of the type into HARMLESS_ENUM_CHANGE_CATEGORY.
20812 (harmful_filter::visit): Categorize enumerator removal or any enum
20813 change that changes the size of the type into
20814 SIZE_OR_OFFSET_CHANGE_CATEGORY.
20815 * src/abg-comparison.cc (enumerator_value_comp)
20816 (changed_enumerator_comp): New types.
20817 (sort_enumerators, sort_changed_enumerators): New static
20819 (enum_diff::report): Sort enum related reports by the value of the
20821 * src/abg-dwarf-reader.cc (build_enum_type): Name anonymous enums
20822 as __anonymous_enum__.
20823 * tools/bidiff.cc (set_diff_context_from_opts): Add
20824 abigail::comparison::HARMLESS_ENUM_CHANGE_CATEGORY into the harmless
20826 * tests/data/test-diff-dwarf/test15-enum-report.txt: New test
20828 * tests/data/test-diff-dwarf/test15-enum-v1.o: Likewise.
20829 * tests/data/test-diff-dwarf/test15-enum-v0.o: Likewise.
20830 * tests/data/test-diff-dwarf/test15-enum-v0.cc: Source code for
20832 * tests/data/test-diff-dwarf/test15-enum-v1.cc: Likewise.
20833 * tests/data/test-diff-filter/test19-enum-report-0.txt: New test input.
20834 * tests/data/test-diff-filter/test19-enum-report-1.txt: Likewise.
20835 * tests/data/test-diff-filter/test19-enum-v0.o: Likewise.
20836 * tests/data/test-diff-filter/test19-enum-v1.o: Likewise.
20837 * tests/data/test-diff-filter/test19-enum-v0.cc: Source code for
20839 * tests/data/test-diff-filter/test19-enum-v1.cc: Likewise.
20840 * tests/test-diff-dwarf.cc: Run this test harness on the new test
20842 * tests/test-diff-filter.cc: Likewise.
20843 * tests/Makefile.am: Add the new files above to the source distribution.
20845 2014-09-16 Dodji Seketeli <dodji@redhat.com>
20847 Add constness to elf_symbol::operator==
20848 * include/abg-ir.h (elf_symbol::operator==): Add a const to the
20850 * src/abg-ir.cc (elf_symbol::operator==): ... and to the definition.
20852 2014-09-15 Dodji Seketeli <dodji@redhat.com>
20854 Misc style cleanups
20855 * src/abg-comparison.cc (ChangedDataMemberComp): Rename this to
20856 changed_data_member_comp
20857 (sort_changed_data_members): Adjust.
20858 (DataMemberComp): Rename this to data_member_comp.
20859 (sort_data_members): Adjust.
20861 2014-09-15 Dodji Seketeli <dodji@redhat.com>
20863 Constify some function parameters in abg-comp-filter.cc
20864 * src/abg-comp-filter.cc (type_size_changed): Now take const
20867 2014-09-09 Jan Engelhardt <jengelh@inai.de>
20869 Add .gitignore files.
20870 * .gitignore: Add new file.
20871 * m4/.gitignore: Likewise.
20872 * tools/.gitignore: Likewise.
20874 2014-09-09 Jan Engelhardt <jengelh@inai.de>
20876 Place -L/-l flags into *_LIBADD/*_LDADD
20877 * src/Makefile.am: -L and -l ought to be in LIBADD/LDADD because
20878 that is the only place guaranteed to be in the right spot. So add
20879 Them to libabigail_la_LIBADD.
20880 * tools/Makefile.am: Likewise.
20882 2014-09-09 Jan Engelhardt <jengelh@inai.de>
20884 Add libelf to libabigail.la's linker line
20885 * configure.ac: Check for the existence of libelf at configure
20886 time by looking at the presence of the elf_end symbol. Add the
20887 libelf to the link command line.
20889 2014-09-09 Jan Engelhardt <jengelh@inai.de>
20891 Drop hardcoded substitutions
20892 * doc/Makefile.am: Do not use @docdir@. It's indeed replaced at
20893 configure time. But there is no need for this limitation with
20894 automake, as $(docdir) is available and replaceable anytime.
20895 * src/Makefile.am: Likewise for @DEPS_LIBS@ and @DEPS_CFLAGS@.
20897 2014-09-09 Jan Engelhardt <jengelh@inai.de>
20899 Replace indirect variable assignments
20900 * configure.ac(DEVEL_CFLAGS, DEVEL_CXXFLAGS): Remove these
20902 (CFLAGS, CXXFLAGS): Set these variables directly.
20903 * include/Makefile.am (pkginclude_HEADERS): Use this predefined
20905 (publicheaders_DATA, publicheadersdir): Remove these.
20907 2014-09-09 Jan Engelhardt <jengelh@inai.de>
20909 Remove empty and autogenerated files from git repository
20910 * ChangeLog: Remove this empty file for now. It'll be added back
20911 right before the first release by automatic generation from the
20913 * INSTALL: Remove this empty file for now.
20914 * NEWS: Remove this empty file for now. It'll be added back right
20915 before the first release.
20916 * configure.ac (AM_INIT_AUTOMAKE): As the mandatory but empty
20917 files above are being removed for now, let's put in the 'foreign'
20918 mode of automake for the moment. We'll likely remove it at
20921 2014-09-09 Jan Engelhardt <jengelh@inai.de>
20923 Set automake options globally
20924 * configure.ac(AM_INIT_AUTOMAKE): Set the subdir-object option
20926 * src/Makefile.am: ... not here.
20927 * tests/Makefile.am: Likewise.
20928 * tools/Makefile.am: Likewise.
20930 2014-09-09 Jan Engelhardt <jengelh@inai.de>
20932 Stash some autogenerated tools in build-aux/
20933 * configure.ac: Reduce the pollution in the top-level directory a
20936 2014-09-10 Dodji Seketeli <dodji@redhat.com>
20938 Fix memory leaks due to cycles in types ownership
20939 * include/abg-fwd.h (std::tr1::weak_ptr): Inject this type in the
20941 * include/abg-ir.h: Write a memory management guideline for the IR
20943 (Type_base_wptr, function_type_wptr)
20944 (class_decl_wptr): New typedefs.
20945 (translation_unit::get_canonical_function_type): Declare new
20947 (qualified_type_def::underlying_type_)
20948 (reference_type_def::pointed_to_type_)
20949 (typedef_decl::underlying_type_, function_decl::parameter::type_)
20950 (function_type::return_type_, method_type::class_type_)
20951 (non_type_tparameter::type_, type_composition::type_): Make this a
20953 (qualified_type_def::get_pointed_to_type)
20954 (reference_type_def::get_pointed_to_type)
20955 (array_type::get_element_type, typedef_decl::get_underlying_type)
20956 (var_decl::get_type, function_decl::parameter::get_type)
20957 (function_type::get_return_type, method_type::get_class_type)
20958 (non_type_tparameter::get_type)
20959 (type_composition::get_composed_type): Adjust to make this return
20960 a shared pointer initialized with the content of the weak pointer.
20961 (function_decl::function_decl, method_decl::method_decl): Remove
20962 the overload that doesn't take a type. This is because now,
20963 function types need to be registered to their containing
20965 (struct function_type::hash): Declare here.
20966 * src/abg-hash.cc (struct function_type::hash): Declare this in
20967 abg-ir.h and just define the methods here.
20968 * src/abg-ir.cc (fn_type_ptr_map): New typedef.
20969 (translation_unit::priv::canonical_types_): Remove this unused
20971 (translation_unit::priv::canonical_function_types_): New member.
20972 (translation_unit::get_canonical_function_type): Define this
20974 (array_type_def::priv::element_type_, var_decl::priv::type_)
20975 (function_decl::priv::type_): Make this a weak pointer.
20976 (qualified_type_def::get_underlying_type)
20977 (pointer_type_def::get_pointed_to_type)
20978 (reference_type_def::get_pointed_to_type)
20979 (array_type_def::get_element_type)
20980 (typedef_decl::get_underlying_type, var_decl::get_type)
20981 (function_decl::get_type): Adjust to make this return a shared
20982 pointer initialized with the content of the weak pointer.
20983 (qualified_type_def::build_name)
20984 (pointer_type_def::get_qualified_name)
20985 (reference_type_def::get_qualified_name): Adjust.
20986 (method_type::set_class_type): Cleanup the logic.
20987 (function_decl::priv::priv): Remove the overload that takes a bare
20988 pointer to a type. This should not be used now that we need the
20989 function type to registered with the translation unit.
20990 (function_decl::function_decl): Remove the overload that doesn't
20991 take a type. This is because now, function types need to be
20992 registered to their containing translation unit.
20993 * src/abg-dwarf-reader.cc (build_function_decl): Register the
20994 function type within its translation type and use its canonical
20995 version. This complies with the new memory management rules.
20996 * src/abg-reader.cc (build_function_decl): Likewise.
20998 2014-09-10 Dodji Seketeli <dodji@redhat.com>
21000 Compare class names when comparing methods
21003 2014-09-10 Dodji Seketeli <dodji@redhat.com>
21005 Slight white space fix
21006 * src/abg-hash.cc (method_type::hash::operator()(const
21007 method_type&)): White space fix.
21009 2014-09-10 Dodji Seketeli <dodji@redhat.com>
21011 Update copyright notice
21012 * include/abg-ir.h: Update year of copyright notice.
21014 2014-07-05 Ondrej Oprala <ooprala@redhat.com>
21016 Unite help output for tools
21017 * tools/biar.cc (std::ostream): Add a using directive.
21018 (display_usage): Make it take a string reference and an ostream
21019 as parameters. Use the ostream argument as an output stream
21020 instead of a hard-coded cout.
21022 (main): Call display_usage with new parameters.
21023 * tools/bidiff.cc (display_usage): Declare it static.
21025 * tools/bidw.cc (display_usage): Prettify output.
21026 * tools/bilint.cc (display_usage): Declare it static.
21028 * tools/bisym.cc (std::cerr): Add a using directive.
21029 (prog_name): Rename progname into this.
21030 (display_usage): Rename show_help into this.
21031 Add an ostream as a parameter. Use the ostream argument
21032 as output stream insted of a hard-coded cout.
21034 2014-09-03 Dodji Seketeli <dodji@redhat.com>
21036 Adjust copyright year
21037 * tests/test-diff-dwarf.cc: Adjust year in copyright notice.
21039 2014-09-03 Dodji Seketeli <dodji@redhat.com>
21041 Sort reported changed data members by increasing offset
21042 * include/abg-comparison.h (changed_type_or_decl_vector): New
21044 * include/abg-fwd.h (is_data_member): Change the overload that
21045 takes a decl_base_sptr to make it return the real var_decl_sptr
21046 rather than just a bool.
21047 * src/abg-comparison.cc (ChangedDataMemberComp, DataMemberComp):
21048 New comparison functors.
21049 (sort_changed_data_members, sort_data_members): Sorting functions
21050 for changed data members and data members.
21051 (class_diff::report): Sort reports for deleted, inserted and
21052 change data members by the increasing value of the offsets of said
21054 * src/abg-ir.cc (is_data_member): Change the overload that takes a
21055 decl_base_sptr to make it return the real var_decl_sptr rather
21057 * tests/data/test-bidiff/test-struct1-report.txt: Adjust.
21058 * tests/data/test-diff-dwarf/test13-report.txt: New test input.
21059 * tests/data/test-diff-dwarf/test13-v0.cc: Source code for new
21061 * tests/data/test-diff-dwarf/test13-v0.o: New test input.
21062 * tests/data/test-diff-dwarf/test13-v1.cc: Source code for new
21064 * tests/data/test-diff-dwarf/test13-v1.o: New test input.
21065 * tests/Makefile.am: Add the new test inputs above to the source
21067 * tests/test-diff-dwarf.cc: Run this test harness on the new test
21070 2014-09-03 Dodji Seketeli <dodji@redhat.com>
21072 Do not filter out diff nodes that are only in NOT_REDUNDANT_CATEGORY
21073 * src/abg-comparison.cc (diff::is_filtered_out): If a diff not is
21074 only in the NOT_REDUNDANT_CATEGORY category consider it as not
21076 * tests/data/test-diff-filter/test18-report.txt: New test input.
21077 * tests/data/test-diff-filter/test18-v0.cc: Source code for new
21079 * tests/data/test-diff-filter/test18-v0.o: New test input.
21080 * tests/data/test-diff-filter/test18-v1.cc: Source code for new
21082 * tests/data/test-diff-filter/test18-v1.o: New test input.
21083 * tests/Makefile.am: Add the new test inputs to the source distribution.
21084 * tests/test-diff-filter.cc: Run this test harness on the new test
21087 2014-09-03 Dodji Seketeli <dodji@redhat.com>
21089 White space cleanup
21090 * src/abg-ir.cc (get_data_member_offset): Remove useless
21091 horizontal white space.
21093 2014-09-03 Dodji Seketeli <dodji@redhat.com>
21095 Add some comments in the comparison engine
21096 * src/abg-comparison.cc: Add a comment for the file.
21097 (struct class_diff::priv::{subtype_changed_dm_,changed_dm_}): Add
21098 comment for these data members.
21100 2014-09-02 Dodji Seketeli <dodji@redhat.com>
21102 Remove useless new line from comparison engine's report
21103 * src/abg-comparison.cc (class_diff::report): Do not emit new
21104 lines after reporting about inserted data members.
21105 * tests/data/test-bidiff/test-qual-type0-report.txt: Adjust.
21106 * tests/data/test-bidiff/test-struct0-report.txt: Adjust.
21107 * tests/data/test-bidiff/test-struct1-report.txt: Adjust.
21108 * tests/data/test-diff-dwarf/test0-report.txt: Adjust.
21109 * tests/data/test-diff-dwarf/test1-report.txt: Adjust.
21110 * tests/data/test-diff-dwarf/test3-report.txt: Adjust.
21111 * tests/data/test-diff-dwarf/test7-report.txt: Adjust.
21112 * tests/data/test-diff-filter/test0-report.txt: Adjust.
21113 * tests/data/test-diff-filter/test01-report.txt: Adjust.
21114 * tests/data/test-diff-filter/test1-report.txt: Adjust.
21115 * tests/data/test-diff-filter/test11-report.txt: Adjust.
21116 * tests/data/test-diff-filter/test14-0-report.txt: Adjust.
21117 * tests/data/test-diff-filter/test14-1-report.txt: Adjust.
21118 * tests/data/test-diff-filter/test15-0-report.txt: Adjust.
21119 * tests/data/test-diff-filter/test15-1-report.txt: Adjust.
21120 * tests/data/test-diff-filter/test16-report.txt: Adjust.
21121 * tests/data/test-diff-filter/test17-0-report.txt: Adjust.
21122 * tests/data/test-diff-filter/test17-1-report.txt: Adjust.
21123 * tests/data/test-diff-filter/test2-report.txt: Adjust.
21124 * tests/data/test-diff-filter/test3-report.txt: Adjust.
21125 * tests/data/test-diff-filter/test9-report.txt: Adjust.
21127 2014-09-01 Dodji Seketeli <dodji@redhat.com>
21129 Adjust copyright years
21130 * src/abg-corpus.cc: Adjust copyright years.
21131 * src/abg-libzip-utils.cc: Likewise.
21132 * src/abg-writer.cc: Likewise.
21134 2014-09-01 Dodji Seketeli <dodji@redhat.com>
21136 Factorize basic redundancy detection in diff report
21137 * src/abg-comparison.cc
21138 (RETURN_IF_BEING_REPORTED_OR_WAS_REPORTED_EARLIER)
21139 (RETURN_IF_BEING_REPORTED_OR_WAS_REPORTED_EARLIER{2,3}): New
21141 ({pointer_diff, array_diff, reference_diff, qualified_type_diff,
21142 class_diff, typedef_diff}::report): Use the new macros above.
21143 * tests/data/test-bidiff/test-qual-type0-report.txt: Adjust
21144 because type pretty representation are now always quoted.
21145 * tests/data/test-bidiff/test-struct1-report.txt: Adjust likewise.
21147 2014-08-31 Dodji Seketeli <dodji@redhat.com>
21149 Display package configuration at the end of configure
21150 * configure.ac: Display the configure of the package at the end of
21151 the configure script.
21153 2014-08-31 Dodji Seketeli <dodji@redhat.com>
21155 Make zip archive support optional
21156 * configure.ac: Support a new --enable-zip-archive option. By
21157 default its value is set to the 'auto', meaning that if libzip is
21158 installed, that turns the option on -- just like if
21159 --enable-zip-archive was called with the value 'yes'; if libzip is
21160 not installed, that turns the option off -- just like if
21161 --enable-zip-archive was called with the value 'no'. If libzip is
21162 detected, the pre-processor macro HAVE_LIBZIP is set to 1. If
21163 --enable-zip-archive is turned on, the pre-processor macro
21164 WITH_ZIP_ARCHIVE is set to 1.
21165 * config.h.in (HAVE_LIBZIP, WITH_ZIP): New define.
21166 * src/abg-corpus.cc: Include config.h. Guard the inclusion of
21167 abg-libzip-utils.h with the WITH_ZIP_ARCHIVE macro. Likewise for
21168 the use of declarations coming from abg-libzip-utils.h.
21169 * src/abg-libzip-utils.cc: Include config.h. Guard the file's
21170 content with the WITH_ZIP_ARCHIVE macro.
21171 * src/abg-reader.cc: Include config.h. Guard the inclusion of
21172 abg-libzip-utils.h with the WITH_ZIP_ARCHIVE. Likewise for the
21173 use of declarations coming from abg-libzip-utils.h.
21174 * src/abg-writer.cc: Likewise.
21175 * tests/Makefile.am: Build runtestwritereadarchive and runtestdot
21176 only if zip archives are supported.
21177 * tools/Makefile.am: The biar program is built only if
21178 zip archives are supported.
21179 * tools/bidiff.cc: Handle zip archives only if the
21180 WITH_ZIP_ARCHIVE macros is defined.
21181 * tools/bilint.cc: Likewise.
21183 2014-08-28 Dodji Seketeli <dodji@redhat.com>
21185 Tell bidiff --help, wrong options and missing argument apart
21186 * tools/bidiff.cc (options::{display_usage,missing_operand}): New
21188 (options::options): Initialize them.
21189 (parse_command_line): Flag missing operands. Return false only
21190 when an option could not be parsed. Flag when the user wants us
21192 (main): Tell --help, wrong options and missing argument apart and
21193 give an appropriate message on stderr. The help string goes to
21194 stdout though. Just like what GNU diff does.
21196 2014-08-28 Dodji Seketeli <dodji@redhat.com>
21198 In bidiff, don't emit a report when the binaries have the same ABI
21199 * tools/bidiff.cc (main): For differences of zero length, do not
21202 2014-08-29 Dodji Seketeli <dodji@redhat.com>
21204 Take variables in account in corpus changes detection
21205 * src/abg-comparison.cc (corpus_diff::length): Take changes about
21206 variables into account.
21208 2014-08-28 Dodji Seketeli <dodji@redhat.com>
21210 During redundancy marking start with the current node as non redundant
21211 * src/abg-comparison.cc (ENSURE_DIFF_NODE_TRAVERSED_ONCE): If the
21212 diff node is being traversed for the first time, mark it as being
21213 in the NOT_REDUNDANT_CATEGORY. I don't know why I was doing this
21214 only for classes and basic types. Update comments.
21215 * tests/data/test-diff-filter/test16-report.txt: New test input.
21216 * tests/data/test-diff-filter/test16-v0.cc: Source code of new
21218 * tests/data/test-diff-filter/test16-v0.o: New test input.
21219 * tests/data/test-diff-filter/test16-v1.cc: Source code of new
21221 * tests/data/test-diff-filter/test16-v1.o: New test input.
21222 * tests/data/test-diff-filter/test17-0-report.txt: Likewise.
21223 * tests/data/test-diff-filter/test17-1-report.txt: Likewise.
21224 * tests/data/test-diff-filter/test17-v0.cc: Source code of new
21226 * tests/data/test-diff-filter/test17-v0.o: Likewise.
21227 * tests/data/test-diff-filter/test17-v1.cc: Source code of new
21229 * tests/data/test-diff-filter/test17-v1.o: Likewise.
21230 * tests/Makefile.am: Add the new files to the source distribution.
21231 * tests/test-diff-filter.cc (in_out_spec): Run this test harness
21232 over the new test inputs.
21234 2014-08-28 Dodji Seketeli <dodji@redhat.com>
21236 Give anonymous struct the name "__anonymous_struct__"
21237 * src/abg-dwarf-reader.cc (build_class_type_and_add_to_ir): Set
21238 the name of anonymous structs to '__anonymous_struct_'.
21240 2014-08-28 Dodji Seketeli <dodji@redhat.com>
21242 Style fix in the comparison engine
21243 * src/abg-comparison.cc (represent): Remove useless white space.
21245 2014-08-27 Dodji Seketeli <dodji@redhat.com>
21247 In bidiff, change --no-linkage-names to --no-linkage-name
21248 * tools/bidiff.cc (display_usage): Change--no-linkage-names -o
21249 --no-linkage-name in the help string.
21250 (parse_command_line): Adjust the command line parsing accordingly.
21251 * tests/test-diff-filter.cc (in_out_specs): Adjust.
21253 2014-08-27 Dodji Seketeli <dodji@redhat.com>
21255 In diff reports, show symbol version info in linkage names
21256 * src/abg-comparison.cc (represent, corpus_diff::report): show
21257 symbol version info in linkage name info.
21259 2014-08-27 Dodji Seketeli <dodji@redhat.com>
21261 In diff reports, fns & members add/remove at the top, changes later.
21262 * src/abg-comparison.cc (class_diff::report): Put virtual member
21263 function adding/removal/change first, then data members
21264 add/removal, then the rest (including data members changes).
21265 (corpus_diff::report): Put function adding/removal first, then
21266 function changes. Likewise for variables.
21267 * tests/data/test-bidiff/test-struct0-report.txt: Adjust.
21268 * tests/data/test-bidiff/test-struct1-report.txt: Adjust.
21269 * tests/data/test-diff-dwarf/test0-report.txt: Adjust.
21270 * tests/data/test-diff-dwarf/test1-report.txt: Adjust.
21271 * tests/data/test-diff-dwarf/test12-report.txt: Adjust.
21272 * tests/data/test-diff-dwarf/test8-report.txt: Adjust.
21273 * tests/data/test-diff-dwarf/test9-report.txt: Adjust.
21274 * tests/data/test-diff-filter/test0-report.txt: Adjust.
21275 * tests/data/test-diff-filter/test01-report.txt: Adjust.
21276 * tests/data/test-diff-filter/test1-report.txt: Adjust.
21277 * tests/data/test-diff-filter/test13-report.txt: Adjust.
21278 * tests/data/test-diff-filter/test2-report.txt: Adjust.
21279 * tests/data/test-diff-filter/test3-report.txt: Adjust.
21280 * tests/data/test-diff-filter/test9-report.txt: Adjust.
21282 2014-08-27 Dodji Seketeli <dodji@redhat.com>
21284 Consider symbol versions' public-ness during comparison
21285 * src/abg-ir.cc (elf_symbol::operator==): Rather than comparing
21286 bindings, compare public-ness here. That is, if two symbol
21287 versions' differ because one is GLOBAL and the other one is WEAK,
21288 they should still be considered equal, from an ABI standpoint.
21290 2014-08-27 Dodji Seketeli <dodji@redhat.com>
21292 Lookup proper names of symbol during determination of deleted/added decls
21293 * src/abg-comparison.cc
21294 ({class,corpus}_diff::ensure_lookup_tables_populated): Now that in the
21295 intermediate maps we store symbol *ids* rather than symbol names,
21296 make sure to really refer to symbol names for symbol lookups,
21297 rather than (wrongly) referring to symbol ids.
21299 2014-08-26 Dodji Seketeli <dodji@redhat.com>
21301 Cleanup bidiff help string some more
21302 * tools/bidiff.cc (display_usage): Add help strings for --harmless
21304 (main): Emit the help string to stdout, not stderr.
21306 2014-08-26 Dodji Seketeli <dodji@redhat.com>
21308 bidiff --no-harmless is no more
21309 * tools/bidiff.cc (display_usage): Remove the help string for the
21310 --no-harmless option that doesn't exist anymore, as it's on by
21313 2014-08-26 Dodji Seketeli <dodji@redhat.com>
21315 During comparison use symbol name + version as decl ID
21316 * include/abg-ir.h ({var,function}_decl::get_id): New member
21317 function declarations.
21318 * src/abg-ir.cc ({var,function}_decl::get_id): New member function
21320 * src/abg-comparison.cc
21321 (corpus_diff::priv::ensure_lookup_tables_populated): Use the
21322 ::get_id() function to get an identifier for the function or
21324 * src/abg-corpus.cc (symtab_build_visitor_type::build_id): Use the
21325 get_id of the function/variable.
21327 2014-08-26 Dodji Seketeli <dodji@redhat.com>
21329 Fix access to alternate die -> decl map
21330 * src/abg-dwarf-reader.cc (read_context::alternate_die_decl_map):
21331 Return the real alternate die decl map, rather than what we was
21332 doing previously b/c of a stupid copy/paste. Oh well.
21334 2014-08-25 Dodji Seketeli <dodji@redhat.com>
21336 Take symbol versions in account when computing added/removed decls
21337 * include/abg-corpus.h
21338 (corpus::lookup_{function,variable}_symbol): Add an overload
21339 declaration that takes the version of the symbol to lookup.
21340 * src/abg-comparison.cc
21341 (corpus_diff::priv::ensure_lookup_tables_populated): So when looking
21342 up the corpora for symbols, take their versions in account.
21343 * src/abg-corpus.cc (corpus::lookup_{function,variable}_symbol):
21344 Add an overload definition that takes the version of the symbol to
21346 (symtab_build_visitor_type::build_id): New
21348 (corpus::priv::build_public_decl_table): Use the new member
21350 * src/abg-ir.cc (elf_symbol::version::operator==): Do not take the
21351 is_default flag in account when comparing two symbol versions.
21352 * libtest12-v{0,1}.so: New test input files.
21353 * libtest12-v{0,1}.c: Source code for the test input files.
21354 * test12-version-script: Version script to build the files above.
21355 * test12-report.txt: Test input file.
21356 * tests/Makefile.am: Add the new test input files above to the
21357 source distribution.
21358 * tests/test-diff-dwarf.cc (in_out_specs[]): Add an entry to this
21359 table for the new test input files.
21361 2014-08-25 Dodji Seketeli <dodji@redhat.com>
21363 Misc style cleanups
21364 * include/abg-corpus.h (corpus::lookup_function_symbol)
21365 (corpus::lookup_variable_symbol): Add the name of the function
21366 parameter in the declaration.
21367 * include/abg-ir.h (elf_symbol::version::version): Properly indent
21368 this constructor declaration.
21369 * src/abg-corpus.cc
21370 (symtab_build_visitor_type::symtab_build_visitor_type): Properly
21371 indent constructor parameters.
21372 * src/abg-ir.cc (function_decl::operator==): Fix typo in
21375 2014-08-25 Dodji Seketeli <dodji@redhat.com>
21377 bidiff --harmful is not supported anymore
21378 * tools/bidiff.cc (display_usage): remove the '--harmful' line
21379 from the help string as this option is now activated by default.
21380 It's --harmless that exists now.
21382 2014-08-22 Dodji Seketeli <dodji@redhat.com>
21384 A builtin type name change is not harmless - fix that
21385 * include/abg-comp-filter.h (has_harmless_name_change): New
21386 function declaration.
21387 * include/abg-comparison.h
21388 (diff_category::DECL_NAME_CHANGE_CATEGORY): Renamed this into
21389 HARMLESS_DECL_NAME_CHANGE_CATEGORY.
21390 (diff_category::EVERYTHING_CATEGORY): Update.
21391 * include/abg-fwd.h (is_enum): New function declaration.
21392 (is_var_decl): Return the shared_ptr<var_decl> rather than a bool.
21393 (is_data_member): New overload that takes a shared_ptr<decl_base>.
21394 * src/abg-comp-filter.cc (decl_name_changed): Consider the
21395 qualified name here.
21396 (has_harmless_name_change): Define new function declaration.
21397 (harmless_filter::visit): Use the new has_harmless_name_change
21399 * src/abg-comparison.cc (represent)
21400 (report_name_size_and_alignment_changes, enum_diff::report)
21401 (typedef_diff::report, is_data_member): Use the new
21402 filtering::has_harmless_name_change function to simplify logic of
21403 emitting the name change related diff
21404 * tools/bidiff.cc (set_diff_context_from_opts): Adjust
21405 DECL_NAME_CHANGE_CATEGORY -> HARMLESS_DECL_NAME_CHANGE_CATEGORY.
21406 * src/abg-ir.cc (is_data_member, is_enum): New function definitions.
21407 (is_var_decl): Return the var_decl_sptr rather than just a bool.
21408 * tests/data/test-diff-filter/test13-report.txt: Adjust.
21409 * tests/data/test-diff-filter/test6-report.txt: Adjust.
21411 2014-08-18 Ondrej Oprala <ooprala@redhat.com>
21413 Support C and C++ array type.
21414 * include/abg-comparison.h (array_diff): Declare new class.
21415 (array_diff_sptr): Shared pointer to type array_diff.
21416 (compute_diff): Overload the function to take type
21417 array_diff_sptr as the first two arguments.
21418 * include/abg-fwd.h (array_type_def): Declare new class.
21419 (subrange_type): Likewise.
21420 (is_array_def): Declare new function.
21421 * include/abg-ir.h (array_type_def_sptr): Shared pointer
21422 to type array_type_def.
21423 (array_type_def): Declare new class.
21424 (ir_node_visitor::visit): Declare a new virtual function
21425 taking a pointer to type array_type_def as an argument.
21426 * src/abg-comparison.cc (compute_diff_for_types): Add
21427 try_to_diff for two instances of type array_type_def.
21428 (array_diff::priv): declare struct for holding private members
21429 of type array_diff.
21430 (array_diff::array_diff): Define constructor.
21431 (array_diff::{first,second}_array):Define new
21433 (array_diff::element_type_diff): Likewise.
21434 (array_diff::{length,report,traverse}): Likewise.
21435 (compute_diff): Define function overloaded in
21436 include/abg-comparison.h.
21437 * src/abg-dwarf-reader.cc (build_array_type): Define new
21438 function. Handle DW_TAG_array_type and DW_TAG_subrange type.
21439 (build_ir_node_from_die): Amend case DW_TAG_array_type with
21440 a call to build_array_type.
21441 * src/abg-hash.cc (array_type_def::hash): Declare new struct.
21442 (type_base::dynamic_hash::operator()): Attempt to dynamic_cast
21443 the argument to type array_type_def as well.
21444 (array_type_def::hash): Declare new struct.
21445 * src/abg-ir.cc (array_type_def::array_type_def): Define
21447 (array_type_def::priv): declare struct for holding private members
21448 of type array_type_def.
21449 (array_type_def::operator==(const decl_base&):
21450 Define new operator.
21451 (array_type_def::operator==(const type_base&):
21453 (array_type_def::append_subrange{,s}): Define
21455 (array_type_def::{set,get}_size_in_bits): Likewise.
21456 (array_type_def::get_dimension_count): Likewise.
21457 (array_type_def::get_qualified_name): Likewise.
21458 (array_type_def::get_pretty_representation): Likewise.
21459 (array_type_def::get_subrange_representation): Likewise.
21460 (array_type_def::traverse): Likewise.
21461 (array_type_def::get_{element_type,location,subranges}): Likewise.
21462 (array_type_def::is_infinite): Likewise.
21463 (array_type_def::~array_type_def): Define destructor.
21464 (ir_node_visitor::visit): Define function, taking
21465 pointer to array_type_def as an argument.
21466 * src/abg-reader.cc (map_id_and_node): Check if node
21468 (is_array_def): Check if object is an array.
21469 (handle_element_node): Handle array_type_def as well.
21470 (build_subrange_type): Define new function.
21471 (build_array_type_def): Likewise.
21472 (build_type): Build type array_type_def as well.
21473 (build_type_composition): Likewise.
21474 (handle_array_type_def): Define new function.
21475 * src/abg-writer.cc: (write_decl): Output arrays
21477 (write_member_type): Likewise.
21478 (write_type_composition): Likewise.
21479 (write_array_type_def): Define new function.
21480 * tests/data/test-diff-dwarf/test{10,11}-v{0,1}.{cc,o}: New test source
21482 * tests/data/test-diff-dwarf/test{10,11}-report.txt: Likewise.
21483 * tests/data/test-diff-dwarf/test10-report.txt: New test input.
21484 * tests/data/test-read-dwarf/test7.cc: New test source
21486 * tests/data/test-read-dwarf/test7.so: New input binary
21488 * tests/data/test-read-dwarf/test7.so.abi: New reference
21489 test to compare against.
21490 * tests/data/test-read-write/test25.xml: New test source
21492 * tests/test-diff-dwarf.cc: Adjust to launch the new test.
21493 * tests/test-read-dwarf.cc: Likewise.
21494 * tests/test-read-write.cc: Likewise.
21495 * test/Makefile.am: Add the new test inputs to the source
21498 2014-08-19 Dodji Seketeli <dodji@redhat.com>
21500 Ignore variables which type couldn't be read from DWARF
21501 * src/abg-dwarf-reader.cc (build_var_decl): Drop the var on the
21502 floor if its type couldn't be built.
21504 2014-08-19 Dodji Seketeli <dodji@redhat.com>
21506 Support TLS variables
21507 * src/abg-ir.cc (elf_symbol::is_variable): Accept TLS objects as
21509 * src/abg-dwarf-reader.cc (eval_last_constant_dwarf_sub_expr)
21510 (die_location_address): Add an output parameter to say if the
21511 resulting constant value is a tls address or not.
21512 (lookup_public_variable_symbol_from_elf): Use the proper
21513 elf_symbol::is_variable() method, rather than trying to figure out
21514 the low levels of what a variable is here. Also, cleanup the
21516 (read_context::load_symbol_maps): Consider symbols of type
21517 STT_TLS, when loading symbols for variables. Also, to avoir
21518 symbols that are for versions, filter out symbols of type
21519 STT_OBJECT and with a SHN_ABS section index.
21520 (read_context::get_variable_address): If the address is for a tls
21521 variable, do no try to adjust the address to arrange for things
21522 like prelink. As that doesn't seem to affect TLS variables.
21523 (dwarf_expr_eval_context::set_tls_addr): New data member.
21524 (dwarf_expr_eval_context::dwarf_expr_eval_context): Initialize it.
21525 (dwarf_expr_eval_context::set_tls_address): New accessors.
21526 (dwarf_expr_eval_context::op_manipulates_stack): Handle
21527 DW_OP_GNU_push_tls_address, a bit like DW_OP_form_tls_address, but
21528 then, its result is a constant. Set the
21529 dwarf_expr_eval_context::set_tls_addr flag when these two OPs are
21531 (die_member_offset): Adjust to the new signature of
21532 eval_last_constant_dwarf_sub_expr.
21533 * tests/data/test-diff-dwarf/libtest9-v0.so: New test input.
21534 * tests/data/test-diff-dwarf/libtest9-v1.so: Likewise.
21535 * tests/data/test-diff-dwarf/test9-report.txt: Likewise
21536 * tests/data/test-diff-dwarf/test9-v0.cc: Source code for the
21538 * tests/data/test-diff-dwarf/test9-v1.cc: Source code for the
21540 * tests/test-diff-dwarf.cc: Run this harness on the two new inputs
21542 * tests/Makefile.am: Add the new inputs to the source distribution.
21544 2014-08-18 Dodji Seketeli <dodji@redhat.com>
21546 Update copyright for abg-dwarf-reader.cc
21547 * src/abg-dwarf-reader.cc: Update copyright year.
21549 2014-08-18 Dodji Seketeli <dodji@redhat.com>
21551 Make the link to the alt debug info file relative
21552 * tests/data/test-alt-dwarf-file/test0-debug-dir/.build-id/16/7088580c513b439c9ed95fe6a8b29496495f26.debug:
21553 Make this link be relative.
21555 2014-08-15 Dodji Seketeli <dodji@redhat.com>
21558 * tests/test-lookup-syms.cc: Remove useless white space.
21560 2014-08-15 Dodji Seketeli <dodji@redhat.com>
21562 Update copyright notice
21563 * tests/test-lookup-syms.cc: Update year in copyright notice.
21564 * tools/bidw.cc: Likewise.
21566 2014-08-15 Dodji Seketeli <dodji@redhat.com>
21568 Support alternate debug info sections
21569 * include/abg-dwarf-reader.h (class read_context)
21570 (typedef read_context_sptr, create_read_context)
21571 (has_alt_debug_info): Declare these.
21572 (read_corpus_from_elf): Declare new overload.
21573 * src/abg-dwarf-reader.cc (find_alt_debug_info)
21574 (is_die_attribute_resolved_through_gnu_ref_alt)
21575 (build_primary_die_parent_relations_under)
21576 (build_alternate_die_parent_relations_under):
21577 Define new static functions.
21578 (read_context::{alt_dwarf_,
21579 alt_debug_info_path_, alternate_die_decl_map_,
21580 alternate_die_parent_map_}): New data members.
21581 (read_context::{alt_dwarf, alt_debug_info_path,
21582 alternate_die_decl_map, associate_die_to_decl_primary,
21583 associate_die_to_decl_alternate, associate_die_to_decl,
21584 lookup_decl_from_die_offset_primary,
21585 lookup_decl_from_die_offset_alternate,
21586 lookup_decl_from_die_offset, alternate_die_parent_map}): New
21588 (read_context::load_debug_info): Painfully Get a handle on the
21589 alternate debug info section too. We shouldn't have to do all
21590 this work; we could use the new dwarf_getalt() function from
21591 libdw, but we cannot as we want to support supports that predate
21592 that api. When a version of elfutils gets released with that api
21593 though, we should conditionally use that instead.
21594 (build_ir_node_from_die, get_parent_die, get_scope_for_die)
21595 (build_namespace_decl_and_add_to_ir)
21596 (build_class_type_and_add_to_ir, build_qualified_type)
21597 (build_pointer_type_def, build_reference_type, build_typedef_type)
21598 (build_var_decl, build_function_decl): Take a new parameter that
21599 tells if the input DIE is from alternate debug info. Adjust their
21601 (die_die_attribute): Take a new output parameter that tells if the
21602 resolved DIE is from alternate debug info. Also take a new
21603 parameter that tells if the input DIE is from alternate debug info
21605 (build_die_parent_relations_under): Take the DIE -> parent map to
21606 act upon. Also, add a new overload that takes a flag saying if
21607 the DIE is from alternate debug info or not, and act upon that.
21608 (build_die_parent_maps): Renamed build_die_parent_map into this
21609 and make it build DIE -> parent DIE relationship for the alternate
21610 debug info file as well.
21611 (find_last_import_unit_point_before_die, ): Adjust to use the
21612 information about if the relevant DIEs are in alternate debug info
21614 (build_translation_unit_and_add_to_ir): Clear the alternate DIE ->
21615 decl map, that is per TU just as the primary DIE -> decl map.
21616 Adjust to use the information about if the relevant DIEs are in
21617 alternate debug info or not.
21618 (read_debug_info_into_corpus): Build the two DIE -> DIE parent
21619 maps (one for the primary debug info and one for the alternate
21621 (create_read_context, has_alt_debug_info): Define new public entry
21623 (read_corpus_from_elf): New entry point overload that takes a
21625 * tools/bidw.cc (options::{check_alt_debug_info_path,
21626 show_base_name_alt_debug_info_path}): New data members.
21627 (display_usage): Update for the two new options
21628 --check-alternate-debug-info and
21629 check-alternate-debug-info-base-name.
21630 (parse_command_line): Parse the two options above.
21631 (main) Handle the two new options above.
21632 * tests/Makefile.am: Build the new runtestaltdwarf test. Add the
21633 new data/test-alt-dwarf-file/* files to the build system.
21634 * tests/test-alt-dwarf-file.cc: New test driver.
21635 * tests/data/test-alt-dwarf-file/test0-common.cc: New test input
21637 * tests/data/test-alt-dwarf-file/libtest0-common.so: Likewise.
21638 * tests/data/test-alt-dwarf-file/test0.cc: Likewise.
21639 * tests/data/test-alt-dwarf-file/libtest0.so: Likewise.
21640 * tests/data/test-alt-dwarf-file/test0.h: Likewise.
21641 * tests/data/test-alt-dwarf-file/test0-common-dwz.debug: Likewise.
21642 * tests/data/test-alt-dwarf-file/test0-debug-dir/.build-id/16/7088580c513b439c9ed95fe6a8b29496495f26.debug:
21644 * tests/data/test-alt-dwarf-file/test0-debug-dir/test0-common-dwz.debug:
21646 * tests/data/test-read-dwarf/test1.abi: Adjust. bidw doesn't emit
21647 an abstract constructor/destructor anymore. It emits just the
21648 functions matching the cdtor symbols found in the binary.
21649 * tests/data/test-read-dwarf/test2.so.abi: Likewise.
21651 2014-07-26 Dodji Seketeli <dodji@redhat.com>
21653 Better handle corner cases of void* DWARF parsing
21654 * src/abg-dwarf-reader.cc (build_pointer_type_def): Better
21655 support cases where the underlying type of the pointer is not
21656 know. In that case, the pointer should not be created.
21658 2014-07-20 Dodji Seketeli <dodji@redhat.com>
21660 Support finding symbols with bias wrt DWARF references
21661 * src/abg-dwarf-reader.cc (get_binary_load_address): New function
21663 (read_context::elf_handle): Add comment.
21664 (read_context::{dwarf_elf_handle, dwarf_is_splitted,
21665 maybe_adjust_address_for_exec_or_dyn}): New method definitions.
21666 (maybe_adjust_fn_sym_address)
21667 (maybe_adjust_var_sym_address): Move these so they become members
21668 of read_context. Also, For shared libraries and executable (that
21669 could have been e.g prelinked), consider their loading address
21670 when trying to find which symbol resides at a given place in
21672 (read_context::{get_function_address, get_variable_address):
21674 (build_translation_unit_and_add_to_ir): Fix comment.
21676 2014-07-20 Dodji Seketeli <dodji@redhat.com>
21678 Reset the scope of void_type_decl for each new translation unit
21679 * src/abg-dwarf-reader.cc (build_translation_unit_and_add_to_ir):
21680 Clear the void_type_decl on new translation units.
21682 2014-07-18 Dodji Seketeli <dodji@redhat.com>
21684 Update INSTALL file
21685 * INSTALL: Adjust the copyright year information because autotools
21688 2014-07-18 Dodji Seketeli <dodji@redhat.com>
21690 Correctly write the name of a const reference type
21691 * src/abg-dwarf-reader.cc (maybe_strip_qualification): Define new
21693 (build_ir_node_from_die): Use the maybe_strip_qualification when
21694 building a qualified type.
21695 * src/abg-ir.cc (qualified_type_def::build_name): Fix the
21696 representation of the name of a reference that is const.
21697 * tests/data/test-read-dwarf/test1.abi: Adjust.
21698 * tests/data/test-diff-dwarf/test0-report.txt: Likewise.
21699 * tests/data/test-diff-dwarf/test1-report.txt: Likewise.
21700 * tests/data/test-diff-dwarf/test6-report.txt: Likewise.
21701 * tests/data/test-diff-dwarf/test7-report.txt: Likewise.
21702 * tests/data/test-diff-dwarf/test8-report.txt: Likewise.
21703 * tests/data/test-diff-filter/test0-report.txt: Likewise.
21704 * tests/data/test-diff-filter/test01-report.txt: Likewise.
21705 * tests/data/test-diff-filter/test2-report.txt: Likewise.
21706 * tests/data/test-diff-filter/test3-report.txt: Likewise.
21707 * tests/data/test-diff-filter/test9-report.txt: Likewise.
21708 * tests/data/test-diff-filter/test10-report.txt: Likewise.
21709 * tests/data/test-diff-filter/test13-report.txt: Likewise.
21710 * tests/data/test-diff-filter/test14-0-report.txt: Likewise.
21711 * tests/data/test-diff-filter/test14-1-report.txt: Likewise.
21713 2014-07-01 Sinny Kumari <skumari@redhat.com>
21715 Consider symbols with STB_GNU_UNIQUE binding as public
21716 * src/abg-ir.cc (is_public): Change in function to consider
21717 symbols with STB_GNU_UNIQUE binding as public
21718 * tests/data/test-read-dwarf/test6.cc: Test file to generate
21719 STB_GNU_UNIQUE binding symbols
21720 * tests/data/test-read-dwarf/test6.so: Test shared library having
21721 STB_GNU_UNIQUE binding symbols
21722 * tests/data/test-read-dwarf/test6.so.abi: XML file containing
21723 dwarf information from test6.so
21724 * tests/test-read-dwarf.cc (in_out_specs): Add the new test above
21725 * tests/Makefile.am: Add tests/data/test-read-dwarf/test6.cc,
21726 tests/data/test-read-dwarf/test6.so and
21727 tests/data/test-read-dwarf/test6.so.abi to the distribution
21729 2014-07-01 Dodji Seketeli <dodji@redhat.com>
21731 Add comment to test-read-write.cc
21732 * tests/test-read-write.cc: Update copyright notice and add a
21733 meaningful comment for the file.
21735 2014-06-23 Dodji Seketeli <dodji@redhat.com>
21737 Support reading void* type from DWARF
21738 * include/abg-ir.h (type_decl::get_void_type_decl): Declare new
21740 * src/abg-ir.cc (type_decl::get_void_type_decl): Define it.
21741 * src/abg-dwarf-reader.cc (build_ir_node_for_void_type): Define
21742 new static function.
21743 (build_pointer_type_def): Support void* type nodes here.
21744 * tests/data/test-read-dwarf/test5.cc: Source code for new test
21746 * tests/data/test-read-dwarf/test5.o: New test input.
21747 * tests/data/test-read-dwarf/test5.o.abi: Likewise.
21748 * tests/Makefile.am: Add the above to the source distribution.
21750 2014-06-23 Dodji Seketeli <dodji@redhat.com>
21752 Update a comment in abg-dwarf-reader.cc
21753 * src/abg-dwarf-reader.cc (build_ir_node_from_die): Update a
21756 2014-06-23 Mark Wielaard <mjw@redhat.com>
21758 Handle C99 restrict qualifier and DWARFv3 DW_TAG_restrict_type.
21759 * src/abg-dwarf-reader.cc (build_qualified_type): Handle
21760 DW_TAG_restrict_type by adding CV_RESTRICT.
21761 (build_ir_node_from_die): Call build_qualified_type for
21762 DW_TAG_restrict_type.
21763 * src/abg-reader.cc (build_qualified_type_decl): Handle
21764 "restrict" attribute by adding CV_RESTRICT.
21765 * src/abg-writer.cc (write_qualified_type_def): Output
21766 "restrict" attribute for CV_RESTRICT.
21767 * tests/data/test-read-dwarf/test4.c: New test file.
21768 * tests/data/test-read-dwarf/test4.so: Likewise.
21769 * tests/data/test-read-dwarf/test4.so.abi: Likewise.
21770 * tests/data/test-read-write/test24.xml: Likewise.
21771 * tests/test-read-dwarf.cc (in_out_specs): Add test4.
21772 * tests/test-read-write.cc (in_out_specs): Add test24.xml.
21774 2014-06-23 Dodji Seketeli <dodji@seketeli.org>
21776 Add subdir-objects automake option where it is needed
21777 * src/Makefile.am: Add the subdir-object automake option here.
21778 Do not specify absolute paths for the input files as Automake now
21779 takes care of that just fine.
21780 * tests/Makefile.am: Likewise.
21781 * tools/Makefile.am: Likewise.
21783 2014-06-23 Dodji Seketeli <dodji@seketeli.org>
21785 Remove autotools artifacts from the repository
21786 * config.guess: Remove from revision control system.
21787 * config.sub: Likewise.
21788 * depcomp: Likewise.
21789 * m4/libtool.m4: Likewise.
21790 * missing: Likewise.
21792 2014-06-23 Dodji Seketeli <dodji@redhat.com>
21794 Avoid reporting diff nodes that have already been reported
21795 * include/abg-comp-filter.h (class harmful_filter): Update
21797 (class redundant_filter): Declare new filter.
21798 * include/abg-comparison.h (enum
21799 diff_category::NOT_REDUNDANT_CATEGORY): New category. Update the
21800 values of the other enumerators.
21801 (diff_context::{add_diff, diff_has_been_traversed}): New overloads.
21802 (diff_context::{categorizing_redundancy, show_redundant_changes}):
21803 Declare new methods.
21804 (diff_context::remove_from_category): Define new inline method.
21805 * src/abg-comparison.cc (noop_deleter::operator()): Constify the
21807 (CATEGORIZE_REDUNDANCY_FROM_CHILD_NODE)
21808 (UPDATE_REDUNDANCY_CATEGORIZATION_FROM_NODE_SUBTREE): New macros.
21809 (TRAVERSE_DIFF_NODE_AND_PROPAGATE_CATEGORY)
21810 (TRAVERSE_MEM_DIFF_NODE_AND_PROPAGATE_CATEGORY)
21811 (TRAVERSE_MEM_FN_DIFF_NODE_AND_PROPAGATE_CATEGORY): Use the new
21812 CATEGORIZE_REDUNDANCY_FROM_CHILD_NODE and
21813 UPDATE_REDUNDANCY_CATEGORIZATION_FROM_NODE_SUBTREE macros above.
21814 (ENSURE_DIFF_NODE_TRAVERSED_ONCE)
21815 (ENSURE_MEM_DIFF_NODE_TRAVERSED_ONCE): If the (type_decl or class)
21816 node hasn't been yet traversed, mark it as non-redundant.
21817 (diff_context::priv::categorizing_redundancy): New member.
21818 (diff_context::priv::priv): Initialize it.
21819 (diff_context::{add_diff, diff_has_been_traversed): Define new
21821 (diff_context::mark_diff_as_traversed): Intern a diff node that is
21822 marked as being traversed.
21823 (diff_context::{categorizing_redundancy, show_redundant_changes}):
21824 Define new methods.
21825 (diff::is_filtered_out): A redundant function or top-level
21826 variable is considered filtered-out. Otherwise, the new
21827 NOT_REDUNDANT_CATEGORY doesn't play any role when comparing
21828 allowed categories with the set of categories a diff node belongs
21830 (corpus::priv::categorize_redundant_changed_sub_nodes): Define
21831 new member function.
21832 (corpus_diff::priv::apply_filters_and_compute_diff_stats): Change
21833 this to first walk the changed functions and variables to apply
21834 filters, then categorize redundant changed functions, and then
21835 walk the changed functions and variables again to count
21836 filtered-out diff nodes.
21837 (filtering::redundant_filter::visit): Define new member function.
21838 * tools/bidiff.cc (options::show_redundant_changes): New data
21840 (options::options): Initialize it.
21841 (display_usage): Add help string for the --redundant command line
21843 (parse_command_line): Add support for the --redundant command line
21845 (set_diff_context_from_opts): Take the --redundant command line
21847 * tests/test-diff-filter.cc: Update this to add new test inputs.
21848 * tests/data/test-diff-filter/test14-0-report.txt: New test input.
21849 * tests/data/test-diff-filter/test14-1-report.txt: Likewise.
21850 * tests/data/test-diff-filter/test14-v0.cc: Likewise.
21851 * tests/data/test-diff-filter/test14-v0.o: Likewise.
21852 * tests/data/test-diff-filter/test14-v1.cc: Likewise.
21853 * tests/data/test-diff-filter/test14-v1.o: Likewise.
21854 * tests/data/test-diff-filter/test15-0-report.txt: Likewise.
21855 * tests/data/test-diff-filter/test15-1-report.txt: Likewise.
21856 * tests/data/test-diff-filter/test15-v0.cc: Likewise.
21857 * tests/data/test-diff-filter/test15-v0.o: Likewise.
21858 * tests/data/test-diff-filter/test15-v1.cc: Likewise.
21859 * tests/data/test-diff-filter/test15-v1.o: Likewise.
21860 * tests/Makefile.am: Add the above to the build system.
21862 2014-06-23 Dodji Seketeli <dodji@redhat.com>
21864 A name that couldn't be demangled remains the same
21865 * src/abg-ir.cc (demangle_cplus_mangled_name): When the demangler
21866 fails to demangle a name, just return the input name as-is.
21868 2014-06-23 Dodji Seketeli <dodji@redhat.com>
21870 Update copyright notice for a bunch of files
21871 * include/abg-comp-filter.h: Update copyright notice.
21872 * include/abg-comparison.h: Likewise.
21873 * src/abg-comparison.cc: Likewise.
21874 * src/abg-ir.cc: Likewise.
21875 * tools/bidiff.cc: Likewise.
21876 * tests/test-diff-filter.cc: Likewise.
21878 2014-06-19 Sinny Kumari <skumari@redhat.com>
21880 Keep symbol's multiple aliases within single attribute separated by comma
21881 * src/abg-writer.cc (write_elf_symbol_aliases): Changing function
21882 to keep multiple symbol aliases within one alias attribute
21883 * src/abg-reader.cc (build_elf_symbol_db): Changing function to read
21884 symbol's alias attribute and split if multiple alias exist with comma(,)
21885 asi a delimiter and add all aliases to main symbol
21886 * tests/data/test-read-dwarf/test3.c: Test file to generate multiple aliases
21887 * tests/data/test-read-dwarf/test3.so: Test shared library having multiple
21888 aliases of a symbol
21889 * tests/data/test-read-dwarf/test3.so.abi: XML file containing dwarf
21890 information from test3.so
21891 * tests/test-read-dwarf.cc (in_out_specs): Add the new test above
21892 * tests/Makefile.am: Add tests/data/test-read-dwarf/test3.c,
21893 tests/data/test-read-dwarf/test3.so and tests/data/test-read-dwarf/test3.so.abi
21894 to the distribution
21896 2014-06-18 Mark Wielaard <mjw@redhat.com>
21898 DW_TAG_mutable_type doesn't exist.
21899 * src/abg-dwarf-reader.cc (is_type_tag): Remove DW_TAG_mutable_type.
21900 (build_ir_node_from_die): Likewise.
21902 2014-06-05 Dodji Seketeli <dodji@redhat.com>
21904 Look at first parm type and artificial-ness to detect static-ness
21905 * src/abg-dwarf-reader.cc (build_class_type_and_add_to_ir): To
21906 tell if a member function is static, look if the first parm is a
21907 pointer to the type of the enclosing class, and if it's
21908 artificial. Don't bother trying to be smart by looking at the
21909 non-presence of DW_AT_object_pointer b/c that attribute wasn't
21910 emitted by GCC 4_4.
21912 2014-06-04 Dodji Seketeli <dodji@redhat.com>
21914 Harden debug info path management & better error reporting
21915 * include/abg-dwarf-reader.h (enum status): New enum.
21916 (read_corpus_from_elf): Return an instance of status above, and
21917 return the corpus by parameter.
21918 * src/abg-dwarf-reader.cc (create_default_dwfl): Add a comment
21919 about elfutils wanting the Dwfl_Callbacks::debuginfo_path to be an
21921 (read_corpus_from_elf): Return an instance of status above, and
21922 return the corpus by parameter.
21923 * tools/abg-tools-utils.h (make_path_absolute): Declare new function.
21924 * tools/abg-tools-utils.cc (make_path_absolute): New
21926 * tools/bidiff.cc (options::di_root_path[12]): Make these be
21928 (parse_command_line): ensure the debug info root paths are
21930 (main): Adjust. Give meaningful errors when the debug info or
21931 symbol files couldn't be read.
21932 * tools/bidw.cc (options::di_root_path): Make this be a shared
21934 (parse_command_line): Ensure the debug info root path is absolute.
21935 (main): Adjust. Give meaningful errors when the debug info or
21936 symbol files couldn't be read.
21937 * tools/bilint.cc (options::di_root_path): Make this be a shared
21939 (parse_command_line): Ensure the debug info root path is absolute.
21940 (main): Adjust. Give meaningful errors when the debug info or
21941 symbol file couldn't be read.
21942 * tests/test-diff-dwarf.cc (main): Adjust.
21943 * tests/test-read-dwarf.cc (main): Likewise.
21945 2014-06-02 Dodji Seketeli <dodji@redhat.com>
21947 Do not choke on AR archives
21948 * tools/abg-tools-utils.h (file_type::FILE_TYPE_AR): New enumerator.
21949 * tools/abg-tools-utils.cc (guess_file_type): Recognize AR archive
21951 * tools/bidiff.cc (main): Support AR archives.
21952 * tools/bidw.cc (main): Likewise.
21953 * tools/bilint.cc (main): Likewise.
21955 2014-05-30 Dodji Seketeli <dodji@redhat.com>
21957 Honor linkage name showing when displaying added/removed member functions
21958 * src/abg-comparison.cc (represent): Take a diff_context. If
21959 instructed to show linkage names, show the linkage name of the
21961 (class_diff::report): Adjust for the new signature of represent().
21963 2014-05-30 Dodji Seketeli <dodji@redhat.com>
21965 Make bidiff filter output and display symbol names by default
21966 * tools/bidiff.cc (options::options): Initialize
21967 options::show_linkage_names to true and
21968 options::show_harmful_changes to false.
21969 (parse_command_line): Change --linkage-names into
21970 --no-linkage-names as the linkage names are now displayed by
21971 default. Change --no-harmless into --harmless as harmless changes
21972 are now filtered by default.
21973 (display_usage): Update help string for the --linkage-names ->
21974 --no-linkage-names and --no-harmful -> --harmful change.
21975 * tests/test-diff-filter.cc: Adjust.
21977 2014-05-29 Dodji Seketeli <dodji@redhat.com>
21979 Ensure added/removed member functions have their symbols added/removed
21980 * include/abg-comparison.h (diff_context::{set_corpora,
21981 get_first_corpus, get_second_corpus}): Declare new member
21983 * src/abg-comparison.cc (diff_context::{set_corpora,
21984 get_first_corpus, get_second_corpus}): Define them.
21985 (compute_diff): In the overload for corpus_sptr stick the corpora
21986 being compared, into the diff context.
21987 (class_diff::ensure_lookup_tables_populated): If a member function
21988 is allegedly removed, check that its underlying symbol is removed
21989 from the corpus as well. Otherwise, consider that the member
21990 function hasn't been removed. Likewise, if a member function is
21991 allegedly added, check that its underlying symbol has been added
21992 to the corpus as well. Otherwise, consider that the member
21993 function hasn't been added. The symbols can now be accessed
21994 through the two corpora that are now present in the diff context.
21996 2014-05-29 Dodji Seketeli <dodji@redhat.com>
21998 Fix scope for DIEs with specification or abstract_origin attributes
21999 * src/abg-dwarf-reader.cc (get_scope_for_die): If the DIE has a
22000 DW_AT_specification or DW_AT_abstract_origin attribute, get the
22001 scope of the referred-to DIE.
22002 (build_ir_node_from_die): For a variable DIE that has a
22003 DW_AT_{specification,abstract_origin} attribute, do not add the
22004 built variable IR node to its scope because it is already in a
22005 scope. It's in a scope because that built variable is for the DIE
22006 that is referred-to by the DW_AT_{specification,abstract_origin}
22007 attribute. Likewise for member functions. Also, now,
22008 get_scope_for_die can return a class for a function DIE because
22009 get_scope_for_die now returns the *logical* scope of the DIE; that
22010 is, it follows DW_AT_{specification,abstract_origin} attributes.
22011 * tests/data/test-read-dwarf/test1.abi: Adjust.
22013 2014-05-28 Dodji Seketeli <dodji@redhat.com>
22015 Add a symbol database to the ABI Corpus & support symbol aliases
22016 * include/abg-corpus.h (corpus::{g,s}et_{fun,var}_symbol_map{_sptr}):
22017 Declare new accessors.
22018 (corpus::lookup_{variable,function}_symbol): Declare new member
22020 * src/abg-corpus.cc (corpus::{g,s}et_{fun,var}_symbol_map{_sptr}):
22021 Define new accessors.
22022 (corpus::lookup_{variable,function}_symbol): Define new member
22024 * include/abg-ir.h (string_elf_symbol_sptr_map_type)
22025 (string_elf_symbol_sptr_map_sptr, elf_symbols)
22026 (string_elf_symbols_map_type, string_elf_symbols_map_sptr): New
22027 convenience typedefs.
22028 (elf_symbol::{get_main_symbol, is_main_symbol, get_next_alias,
22029 has_aliases, add_alias, get_id_string,
22030 get_name_and_version_from_id, operator=}): Declare new member
22032 * src/abg-ir.cc (elf_symbol::{get_main_symbol, is_main_symbol,
22033 get_next_alias, has_aliases, add_alias, get_id_string,
22034 get_name_and_version_from_id, operator=}): Define new member
22036 * include/abg-reader.h (read_corpus_from_file): Take a shared
22038 * src/abg-reader.cc (read_context::{g,s}et_corpus): Define these.
22039 (build_elf_symbol_db, build_elf_symbol_from_reference)
22040 (read_symbol_db_from_input): Define new functions.
22041 (read_corpus_from_input): Adjust. Make it read symbol databases.
22042 (build_elf_symbol): Harden this.
22043 (build_{var,function}_decl): Read the symbol reference. Do not
22044 read the local symbol serialization anymore.
22045 (read_corpus_from_archive): Adjust.
22046 (read_corpus_from_file): Take a reference to a shared pointer to
22047 corpus, rather than a reference to the corpus.
22048 (read_corpus_from_native_xml): Only keep the overload that returns
22049 a corpus. Set the current context with the corpus.
22050 * src/abg-dwarf-reader.cc (addr_elf_symbol_sptr_map_type)
22051 (addr_elf_symbol_sptr_map_sptr): New convenience typedefs.
22052 (read_context::{fun_sym_addr_sym_index_map_,
22053 var_sym_addr_sym_index_map_): Remove.
22054 (read_context::{fun,var}_addr_sym_map_): New. Replace the above
22056 (read_context::{var,fun}_syms_): New.
22057 (read_context::lookup_elf_{fn,var}_symbol_from_address): Adjust.
22058 (read_context::{fun,var}_addr_sym_map{_sptr}): New.
22059 (read_context::{fun,var}_syms{_sptr}): New.
22060 (read_context::load_symbol_maps): Replace
22061 read_context::load_symbol_addr_to_index_maps. Adjust to load all
22063 (read_context::maybe_load_symbol_maps): New.
22064 (read_debug_info_into_corpus): Renamed build_corpus into this.
22065 Update to load symbol maps and set it to the corpus.
22066 * src/abg-writer.cc (write_context::get_fun_symbol_map): New
22068 (write_elf_symbol_aliases, write_elf_symbol_reference)
22069 (write_elf_symbols_table): Define new static functions.
22070 (write_var_decl): Write the reference to the underlying symbol of
22071 the variable. Do not write the full symbol here anymore.
22072 (write_function_decl): Likewise, write the reference to the
22073 underlying symbol of the function. Do not write the full symbol
22075 (write_corpus_to_native_xml): Write the symbol databases at the
22076 beginning of the corpus document.
22077 * src/abg-comparison.cc
22078 (corpus_diff::priv::ensure_lookup_tables_populated): Now that the
22079 corpus has symbols, check if a the symbol of an allegedly deleted
22080 function (resp. variable) is deleted; if not, then do not report
22081 the function (resp. variable) as deleted. Similarly, check if the
22082 symbol of an allegedly added function (resp. variable) is added.
22083 if not, the do not report the function (resp. variable) as added.
22084 * tests/test-write-read-archive.cc (main): Adjust.
22085 * tools/biar.cc (extract_tus_from_archive): Likewise.
22086 * tests/data/test-diff-filter/test9-report.txt: Adjust.
22087 * tests/data/test-read-dwarf/test0.abi: Likewise.
22088 * tests/data/test-read-dwarf/test1.abi: Likewise.
22089 * tests/data/test-read-dwarf/test2.so.abi: Likewise.
22091 2014-05-21 Dodji Seketeli <dodji@redhat.com>
22093 Rename 'symbol' in fn names to 'public decl' in abg-corpus.{cc,h}
22094 * src/abg-corpus.cc (lots of places): Rename references to
22095 'symbol' in function & variable names to 'public_decl'.
22097 2014-05-22 Dodji Seketeli <dodji@redhat.com>
22099 Support debug info files being outside the expected system directories
22100 * include/abg-dwarf-reader.h (read_corpus_from_elf): Take a
22101 debug_info_root_path parameter.
22102 src/abg-dwarf-reader.cc (create_default_dwfl): Take a
22103 debug_info_root_path. Use that to initialize the Dwfl_Callbacks
22104 structure used by dwfl_begin.
22105 (create_default_dwfl_sptr, read_corpus_from_elf): Likewise, Take a
22106 debug_info_root_path parameter.
22107 * tests/test-diff-dwarf.cc (main): Adjust.
22108 * tests/test-read-dwarf.cc (main): Likewise.
22109 * tools/bidiff.cc (options::dir_root_path[12]): New member.
22110 (options::options): Initialize it.
22111 (display_usage): Add help string for the --debug-info-dir[12]
22113 (parse_command_line): Handle the new --debug-info-dir[12] options.
22114 (main): Pass the debug info directories to read_corpus_from_elf.
22115 * bidw.cc (options::::di_root_path): New member.
22116 (options::options): Initialize it.
22117 (display_usage): Add help string for the new --debug-info-dir
22119 (parse_command_line): Handle the new --debug-info-dir.
22120 (main): Pass the debug info root path to read_corpus_from_elf.
22121 * tools/bilint.cc (options::di_root_path): New member.
22122 (options::options): Initialize it.
22123 (display_usage): Add help string for the new --debug-info-dir.
22124 (parse_command_line): Handle --debug-info-dir command line option.
22125 (main): Pass the debug info root path to read_corpus_from_elf.
22127 2014-05-21 Dodji Seketeli <dodji@redhat.com>
22129 Fix detection of destructors
22130 * src/abg-dwarf-reader.cc (build_class_type_and_add_to_ir): Simply
22131 detect that the destructor starts with a '~'.
22133 2014-05-21 Dodji Seketeli <dodji@redhat.com>
22135 Add clone in the scope of the cloned decl they logically belong to
22136 * src/abg-dwarf-reader.cc (build_ir_node_from_die): Do not try to
22137 add the cloned function/variable to the current scope because
22138 cloning should have added the decl into the scope of the cloned
22140 * src/abg-ir.cc ({var,function}_decl::clone): Insert the clone
22141 decl into the scope of the cloned decl. My understanding is that
22142 it's where they belong.
22143 * tests/data/test-read-dwarf/test1.abi: Update this to incorporate
22144 all the abstract constructors/destructors *and* their clones into
22145 the classes where they belong.
22146 * tests/data/test-read-dwarf/test1.abi: Adjust for the abstract
22147 cdtor being added to the class, as well as their cloned concrete
22149 * tests/data/test-read-dwarf/test2.so.abi: Likewise.
22151 2014-05-20 Dodji Seketeli <dodji@redhat.com>
22153 Support decl cloning when seeing DW_AT_abstract_origin
22154 * include/abg-ir.h ({var,function}_decl::clone): New method.
22155 * src/abg-dwarf-reader.cc (die_die_attribute): Add a flag to avoid
22156 looking through DW_AT_abstract_origin attribute here.
22157 (build_function_decl): Set the linkage name from
22158 DW_AT_linkage_name if it's not set yet.
22159 (build_ir_node_from_die): For DW_TAG_{variable,subprogram}, when
22160 we see DW_AT_abstract_origin, clone the decl they refer to.
22161 Also, avoid dropping the DIE on the floor just because it doesn't
22162 have die_is_artificial here.
22163 * src/abg-ir.cc ({var,function}_decl::clone): Implement this.
22165 2014-05-19 Dodji Seketeli <dodji@redhat.com>
22167 Don't share types across TUs when DW_TAG_partial_unit are involved
22168 * src/abg-dwarf-reader.cc (build_translation_unit_and_add_to_ir):
22169 Clear the part of the context that needs to be per TU.
22170 (build_ir_node_from_die): Assert that this should not be called
22171 for partial and imported unit because for now our practical
22172 assumption is that DIEs under partial unit are lazily read only
22173 when referenced by DIEs that are under DW_TAG_compile_unit.
22174 * tests/Makefile.am: Add the new test files to the build system.
22175 * tests/data/test-read-dwarf/test2.so.abi: Fix the reference
22176 output here to avoid sharing types across TUs, making the output
22179 2014-05-19 Dodji Seketeli <dodji@redhat.com>
22181 Initial support for DW_TAG_partial_unit
22182 * src/abg-dwarf-reader.cc (read_context::cur_tu_die_): New member.
22183 (read_context::read_context): Initialize the new member.
22184 (read_context::cur_tu_die): New accessors.
22185 (find_last_import_unit_point_before_die): New static function.
22186 (get_parent_die): Take a logical current die offset parameter. If
22187 the die we want the parent for is a partial unit, then find the
22188 last DW_TAG_imported_unit that imports that partial unit before
22189 the logical current die and return the parent of that
22190 DW_TAG_imported_unit die.
22191 (get_scope_for_die): Take a logical current die offset parameter.
22193 (build_translation_unit_and_add_to_ir): Set/unset the current
22194 translation unit DIE in the context. Adjust.
22195 (build_namespace_decl_and_add_to_ir)
22196 (build_class_type_and_add_to_ir, build_qualified_type)
22197 (build_pointer_type_def, build_reference_type, build_typedef_type)
22198 (build_var_decl, build_function_decl, build_ir_node_from_die):
22199 Take a logical current die offset parameter. Adjust.
22200 (build_corpus): Accept that we can have DIE that are not
22201 DW_TAG_compile_unit at the top level, because, well, we can now
22202 have DW_TAG_partial_unit too.
22203 * tests/data/test-read-dwarf/test2-{0,1}.cc: New test source
22205 * tests/data/test-read-dwarf/test2.h: Likewise.
22206 * tests/data/test-read-dwarf/test2.so: New input binary to read.
22207 * tests/data/test-read-dwarf/test2.so.abi: New reference test to
22209 * tests/test-read-dwarf.cc: Adjust to launch the new test.
22211 2014-05-14 Dodji Seketeli <dodji@redhat.com>
22213 Re-build a test input file with debug info
22214 * tests/data/test-lookup-syms/test1.so: Rebuild this with debug
22217 2014-05-14 Dodji Seketeli <dodji@redhat.com>
22219 Serialize and de-serialize elf symbols for var & function decls
22220 * abg-ir.h (string_to_elf_symbol_type, string_to_elf_symbol_binding):
22221 Declare new entry points.
22222 * src/abg-ir.cc (string_to_elf_symbol_type)
22223 (string_to_elf_symbol_binding): Define new entry points.
22224 * include/abg-libxml-utils.h (xml_char_sptr_to_string): Declare
22226 * src/abg-libxml-utils.cc (xml_char_sptr_to_string): Define new
22228 * src/abg-reader.cc (read_elf_symbol_type)
22229 (read_elf_symbol_binding, build_elf_symbol): Define new static
22231 (build_function_decl, build_var_decl): Use the new
22232 build_elf_symbol and set the symbol to the function. Flag the
22233 function as having a public symbol in the symbol table if the
22235 * src/abg-writer.cc (write_elf_symbol_type)
22236 (write_elf_symbol_binding, write_elf_symbol): Define new static
22238 (write_var_decl, write_function_decl): Use the new
22239 write_elf_symbol to serialize the symbol for the decl.
22240 * tests/data/test-read-dwarf/test[01].abi: Adjust.
22242 2014-05-14 Dodji Seketeli <dodji@redhat.com>
22244 Don't crash when de-serializing an empty function parm xml node
22245 * src/abg-reader.cc (build_function_parameter): Do not crash if
22246 the xml node is NULL.
22248 2014-05-14 Dodji Seketeli <dodji@redhat.com>
22250 Fix a typo in serializing a decl_base::binding
22251 * src/abg-ir.cc (operator<<(std::ostream&, decl_base::binding)):
22254 2014-05-14 Dodji Seketeli <dodji@redhat.com>
22256 Add a help string for the --no-absolute-path option of bisym
22257 * tools/bisym.cc (show_help): Add a missing help string.
22259 2014-05-13 Dodji Seketeli <dodji@redhat.com>
22261 Do not try to use ELF hash tables in demangling lookup mode
22262 * src/abg-dwarf-reader.cc (lookup_symbol_from_elf): If in
22263 demangling mode, do not use ELF hash tables.
22265 2014-05-13 Dodji Seketeli <dodji@redhat.com>
22267 Use the proper symbol table for and set linkage_name to symbol name
22268 * src/abg-dwarf-reader.cc (find_symbol_table_section): Return the
22269 .symtab if we are looking at an executable or relocatable file and
22270 .dynsym if we are looking at a DSO.
22271 (find_symbol_table_section_index): Likewise. Implement this in
22272 terms of find_symbol_table_section.
22273 (build_{function,var}_decl): Set the linkage_name to the symbol
22274 name, if the symbol name is not empty.
22275 * tests/data/test-diff-filter/test9-report.txt: Adjust.
22277 2014-05-13 Dodji Seketeli <dodji@redhat.com>
22279 Remove redundant "'" around linkage names in diff reports
22280 * src/abg-comparison.cc (corpus_diff::report): Remove the
22281 redundant "'" from the linkage names in the diff.
22283 2014-05-08 Dodji Seketeli <dodji@redhat.com>
22285 Initial support for elf symbol (versionning) during decl comparison
22286 * include/abg-fwd.h (get_linkage_name): Remove.
22287 * include/abg-dwarf-reader.h (enum symbol_type)
22288 (enum symbol_binding): Move these into abg-ir.h.
22289 (lookup_symbol_from_elf, lookup_public_function_symbol_from_elf):
22291 * src/abg-dwarf-reader.cc (eval_last_constant_dwarf_sub_expr):
22292 Declare this before using it.
22293 (die_address_attribute, die_location_address)
22294 (stt_to_elf_symbol_type, stb_to_elf_symbol_binding)
22295 (find_hash_table_section_index, find_symbol_table_section)
22296 (find_symbol_table_section_index, find_text_section)
22297 (find_bss_section, compare_symbol_name)
22298 (get_symbol_versionning_sections get_version_for_symbol)
22299 (lookup_symbol_from_sysv_hash_tab)
22300 (lookup_symbol_from_gnu_hash_tab, get_elf_class_size_in_bytes)
22301 (bloom_word_at, setup_gnu_ht, lookup_symbol_from_elf_hash_tab)
22302 (lookup_symbol_from_symtab, maybe_adjust_fn_sym_address)
22303 (maybe_adjust_var_sym_address): New static functions.
22304 (enum hash_table_kind): New enum.
22305 (struct gnu_ht): New struct.
22306 (read_context::var_decls_to_add_): Renamed var_decls_to_add into
22308 (read_context::{fun, var}_sym_addr_sym_index_map_): New member.
22309 (read_context::{lookup_symbol_from_elf,
22310 lookup_elf_symbol_from_index, lookup_elf_fn_symbol_from_address,
22311 lookup_elf_var_symbol_from_address, fun_sym_addr_sym_index_map,
22312 var_sym_addr_sym_index_map, load_symbol_addr_to_index_maps,
22313 get_function_address, get_variable_address}): New member
22315 (read_context::lookup_public_{variable,
22316 function}_symbol_from_elf): Adjust.
22317 (op_pushes_constant_value): Fix a bug here.
22318 (lookup_symbol_from_elf): Adjust. Support cases where there is no
22319 elf hash table, e.g, for relocatable files.
22320 (lookup_public_function_symbol_from_elf)
22321 (lookup_public_variable_symbol_from_elf): Adjust.
22322 (build_var_decl): Allow updating the var_decl to associate it with
22323 its underlying symbol. In that case, if the linkage name is not
22324 set, set it to the symbol name.
22325 (build_function_decl): Likewise for function_decl.
22326 (operator<<(std::ostream&, symbol_type)):
22327 (operator<<(std::ostream&, symbol_binding)): Move these do
22329 * include/abg-ir.h (class elf_symbol): Declare new class. Move
22330 enum symbol_binding and enum symbol_type (from abg-dwarf-reader.h) to
22331 elf_symbol::binding and elf_symbol::type here.
22332 (operator<<(std::ostream&, elf_symbol::type))
22333 (operator<<(std::ostream&, elf_symbol::binding))
22334 (operator==(const elf_symbol_sptr, const elf_symbol_sptr)): New
22336 (class elf_symbol::version): Declare new class.
22337 (class var_decl): Make this pimpl, and add ...
22338 (var_decl::{g,s}et_symbol): ... new member functions.
22339 (class function_decl): Likewise, make this pimpl and add ...
22340 (function_decl::{g,s}et_symbol): ... new member functions.
22341 * src/abg-ir.cc (struct elf_symbol, elf_symbol::priv): New
22343 (elf_symbol::*): Lots of new members and member functions.
22344 (operator==(const elf_symbol_sptr, const elf_symbol_sptr)): New.
22345 (operator<<(std::ostream&, elf_symbol::type)): New.
22346 (operator<<(std::ostream&, elf_symbol::binding)): New.
22347 (elf_symbol::version::priv): New type.
22348 (elf_symbol::version::*): Lots of member functions.
22349 (get_linkage_name): Removed.
22350 (var_decl::priv): New type. Pimplify the thing.
22351 (var_decl::{s,g}et_symbol): New.
22352 (var_decl::operator==): Take symbols in account in the comparison.
22353 (function_decl::priv): New type.
22354 (function_decl::*): Pimplify.
22355 (function_decl::{s,g}et_symbol): New.
22356 (function_decl::operator==): Take symbols in account in the
22358 * include/abg-comparison.h (diff_context::show_linkage_name): New
22360 * src/abg-comparison.cc (diff_context::priv::show_linkage_name_):
22362 (diff_context::priv::priv): Initialize it.
22363 (diff_context::show_linkage_names): New member function.
22364 (corpus_diff::report): If the user used --show-linkage-names,
22365 display the linkage name after the name of the functions. Add
22366 missing "'" in the some spots.
22367 * tools/bidiff.cc (options.show_linkage_names): New member.
22368 (display_usage, parse_command_line): Support --linkage-names.
22369 * tools/bisym.cc (show_help): Add '\n' at the end of help string
22370 for --demangle. Add --no-absolute-path option.
22371 (parse_command_line): Support --no-absolute-path.
22372 (main): Adjust for symbol (versionning) support. Consider that
22373 the program successfully completed even when the symbol wasn't
22374 found. Support --no-absolute-path.
22375 * tests/data/test-lookup-syms/test0-report.txt: New.
22376 * tests/data/test-lookup-syms/test01-report.txt: New.
22377 * tests/data/test-lookup-syms/test02-report.txt: New.
22378 * tests/data/test-read-dwarf/test0.abi: Adjust.
22379 * tests/data/test-read-dwarf/test1.abi: Adjust.
22380 * tests/data/test-diff-dwarf/test7-report.txt: Adjust.
22381 * tests/data/test-diff-filter/test10-report.txt: Adjust.
22382 * tests/data/test-diff-filter/test12-report.txt: Adjust.
22383 * tests/data/test-lookup-syms/test1-[123]-report.txt: New.
22384 * tests/data/test-lookup-syms/test1.c: New.
22385 * tests/data/test-lookup-syms/test1.version-script: New.
22386 * tests/test-lookup-syms.cc: Adjust for new tests.
22387 * test/Makefile.am: Adjust makefile.
22389 2014-05-07 Dodji Seketeli <dodji@redhat.com>
22391 Rename decl_base::get_mangled_name into decl_base::get_linkage_name
22392 * include/abg-ir.h (decl_base::get_linkage_name): Renamed
22393 decl_base::get_mangled_name into this.
22394 * src/abg-comparison.cc
22395 (class_diff::ensure_lookup_tables_populated)
22396 (function_decl_diff::report, type_decl_diff::report)
22397 (corpus_diff::priv::ensure_lookup_tables_populated)
22398 (corpus_diff::report, compute_diff): Adjust.
22399 * src/abg-corpus.cc ({var_comp, func_comp}::operator()): Likewise.
22400 (corpus::priv::build_symbol_table): Likewise.
22401 * src/abg-dwarf-reader.cc (die_linkage_name): Renamed
22402 die_mangled_name into this.
22403 (die_loc_and_name, build_translation_unit_and_add_to_ir)
22404 (build_namespace_decl_and_add_to_ir, build_type_decl)
22405 (build_enum_type, build_class_type_and_add_to_ir)
22406 (build_typedef_type, build_var_decl, build_function_decl, ): Adjust.
22407 * src/abg-hash.cc (decl_base::hash::operator()): Likewise.
22408 * src/abg-ir.cc (decl_base::priv::linkage_name_): Renamed
22409 decl_base::priv::mangled_name_ into this.
22410 (decl_base::priv::priv, decl_base::{decl_base, operator==})
22411 (get_linkage_name, typedef_decl::typedef_decl, var_decl::var_decl)
22412 (function_decl::function_decl, class_decl::base_spec::base_spec)
22413 (class_decl::method_decl::method_decl): Adjust.
22414 (decl_base::{g,s}et_linkage_name): Renamed
22415 decl_base::{g,s}et_mangled_name into this.
22416 * src/abg-writer.cc (write_decl, write_typedef_decl)
22417 (write_var_decl, write_function_decl, dump): Adjust.
22419 2014-04-21 Dodji Seketeli <dodji@redhat.com>
22421 Drop symbols not global in a symtab from corpus symtab
22422 * src/abg-corpus.cc (corpus_priv::build_symbol_table): If a
22423 function or variable symbol is not public (global or weak) and
22424 present in an elf symbol table, drop it from the corpus symbol
22425 table. As a result functions are variables (not present in the
22426 elf symbol tables) that we were previously taking in account are
22427 not dropped on the floor, leading to much less noise.
22428 * tests/data/test-diff-dwarf/test0-v0.cc: Update to avoid
22429 generating inline functions.
22430 * tests/data/test-diff-dwarf/test0-v0.o: Likewise.
22431 * tests/data/test-diff-dwarf/test0-v1.cc: Likewise.
22432 * tests/data/test-diff-dwarf/test0-v1.o: Likewise.
22433 * tests/data/test-diff-dwarf/test7-v0.o: Likewise.
22434 * tests/data/test-diff-dwarf/test7-v1.cc: Likewise.
22435 * tests/data/test-diff-dwarf/test7-v1.o: Likewise.
22436 * tests/data/test-diff-dwarf/test8-v0.cc: Likewise.
22437 * tests/data/test-diff-dwarf/test8-v0.o: Likewise.
22438 * tests/data/test-diff-dwarf/test8-v1.cc: Likewise.
22439 * tests/data/test-diff-dwarf/test8-v1.o: Likewise.
22440 * tests/data/test-diff-filter/test0-v0.cc: Likewise.
22441 * tests/data/test-diff-filter/test0-v0.o: Likewise.
22442 * tests/data/test-diff-filter/test0-v1.cc: Likewise.
22443 * tests/data/test-diff-filter/test0-v1.o: Likewise.
22444 * tests/data/test-diff-filter/test10-v0.cc: Likewise.
22445 * tests/data/test-diff-filter/test10-v0.o: Likewise.
22446 * tests/data/test-diff-filter/test10-report.txt: Likewise.
22447 * tests/data/test-diff-filter/test10-v1.o: Likewise.
22448 * tests/data/test-diff-filter/test13-v0.cc: Likewise.
22449 * tests/data/test-diff-filter/test13-v0.o: Likewise.
22450 * tests/data/test-diff-filter/test13-v1.cc: Likewise.
22451 * tests/data/test-diff-filter/test13-v1.o: Likewise.
22452 * tests/data/test-diff-filter/test2-v0.cc: Likewise.
22453 * tests/data/test-diff-filter/test2-v0.o: Likewise.
22454 * tests/data/test-diff-filter/test2-v1.cc: Likewise.
22455 * tests/data/test-diff-filter/test2-v1.o: Likewise.
22456 * tests/data/test-diff-filter/test4-v0.cc: Likewise.
22457 * tests/data/test-diff-filter/test4-v0.o: Likewise.
22458 * tests/data/test-diff-filter/test4-v1.cc: Likewise.
22459 * tests/data/test-diff-filter/test4-v1.o: Likewise.
22460 * tests/data/test-diff-filter/test9-v0.o: Likewise.
22461 * tests/data/test-diff-filter/test9-v1.cc: Likewise.
22462 * tests/data/test-diff-filter/test9-v1.o: Likewise.
22464 2014-04-21 Dodji Seketeli <dodji@redhat.com>
22466 Fix mangled name setting for static data members from DWARF
22467 * src/abg-dwarf-reader.cc (build_var_decl): Support adding
22468 properties to an existing var_decl. For now just add mangled
22470 (build_ir_node_from_die): Accept DW_TAG_member too. This helps
22471 for when this function is used to add additional properties to an
22472 existing DW_TAG_member representing a static data member. Then,
22473 use build_var_decl to really add the value of the additional
22474 mangled name property.
22476 2014-04-21 Dodji Seketeli <dodji@redhat.com>
22478 Always show pretty representation of variables in report
22479 * src/abg-comparison.cc (corpus_diff::report): Display the pretty
22480 representation of the variable, no matter what.
22482 2014-04-21 Dodji Seketeli <dodji@redhat.com>
22484 Set "is_in_public_symbol_table" property for vars & fns
22485 * src/abg-dwarf-reader.cc (build_var_decl, build_function_decl):
22486 Set the "is_in_public_symbol_table" property for the variable or
22489 2014-04-21 Dodji Seketeli <dodji@redhat.com>
22491 Support symbol lookups from ELF
22492 * include/abg-dwarf-reader.h (symbol_type, symbol_binding): New
22494 (operator<<): Declare new overloads for the new enums above.
22495 (lookup_symbol_from_elf, lookup_public_function_symbol_from_elf):
22496 Declare new entry points.
22497 * src/abg-dwarf-reader.cc (lookup_symbol_from_elf)
22498 (lookup_public_function_symbol_from_elf)
22499 (lookup_public_variable_symbol_from_elf): Define new static
22501 (read_context::elf_{module_, handle}_): New data members.
22502 (read_context::{elf_module, elf_handle}): New accessors.
22503 (read_context::load_debug_info): Store the elf module into
22504 read_context::_elf_module_. Adjust.
22505 (read_context::{lookup_symbol_from_elf,
22506 lookup_public_function_symbol_from_elf,
22507 lookup_public_variable_symbol_from_elf}): New member functions.
22508 (lookup_symbol_from_elf, lookup_public_function_symbol_from_elf)
22509 (operator<<): Define public entry points.
22510 * tools/bisym.cc: New tool to lookup a symbol in an elf file.
22511 * tools/Makefile.am: Add the bisym.cc source file to the
22512 distribution and arrange to compile it into a 'bisym' executable.
22513 * tests/test-lookup-syms.cc: New test harness.
22514 * tests/data/test-lookup-syms/test0-report.txt: New test input
22515 for the harness above.
22516 * tests/data/test-lookup-syms/test0.cc: Likewise.
22517 * tests/data/test-lookup-syms/test0.o: Likewise
22518 * tests/data/test-lookup-syms/test01-report.txt: Likewise.
22519 * tests/data/test-lookup-syms/test02-report.txt: Likewise.
22520 * tests/Makefile.am: Build the new runtestlookupsyms test and add
22521 the new files to the distribution.
22523 2014-04-21 Dodji Seketeli <dodji@redhat.com>
22525 Add corpus::{s,g}et_origin accessors
22526 * include/abg-corpus.h (enum corpus::origin): New enum.
22527 (corpus::{g,s}et_origin): New accessors.
22528 * src/abg-corpus.cc (corpus::priv::origin): New data member.
22529 (corpus::priv::is_symbol_table_built): Move this up.
22530 (corpus::priv::priv): Adjust.
22531 (corpus::{g,s}et_origin): Define accessors.
22532 * src/abg-dwarf-reader.cc (read_corpus_from_elf): Set the corpus
22533 origin. Also set the path. Oops.
22534 * src/abg-reader.cc (read_corpus_from_input)
22535 (read_corpus_from_archive): Set the corpus origin.
22537 2014-04-21 Dodji Seketeli <dodji@redhat.com>
22539 Add a get_linkage_name function.
22540 * include/abg-fwd.h (is_at_global_scope): Declare a new overload.
22541 (get_linkage_name): Declare ...
22542 * src/abg-ir.cc (get_linkage_name): ... these new entry points.
22543 (is_at_global_scope): Define these new overloads useful for the
22544 new get_linkage_name.
22546 2014-04-21 Dodji Seketeli <dodji@redhat.com>
22548 Pimplify decl_base and add decl_base::{s,g}et_is_in_public_symbol_table
22549 * include/abg-ir.h (struct decl_base::priv): New pimpl type.
22550 (decl_base::priv_): New pimpl.
22551 (decl_base::{hashing_started, peek_hash_value,
22552 peek_qualified_name, set_qualified_name}): Declare new protected
22554 (decl_base::{get_context_rel, set_qualified_name, get_location,
22555 set_location, set_name, set_mangled_name, get_visibility,
22556 set_visibility}): Move these out-of-line.
22557 (decl_base::{g,s}et_is_public_symbol_table):
22558 (class_decl::hashing_started): Remove this as we now have
22559 decl_base::hashing_started.
22560 (decl_base::{hash_, hashing_started, location_, context_, name_,
22561 qualified_parent_name_, qualified_name_, mangled_name_,
22562 visibility_}): Move all these members into the new ...
22563 * src/abg-ir.cc (struct decl_base::priv): ... pimpl type.
22564 (decl_base::decl_base): Move these out-of-line here. Adjust the
22566 (decl_base::{hashing_started, peek_hash_value,
22567 peek_qualified_name, set_qualified_name}): Define these new
22569 (decl_base::{get_context_rel, set_context_rel, get_location,
22570 set_location, set_name, get_mangled_name, set_mangled_name,
22571 get_visibility, set_visibility}): Define these out-of-line here.
22572 (decl_base::{get_hash, set_hash, get_scope,
22573 get_qualified_parent_name, get_qualified_name, operator==,
22574 set_scope}): Adjust.
22575 (qualified_type_def::get_qualified_name): Likewise.
22576 (pointer_type_def::get_qualified_name): Likewise.
22577 (reference_type_def::get_qualified_name): Likewise.
22578 (var_decl::set_scope): Likewise.
22579 (class_decl::base_spec): Likewise.
22580 (class_decl::method_decl::set_scope): Likewise.
22581 (decl_base::{g,s}et_is_in_public_symbol_table): Define new accessors.
22582 * src/abg-hash.cc ({decl_base, type_decl, scope_decl,
22583 scope_type_decl, qualified_type_def, pointer_type_def,
22584 reference_type_def, enum_type_decl, typedef_decl, var_decl,
22585 class_decl}::hash::operator): Adjust.
22587 2014-04-17 Dodji Seketeli <dodji@redhat.com>
22589 Categorize base class changes as SIZE_OR_OFFSET_CHANGE_CATEGORY
22590 * include/abg-comparison.h (class_diff::{deleted, inserted,
22591 changed}_bases): Declare new member functions ...
22592 * src/abg-comparison.cc ((class_diff::{deleted, inserted,
22593 changed}_bases)): ... and define them.
22594 * src/abg-comp-filter.cc (base_classes_added_or_removed): Define
22595 new static functions.
22596 (harmless_filter): Categorize base classes added or removed.
22597 * tests/data/test-diff-dwarf/test8-report.txt: New test input.
22598 * tests/data/test-diff-dwarf/test8-v0.cc: Likewise.
22599 * tests/data/test-diff-dwarf/test8-v0.o: Likewise.
22600 * tests/data/test-diff-dwarf/test8-v1.cc: Likewise.
22601 * tests/data/test-diff-dwarf/test8-v1.o: Likewise.
22602 * tests/data/test-diff-filter/test13-report.txt: New test input.
22603 * tests/data/test-diff-filter/test13-v0.cc: Likewise.
22604 * tests/data/test-diff-filter/test13-v0.o: Likewise.
22605 * tests/data/test-diff-filter/test13-v1.cc: Likewise.
22606 * tests/data/test-diff-filter/test13-v1.o: Likewise.
22607 * tests/Makefile.am: Add the new files above to the source distribution.
22608 * tests/test-diff-dwarf.cc: Use the new relevant input above to
22610 * tests/test-diff-filter.cc: Likewise.
22612 2014-04-17 Dodji Seketeli <dodji@redhat.com>
22614 Fix class diff reporting issues for base classes
22615 * src/abg-comparison.cc (class_diff::report): For base classes,
22616 report their pretty representation. Do not try to report a the
22617 diff of a changed base class that got filtered out. Avoid
22618 emitting too many vertical white spaces.
22620 2014-04-17 Dodji Seketeli <dodji@redhat.com>
22622 Simplify SIZE_OR_OFFSET_CHANGE_CATEGORY categorizing
22623 * src/abg-comp-filter.cc (harmful_filter::visit): Now that
22624 type_size_changed is correctly geared to not be fulled by
22625 decl-only classes, there is no need for its caller to handle that
22626 case. And data_member_offset_changed ain't affected by decl-only
22627 classes anyway. So the code is now much simpler.
22629 2014-04-17 Dodji Seketeli <dodji@redhat.com>
22631 Fix API doc for static_data_member_type_size_changed
22632 * src/abg-comp-filter.cc (static_data_member_type_size_changed):
22633 Fix API doc comment.
22635 2014-04-17 Dodji Seketeli <dodji@redhat.com>
22637 Don't blindly drop DIEs defined in the scope of a function
22638 * src/abg-dwarf-reader.cc (get_scope_for_die): Do not drop a DIE
22639 on the floor just because it is in the scope of a function. We
22640 were dropping a function parameter because its type is a typedef
22641 defined right before the parameter, in the scope of the function.
22642 Urgh. So with this change, that function parameter is not dropped
22643 anymore. I have seen that happening in a DWARF generated by GCC
22644 4.7.1 on libstdc++.so. Hard to come up with a regression test
22647 2014-04-17 Dodji Seketeli <dodji@redhat.com>
22649 Useless code killing
22650 * src/abg-comparison.cc (decls_equal::operator()(const decls_type,
22651 const decls_type)): Kill dead code. Note that there is a proper
22652 equality operator for decl_base_sptr already.
22654 2014-04-17 Dodji Seketeli <dodji@redhat.com>
22656 File static data member changes in STATIC_DATA_MEMBER_CHANGE_CATEGORY
22657 * include/abg-comparison.h
22658 (diff_category::STATIC_DATA_MEMBER_CHANGE_CATEGORY): New category.
22659 (diff_category::EVERYTHING_CATEGORY): Update
22660 * src/abg-comp-filter.cc (static_data_member_type_size_changed)
22661 (static_data_member_added_or_removed): Define new static
22663 (harmless_filter::visit): Categorize changes to static data
22664 members as STATIC_DATA_MEMBER_CHANGE_CATEGORY.
22665 * tools/bidiff.cc (set_diff_context_from_opts):
22666 STATIC_DATA_MEMBER_CHANGE_CATEGORY is falls into the harmless
22668 * tests/data/test-diff-filter/test12-report.txt: New test input.
22669 * tests/data/test-diff-filter/test12-v0.cc: Likewise.
22670 * tests/data/test-diff-filter/test12-v0.o: Likewise.
22671 * tests/data/test-diff-filter/test12-v1.cc: Likewise.
22672 * tests/data/test-diff-filter/test12-v1.o: Likewise.
22673 * tools/bidiff.cc: Run this test with the additional input data
22675 * tests/Makefile.am: Adjust.
22677 2014-04-17 Dodji Seketeli <dodji@redhat.com>
22679 Fix typo in comments
22680 * include/abg-comparison.h
22681 (diff_category::NON_VIRT_MEM_FUN_CHANGE_CATEGORY): Fix typo in
22684 2014-04-17 Dodji Seketeli <dodji@redhat.com>
22686 Only non-static data member changes are SIZE_OR_OFFSET_CHANGE_CATEGORY
22687 * src/abg-comp-filter.cc
22688 (non_static_data_member_type_size_changed): Renamed
22689 data_member_offset_changed into this. Make sure the test detects
22690 changes on *non-static* data members only.
22691 (non_static_data_member_added_or_removed): Likewise for
22692 data_member_offset_changed that got renamed into this.
22693 (harmful_filter::visit): Adjust.
22695 2014-04-17 Dodji Seketeli <dodji@redhat.com>
22697 Fix comments in categorization code
22698 * src/abg-comp-filter.cc (data_member_added_or_removed): Fix
22701 2014-04-16 Dodji Seketeli <dodji@redhat.com>
22703 Really detect static-ness of data members. Oops.
22704 * src/abg-dwarf-reader.cc (build_class_type_and_add_to_ir): Let's
22705 consider that a data member being not laid out (i.e, not having a
22706 data_member_location) is is a static data member. Otherwise, we
22707 were not detecting static data members at all. Well we were only
22708 inferring their presence from seeing the static variable
22709 definition later on. That means we were missing most of the
22710 static variables. Woops.
22711 * src/abg-comparison.cc
22712 (corpus_diff::priv::ensure_lookup_tables_populated): Now that we
22713 are really seeing static data members, let's be prepare to the
22714 fact that we can the same static data member being declared
22715 several times in a corpus.
22716 * tests/data/test-diff-dwarf/test7-report.txt: New test input file.
22717 * tests/data/test-diff-dwarf/test7-v0.cc: Likewise.
22718 * tests/data/test-diff-dwarf/test7-v0.o: Likewise.
22719 * tests/data/test-diff-dwarf/test7-v1.cc: Likewise.
22720 * tests/data/test-diff-dwarf/test7-v1.o: Likewise.
22721 * tests/test-diff-dwarf.cc: Update this to consume the new test
22723 * tests/Makefile.am: Update this to add the missing test files to
22724 the source distribution.
22726 2014-04-16 Dodji Seketeli <dodji@redhat.com>
22728 Add dumping routines for declaration location
22729 * include/abg-fwd.h (get_global_scope()): New overload for const
22730 decl_base&. Move the other overloads up in the file.
22731 (get_translation_unit): Add an overload for decl_base&. Constify
22733 (dump_decl_location): Declare new functions.
22734 * src/abg-ir.cc (get_global_scope): Define the overload for const
22735 decl_base&. Write the other overloads in terms of this one.
22736 (get_translation_unit): Likewise, define the overload for const
22737 decl_base&. Write the other overloads in terms of this one.
22738 (dump_decl_location): Define these new overloads.
22740 2014-04-16 Dodji Seketeli <dodji@redhat.com>
22742 Fix dumping function to make them use generic ostream
22743 * src/abg-writer.cc (dump(const decl_base_sptr, std::ostream&)):
22744 Do not dump the content to cerr here. Rather dump to the output
22745 stream given in parameter. Oops.
22746 (dump(const translation_unit&, std::ostream&)): Likewise.
22748 2014-04-16 Dodji Seketeli <dodji@redhat.com>
22751 * src/abg-ir.cc (get_translation_unit): Remove useless vertical
22753 (is_global_scope): Add missing API doc.
22755 2014-04-16 Dodji Seketeli <dodji@redhat.com>
22757 A virt mem fn deleted and added to the same offset is not harmful
22758 * src/abg-comp-filter.cc (has_virtual_mem_fn_change): A virtual
22759 member that gets deleted and added back again to the same vtable
22760 offset is not considered as being a virtual member function change
22761 suitable for VIRTUAL_MEMBER_CHANGE_CATEGORY. Likewise for a
22762 function sub-type change not involving a change in the vtable
22765 2014-04-16 Dodji Seketeli <dodji@redhat.com>
22767 Do not categorize size/offset changes when a decl-only class is involved
22768 * src/abg-comp-filter.cc (there_is_a_decl_only_class)
22769 (diff_involves_decl_only_class): New static functions.
22770 (type_size_changed, data_member_added_or_removed)
22771 (has_virtual_mem_fn_change, has_non_virtual_mem_fn_change): Bail
22772 out if one of the types involved is a decl-only class.
22774 2014-04-16 Dodji Seketeli <dodji@redhat.com>
22776 Work around "mangled name vanishing from one version of mem fn decl" bug
22777 * src/abg-comparison.cc
22778 (class_diff::ensure_lookup_tables_populated): If the first version
22779 of the member function decl doesn't have a mangled name while the
22780 second has it, try the lookups using the pretty representation of
22783 2014-04-16 Dodji Seketeli <dodji@redhat.com>
22785 Do not try to represent the offset for a static data member
22786 * src/abg-comparison.cc (represent_data_member(var_decl_sptr,
22787 ostream&)): If the data member is static, do not try to represent
22790 2014-04-16 Dodji Seketeli <dodji@redhat.com>
22792 A static data member shouldn't be checked for having been laid out
22793 * src/abg-comparison.cc (represent_data_member(var_decl_sptr,
22794 ostream&)): If the data member is static do not check for it
22795 having been laid out.
22797 2014-04-16 Dodji Seketeli <dodji@redhat.com>
22799 Prefix pretty representation of static data members with 'static'
22800 * src/abg-ir.cc (var_decl::get_pretty_representation): Prefix
22801 pretty representation of static data members with 'static'.
22803 2014-04-16 Dodji Seketeli <dodji@redhat.com>
22805 Provide a robust way of getting the size of a qualified type
22806 * include/abg-ir.h (qualified_type_def::get_size_in_bits): Declare
22807 new member function ...
22808 * src/abg-ir.cc (qualified_type_def::get_size_in_bits): ... and
22809 define it. Keep in mind that some times the size of the
22810 underlying type can change between the moment the qualified type
22811 is created and the end of its life time. That is because a
22812 subsequent DIE (from DWARF) can alter the size of the underlying
22813 type. This overload allows the user to always query the size of
22814 the underlying type and keep the size of the qualified type in
22817 2014-04-16 Dodji Seketeli <dodji@redhat.com>
22819 Add an assert to the pointer diff reporting code
22820 * src/abg-comparison.cc (pointer_diff::report): If the pointer
22821 diff node is deemed to be reported then the underlying diff node
22822 should be reported as well.
22824 2014-04-16 Dodji Seketeli <dodji@redhat.com>
22826 Little style adjustment in diff node categorization code
22827 * src/abg-comp-filter.cc (harmful_filter::visit): Factorize the
22828 categorization into SIZE_OR_OFFSET_CHANGE_CATEGORY for data member
22829 adding or removal and for data member type size change.
22831 2014-04-15 Dodji Seketeli <dodji@redhat.com>
22833 If a diff node is in NO_CHANGE_CATEGORY do not report it anymore
22834 * src/abg-comparison.cc (diff::is_filtered_out): Now that we seem
22835 to be flagging every changes to a class into a category, we do not
22836 need to dive into reporting a diff not that is categorized as
22837 NO_CHANGE_CATEGORY anymore. So let's have the implementation that
22838 one would expect for this function.
22840 2014-04-15 Dodji Seketeli <dodji@redhat.com>
22842 Categorize changes to virt mem fncts as VIRTUAL_MEMBER_CHANGE_CATEGORY
22843 * src/abg-comp-filter.cc (has_virtual_mem_fn_change): New static
22845 (harmful_filter): Categorize changes to virtual member functions
22846 into VIRTUAL_MEMBER_CHANGE_CATEGORY.
22847 * src/abg-comparison.cc
22848 (class_diff::priv::count_filtered_changed_dm): Move this up, right
22849 after class_diff::priv::count_filtered_subtype_changed_dm.
22850 (SKIP_MEM_FN_IF_VIRTUALITY_DISALLOWED): New macro.
22851 (class_diff::priv::count_filtered_{changed, inserted,
22852 deleted}_mem_fns): Modify these to properly take member function
22853 virtual-ness in account.
22855 2014-04-15 Dodji Seketeli <dodji@redhat.com>
22857 Do not hash non-virtual member functions when hashing a class
22858 * src/abg-hash.cc (class_decl::hash::operator): Do not hash
22859 non-virtual member functions.
22861 2014-04-15 Dodji Seketeli <dodji@redhat.com>
22863 Fix a missing new line in the reports
22864 * src/abg-comparison.cc (represent(class_decl::method_decl_sptr,
22865 ostream&)): Add a missing new line.
22866 * tests/data/test-bidiff/test-struct1-report.txt: Adjust.
22868 2014-04-14 Dodji Seketeli <dodji@redhat.com>
22870 Add more pretty printing facilities
22871 * include/abg-comparison.h (get_pretty_representation(diff*)):
22872 Declare new function.
22873 * include/abg-fwd.h (get_pretty_representation): Declare functions
22874 for decl_base*, type_base*, decl_base_sptr and type_base_sptr.
22875 * src/abg-comparison.cc (get_pretty_representation): Implement
22877 * src/abg-ir.cc (get_pretty_representation): Define
22878 implementations for decl_base*, type_base*, decl_base_sptr and
22881 2014-04-14 Dodji Seketeli <dodji@redhat.com>
22883 Don't compare non-virtual member functions in class comparison
22884 * src/abg-comparison.cc
22885 (class_diff::ensure_lookup_tables_populated): Use the virtual
22886 member functions here, not the member functions in general.
22887 (compute_diff): Consider virtual member functions only, not
22889 * src/abg-ir.cc (class_decl::operator==): Do not compare
22890 non-virtual member functions. Only compare virtual member
22892 * tests/data/test-bidiff/test-struct1-report.txt: New test input.
22893 * tests/data/test-diff-dwarf/test0-report.txt: New test input.
22894 * tests/data/test-diff-filter/test0-report.txt: New test input.
22895 * tests/data/test-diff-filter/test01-report.txt: New test input.
22896 * tests/data/test-diff-filter/test10-report.txt: New test input.
22897 * tests/data/test-diff-filter/test11-report.txt: New test input.
22898 * tests/data/test-diff-filter/test2-report.txt: New test input.
22899 * tests/data/test-diff-filter/test9-report.txt: New test input.
22901 2014-04-14 Dodji Seketeli <dodji@redhat.com>
22903 Recognize virtual member functions better and store them appart
22904 * include/abg-fwd.h (set_member_function_is_virtual): Declare new
22906 * include/abg-ir.h (class class_decl): Declare
22907 set_member_function_is_virtual and member_function_is_virtual as
22908 friends of class_decl.
22909 (class_decl::add_member_function): Take an is_virtual flag.
22910 (class_decl::get_num_virtual_functions): Remove.
22911 (class_decl::get_virtual_mem_fns): New member function.
22912 (mem_fn_context_rel::is_virtual_): New member.
22913 (mem_fn_context_rel::mem_fn_context_rel): Adjust to initialize the
22914 new is_virtual_ member.
22915 (mem_fn_context_rel::is_virtual): New member functions.
22916 * src/abg-comparison.cc (represent): Adjust.
22917 * src/abg-dwarf-reader.cc (build_class_type_and_add_to_ir): Adjust.
22918 * src/abg-ir.cc (member_function_is_virtual): Change this to use
22919 mem_fn_context_rel::is_virtual.
22920 (set_member_function_is_virtual): Define this new function.
22921 (class_decl::priv::virtual_mem_fns_): New member to hold virtual
22923 (class_decl::get_virtual_mem_fns): Implement this member function.
22924 (class_decl::get_num_virtual_functions): Remove.
22925 (class_decl::add_member_function): Take a new is_virtual flag.
22926 Add virtual member functions to
22927 class_decl::priv::virtual_mem_fns_.
22928 * src/abg-reader.cc (build_class_decl): Adjust.
22930 2014-04-13 Dodji Seketeli <dodji@redhat.com>
22932 Filter non-virtual member fns insertions/deletions from class changes
22933 * include/abg-fwd.h (member_function_is_virtual): Declare new
22935 * include/abg-comparison.h
22936 (diff_category::{NON_VIRT_MEM_FUN_CHANGE_CATEGORY,
22937 VIRTUAL_MEMBER_CHANGE_CATEGORY}): New enumerators.
22938 (diff_category::EVERYTHING_CATEGORY): Adjust.
22939 (class_diff::{changed, deleted, inserted}_member_fns): Declare new
22941 * src/abg-comp-filter.cc (data_member_added_or_removed): Add
22943 (has_non_virtual_mem_fn_change): New static predicate function.
22944 (harmless_filter::visit): Categorize non-virtual member function
22945 changes in a diff into NON_VIRT_MEM_FUN_CHANGE_CATEGORY.
22946 * src/abg-comparison.cc
22947 (TRAVERSE_MEM_FN_DIFF_NODE_AND_PROPAGATE_CATEGORY): New macro.
22948 (report_mem_header): Count filtered functions for added/deleted
22950 (class_diff::priv::count_filtered_changed_mem_fns): Renamed
22951 priv::count_filtered_member_functions into this. Filter out
22952 changes to non-virtual member functions here.
22953 (class_diff::priv::count_filtered_{inserted, deleted}_mem_fns):
22954 New member functions.
22955 (class_diff::{deleted, inserted, changed}_member_fns): Define new
22957 (class_diff::report): Adjust count for filtered inserted/deleted
22958 member functions. Do not report NON_VIRT_MEM_FUN_CHANGE_CATEGORY
22959 if it's disallowed.
22960 (class_diff::traverse): Propagate only
22961 VIRTUAL_MEMBER_CHANGE_CATEGORY from member functions to their
22963 * src/abg-ir.cc (member_function_is_virtual): Define new
22965 * tools/bidiff.cc (set_diff_context_from_opts): Adjust to add
22966 NON_VIRT_MEM_FUN_CHANGE_CATEGORY into the harmless group and
22967 VIRTUAL_MEMBER_CHANGE_CATEGORY into the harmful one.
22968 * tests/data/test-diff-filter/test0-report.txt: New test input.
22969 * tests/data/test-diff-filter/test10-report.txt: Likewise.
22970 * tests/data/test-diff-filter/test10-v0.cc: Likewise.
22971 * tests/data/test-diff-filter/test10-v0.o: Likewise.
22972 * tests/data/test-diff-filter/test10-v1.cc: Likewise.
22973 * tests/data/test-diff-filter/test10-v1.o: Likewise.
22974 * tests/data/test-diff-filter/test11-report.txt: Likewise.
22975 * tests/data/test-diff-filter/test11-v0.cc: Likewise.
22976 * tests/data/test-diff-filter/test11-v0.o: Likewise.
22977 * tests/data/test-diff-filter/test11-v1.cc: Likewise.
22978 * tests/data/test-diff-filter/test11-v1.o: Likewise.
22979 * tests/data/test-diff-filter/test2-report.txt: Likewise.
22980 * tests/data/test-diff-filter/test9-report.txt: Likewise.
22981 * tests/data/test-diff-filter/test9-v0.cc: Likewise.
22982 * tests/data/test-diff-filter/test9-v0.o: Likewise.
22983 * tests/data/test-diff-filter/test9-v1.cc: Likewise.
22984 * tests/data/test-diff-filter/test9-v1.o: Likewise.
22985 * tests/test-diff-filter.cc: Consume the test input above to run
22988 2014-04-13 Dodji Seketeli <dodji@redhat.com>
22990 Make class_decl pimpl and harden comparison infloop prevention
22991 * include/abg-ir.h (class_decl::{priv}): New private data member.
22992 (class_decl::{get_is_declaration_only, set_is_declaration_only,
22993 is_struct, get_definition_of_declaration, get_earlier_declaration,
22994 add_base_specifier, get_base_specifiers, get_member_types,
22995 get_data_members, get_member_functions,
22996 get_member_function_templates, get_member_class_templates}): Move
22997 these methods out-of-line.
22998 (class_decl::{comparison_started_,
22999 declaration_,is_declaration_only_, definition_of_declaration,
23000 is_struct_, bases_, member_types_, data_members_,
23001 member_functions_, member_function_template,
23002 member_class_templates_}): Move these data members into the pimpl
23005 (class_decl::priv::{declaration_,is_declaration_only_,
23006 definition_of_declaration, is_struct_, bases_, member_types_,
23007 data_members_, member_functions_, member_function_template,
23008 member_class_templates_}): ... here.
23009 (class_decl::priv::classes_being_compared_): New data member.
23010 (class_decl::priv::priv): Initialize the data members.
23011 (class_decl::priv::{mark_as_being_compared,
23012 unmark_as_being_compared, comparison_started): New methods.
23013 (class_decl::{get_is_declaration_only, set_is_declaration_only,
23014 is_struct, get_definition_of_declaration, add_base_specifier,
23015 get_base_specifiers, get_member_types, get_data_members,
23016 get_member_functions, get_member_function_templates,
23017 get_member_class_templates}): Move these out-of-line in here.
23018 (class_decl::{class_decl, set_definition_of_declaration,
23019 set_earlier_declaration, insert_member_type, add_member_type,
23020 add_data_member, add_member_function,
23021 add_member_function_template, add_member_class_template,
23022 has_no_base_nor_member}): Adjust.
23023 (class_decl::operator==): Harden inf-loop prevention during class
23024 comparison using the new priv::mark/unmark_as_being_compared()
23025 functions. Now comparison of a class really compares member
23026 functions again. And it is *slooow*. I should probably change
23027 this to compare only virtual member functions. But at least this
23028 should be correct and robust for now.
23029 * tests/data/test-diff-filter/test0-report.txt: Adjust.
23030 * test01-report.txt: Adjust.
23032 2014-04-11 Dodji Seketeli <dodji@redhat.com>
23034 Remove the parent member of the diff node
23035 * include/abg-comparison.h (diff::parent_): Remove.
23036 (diff::diff): Adjust.
23037 (diff::{get, set}_parent): Remove.
23038 * src/abg-comp-filter.cc (harmless_filter::visit): Remove category
23039 propagation to the parent.
23041 2014-04-11 Dodji Seketeli <dodji@redhat.com>
23043 Update the decl_base copy constructor for forgotten members
23044 * src/abg-ir.cc (decl_base::decl_base): Copy forgotten decl_base
23045 members hashing_started_, qualified_parent_name_, qualified_name_.
23047 2014-04-11 Dodji Seketeli <dodji@redhat.com>
23049 Comment fix in filtering code
23050 * src/abg-comp-filter.cc (harmful_filter::visit): Fix comment
23053 2014-04-11 Dodji Seketeli <dodji@redhat.com>
23055 Put data member type size changes in SIZE_OR_OFFSET_CHANGE_CATEGORY
23056 * src/abg-comp-filter.cc (type_size_changed): New overload for
23058 (data_member_type_size_changed): New predicate.
23059 (harmful_filter::visit): Use the new predicate to categorize data
23060 member type size changes into the SIZE_OR_OFFSET_CHANGE_CATEGORY.
23062 2014-04-11 Dodji Seketeli <dodji@redhat.com>
23064 Represent a removed+added data member at a given offset as changed
23065 * include/abg-fwd.h (get_data_member_offset): Declare new overload for
23067 * include/abg-comparison.h (unsigned_decl_base_sptr_map)
23068 (unsigned_changed_type_or_decl_map): New typedefs.
23069 * src/abg-ir.cc (get_data_member_offset): Define new overload for decl_base_sptr.
23070 * src/abg-comparison.cc (diff_kind::subtype_change_kind): New
23071 enumerator for a change about a type or sub-type of a member of a
23073 (report_mem_header): Handle the new enumerator above.
23074 (class_diff::priv::{deleted_dm_by_offset_, inserted_dm_by_offset_,
23075 changed_dm_}): New data members.
23076 (class_diff::priv::subtype_changed_dm_): Renamed
23077 class_diff::priv::changed_data_members_ into this.
23078 (class_diff::priv::subtype_changed_dm): Renamed
23079 class_diff::priv::data_member_has_changed into this. Adjust.
23080 (class_diff::count_filtered_subtype_changed_dm): Renamed
23081 count_filtered_data_members into this. Adjust.
23082 (class_diff::priv::count_filtered_changed_dm): New member
23084 (class_diff::lookup_tables_empty): Adjust.
23085 (class_diff::ensure_lookup_tables_populated): Adjust. Detect when
23086 a data member is deleted and added back to offset N, and be
23087 prepared to present that as a change of data member at offset N.
23088 (class_diff::report): Adjust. Report data members of a given
23089 offset that have changed.
23090 * tests/data/test-diff-dwarf/test6-report.txt: New reference
23091 report for new test input.
23092 * tests/data/test-diff-dwarf/test6-v0.cc: Source code for new test
23094 * tests/data/test-diff-dwarf/test6-v0.o: New test input binary.
23095 * tests/data/test-diff-dwarf/test6-v1.cc: Source code for new test
23097 * tests/data/test-diff-dwarf/test6-v1.o: New test input binary.
23098 * tests/test-diff-dwarf.cc: Adjust to include the new test inputs above.
23100 2014-04-11 Dodji Seketeli <dodji@redhat.com>
23102 Unmark class_diff node as being traversed once traversal is finished
23103 * src/abg-comparison.cc (class_diff:traverse): Unmark class_diff
23104 node as being traversed once traversal is finished
23106 2014-04-11 Dodji Seketeli <dodji@redhat.com>
23108 Do not use the parent diff node link for category propagation
23109 * src/abg-comparison.cc (class_diff::traverse): Use the new
23110 TRAVERSE_MEM_DIFF_NODE_AND_PROPAGATE_CATEGORY macro to propagate
23111 categorization from the children diff nodes to the current one for
23112 bases, data members and member functions.
23113 (scope_diff::traverse): Likewise, use the
23114 TRAVERSE_DIFF_NODE_AND_PROPAGATE_CATEGORY to propagate
23115 categorization from the children diff nodes to the current one.
23117 2014-04-11 Dodji Seketeli <dodji@redhat.com>
23119 Ensure that each diff node is traversed just once
23120 * include/abg-comparison.cc (pointer_map): New typedef.
23121 (diff_context::{has_diff_for}): New overload for diff*.
23122 (diff_context::{diff_has_been_traversed, mark_diff_as_traversed,
23123 forget_traversed_diffs}): Declare new methods.
23124 * src/abg-comparison.cc (ENSURE_DIFF_NODE_TRAVERSED_ONCE)
23125 (ENSURE_MEM_DIFF_NODE_TRAVERSED_ONCE): Define new macros.
23126 (diff_context::priv::traversed_diff_nodes_): New data member.
23127 (diff_context::has_diff_for): New overload for diff*
23128 (diff_context::{diff_has_been_traversed, mark_diff_as_traversed,
23129 forget_traversed_diffs}): Define new member functions.
23130 (diff_context::maybe_apply_filters): Forget the traversed diffs
23131 before applying a filter.
23132 ({distinct_diff, var_diff, pointer_diff, reference_diff,
23133 qualified_type_diff, enum_diff, class_diff, base_diff, scope_diff,
23134 function_decl_diff, type_decl_diff, typedef_diff,
23135 translation_unit_diff}::traverse): Ensure that the diff node is
23136 traversed only once.
23138 2014-04-11 Dodji Seketeli <dodji@redhat.com>
23140 Factorize diff sub-tree traversal and category propagation code
23141 * src/abg-comparison.cc
23142 (TRAVERSE_DIFF_NODE_AND_PROPAGATE_CATEGORY)
23143 (TRAVERSE_MEM_DIFF_NODE_AND_PROPAGATE_CATEGORY): New macros.
23144 ({distinct_diff, pointer_diff, reference_diff,
23145 qualified_type_diff, enum_diff, base_diff, function_decl_diff,
23146 typedef_diff}::traverse): Use the new macro above in lieu of the
23147 duplicated sub-tree traversal code in there.
23149 2014-04-11 Dodji Seketeli <dodji@redhat.com>
23151 Style fixes in the diff nodes traversing code
23152 * src/abg-comparison.cc (TRY_{PRE, PRO}_VISIT, TRY_{PRE,
23153 PRO}_VISIT_CLASS_DIFF, ): Add a white space.
23155 2014-04-10 Dodji Seketeli <dodji@redhat.com>
23157 Supporting reporting data member name change
23158 * src/abg-comparison.cc (represent): Support reporting data member
23161 2014-04-10 Dodji Seketeli <dodji@redhat.com>
23163 Consider added/removed data members as changing size or offset
23164 * src/abg-comp-filter.cc (data_member_added_or_removed): New
23166 (harmless_filter::visit): Re-organize logic. Categorize data
23167 member addition/removal into SIZE_OR_OFFSET_CHANGE_CATEGORY.
23169 2014-04-10 Dodji Seketeli <dodji@redhat.com>
23171 Add missing comment
23172 * src/abg-ir.cc (non_type_tparameter::get_hash): Add missing api doc.
23174 2014-04-09 Dodji Seketeli <dodji@redhat.com>
23176 Fix and add missing hashing through the virtual decl_base::get_hash
23177 * include/abg-ir.h (struct {scope_decl, non_type_tparameter,
23178 type_composition, class_decl}::hash): Declare hashers.
23179 ({scope_decl, var_decl, non_type_tparameter, type_composition,
23180 class_decl}::get_hash): Provide new overloads of the get_hash.
23181 * src/abg-hash.cc ({type_decl, scope_type_decl,
23182 qualified_type_def, pointer_type_def, reference_type_def,
23183 enum_type_decl, typedef_decl, var_decl,
23184 function_decl}::hash::operator()): If the hash is being
23185 calculated, do not use the not-yet fully calculated hash value.
23186 Rather, calculate the hash, cache it and return the value.
23187 ({class_decl, non_type_tparameter}::hash::operator()): Moved the
23188 {class_decl, non_type_tparameter}::hash declaration out of here
23189 and stick it in include/abg-ir.h. Keep the definition of the
23190 hashing operators here though.
23191 (type_composition::hash::operator()): New operator definition.
23192 * src/abg-ir.cc ({scope_decl, var_decl, class_decl,
23193 non_type_tparameter, type_composition}::get_hash): Define new
23196 2014-04-08 Dodji Seketeli <dodji@redhat.com>
23198 Fix mis-hashing of base specifiers and function_decl during comparison
23199 * include/abg-ir.h (function_decl::get_hash): Declare new virtual
23201 * src/abg-hash.cc (class_decl::base_spec::hash::operator()):
23202 Properly hash the base specifier so that it doesn't collide with
23204 * src/abg-ir.cc (decl_base::get_hash): Abort if we detect a
23205 missing overload for this;
23206 (function_decl::get_hash() const): Implement this missing
23207 overload, allowing using the virtual decl_base::get_hash for
23210 2014-04-08 Dodji Seketeli <dodji@redhat.com>
23212 Properly place opening quote and add missing closing quote in report
23213 * src/abg-comparison.cc (corpus_diff::report): Move the [{A,D}]
23214 marker before the opening quote. And add a closing quote.
23215 * tests/data/test-diff-dwarf/test0-report.txt: Adjust.
23216 * tests/data/test-diff-filter/test0-report.txt: Adjust.
23217 * tests/data/test-diff-filter/test01-report.txt: Adjust.
23218 * tests/data/test-diff-filter/test2-report.txt: Adjust.
23220 2014-04-08 Dodji Seketeli <dodji@redhat.com>
23222 Drive-by indentation fix
23223 * src/abg-dwarf-reader.cc (build_ir_node_from_die): Fix
23226 2014-04-08 Dodji Seketeli <dodji@redhat.com>
23228 Drop ABI artifacts that are local to a function
23229 * src/abg-dwarf-reader.cc (get_scope_for_die): If the parent die
23230 is DW_TAG_subprogram then just drop the whole thing on the floor.
23231 (build_ir_node_from_die): When the scope is NULL, just drop the
23232 whole thing on the floor.
23234 2014-04-08 Dodji Seketeli <dodji@redhat.com>
23236 Fix the static data member recognition hack
23237 * src/abg-dwarf-reader.cc (build_translation_unit_and_add_to_ir):
23238 When trying to recognize the global var_decl as being definition
23239 variables for static data members, lookup the declaration for the
23240 data member in the relevant class. If found, then just flag the
23241 var_decl for the data member as being static; no need to add a
23242 var_decl as data member in that case, that would duplicate the
23245 2014-04-08 Dodji Seketeli <dodji@redhat.com>
23247 Fix looking up a node inside a class
23248 * src/abg-ir.cc (lookup_node_in_scope): Do not forget to actually
23249 look at the class members. Sigh.
23251 2014-04-07 Dodji Seketeli <dodji@redhat.com>
23253 Work around old dwarf producers forgetting mangled names for functions
23254 * src/abg-comparison.cc
23255 (corpus_diff::priv::ensure_lookup_tables_populated): If lookup
23256 using mangled name for a deleted function yields nada, try the
23257 lookup with the pretty representation for the function.
23259 2014-04-07 Dodji Seketeli <dodji@redhat.com>
23261 Make type_base::get_{size,alignment}_in_bits virtual
23262 * include/abg-ir.h (type_base::get_{size,alignment}_in_bits): Make
23264 (typedef_decl::get_{size,alignment}_in_bits): Add new member
23265 functions. Get the size,alignment from the underlying type and
23266 update the current size/alignment if they differ. Keep in mind
23267 that the size of an underlying class_decl can change over its
23268 lifetime, given how the dwarf reader reads the type information,
23269 i.e, there can be a DIE for a class type with no size information
23270 that will lead to the creation of a class_decl with size zero.
23271 Later during the DWARF reading process, another DIE will
23272 supplement the type information, adding size information to that
23273 class_decl. In between, a typedef_decl might have been created
23274 with the first version of the class_decl that has a zero size. I
23275 guess this should be extended to the other type constructs that
23276 have an underlying type (qualified types, references and pointers).
23278 2014-04-07 Dodji Seketeli <dodji@redhat.com>
23280 Look through typedefs when setting SIZE_OR_OFFSET_CHANGE_CATEGORY
23281 * include/abg-fwd.h (is_class_type): Declare new functions.
23282 * src/abg-comp-filter.cc (harmful_filter::visit): Use the above to
23283 convert a type into a class.
23284 * src/abg-ir.cc (is_class_type): Define the new function.
23286 2014-04-06 Dodji Seketeli <dodji@redhat.com>
23288 Add a new DECL_NAME_CHANGE_CATEGORY change category
23289 * include/abg-comparison.h (enum
23290 diff_category::DECL_NAME_CHANGE_CATEGORY): New enumerator.
23291 * src/abg-comparison.cc (report_name_size_and_alignment_changes)
23292 ({enum, typedef}_diff::report): Adjust to avoid emitting name
23293 change report if the DECL_NAME_CHANGE_CATEGORY category of change
23294 is currently disallowed.
23295 * abg-comp-filter.cc (decl_name_changed): New static function.
23296 (harmless_filter::visit): Detect that the decl name changed and
23297 put the current diff node (and its parents) into the
23298 DECL_NAME_CHANGE_CATEGORY category.
23299 * tools/bidiff.cc (set_diff_context_from_opts): Set the new
23300 DECL_NAME_CHANGE_CATEGORY category into the harmless_changes group
23302 * tests/data/test-diff-filter/test6-report.txt: New test input file.
23303 * tests/data/test-diff-filter/test6-v0.cc: Likewise.
23304 * tests/data/test-diff-filter/test6-v0.o: Likewise.
23305 * tests/data/test-diff-filter/test6-v1.cc: Likewise.
23306 * tests/data/test-diff-filter/test6-v1.o: Likewise.
23307 * tests/data/test-diff-filter/test7-report.txt: Likewise.
23308 * tests/data/test-diff-filter/test7-v0.cc: Likewise.
23309 * tests/data/test-diff-filter/test7-v0.o: Likewise.
23310 * tests/data/test-diff-filter/test7-v1.cc: Likewise.
23311 * tests/data/test-diff-filter/test7-v1.o: Likewise.
23312 * tests/test-diff-filter.cc: Take the new inputs above to run new tests.
23313 * tests/Makefile.am: Add the new files above to the distribution.
23315 2014-04-05 Dodji Seketeli <dodji@redhat.com>
23317 Emit qualified name for typedefs
23318 * src/abg-comparison.cc (typedef_diff::report): Emit qualified
23319 names for typedefs in diff reports about typedef name changes.
23321 2014-04-05 Dodji Seketeli <dodji@redhat.com>
23323 Fix indentation in distinct type diff report
23324 * src/abg-comparison.cc (distinct_diff::report): Do not forget to
23327 2014-04-05 Dodji Seketeli <dodji@redhat.com>
23329 Really compare return types for function types
23330 * src/abg-ir.cc (compare_function_types): Compare return types,
23331 unless this is a method and the return type is the same type as
23332 the containing class type.
23333 * tests/data/test-diff-dwarf/test5-report.txt: Reference report
23334 for the comparison of the two input binaries below.
23335 * tests/data/test-diff-dwarf/test5-v0.cc: Source code for the
23336 input binary below.
23337 * tests/data/test-diff-dwarf/test5-v0.o: Test input binary.
23338 * tests/data/test-diff-dwarf/test5-v1.cc: Source code for the
23339 input binary below.
23340 * tests/data/test-diff-dwarf/test5-v1.o: Test input binary.
23342 2014-04-05 Dodji Seketeli <dodji@redhat.com>
23344 Add missing tests for previous commits
23345 * tests/data/test-diff-dwarf/test4-report.txt: Adjust.
23346 * tests/test-diff-dwarf.cc: Run tests for
23347 data/test-diff-dwarf/test3-report.txt" and
23348 data/test-diff-dwarf/test4-report.txt.
23350 2014-04-05 Dodji Seketeli <dodji@redhat.com>
23352 Categorize through compatible distinct type diffs
23353 * src/abg-comparison.cc (report_size_and_alignment_changes): Split
23354 this static function out of ...
23355 (report_name_size_and_alignment_changes): ... this one.
23356 (distinct_diff::report): If the typedef-stripped variants of the
23357 diff subjects are of the same kind, display their diff.
23358 Otherwise, tell explicitly is the distinct type diff involves a
23360 (distinct_diff::traverse): If the typedef-stripped variants of the
23361 diff subjects are of the same kind, traverse that underlying diff
23362 sub-tree and propagate the categorizing possibly resulting from
23364 * tests/data/test-diff-dwarf/test4-v0.o: New test input binary.
23365 * tests/data/test-diff-dwarf/test4-v0.cc: Source code for the
23366 input binary above.
23367 * tests/data/test-diff-dwarf/test4-v1.o: New test input binary.
23368 * tests/data/test-diff-dwarf/test4-v1.cc: Source code for the
23369 input binary above.
23370 * tests/data/test-diff-dwarf/test4-report.txt: Reference report
23371 for the difference between the two binaries above.
23372 * tests/data/test-diff-filter/test5-v0.o: New test input binary.
23373 * tests/data/test-diff-filter/test5-v0.cc: Source code for the
23374 input binary above.
23375 * tests/data/test-diff-filter/test5-v1.o: New test input binary.
23376 * tests/data/test-diff-filter/test5-v1.cc: Source code for the
23377 input binary above.
23378 * tests/data/test-diff-filter/test5-report.txt: Reference report
23379 for the difference between the two binaries above.
23380 * tests/test-diff-filter.cc: Adjust to produce a filtered diff for
23381 the two input binaries above.
23382 * tests/Makefile.am: Adjust to add missing test files to the
23385 2014-04-04 Dodji Seketeli <dodji@redhat.com>
23387 Slight run-by fixes
23388 * src/abg-comparison.cc
23389 (corpus_diff::priv::apply_filters_and_compute_diff_stats)
23390 (corpus_diff::report): Use compute_diff for types which it has an
23391 overload rather than going through the compute_diff_for_decls that
23392 would use dynamic casting.
23394 2014-04-04 Dodji Seketeli <dodji@redhat.com>
23396 Do not hook type diff nodes to a parent
23397 * abg/comparison.cc (var_diff::var_diff): Do not set parent node
23398 for the type diff of the var_diff.
23399 (var_diff::traverse): Handle category propagation from the
23400 type diff node to the var_diff node.
23401 (pointer_diff::underlying_type_diff)
23402 (reference_diff::underlying_type_diff)
23403 (qualified_type_diff::underlying_type_diff, enum_diff::enum_diff)
23404 (base_diff::get_underlying_class_diff)
23405 (typedef_diff::underlying_type_diff): Do not set the parent node
23407 ({pointer_diff, reference_diff, qualified_type, enum_diff,
23408 class_diff, base_diff, function_decl_diff,
23409 typedef_diff}::traverse): Handle category propagation here.
23410 * tests/data/test-diff-filter/test4-v0.o: New input binary.
23411 * tests/data/test-diff-filter/test4-v0.cc: Source code for the
23412 input binary above.
23413 * tests/data/test-diff-filter/test4-v1.o: New input binary.
23414 * tests/data/test-diff-filter/test4-v1.cc: Source code for the
23415 input binary above.
23416 * tests/data/test-diff-filter/test4-report.txt: Reference diff
23417 report for the input binaries above.
23418 * tests/test-diff-filter.cc:: Run bidiff --no-harmless on the
23421 2014-04-04 Dodji Seketeli <dodji@redhat.com>
23423 Fix off-by one comparison bug in comparing function parameters
23424 * src/abg-comparison.cc
23425 (function_decl_diff::ensure_lookup_tables_populated): Function
23426 parameters that are diff'ed start at the first non-implicit
23427 parameter, not at the first parameter. Oops.
23428 * tests/data/test-diff-dwarf/test3-v0.o: New test input binary.
23429 * tests/data/test-diff-dwarf/test3-v0.cc: Source code for the
23431 * tests/data/test-diff-dwarf/test3-v1.o: New test input binary.
23432 * tests/data/test-diff-dwarf/test3-v1.cc: Source code for the
23434 * tests/data/test-diff-dwarf/test3-report.txt: Reference report
23435 for the diff of the new test inputs.
23436 * tests/test-diff-dwarf.cc: Use the test inputs above to run new
23439 2014-04-03 Dodji Seketeli <dodji@redhat.com>
23441 Do not forget parm sub-type changes as opposed to parm changes
23442 * src/abg-comparison.cc
23443 (function_decl_diff::ensure_lookup_tables_populated): A parm
23444 change is valid only when the added parm has a different name from
23445 the removed parm. Both have the same index, of course. In that
23446 case, do not try to remove the corresponding parm sub-type change.
23447 * tests/data/test-bidiff/test-enum0-report.txt: Adjust.
23448 * tests/data/test-bidiff/test-enum1-report.txt: Adjust.
23449 * tests/data/test-bidiff/test-qual-type0-report.txt: Adjust.
23450 * tests/data/test-bidiff/test-struct0-report.txt: Adjust.
23451 * tests/data/test-diff-dwarf/test0-report.txt: Adjust.
23452 * tests/data/test-diff-dwarf/test1-report.txt: Adjust.
23453 * tests/data/test-diff-filter/test0-report.txt: Adjust.
23454 * tests/data/test-diff-filter/test01-report.txt: Adjust.
23455 * tests/data/test-diff-filter/test1-report.txt: Adjust.
23456 * tests/data/test-diff-filter/test2-report.txt: Adjust.
23457 * tests/data/test-diff-filter/test3-report.txt: Adjust.
23459 2014-04-03 Dodji Seketeli <dodji@redhat.com>
23461 Remove useless white space
23462 * src/abg-ir.cc (look_through_decl_only_class): Remove useless
23465 2014-04-02 Dodji Seketeli <dodji@redhat.com>
23467 Use mangled name for decl comparison when it's present
23468 * src/abg-ir.cc (decl_base::operator==(const decl_base& other)
23469 const): Use the mangled name of the decl in priority.
23470 * src/abg-hash.cc (struct decl_base::hash::operator()): Likewise.
23471 * src/abg-comparison.cc (function_decl_diff::report): Do not
23472 report a function name change if it doesn't involve a mangled name
23473 change. This might change when we start dealing with templates.
23475 2014-04-02 Dodji Seketeli <dodji@redhat.com>
23477 A change involving a decl-only class is not SIZE_OR_OFFSET_CHANGE_CATEGORY
23478 * src/abg-comp-filter.cc (harmful_filter::visit): If a size change
23479 involves a decl-only class, it certainly shouldn't trigger putting
23480 the sub-tree into the SIZE_OR_OFFSET_CHANGE_CATEGORY category.
23482 2014-04-02 Dodji Seketeli <dodji@redhat.com>
23484 Fix heuristics to detect function static-ness for DWARF < 3
23485 * src/abg-dwarf-reader.cc (build_class_type_and_add_to_ir): Make
23486 the heuristics work for functions with no parameters.
23488 2014-04-02 Dodji Seketeli <dodji@redhat.com>
23490 Avoid emitting local filtered-out changes in more spots
23491 * src/abg-comparison.cc (maybe_report_diff_for_member): Take the
23492 diff_context in parameter. Use that to check if local changes of
23493 category ACCESS_CHANGE_CATEGORY are filtered-out and do not report
23494 the change in that case.
23495 ({var_diff, enum_diff, class_diff, base_diff,
23496 function_decl_diff}::report): Adjust.
23498 2014-04-02 Dodji Seketeli <dodji@redhat.com>
23500 Add a COMPATIBLE_TYPE_CHANGE_CATEGORY to bidiff --no-harmless
23501 * include/abg-comparison.h
23502 (diff_category::COMPATIBLE_TYPE_CHANGE_CATEGORY): New enumerator.
23503 (operator|=(diff_category&, diff_category)): New declaration.
23504 * include/abg-fwd.h (is_typedef, strip_typedef)
23505 (types_are_compatible): New declarations.
23506 * include/abg-ir.h (operator==(const decl_base_sptr, const
23507 decl_base_sptr)): Added the consts here.
23508 (operator==(const type_base_sptr, const type_base_sptr)): New
23510 * src/abg-comp-filter.cc (is_compatible_change): New static
23512 (harmless_filter::visit): Detect compatible changes and add the
23513 sub-tree into the new COMPATIBLE_TYPE_CHANGE_CATEGORY if
23514 applicable. Cleanup the logic.
23515 * src/abg-comparison.cc (operator|=(diff_category&,
23516 diff_category)): Define new function.
23517 (operator==(const decl_base_sptr l, const decl_base_sptr r)): Add
23519 (operator==(const type_base_sptr l, const type_base_sptr r)):
23520 Define new operator.
23521 (is_typedef, strip_typedef, types_are_compatible): New function
23523 * tests/data/test-diff-filter/test3-report.txt: New test report
23525 * tests/data/test-diff-filter/test3-v0.cc: Source code for new
23527 * tests/data/test-diff-filter/test3-v0.o: New test input.
23528 * tests/data/test-diff-filter/test3-v1.cc: Source code for new
23530 * tests/data/test-diff-filter/test3-v1.o: New test input.
23531 * tests/test-diff-filter.cc: Adjust to consume the new tests
23533 * tools/bidiff.cc: Add the new COMPATIBLE_TYPE_CHANGE_CATEGORY
23534 into the --harmless group.
23536 2014-04-01 Dodji Seketeli <dodji@redhat.com>
23538 Don't emit local filtered-out changes
23539 * src/abg-comparison.cc (represent): For var_decl, do not emit
23540 filtered-out local size/offset/access changes.
23541 (report_name_size_and_alignment_changes): Take the diff context.
23542 Do not report filtered-out local size/offset changes.
23543 ({var_diff, enum_diff, class_diff, type_decl_diff}::report):
23545 * test0-report.txt: Adjust.
23546 * test01-report.txt: New reference report for the same inputs
23547 test0-v{1,0}.o, but called without the --no-harmless command line.
23548 * tests/data/test-diff-filter/test2-v0.cc: Source code for new test input.
23549 * tests/data/test-diff-filter/test2-v1.cc: Likewise.
23550 * tests/data/test-diff-filter/test2-v0.o: New test input.
23551 * tests/data/test-diff-filter/test2-v1.o: Likewise.
23552 * tests/data/test-diff-filter/test2-report.txt: Reference report
23553 for new test input.
23554 * tests/test-diff-filter.cc: Consume the test inputs above.
23555 * tests/Makefile.am: Add the new test inputs above to the
23558 2014-04-01 Dodji Seketeli <dodji@redhat.com>
23560 Compact & intuitive reporting for changed function parameters
23561 * include/abg-comparison.h (unsigned_changed_parm_map)
23562 (unsigned_parm_map): New typedefs.
23563 * src/abg-comparison.cc
23564 (function_decl_diff::subtype_changed_parms): Renamed this from
23566 (function_decl_diff::priv::subtype_changed_parms_}): Renamed this
23567 from changed_parms_;
23568 (function_decl_diff::priv::{deleted_parms_by_id_,
23569 added_parms_by_id_, changed_parms_by_id_}): New members.
23570 (function_decl_diff::ensure_lookup_tables_populated): Update the
23571 new priv::changed_parms_by_id_ member to contain the parameters
23572 that got changed, as opposed to the subtype_changed_parms_ member
23573 that contain parameters that got a sub-type change. The other
23574 priv::*_by_id_ members are helpers for this. Update them too.
23575 (function_decl_diff::subtype_changed_parms): Renamed this from
23577 (function_decl_diff::report): Report separately about parameters
23578 having a sub-type change, and parameters that got changed. Note
23579 that in both cases, the change is necessarily to a compatible
23581 * data/test-diff-dwarf/test2-v0.cc: New test file.
23582 * data/test-diff-dwarf/test2-v0.o: Likewise.
23583 * data/test-diff-dwarf/test2-v1.cc: Likewise.
23584 * data/test-diff-dwarf/test2-v1.o: Likewise.
23585 * data/test-diff-dwarf/test2-report.txt: Likewise.
23586 * tests/Makefile.am: Add the new test files above to the
23588 * tests/test-diff-dwarf.cc: Consume the input files above to
23589 actually perform a regression test.
23591 2014-03-31 Dodji Seketeli <dodji@redhat.com>
23593 Fix thinko class_diff traversing.
23594 * src/abg-comparison.cc (class_diff::traverse): Fix thinking in
23595 introduced by commit "6709478 Fix infinite loop when traversing
23596 classes and their members"
23597 * tests/data/test-diff-filter/test1-v{0,1}.o: New test binary input files.
23598 * tests/data/test-diff-filter/test1-v{0,1}.cc: Source code for the
23600 * tests/data/test-diff-filter/test1-report.txt: Reference report
23601 for the diffing of the two binary input files above.
23602 * tests/test-diff-filter.cc: Make the test run on the new input above.
23603 * tests/Makefile.am: Add the new material to the distribution.
23605 2014-03-31 Dodji Seketeli <dodji@redhat.com>
23607 Add forgotten test output adjustment
23608 * tests/data/test-diff-filter/test0-report.txt: Adjust for the
23609 commit "a8d5284 Fix diff report indentation issue"
23610 * tests/data/test-diff-dwarf/test{0,1}-report.txt: Likewise.
23612 2014-03-31 Dodji Seketeli <dodji@redhat.com>
23614 Add forgotten source file for binary test input
23615 * tests/data/test-diff-dwarf/test1-v0.cc: New file.
23616 * tests/data/test-diff-dwarf/test1-v1.cc: Likewise.
23618 2014-03-31 Dodji Seketeli <dodji@redhat.com>
23620 Fix diff report indentation issue
23621 * abg-comparison.cc (corpus_diff::report): Indent the details of
23624 2014-03-31 Dodji Seketeli <dodji@redhat.com>
23626 Fix infinite loop when traversing classes and their members
23627 * src/abg-comparison.cc (TRY_{PRE,POST}_VISIT_CLASS_DIFF): New
23629 (class_diff::priv::traversing_): New flag.
23630 (class_diff::priv::priv): New constructor to initialize the new
23632 (class_diff::traversing): Do not traverse the diff again if it's
23633 being traversed already.
23635 2014-03-31 Dodji Seketeli <dodji@redhat.com>
23637 Fix access_changed and data_member_offset_changed predicates
23638 * src/abg-comp-filter.cc (access_changed)
23639 (data_member_offset_changed): Fix detection of membership.
23641 2014-03-29 Dodji Seketeli <dodji@redhat.com>
23643 Take filtering in account in diff stats & better categorizing
23644 * include/abg-comparison.h
23645 (diff_category::ACCESS_CHANGE_CATEGORY): Renamed
23646 ACCESS_CHANGED_CATEGORY into this.
23647 (diff_category::SIZE_OR_OFFSET_CHANGE_CATEGORY): Renamed
23648 SIZE_CHANGED_CATEGORY into this. Changed its semantics to
23649 incorporate offset changes as well.
23650 * src/abg-comparison.cc (struct noop_deleter): Move this up.
23651 (represent): Do not report filtered out data members.
23652 (report_mem_header): Add a new num_filtered parameter to take
23653 filtered-out members in account in members report headers.
23655 (class_diff::priv::{count_filtered_bases,
23656 count_filtered_data_members, count_filtered_member_functions}):
23657 New member functions. When a member is filtered, do not report
23659 ({enum_diff, class_diff}::report): Adjust. Take filtered members
23660 into account in headers.
23661 (corpus_diff::priv::apply_filters_and_compute_diff_stats): New
23663 (corpus_diff::priv::emit_diff_stats): Renamed
23664 emit_corpus_diff_stats into this. Change it to take the stats in
23666 (corpus_diff::report): Adjust to re-use the above. Filter
23667 varibles as well. Take the filtered functions & variables in
23668 account in the stats. Do not report filtered-out functions &
23670 * src/abg-comp-filter.cc (type_size_changed, access_changed)
23671 (data_member_offset_changed): New predicates.
23672 ({harmless, harmful}_filter::visit): Adjust to use the new
23673 predicates above. Update the harmful variant for the new
23674 SIZE_OR_OFFSET_CHANGE_CATEGORY category.
23675 * tools/bidiff.cc (set_diff_context_from_opts): Adjust for the
23676 categories name changes.
23677 * tests/data/test-diff-filter/test0-report.txt: New test input.
23678 * tests/data/test-diff-filter/test0-v0.cc: Likewise.
23679 * tests/data/test-diff-filter/test0-v0.o: Likewise.
23680 * tests/data/test-diff-filter/test0-v1.cc: Likewise.
23681 * tests/data/test-diff-filter/test0-v1.o: Likewise.
23682 * tests/test-diff-filter.cc: New test harness.
23683 * tests/Makefile.am: Add the new test files above to the
23686 2014-03-29 Dodji Seketeli <dodji@redhat.com>
23688 Fix var_diff length determination
23689 * src/abg-comparison.cc (var_diff::length): Just compare the two
23692 2014-03-29 Dodji Seketeli <dodji@redhat.com>
23694 Fix typos in the test-diff-dwarf.cc source code
23695 * tests/test-diff-dwarf.cc: Fix various typos.
23697 2014-03-27 Dodji Seketeli <dodji@redhat.com>
23699 Initial implementation of diff tree node filtering
23700 * include/abg-comp-filter.h: New file.
23701 * include/Makefile.am: Add the new include/abg-comp-filter.h to
23702 the source distribution.
23703 * include/abg-comparison.h (enum visiting_kind, diff_category): New enums.
23704 (operator|): Declare new operator declaration for the new
23705 visiting_kind enum.
23706 (operator{|,^,&,~}): Declare new operator decl for the new
23707 diff_category enum.
23708 (diff_context::{get_allowed_category, set_allowed_category,
23709 switch_categories_on, switch_categories_off, diff_filters,
23710 add_diff_filter, maybe_apply_filters}): Declare new member functions.
23711 (diff::{parent_, category_}): New members.
23712 (diff::diff): Adjust.
23713 (diff::{get_parent, set_parent, get_category, add_to_category,
23714 is_filtered_out, to_be_reported}): New members.
23715 (diff_node_visitor::{get_visiting_kind, set_visiting_kind}): New
23717 (diff_node_visitor::visit): Add a new flag to saying if the
23718 visitor is being called in post or pre children traversing mode.
23719 * src/abg-comparison.cc (operator|): Declare new operator
23720 declaration for the new visiting_kind enum.
23721 (operator{|,^,&,~}): Declare new operator decl for the new
23722 diff_category enum.
23723 (diff_context::priv::{allowed_category_, filters_}): New members.
23724 (diff_context::diff_context): Add all known filters.
23725 (diff_context::{get_allowed_category, set_allowed_category,
23726 switch_categories_on, switch_categories_off, diff_filters,
23727 add_diff_filter, maybe_apply_filters}): Define new member
23729 (diff::{is_filtered_out, to_be_reported}): Define new members.
23730 (*::report): Use the new diff::to_be_reported function.
23731 (*::traverse): Adjust for pre/post visiting.
23732 (var_diff::var_diff): Chain the type diff node to its parent.
23733 ({pointer_diff, reference_diff, qualified_type_diff,
23734 typedef_diff}::underlying_type_diff): Chain the underlying type
23735 diff node to its parent.
23736 (enum_diff::enum_diff): Likewise.
23737 (base_diff::underlying_class_diff): Likewise.
23738 ({class_diff, corpus_diff}::report): Do not report changed
23739 (member) functions that have been filtered out. Rather report
23740 that they have been filtered out.
23741 ({function_decl_diff, class_diff}::traverse): Chain underlying
23742 type diff nodes to their parent.
23743 (diff_node_visitor::visit): Add a new flag to saying if the
23744 visitor is being called in post or pre children traversing mode.
23745 Make sure to call the default diff::visit overload.
23746 * src/abg-comp-filter.cc: New file.
23747 * src/Makefile.am: Add the new abg-comp-filter.cc to the source
23749 * tools/bidiff.cc (options::show_harm{ful,less}_changes): New
23751 (display_usage): Add usage strings for --no-harmless and
23752 --no-harmful options.
23753 (parse_command_line): Parse --no-harmless and --no-harmful command
23755 (set_diff_context_from_opts): Populate the diff context
23758 2014-03-26 Dodji Seketeli <dodji@redhat.com>
23760 Add missing headers double inclusion guards
23761 * include/abg-comparison.h: Add a missing double inclusion guard.
23762 * include/abg-diff-utils.h: Likewise.
23764 2014-03-26 Dodji Seketeli <dodji@redhat.com>
23766 Add a missing apostrophe to access reporting
23767 * src/abg-comparison.cc (represent): For member var_decls, add a
23768 missing apostrophe after the access.
23769 * tests/data/test-diff-dwarf/test0-report.txt: Update test report.
23771 2014-03-21 Dodji Seketeli <dodji@redhat.com>
23773 Fix diff emptiness detection for function_decl_diff nodes
23774 * src/abg-comparison.cc (function_decl_diff::length): Just compare
23775 the two functions here, damit.
23776 * tests/data/test-diff-dwarf/test0-report.txt: Adjust.
23778 2014-03-21 Dodji Seketeli <dodji@redhat.com>
23780 Fixlets in the bidiff regression testing harness
23781 * tests/test-bidiff.cc (main): Fix a typo. Fix the path to the
23784 2014-03-21 Dodji Seketeli <dodji@redhat.com>
23786 Initial regression test for dwarf diffing
23787 * tests/test-diff-dwarf.cc: New dwarf diffing regression test
23789 * tests/data/test-diff-dwarf/test0-report.txt: New test input.
23790 * tests/data/test-diff-dwarf/test0-v0.cc: Likewise.
23791 * tests/data/test-diff-dwarf/test0-v0.o: Likewise.
23792 * tests/data/test-diff-dwarf/test0-v1.cc: Likewise.
23793 * tests/data/test-diff-dwarf/test0-v1.o: Likewise.
23794 * tests/Makefile.am: Add the new test inputs from
23795 tests/test-diff-dwarf.cc and tests/data/test-diff-dwarf/* to
23798 2014-03-21 Dodji Seketeli <dodji@redhat.com>
23800 Rename test-walker.cc into test-ir-walker.cc
23801 * tests/test-ir-walker.cc: Renamed test-walker.cc into this.
23802 * tests/Makefile.am: Adjust. The generated binary is now testirwalker.
23804 2014-03-21 Dodji Seketeli <dodji@redhat.com>
23806 Initial diff tree traversal infrastructure
23807 * include/abg-comparison.h (struct diff_traversable_base, struct
23808 diff_node_visitor): New type.
23809 (class diff): Extends the new diff_traversable_base.
23810 ({diff, distinct_diff, var_diff, pointer_diff, reference_diff,
23811 qualified_type_diff, enum_diff, class_diff, base_diff, scope_diff,
23812 function_decl_diff, type_decl_diff, typedef_diff,
23813 translation_unit_diff, corpus_diff}::traverse): New methods.
23814 (function_decl_diff::return_type_diff): New accessor. Renamed
23815 return_diff into this.
23816 (translation_unit_diff::{first, second}_translation_unit): New
23818 (corpus_diff::{deleted, added, changed}_functions): New accessors.
23819 * src/abg-comparison.cc ({distinct_diff, var_diff,
23820 pointer_diff, reference_diff, qualified_type_diff, enum_diff,
23821 class_diff, base_diff, scope_diff, function_decl_diff,
23822 type_decl_diff, typedef_diff, translation_unit_diff,
23823 corpus_diff}::traverse): New function implementations.
23824 (maybe_report_diff_for_member): Renamed
23825 maybe_report_diff_for_class_members into this.
23826 (var_diff::report): Adjust.
23827 (struct translation_unit_diff::priv): New private type.
23828 (translation_unit_diff::translation_unit_diff): Instantiate the
23830 (translation_unit_diff::{first,second}_translation_unit): New
23832 (corpus_diff::{deleted, added, changed}_functions): New function
23834 (diff_node_visitor::visit): New function implementations.
23836 2014-03-19 Dodji Seketeli <dodji@redhat.com>
23838 Make tree walking preemptive
23839 * include/abg-traverse.h (traversable_base::traversable): Change
23840 the signature of this to return a boolean.
23841 * include/abg-ir.h (ir_traversable_base::traverse): Change the
23842 signature of this to return a boolean.
23843 (*::traverse): Adjust.
23844 (ir_node_visitor::visit): Change the signature of this to return a
23846 * src/abg-corpus.cc (symtab_build_visitor_type::visit): Adjust.
23847 * src/abg-ir.cc (::traverse): Adjust.
23848 * tests/test-walker.cc (name_printing_visitor::visit): Adjust.
23850 2014-03-26 Jonathan Wakely <jwakely@redhat.com>
23853 * include/abg-diff-utils.h (compute_diff): Fix typo in apidoc
23856 2014-03-24 Dodji Seketeli <dodji@redhat.com>
23858 Follow DW_AT_abstract_origin and add missing mangled name
23859 * src/abg-dwarf-reader.cc (build_function_decl): Change signature
23860 to take function_decl to which one shall add properties that got
23861 added by subsequent DIEs later.
23862 (build_class_type_and_add_to_ir): Adjust.
23863 (build_function_decl): Allow adding new properties to an existing
23864 function_decl. Add the mangled name in particular.
23865 * tests/data/test-read-dwarf/test1.abi: Update test.
23867 2014-03-20 Dodji Seketeli <dodji@redhat.com>
23869 Fix destructor naming.
23870 * src/abg-ir.cc (function_decl::get_pretty_representation): In
23871 DWARF at least, the destructor function name already contains the
23872 '~'. No need to add it.
23874 2014-03-20 Dodji Seketeli <dodji@redhat.com>
23876 Better static function determination heuristic
23877 * src/abg-dwarf-reader.cc (build_class_type_and_add_to_ir): Better
23880 2014-03-20 Dodji Seketeli <dodji@redhat.com>
23882 Dynamically wire class_decl::base_spec hashing
23883 * include/abg-ir.h (decl_base::get_hash): Make this virtual.
23884 (class_decl::base_spec::get_hash): Declare a new virtual overload.
23885 * src/abg-ir.cc (class_decl::base_spec::get_hash): Define.
23887 2014-03-20 Dodji Seketeli <dodji@redhat.com>
23889 Slight indentation fix in the diff report
23890 * src/abg-comparison.cc (class_diff::report): Indentation fix for
23891 member function changes report.
23893 2014-03-20 Dodji Seketeli <dodji@redhat.com>
23895 Get rid of class_decl::member_function
23896 * include/abg-fwd.h (is_member_function)
23897 (get_member_function_is_{ctor,dtor,const})
23898 (get_member_function_vtable_offset): New function declarations.
23899 * include/abg-ir.h (class_decl::member_function): Remove.
23900 (class_decl::member_functions): Adjust. This is now just a vector
23901 of method_decl_sptr.
23902 (class_decl::add_member_function): Remove the overload taking
23903 class_decl::member_function. Adjust the other overload to take a
23905 (class mem_fn_context_rel): New class.
23906 (class_decl::method_decl::set_scope): New virtual overload.
23907 (class_decl::member_function): Remove.
23908 (operator==): Remove the overload taking a
23909 class_decl::member_function.
23910 (class_decl::member_function::hash): Remove.
23911 (ir_node_visitor::visit): Remove the overload taking a
23912 class_decl::member_function.
23913 * include/abg-comparison.h (changed_member_function_sptr)
23914 (string_member_function_sptr_map): Adjust.
23915 * src/abg-comparison.cc (represent): Adjust the overload taking a
23916 class_decl::member_function to take a class_decl::method_decl.
23917 (class_diff::{report, ensure_lookup_tables_populated}): Adjust.
23918 * src/abg-corpus.cc (symtab_build_visitor_type::visit): Remove the
23919 overload taking a class_decl::member_function.
23920 * src/abg-dwarf-reader.cc (build_class_type_and_add_to_ir):
23922 * src/abg-hash.cc (decl_base::hash::operator()): Use the fully
23923 qualified name of the decl in the hash, to increase the likelihood
23924 of avoiding hash collisions.
23925 (method_type::hash::operator()): Likewise.
23926 (function_decl::hash::operator()): Take member functions in
23928 (class_decl::member_function::hash::operator()): Remove.
23929 (class_decl::hash::operator()): Adjust.
23930 (type_base::dynamic_hash::operator()): Adjust.
23931 * src/abg-ir.cc (is_member_function)
23932 (get_member_function_is_{ctor,dtor,const})
23933 (get_member_function_vtable_offset): New function definitions.
23934 (function_decl::get_pretty_representation): Adjust.
23935 (function_decl::operator): Take member functions in account here.
23936 (class_decl::insert_member_decl): Adjust.
23937 (mem_fn_context_rel::~mem_fn_context_rel): New definition.
23938 (class_decl::member_function::*): Remove.
23939 (class_decl::method_decl::set_scope): New definition.
23940 (class_decl::get_num_virtual_functions): Adjust.
23941 (class_decl::add_member_function): Remove overload taking a
23942 class_decl::member_function. Define a new overload taking a
23943 class_decl::method_decl.
23944 (ir_node_visitor::visit): Remove the overload taking a
23945 class_decl::member_function.
23946 * src/abg-reader.cc (build_class_decl): Adjust.
23947 * src/abg-writer.cc (write_voffset, write_class_decl): Adjust.
23949 2014-03-19 Dodji Seketeli <dodji@redhat.com>
23951 Get rid of class_decl::data_member
23952 * include/abg-fwd.h (has_scope): Delete the overloads for
23954 (get_member_is_static): Add an overload for decl_base*.
23955 ({is,get,set}_data_member,{get_,set}_data_member_is_laid_out)
23956 ({get,set}_data_member_offset): New access declarations.
23957 * include/abg-ir.h (class context_rel): Move up.
23958 (decl_base::set_context_rel): New definition.
23959 (class dm_context_rel): New type.
23960 (decl_base::hash_as_member): Remove.
23961 (var_decl::set_scope): Declare new virtual member.
23962 (class_decl::data_member): Remove.
23963 (ir_node_visitor::visit): Remove the overload for
23964 class_decl::data_member.
23965 (represent_data_member): Remove the represent overload for
23966 class_decl::data_member into this. Make it take a var_decl.
23967 (represent): Change the overload that takes two
23968 class_decl::data_member take two var_decl. And adjust it.
23969 (class_diff::report): Adjust.
23970 * src/abg-corpus.cc (symtab_build_visitor_type::visit): Remove the
23971 overload that takes a class_decl::data_member*. Adjust the
23972 overload that takes a var_decl to recognize (static) data members.
23973 * src/abg-dwarf-reader.cc (build_translation_unit_and_add_to_ir)
23974 (build_class_type_and_add_to_ir, build_ir_node_from_die):
23976 * src/abg-hash.cc (var_decl::hash::operator()): Adjust.
23977 (class_decl::data_member::hash::operator()): Remove.
23978 (decl_base::hash::operator()): Take the context relationship in
23980 (decl_base::hash_as_member::operator()): Remove.
23981 ({enum_type_decl,typedef_decl}::hash::operator()): Adjust.
23982 (class_decl::member_function::hash::operator()): Adjust.
23983 (type_base::dynamic_hash::operator()): Adjust.
23984 * src/abg-ir.cc (dm_context_rel::~dm_context_rel): New definition.
23985 (has_scope): Remove overload for type_base.
23986 (get_member_is_static): New overload for decl_base*.
23987 (is_data_member): New function definition.
23988 ({get,set}_data_member_{offset,is_laid_out}): Define new
23990 (var_decl::set_scope): Define new member function. Make this set
23991 a dm_context_rel as the context relationship.
23992 (var_decl::operator==): Adjust to take in account the new data
23993 member relationship.
23994 (class_decl::class_decl): Adjust.
23995 (class_decl::insert_member_decl): Adjust.
23996 (class_decl::add_data_member): Remove the overload for
23997 class_decl::data_member.
23998 (class_decl::add_data_member): Adjust the overload for var_decl.
23999 (operator==): Remove overload for class_decl::data_member*.
24000 (class_decl::data_member::operator==): Likewise.
24001 (ir_node_visitor::visit): Remove overload for
24002 class_decl::data_member.
24003 * src/abg-writer.cc (write_layout_offset, write_class_decl):
24005 * tests/data/test-read-write/test20.xml: Adjust.
24007 2014-03-18 Dodji Seketeli <dodji@redhat.com>
24009 Better base class diff reporting
24010 * include/abg-comparison.h (class base_diff): New.
24011 * include/abg-ir.h (function_decl::get_first_non_implicit_parm):
24012 New member function.
24013 (function_type::get_first_non_implicit_parm): Likewise.
24014 * src/abg-comparison.cc (base_has_changed): Change parm to take
24015 class_decl::base_spec_sptr.
24016 (class_diff::ensure_lookup_tables_populated): Compare the base
24017 specs not just the base classes.
24018 (class_diff::report): Adjust. Report sub-type changes in the
24020 (base_diff::*): Define member functions.
24021 (compute_diff): Define an overload for base_diff_sptr.
24022 * src/abg-hash.cc ({function_type,
24023 method_type}::hash::operator()): Do not hash the implicit parm of
24025 (class_decl::hash::operator()): Do not hash member types.
24026 * src/abg-ir.cc (decl_base::decl_base): Initialize the
24027 hashing_started_ member that got moved here from class_decl.
24028 (decl_base::get_hash): Do not set the hash if it's being set b/c
24029 we are in a class_decl.
24030 (decl_base::operator==) Do not compare hashes for now. Two decls
24031 can have different hashes and compare equal; think about an
24032 incomplete type foo, that compares equal with a complete foo.
24033 Their hashes will be different though. So for now, just avoid
24035 (compare_function_types): Avoid comparing the implicit parameter
24036 for member functions.
24037 ({function, method}_type::get_first_non_implicit_parm): New
24039 * tests/data/test-read-write/test20.xml: Update.
24041 2014-03-13 Dodji Seketeli <dodji@redhat.com>
24043 Do not report change in typedef underlying type is there is none
24044 * src/abg-comparison.cc (typedef_diff::report): Do not forget to
24045 check the length of the diff of the underlying type before sending
24046 its diff report down the wire.
24048 2014-03-13 Dodji Seketeli <dodji@redhat.com>
24050 Avoid hashing a access & static-ness of member types twice
24051 * src/abg-hash.cc (class_decl::hash::operator()): Do hash the
24052 'member' part of the member types here, it has been hashed
24055 2014-03-13 Dodji Seketeli <dodji@redhat.com>
24057 Set class {size,loc} when adding members to a decl-only class
24058 * src/abg-dwarf-reader.cc (build_class_type_and_add_to_ir): Do not
24059 forget to set class size and location when adding members to a
24060 declaration-only class, turning it into a definition class.
24062 2014-03-13 Dodji Seketeli <dodji@redhat.com>
24064 Use the same representation for member and non-member types
24065 * include/abg-fwd.h (is_at_class_scope): Add new oveloads.
24066 (as_non_member_type, as_non_member_class_decl): Remove.
24067 (has_scope, is_member_decl, is_member_type): New function
24068 declarations. (get_member_is_static, set_member_is_static):
24069 Likewise. * include/abg-ir.h (enum access_specifier): Move to
24070 the abigail:: namespace, from ...
24071 (class_decl::access_specifier): ... here. (class
24072 context_rel): New type. (decl_base::hash_as_member): New
24073 hasher. (decl_base::context_): Change the type of this to
24074 context_rel_sptr. (decl_base::get_context_rel): New protected
24075 getter. (decl_base::get_scope): Move this out-of-line.
24076 (class_decl::member_type): Remove.
24077 (class_decl::member_types): Adjust this typedef.
24078 (class_decl::{insert,add}_member_type): Make these take a
24079 type_base_sptr now. (class_decl::add_member_type): Change the
24080 overload that returned a member_type to return a
24081 type_base_sptr. (get_member_access_specifier,
24082 set_member_access_specifier): New function declarations. *
24083 include/abg-comparison.h (class member_type_diff): Remove.
24084 (compute_diff): Remove the overload for member_type_diff. *
24085 src/abg-comparison.cc (compute_diff_for_types): Adjust for the
24086 removal of class_decl::member_type.
24087 (maybe_report_diff_for_class_members): New static function.
24088 (report_name_size_and_alignment_changes): Do not report a name
24089 change just because of a struct -> class change. ({var_diff,
24090 enum_diff, function_decl_diff}::report): Use the new
24091 maybe_report_diff_for_class_members. (class_diff::report):
24092 Adjust for the removal of class_decl::member_type. Use the
24093 new maybe_report_diff_for_class_members. (class member_diff):
24094 Remove. * src/abg-dwarf-reader.cc (die_access_specifier)
24095 (get_scope_for_die, build_translation_unit_and_add_to_ir)
24096 (build_class_type_and_add_to_ir, build_function_decl)
24097 (build_ir_node_from_die): Adjust. * abg-hash.cc (struct
24098 decl_base::hash_as_member): Define. ({scope_type_decl,
24099 enum_type_decl, typedef_decl}::hash::operator()): Use the
24100 decl_base::hash_as_member.
24101 * src/abg-ir.cc (decl_base::decl_base): Adjust.
24102 (decl_base::get_scope): New out-of-line getter.
24103 (decl_base::{operator==, set_scope): Adjust.
24104 (has_scope, is_member_decl, is_member_type)
24105 (get_member_access_specifier, set_member_access_specifier)
24106 (get_member_is_static, set_member_is_static, is_at_class_scope):
24107 New function definitions.
24108 (as_non_member_type, as_non_member_class_decl): Remove.
24109 (get_node_name): Adjust.
24110 (class_decl::{class_decl, set_earlier_declaration,
24111 insert_member_decl, insert_member_type, add_member_type):
24113 (class_decl::member_type::*) Remove.
24114 * src/abg-reader.cc (read_access, build_qualified_type_decl)
24115 (build_reference_type_def, build_typedef_decl)
24116 (build_class_decl): Adjust.
24117 * src/abg-writer.cc (write_access, write_member_type)
24118 (write_class_decl): Likewise.
24120 2014-03-12 Dodji Seketeli <dodji@redhat.com>
24122 Avoid more static_casts in the (comparison) code
24123 * src/abg-ir.cc (class_decl::insert_member_type, operator==):
24124 Remove static_casts.
24125 (class_decl::member_type::operator==): Likewise.
24126 (class_decl::member_class_template::operator==): Likewise.
24128 2014-03-12 Dodji Seketeli <dodji@redhat.com>
24130 Allow adding members to decl-only classes making them defined classes
24131 * include/abg-fwd.h (lookup_type_in_scope)
24132 (lookup_var_decl_in_scope): New declarations.
24133 * include/abg-ir.h (class_decl::get_is_declaration_only): Rename
24134 is_declaration_only on this.
24135 (class_decl::set_is_declaration_only):
24136 * src/abg-comparison.cc (try_to_diff<class_decl>)
24137 (class_diff::ensure_lookup_tables_populated)
24138 (scope_diff::ensure_lookup_tables_populated): Update for the
24139 get_is_declaration_only renaming.
24140 * src/abg-dwarf-reader.cc (get_scope_for_die): Likewize.
24141 (build_class_type_and_add_to_ir): Make sure that a member type or
24142 data member is not already present in the class before adding it.
24143 Also, if a decl-only class gets a data member, it's not a
24144 decl-only class anymore.
24145 * src/abg-hash.cc (class_decl::hash::operator()): Update for the
24146 get_is_declaration_only renaming.
24147 * src/abg-ir.cc (scope_decl::find_iterator_for_member)
24148 (look_through_decl_only_class): Likewise.
24149 (lookup_type_in_scope, lookup_var_decl_in_scope, get_node_name)
24150 (convert_node_to_decl, lookup_node_in_scope)
24151 (lookup_type_in_scope): New definitions.
24152 (class_decl::{set_definition_of_declaration,
24153 set_earlier_declaration, operator==}): Update for the
24154 get_is_declaration_only renaming.
24155 * src/abg-reader.cc (build_class_decl): Likewise.
24156 * src/abg-writer.cc (write_class_is_declaration_only): Likewise.
24158 2014-03-12 Jonathan Wakely <jwakely@redhat.com>
24160 Fixed typos in abg-diff-utils.h
24161 * include/abg-diff-utils.h (compute_diff): Fix typos in the API
24164 2014-03-11 Dodji Seketeli <dodji@redhat.com>
24166 Initialize a variable
24167 * tools/bilint.cc (main): Initialize the 'r' variable.
24169 2014-03-11 Dodji Seketeli <dodji@redhat.com>
24171 Do not declare classes before defining them anymore
24172 * src/abg-dwarf-reader.cc (build_class_type_and_add_to_ir): Do not
24173 declare classes before defining them because both the declaration
24174 and the definition now compare equal.
24175 * tests/data/test-read-dwarf/test1.abi: Update test.
24176 * tests/data/test-read-write/test20.xml: Likewise.
24178 2014-03-11 Dodji Seketeli <dodji@redhat.com>
24181 * src/abg-comparison.cc (class_diff::report): Slight style fix.
24183 2014-03-10 Dodji Seketeli <dodji@redhat.com>
24185 Better support for decl-only classes in diffing and comparison
24186 * include/abg-fwd.h (look_through_decl_only_class): New function
24188 * src/abg-comparison.cc (class_diff::length): Just compare the two
24190 (compute_diff): Look through the two classes if they are
24191 decl-only, and use their declaration for the diffing.
24192 * src/abg-ir.cc (look_through_decl_only_class): Define this new
24194 (class_decl::set_definition_of_declaration): Allow setting a
24195 definition that is itself a declaration-only.
24196 * src/abg-writer.cc (write_class_decl): Declaration-only can now
24197 have members, namely member types.
24199 2014-03-10 Dodji Seketeli <dodji@redhat.com>
24201 Fix comparison wrt hash number
24202 * src/abg-ir.cc (decl_base::operator==): Do not consider empty
24204 (class_decl::operator==): Better support for comparing decl-only
24205 classes against non-decl-only classes.
24207 2014-03-10 Dodji Seketeli <dodji@redhat.com>
24209 Better support of class DIEs with DW_AT_specification
24210 * src/abg-dwarf-reader.cc (get_scope_for_die): The definition of a
24211 declaration-only class can be NULL. Do not look through in that
24213 (build_class_type_and_add_to_ir): Support adding class members to
24215 (build_ir_node_from_die): If a class DIE has a DW_AT_specification,
24216 get the specification DIE, get its matching IR node and add the
24217 current members of the current DIE to that IR node.
24219 2014-03-10 Dodji Seketeli <dodji@redhat.com>
24221 Tell struct and class apart
24222 * include/abg-ir.h (class_decl::is_struct_): New member.
24223 (class_decl::class_decl): Take an additional is_struct member.
24224 (class_decl::is_struct): New getter.
24225 * src/abg-ir.cc (class_decl::class_decl): Initialize the new
24226 is_struct_ data member.
24227 (class_decl::get_pretty_representation): Tell struct and class
24229 * abg-reader.cc (read_is_struct): New static function.
24230 (build_class_decl): Capture the struct-ness of the class.
24231 * src/abg-dwarf-reader.cc (build_class_type_and_add_to_ir):
24233 * src/abg-writer.cc (write_is_struct): New static function.
24234 (write_class_decl): Write the struct-ness of the class.
24235 * tests/data/test-read-dwarf/test1.abi: Update test.
24237 2014-03-06 Dodji Seketeli <dodji@redhat.com>
24239 Fix typedef_diff emptyness detection
24240 * src/abg-comparison.cc (typedef_diff::length): Do not mask away the
24241 dynamic type of the typedef_decl before the comparison.
24243 2014-02-28 Dodji Seketeli <dodji@redhat.com>
24245 Add --drop/--keep options to bidiff
24246 * include/abg-sptr-utils.h: New file.
24247 * include/Makefile.am: Add abg-sptr-utils. to the build system.
24248 * include/abg-libxml-utils.h (reader_sptr, xml_char_sptr): Remove
24249 these typedefs as there are now in abg-sptr-utils.
24250 (build_sptr): Likewise for this template and its specializations
24252 * src/abg-libxml-utils.cc (sptr_utils::build_sptr): Mode the
24253 definition of the specializations for xmlTextReader and xmlChar
24254 into the sptr_utils namespace.
24255 * include/abg-corpus.h
24256 (corpus::{get_regex_patterns_of_fns_to_suppress,
24257 get_regex_patterns_of_vars_to_suppress,
24258 get_regex_patterns_of_fns_to_keep,
24259 get_regex_patterns_of_vars_to_keep}): Declare new member
24261 * src/abg-comparison.cc (sptr_utils::regex_t_deleter): Define new
24263 (build_sptr) Define new specialization for regex_t.
24264 (struct array_deleter): Remove unused functor.
24265 (corpus::priv::regex_patterns_{fns,vars}_to_{suppress,keep}): New data
24267 (symtab_build_visitor_type::regex_patterns_{fns,vars}_to_{suppress,keep}):
24269 (symtab_build_visitor_type::r_{fns,vars}_{suppress,keep})):
24271 (symtab_build_visitor_type::symtab_build_visitor_type): Update the
24272 signature of this constructor to take regex patterns for functions
24273 and variables to suppress and to keep. Also, initialize the data
24274 members from these new parameters.
24275 (symtab_build_visitor_type::regex_{fns,vars}_{suppress,keep}): New
24277 (symtab_build_visitor_type::{add_fn_to_wip_fns,
24278 add_var_to_wip_vars}): Likewise.
24279 (symtab_build_visitor_type::visit) Use either add_fn_to_wip_fns or
24280 add_var_to_wip_vars depending on the overload of the visit()
24282 (corpus::priv::build_symbol_table): Update for the change of the
24283 symtab_build_visitor_type constructor signature.
24284 (corpus::get_regex_patterns_of_{fns,vars}_to_{suppress,keep}):
24285 Define new member functions.
24286 * tools/bidiff.cc (options::{drop,keep}_{fn,var}_regex_patterns}):
24288 (display_usage): Add help strings for --drop, --drop-fn,
24289 --drop-var, --keep, --keep-fn, --keep-var
24290 (parse_command_line): Parse the command lines above.
24291 (set_corpus_keep_drop_regex_patterns): Define new static function.
24292 (main): Use the new set_corpus_keep_drop_regex_patterns.
24294 2014-02-28 Dodji Seketeli <dodji@redhat.com>
24296 Style fix in the dwarf reader
24297 * src/abg-dwarf-reader.cc (die_is_public_decl): Rename
24298 is_public_decl into this.
24299 (die_is_declaration_only): Rename is_declaration_only into this.
24300 (build_class_type_and_add_to_ir, build_var_decl)
24301 (build_function_decl): Adjust for the renames above.
24303 2014-02-28 Dodji Seketeli <dodji@redhat.com>
24305 Skip artificial (member) functions from DWARF
24306 * src/abg-dwarf-reader.cc (die_is_artificial): New static
24308 (build_class_type_and_add_to_ir, build_ir_node_from_die): Use the
24309 die_is_artificial function to test if the function DIE is
24310 artificial and then skip it.
24312 2014-02-28 Dodji Seketeli <dodji@redhat.com>
24314 Fix function parameter addition/deletion/change detection
24315 * include/abg-ir.h (function_decl::parameter::get_name_id):
24316 Declare new entry point.
24317 * src/abg-comparison.cc
24318 (function_decl_diff::ensure_lookup_tables_populated): Use the new
24319 function_decl::parameter::get_name_id() for the unique name of the
24320 parameter. Also, fix a little logic error: if a parm is deleted
24321 and inserted, in all cases, consider it as not deleted.
24323 2014-02-28 Dodji Seketeli <dodji@redhat.com>
24325 Add a --stat option to bidiff
24326 * include/abg-comparison.h (diff_context::show_stats_only):
24327 Declare new accessors.
24328 * src/abg-comparison.cc
24329 (diff_context::priv::show_stats_only_): New member.
24330 (diff_context::show_stats_only): Define new accessors.
24331 (corpus_diff::report): If showing stats only, quit right after
24332 showing the summary.
24333 * tools/bidiff.cc (options::show_stats_only): New data member.
24334 (options::options): Initialize the new data member.
24335 (display_usage): Add help string for --stat.
24336 (parse_command_line): Parse the --stat option.
24337 (set_diff_context_from_opts): Update to set the show_stats_only
24338 onto the context. Cleanup the logic to make it more compact.
24340 2014-02-28 Dodji Seketeli <dodji@redhat.com>
24342 Report about functions of different names
24343 * src/abg-comparison.cc (function_decl_diff::report): Consider the
24344 case of functions with different names. This doesn't happen in
24345 the current pipeline b/c they just show up as deleted/added
24346 functions so the function reporter doesn't see them as they have
24347 been already reported by now.
24349 2014-02-28 Dodji Seketeli <dodji@redhat.com>
24351 Fix length calculation for type diffs.
24352 * src/abg-comparison.cc (diff_length_of_type_bases): Fix stupid
24353 harmful thinko here.
24355 2014-02-28 Dodji Seketeli <dodji@redhat.com>
24357 Fix calculation of the length of distinct_diff
24358 * src/abg-comparison.cc (distinct_diff::length): Also perform a
24359 deep comparison here.
24361 2014-02-28 Dodji Seketeli <dodji@redhat.com>
24363 Fix diff length calculation for typedef diffs
24364 * src/abg-comparison.cc (typedef_diff::length): Just use
24365 comparison for this.
24367 2014-02-28 Dodji Seketeli <dodji@redhat.com>
24369 Fix layout of diff summary
24370 * src/abg-comparison.cc
24371 (corpus_diff::priv::emit_corpus_diff_stats): Remove useless
24372 vertical and horizontal white spaces.
24374 2014-02-28 Dodji Seketeli <dodji@redhat.com>
24376 Fix indentation of pieces of class diff report
24377 * src/abg-comparison.cc (represent, class_diff::report): Fix
24380 2014-02-28 Dodji Seketeli <dodji@redhat.com>
24382 Fix detection of entities of different kinds for diff purposes
24383 * src/abg-comparison.cc
24384 (distinct_diff::entities_are_of_distinct_kinds): Consider two NULL
24385 decls are distinct types for the purpose of diffing. This is just
24386 a shortcut to avoid creating a null_diff type for now. But then,
24387 stop considering same pointers as different. This was a bug.
24389 2014-02-28 Dodji Seketeli <dodji@redhat.com>
24391 Constify function_decl::parameter::get_type_pretty_representation()
24393 (function_decl::parameter::get_type_pretty_representation): This
24396 2014-02-28 Dodji Seketeli <dodji@redhat.com>
24398 Improve API doc for the location machinery
24399 * include/abg-ir.h (class location): Improve doc.
24400 (decl_base::{get,set}_location): Likewise.
24402 2014-02-26 Dodji Seketeli <dodji@redhat.com>
24404 Remove useless dynamic cast
24405 * src/abg-ir.cc (class_decl::insert_member_decl): Remove useless
24406 dynamic cast from here.
24408 2014-02-26 Dodji Seketeli <dodji@redhat.com>
24410 Insert reference, pointers and qual types at their declaration point
24411 * src/abg-dwarf-reader.cc (build_ir_node_from_die): Insert
24412 reference, pointers and qualified types at the point where we see
24413 them, in their scope, rather than under the scope of their
24414 underlying type. This is because their might be first declared as
24415 member types and we don't want to loose that information.
24417 2014-02-24 Dodji Seketeli <dodji@redhat.com>
24419 Fix documentation for the diff_utils namespace
24420 * include/abg-diff-utils.h (namespace diff_utils): Add comment.
24421 (compute_diff): Update comments for some overloads where they were
24424 2014-02-21 Dodji Seketeli <dodji@redhat.com>
24427 * src/abg-comparison.cc
24428 (class_diff::ensure_lookup_tables_populated): use
24429 as_non_member_class_decl rather that complicated casting.
24430 src/abg-ir.cc (var_decl::get_pretty_representation): Use
24431 get_type_declaration rather than casting.
24433 2014-02-21 Dodji Seketeli <dodji@redhat.com>
24435 Fix a glitch in member data diff reporting
24436 * src/abg-comparison.cc (represent): Do not forget the "'" around
24437 the access specifier.
24439 2014-02-21 Dodji Seketeli <dodji@redhat.com>
24441 Proper support for diffing member types
24442 * include/abg-comparison.h (class member_type_diff): New class.
24443 (member_type_diff_sptr): New convenience typedef.
24444 (compute_diff): New overload for member_type_diff.
24445 * src/abg-comparison.cc (struct member_type_diff::priv): New
24447 (member_type_diff::{first_member_type, second_member_type,
24448 underlying_type_diff, length}): New member function definitions.
24449 (compute_diff): New definition for member type diffs.
24450 (compute_diff_for_types): Support diffing
24452 (class_diff::report): Do not use strip member types now that we
24453 can properly diff them.
24455 2014-02-21 Dodji Seketeli <dodji@redhat.com>
24457 Fix the support for printing cv-qualified names
24458 * include/abg-ir.h (decl_base::{location_, name_,
24459 qualified_parent_name_, qualified_name_}): Make these data members
24460 protected rather than private.
24461 (decl_base::get_qualified_parent_name): Declare new member
24463 (decl_base::get_qualified_name): Make the core overload virtual.
24464 Simplify the other overload that calls the core one.
24465 (qualified_type_def::build_name): Declare new protected helper
24467 (qualified_type_def::{get_cv_quals_string_prefix,
24468 get_qualified_name}): Declare new functions.
24469 (pointer_type_def::{get_qualified_name}}): Likewise.
24470 (class_decl::member_type::get_qualified_name): Likewise.
24471 * src/abg-ir.cc (decl_base::get_qualified_parent_name): New
24473 (decl_base::get_name): Make this out-of-line.
24474 (decl_base::get_qualified_name): The signature of this got
24475 simplified. Make it use the new get_qualified_parent_name.
24476 (qualified_type_def::{build_name, get_qualified_name,
24477 get_cv_quals_string_prefix}): New definitions.
24478 (qualified_type_def::qualified_type_def): Update the constructor
24479 to use the new build_name function above.
24480 (pointer_type_def::get_qualified_name): New definitions.
24481 (reference_type_def::get_qualified_name): Likewise.
24482 (class_decl::member_type::get_qualified_name): Likewise.
24484 2014-02-21 Dodji Seketeli <dodji@redhat.com>
24487 * src/abg-comparison.cc (represent): Remove useless curly braces
24488 and vertical spaces.
24490 2014-02-21 Dodji Seketeli <dodji@redhat.com>
24492 Support DW_AT_specification on class/struct DIEs
24493 * src/abg-dwarf-reader.cc (build_ir_node_from_die): Support
24494 DW_AT_specification on DW_TAG_{class,structure}type.
24496 2014-02-21 Dodji Seketeli <dodji@redhat.com>
24498 Avoid comparing member types and class templates
24499 * src/abg-comparison.h (compute_diff): For class_decl_sptr, do not
24500 compare member types and member class templates. This adds a lots
24501 of noise that is not necessarily useful for now.
24502 * tests/data/test-bidiff/test-qual-type0-report.txt: Update tests.
24503 * tests/data/test-bidiff/test-struct0-report.txt: Likewise.
24504 * tests/data/test-bidiff/test-struct1-report.txt: Likewise.
24506 2014-02-21 Dodji Seketeli <dodji@redhat.com>
24508 Fix the report of added/removed function parameters
24509 * src/abg-comparison.cc
24510 (function_decl_diff::priv::{inserted_parms_, removed_parms_}):
24512 (function_decl_diff::ensure_lookup_tables_populated): Fix thinko.
24513 Avoid using the members removed above. Use one less loop to
24514 update the changed params.
24515 (function_decl_diff::report): Avoid using the removed_parms_
24516 data member that was removed above.
24518 2014-02-21 Dodji Seketeli <dodji@redhat.com>
24520 Put the setter of access specifiers in class_decl::member_base
24522 (class_decl::member_base::set_access_specifier): Put the setter
24523 for access specifier here, where it belongs ...
24524 (class_decl::member_type::set_access_specifier): ... not here.
24526 2014-02-21 Dodji Seketeli <dodji@redhat.com>
24528 First approach to avoid duplication of IR nodes for forward-declared classes
24529 * src/abg-dwarf-reader.cc (is_declaration_only): Put this back (I
24530 removed it earlier).
24531 (build_class_type_and_add_to_ir): If the class is a
24532 declaration-only (a forward declaration), do not add a new
24533 declaration only IR node.
24535 2014-02-21 Dodji Seketeli <dodji@redhat.com>
24537 Do not forget to set the indexes of fn parms
24538 * include/abg-ir.h (function_type::function_type): In the
24539 constructor that takes a vector of parms, walk the vector and set
24540 the indexes of the parms.
24542 2014-02-19 Dodji Seketeli <dodji@redhat.com>
24544 Misc diff reporting output cleanup
24545 * src/abg-comparison.cc (function_decl_diff::report): Do not talk
24546 about changed function anymore. Rather, say that some indirect
24547 sub-types changed in the function.
24549 2014-02-19 Dodji Seketeli <dodji@redhat.com>
24551 Do not forget some member types/functions we built IR nodes for
24552 * src/abg-dwarf-reader.cc (build_class_type_and_add_to_ir):
24553 Associate the member type IR node to the offset of the die of the
24555 (build_ir_node_from_die): For a DW_TAG_subprogram DIE that has a
24556 DW_AT_specification pointing to another subprogram DIE, associate
24557 the offset of this DIE to the IR node of that other DIE.
24559 2014-02-19 Dodji Seketeli <dodji@redhat.com>
24561 Better support of static member variables
24562 * include/abg-fwd.h (fqn_to_components)
24563 (lookup_type_in_translation_unit, demangle_cplus_mangled_name):
24564 Declare new public entry points
24565 * src/abg-comparison.cc (corpus_diff::report): Report stuff about
24566 global variables using their mangled name, and demangle them. If
24567 there is no mangled name for the variable, then use its pretty
24569 (compute_diff): For the corpus overload, compare global variables
24570 using their mangled name, if its available; otherwise, fall back
24571 to using their pretty representation.
24572 * src/abg-corpus.cc (var_comp::operator()(const var_decl*,
24573 const_var_decl*)): Compare variables using their mangled name in
24574 priority. If it's not available then use their pretty
24576 * src/abg-dwarf-reader.cc
24577 (read_context::var_decls_to_re_add_to_tree): New accessor.
24578 (build_translation_unit_and_add_to_ir): If there is what appears
24579 to be a definition of a static member variable variable -- this is
24580 in case this definition lacks the DW_AT_specification attribute
24581 that links it to the DW_TAG_member or DW_TAG_variable DIE that is
24582 a child of the right class/structure DIE -- that is not at the
24583 right place in the DIE tree, remove it from the its current place
24584 in the tree and try to hang it off of the right DIE. To do this,
24585 de-mangle its mangled name, look at what is supposed to be the
24586 parent class name, look it up in the translation unit IR, and if
24587 found, stick the variable IR node in there, as a static member
24588 variable. If not found, then bad luck.
24589 (build_class_type_and_add_to_ir): Do not try to see if a member
24590 variable is static here as the way I was doing it was unreliable.
24591 Build the data member node directly w/o going through building a
24592 variable node first. Register the data member in the die offset
24594 (build_ir_node_from_die): When seeing DW_TAG_variable, look for a
24595 DW_AT_specification attribute. If there is one, then it points to
24596 a the DIE of a data member and means that data member is static.
24597 Flag the IR node of that data member as static thus. Update the
24598 die offset -> IR node map. If there is no DW_AT_specification
24599 attribute or if it doesn't point to a data member DIE, schedule
24600 this variable tag for a stage when after the whole IR is built for
24601 the translation unit, the variable's mangled named is inspected,
24602 its hypothetical parent struct/class is looked up and the variable
24603 IR node is put into the node of the right struct/class IR node.
24604 * src/abg-ir.cc (enum lookup_entity_kind): New.
24605 (fqn_to_components, iterator, lookup_type_in_translation_unit)
24606 (lookup_node_in_translation_unit, lookup_type_in_translation_unit)
24607 (demangle_cplus_mangled_name): New function definitions.
24609 2014-02-19 Dodji Seketeli <dodji@redhat.com>
24611 Shorten an accessor name in the DWARF reader
24612 * src/abg-dwarf-reader.cc (read_context::cur_tu): Rename
24613 read_context::current_translation_unit into this.
24614 (read_context::current_scope, die_location)
24615 (build_translation_unit_and_add_to_ir, build_enum_type)
24616 (build_function_decl): Adjust wrt the change above.
24618 2014-02-19 Dodji Seketeli <dodji@redhat.com>
24620 Unset decl scope when removing the decl from its scope
24621 * src/abg-ir.cc (remove_decl_from_scope): Unset the scope of the
24624 2014-02-19 Dodji Seketeli <dodji@redhat.com>
24626 Support adding data member from var_decl
24627 * src/abg-ir.cc (class_decl::insert_member_decl): Support taking
24629 (class_decl::add_data_member): Do not insert a data member twice.
24631 2014-02-19 Dodji Seketeli <dodji@redhat.com>
24633 Fix qualified type pretty printing
24634 * src/abg-ir.cc (qualified_type_def::qualified_type_def): Remove
24635 useless white space.
24637 2014-02-19 Dodji Seketeli <dodji@redhat.com>
24639 Add class_decl::member_base::set_is_static() accessor
24640 * include/abg-ir.h (class_decl::member_base::get_is_static):
24641 Rename is_static into get_is_static.
24642 (class_decl::member_base::set_is_static): New accessor.
24643 * src/abg-comparison.cc (represent): Adjust for
24644 class_decl::member_base::is_static -> get_is_static.
24645 * src/abg-corpus.cc (symtab_build_visitor_type::visit): Likewise.
24646 src/abg-hash.cc (class_decl::member_function::hash::operator()):
24648 * src/abg-ir.cc (class_decl::member_base::operator==): Likewise.
24649 * src/abg-writer.cc (write_class_decl): Likewise.
24651 2014-02-13 Dodji Seketeli <dodji@redhat.com>
24653 Fixes needed to diff libstdc++ v4_4 against master
24654 * src/abg-comparison.cc
24655 (class_diff::ensure_lookup_tables_populated): Support several
24656 instances of the same member function being deleted. That can
24657 happen when the same member function was present in the initial
24658 class several times. Yeah, I've seen that in dwarf.
24659 * src/abg-corpus.cc (corpus::priv::build_symbol_table): Do not add
24660 the same variable (identified by its mangled name) twice in the
24661 variable symbol table.
24663 2014-02-13 Dodji Seketeli <dodji@redhat.com>
24665 Fix wrong deleted functions count when diffing corpora
24666 * src/abg-comparison.cc
24667 (corpus_diff::priv::ensure_lookup_tables_populated): If a function
24668 has changed, deleted it from the list the removed functions.
24670 2014-02-13 Dodji Seketeli <dodji@redhat.com>
24672 Several fixes needed to read libstdc++.so
24673 * src/abg-reader.cc (read_context::map_id_and_node): Allow
24674 duplicated class and basic type declarations.
24675 (build_type_decl): Allow duplicated type decls.
24676 (build_qualified_type_decl, build_pointer_type_def)
24677 (build_reference_type_def): As there can be several distinct
24678 duplicated types, compare them by value.
24679 (build_class_decl): There can be duplicated class decls.
24680 * src/abg-writer.cc (write_enum_type_decl): The name of the enum
24681 needs to be xml-escaped.
24683 2014-02-12 Dodji Seketeli <dodji@redhat.com>
24685 qualified, pointer and reference types can be member types
24686 * src/abg-reader.cc (build_qualified_type_decl)
24687 (build_pointer_type_def, build_reference_type_def): Consider that
24688 these types can be member types.
24690 2014-02-12 Dodji Seketeli <dodji@redhat.com>
24692 Consider two typedefs with different names to be different
24693 * src/abg-ir.cc (typedef_decl::operator==): Consider two typedefs
24694 with different names to be different.
24696 2014-02-12 Dodji Seketeli <dodji@redhat.com>
24698 Really Avoid trying to build IR nodes for non-public functions
24699 * src/abg-dwarf-reader.cc (build_ir_node_from_die): For the
24700 DW_TAG_subprogram case, bail out early if the current function is
24703 2014-02-12 Dodji Seketeli <dodji@redhat.com>
24705 Add --{changed,deleted,added}-{fns,vars} options to bidiff
24706 * include/abg-comparison.h
24707 (diff_context::{show_{deleted,changed_added}_{fns,vars}}): Declare
24709 (corpus_diff::context): Declare new getter.
24710 * src/abg-comparison.cc
24711 (diff_context::{show_{deleted,changed_added}_{fns,vars}}): Define
24712 these new accessors.
24713 (corpus_diff::priv::emit_corpus_diff_stats): Define new function.
24714 (corpus_diff::context()): Define new getter.
24715 (corpus_diff::report): Use the new
24716 corpus_diff::priv::emit_corpus_diff_stats to emit diff stats at
24717 the beginning of the report. Conditionalise emitting the
24718 different parts of the reports (changed,deleted,added stuff) on
24719 the values of the new properties that were just added.
24721 (options::{show_{deleted,changed,added}_{fns,vars}): New
24723 (display_usage, parse_command_line): Update for the newly added
24724 --{changed,deleted,added}-{fns,vars} command line options.
24725 (set_diff_context_from_opts): Define new static function.
24726 (main): Create a diff context, initialize it from the options
24727 (using set_diff_context_from_opts) and pass it to compute_diff.
24729 2014-02-11 Dodji Seketeli <dodji@redhat.com>
24731 Add --show-symtabs to bidiff
24732 * tools/bidiff.cc (display_usage): Update usage string.
24733 (parse_command_line): Recognize the --show-symtab cmdline option.
24734 (display_symtabs): New static function.
24735 (main): Call the new display_symtabs.
24737 2014-02-11 Dodji Seketeli <dodji@redhat.com>
24739 Harden class_decl node traversal code
24740 * src/abg-ir.cc (class_decl::traverse): Add a few asserts here and there.
24742 2014-02-11 Dodji Seketeli <dodji@redhat.com>
24744 Fix the pretty representation for member functions
24745 * src/abg-ir.cc (function_decl::get_pretty_representation): Fix
24746 this to properly display the representation of member functions.
24747 * tests/data/test-bidiff/test-enum0-report.txt: Update this.
24748 * tests/data/test-bidiff/test-enum1-report.txt: Likewise.
24749 * tests/data/test-bidiff/test-qual-type0-report.txt: Likewise.
24750 * tests/data/test-bidiff/test-struct0-report.txt: Likewise.
24751 * tests/data/test-bidiff/test-struct1-report.txt: Likewise.
24753 2014-02-11 Dodji Seketeli <dodji@redhat.com>
24755 Do not forget to traverse member types
24756 * include/abg-ir.h (class_decl::member_type::traverse): Declare new virtual
24758 (ir_node_visitor::visit): Declare new virtual function
24759 * src/abg-ir.cc (class_decl::member_type::traverse): Implement the
24760 traversal of a member type.
24761 (ir_node_visitor::visit): Provide a default implementation for the
24762 visitor of member type.
24764 2014-02-11 Dodji Seketeli <dodji@redhat.com>
24766 From DWARD, avoid adding IR nodes for member functions twice
24767 * include/abg-fwd.h (as_non_member_class_decl): Declare new overload.
24768 * src/abg-ir.cc (as_non_member_class_decl): Define new overload.
24769 * src/abg-dwarf-reader.cc (build_class_type_and_add_to_ir): Add
24770 member functions to the DIE -> IR Node map.
24771 (build_ir_node_from_die): Assert that DW_TAG_subprogram cannot be
24772 for a member function here because getting the scope of the member
24773 function would have constructed the entire class that contains it,
24774 including the member function. Then, calling
24775 build_ir_node_from_die for the DIE of the member function would
24776 find the already IR Node in the DIE -> IR Node map.
24778 2014-02-11 Dodji Seketeli <dodji@redhat.com>
24780 Fix access specifiers value
24781 * include/abg-ir.h (class_decl::enum access_specifier): Give the enumerators
24782 the same values as what the DWARF spec says.
24784 2014-02-10 Dodji Seketeli <dodji@redhat.com>
24786 Misc diff report cleanups
24787 * include/abg-ir.h (function_decl::parameter::get_type_name): Add
24789 (function_decl::parameter::get_type_pretty_representation): New
24791 * src/abg-comparison.cc (represent): When representing changed
24792 members, use their pretty representation.
24793 (function_decl_diff::{ensure_lookup_tables_populated, report}): Use the
24794 pretty representation of parameters type.
24795 (typedef_diff::report): Enclose the underlying type in "'".
24796 (corpus_diff::report): Add proper spacing.
24798 2014-02-10 Dodji Seketeli <dodji@redhat.com>
24800 Re-organize the output of diffing two corpora
24801 * src/abg-comparison.cc (corpus_diff::report): Emit
24802 information about the number of added/removed/changed
24803 functions. If the report is big, prefix any added
24804 function with '[A]' deleted function with '[B]'. Also,
24807 2014-02-10 Dodji Seketeli <dodji@redhat.com>
24809 Support diffing entities of different kinds.
24810 * include/abg-comparison.h (class distinct_diff): Declare new
24812 (compute_diff_for_distinct_kinds): Declare new function.
24813 * src/abg-comparison.cc (distinct_diff::{distinct_diff, first,
24814 second, entities_are_of_distinct_kinds, length, report}): Define
24815 new member functions.
24816 (compute_diff_for_distinct_kinds, try_to_diff_distinct_kinds):
24817 Define new function.
24818 (compute_diff_for_types, compute_diff_for_decls): Support diffing
24819 entities of different kinds.
24821 2014-02-10 Dodji Seketeli <dodji@redhat.com>
24823 Avoid recursive comparison on class_decl & perform some optimizations
24824 * src/abg-ir.cc (class_decl::operator==(const decl_base& other)
24825 const): Bail out early in case of recursive comparison, or if type
24826 hashes are different. Do not try to compute qualified name unless
24827 it's really necessary. The optimizations part of this change were
24828 hinted by profiling.
24830 2014-02-10 Dodji Seketeli <dodji@redhat.com>
24832 Handle the DIE for a fn that has a 'specification' attribute
24833 * src/abg-dwarf-reader.cc (build_ir_node_from_die): For the
24834 DW_TAG_subprogram case, if the function has a DW_AT_specification
24835 attribute, build the IR node for the specification DIE instead.
24837 2014-02-10 Dodji Seketeli <dodji@redhat.com>
24839 Add an assert in the dwarf reader
24840 * src/abg-dwarf-reader.cc (build_class_type_and_add_to_ir):
24841 Assert that the result of build_function_decl on a member function
24844 2014-02-10 Dodji Seketeli <dodji@redhat.com>
24846 Do not forget that build_ir_node_from_die can return member types
24847 * src/abg-dwarf-reader.cc (get_scope_for_die): Handle member class
24849 (build_function_decl): Likewise.
24851 2014-02-10 Dodji Seketeli <dodji@redhat.com>
24853 A member function can have an empty mangled name
24854 * src/abg-comparison.cc
24855 (class_diff::ensure_lookup_tables_populated): If a member function
24856 has an empty mangling name, use its pretty representation.
24858 2014-02-10 Dodji Seketeli <dodji@redhat.com>
24860 Remove too eager asserts
24861 * src/abg-comparison.cc
24862 (class_diff::ensure_lookup_tables_populated): Do not assert that
24863 the same member type cannot be deleted/inserted twice. It
24864 actually can for, pointers, references, typedefs, etc.
24866 2014-02-10 Dodji Seketeli <dodji@redhat.com>
24868 Fix some new line handling in diff reports
24869 * src/abg-comparison.cc (represent): Remove extra new line after
24870 reporting virtual function number.
24871 (class_diff::report): Do not forget to emit a new line between two
24872 inserted functions.
24874 2014-02-10 Dodji Seketeli <dodji@redhat.com>
24876 Perform the diff of changed functions and variables in the right order
24877 * src/abg-comparison.cc
24878 (corpus_diff::priv::ensure_lookup_tables_populated): In a changed
24879 function or variable, do not mix up the new and old value.
24881 2014-02-10 Dodji Seketeli <dodji@redhat.com>
24884 * src/abg-comparison.cc (reference_diff::report): Fix typo
24885 refereneced -> referenced.
24887 2014-02-10 Dodji Seketeli <dodji@redhat.com>
24889 Fix various crashes
24890 * src/abg-comparison.cc (decls_equal::operator()(const decls_type,
24891 const decls_type) const): Do not crash when of the decl_types is
24893 ({pointer_diff, reference_diff, enum_diff}::length): Avoid
24894 crashing if the underlying type is NULL.
24895 * abg-ir.cc (function_decl::get_pretty_representation): Avoid
24896 crashing on member functions with empty parameter set.
24897 signed-off-by: Dodji Seketeli <dodji@redhat.com>
24899 2014-02-10 Dodji Seketeli <dodji@redhat.com>
24901 More optimizations hinted by profiling
24902 * include/abg-ir.h (decl_base::qualified_name_): New member.
24903 (decl_base::get_qualified_name): Cache the qualified name.
24904 (decl_base::get_type): Return a reference on the shared pointer.
24905 (method_type::get_class_type): Likewise.
24906 (class_decl::get_definition_of_declaration): Likewise.
24907 (class_decl::member_type::get_underlying_type): Likewise.
24908 (class_decl::base_spec::get_base_class): Likewise.
24909 * src/abg-ir.cc (decl_base::get_qualified_name): Implement the
24911 (class_decl::member_type::get_qualified_name): Return a reference
24912 on the shared pointer.
24914 2014-02-10 Dodji Seketeli <dodji@redhat.com>
24916 Avoid crashing when getting function parm type name
24917 * include/abg-ir.h (function_decl::parameter::get_type_name): New
24919 * src/abg-comparison.cc
24920 (function_decl_diff::ensure_lookup_tables_populated): Use the new
24921 member function above.
24923 2014-02-10 Dodji Seketeli <dodji@redhat.com>
24925 Small optimization hinted by profiling
24926 * include/abg-diff-utils.h (d_path_vec::max_d): Avoid using member
24927 functions. This is relevant only when compiling w/o optimization.
24929 2014-02-10 Dodji Seketeli <dodji@redhat.com>
24931 Fix allocation of diff_utils::d_path_vec
24932 * include/abg-diff-utils.h (d_path_vec::d_path_vec): Do not
24933 forget to allocate enough data for reverse vectors as well. The
24934 comment of the constructor is accurate.
24936 2014-02-07 Dodji Seketeli <dodji@redhat.com>
24939 * include/abg-hash.h (combine_hashes): Remove trailing white
24941 * include/abg-ir.h (class function_decl): Add end-of-class
24943 (struct type_base::cached_hash): Fix comment.
24944 * src/abg-comparison.cc: Remove useless new line.
24945 * src/abg-corpus.cc: Likewise.
24946 * src/abg-writer.cc: Likewise.
24948 2014-02-07 Dodji Seketeli <dodji@redhat.com>
24950 Support looking through decl-only classes and update diff reports accordingly
24951 * include/abg-comparison.h (class diff_context): New class.
24952 (class diff::{ctxt_, reported_once_, currently_reporting_}): New
24954 (diff::diff): Initialize the new data members above.
24955 (diff::{context, currently_reporting, reported_once}): New
24957 (compute_diff, var_diff::var_diff, pointer_diff::pointer_diff)
24958 (reference_diff::reference_diff, qualified_type_diff)
24959 (enum_diff:enum_diff, class_diff::class_diff)
24960 (scope_diff::scope_diff, function_decl_diff::function_decl_diff)
24961 (type_decl_diff::type_decl_diff, typedef_diff::typedef_diff)
24962 (translation_unit_diff::translation_unit_diff, corpus_diff::corpus_diff):
24963 Take an additional pointer to diff_context.
24964 * abg-comparison.cc (diff_context::{has_diff_for,
24965 has_diff_for_types, add_diff}): New methods.
24966 (try_to_diff, compute_diff_for_types, compute_diff_for_decls)
24967 (represent): Take an additional pointer to
24968 diff_context in argument. In the later function, do not re-report
24969 a diff if it has already been reported, or if it's being reported
24971 (var_diff::var_diff, pointer_diff::pointer_diff)
24972 (reference_diff::reference_diff)
24973 (qualified_type_diff::qualified_type_diff, enum_diff::enum_diff)
24974 (class_diff::class_diff, scope_diff::scope_diff)
24975 (function_decl_diff::function_decl_diff, type_decl::type_decl)
24976 (typedef_diff::typedef_diff)
24977 (translation_unit_diff::translation_unit_diff)
24978 (corpus_diff::corpus_diff): Take an additional pointer to
24979 diff_context in argument.
24980 ({pointer_diff, qualified_type_diff,
24981 reference_type_diff}::report): do not re-report a diff about the
24982 underlying type if it has already been reported, or if it's being
24984 (enum_diff::report): Fix this to properly use the populated lookup
24986 (compute_diff): take an additional pointer to diff_context in
24987 argument. For the var_decl, pointer_diff reference_type_diff,
24988 qualified_type_diff enum_diff, scope_diff, function_decl_diff,
24989 type_decl_diff and typedef_diff overloads, do not re-build a diff
24990 object, if one exits already. Otherwise, record the new diff
24991 object created so that it can be re-used later.
24992 (enum_diff::ensure_lookup_tables_populated): Fix logic to avoid
24994 (class_decl::priv::{deleted_member_functions_,
24995 inserted_member_functions_, changed_member_function_}): New
24996 members to support reporting about member functions changes.
24997 (class_decl::{lookup_tables_empty, clear_lookup_tables, length):
24998 Update for the new additions above.
24999 (class_decl::ensure_lookup_tables_populated): Likewise. Fix to
25000 properly use the lookup tables and also avoid a going through
25001 several loops to compute the changed members.
25002 (class_decl::report): Flip a switch to make the beginning and end
25003 of the reporting, in the context. Also, do not try to report
25004 again, if we were already reporting this diff. Fix quite some
25005 spots to properly use the lookup tables.
25006 (scope_diff::ensure_lookup_tables_populated): Skip decl-only
25007 classes during comparison. Fix some thinkos. Fix logic to avoid a
25009 (scope_diff::report): Adjust to pass a context to
25010 compute_diff_for_types.
25011 (function_decl_diff::ensure_lookup_tables_populated): Fix logic to
25013 (function_decl_diff::report): Adjust call to
25014 compute_diff_for_types to pass the context.
25015 (typedef::report): Avoid re-reporting the diff of the underlying
25016 types, if we are already reporting it.
25017 (corpus_diff::priv::ensure_lookup_tables_populated): Use the
25018 pretty representation of the function rather than its name to key
25019 the maps of deleted and added functions. Fix logic to avoid going
25020 through an additional loop for the changed functions.
25021 (corpus_diff::report): Add a title for removed/added/changed
25022 functions. Fix indentation for added/removed/changed functions.
25023 * include/abg-ir.h (class_decl::comparison_started_): New member
25024 * src/abg-dwarf-reader.cc (is_public_decl): Style fix.
25025 (is_declaration_only_): New static function.
25026 (build_class_type_and_add_to_ir): Create decl-only classes (IR) for
25027 classes flagged as declaration-only in the DWARF.
25028 * src/abg-hash.cc (class_decl::hash::operator()): Do not forget to
25029 include the "is_declaration_only" flag into the hashing.
25030 * src/abg-ir.cc (class_decl::operator==): Look through decl-only
25031 classes to get their definitions and compare the definitions
25032 instead. Avoid comparing member types and fns if the comparison
25033 of this type has already started.
25034 * src/abg-reader.cc (build_class_decl): Set the definition of a
25035 declaration, when we see it.
25036 * tests/data/test-bidiff/test-qual-type0-report.txt: Update.
25037 * tests/data/test-bidiff/test-struct0-report.txt: Likewise.
25038 * tests/data/test-bidiff/test-struct1-report.txt: Likewise.
25039 signed-off-by: Dodji Seketeli <dodji@redhat.com>
25041 2014-02-07 Dodji Seketeli <dodji@redhat.com>
25043 Support reading *.bi input with duplicated qualified type ids.
25044 * src/abg-reader.cc (read_context::map_id_and_node): Support
25045 qualified types with duplicated ids.
25047 2014-02-07 Dodji Seketeli <dodji@redhat.com>
25049 Fix comparison of member types
25050 * src/abg-ir.cc (class_decl::member_type::operator==): Compare the
25051 underlying type of the member type.
25053 2014-02-07 Dodji Seketeli <dodji@redhat.com>
25055 Avoid duplicated entries in the symbol tables of the corpus
25056 * include/abg-ir.h ({var_decl, function_decl}::ptr_equal): New
25057 equality functor for pointers to var_decl and function_decl.
25058 ({function_decl, var_decl}::hash): Make these hashing functors
25060 * include/abg-hash.cc (struct var_decl::hash, struct
25061 function_decl::hash): Remove these from here. There are now in
25062 the public abg-ir.h.
25063 ({var_decl, function_decl}::hash::operator()): Define these here.
25064 * src/abg-corpus.cc (symtab_build_visitor_type::{fns_map,
25065 fn_is_in_map, add_fn_to_map, vars_map, var_is_in_map,
25066 add_var_to_map}): New accessors.
25067 (corpus::priv::build_symbol_table): Avoid duplicated entries in
25068 variables and functions symbols tables.
25070 2014-02-07 Dodji Seketeli <dodji@redhat.com>
25072 Ease debugging of abigail::diff_utils::compute_diff
25073 * include/abg-diff-utils.h (compute_diff): Add asserts on for the
25074 length of the shortest edit script during the divide and conquer
25075 part of the diff algorithm.
25077 2014-02-07 Dodji Seketeli <dodji@redhat.com>
25079 Fix further reaching reverse path calculation in core diff algo
25080 * include/abg-diff-utils.h (end_of_frr_d_path_in_k_plus_delta):
25081 Favour moving left when the two abscissas at the previous steps
25083 (compute_diff): Update the length of the shortest edit script when
25084 the size of one of the inputs is zero.
25085 * tests/test-core-diff.cc (in_out_spec): Add a new input to diff
25086 two sequences for regression testing.
25087 * tests/data/test-core-diff/report13.txt: New reference for
25088 the comparison of the new regression test above.
25090 2014-02-07 Dodji Seketeli <dodji@redhat.com>
25092 Add debugging facilities for core diffing issues
25093 * include/abg-ir.h (fns_to_str): Declare new fn.
25094 * src/abg-ir.cc (get_next_string, fn_to_str, fns_to_str): New
25096 (fns_to_str): Define new fn.
25097 * tools/abg-tools-utils.cc (dump_functions_as_string)
25098 (dump_function_names, compare_functions): New functions.
25100 2014-01-20 Dodji Seketeli <dodji@redhat.com>
25103 * src/abg-ir.cc (decl_base::operator==): Fix comment.
25105 2014-01-20 Dodji Seketeli <dodji@redhat.com>
25107 Fix bilint outputting for translation units & corpus
25108 * tools/bilint.cc (main): Fix logic.
25110 2014-01-20 Dodji Seketeli <dodji@redhat.com>
25112 Remove debugging assertion when diffing
25113 * include/abg-diff-utils.h (d_path_vec::at): Do not check for
25116 2014-01-20 Dodji Seketeli <dodji@redhat.com>
25118 Do not use exceptions in dynamic_cast
25119 * src/abg-ir.cc (class_decl::member_function::operator==)
25120 (class_decl::member_function::operator==): Do not use the
25121 exception path for dynamic casting. This was near the top of many
25124 2014-01-20 Dodji Seketeli <dodji@redhat.com>
25126 Just add decls sequentially when reading from DWARF
25127 * src/abg-dwarf-reader.cc (insert_decl_into_ir_under_scope)
25128 (build_namespace_decl_and_add_to_ir, build_enum_type)
25129 (build_class_type_and_add_to_ir, build_ir_node_from_die)
25130 (build_ir_node_from_die): Remove.
25131 * tests/data/test-read-dwarf/test0.abi: Update because now type
25132 IDs can be used before they are defined.
25133 * tests/data/test-read-dwarf/test1.abi: Likewise.
25135 2014-01-17 Dodji Seketeli <dodji@redhat.com>
25137 Misc Doxygen API doc fixes
25138 * include/abg-comparison.h: Various doxygen api doc string fixes.
25139 * include/abg-diff-utils.h: Likewise.
25140 * include/abg-dwarf-reader.h: Likewise.
25141 * include/abg-ir.h: Likewise.
25142 * include/abg-reader.h: Likewise.
25143 * include/abg-writer.h: Likewise.
25144 * src/abg-comparison.cc: Likewise.
25145 * src/abg-corpus.cc: Likewise.
25146 * src/abg-dwarf-reader.cc: Likewise.
25147 * src/abg-ir.cc: Likewise.
25148 * src/abg-libxml-utils.cc: Likewise.
25149 * src/abg-reader.cc: Likewise.
25150 * src/abg-writer.cc: Likewise.
25152 2014-01-17 Dodji Seketeli <dodji@redhat.com>
25154 Fix bilint --noout, add --diff option
25155 * tools/bilint.cc (options::options): Initialize ...
25156 (options::{diff, bidiff}): ... new members.
25157 (display_usage): Update the display usage string for --diff &
25159 (parse_command_line): Support the --diff and --bidiff options.
25160 (main): Require the --diff option to actually diff the emitted
25161 output with input. Make --noout really work for when reading
25164 2014-01-17 Dodji Seketeli <dodji@redhat.com>
25166 Read .abi files with types used before being defined & lots of fixes
25167 * src/abg-reader.cc (read_context::m_decls_stack): Make this is a
25168 std::deque, rather than a std::stack.
25169 (read_context::{get_id_xml_node_map,
25170 clear_id_xml_node_map, get_xml_node_decl_map,
25171 map_xml_node_to_decl, get_decl_for_xml_node,
25172 clear_xml_node_decl_map, map_id_and_node, get_xml_node_from_id,
25173 get_scope_for_node, build_or_get_type_decl}): New member
25175 (read_context::{get_cur_decl, push_decl, pop_decl}): Update this
25176 now that the decl stack uses a std::deque.
25177 (read_context::clear_decls_stack): New.
25178 (read_context::get_translation_unit): Use the first decl of the
25179 decl stack, that is most certainly the global scope of the current
25180 translation unit, to get the translation unit.
25181 (read_context::key_type_decl): Take a new flag to force the
25182 re-keying; that is set an id to a new type, even if the id was
25183 already set to a type.
25184 (read_context::push_and_key_type_decl): Assert that a type must
25185 have a declaration.
25186 (handle_*): Make these return the decl_base_sptr resulting from
25187 the parsing of the xml node, rather than just a bool.
25188 (walk_xml_node_to_map_type_ids): New static function.
25189 (read_translation_unit_from_input): Read the abi-instr xml
25190 sub-tree once, just to build an id->xml node map. That way, when a
25191 declaration needs a type what is not yet defined, it can just get
25192 its XML node, build the type from it and use it. Do not forget to
25193 advance the xml reader cursor when the reading of the 'abi-instr'
25194 sub-tree is read. Clear all the new maps we have used for the
25195 current translation unit.
25196 (handle_element_node): Cleanup logic.
25197 (build_namespace_decl): Update the new xml node -> decl map, and
25198 use it to avoid building the same namespace twice.
25199 (build_function_parameter): Do not even try to get the type of a
25200 variadic parameter.
25201 (build_function_decl, build_var_decl): Support types that are defined later.
25202 (build_type_decl): Do not build the same type twice. But there
25203 can be several 'unnamed-enum-underlying-type' node. In that case
25204 just return the previous one.
25205 (build_qualified_type_decl, build_pointer_type_def)
25206 (build_reference_type_def, build_enum_type_decl)
25207 (build_typedef_decl): Support underlying type defined later.
25208 (build_class_decl): Support declaration-only related cases where
25209 we can have several xml nodes with the same id. Update the new
25210 xml node -> IR node maps. Fix member type adding.
25211 (build_type_tparameter, build_non_type_tparameter)
25212 (build_template_tparameter): Support used types defined later.
25214 2014-01-17 Dodji Seketeli <dodji@redhat.com>
25216 Fix member class template creation
25217 * src/abg-ir.cc (class_decl::add_member_class_template): Do not
25218 forget the scope of the member class template itself.
25220 2014-01-17 Dodji Seketeli <dodji@redhat.com>
25222 Avoid endless loop in unescape_xml_string
25223 * src/abg-libxml-utils.cc (unescape_xml_string): Avoid and endless
25224 loop for strings containing an '&' but that are not pre-defined
25227 2014-01-17 Dodji Seketeli <dodji@redhat.com>
25229 Fix a potential crash
25230 * src/abg-ir.cc (decl_base::get_qualified_name): Do not crash if
25231 the scope is empty.
25233 2014-01-17 Dodji Seketeli <dodji@redhat.com>
25235 Do not loose the member type information when reading them from DWARF
25236 * include/abg-ir.h (class_decl::declaration_): Make this be a
25237 decl_base_sptr so that it can actually be a
25238 class_decl::member_type which underlying type is a class decl.
25239 (class_decl::{set, get}_earlier_declaration): Take or return a
25240 decl_base_sptr rather than a class_decl_sptr.
25241 * src/abg-ir.cc (class_decl::set_earlier_declaration): Take a
25242 decl_base_sptr rather than a class_decl_sptr.
25243 * src/abg-dwarf-reader.cc (die_class_map_type): Make this map take
25244 decl_base_sptr rather than a class_decl_sptr.
25245 (build_class_type_and_add_to_ir): If the class being currently
25246 built is a member class, do not loose that information after it
25247 has been added to its scope. Also, base types and types of member
25248 variables can be member types and should retain that information.
25249 (build_qualified_type): Likewise, the underlying type of a
25250 qualified type shouldn't loose the information about its
25251 potentially being a member type.
25252 (build_pointer_type_def, build_reference_type, build_typedef_type)
25253 (build_var_decl, build_function_decl): Likewise.
25255 2014-01-17 Dodji Seketeli <dodji@redhat.com>
25257 Fix hashing of member types
25258 * include/abg-ir.h (class_decl::{member_function_template,
25259 member_class_template}): Make these inherit from decl_base, to
25260 comply with class_decl::member_type.
25261 (class_decl_base_spec::{base_spec, member_type, member_function,
25262 member_function_template, member_class_template}::hash): Declare
25263 these hashing functors in the header here.
25264 (class_decl::{member_base, member_type, data_member,
25265 member_function, member_function_template,
25266 member_class_template}::hash::operator()): define these out of
25268 (type_base::dynamic_hash::operator()): Update this to hash member
25270 * src/abg-writer.cc (write_qualified_type_def)
25271 (write_pointer_type_def, write_class_decl)
25272 (write_reference_type_def, write_enum_type_decl): Add an overload
25273 that takes the type ID to use in the serialization.
25274 (write_member_type): New implementation.
25276 2014-01-17 Dodji Seketeli <dodji@redhat.com>
25278 A Member class can also be a scope for other decls in DWARF
25279 * include/abg-fwd.h (as_non_member_class_decl): Declare ...
25280 * src/abg-ir.cc (as_non_member_class_decl): ... this new function.
25281 * include/abg-ir.h (class class_decl::member_type): Add more
25282 comments about member types.
25283 * src/abg-dwarf-reader.cc (get_scope_for_die): Use the new
25284 as_non_member_class_decl here.
25286 2014-01-17 Dodji Seketeli <dodji@redhat.com>
25289 * include/abg-ir.h (location_manager::_Impl): Rename this type
25291 * src/abg-ir.cc b/src/abg-ir.cc (location_manager::_Impl):
25293 (location_manager::location_manager): Update for the renaming
25295 * src/abg-reader.cc (build_type_decl): Remove useless white space.
25296 (build_enum_type_decl, build_class_decl): Use the _sptr typedef in
25299 2014-01-14 Dodji Seketeli <dodji@redhat.com>
25301 Update namespace comments
25302 * src/abg-dwarf-reader.cc (namespace dwarf_reader): Add apidoc comment.
25303 * src/abg-reader.cc (namespace xml_reader): Update apidoc comment.
25305 2014-01-14 Dodji Seketeli <dodji@redhat.com>
25307 Expand 'abi-instr' XML element nodes during de-serialization
25308 * src/abg-reader.cc (update_read_context)
25309 (update_depth_info_of_read_context): Remove.
25310 (read_context::{pop_scope, pop_scope_or_abort): New.
25311 (read_context::{push_decl_to_current_scope,
25312 push_and_key_type_decl}): Remove the overloads that take the
25313 'update_depth_info' boolean.
25314 (build_namespace_decl): New static function.
25315 (build_function_decl, build_var_decl, build_type_decl)
25316 (build_qualified_type_decl, build_pointer_type_def)
25317 (build_reference_type_def, build_enum_type_decl, build_type_decl)
25318 (build_class_decl, build_function_tdecl, build_class_tdecl)
25319 (build_type_tparameter, build_type_composition)
25320 (build_non_type_tparameter, build_template_tparameter)
25321 (build_template_parameter, build_type): Remove the
25322 'update_depth_info' boolean from parameters.
25323 (handle_element_node): Renamed handle_element into this. Take an
25324 xml node and a boolean to add the resulting IR node to the IR.
25325 (handle_type_decl, handle_namespace_decl)
25326 (handle_qualified_type_decl, handle_pointer_type_def)
25327 (handle_reference_type_def, handle_enum_type_decl)
25328 (handle_typedef_decl, handle_var_decl, handle_function_decl)
25329 (handle_class_decl, handle_function_tdecl, handle_class_tdecl):
25330 Take an xml node and a boolean to add the resulting IR node to the
25332 (advance_cursor): No more need to call update_read_context.
25333 (read_translation_unit_from_input): Expand the 'abi-instr' node
25334 into memory so that we walk its XML nodes and build the IR nodes
25336 (read_location): Remove the overload that was using the xml reader.
25339 2014-01-14 Dodji Seketeli <dodji@redhat.com>
25342 * src/abg-reader.cc (read_context::{get_cur_decl, pop_decl}): Return
25343 decl_base_sptr rather than shared_ptr<decl_base>.
25344 (read_context::push_decl): Take a decl_base_sptr rather than
25345 shared_ptr<decl_base>.
25347 2014-01-14 Dodji Seketeli <dodji@redhat.com>
25350 * include/abg-comparison.h (class var_diff): @ref var_decls ->
25352 * src/abg-comparison.cc (function_decl_diff::first_function_decl):
25353 @Return -> @return.
25355 2014-01-14 Jonathan Wakely <jwakely@redhat.com>
25357 Fix checkout & build instructions
25358 * CONTRIBUTING: Fix Git repository url.
25359 * doc/website/mainpage.txt: Add elfutils into the dependencies
25360 list and fix the repository directory name. Also use autoreconf
25362 * include/abg-fwd.h: Fix Git repository URL.
25364 2014-01-13 Dodji Seketeli <dodji@redhat.com>
25366 Tweak dwarf reading test to detect more namespace linking-fu
25367 * tests/data/test-read-dwarf/test0.cc: Define a member function
25368 out-of-line, outside of its namespace.
25369 * tests/data/test-read-dwarf/test0.abi: Update the .abi file.
25370 * tests/data/test-read-dwarf/test0: Update the resulting binary.
25372 2014-01-13 Dodji Seketeli <dodji@redhat.com>
25374 Add asserts to detect type id mis-management in native format
25375 * read_translation_unit_from_input
25376 (read_translation_unit_from_input): Abort when an element could
25378 (build_function_parameter, build_type_decl, qualified_type_def)
25379 (build_pointer_type_def, build_reference_type_def)
25380 (build_enum_type_decl, build_typedef_decl, build_class_decl)
25381 (build_type_tparameter, build_template_tparameter)
25382 (handle_qualified_type_decl, handle_pointer_type_def)
25383 (handle_reference_type_def, handle_typedef_decl):
25384 Abort when a referred-to type is not found or if a type is defined twice.
25386 2014-01-13 Dodji Seketeli <dodji@redhat.com>
25390 (class_decl::member_function_template::hash::operator()): Remove
25391 useless vertical space.
25392 * src/abg-ir.cc (class_decl::class_decl): Properly indent.
25393 * src/abg-writer.cc (fn_tmpl_shared_ptr_map)
25394 (class_tmpl_shared_ptr_map): Properly indent these typedefs.
25396 2014-01-13 Dodji Seketeli <dodji@redhat.com>
25398 Optimize comparison & underlying type accessing
25399 * include/abg-ir.h (qualified_type::get_underlying_type)
25400 (pointer_type_def::get_pointed_to_type)
25401 (reference_type_def::get_pointed_to_type)
25402 (typedef_decl::get_underlying_type): Avoid triggering refcount
25403 counter increasing/decreasing here, by returning a reference to
25404 the underlying type. This showed up high on a profile.
25405 ({scope_decl, type_decl, scope_type_decl, namespace_decl,
25406 qualified_type_def, pointer_type_def, reference_type_def,
25407 enum_type_decl, typedef_decl, var_decl, class_decl}::operator==):
25408 Avoid taking the exception-using path of dynamic_cast. This
25409 showed up very high on a profile.
25411 2014-01-13 Dodji Seketeli <dodji@redhat.com>
25413 Fix reading/writing native xml corpus files
25414 * src/abg-reader.cc (read_context::clear_type_map): New member
25416 (read_translation_unit_from_input): Read up to the next element
25417 node if we are not on an element node already. Clear the type
25418 map. Realize that we might be on the next 'abi-instr' node upon
25420 (read_corpus_from_input): Read up to the next element node if we
25421 are not on an element node already. It must be an "abi-corpus"
25422 node. THen Advance to the next 'abi-instr' element node before
25423 handing it to read_translation_unit_from_input.
25424 * src/abg-writer.cc (write_context::clear_type_id_map): New member
25426 (write_translation_unit): Call it.
25427 * tools/abg-tools-utils.cc (guess_file_type): Read enough bytes to
25428 detect abi-corpus files magic bytes.
25429 * tools/bilint.cc (main): Do not write the corpus file to the
25430 output stream if --noout has been provided.
25432 2014-01-13 Dodji Seketeli <dodji@redhat.com>
25434 Escape xml pre-defined entities in native (de-)serialization.
25435 * include/abg-libxml-utils.h (escape_xml_string)
25436 (unescape_xml_string): Declare new functions.
25437 * src/abg-libxml-utils.cc (escape_xml_string)
25438 (unescape_xml_string): Define them.
25439 * src/abg-reader.cc (build_function_decl, build_var_decl)
25440 (build_type_decl, build_enum_type_decl, build_class_decl)
25441 (build_type_tparameter, build_non_type_tparameter)
25442 (build_template_tparameter, handle_namespace_decl)
25443 (handle_typedef_decl): Use unescape_xml_string.
25444 * src/abg-writer.cc (write_type_decl, write_function_decl)
25445 (write_class_decl, write_type_tparameter)
25446 (write_non_type_tparameter, write_template_tparameter): Use
25449 2014-01-13 Dodji Seketeli <dodji@redhat.com>
25451 Implement hash caching
25452 * include/abg-ir.h (decl_base::hash_): New member.
25453 (decl_base::{g,s}et_hash): New accessors.
25454 (type_base_::cached_hash): Forward-declare new hasher.
25455 (struct type_ptr_equal): New equality predicate.
25456 (type_shared_ptr_equal::operator()): Do not forget to test pointer
25458 (type_base::cached_hash): Declare new hasher.
25459 * src/abg-hash.cc ({decl_base, type_decl, scope_type_decl,
25460 qualified_type_def, pointer_type_def, reference_type_def,
25461 enum_type_decl, typedef_decl, var_decl, function_decl,
25462 function_decl::parameter, class_decl::data_member,
25463 class_decl::member_function, class_decl, }::hash::operator()):
25465 (type_base::cached_hash::operator()(const type_base*)): Define.
25466 (type_base::cached_hash::operator() (const type_base_sptr):
25468 * src/abg-ir.cc (type_ptr_map): Make this map use
25469 type_base::cached_hash instead of type_base::ptr_hash now.
25470 (decl_base::decl_base): Initialize the new
25471 decl_base::hash_. member.
25472 (decl_base::{s,g}et_hash): Define.
25473 (decl_base::operator==(const decl_base& other)): Take the hash in
25474 account to speed up inequality detection.
25475 * src/abg-writer.cc (type_ptr_map): Renamed type_shared_ptr_map
25476 into this. Make it use type_base::cached_hash and type_ptr_equal
25477 instead of type_base::shared_ptr_hash and type_shared_ptr_equal.
25478 (get_id_for_type): Add overload for type_base*. Re-write the
25479 previous overload in terms of this one.
25480 (write_context::m_type_id_map): Use type_ptr_map as the type for
25483 2014-01-13 Dodji Seketeli <dodji@redhat.com>
25485 Do not canonicalize types anymore; it's slow and luckily not needed
25486 * src/abg-ir.h (translation_unit::canonicalize_type): Remove.
25487 * src/abg-dwarf-reader.cc (canonicalize_and_add_type_to_ir)
25488 (canonicalize_and_insert_type_into_ir)
25489 (canonicalize_and_insert_type_into_ir_under_scope): Remove.
25490 (build_enum_type, build_class_type, build_ir_node_from_die):
25491 Update for removal of type canonicalization.
25492 * src/abg-ir.cc (translation_unit::canonicalize_type): Remove.
25494 2014-01-13 Dodji Seketeli <dodji@redhat.com>
25496 Fix class scope setting & member type de-serializing from dwarf
25497 * include/abg-fwd.h (add_decl_to_scope, insert_decl_into_scope):
25498 return the decl added to the scope.
25499 (as_non_member_type, get_type_declaration): Declare new entry
25501 * include/abg-ir.h (class decl_base::insert_decl_into_scope):
25502 Update this friend declaration.
25503 (class scope_decl, class_decl): Update the friend add_decl_to_scope
25505 (scope_decl::add_member_decl): Return the added decl.
25506 (class_decl_sptr): Move this typedef befoer the class_decl class
25508 (class_decl::definition_of_declaration_): New member.
25509 (class_decl::{set_definition_of_declaration,
25510 get_definition_of_declaration}): New accessors.
25511 (class_decl::add_member_decl): Return the added member.
25512 (class_decl::insert_member_type): New member.
25513 (class_decl::member_base::access_specifier): Make this protected.
25514 (class_decl::member_type): Make this inherit from type_vase.
25515 (class_decl::member_type::type_): Remove this member.
25516 (class_decl::member_type::as_type): Remove this accessor.
25517 (class_decl::member_type::operator==(const type_base&)): New.
25518 (class_decl::member_type::operator shared_ptr<type_base>() const):
25520 (class_decl::member_type::get_underlying_type): New.
25521 (class_decl::member_type::operator==(const member_type&) const):
25523 * src/abg-comparison.cc
25524 (class_diff::{ensure_lookup_tables_populated, report}): Adjust for
25525 the removal of class_decl::member_type::as_type.
25526 * src/abg-dwarf-reader.cc (scope_stack_type): Change this as a
25527 typedef to stack<scope_decl*>.
25528 (current_scope): Change return type from scope_decl_sptr to
25530 (insert_decl_into_scope): New.
25531 (build_namespace_decl_and_add_to_ir): Use insert_decl_into_scope
25532 in lieu of add_decl_to_scope.
25533 (build_class_type_and_add_to_ir): likewise. Link a class
25534 definition to its declaration. Push the current scope on the
25535 scope stack. Use as_non_member_type. Fix setting member types.
25536 (get_scope_for_die): Look through declaration-only classe to get
25538 (build_qualified_type, build_pointer_type_def)
25539 (build_reference_type, build_typedef_type, build_var_decl)
25540 (build_function_decl): Use as_non_member_type.
25541 (build_ir_node_from_die): Fix member variable & function adding.
25542 * src/abg-ir.cc (scope_decl::{add_member_decl,
25543 insert_member_decl}): Return the added member.
25544 (add_decl_to_scope): Likewise.
25545 (insert_decl_into_scope): Likewise.
25546 (get_top_most_scope_under): Fix logic.
25547 (get_type_declaration): New overload that return a decl_base*.
25548 (as_non_member_type): New definition.
25549 (class_decl::{get_definition_of_declaration,
25550 set_definition_of_declaration, insert_member_decl}): Likewise.
25551 (class_decl::add_member_decl): Re-write in terms of
25552 class::insert_member_decl.
25553 (class_decl::insert_member_type): New definition.
25554 (class_decl::add_member_type): Re-write in terms of
25555 class_decl::insert_member_type.
25556 (class_decl::remove_member_type): Update for the
25557 class_decl::member_type::as_type removal.
25558 (class_decl::{add_data_member, add_member_function,
25559 add_member_function_template, add_member_class_template}): Call
25560 scope_decl::add_member_decl.
25561 (class_decl::member_type::member_type): Update as the type now
25562 virtually inherits from type_base.
25563 (class_decl::member_type::{set,get}_access_specifier): New
25565 (class_decl::member_type::get_underlying_type): Likewise.
25566 (class_decl::member_type::set_scope): Update wrt
25567 class_decl::member_type::as_type -> get_underlying_type rename.
25568 (class_decl::member_type::operator==(const decl_base& other)):
25569 There is no more class_decl::member_type::as_type.
25570 (class_decl::member_type::operator==(const type_base& other)):
25572 (class_decl::member_type::get_pretty_representation): Update wrt
25573 class_decl::member_type::as_type -> get_underlying_type rename.
25574 * src/abg-reader.cc (build_class_decl): New that add
25575 add_member_decl adds even member types, no need to add it
25576 explicitly anymore.
25578 2014-01-07 Dodji Seketeli <dodji@redhat.com>
25580 Add regression tests for dwarf reading
25581 * tests/test-read-dwarf.cc: New dwarf reading regression test.
25582 * tests/data/test-read-dwarf/test0: New test input.
25583 * data/test-read-dwarf/test0: Likewise.
25584 * data/test-read-dwarf/test0.abi: Likewise.
25585 * data/test-read-dwarf/test0.cc: Likewise.
25586 * data/test-read-dwarf/test1: Likewise.
25587 * data/test-read-dwarf/test1.abi: Likewise.
25588 * data/test-read-dwarf/test1.cc: Likewise.
25589 * tests/Makefile.am: Build the new tests/test-read-dwarf.cc file.
25591 2014-01-07 Dodji Seketeli <dodji@redhat.com>
25593 Remove useless dependencies in tests/Makefile.am
25594 * tests/Makefile.am: Remove useless *_DEPENDENCIES variables.
25596 2014-01-07 Dodji Seketeli <dodji@redhat.com>
25598 Support new 'abi-corpus' native XML format (.abi)
25599 * include/abg-reader.h (read_corpus_from_native_xml)
25600 (read_corpus_from_native_xml_file): Declare new entry points.
25601 * include/abg-writer.h (write_corpus_to_native_xml)
25602 (write_corpus_to_native_xml_file): Likewise.
25603 * src/abg-reader.cc (read_translation_unit_from_input): Renamed
25604 read_input into this. Support new 'path' attribute for
25605 'abi-instr' XML element.
25606 (read_corpus_from_input): New static function.
25607 (read_translation_unit_from_file)
25608 (read_translation_unit_from_buffer)
25609 (read_translation_unit_from_istream): Update wrt read_input ->
25610 read_translation_unit_from_input.
25611 (read_corpus_from_native_xml, read_corpus_from_native_xml)
25612 (read_corpus_from_native_xml_file): Define new entry points.
25613 * src/abg-writer.cc (write_translation_unit): Write 'path'
25614 attribute into the 'abi-instr' xml element.
25615 (write_corpus_to_native_xml, write_corpus_to_native_xml_file):
25616 Define new entry points.
25617 * tools/abg-tools-utils.h (file_type::{FILE_TYPE_XML_CORPUS,
25618 FILE_TYPE_ZIP_CORPUS}): New enumerators.
25619 * tools/abg-tools-utils.cc (guess_file_type): Support detection of
25620 the new xml file format containing a document root 'abi-corpus'
25622 * tools/bidiff.cc (main): Support diffing xml corpus-es and zip
25624 * tools/bidw.cc (main): Recognize elf files before reading them.
25625 * tools/bilint.cc (main): Support reading xml/zip corpus-es too.
25626 * tests/data/test-read-write/test[0-23].xml: Update 'path'
25629 2014-01-07 Dodji Seketeli <dodji@redhat.com>
25632 * include/abg-writer.h (write_translation_unit): Re-indent parms.
25633 * src/abg-writer.cc (write_translation_unit): Likewise.
25634 * test/test-read-write.cc (main): Fix white space.
25636 2014-01-06 Dodji Seketeli <dodji@redhat.com>
25638 Fix global variables diff reporting in corpus-es
25639 * src/abg-comparison.cc
25640 (corpus_diff::priv::ensure_lookup_tables_populated): Fix a wrong
25641 assert, resulting from a copy paste typo.
25643 2014-01-06 Dodji Seketeli <dodji@redhat.com>
25645 Add support for global variables in corpus diffing
25646 * include/abg-comparison.h (string_var_ptr_map, changed_var_ptr)
25647 (string_changed_var_ptr_map): New convenience typedefs.
25648 * src/abg-comparison.cc
25649 (corpus_diff::priv::{deleted_vars_,added_vars_,changed_vars_}):
25651 (corpus_diff::priv::{lookup_tables_empty, clear_lookup_tables}):
25652 Update wrt the new variables related lookup tables.
25653 (corpus_diff::ensure_lookup_tables_populated): Update to populate
25654 variables related lookup tables.
25655 (corpus_diff::report): Update to display added/removed/changed
25658 2014-01-06 Dodji Seketeli <dodji@redhat.com>
25661 * include/abg-comparison.h (changed_function_ptr): Fix comment.
25662 * src/abg-comparison.cc (corpus_diff::report): Likewise.
25663 * src/abg-corpus.cc (corpus::is_empty): Likewise.
25665 2013-12-23 Dodji Seketeli <dodji@redhat.com>
25667 Initial support for diffing ABI corpus files
25668 * include/abg-comparison.h (string_function_ptr_map)
25669 (changed_function_ptr, string_changed_function_ptr_map)
25670 (corpus_diff_sptr): New convenience typedefs.
25671 (translation_unit_diff): Add comments.
25672 (class corpus_diff): New type.
25673 (compute_diff): New overload for corpus_diff.
25674 * include/abg-corpus.h (corpus::{functions, variables}): New
25676 (corpus::{operator==, get_functions, get_variables}): New members.
25677 * include/abg-diff-utils.h (struct deep_ptr_eq_functor): New
25679 * include/abg-ir.h (translation_unit::operator==): New member
25681 * src/abg-comparison.cc (struct corpus_diff::priv): New private
25682 struct holding the private members of corpus_diff.
25683 (corpus_diff::priv::{lookup_tables_empty, clear_lookup_tables,
25684 ensure_lookup_tables_populated}): Define new private member functions.
25685 (corpus_diff::{corpus_diff, first_corpus, second_corpus,
25686 function_changes, variable_changes, length, report}): New public members.
25687 (struct noop_deleter): New struct.
25688 (compute_diff): New implementation for corpus_diff.
25689 * src/abg-corpus.cc (struct corpus::priv): Renamed corpus::impl
25690 into this. Add new fns, vars and is_symbol_table_built data
25692 (corpus::priv::build_symbol_table): New member function.
25693 (class symtab_build_visitor_type): New visitor type to build the
25695 (struct func_comp, struct var_comp): New comparison functors.
25696 (corpus::priv::build_symbol_table): Define new member function.
25697 (corpus::{corpus, add, get_translation_units, operator==,
25698 get_functions, get_variables}): Define new members.
25699 * src/abg-ir.cc (translation_unit::operator==): Define new member
25701 (operator==(translation_unit_sptr l, translation_unit_sptr r)):
25702 Define new equality operator.
25703 * tools/abg-tools-utils.h (enum file_type): New enum.
25704 (guess_file_type): Declare new function.
25705 * tools/abg-tools-utils.cc (guess_file_type): define new function.
25706 * tools/bidiff.cc (main): Guess the type of the files given in
25707 input and support elf files reading and diffing.
25709 2013-12-23 Dodji Seketeli <dodji@redhat.com>
25711 Generalize use of equality operator in core diff algorithms
25712 * include/abg-diff-utils.h (struct default_eq_functor): New
25714 (end_of_fr_d_path_in_k, end_of_frr_d_path_in_k_plus_delta): Add a
25715 new equality functor template parameter and document it. Use it
25716 to compare the elements of the sequences given in argument.
25717 (compute_middle_snake, ses_len, compute_diff): Add a new equality
25718 functor template parameter and document it. Adjust call to
25719 end_of_frr_d_path_in_k_plus_delta, end_of_fr_d_path_in_k and
25720 compute_middle_snake.
25721 (ses_len, compute_diff): Add a new overload that uses a
25722 default_eq_functor as comparison functor, to avoid breaking
25723 existing client code.
25724 * src/abg-diff-utils.cc (compute_middle_snake): Adjust the call to
25725 the compute_middle_snake.
25727 2013-12-23 Dodji Seketeli <dodji@redhat.com>
25729 Change ir node visitor interface work on pointer to nodes
25730 * include/abg-ir.h (ir_traversable_base): New type to be the base
25731 of IR nodes that are to be traversed. Extends traversable_base.
25732 Its ir_traversable_base::traversable() method takes an
25734 (ir_node_visitor::visit): Change these virtual overloads to take
25735 pointers to IR nodes, rather than references. This will be useful
25736 to e.g, store these IR nodes in containers on the side for some
25737 algorithms to work. That is going to be useful later to,
25738 e.g. build symbol tables on the side, using the visitor interface.
25739 (class decl_base): Make this inherit ir_traversable_base.
25740 * src/abg-ir.cc (*::traverse): Adjust comments and the call the
25741 ir_node_visitor::visit call. Use the ir_traversable_base type
25742 rather than traversable_base.
25743 (ir_traversable_base::traverse): Define.
25744 (ir_node_visitor::visit): Change these overloads to take pointers
25745 rather than reference to ir nodes.
25746 * tests/test-walker.cc (name_printing_visitor::visit): Adjust to
25747 take pointers rather than references.
25749 2013-12-23 Dodji Seketeli <dodji@redhat.com>
25751 Do not forget to read function parms
25752 * src/abg-dwarf-reader.cc (build_function_decl): Do not forget the
25753 the function parameters. Oops.
25755 2013-12-20 Dodji Seketeli <dodji@redhat.com>
25757 Support reading member functions and member types from DWARF
25758 * include/abg-ir.h (method_type_sptr): New convenience typedef.
25759 * src/abg-dwarf-reader.cc (read_context::{dwarf_version,
25760 die_wip_classes_map}): New accessors.
25761 (die_is_virtual): Rename is_virtual into this.
25762 (is_type_tag, is_type_die, die_virtual_function_index): Define new
25764 (die_member_offset): Fix comment.
25765 (get_scope_for_die): Take the read context as argument.
25766 (canonicalize_and_add_type_to_ir): Likewise. On NULL scope, get
25767 the current translation unit from the read context.
25768 (canonicalize_and_insert_type_into_ir_under_scope): Handle NULL
25770 (build_function_decl): Support creating method_decls from here
25772 (build_class_type_and_add_to_ir): Rename build_class_type into
25773 this. Handle adding the class to the IR and to the relevant maps.
25774 During the creation of the class, arrange for
25775 build_ir_node_from_die on the current DIE to return a
25776 declaration-only class, representing the declaration for the class
25777 that is being constructed. This breaks circular dependencies
25778 induced by decls/types that refer to the class being built, before
25779 the class is fully built and has a (logical) type ID. Once the
25780 class is created, make it refer to the class declaration that was
25781 previously handed for the requests to the class DIE. Now requests
25782 to the class DIE will just yield the newly built class. Add
25783 support for member functions and member types.
25784 (build_corpus): Support reading the dwarf version and stick it
25786 (build_ir_node_from_die): Adjust for change in
25787 canonicalize_and_add_type_to_ir and build_class_type signature
25789 * src/abg-ir.cc (class_decl::method_decl::get_type): Support
25790 returning NULL type.
25792 2013-12-20 Dodji Seketeli <dodji@redhat.com>
25794 Don't crash in get_global_scope on empty decls
25795 * src/abg-ir.cc (get_global_scope): Don't crash when given a NULL
25798 2013-12-20 Dodji Seketeli <dodji@redhat.com>
25800 Make decl_base::set_scope virtual, to work on class_decl::member_type
25801 * include/abg-ir.h (decl_base::set_scope): Make this virtual.
25802 (class_decl::member_type::set_scope): Declare an overload here.
25803 * src/abg-ir.cc (class_decl::member_type::set_scope): Define new
25804 overload. Make this set the scope of the underlying type of the
25805 member type as well.
25807 2013-12-20 Dodji Seketeli <dodji@redhat.com>
25809 Support artificial parameters
25810 * include/abg-ir.h (function_decl::parameter::{get,
25811 set}_artificial): Add new accessors for an "artificial" flag.
25812 * src/abg-reader.cc (build_function_parameter): Support reading
25813 the artificial parameter flag.
25814 * src/abg-writer.cc (write_function_decl): Support writing the
25815 artificial parameter flag.
25817 2013-12-19 Dodji Seketeli <dodji@redhat.com>
25819 Initial support for reading struct/class
25820 * src/abg-dwarf-reader.cc (enum virtuality): New enum.
25821 (class expr_result, struct dwarf_expr_eval_context): New types.
25823 (die_access_specifier, die_virtuality, is_virtual)
25824 (die_location_expr, op_pushes_constant_value)
25825 (op_pushes_non_constant_value, op_manipulates_stack)
25826 (op_is_arith_logic, op_is_control_flow)
25827 (eval_last_constant_dwarf_sub_expr, die_member_offset)
25828 (build_class_type): New static functions.
25829 (build_ir_node_from_die<DW_TAG_{class, structure}_type>): Support
25830 creating IR node for class and struct by calling the new
25833 2013-12-19 Dodji Seketeli <dodji@redhat.com>
25836 * src/abg-dwarf-reader.cc (build_qualified_type): Fix indentation.
25838 2013-12-19 Dodji Seketeli <dodji@redhat.com>
25840 Be more forgiving when parsing xml from stdin
25841 * src/abg-libxml-utils.cc (xml_istream_input_read): Return the
25842 byte read count even when the stream seems to be borked. In that
25843 case it should be zero.
25845 2013-12-19 Dodji Seketeli <dodji@redhat.com>
25847 Don't crash if building pointer/reference yields NULL
25848 * src/abg-dwarf-reader.cc
25849 (build_ir_node_from_die<DW_TAG_pointer_type)
25850 (DW_TAG_rvalue{0,1}_reference_type>): Do not crash if building the
25851 IR node for the underlying type yields NULL.
25853 2013-12-19 Dodji Seketeli <dodji@redhat.com>
25855 Use dwarf_attr_integrate() rather than dwarf_attr()
25856 * src/abg-dwarf-reader.cc (die_string_attribute)
25857 (die_unsigned_constant_attribute, die_signed_constant_attribute)
25858 (die_flag_attribute, die_die_attribute): Use dwarf_attr_integrate
25859 rather than dwarf_attr to look through DW_AT_abstract_origin.
25861 2013-12-14 Dodji Seketeli <dodji@redhat.com>
25864 * src/abg-dwarf-reader.cc (build_enum_type): New function.
25865 (build_ir_node_from_die): Call the new build_enum_type here to
25866 Handle DW_TAG_enumeration_type DIEs.
25868 2013-12-14 Dodji Seketeli <dodji@redhat.com>
25870 Build & use a DIE -> parent map to avoid emitting useless types
25871 * include/abg-ir.h (translation_unit::{mark_type_as_used,
25872 prune_unused_types}): Remove these declarations.
25873 * src/abg-ir.cc (translation_unit::priv::used_types_): Remove.
25874 (class subtype_marking_visitor): Likewise.
25875 (translation_unit::{mark_type_as_used, prune_unused_types):
25877 (get_top_most_scope_under): Fix logic and add comment.
25878 * src/abg-dwarf-reader.cc (die_tu_map_type, offset_offset_map):
25879 New convenience typedefs.
25880 (read_context::{die_tu_map_, die_parent_map_}): New context
25882 (read_context::{die_tu_map, die_parent_map}): New accessors.
25883 (build_ir_node_from_die): New overload that takes the scope of the
25884 ir node in parameter.
25885 (die_signed_constant_attribute): Un-comment this.
25886 (build_die_parent_relations_under, build_die_parent_map)
25887 (get_parent_die, get_scope_for_die): New static functions.
25888 (build_translation_unit_and_add_to_ir): Renamed
25889 build_translation_unit into this. Populate the new
25890 read_context::die_tu_map() here.
25891 (canonicalize_and_add_type_to_ir)
25892 (canonicalize_and_insert_type_into_ir)
25893 (canonicalize_and_insert_type_into_ir_under_scope): Move these
25894 overloads over the top of the file.
25895 (build_namespace_decl_and_add_to_ir): Fix this by adding the
25896 namespace to the IR scope of the DIE (using the new
25897 get_scope_for_die()). Update the read_context::die_decl_map()
25899 (build_function_decl): Support functions that return void. Also,
25900 skip parameters that don't have type set.
25901 (build_corpus): Walk all the DIEs to build a DIE -> parent map.
25902 Adjust for the rename to build_translation_unit_and_add_to_ir.
25903 (build_ir_node_from_die): Add a scope parm. Adjust back to
25904 building IR nodes only for public decls, unless the
25905 'called_from_public_decl' flag is set. Adjust to stick the resulting
25906 IR node into the scope given in parameter.
25908 2013-12-14 Dodji Seketeli <dodji@redhat.com>
25910 Mark sub-types as part of general type marking
25911 * src/abg-ir.cc (subtype_marking_visitor): New visitor.
25912 (translation_unit::mark_type_as_used): When marking a composite
25913 type as used, mark its sub-types as well.
25915 2013-12-14 Dodji Seketeli <dodji@redhat.com>
25917 Add missing virtual keywords for traverse() method
25918 * include/abg-ir.h ({translation_unit, decl_base, scope_decl,
25919 type_decl, namespace_decl, qualified_type_decl, pointer_type_def,
25920 reference_type_def, enum_type_decl, typedef_decl, var_decl,
25921 function_tdecl, class_decl, class_decl::data_member,
25922 class_decl::member_function, class_decl::member_function_template,
25923 class_decl::member_class_template}::traverse): Add a virtual
25924 keyword at least to "document" that this method is virtual -- and
25925 thus remind the user that it overrides the
25926 traversable_base::traverse().
25928 2013-12-14 Dodji Seketeli <dodji@redhat.com>
25930 Add a is_type overload
25931 * include/abg-fwd.h (is_type): Declare new overload that takes a
25933 * src/abg-ir.cc (is_type): Define.
25935 2013-12-13 Dodji Seketeli <dodji@redhat.com>
25937 Prune types that are not ref'ed by public decls
25938 * include/abg-fwd.h (remove_decl_from_scope): Declare new
25940 * include/abg-ir.h (type_base_sptr, decl_base_sptr): Move these
25941 convenience typedef before the translation_unit declaration.
25942 (translation_unit::{mark_type_as_used, prune_unused_types}):
25943 Declare new methods.
25944 (decl_base::remove_member_decl): Likewise.
25945 (class_decl::{remove_member_decl, remove_member_type): Likewise.
25946 * src/abg-dwarf-reader.cc (die_decl_map_type): Change this map
25947 type so that the value is now a DIE offset, rather than a DIE.
25948 This is because many times the lifetime of DIEs is shorter than
25949 the one of the reader_context. Also, the die offset uniquely
25950 designates a physical DIE even if several different instances of
25951 logical DIE might point to it.
25952 (struct die_hash): Remove this as it's useless now that we store
25953 DIE offsets in the map.
25954 (build_translation_unit): Call build_ir_node_from_die w/o setting
25955 the called_from_public_decl flag. Prune the types that are not
25956 used by any public decls.
25957 (build_namespace_decl_and_add_to_ir): all build_ir_node_from_die
25958 w/o setting the called_from_public_decl flag.
25959 (build_ir_node_from_die): Change the only_public_decl flag into a
25960 called_from_public_decl flag. Mark types used by public decls as
25961 such. Adjust for the parm changes of build_qualified_type
25962 build_pointer_type_def, build_reference_type, and
25963 build_typedef_type.
25964 (build_qualified_type, build_pointer_type_def)
25965 (build_reference_type, build_typedef_type): Take a new
25966 called_from_public_decl. Pass it to build_ir_node_from_die.
25967 (build_var_decl): Call build_ir_node_from_die with the
25968 called_from_public_decl flag set to true to flag the types
25969 referenced by this variable as being used.
25970 (build_function_decl): Take a called_from_public_decl flag as
25971 well, as this function can now call build_function_decl itself to
25972 build a function decl out of the value of the DW_AT_specification
25973 attribute, for DIEs representing function definitions. Also, flag
25974 the types referenced by public functions are being used.
25975 * src/abg-ir.cc (translation_unit::priv::used_types_): New map for
25977 (translation_unit::{mark_type_as_used, prune_unused_types}):
25978 Define new methods.
25979 (scope_decl::remove_member_decl): Likewise.
25980 (remove_decl_from_scope): Define new function.
25981 (class_decl::{remove_member_decl, remove_member_type}): Define new
25984 2013-12-12 Dodji Seketeli <dodji@redhat.com>
25986 Support reading namespaces
25987 * include/abg-fwd.h (get_global_scope): Return a const
25988 global_scope. Add a new overload that takes a naked pointer as
25990 (insert_decl_into_scope, get_top_most_scope_under): Declare new
25992 * include/abg-ir.h (class decl_base, class scope_decl): Add
25993 insert_decl_into_scope as a friend of these classes.
25994 (scope_decl::{insert_decl_into_scope, find_iterator_for_member}):
25995 Declare new member.
25996 (scope_decl::get_member_decls): New non-const overload.
25997 * src/abg-dwarf-reader.cc (build_translation_unit): Remove the
25998 "recurse" parameter. Adjust the call to build_ir_node_from_die to
25999 read just public decls that are at namespace scope. Anything else
26000 should be dropped unless it's needed to emitting the public
26001 namespace-level decls.
26002 (build_namespace_decl_and_add_to_ir)
26003 (canonicalize_and_insert_type_into_ir): Define new static
26005 (build_corpus): Adjust ad build_translation_unit doesn't have the
26006 "recurse" parameter anymore.
26007 (canonicalize_and_add_type_to_ir): Make this static. Fix
26009 (build_ir_node_from_die): Take a new "only_public_decl"
26010 parameter. For DW_TAG_base_type case, use the new
26011 canonicalize_and_insert_type_into_ir to insert the type at the
26012 right place in the global scope making sure it is seen before the
26013 current scope. For pointer, references and qualified types, use
26014 canonicalize_and_insert_type_into_ir to add the type at the same
26015 scope as its underlying type. Handle DW_TAG_{namespace,module}
26016 using the new build_namespace_decl_and_add_to_ir function. Add
26017 some vertical spaces and some assertions.
26018 * src/abg-ir.cc (scope_decl::add_member_decl): Use scope_decl_sptr
26020 (scope_decl::{insert_member_decl,find_iterator_for_member}):
26021 Define new methods.
26022 (insert_decl_into_scope, get_top_most_scope_under): Define new
26024 (get_global_scope): Constify the return type.
26025 (get_translation_unit): Adjust as get_global_scope now returns a
26027 * src/abg-reader.cc (get_translation_unit): Likewise.
26029 2013-12-12 Dodji Seketeli <dodji@redhat.com>
26031 Fix function_decl::parameter::operator==
26032 * include/abg-ir.h (function_decl::parameter::operator==): Support
26033 empty type, e.g, in presence of a variadic parameter.
26035 2013-12-12 Dodji Seketeli <dodji@redhat.com>
26038 * include/abg-ir.h (decl_base::set_visibility): Remove useless
26040 (class scope_decl): Remove useless white space.
26041 (scope_decl::add_member_decl): Use decl_base_sptr convenience
26043 (global_scope_sptr, namespace_decl_sptr): New convenience typedef.
26044 (class global_scope): Remove useless white space.
26046 2013-12-11 Dodji Seketeli <dodji@redhat.com>
26049 * src/abg-dwarf-reader.cc (die_string_attribute, is_public_decl)
26050 (build_translation_unit, build_ir_node_from_die): Fix comments.
26051 (die_unsigned_constant_attribute, die_signed_constant_attribute)
26052 (die_loc_and_name): Align parms.
26054 2013-12-11 Dodji Seketeli <dodji@redhat.com>
26056 Support typedef types
26057 * src/abg-dwarf-reader.cc (build_typedef_type): Define new static
26059 (canonicalize_and_add_type_to_ir): Do not crash on NULL input
26060 type. Also, add a new overload for smart pointer on scope.
26061 (build_ir_node_from_die): For DW_TAG_base_type case, adjust as
26062 canonicalize_and_add_type_to_ir now takes smart pointers on
26063 scopes. Support the DW_TAG_typedef case by calling the new
26064 build_typedef_type.
26066 2013-12-11 Dodji Seketeli <dodji@redhat.com>
26068 Support reference types
26069 * src/abg-dwarf-reader.cc (build_pointer_type_def): Do not forget
26070 to get the proper size of the pointer type.
26071 (build_reference_type): Define new static function.
26072 (build_ir_node_from_die): Call build_reference_type for the
26073 DW_TAG_reference_type and DW_TAG_rvalue_reference_type cases.
26075 2013-12-11 Dodji Seketeli <dodji@redhat.com>
26077 Support pointer types
26078 * include/abg-fwd.h (get_translation_unit, get_global_scope):
26079 Declare new overloads that act on a naked pointer to decl_base.
26080 * src/abg-dwarf-reader.cc (build_pointer_type_def): Define new
26082 (canonicalize_and_add_type_to_ir): Take a naked pointer to
26083 scope_decl rather than a smart pointer.
26084 (build_ir_node_from_die): For DW_TAG_base_type, adjust. Support
26085 DW_TAG_pointer_type case. For DW_TAG_{const,volatile}_type case,
26086 make sure the qualified type is in the same scope as its
26088 * src/abg-ir.cc (get_global_scope, get_translation_unit): Define
26089 new overloads that acts on a naked decl_base.
26091 2013-12-11 Dodji Seketeli <dodji@redhat.com>
26093 Support qualified types
26094 * src/abg-dwarf-reader.cc (build_qualified_type)
26095 (canonicalize_and_add_type_to_ir): Define new static functions.
26096 (build_ir_node_from_die): In the DW_TAG_base_type case, use the
26097 new canonicalize_and_add_type_to_ir which is a factorization of
26098 this code. In the DW_TAG_{const,volatile}_type, use the new
26099 build_qualified_type and canonicalize_and_add_type_to_ir
26102 2013-12-11 Dodji Seketeli <dodji@redhat.com>
26104 Support reading public functions from DWARF
26105 * src/abg-dwarf-reader.cc (read_context::dwarf_): New member.
26106 (read_context::load_debug_info): Move the content of
26107 load_debug_info_from_elf here.
26108 (read_context::dwarf): New accessor for the dwarf_ member above.
26109 (die_flag_attribute, die_loc_and_name, is_public_decl)
26110 (build_function_decl): New static functions.
26111 (die_location): Do not try to create a location object when the
26112 location has empty file or empty line number.
26113 (build_translation_unit): Take a new address_size parameter.
26114 (build_type_decl): Really take a context parameter. Use the new
26115 die_loc_and_name() here.
26116 (build_var_decl): Skip non-public vars.
26117 (build_corpus): Use dwarf_nextcu instead of dwfl_nextcu, so that
26118 we can get the address_size used in the current CU. Note that for
26119 this we are getting the Dwarf* pointer from the context thanks to
26120 the new read_context::dwarf() getter. Adjust the call to
26121 build_translation_unit to pass it the new address_size.
26122 (build_ir_node_from_die): Shorten lines a little bit. Call the
26123 new build_function_decl to support reading DW_TAG_subprogram DIEs.
26124 (read_corpus_from_elf): Adjust to create the read context earlier
26125 and use its read_context::load_debug_info method to load the debug
26128 2013-12-11 Dodji Seketeli <dodji@redhat.com>
26130 Make bilint read input from stdin
26131 * include/abg-libxml-utils.h (new_reader_from_istream): Declare
26132 new public entry point.
26133 * src/abg-libxml-utils.cc (xml_istream_input_read)
26134 (xml_istream_input_close): New static functions.
26135 (new_reader_from_istream): Define new public input function.
26136 * include/abg-reader.h (read_translation_unit_from_istream):
26137 Declare new entry points.
26138 * src/abg-reader.cc (read_translation_unit_from_istream): Define
26140 * tools/bilint.cc (options::{read_from_stdin, noout}): New
26142 (display_usage): Document --stdin and --noout.
26143 (parse_command_line): Adjust to consider that no option on the
26144 command line means reading from stdin, just like --stdin. Support
26145 the --noout option as well.
26146 (main): Support Read the abi instr from stdin; in that case, what
26147 was read is just serialized back to stdout, unless --noout was
26150 2013-12-11 Dodji Seketeli <dodji@redhat.com>
26152 Support the "address-size" attribute for <abi-instr> elements
26153 * include/abg-ir.h (translation_unit::translation_unit): Take an
26154 address_size parameter.
26155 (translation_unit::{get_address_size, set_address_size}): New
26157 * src/abg-ir.cc (translation_unit::priv::address_size_): New
26159 (translation_unit::translation_unit): Take an address_size
26161 (translation_unit::{get_address_size, set_address_size}): Define
26163 * src/abg-reader.cc (read_input): Read the "address-size"
26164 attribute from the abi-instr element.
26165 * src/abg-writer.cc (write_translation_unit): Write the
26166 "address-size" attribute.
26167 * tests/data/test-read-write/test23.xml: New test input.
26168 * tests/test-read-write.cc (in_out_specs): Add the new test above
26169 to the list of files to read and write back.
26171 2013-12-11 Dodji Seketeli <dodji@redhat.com>
26173 Support variadic arguments in function decls
26174 * src/abg-reader.cc (build_function_parameter): Support reading
26175 the "is-variadic" attribute.
26176 * src/abg-writer.cc (write_function_decl): Support writing the
26177 "is-variadic" attribute.
26178 * tests/data/test-read-write/test22.xml: New test input.
26179 * tests/test-read-write.cc (in_out_specs): Add the new test to the
26180 list of files to read and write back.
26182 2013-12-07 Dodji Seketeli <dodji@redhat.com>
26184 Initial support of reading an ABI Corpus from DWARF
26185 * configure.ac: Check the presence of libdw.so and
26186 elfutils/libdwfl.h headers from elfutils and define the necessary
26188 * include/abg-dwarf-reader.h: New header file
26189 * include/Makefile.am: Add the new header file to the source
26191 * src/abg-dwarf-reader.cc:: New file.
26192 * src/Makefile.am: Add the new file to the source distribution.
26193 * include/abg-fwd.h (dump): Add declarations for several overloads
26194 to allow dumping to a given output stream.
26195 * include/abg-ir.h (class translation_unit): Use a pimpl idiom for
26197 (translation_unit::canonicalize_type): Declare new method.
26198 * src/abg-ir.cc (struct translation_unit::priv): New private type
26199 for the pimpl idiom for translation_unit.
26200 (translation_unit::{translation_unit, get_global_scope, get_path,
26201 set_path, get_loc_mgr}): Adjust for pimpl idiom.
26202 (translation_unit::canonicalize_type): Define this new method and
26204 * src/abg-writer.cc (dump): Define several overloads to dump IR
26205 nodes to given output streams.
26206 * tools/bidw.cc: New file for the new bidw tool.
26207 * tools/Makefile.am: Define rules to build the new bidw tools.
26209 2013-12-07 Dodji Seketeli <dodji@redhat.com>
26211 Pass a string by reference rather than by value
26212 * tools/bilint.cc (display_usage): Pass program name by reference.
26214 2013-12-07 Dodji Seketeli <dodji@redhat.com>
26217 * src/abg-ir.cc (location_manager::location_manager)
26218 (translation_unit::{is_empty, traverse, ~translation_unit): Remove
26219 useless vertical white spaces.
26220 * tools/bilint.cc (parse_command_line): Fix indentation.
26222 2013-12-04 Dodji Seketeli <dodji@redhat.com>
26224 Prepare serialization API for multiple backends
26225 * include/abg-reader.h: New file with abigail::xml_reader APIs.
26226 * include/abg-writer.h: New file with abigail::xml_writer APIs.
26227 * include/Makefile.am: Add the new files above to the source
26229 * src/abg-reader.cc: Update top-file comments.
26230 (namespace xml_reader): Rename namespace
26232 (read_to_translation_unit, read_corpus_from_archive): New static
26234 (read_translation_unit_from_file)
26235 (read_translation_unit_from_file, read_corpus_from_file): New
26237 (struct array_deleter): New functor.
26238 (translation_unit::read): Remove this.
26239 * src/abg-writer.cc: Update top file comments.
26240 (namespace xml_writer): Rename namespace
26242 (struct archive_write_ctxt): New internal type.
26243 (create_archive_write_context, write_translation_unit_to_archive)
26244 (write_translation_unit, write_corpus_to_archive): New low level
26245 static functions overloads.
26246 (write_corpus_to_archive, write_translation_unit): Public higher
26248 (translation_unit::write): Remove.
26249 (dump): Update for new xml_writer namespace.
26250 * include/abg-ir.h (translation_unit::{read, write}): Remove these
26251 serialization methods.
26252 * include/abg-corpus.h (corpus_sptr): New convenience typedef.
26253 (corpus::{read, write}): Remove these methods.
26254 * src/abg-corpus.cc (corpus::{read, write})
26255 (corpus::impl::{serialized_tus, archive}): Remove these members.
26256 (corpus::impl::{get_archive, close_archive, write_tu_to_archive,
26257 read_to_translation_unit}): Remove these methods.
26258 * tests/test-bidiff.cc (main): Update for usage of the new
26260 * tests/test-read-write.cc (main): Likewise. Update for the usage
26261 of the new xml_writer API, too.
26262 * tests/test-walker.cc (main): Update for the usage of the new
26264 * tests/test-write-read-archive.cc (main): Likewise. And for the
26265 xml_writer API, too.
26266 * tools/biar.cc (add_tus_to_archive, extract_tus_from_archive): Likewise.
26267 * tools/bidiff.cc (main): Likewise, for xml_reader APIs.
26268 * tools/bilint.cc (main): Likewise, for xml_writer APIs, too.
26270 2013-11-29 Dodji Seketeli <dodji@redhat.com>
26272 Add support for bidiff regression testing
26273 * tests/data/test-bidiff/test-enum0-v0.cc.bi: New input file.
26274 * tests/data/test-bidiff/test-enum0-v1.cc.bi: Likewise.
26275 * tests/data/test-bidiff/test-enum0-report.diff: Likewise.
26276 * tests/data/test-bidiff/test-enum1-v0.cc.bi: Likewise.
26277 * tests/data/test-bidiff/test-enum1-v1.cc.bi: Likewise.
26278 * tests/data/test-bidiff/test-enum1-report.txt: Likewise.
26279 * tests/data/test-bidiff/test-qual-type0-v0.cc.bi: Likewise.
26280 * tests/data/test-bidiff/test-qual-type0-v1.cc.bi: Likewise.
26281 * tests/data/test-bidiff/test-qual-type0-report.txt: Likewise.
26282 * tests/data/test-bidiff/test-struct0-v0.cc.bi: Likewise.
26283 * tests/data/test-bidiff/test-struct0-v1.cc.bi: Likewise.
26284 * tests/data/test-bidiff/test-struct0-report.txt: Likewise.
26285 * tests/data/test-bidiff/test-struct1-v0.cc.bi: Likewise.
26286 * tests/data/test-bidiff/test-struct1-v1.cc.bi: Likewise.
26287 * tests/data/test-bidiff/test-struct1-report.txt: Likewise.
26288 * tests/data/test-bidiff/test-var0-v0.cc.bi: Likewise.
26289 * tests/data/test-bidiff/test-var0-v1.cc.bi: Likewise.
26290 * tests/data/test-bidiff/test-var0-report.txt: Likewise.
26291 * tests/test-bidiff.cc: New file.
26292 * tests/Makefile.am: Build the new runtestbidiff regression test
26293 and add the above to the source distribution.
26295 2013-11-29 Dodji Seketeli <dodji@redhat.com>
26297 Add missing test inputs to source distribution
26298 * tests/Makefile.am (data/test-read-write/test{17, 18, 19, 20,
26299 21}.xml): Add these test input files to the source distribution.
26301 2013-11-28 Dodji Seketeli <dodji@redhat.com>
26303 Add diff support for var_decl
26304 * include/abg-comparison.h (class var_diff): New declaration.
26305 (var_diff_sptr): New convenience typedef.
26306 (compute_diff): New overloads for var_diff, decl_base and
26308 * src/abg-comparison.cc (try_to_diff): Renamed try_to_diff_types
26310 (compute_diff_for_types): Adjust for the try_to_diff_types
26311 renaming. Fix comments.
26312 (compute_diff_for_decls): Re-use try_to_diff. Update for
26314 (compute_diff): Define overloads for decl_base, type_base and
26316 (diff_length_of_decl_bases, diff_length_of_type_bases): New static
26318 (report_name_size_and_alignment_changes): Renamed
26319 report_size_and_alignment_changes into this. Make it report name
26321 (var_diff::priv): New struct.
26322 (var_diff::{var_diff, first_var, second_var, type_diff, length,
26323 report}): Define methods.
26324 ({qualified_type_diff, enum_diff, class_diff, scope_diff,
26325 function_decl_diff}::report): Do not report
26326 anything if the diff is empty.
26327 (type_decl_diff::length): Fix this.
26328 (type_decl_diff::report): Adjust for renaming to
26329 report_name_size_and_alignment_changes.
26331 2013-11-28 Dodji Seketeli <dodji@redhat.com>
26333 Add enum_type_decl::get_pretty_representation()
26334 * include/abg-ir.h (enum_type_decl::get_pretty_representation):
26335 Declare new virtual method override.
26336 * src/abg-ir.cc (enum_type_decl::get_pretty_representation):
26339 2013-11-28 Dodji Seketeli <dodji@redhat.com>
26341 Change return type of abigail::is_type()
26342 * include/abg-fwd.h (is_type): Change the return type from bool to
26345 2013-11-27 Dodji Seketeli <dodji@redhat.com>
26347 Support diff for enum_type_decl
26348 * include/abg-ir.h (enum_type_decl_sptr): New typedef.
26349 (enum_type_decl::enumerator::enumerator): Make default constructor
26350 public so that enumerators can be stored in vectors. Maybe I
26351 should have made stored pointers to enumerators instead ...
26352 (enum_type_decl::enumerator::get_qualified_name): Define new
26354 * include/abg-comparison.h (string_enumerator_map)
26355 (changed_enumerator, string_changed_enumerator_map)
26356 (enum_diff_sptr): New convenience typedefs.
26357 (class enum_diff): Declare new class.
26358 (compute_diff): New overload for enum_type_decl.
26359 * src/abg-comparison.cc (enum diff_kind, report_mem_header): Move
26360 these at the beginning of the file.
26361 (struct enum_diff::priv): Define this.
26362 (enum_diff::{clear_lookup_tables, lookup_tables_empty,
26363 ensure_lookup_tables_populated, enum_diff, first_enum,
26364 second_enum, underlying_type_diff, deleted_enumerators,
26365 inserted_enumerators, changed_enumerators, length, report}):
26366 Define these new methods.
26367 (compute_diff): New overload for enum_diff.
26368 (compute_diff_for_types): Add support enum_type_decl here.
26370 2013-11-27 Dodji Seketeli <dodji@redhat.com>
26372 Fix equality operator for enum_type_decl
26373 * src/abg-ir.cc (enum_type_decl::operator==(const type_base& o)):
26374 This was comparing just the decl_base and type_base part of the
26375 enum. Now re-use the enum_type_decl::operator==(const decl_base)
26376 that compares the entirety of the types.
26378 2013-11-27 Dodji Seketeli <dodji@redhat.com>
26380 Fix indentation and wording of some existing diff reports
26381 * src/abg-comparison.cc (class_diff::report): Fix report wording.
26382 Change indentation space from 4 white spaces to two.
26383 (scope_diff::report): Fix logic indentation generation.
26385 2013-11-26 Dodji Seketeli <dodji@redhat.com>
26387 Change enum_type_decl::enumerators from a list to a vector
26388 * include/abg-ir.h (enum_type_decl::enumerators): Change this from
26389 a list to a vector.
26390 * src/abg-hash.cc (enum_type_decl::hash::operator()): Use the
26391 typedef enum_type_decl::enumerators rather than std::list<blah>.
26392 * src/abg-ir.cc (enum_type_decl::get_enumerators): Use
26393 the enum_type_decl::enumerators typedef.
26394 (enum_type_decl::operator==): Likewise.
26395 * src/abg-reader.cc (build_enum_type_decl): Likewise.
26396 * src/abg-writer.cc (write_enum_type_decl): Likewise.
26398 2013-11-25 Dodji Seketeli <dodji@redhat.com>
26400 Fix thinko in qualified_type_diff::length
26401 * src/abg-comparison.cc (qualified_type_diff::length): Fix thinko.
26403 2013-11-25 Dodji Seketeli <dodji@redhat.com>
26405 Support diff between qualified types
26406 * include/abg-ir.h (qualified_type_def_sptr): Declare new typedef.
26407 (class qualified_type_def): Add comment at the end.
26408 (operator<<(std::ostream&, qualified_type_def::CV)): Declare new
26409 streaming operator.
26410 * src/abg-ir.cc (operator<<(std::ostream&,
26411 qualified_type_def::CV)): Define this new streaming operator.
26412 * include/abg-comparison.h (class qualified_type): Declare new
26414 (compute_diff): Declare new overload for qualified_type_def_sptr.
26415 * src/abg-comparison.cc (struct qualified_type_diff::priv): Define
26417 (qualified_type_diff::{qualified_type_diff, first_qualified_type,
26418 second_qualified_type, underlying_type_diff, length}):
26419 Define new methods.
26420 (get_leaf_type): Define new static function.
26421 (compute_diff): Define overload for qualified_type_def_sptr.
26422 (compute_diff_for_types): Add support for
26423 diffing qualified_type_def here.
26425 2013-11-25 Dodji Seketeli <dodji@redhat.com>
26427 Cleanup header of changes of underlying types of pointers/references
26428 * src/abg-comparison.cc ({pointer_diff, reference_diff}::report):
26429 Unify header of changes in the referenced type.
26430 * src/abg-ir.cc (decl_base::get_pretty_representation): By
26431 default, do not prefix types with "type ", for consistency sake.
26433 2013-11-25 Dodji Seketeli <dodji@redhat.com>
26435 Ensure diff types can only be created by compute_diff
26436 * include/abg-comparison.h (diff::diff): Make constructor
26438 (pointer_diff::pointer_diff): Likewise.
26439 (pointer_diff::{first_pointer, second_pointer}): Constify the
26441 (compute_diff): Make this a friend of class pointer_diff.
26442 (reference_diff::reference_diff): Make this constructor protected.
26443 (compute_diff): Make this a friend of class reference_diff.
26444 (class_diff::class_diff): Make this constructor protected.
26445 (compute_diff): Make this a friend of class class_diff.
26446 (scope_diff::scope_diff): Make this constructor protected.
26447 (compute_diff): Make this a friend of class scope_diff.
26448 (function_decl_diff::function_decl_diff): Make this constructor
26450 (type_decl_diff::type_decl_diff): Likewise.
26451 (typedef_diff::typedef_diff): Likewise.
26452 (translation_unit_diff::translation_unit_diff): Likewise.
26453 (compute_diff): Make this a friend of class translation_unit_diff.
26454 * src/abg-comparison.cc (pointer_diff::{first_pointer,
26455 second_pointer}): Constify return type.
26457 2013-11-21 Dodji Seketeli <dodji@redhat.com>
26459 Add size/alignment info to class diff report
26460 * src/abg-comparison.cc (represent): Move these static overloads
26461 to the beginning of the file.
26462 (report_size_and_alignment_changes): New function. It has been
26463 factorized out of ...
26464 (type_decl_diff::report): ... this.
26465 (class_diff::report): Use the new
26466 report_size_and_alignment_changes to report size/alignment info
26469 2013-11-21 Dodji Seketeli <dodji@redhat.com>
26472 * src/abg-comparison.cc (class_diff::report): Rename first_class
26473 into first and second_class into second.
26475 2013-11-21 Dodji Seketeli <dodji@redhat.com>
26477 Misc diff reporting nits
26478 * include/abg-ir.h (type_decl::get_pretty_representation): New
26480 * abg-ir.cc (type_decl::get_pretty_representation): Implement it.
26481 * src/abg-comparison.cc (represent, class_diff::report): Quote the
26482 pretty representation of abi artifacts in the report.
26483 (type_decl_diff::report): Better wording to express type_decl
26486 2013-11-20 Dodji Seketeli <dodji@redhat.com>
26488 Support reporting changed data member in class
26489 * include/abg-ir.h (operator<<(std::ostream&, decl_base::binding))
26490 (operator<<(std::ostream&, class_decl::access_specifier)): Declare
26491 new streaming operators.
26492 (class_decl::member_type::get_pretty_representation): New virtual
26494 * src/abg-ir.cc (operator<<(std::ostream&, decl_base::binding)):
26495 (operator<<(std::ostream&, class_decl::access_specifier)): Define
26496 new streaming operators.
26497 (class_decl::member_type::get_pretty_representation): Define new method.
26498 * src/abg-comparison.cc (represent): Make the existing overloads
26499 end by a newline. Add a new overload that represents the changes
26500 that happened a given data member.
26501 (enum diff_kind): New.
26502 (report_mem_header): Renamed report_num_dels_or_ins into this.
26503 Make it support introducing changed members as well as
26504 deletions/insertions.
26505 (class_diff::report): Adjust for the report_num_dels_or_ins ->
26506 report_mem_header change. Use the new represent() overload to
26507 report about changed data members. Adjust logic now that
26508 represent() emits a newline at its end. Also adjust logic as far
26509 as representing base classes and member types changes is
26511 (type_decl_diff::report): Remove useless white space.
26513 2013-11-20 Dodji Seketeli <dodji@redhat.com>
26515 Ensure that *::report adds just one empty line to its content
26516 * include/abg-comparison.h (diff::report): Add a comment saying
26517 that each the diff::report interface must leave one empty line at
26518 the end of the report.
26519 * src/abg-comparison.cc ({pointer_diff, reference_diff,
26520 class_diff, scope_diff, function_decl_diff, type_decl_diff,
26521 typedef_diff}::report): Leave just one
26522 empty line after content.
26524 2013-11-20 Dodji Seketeli <dodji@redhat.com>
26526 Various doxygen doc additions and fixes
26527 * include/abg-comparison.h: Lots of doc string additions & fixes,
26528 especially for typedefs.
26529 * include/abg-ir.h: Likewise.
26530 * src/abg-comparison.cc: Likewise.
26531 * src/abg-ir.cc: Likewise.
26533 2013-11-20 Dodji Seketeli <dodji@redhat.com>
26535 Better support changed base classes and member types
26536 * include/abg-comparison.h (class_diff::{clear_lookup_tables,
26537 lookup_tables_empty, ensure_lookup_tables_populated}): Declare new
26539 (compute_diff): Make this a friend of class_diff.
26540 * src/abg-comparison.cc (class_diff::priv::{deleted_bases_,
26541 inserted_bases_, changed_bases_, deleted_member_types_,
26542 inserted_member_types_, changed_member_types_,
26543 deleted_data_members_, inserted_data_members_,
26544 changed_data_members_, deleted_member_class_tmpls_,
26545 inserted_member_class_tmpls_, changed_member_class_tmpls_}):
26546 Define new members.
26547 (class_diff::priv::{base_has_changed, member_type_has_changed,
26548 data_member_has_changed}): Declare and define new methods.
26549 (class_diff::{clear_lookup_tables, lookup_tables_empty,
26550 ensure_lookup_tables_populated}): Define new methods.
26551 (class_diff::report): Detect and report when a base class or a
26552 member type has changed, as opposed to just saying that it has
26553 been removed and inserted. Fix the rest of the function to avoid
26554 emitting useless vertical space and avoid saying that the class
26555 has "zero" insertion/deletion of a given kind of member.
26556 (scope_diff::report): avoid saying that the scope has "zero"
26557 insertion/deletion of a given kind of member. Avoid useless
26559 (type_decl_diff::report): Avoid useless vertical spaces.
26561 2013-11-19 Dodji Seketeli <dodji@redhat.com>
26563 Add bilint tool to validate bi files somewhat.
26564 * tools/bilint.cc: New file.
26565 * tools/Makefile.am: Build and install the new file above.
26567 2013-11-19 Dodji Seketeli <dodji@redhat.com>
26569 Add diff support for typedef_decl and type_decl
26570 * include/abg-ir.h (operator<<(std::ostream&,
26571 decl_base::visibility)): Declare new streaming operator.
26572 * src/abg-ir.cc (operator<<(std::ostream&,
26573 decl_base::visibility)): Define it.
26574 (type_decl::{operator==, get_pretty_representation}): Likewise,
26575 define these new overloads.
26576 (decl_base::{operator==, get_pretty_representation}): New overloads.
26577 * include/abg-comparison.h (type_decl_diff type_decl_diff_sptr,
26578 typedef_diff, typedef_diff_sptr): Declare new classes and
26580 * src/abg-comparison.cc (type_decl_diff::{type_decl_diff,
26581 first_type_decl, second_type_decl, length, report}): New methods
26583 (compute_diff): New function definition that takes pointers of
26585 (typedef_diff::{typedef_diff, first_typedef_decl,
26586 second_typedef_decl, underlying_type_diff, length, report}): New
26588 (compute_diff): New function definition that takes pointers of
26590 (try_to_diff_types): New template function, factorized out of ...
26591 (compute_diff_for_types): ... this. Add support diffing type_decl
26593 (pointer_diff::report): Fix indentation of emitted report.
26594 * tools/bidiff.cc (parse_command_line): Fix style.
26596 2013-11-19 Dodji Seketeli <dodji@redhat.com>
26598 Avoid missing member types while reading bi files
26599 * include/abg-fwd.h (get_type_declaration): Declare function.
26600 * include/abg-ir.h (class decl_base): Add class_decl as a friend.
26601 This to be able to call decl_base::set_scope from class_decl.
26602 (scope_decl::add_member_decl): Make this virtual protected, so
26603 that it can be called (virtually) from e.g, class_decl.
26604 (type_decl_sptr, typedef_decl_sptr): New convenience typedefs.
26605 (class_decl::add_member_decl): New virtual overload for
26606 scope_decl::add_member_decl.
26607 (class_decl::{add_member_type, add_data_member,
26608 add_member_function}): New overloads.
26609 * src/abg-ir.cc (add_decl_to_scope): Benign style cleanup.
26610 (get_type_declaration): Define new function.
26611 (class_decl::add_member_decl): New method.
26612 (class_decl::add_member_type): Avoid silently added a new member
26613 type when that member type has already been (perhaps
26614 inadvertently) added to a scope already. Rather, put a strict
26615 assert in place there. Also add a new overload that constructs
26616 the member type out of a classic type and adds it to the class.
26617 (class_decl::{add_data_member, add_member_function}): Likewise.
26618 (class_decl::{add_member_function_template,
26619 add_member_class_template}): Avoid silently added a new member
26620 template when that template has already been (perhaps
26621 inadvertently) added to a scope already. Rather, put a strict
26622 assert in place there.
26623 * src/abg-reader.cc (push_decl_to_current_scope): Take a an extra
26624 flag saying if the current decl should be added to the current
26625 scope as well (in addition to being pushed onto the stack of
26626 scopes maintained in the reader context).
26627 (push_and_key_type_decl): Likewise, take that extra flag and pass
26628 it to push_decl_to_current_scope.
26629 (build_function_decl, build_var_decl, build_type_decl)
26630 (build_qualified_type_decl, build_pointer_type_def)
26631 (build_reference_type_def, build_enum_type_decl, build_typedef_decl)
26632 (build_function_tdecl, build_class_tdecl): Likewise.
26633 (build_class_decl): Likewise. When building member data, types,
26634 and functions, make sure /not/ to add the data, type of function to
26635 the current scope before adding it to the class_decl. This was
26636 making the member not being added to the class because it already
26638 (build_type_tparameter, build_type_composition)
26639 (build_non_type_tparameter, build_template_tparameter)
26640 (build_type): Adjust to add the template parm to the current scope
26641 explicitly, like previously.
26642 (handle_type_decl): Use build_type_decl function. Add the
26643 type_decl to the current scope, like previously.
26644 (handle_namespace_decl, handle_qualified_type_decl)
26645 (handle_pointer_type_def, handle_reference_type_def)
26646 (handle_enum_type_decl, handle_typedef_decl, handle_var_decl)
26647 (handle_function_decl, handle_class_decl, handle_function_tdecl)
26648 (handle_class_tdecl): Adjust to add the decl to the current scope,
26650 * tests/data/test-read-write/test21.xml: New test input with
26653 2013-10-24 Dodji Seketeli <dodji@redhat.com>
26655 Avoid tabs and add const/virtual/offsets to class member diff reports
26656 * include/abg-ir.h (class_decl::get_num_virtual_functions): New
26658 * src/abg-ir.cc (class_decl::get_num_virtual_functions): New
26660 (function_decl::get_pretty_representation): Represent
26661 destructors and const member functions.
26662 * src/abg-writer.cc (write_cdtor_const_static): Take a new bool
26663 parm for constness and serialize it.
26664 (write_class_decl): Serialize member functions & function template
26666 * src/abg-reader.cc (read_cdtor_const): Read the "const" xml
26667 attribute, rather than "is_const".
26669 2013-10-24 Dodji Seketeli <dodji@redhat.com>
26671 Fix num insertions reporting in member functions
26672 * src/abg-comparison.cc (class_diff::report): Fix num insertions
26675 2013-10-24 Dodji Seketeli <dodji@redhat.com>
26677 Serialize vtable offset for virtual functions
26679 (class_decl::member_function::get_vtable_offset): Renamed
26680 class_decl::member_function::get_vtable_offset_in_bits into this.
26681 The offset is an index into a table; it's not a value in bits.
26682 * src/abg-hash.cc (class_decl::member_function::hash): Update wrt
26683 function name change above.
26684 * src/abg-ir.cc (class_decl::member_function::operator==):
26686 * src/abg-reader.cc (build_class_decl): Rename the attribute
26687 vtable-offset-in-bits into vtable-offset.
26688 * src/abg-writer.cc (write_voffset): New function.
26689 (write_class_decl): Use the new write_voffset. Cleanup.
26691 2013-10-24 Dodji Seketeli <dodji@redhat.com>
26693 White space and style fixes
26694 * include/abg-ir.h (class_decl::member_function::member_function):
26695 Align function parameters.
26696 * src/abg-ir.cc (type_decl::operator==): Remove useless white spaces
26698 2013-10-24 Dodji Seketeli <dodji@redhat.com>
26700 Do not report added/removed type_decls
26701 * src/abg-comparison.cc (scope_diff::report): Do not report
26702 added/removed type_decls.
26704 2013-10-24 Dodji Seketeli <dodji@redhat.com>
26706 Fix string representation for variables and methods
26707 * src/abg-ir.cc (var_decl::get_pretty_representation): Don't use
26708 the pretty representation for the type of the variable; just use
26709 its qualified name.
26710 (method_type::set_class_type): I wonder what I was thinking when
26711 setting the first parameter's type to being the type of the
26712 class. Remove this.
26713 (function_decl::get_pretty_representation): Use the "method "
26714 prefix for methods. Avoid printing the first parameter of
26715 methods. Use the qualified name of the parameter type, rather
26716 than its pretty representation.
26717 * src/abg-writer.cc (write_class_decl): Do not skip the first
26718 function parameter when serializing the method.
26720 2013-10-24 Dodji Seketeli <dodji@redhat.com>
26722 Support reporting removed types/decls
26723 * include/abg-comparison.h (scope_diff::{removed_types,
26724 removed_decls, added_types, added_decls}): New accessor methods
26726 * src/abg-comparison.cc (scope_diff::{removed_types,
26727 removed_decls, added_types, added_decls}): New accessor methods
26729 (scope_diff::report): Report removed & added types/decls.
26731 2013-10-24 Dodji Seketeli <dodji@redhat.com>
26733 Fix erratic reporting of changed types & decls in scopes
26734 * src/abg-comparison.cc
26735 (scope_diff::ensure_lookup_tables_populated): A changed type/decl
26736 is not only one that has been both deleted and inserted (as is a
26737 type/decl with a given name N has been deleted and a type/decl
26738 with that same name N has been inserted), but we must also ensure
26739 that both inserted and deleted type/decl are not the same.
26740 Otherwise, it might has been a type/decl that has been shuffled
26743 2013-10-24 Dodji Seketeli <dodji@redhat.com>
26745 Fix some class & scope diff reports formatting glitchs
26746 * src/abg-comparison.cc (class_diff::report): Quote data members.
26747 (scope_diff::report): Simplify how we report changed types. Avoid
26748 unnecessary vertical spaces.
26750 2013-10-24 Dodji Seketeli <dodji@redhat.com>
26752 Pretty representation for variables and types by default
26753 * include/abg-ir.h (var_decl::get_pretty_representation): New
26754 method declaration.
26755 * src/abg-ir.cc (decl_base::get_pretty_representation): Prefix
26756 types with the "type " string.
26757 (var_decl::get_pretty_representation): New method definition.
26759 2013-10-24 Dodji Seketeli <dodji@redhat.com>
26761 Re-write middle snakes management in core diff algorithms
26762 * include/abg-diff-utils.h (point::set): New overload..
26763 (point::{add, operator<, operator>, operator<=, operator>=}): New
26765 (point::operator!=): Constify.
26766 (point::operator==): Constify. Cleanup.
26767 (point::operator=): Keep emptiness.
26768 (class snake): New class definition
26769 (d_path_vec::{over_bounds, offset}): New methods.
26770 (d_path_vec::check_index_against_bound): Don't take a bound
26771 parameter anymore. Use the new over_bound method above. Fix up
26773 (d_path_vec::d_path_vec): Fix d_path_vec size allocation.
26774 (d_path_vec::operator[]): Use the d_path_vec::at method to check
26775 all accesses against the bounds. This is slower, but at least we
26776 can expect to have something that is more robust. We can remove
26777 the bound checking later when we are sure the code has been tested
26778 enough. Also use the new offset() method.
26779 (d_path_vec::at): Take long long.
26780 (ends_of_furthest_d_paths_overlap): Constify input parameters.
26781 (end_of_fr_d_path_in_k, end_of_frr_d_path_in_k_plus_delta): Take
26782 an instance of the new snake in parameter, rather than a bare end
26783 point that wasn't carrying enough information about the snake.
26784 Record the snake which consists of up to four points: a begin
26785 point, an intermediate point, a diagonal start point and an end
26786 point. Return that snake upon successful completion.
26787 (compute_middle_snake): Take an instance of snake, rather than the
26788 two points that were supposed to represent a snake and with which
26789 we were loosing information before. Revisit/simplify the logic of
26790 this function; this literally goes forward or in reverse, gets the
26791 resulting snake returned by the end_of_fr_d_path_in_k and
26792 end_of_frr_d_path_in_k_plus_delta functions, detect if these snakes
26793 overlap and just return the current snake. Much simpler. The
26794 caller now gets a snake, which has much more information than the
26795 previous snake approximation made of just two points. Bonus
26796 point, this follows almost to the word, what the paper says.
26797 (maybe_record_match_point, find_snake_start_point): Remove these
26798 as there are not used by compute_middle_snake anymore.
26799 (print_snake, ses_len): Update these to take/handle a snake.
26800 (snake_end_points): New declaration.
26801 (compute_diff): When we are getting an empty first sequence, this
26802 means that we are inserting the second sequence *before* the
26803 beginning of the first sequence; keep this information by setting
26804 the insertion point index to -1, rather than zero. Update this to
26805 get/handle snakes, rather than free points vaguely representing
26806 snakes. Now that compute_middle_snake returns real snakes, handle
26807 the information we are getting. Basically for edit scripts of
26808 length equal to 1, as the snake carries all the necessary
26809 information about the non-diagonal edge (as well as the diagonal
26810 edges), we (can) now precisely update the current edit script (as
26811 well as the longest common sub-sequence). For edit scripts of
26812 length greater than 1, better at which points to divide the
26813 problem and consequently, at which points to conquer it back --
26814 better following The Paper to the letter.
26815 (display_edit_script): Update this for the use of instances of
26817 * src/abg-diff-utils.cc (ends_of_furthest_d_paths_overlap): Update
26818 for constification of inputs.
26819 (snake_end_points): Define new function.
26820 (compute_middle_snake): Adapt for the taking an instance of snake.
26821 * tests/test-diff2.cc (main): Update for using instances of snake.
26822 * tests/test-core-diff.cc: Add new tests.
26823 * tests/data/test-core-diff/report0.txt: Update for output
26825 * tests/data/test-core-diff/report6.txt: Likewise.
26826 * tests/data/test-core-diff/report7.txt: Likewise.
26827 * tests/data/test-core-diff/report8.txt: New test data.
26828 * tests/data/test-core-diff/report9.txt: Likewise.
26829 * tests/data/test-core-diff/report10.txt: Likewise.
26830 * tests/data/test-core-diff/report11.txt: Likewise.
26831 * tests/data/test-core-diff/report12.txt: Likewise.
26832 * tests/data/test-core-diff/report3.txt: Likewise.
26834 2013-10-19 Dodji Seketeli <dodji@redhat.com>
26836 Support diff/reporting for functions & better diff/report in general
26837 * include/abg-ir.h ({decl_base, class_decl,
26838 function_decl}::get_pretty_representation): New virtual member to
26839 get a pretty string name for decls & types.
26840 (class_decl::parameter): Add an index to the parameter type.
26841 (class_decl::parameter::parameter): Update the constructor for the
26843 (class_decl::parameter::{get_index, set_index}): Accessors for the
26845 (class_decl::parameter::operator==): Take in account the index.
26846 (function_type::append_parameter): Set the index of the parameter
26848 * include/abg-fwd.h (get_type_name): New declaration.
26849 * src/abg-ir.cc (get_type_name): New definition.
26850 ({decl_base, function_decl,
26851 class_decl}::get_pretty_representation): New implementations.
26852 (method_type::set_class_type): Update this to set function
26853 parameter's index by default.
26854 (function_decl::append_parameters): Use the append_parameter
26855 method from function_type.
26856 * include/abg-comparison.h (class function_decl_diff): New type
26858 * src/abg-comparison.cc (compute_diff_for_decls, compute_diff):
26860 ({pointer_diff, class_diff, scope_diff}::report): Use the new
26861 get_pretty_representation. Output a prettier report.
26862 (function_decl_diff::priv): New type.
26863 (function_decl_diff::{deleted_parameter_at, inserted_parameter_at,
26864 ensure_lookup_tables_populated, function_decl_diff,
26865 first_function_decl, second_function_decl, changed_parms,
26866 removed_parms, added_parms, length, report}): New member function
26868 * src/abg-hash.cc (function_decl::parameter::hash): Update this to
26869 take the index in account.
26871 2013-10-19 Dodji Seketeli <dodji@redhat.com>
26873 Misc style & white space fixes
26874 * include/abg-fwd.h (is_global_scope, is_at_global_scope)
26875 (is_at_class_scope, is_at_template_scope, is_template_parameter)
26876 (is_type, is_var_decl, is_template_parm_composition_type)
26877 (is_template_decl, is_function_template_pattern)
26878 (add_decl_to_scope, get_global_scope, get_translation_unit):
26879 Remove parameter names from declarations.
26880 * include/abg-ir.h (decl_base::set_location): Remove useless white
26882 (struct type_shared_ptr_equal): Fix comment filling.
26884 2013-10-16 Dodji Seketeli <dodji@redhat.com>
26886 Avoid useless hashing during serialization
26887 * src/abg-writer.cc (write_context::get_id_for_type): Avoid the
26888 useless hashing incurred by the [] operator on the map, when we
26889 already have the value we want.
26891 2013-10-16 Dodji Seketeli <dodji@redhat.com>
26893 Add more IR nodes dumping routines
26894 * include/abg-fwd.h (dump): Declare 4 overloads for the dumping
26896 * include/abg-ir.h (var_decl_sptr): New typedef.
26897 * src/abg-writer.cc (dump(const decl_base_sptr)): Add comments.
26898 (dump(const type_base_sptr)): New dumping routines.
26899 (dump(const var_decl_sptr)): Likewise.
26901 2013-10-16 Dodji Seketeli <dodji@redhat.com>
26903 Fix IR node comparison bugs
26904 * include/abg-ir.h (type_shared_ptr_equal::operator()): Fix thinko
26905 in checking for the boolean value of the pointers to types.
26906 * src/abg-ir.cc (type_decl::operator==(const decl_base&)): Do not
26907 forget to compare the decl_base part of the type too.
26908 (type_decl::operator==(const type_base&)): To ease maintenance,
26909 re-use the equality operator that takes a decl_base.
26910 (scope_type_decl::operator==(const type_base&)): Likewise.
26911 (qualified_type_def::operator==(const type_base&)): Likewise.
26912 (compare_function_types): New sub-routine to compare function
26913 types. It fixes an infinite recursion when comparing two methods
26915 (function_type::operator==(const type_base&)): Use the new
26916 compare_function_types function.
26917 (class_decl::operator==(const decl_base&)): Fix a thinko in the
26918 first test of the function. Use a dedicated scope for each class
26919 section comparison; that way, there won't be any chance to misuse
26920 the variables pertaining to a different section. Fix the member
26921 function sections; we were mistakenly using the variables for the
26922 *data* section there.
26923 (class_decl::operator==(const type_base&)): Re-use the operator
26924 that takes a decl_base.
26925 (class_decl::operator==(const class_decl&)): Don't remove
26926 const-ness during the static cast.
26927 (class_decl::member_function::operator==(const member_function&)):
26928 Do not remove the reference from the static cast.
26929 (class_decl::member_class_template::operator==(const
26930 member_base&)): Likewise.
26931 (type_tparameter::operator==(const template_parameter&)):
26933 (template_tparameter::operator==(const template_parameter&)):
26935 (function_tdecl::operator==(const template_decl&)): Likewise.
26936 (class_tdecl::operator==(const template_decl&)): Likewise.
26937 (class_tdecl::operator==(const class_tdecl&)): Likewise.
26938 * tests/data/test-read-write/test12.xml: Update this because the
26939 test now correctly considers two type template parameters at the
26940 same index as being equivalent.
26941 * tests/data/test-read-write/test13.xml: Likewise.
26943 2013-10-16 Dodji Seketeli <dodji@redhat.com>
26945 On going white space cleanups
26946 * include/abg-ir.h: Remove useless white spaces.
26947 * src/abg-ir.cc: Likewise.
26948 * src/abg-reader.cc: Likewise.
26949 * src/abg-writer.cc: Likewise.
26951 2013-10-15 Dodji Seketeli <dodji@redhat.com>
26953 Finish reporting about class_diff
26954 * src/abg-comparison.cc (report_num_dels_or_ins): Factorize out
26955 the header of each of inserted/deleted parts of the class into
26957 (class_diff::report): Use the new report_num_dels_or_ins. Cleanup
26958 the code. Add support for reporting about member functions,
26959 member function templates and member class templates.
26961 2013-10-15 Dodji Seketeli <dodji@redhat.com>
26963 White space cleanup in abg-ir.h
26965 (class_decl::member_function_template::member_function_template):
26966 Remove useless white space.
26968 2013-10-15 Dodji Seketeli <dodji@redhat.com>
26970 Progress on diffing pointers, references and classes
26971 * include/abg-comparison.h (diff::{first_subject,second_subject): Changed
26972 first_scope/second_scope into these; so that this diff class now works on
26973 stuff that are not scope. Changed the type of these to
26975 (diff::diff): Update for the change above.
26976 (diff::{length, report}): New virtual pure methods.
26977 (class pointer_diff, reference_diff): New classes declarations.
26978 (compute_diff): New overloads for the new classes above. Make the
26979 existing overloads take shared_pointers instead of references.
26980 Also make them return shared pointers of the computed diff, rather
26981 than just populating diff references passed in parameter.
26982 (class class_diff): Renamed class class_decl_diff into this.
26983 (report_changes): Change these functions into member functions.
26984 * src/abg-comparison.cc (compute_diff_for_types): New static
26986 (pointer_diff::pointer_diff, pointer_diff::first_pointer)
26987 (pointer_diff::second_pointer, pointer_diff::length)
26988 (pointer_diff::underlying_type_diff)
26989 (pointer_diff::underlying_type_diff, pointer_diff::report)
26990 (pointer_diff::report, compute_diff)
26991 (reference_diff::reference_diff, reference_diff::first_reference)
26992 (reference_diff::second_reference)
26993 (reference_diff::underlying_type_diff)
26994 (reference_diff::underlying_type_diff, reference_diff::length)
26995 (reference_diff::report, compute_diff): New functions.
26996 (class_diff::class_diff, class_diff::length)
26997 (class_diff::first_class_decl, class_diff::second_class_decl)
26998 (class_diff::base_changes, class_diff::base_changes)
26999 (class_diff::member_types_changes)
27000 (class_diff::member_types_changes)
27001 (class_diff::data_members_changes)
27002 (class_diff::data_members_changes, class_diff::member_fns_changes)
27003 (class_diff::member_fns_changes)
27004 (class_diff::member_fn_tmpls_changes)
27005 (class_diff::member_class_tmpls_changes)
27006 Update wrt class_decl_diff -> class_diff renaming.
27007 (class_diff::report): Make the report function be a member
27008 function. Add an indentation parameter. Add support for member
27009 types and data members.
27010 (compute_diff): New overload for class_decl_sptr.
27011 (scope_diff::first_scope, scope_diff::second_scope)
27012 (scope_diff::length, scope_diff::report): New member functions.
27013 (scope_diff::{deleted_member_at, inserted_member_at}): Update wrt
27014 first_scope -> first_subject change.
27015 (compute_diff): New overload for scope_decl_sptr.
27016 (translation_unit_diff::report): Change the report function into
27017 this member function.
27018 (compute_diff): Change the overload for translation_unit to take a
27019 translation_unit_sptr rather than a reference.
27020 * tools/bidiff.cc (main): Update this wrt the change of the
27021 signature of compute_diff.
27023 2013-10-15 Dodji Seketeli <dodji@redhat.com>
27025 Fix construction of class_decl::member_type
27026 * include/abg-ir.h (class_decl::member_type::member_type): Remove
27027 inline body from here.
27028 * src/abg-ir.cc (class_decl::member_type::member_type): Move
27029 implementation here. Also, properly set the name of the the
27030 member_type at construction time.
27032 2013-10-15 Dodji Seketeli <dodji@redhat.com>
27034 Few typedef additions to abg-ir.h
27035 * include/abg-ir.h (pointer_type_def_sptr)
27036 (reference_type_def_sptr): New typedefs.
27038 2013-10-11 Dodji Seketeli <dodji@redhat.com>
27040 Add debugging routines for decl_base_sptr and translation_unit
27041 * src/abg-writer.cc (dump): Add two version of this; on for
27042 decl_base_sptr, one for translation_unit&.
27044 2013-10-11 Dodji Seketeli <dodji@redhat.com>
27046 Initial implementation of tu diffing & bidiff cmd line program
27047 * include/abg-comparison.h (class translation_unit_diff): New type.
27048 (compute_diff): Make this take class_decl&, rather than
27049 class_decl_sptr. Add new overloads for scope_decl& and
27051 (report_changes): New overload for scope_diff& and
27053 * src/abg-comparison.cc (struct class_decl_diff::priv): New type.
27054 (class class_decl_diff): Add comments to methods.
27055 (class translation_unit_diff): Implement methods.
27056 (compute_diff, report_changes): Implement the new overloads.
27057 (scope_diff::ensure_lookup_tables_populated): Fix a thinko here.
27058 * src/abg-ir.cc (is_var_decl): Add new predicate.
27059 * tools/abg-tools-utils.h (file_exists, is_regular_file)
27060 (check_file): Declare new functions.
27061 * tools/abg-tools-utils.cc (get_stat, file_exists, check_file)
27062 (is_regular_file): Define new functions.
27063 (is_dir): Use the new get_stat.
27064 * tools/bidiff.cc: New file.
27065 * tools/Makefile.am: Add tools/bidiff.cc to the build system; make it
27066 produce the bidiff tool.
27068 2013-10-10 Dodji Seketeli <dodji@redhat.com>
27070 Fix inheritance of operator== on decl_base and type_base
27071 * include/abg-ir.h (*lots of descendants of decl_base, type_decl)
27072 (template_decl, class_decl::member_base): Replace the previous classical
27073 *::operator==(*&) with an overload of decl_base::operator==(const
27074 decl_base&), type_base::operator==(const type_base),
27075 template_decl::operator==(const template_decl&) or
27076 class_decl::member_base::operator==(const
27077 class_decl::member_base&). This makes the descendant operator be
27078 the one called when a comparison involves references the parent
27080 * src/abg-ir.cc: Write the implementation of the above. Remove
27081 the useless static_casts from the previous operator== code.
27083 2013-10-10 Dodji Seketeli <dodji@redhat.com>
27085 On going misc white spaces and style fixes
27086 * include/abg-ir.h: Add author. Remove many useless white
27087 spaces. Add missing end-of-class comments. Move function
27088 declaration comments from here to their definition point.
27089 * include/abg-fwd.h: Remove useless indentation. Also move
27090 doxygen comments to *definition* points in src/abg-ir.cc.
27091 * src/abg-ir.cc: Remove many useless white spaces. Move comments
27092 from declaration points to here.
27094 2013-10-06 Dodji Seketeli <dodji@redhat.com>
27096 Fix middle snake determination & ses len computation for d == 1
27097 * include/abg-diff-utils.h (compute_middle_snake): After the
27098 overlap determination happened, finding the middle snake can
27099 require keep on building the current path until the "end". The
27100 end meaning reaching the max of D. And that max is (M + N)/2 + 1.
27101 In the extreme cases were middle snake was on the very last step
27102 (M + N) + 1, we were not finding the middle snake. Fix this.
27103 (compute_diff): When d == 1 and the first edge on the edit graph
27104 is a non-diagonal edge and when a_base != a_begin, we were failing
27105 to properly initialize x,y to find that non-diagonal edge. Also
27106 we were failing to correctly compute the size of the sequence.
27108 * tests/test-core-diff.cc: Add a new regression test for the two
27110 * tests/data/test-core-diff/report7.txt: New reference data for
27111 the new regression test.
27113 2013-10-05 Dodji Seketeli <dodji@redhat.com>
27115 Initial un-debugged implementation of scope diffing
27116 * include/abg-comparison.h (class scope_diff): New type.
27117 (compute_diff(scope_decl_sptr, scope_decl_sptr, scope_diff)): New
27119 (report_changes): New declaration.
27120 * src/abg-comparison.cc (struct scope_diff::priv): Define.
27121 (scope_diff::{clear_lookup_tables, lookup_tables_empty,
27122 ensure_lookup_tables_populated, scope_diff, member_changes,
27123 deleted_member_at, inserted_member_at, changed_types,
27124 changed_decls}): Define these new member functions.
27125 (compute_diff): Define.
27126 * include/abg-ir.h (decl_base_sptr): New typedef.
27127 (operator==(decl_base_sptr, decl_base_sptr)): Declare new
27129 * src/abg-ir.cc (operator==(decl_base_sptr, decl_base_sptr)):
27131 (scope_decl::{operator==, traverse}): Adjust for using vectors to
27132 store scope members now, rather than lists.
27133 (scope_decl::{declarations, scopes}): Make these types be vector.
27134 This makes the members of a scopes be vector, rather than lists.
27135 This enables them to be diffed.
27137 2013-10-05 Dodji Seketeli <dodji@redhat.com>
27139 Simplify & cleanup compute_diff core api
27140 * include/abg-diff-utils.h (insertion::inserted_): Changed the
27141 type of this from vector<int> to vector<unsigned>.
27142 (insertion::{insertion, inserted_indexes}): Adjust.
27143 (compute_diff): Add two new simpler overloads. Implement them in
27144 term of the former more complex overload.
27145 (compute_lcs): Adjust for the vector<int> -> vector<unsigned>
27147 * src/abg-diff-utils.cc (compute_lcs, compute_ses): Adjust for the
27148 compute_diff change above.
27149 * src/abg-comparison.cc (compute_diff, report_changes): Adjust for
27150 the compute_diff & vector<unsigned> changes above..
27152 2013-10-05 Dodji Seketeli <dodji@redhat.com>
27154 Misc white space, style and comments cleanup
27155 * include/abg-ir.h (class scope_decl): Add end of class comment.
27156 (class type_base): Add a _sptr typedef and end of class comment.
27157 * src/abg-ir.cc (operator==(class_decl_sptr, class_decl_sptr)):
27160 2013-10-04 Dodji Seketeli <dodji@redhat.com>
27162 Un-debugged initial implementation of class diffing.
27163 * include/abg-ir.h (decl_base::get_qualified_name): New
27165 (class_decl::{base_specs, member_types, data_members,
27166 member_functions, member_function_templates,
27167 member_class_templates}): Make all these containers be vectors,
27168 rather than list. This makes these containers (like
27169 class_decl::base_specs, class_decl::member_types, etc) be suitable
27170 to be used by the core diffing algorithms to diff their content.
27171 (operator==(class_decl_sptr, class_decl_sptr))
27172 (operator==(class_decl::member_type_sptr, class_decl::member_type_sptr))
27173 (operator==(class_decl::base_spec_sptr,
27174 class_decl::base_spec_sptr))
27175 (operator==(class_decl::data_member_sptr,
27176 class_decl::data_member_sptr))
27177 (operator==(class_decl::member_function_sptr,
27178 class_decl::member_function_sptr))
27179 (operator==(class_decl::member_function_template_sptr,
27180 class_decl::member_function_template_sptr))
27181 (operator==(class_decl::member_class_template_sptr,
27182 class_decl::member_class_template_sptr)): Declare
27183 these new equality operators. These are to be used by the core
27184 diffing algorithms when comparing two vectors of shared pointers
27185 of members of class_decls.
27186 * src/abg-ir.cc (decl_base::get_qualified_name): Define.
27187 (class_decl::class_decl, class_decl::operator==(class_decl&)): Adjust for the
27188 containers type change to a vector.
27189 (operator==(class_decl_sptr, class_decl_sptr))
27190 (operator==(class_decl::member_type_sptr, class_decl::member_type_sptr))
27191 (operator==(class_decl::base_spec_sptr,
27192 class_decl::base_spec_sptr))
27193 (operator==(class_decl::data_member_sptr,
27194 class_decl::data_member_sptr))
27195 (operator==(class_decl::member_function_sptr,
27196 class_decl::member_function_sptr))
27197 (operator==(class_decl::member_function_template_sptr,
27198 class_decl::member_function_template_sptr))
27199 (operator==(class_decl::member_class_template_sptr,
27200 class_decl::member_class_template_sptr)): Define
27202 * include/abg-comparison.h (diff::scope_): Remove
27203 (diff::{first_scope_, second_scope_}): New members.
27204 (class_decl_diff::class_decl_diff): Pass the new scopes to this
27206 (class_decl_diff::{first_class_decl, second_class_decl})
27207 (report_changes): New declarations.
27208 * src/abg-comparison.cc (class_decl_diff::class_decl_diff): Update
27209 as per the declaration.
27210 (class_decl_diff::{first_class_decl, second_class_decl}): Define
27211 as per the declaration.
27212 (compute_diff): Initial implementation for this.
27213 (report_changes): Define.
27215 2013-10-04 Dodji Seketeli <dodji@redhat.com>
27217 Change the diff::changes_type back to just edit_script
27218 * include/abg-comparison.h (diff::changes_type):
27219 Remove this typedef.
27220 (class_decl_diff::data_members_changes): Rename
27221 class_decl_diff::data_member_changes into this.
27222 (class_decl_diff::member_fn_tmpls_changes): Renamed
27223 class_decl_diff::member_fn_tmpl_changes into this.
27224 (class_decl_diff::member_class_tmpls_changes): Renamed
27225 class_decl_diff::member_class_tmpl_changes into this.
27226 (class_decl_diff::{base_changes, member_types_changes,
27227 data_members_changes, member_fns_changes, member_fn_tmpls_changes,
27228 member_fn_tmpls_changes, member_class_tmpls_changes}): Adjust
27229 these declarations for the use of edit_script.
27230 * src/abg-comparison.cc (class_decl_diff::priv::*): Likewise.
27231 (class_decl_diff::{base_changes, member_types_changes,
27232 data_members_changes, member_fns_changes, member_fn_tmpls_changes,
27233 member_fn_tmpls_changes, member_class_tmpls_changes}): Adjust
27234 these definitions for the above.
27236 2013-10-04 Dodji Seketeli <dodji@redhat.com>
27238 Misc white space, style and comment fixes
27239 * include/abg-ir.h: Lots of useless white space removals and
27241 (class class_decl::member_base): Fix comment.
27242 * src/abg-hash.cc: Lots of useless white space removals too.
27243 * src/abg-ir.cc: Remove useless white space too.
27245 2013-10-04 Dodji Seketeli <dodji@redhat.com>
27247 Fix middle snake determination
27248 * include/abg-diff-utils.h (point::{operator!=,operator==}): New
27250 (end_of_fr_d_path_in_k, end_of_frr_d_path_in_k_plus_delta): Allow
27251 the initial point (-1,-1) that is not a point addressing elements
27252 of the input sequences, but that is the starting point of the
27253 forward paths and the ending point of reverse paths in the "Linear
27254 Refinement" of the algorithm.
27255 (is_match_point, maybe_record_match_point)
27256 (find_snake_start_point): New functions.
27257 (find_last_snake_in_path): Remove this. It's not used anymore.
27258 (compute_middle_snake): Allow checking for overlapping paths even
27259 on points that are outside of the edit graph boundaries. Once the
27260 overlap is detected, if a non-empty snake has been seen already,
27261 report it as the middle snake. Otherwise, keep building the path
27262 until the end and report the last snake encountered as the middle
27263 snake. Add comments.
27264 (compute_diff): For the d == 1 case, fix the logic of the finding
27265 the non-diagonal edge. Fix typos. Add comments.
27266 (display_edit_script): Fix report glitches.
27267 * tests/data/test-core-diff/report3.txt: Update as per the report
27269 * tests/data/test-core-diff/report4.txt: Likewise.
27270 * tests/data/test-core-diff/report5.txt: Likewise.
27271 * tests/data/test-core-diff/report6.txt: New reference report for
27273 * tests/test-core-diff.cc: Add a new test for negative delta.
27275 2013-10-03 Dodji Seketeli <dodji@redhat.com>
27277 Initial regression test facility for core diff algorithms
27278 * tests/data/test-core-diff/report0.txt: New test reference data.
27279 * tests/data/test-core-diff/report1.txt: Likewise.
27280 * tests/data/test-core-diff/report2.txt: Likewise.
27281 * tests/data/test-core-diff/report3.txt: Likewise.
27282 * tests/data/test-core-diff/report4.txt: Likewise.
27283 * tests/data/test-core-diff/report5.txt: Likewise.
27284 * tests/test-core-diff.cc: New regression test program.
27285 * tests/Makefile.am: Add these new files to the build system.
27287 2013-10-02 Dodji Seketeli <dodji@redhat.com>
27289 Initial command line testing facility for core diff algorithms
27290 * tests/test-diff2.cc: New command line testing facility.
27291 * tests/Makefile.am: Add this to the build system.
27293 2013-10-02 Dodji Seketeli <dodji@redhat.com>
27295 Fix core diff algorithms for negative deltas
27296 * diff2.h (point::point): New copy constructor.
27297 (point::{operator+=, operator=}): Use point::set.
27298 (point::{operator--, operator++,}): New operators.
27299 (d_path_vec::{a_size_, b_size_}): New members.
27300 (d_path_vec::max_d_): Remove this member.
27301 (d_path_vec::max_d): Compute this, now that max_d_ was removed.
27302 (point_is_valid_in_graph): Declare this new function.
27303 (end_of_fr_d_path_in_k, ): Return
27304 a bool when the end of furthest reaching past found is within the
27305 bounds of the edit graph. Add comments.
27306 (end_of_frr_d_path_in_k_plus_delta): Likewise. Also, delta can be
27307 negative; support that. Do not cross the boundaries of the edit
27308 graph when following a diagonal edge.
27309 (find_last_snake_in_path): New function.
27310 (compute_middle_snake): Make forward/reverse d_path_vec be big
27311 enough to hold paths for M+N differences. Normally M+N/2 should
27312 be enough, but we were getting weird out of bound errors. Let's
27313 handle it this way for now. Do not require that we check for
27314 overlap only when we are on a diagonal edge. Once we detected an
27315 overlap, use the new find_last_snake_in_path to find the
27316 boundaries of the snake.
27317 (ses_len): Delta can be negative.
27318 (display_edit): Small minor English nit.
27320 2013-09-28 Dodji Seketeli <dodji@redhat.com>
27322 Lay down the foundations of computing the diff between two class_decl
27323 * include/abg-diff-utils.h: New file.
27324 * src/abg-diff-utils.cc: Likewise. Implement the code diffing
27325 algorithms from Eugene Myers.
27326 * include/abg-comparison.h: New file. First short at defining the
27327 basic APIs to compute the diff of two classes.
27328 * src/abg-comparison.cc: New file. Start the implementation of
27331 2013-09-26 Dodji Seketeli <dodji@redhat.com>
27333 Prepare node visitors to be usable on things other than IR nodes
27334 * include/abg-fwd.h (node_visitor_base): Renamed ir_node_visitor
27336 * include/abg-traverse.h (struct node_visitor_base): New base for
27338 (struct traversable_base): Update comments.
27339 (traversable_base::traverse): Change this into non-pure virtual.
27340 Make it take a reference to node_visitor_base, rather than a
27341 reference to ir_node_visitor.
27342 * src/abg-traverse.cc (traversable_base::traverse): New empty
27343 default implementation.
27344 * include/abg-ir.h: Make ir_node_visitor inherit from new
27347 2013-09-26 Dodji Seketeli <dodji@redhat.com>
27349 Renamed data members from m_something to something_
27350 * src/abg-ir.{cc,h}: Renamed data members from m_something to
27351 something_ and update their usage.
27353 2013-08-29 Dodji Seketeli <dodji@redhat.com>
27355 Initial version of an archive manipulation program: biar
27356 * tests/test-utils.h (is_dir, ensure_dir_path_created)
27357 (ensure_parent_dir_created): Move these directories manipulation
27358 utilities from here to ...
27359 * tools/abg-tools-utils.h (is_dir, ensure_dir_path_created)
27360 (ensure_parent_dir_created): ... here in this new file.
27361 (dir_name, base_name): Declare these new functions.
27362 * tests/test-utils.cc (is_dir, ensure_dir_path_created)
27363 (ensure_parent_dir_created): Likewise, move these to ...
27364 * tools/abg-tools-utils.cc (is_dir, ensure_dir_path_created)
27365 (ensure_parent_dir_created): ... here in this new file.
27366 (dir_name, base_name): Define these.
27367 * tools/Makefile.am: New file. Create a new libtoolsutils.la
27368 static library with stuff from tools/abg-tools-utils.cc in it.
27369 Also create a new 'biar' program with the stuff from the new
27370 tools/biar.cc in it.
27371 * tools/biar.cc: New file. Contains the code for the new "biar"
27372 archive manipulation command line utility.
27373 * tests/test-read-write.cc (main): Adjust for the change about
27374 ensure_parent_dir_created above.
27375 * tests/test-write-read-archive.cc (main): Likewise.
27376 * Makefile.am (SUBDIRS): Add the new tools/ sub-directory to the
27378 * configure.ac (AC_CONFIG_FILES): Generate tools/Makefile.
27379 * tests/Makefile.am: Make libtestutils.la link with the new
27380 libtoolsutils.la. Make sure to express the dependencies between
27381 libtestutils.la and the binaries that depend on it. Otherwise
27382 parallel builds can go awry.
27384 2013-08-29 Dodji Seketeli <dodji@redhat.com>
27386 Define translation_unit{_sptr,s} types in abigail::
27387 * include/abg-corpus.h (abigail::corpus::{translation_unit_sptr,
27388 translation_units): Do not define these typedefs here. Rather)
27391 (abigail::{translation_units,translation_unit_sptr): ... here.
27392 This is because a translation unit can be manipulated
27393 independently from an abi corpus.
27394 * src/abg-corpus.cc (corpus::get_translation_units): Adjust return
27395 type to comply with the change above.
27397 2013-08-29 Dodji Seketeli <dodji@redhat.com>
27399 Fix header inclusion in abg-corpus.h
27400 * include/abg-corpus.h: Drop incomplete abg-traverse.h and
27401 abg-fwd.h. Use abg-ir.h proper and be done with it. Users of the
27402 library will just have to use abg-corpus.h to manipulate and the
27403 archives and the IR they contain.
27405 2013-08-29 Dodji Seketeli <dodji@redhat.com>
27407 Add error message to translation_unit::write
27408 * src/abg-writer.cc (translation_unit::write): Add an error
27409 message to stderr if something ultimately went wrong.
27411 2013-08-29 Dodji Seketeli <dodji@redhat.com>
27413 Rename abigail::corpus::{get_file_path --> get_path}
27414 * include/abg-corpus.h (corpus::{get_path, set_path): Renamed
27415 corpus::get_file_path and corpus::set_file_path into these as
27416 get_path/set_path is what is used elsewhere as well.
27417 * src/abg-corpus.cc (corpus::{get_path, set_path}): Likewise.
27418 * tests/test-write-read-archive.cc (main): Adjust for the change
27421 2013-08-29 Dodji Seketeli <dodji@redhat.com>
27423 Cleanup src/Makefile.am
27424 * src/Makefile.am: Fix library naming and remove useless trailing
27425 space from directory path.
27427 2013-08-27 Dodji Seketeli <dodji@redhat.com>
27429 Initial writing/reading of an ABI corpus to an archive
27430 * configure.ac: Support detection of libzip dependency. Define
27431 new DEPS_CFLAGS and DEPS_LIBS variables for use in
27432 Makefile.am to refer to the dependency headers and
27434 * doc/website/mainpage.txt: Update this to talk about the new
27436 * include/Makefile.am: Add abg-libzip-utils.h to the build system.
27437 * include/abg-corpus.h (corps): Hide abigail::corpus's private behind a
27439 (corpus::{drop_translation_units, get_file_path, set_file_path,
27440 write, read}): New methods.
27441 * include/abg-libxml-utils.h (new_reader_from_buffer): Declare new
27443 * include/abg-libzip-utils.h: New file.
27444 * src/Makefile.am: Add abg-corpus.cc and abg-libzip-utils.cc to
27445 the build system. Refer to the library and headers dependencies
27446 via the new DEPS_LIBS and DEPS_CFLAGS variables.
27447 * src/abg-corpus.cc: New file.
27448 * src/abg-ir.cc (translation::set_path): New method.
27449 * src/abg-libxml-utils.cc (new_reader_from_buffer): Define new
27451 * src/abg-libzip-utils.cc: New file.
27452 * src/abg-reader.cc (translation_unit::read): New overload.
27453 * src/abg-writer.cc: Inject the names from the std namespace into
27454 the abigail namespace, rather than into abigail::writer.
27455 (abigail::translation_unit::write): New overload. This can now
27456 use ofstream and the other stuff from std that are injected in the
27457 abigail:: namespace.
27458 * tests/Makefile.am: Add tests/test-write-read-archive.cc to the
27459 build system; use that to build runtestwritereadarchive. Also add
27460 the input test data from
27461 tests/data/test-write-read-archive/test[0-4].xml.
27462 * /tests/data/test-write-read-archive/test[0-4].xml: New test
27464 * tests/test-write-read-archive.cc: New test for this archive
27465 write/read support.
27467 2013-08-27 Dodji Seketeli <dodji@redhat.com>
27469 Fix & add missing API documentation
27470 * src/abg-ir.cc (location_manager::create_new_location): Fix
27471 documentation comment. (translation_unit::translation_unit)
27472 (translation_uni::get_global_scope, translation_unit::get_path)
27473 (translation_unit::traverse, translation_unit::get_loc_mgr)
27474 (translation_unit::is_empty, translation_unit::traverse): Add
27475 missing documentation comments.
27476 * src/abg-libxml-utils.cc (new_reader_from_file): Fix comment.
27477 * src/abg-reader.cc (translation_unit::read): Likewise.
27479 2013-08-27 Dodji Seketeli <dodji@redhat.com>
27481 Remove useless header inclusion
27482 * include/abg-traverse.h: Remove useless #include <tr1/memory>
27484 2013-08-27 Dodji Seketeli <dodji@redhat.com>
27486 Misc white space cleanups
27487 * include/abg-corpus.h: Cleanup white spaces.
27488 * include/abg-fwd.h: Likewise.
27489 * include/abg-ir.h: Likewise.
27490 * include/abg-libxml-utils.h: Likewise.
27491 * src/abg-config.cc: Likewise.
27492 * src/abg-ir.cc: Likewise.
27493 * src/abg-reader.cc: Likewise.
27494 * src/abg-writer.cc: Likewise.
27496 2013-08-27 Dodji Seketeli <dodji@redhat.com>
27498 Small cleanup in abg-config.cc
27499 * src/abg-config.cc: Include auto-generated
27500 $(top_builddir)/config.h file.
27502 2013-08-27 Dodji Seketeli <dodji@redhat.com>
27504 Pass absolute paths to the compiler during the build
27505 * src/Makefile.am: Pass absolute file paths to the compiler during
27506 the build. This helps in e.g in emacs' compilation mode, when the
27507 output shows an error reported by GCC's diagnostics, setting point
27508 to the error line and hitting 'enter' transports the user to the
27509 file location where the error happened; as the file path is nows
27510 absolute, emacs can always find it. Otherwise, finding it depends
27511 on $PWD and whatnot.
27512 * tests/Makefile.am: Likewise.
27514 2013-08-27 Dodji Seketeli <dodji@redhat.com>
27516 Misc cleanups in abg-fwd.h
27517 * include/abg-fwd.h: Move location, location_manager and
27518 translation_unit in the ir section. Remove stuff that was
27519 commented out anyway.
27521 2013-08-27 Dodji Seketeli <dodji@redhat.com>
27523 Move location, location_manager & translation_unit back into abg-ir.h
27524 * include/abg-corpus.h: Move location location_manager,
27525 translation_unit from here ...
27526 * include/abg-ir.h: ... to here. The reason being that these are
27527 really constructs of the Internal Representation of the ABI/API of
27528 a translation unit. What is left in abg-corpus is really
27529 exclusively related to an ABI Corpus, which I see more as a
27530 "packaging" construct that abstracts the bundling of several
27531 translation units together. Also, I fixed some comments about the
27532 location/location_manger types; now a location is made specific to
27533 a translation unit; to an abi corpus. A location of a given
27534 translation unit has to be decoded by the location manager of that
27535 same translation unit.
27537 2013-08-22 Dodji Seketeli <dodji@redhat.com>
27539 Make libxml2 a private dependency wrt pkconfig
27540 * libabigail.pc.in: Libxml2 is not exposed to clients so make it
27541 be a private dependency.
27543 2013-08-22 Dodji Seketeli <dodji@redhat.com>
27545 White space fix in COMPILING
27546 * COMPILING: White space fix.
27548 2013-08-22 Dodji Seketeli <dodji@redhat.com>
27550 Add abg-version.h.in to the source distribution & cleanup
27551 * include/Makefile.am: Add abg-version.h.in to the source
27553 * configure.ac: Generate abg-version.h in using the existing
27554 AC_CONFIG_FILES macro call.
27556 2013-08-22 Dodji Seketeli <dodji@redhat.com>
27558 Support pkgconfig through a new libabigail.pc file
27559 * libabigail.pc.in: New pkgconfig file.
27560 * configure.ac: Define the LIBXML2_VERSION variable that is used
27561 in the libabigail.pc.in file. Generate the libabigail.pc file
27562 from its libabigail.pc.in template.
27563 * Makefile.am: Add libabigail.pc.in to the source distribution.
27564 Install the generated libabigail.pc to the right destination.
27566 2013-08-21 Dodji Seketeli <dodji@redhat.com>
27568 Tweak the apidoc mainpage
27569 * include/abg-fwd.h<doxygen markup>: Fix link to the project web
27570 page and for git check-out.
27572 2013-08-21 Dodji Seketeli <dodji@redhat.com>
27574 Initial website generation-fu using Doxygen
27575 * doc/website/mainpage.txt: New file representing the input for
27577 * doc/website/libabigail-website.doxy: New file representing the
27578 doxygen configuration for the website generation.
27579 * doc/api/libabigail.doxy: Output doxygen generation warnings into
27581 * doc/Makefile.am: Support generating the website from doxygen.
27582 Update the api generation relevant macros names for better
27583 consistency. Make "make html" generate the website too. Make
27584 "make clean" erase the website bits too. Add a 'website'
27585 target to make the website.
27587 2013-08-21 Dodji Seketeli <dodji@redhat.com>
27589 Fix typo in CONTRIBUTING file
27590 * CONTRIBUTING: Fix typo, courtesy of Mark Wielaard.
27592 2013-08-19 Dodji Seketeli <dodji@redhat.com>
27594 Remove autotools-generated files
27595 * Makefile.in: Remove this autotools-generated file. I know that
27596 people in the GCC-realm like storing these autotools-generated
27597 files into the source control system, but I believe in this day
27598 and age, this is annoying (to say the least) for the project
27599 developers for no good reason. Requiring (the ubiquitous)
27600 autoconf for building from source is no big deal today, and typing
27601 "autoreconf" is not hard to do, really. And it saves the
27602 developers for having to update a bunch of boilerplate
27603 automatically generated files into the source control system; this
27604 is really unnecessary noise and it is a commonly accepted good
27605 practice to avoid doing it these days. To help people who do not
27606 know how to handle this, there is a COMPILING file in the source
27607 tree that explains how to build the project from sources.
27608 * aclocal.m4: Likewise.
27609 * configure: Likewise.
27610 * include/Makefile.in: Likewise.
27611 * src/Makefile.in: Likewise.
27612 * doc/Makefile.in: Likewise.
27613 * tests/Makefile.in: Likewise.
27615 2013-08-19 Dodji Seketeli <dodji@redhat.com>
27617 Add a new COMPILING file explaining how to build the package
27618 * COMPILING: New file.
27620 2013-08-14 Dodji Seketeli <dodji@redhat.com>
27622 Remove name of unused parameter in decl_base::traverse.
27623 * src/abg-ir.c (decl_base::traverse): Remove name of unused parameter.
27625 2013-08-14 Dodji Seketeli <dodji@redhat.com>
27627 install headers in $includedir/libabigail
27628 * include/Makefile.am: Install headers in $includedir/libabigail
27630 2013-08-14 Dodji Seketeli <dodji@redhat.com>
27632 For usage from within GCC set header path to $includedir/libabigail
27633 * abigail.m4: The include path used for compilation goes to
27634 $includedir/libabigail.
27636 2013-08-08 Benjamin Kosnik <bkoz@redhat.com>
27638 Separate out bits from the ir header.
27639 * include/abg-irfwd.h: Move to...
27640 * include/abg-fwd.h: ...this.
27641 * include/abg-ir.h (traverse_base): Move to...
27642 * include/abg-traverse.h: ...here. New.
27643 * include/abg-ir.h (location, location_manager, translation_unit):
27645 * include/abg-corpus.h: ...here.
27646 * include/Makefile.am: Adjust.
27647 * include/Makefile.in: Regenerate.
27649 2013-08-07 Benjamin Kosnik <bkoz@redhat.com>
27651 Template naming compression.
27652 * include/abg-ir.h: Template naming compressions.
27653 (class_template_decl): To class_tdecl.
27654 (function_template_decl): To function_tdecl.
27655 (template_type_parameter): To type_tparameter.
27656 (template_non_type_parameter): To non_type_tparameter.
27657 (template_template_parameter): To template_tparameter.
27658 (tmpl_parm_type_composition): To type_composition.
27659 * include/abg-irfwd.h: Same.
27660 * src/abg-hash.cc: Same.
27661 * src/abg-ir.cc: Same.
27662 * src/abg-reader.cc: Same.
27664 2013-08-07 Benjamin Kosnik <bkoz@redhat.com>
27666 Slight change to doxy config.
27667 * doc/api/libabigail.doxy: Turn off namespace scopes, on all the viz.
27669 2013-08-07 Benjamin Kosnik <bkoz@redhat.com>
27671 Move class_decl nested types out-of-line.
27672 * include/abg-ir.h (class_decl): Move nested types out of line.
27674 2013-08-07 Benjamin Kosnik <bkoz@redhat.com>
27676 Rename class_decl::method to class_decl::method_base.
27677 * include/abg-ir.h (class_decl::member): To member_base.
27678 * src/abg-hash.cc: Same.
27679 * src/abg-ir.cc: Same.
27680 * src/abg-writer.cc: Same.
27682 2013-08-07 Benjamin Kosnik <bkoz@redhat.com>
27685 * include/abg-ir.h: Nest all hashers.
27686 * include/abg-irfwd.h (abigail): Don't inject std::tr1::hash.
27687 Remove hasher forward declarations.
27688 * include/abg-hash.h: Tweak.
27689 * src/abg-hash.cc: Define hashers here.
27690 * src/abg-ir.cc: Adjust for above.
27691 * src/abg-reader.cc: Same.
27692 * src/abg-writer.cc: Same.
27694 2013-08-06 Benjamin Kosnik <bkoz@redhat.com>
27696 Rename abi_corpus to corpus
27697 * include/abg-corpus.h (abi_corpus): Change to corpus.
27698 * include/abg-hash.h: Tweaks.
27699 * include/abg-libxml-utils.h: Same.
27701 2013-08-06 Benjamin Kosnik <bkoz@redhat.com>
27703 Simplify interface for serializing/deserializing translation_units.
27704 * include/abg-ir.h (translation_unit::read): New member function.
27705 (translation_unit::write): Same.
27706 * src/abg-reader.cc (translation_unit::read): Define.
27707 * src/abg-writer.cc (translation_unit::write): Define.
27708 * include/abg-reader.h: Remove.
27709 * include/abg-writer.h: Remove.
27710 * include/Makefile.am (headers): Same.
27711 * include/Makefile.in: Regenerate.
27713 2013-08-06 Benjamin Kosnik <bkoz@redhat.com>
27715 First pass clean reading API.
27716 * include/abg-reader.h (read_file): Remove extraneous file parameter.
27717 * src/abg-reader.cc: Same.
27718 * tests/test-read-write.cc: Adjust.
27720 2013-08-06 Benjamin Kosnik <bkoz@redhat.com>
27722 Rename traversable to traversable_base, move up the _decl hierarchy via decl_base derivation.
27723 * include/abg-ir.h (traversable): To traversable_base.
27724 (decl_base): Inherit from traversable_base.
27725 (decl_base::traverse): Null definition.
27726 (function_decl, etc.): Remove traversable_base as base class.
27728 2013-08-06 Benjamin Kosnik <bkoz@redhat.com>
27730 Standardize typedef naming. Plural form is the container form, smart_ptr types are type + _sptr.
27731 * include/abg-ir.h (scope_decl): Add declarations, scopes as types.
27732 (function_type): Add parameter_sptr, parameters as types.
27733 (enum_type_decl): Add type_sptr, enumerators as types.
27734 (class_decl): Adjust typedefs for consistency. Change
27735 base_specs_type to base_specs, member_types_type to member_types,
27736 data_members_type to data_members, member_functions_type to
27737 member_functions, member_function_templates_type to
27738 member_function_templates, member_class_templates_type to
27739 member_class_templates.
27741 2013-08-02 Benjamin Kosnik <bkoz@redhat.com>
27743 Doxygen markup fixes final.
27744 * include/abg-config.h: Doxygen cleanups round two.
27745 * include/abg-hash.h: Same.
27746 * include/abg-ir.h: Same.
27747 * include/abg-irfwd.h: Same.
27748 * include/abg-libxml-utils.h: Same.
27749 * src/abg-config.cc: Same.
27750 * src/abg-hash.cc: Same.
27751 * src/abg-ir.cc: Same.
27752 * src/abg-reader.cc: Same.
27753 * src/abg-writer.cc: Same.
27755 2013-08-01 Benjamin Kosnik <bkoz@redhat.com>
27757 Forward decls for abg-ir.h, doxygen fixups, restyle.
27758 * include/abg-irfwd.h: New file for forward declarations.
27759 * include/Makefile.am: Add new header.
27760 * include/Makefile.in: Regenerate.
27761 * include/*: Forward declare, doxygen fixups, restyle.
27763 * src/abg-corpus.cc: Empty, removed.
27764 * doc/api/libabigail.doxy: Tweak.
27766 2013-08-01 Benjamin Kosnik <bkoz@redhat.com>
27768 Add virtual dtor to translation_unit.
27769 * include/abg-ir.h (translation_unit): Add virtual dtor.
27770 * src/abg-ir.cc: Define.
27772 2013-08-01 Benjamin Kosnik <bkoz@redhat.com>
27774 Adjust doxygen input path.
27775 * doc/api/libabigail.doxy: Adjust include directory.
27777 2013-08-01 Benjamin Kosnik <bkoz@redhat.com>
27779 Collapse subdir of include to include.
27780 * include/libabigail/abg-*.h: Move to...
27782 * include/libabigail: Remove.
27783 * configure.ac: Adjust include location from libabigail/include to
27785 * Makefile.in: Same.
27786 * aclocal.m4: Same.
27788 * doc/Makefile.in: Same.
27789 * include/Makefile.am: Same.
27790 * src/Makefile.am: Same.
27791 * src/Makefile.in: Same.
27792 * tests/Makefile.am: Same.
27793 * tests/Makefile.in: Same.
27795 2013-07-23 Dodji Seketeli <dodji@seketeli.org>
27797 Update autotool auto-generated files
27798 * Makefile.in: Updated.
27799 * aclocal.m4: Likewise.
27800 * configure: Likewise.
27801 * doc/Makefile.in: Likewise.
27802 * src/Makefile.in: Likewise.
27803 * tests/Makefile.in: Likewise.
27805 2013-07-20 Dodji Seketeli <dodji@seketeli.org>
27807 Implement a translation unit traversal API
27808 * include/libabigail/abg-ir.h (struct ir_node_visitor, struct
27809 traversable): New interfaces.
27810 (translation_unit, scope_decl, type_decl, qualified_type_def)
27811 (pointer_type_def, reference_type_def, enum_type_decl)
27812 (typedef_decl, var_decl, function_decl, data_member)
27813 (member_function, member_function_template)
27814 (member_class_template): Implement the traversable interface,
27815 overload the traversable::traverse pure virtual function.
27816 * src/abg-ir.cc ({translation_unit, scope_decl, type_decl,
27817 namespace_decl, qualified_type_def, pointer_type_def,
27818 reference_type_def, enum_type_decl, typedef_decl, var_decl,
27819 function_decl, class_decl::member_function, class_decl,
27820 class_decl::data_member, class_decl::member_function_template,
27821 class_decl::member_class_template, function_template_decl,
27822 class_template_decl, }::traverse): Implement traversal.
27823 (ir_node_visitor::visit): New method, overloaded for the types
27824 above, which implement the traversable interface.
27825 * tests/test-walker.cc: New test case program to showcase how to
27826 use the new traversal API.
27827 * tests/makefile.am: Add test-walker.cc to the build system.
27829 2013-07-19 Dodji Seketeli <dodji@seketeli.org>
27831 By default, statically link libabigail with whoever uses abigail.m4
27832 * abigail.m4: Make $abigaillibs statically link libabigail by default.
27834 2013-07-19 Dodji Seketeli <dodji@seketeli.org>
27836 Move static member definition to abg-viz-dot.cc file
27837 * include/libabigail/abg-viz-dot.h: Move definition of
27838 node_base::_M_count_total to ...
27839 * src/abg-viz-dot.cc: ... here.
27841 2013-07-19 Dodji Seketeli <dodji@seketeli.org>
27843 Put headers in include/libabigail
27844 * include/libabigail: New directory.
27845 * include/Makefile.am: New file.
27846 * include/libabigail/Makefile.am: New file.
27847 * src/abg-*.h: Move these in include/libabigail/*.h
27848 * src/Makefile.am: Set -I option to look for headers in include/libabigail
27849 * doc/api/libabigail.doxy: Look for headers in include/libabigail
27850 * tests/Makefile.am: Set -I option to look for headers in include/libabigail
27851 * abigail.m4: Set includedir to $prefix/include/libabigail for
27852 library used as a dep, or to srcdir/libabigail/include/libabigail
27853 in GCC source tree.
27854 * configure.ac: Add Makefile.am in include and include/libabigail
27855 * abigail.m4: Look for headers in include/libabigail when the
27856 libabigail is in in the source tree and in $incdir/libabigail when
27857 it is installed as a dependency.
27859 2013-07-18 Benjamin Kosnik <bkoz@redhat.com>
27861 Install into docdir, turn off collaboration graphs.
27862 * doc/Makefile.am (doc-install-html-doxygen): Install generated
27864 * doc/api/libabigail.doxy (COLLABORATION_GRAPH): Turn off.
27866 2013-07-18 Benjamin Kosnik <bkoz@redhat.com>
27868 Fix dependencies for api/html output directory.
27869 * doc/Makefile.am: Create abi output directory.
27871 2013-07-16 Dodji Seketeli <dodji@seketeli.org>
27873 Prepare for publishing
27874 * COMMIT-LOG-GUIDELINES: New file.
27875 * CONTRIBUTING: New file.
27876 * README: Amended to refer to the first files above.
27878 2013-07-16 Dodji Seketeli <dodji@seketeli.org>
27880 LGPLv3 License the library
27881 * COPYING-LGPLV3: New file.
27882 * abg-config.cc: License the file to LGPLv3.
27883 * abg-config.h: Likewise.
27884 * abg-corpus.cc: Likewise.
27885 * abg-corpus.h: Likewise.
27886 * abg-hash.cc: Likewise.
27887 * abg-hash.h: Likewise.
27888 * abg-ir.cc: Likewise.
27889 * abg-ir.h: Likewise.
27890 * abg-libxml-utils.cc: Likewise.
27891 * abg-libxml-utils.h: Likewise.
27892 * abg-reader.cc: Likewise.
27893 * abg-reader.h: Likewise.
27894 * abg-writer.cc: Likewise.
27895 * abg-writer.h: Likewise.
27896 * src/abg-viz-common.cc: Likewise.
27897 * src/abg-viz-common.h: Likewise.
27898 * src/abg-viz-dot.cc: Likewise.
27899 * src/abg-viz-dot.h: Likewise.
27900 * src/abg-viz-svg.cc: Likewise.
27901 * src/abg-viz-svg.h: Likewise.
27902 * tests/test-read-write.cc: Likewise.
27903 * tests/test-utils.cc: Likewise.
27904 * tests/test-utils.h: Likewise.
27906 2013-07-17 Dodji Seketeli <dodji@seketeli.org>
27908 Add assert.h in abg-ir.cc
27909 * src/abg-ir.cc: Add missing assert.h
27911 2013-07-17 Dodji Seketeli <dodji@seketeli.org>
27913 Fix missing license blurbs
27914 * src/abg-config.cc: Fix licensing blurb.
27915 * src/abg-config.h: Likewise.
27916 * src/abg-corpus.cc: Likewise.
27917 * src/abg-corpus.h: Likewise.
27918 * src/abg-ir.cc: Likewise.
27919 * src/abg-ir.h: Likewise.
27920 * src/abg-reader.cc: Likewise.
27921 * src/abg-writer.cc: Likewise.
27923 2013-07-02 Benjamin Kosnik <bkoz@redhat.com>
27926 * src/abg-viz-common.h: Use _M_attributes for attribute overflows.
27927 * src/abg-viz-dot.h: Merge in correct node_base.
27928 * src/abg-viz-dot.cc: Same.
27929 * tests/test-dot.cc: Correct examples.
27930 * tests/Makefile.am: Add .gv to CLEANFILES.
27931 * tests/Makefile.in: Regenerate.
27933 2013-07-02 Benjamin Kosnik <bkoz@redhat.com>
27935 Pull out common style type.
27936 * src/abg-viz-common.h: Pull out common style type.
27937 * src/abg-viz-dot.cc: Adjust scoping.
27938 * src/abg-viz-common.cc: Same.
27939 * src/abg-viz-dot.h: Use common style class.
27940 * src/abg-viz-svg.h: Same.
27942 2013-07-02 Benjamin Kosnik <bkoz@redhat.com>
27944 Commonize visualization support.
27945 * src/abg-viz-svg.h: Move common code to...
27946 * src/abg-viz-dot.h: Move common code to...
27947 * src/abg-viz-common.h: ...here. New.
27948 * src/abg-viz-svg.cc: Move common code to...
27949 * src/abg-viz-common.cc: ...here. New.
27950 * src/Makefile.am: Add abg-viz-common.cc, abg-viz-common.h
27951 * src/Makefile.in: Regenerate.
27953 2013-07-01 Benjamin Kosnik <bkoz@redhat.com>
27956 * doc/vizualization/layout/scripts/
27957 (inkscape_export_svg_to_plain_svg.sh): Move...
27958 (inkscape_export_svg_to_png_and_pdf.sh): Move...
27959 * scripts: ..here. New toplevel directory.
27960 * scripts/scripts/dot_to_png.sh: New.
27961 * scripts/scripts/dot_to_svg.sh: New.
27962 * src/Makefile.am: Add abg-viz-dot.cc, abg-viz-dot.h.
27963 * tests/Makefile.am: Add test-dot.cc.
27964 * src/abg-viz-dot.cc: New.
27965 * src/abg-viz-dot.h: New.
27966 * tests/test-dot.cc: New.
27967 * doc/vizualization/graph: New.
27968 * doc/vizualization/graph/gv/sa-A.gv: New.
27969 * doc/vizualization/graph/gv/sa-B.gv: New.
27970 * doc/vizualization/graph/gv/sa-C1.gv: New.
27971 * doc/vizualization/graph/gv/sa-C2.gv: New.
27972 * doc/vizualization/graph/gv/sa-C3.gv: New.
27973 * doc/vizualization/graph/gv/sa-C4.gv: New.
27974 * doc/vizualization/graph/gv/sa-D1.gv: New.
27975 * doc/vizualization/graph/gv/sa-D2.gv: New.
27976 * doc/vizualization/graph/gv/sa-D2v.gv: New.
27977 * doc/vizualization/graph/gv/sa-D3.gv: New.
27978 * doc/vizualization/graph/gv/sa-D3v.gv: New.
27979 * doc/vizualization/graph/gv/sa-D4v.gv: New.
27980 * doc/vizualization/graph/gv/sa-D5v1.gv: New.
27981 * doc/vizualization/graph/gv/sa-D5v2.gv: New.
27982 * doc/vizualization/graph/gv/sa-DD1.gv: New.
27983 * doc/vizualization/graph/gv/sa-DD2.gv: New.
27984 * doc/vizualization/graph/gv/sa-DD3.gv: New.
27985 * doc/vizualization/graph/gv/sa-DD4.gv: New.
27986 * doc/vizualization/graph/gv/sa-DD5.gv: New.
27987 * doc/vizualization/graph/gv/sa-base.gv: New.
27988 * doc/vizualization/graph/png/sa-A.png: New.
27989 * doc/vizualization/graph/png/sa-B.png: New.
27990 * doc/vizualization/graph/png/sa-C1.png: New.
27991 * doc/vizualization/graph/png/sa-C2.png: New.
27992 * doc/vizualization/graph/png/sa-C3.png: New.
27993 * doc/vizualization/graph/png/sa-C4.png: New.
27994 * doc/vizualization/graph/png/sa-D1.png: New.
27995 * doc/vizualization/graph/png/sa-D2.png: New.
27996 * doc/vizualization/graph/png/sa-D2v.png: New.
27997 * doc/vizualization/graph/png/sa-D3.png: New.
27998 * doc/vizualization/graph/png/sa-D3v.png: New.
27999 * doc/vizualization/graph/png/sa-D4v.png: New.
28000 * doc/vizualization/graph/png/sa-D5v1.png: New.
28001 * doc/vizualization/graph/png/sa-D5v2.png: New.
28002 * doc/vizualization/graph/png/sa-DD1.png: New.
28003 * doc/vizualization/graph/png/sa-DD2.png: New.
28004 * doc/vizualization/graph/png/sa-DD3.png: New.
28005 * doc/vizualization/graph/png/sa-DD4.png: New.
28006 * doc/vizualization/graph/png/sa-DD5.png: New.
28007 * doc/vizualization/graph/png/sa-base.png: New.
28008 * doc/vizualization/graph/sources/sa-A.cc: New.
28009 * doc/vizualization/graph/sources/sa-B.cc: New.
28010 * doc/vizualization/graph/sources/sa-C.cc: New.
28011 * doc/vizualization/graph/sources/sa-D.cc: New.
28012 * doc/vizualization/graph/sources/sa-DD.cc: New.
28013 * doc/vizualization/graph/sources/sa-base.cc: New.
28014 * doc/vizualization/graph/svg/sa-A.svg: New.
28015 * doc/vizualization/graph/svg/sa-B.svg: New.
28016 * doc/vizualization/graph/svg/sa-C1.svg: New.
28017 * doc/vizualization/graph/svg/sa-C2.svg: New.
28018 * doc/vizualization/graph/svg/sa-C3.svg: New.
28019 * doc/vizualization/graph/svg/sa-C4.svg: New.
28020 * doc/vizualization/graph/svg/sa-D1.svg: New.
28021 * doc/vizualization/graph/svg/sa-D2.svg: New.
28022 * doc/vizualization/graph/svg/sa-D2v.svg: New.
28023 * doc/vizualization/graph/svg/sa-D3.svg: New.
28024 * doc/vizualization/graph/svg/sa-D3v.svg: New.
28025 * doc/vizualization/graph/svg/sa-D4v.svg: New.
28026 * doc/vizualization/graph/svg/sa-D5v1.svg: New.
28027 * doc/vizualization/graph/svg/sa-D5v2.svg: New.
28028 * doc/vizualization/graph/svg/sa-DD1.svg: New.
28029 * doc/vizualization/graph/svg/sa-DD2.svg: New.
28030 * doc/vizualization/graph/svg/sa-DD3.svg: New.
28031 * doc/vizualization/graph/svg/sa-DD4.svg: New.
28032 * doc/vizualization/graph/svg/sa-DD5.svg: New.
28033 * doc/vizualization/graph/svg/sa-base.svg: New.
28035 2013-07-01 Benjamin Kosnik <bkoz@redhat.com>
28037 Regenerate build/configure.
28041 2013-06-06 Benjamin Kosnik <bkoz@redhat.com>
28043 Regenerate configure files.
28049 * tests/Makefile.in:
28051 2013-05-28 Benjamin Kosnik <bkoz@redhat.com>
28053 Add svg generation.
28054 * src/Makefile.am: Add abg-viz-svg.cc, abg-viz-svg.h.
28055 * tests/Makefile.am: Add test-svg.cc.
28056 * src/abg-viz-svg.cc: New.
28057 * src/abg-viz-svg.h: New.
28058 * tests/test-svg.cc: New.
28060 2013-05-22 Benjamin Kosnik <bkoz@redhat.com>
28063 * ChangeLog: Remove content.
28065 2013-05-21 Benjamin Kosnik <bkoz@redhat.com>
28067 Fixup abg-version.h merge duplicate.
28068 * configure.ac: Remove src/abg-version.h merge duplicate.
28070 2013-05-20 Benjamin Kosnik <bkoz@redhat.com>
28072 Add doc/visualization/layout.
28073 * doc/vizualization/layout: New.
28074 * doc/vizualization/layout/pdf/sa-A.pdf: New.
28075 * doc/vizualization/layout/pdf/sa-B.pdf: New.
28076 * doc/vizualization/layout/pdf/sa-C1.pdf: New.
28077 * doc/vizualization/layout/pdf/sa-C2.pdf: New.
28078 * doc/vizualization/layout/pdf/sa-C3.pdf: New.
28079 * doc/vizualization/layout/pdf/sa-D1.pdf: New.
28080 * doc/vizualization/layout/pdf/sa-D2.pdf: New.
28081 * doc/vizualization/layout/pdf/sa-D2v.pdf: New.
28082 * doc/vizualization/layout/pdf/sa-D3.pdf: New.
28083 * doc/vizualization/layout/pdf/sa-D3v.pdf: New.
28084 * doc/vizualization/layout/pdf/sa-D4v.pdf: New.
28085 * doc/vizualization/layout/pdf/sa-DD1.pdf: New.
28086 * doc/vizualization/layout/pdf/sa-DD2.pdf: New.
28087 * doc/vizualization/layout/pdf/sa-DD3.pdf: New.
28088 * doc/vizualization/layout/pdf/sa-DD4.pdf: New.
28089 * doc/vizualization/layout/pdf/sa-DD5.pdf: New.
28090 * doc/vizualization/layout/pdf/sa-base.pdf: New.
28091 * doc/vizualization/layout/png/sa-A.png: New.
28092 * doc/vizualization/layout/png/sa-B.png: New.
28093 * doc/vizualization/layout/png/sa-C1.png: New.
28094 * doc/vizualization/layout/png/sa-C2.png: New.
28095 * doc/vizualization/layout/png/sa-C3.png: New.
28096 * doc/vizualization/layout/png/sa-D1.png: New.
28097 * doc/vizualization/layout/png/sa-D2.png: New.
28098 * doc/vizualization/layout/png/sa-D2v.png: New.
28099 * doc/vizualization/layout/png/sa-D3.png: New.
28100 * doc/vizualization/layout/png/sa-D3v.png: New.
28101 * doc/vizualization/layout/png/sa-D4v.png: New.
28102 * doc/vizualization/layout/png/sa-DD1.png: New.
28103 * doc/vizualization/layout/png/sa-DD2.png: New.
28104 * doc/vizualization/layout/png/sa-DD3.png: New.
28105 * doc/vizualization/layout/png/sa-DD4.png: New.
28106 * doc/vizualization/layout/png/sa-DD5.png: New.
28107 * doc/vizualization/layout/png/sa-base.png: New.
28108 * doc/vizualization/layout/scripts/
28109 (inkscape_export_svg_to_plain_svg.sh): New.
28110 (inkscape_export_svg_to_png_and_pdf.sh): New.
28111 * doc/vizualization/layout/sources/sa-A.cc: New.
28112 * doc/vizualization/layout/sources/sa-B.cc: New.
28113 * doc/vizualization/layout/sources/sa-C.cc: New.
28114 * doc/vizualization/layout/sources/sa-D.cc: New.
28115 * doc/vizualization/layout/sources/sa-DD.cc: New.
28116 * doc/vizualization/layout/sources/sa-base.cc: New.
28117 * doc/vizualization/layout/svg/sa-A.svg: New.
28118 * doc/vizualization/layout/svg/sa-B.svg: New.
28119 * doc/vizualization/layout/svg/sa-C1.svg: New.
28120 * doc/vizualization/layout/svg/sa-C2.svg: New.
28121 * doc/vizualization/layout/svg/sa-C3.svg: New.
28122 * doc/vizualization/layout/svg/sa-D1.svg: New.
28123 * doc/vizualization/layout/svg/sa-D2.svg: New.
28124 * doc/vizualization/layout/svg/sa-D2v.svg: New.
28125 * doc/vizualization/layout/svg/sa-D3.svg: New.
28126 * doc/vizualization/layout/svg/sa-D3v.svg: New.
28127 * doc/vizualization/layout/svg/sa-D4v.svg: New.
28128 * doc/vizualization/layout/svg/sa-DD1.svg: New.
28129 * doc/vizualization/layout/svg/sa-DD2.svg: New.
28130 * doc/vizualization/layout/svg/sa-DD3.svg: New.
28131 * doc/vizualization/layout/svg/sa-DD4.svg: New.
28132 * doc/vizualization/layout/svg/sa-DD5.svg: New.
28133 * doc/vizualization/layout/svg/sa-base.svg: New.
28135 2013-05-20 Benjamin Kosnik <bkoz@redhat.com>
28137 Generate abg-version.h at configure time.
28138 * configure.ac: Add src/abg-version.h to AC_CONFIG_FILES.
28139 * src/Makefile.am: Remove abg-version.h generation rules.
28140 * src/abg-version.h.in: New.
28142 2013-04-02 Benjamin Kosnik <bkoz@redhat.com>
28144 Add doc dir. Add Doxgen api generation rules.
28146 * doc/Makefile.am (html, install-html): Add.
28147 * doc/Makefile.in: Add.
28148 * doc/api/libabigail.doxy: Add doxygen config.
28149 * src/abg-*: Add @file markup.
28151 2013-03-27 Benjamin Kosnik <bkoz@redhat.com>
28153 Add configure to source control
28155 * src/abg-corpus.cc: include stdexcept
28157 2013-06-25 Dodji Seketeli <dodji@redhat.com>
28159 Support offsets and virtual attribute in base class specifiers
28160 * src/abg-ir.h (class_decl::base_spec::base_spec): Take an offset
28161 and a is_virtual flag.
28162 (class_decl::base_spec::{get_is_virtual, get_offset_in_bits}): New
28164 (class_decl::has_no_base_nor_member): New method declaration..
28165 * src/abg-ir.cc (class_decl::base_spec::base_spec): Take an offset
28166 and a is_virtual flag
28167 (class_decl::has_no_base_nor_member): Define it.
28168 * src/abg-reader.cc (read_offset_in_bits): Renamed
28169 read_var_offset_in_bits into this.
28170 (read_is_virtual): New static function.
28171 (build_class_decl): Read the 'layout-offset-in-bits' and the
28172 'is-virtual' of the base class specifier. Adjust for the
28173 read_var_offset_in_bits -> read_offset_in_bits rename.
28174 * src/abg-writer.cc (write_layout_offset): New overload for the
28175 base class specifiers.
28176 (write_class_decl): If the class has no member or base class, make
28177 it a proper empty xml element. Write the offset and the
28178 is-virtual attribute.
28179 * tests/data/test-read-write/test20.xml: New test input data.
28180 * tests/test-read-write.cc: De-serialize the test above, serialize
28181 it back and compare that both versions are the same.
28183 2013-06-22 Dodji Seketeli <dodji@redhat.com>
28185 Iron out support for simple base classes.
28186 * src/abg-ir.h (class_decl::base_spec::base_spec): Move this
28187 out-of-line. Add a new constructor for clients compiled without
28189 * src/abg-ir.cc (class_decl::base_spec::base_spec): This is now
28190 here out-of-line. Define the new constructor for clients compiled
28192 * tests/data/test-read-write/test19.xml: New test case input for
28194 * tests/test-read-write.cc: De-serialize and serialize the new
28195 test case input above.
28197 2013-06-21 Dodji Seketeli <dodji@redhat.com>
28199 Fix handling of forward decl of classes
28200 * abg-ir.h (class_decl::set_earlier_declaration): Move this
28201 out-of-line and add an overload.
28202 * src/abg-ir.cc (class_decl::set_earlier_declaration): Moved this
28203 out-of-line here and add an overload.
28204 * src/abg-reader.cc (build_class_decl): Really read the
28205 'decl-of-decl-id' property. Do not make the definition use the id
28206 of the declaration. Both have their id.
28207 * src/abg-writer.cc (write_class_decl): Put a space before the
28208 property "def-of-decl-id".
28209 * tests/data/test-read-write/test18.xml: New test input.
28210 * tests/test-read-write.cc: De-serialize this new input, serialize
28211 it back and make sure both versions are identical.
28213 2013-06-21 Dodji Seketeli <dodji@redhat.com>
28215 Serialize the layout offset of class data members.
28216 * src/abg-writer.cc (write_layout_offset): New function.
28217 (write_class_decl): Serialize the layout offset.
28219 2013-06-21 Dodji Seketeli <dodji@redhat.com>
28221 Support Bitwise OR for qualified_type_def::CV better
28222 * src/abg-ir.h (qualified_type_def::CV_RESTRICT): New enumerator
28223 for the qualified_type_def::CV enum.
28224 (operator|(qualified_type_def::CV, qualified_type_def::CV)): New
28226 * src/abg-ir.cc (operator|(qualified_type_def::CV,
28227 qualified_type_def::CV)): New definition.
28228 * src/abg-reader.cc (build_qualified_type_decl): No need for
28229 casting the result of bitwise or between instances of
28230 qualified_type_def::CV.
28232 2013-06-14 Dodji Seketeli <dodji@seketeli.org>
28234 Support method type/decl, variadic functions, class declarations-only
28235 * src/abg-ir.h (function_decl::parameter::parameter): New
28236 constructor with variadic parameter marker.
28237 (function_decl::m_type): Make this protected to let method_decl
28238 inheriting class to access it.
28239 (function_decl::get_type): Move this out-of-line.
28240 (class method_type, method_type_hash): New types.
28241 (enum class_decl::access_specifier): Add no_access new enumerator.
28242 (class_decl::data_member::data_member): Move this out-of-line.
28243 (class_decl::data_member::~data_member): Declare virtual
28245 (class method_decl): New class.
28246 (class member_function): Make this inherit method_decl, instead of
28248 (class_decl::class_decl): New constructors.
28249 (class_decl::{hashing_started, is_declaration_only,
28250 set_earlier_declaration, get_earlier_declaration}): New methods.
28251 * src/abg-ir.cc (add_decl_to_scope): If a decl is already in a
28252 scope, don't add it to this scope.
28253 (get_global_scope): Make this work when passed an instance of
28255 (dynamic_type_hash::operator()): Add support for method_type.
28256 (method_type::{method_type, set_class_type, ~method_type, })
28257 (method_type_hash::operator()): New defintions.
28258 (function_decl::get_type, class_decl::class_decl): Move these
28260 (class_decl::method_decl::{method_decl, ~method_decl, get_type}):
28262 (class_decl::member_function::member_function): Move this
28263 out-of-line here. Support method_decl.
28264 (class_decl::data_member::data_member): Likewise.
28265 (class_decl_hash::operator()): Guard this against endless loop.
28266 * src/abg-reader.cc (write_class_is_declaration_only): New static
28268 (write_var_decl): Take a flag to write the mangled name or not.
28269 (write_function_decl): Take a flag to skip the first parameter.
28270 (write_cdtor_const_static): Use 'yes' instead of 'true' as value
28272 (write_decl, write_function_template_decl): Adjust wrt the new
28273 signatures of write_var_decl and write_function_decl.
28274 (write_enum_type_decl): Simplify call to write_location.
28275 (write_class_decl): Support serializing declaration-only classes.
28276 * src/abg-writer.cc:
28277 * tests/data/test-read-write/test17.xml: New test input.
28278 * tests/test-read-write.cc: De-serialize the above, and serialize it back.
28279 * tests/data/test-read-write/test10.xml: Update this test.
28281 2013-06-01 Dodji Seketeli <dodji@redhat.com>
28283 Support function_type and adapt a function_decl to use it
28284 * src/abg-ir.h (class function_type): Forward decl prior to class
28286 (function_decl::parameter): Pass string by const reference. Add a
28287 variadic marker member and initialize it.
28288 (function_decl::parameter::get_type): Add a non-const overload.
28289 (function_decl::parameter::get_variadic_marker): New getter.
28290 (function_decl::function_decl) Take a const reference to a vector
28291 for parameters, type size/alignment. Add two overloads that takes a
28292 pointer to function_type.
28293 (function_decl::get_parameters): Move this out-of-line.
28294 (function_decl::append_parameter(s)): Renamed
28295 function_decl::add_parameter(s) into these. Move it out-of-line.
28297 (function_decl::{get_type, set_type}): New declaration.
28298 (function_decl::get_return_type): Move this out-of-line.
28299 (function_decl::is_variadic): New in-line function.
28300 (function_decl::m_type): New data member.
28301 (function_decl::{m_parms, m_return_type}): Remove. This are now
28302 carried by function_decl::m_type.
28303 (class function_type, struct function_type_hash): New
28305 (member_function::member_function): Take a vector of pointers to
28306 parameters. Take size/align of the type of the member function.
28307 Adjust initialization.
28308 * src/abg-ir.cc (dynamic_type_hash): Hash instance of
28309 function_type accessed through a pointer.
28310 (function_type::{operator==, ~function_type})
28311 (function_type_hash::operaror(), function_decl::{get_return_type,
28312 }, function_decl::parameter::hash::operator()): New definitions.
28313 (function_decl::function_decl): The out-of-line definitions of the
28314 declarations above.
28315 (function_decl::append_parameter): Moved this out-of-line from
28316 inline function_decl::add_parameter. Make this rely on the
28318 (function_decl::operator==): Adjust for use of vector for the
28319 parameters. Also, there is no need anymore to compare the
28320 parameters or the return types as they are compared by the
28321 comparison of the function types.
28322 * src/abg-reader.cc (build_function_decl): Read the new size/alignment
28323 attributes on the function-decl element. Build a function_type
28324 and use it to build the function_decl. Parameters and return type
28325 are now hung off of the function_type.
28326 (handle_function_decl): use build_function_decl.
28327 * src/abg-writer.cc (write_function_decl): Write the new
28328 size/alignment properties of the function-decl element. Adjust
28329 for the use of vectors for function parameters now.
28330 * tests/data/test-read-write/test10.xml: Adjust for the presence
28331 of size/alignment properties in the function-decl element now.
28332 * tests/data/test-read-write/test11.xml: Likewise.
28333 * tests/data/test-read-write/test12.xml: Likewise.
28334 * tests/data/test-read-write/test13.xml: Likewise.
28335 * tests/data/test-read-write/test14.xml: Likewise.
28336 * tests/data/test-read-write/test9.xml: Likewise.
28338 2013-06-01 Dodji Seketeli <dodji@redhat.com>
28340 Support null type hashing
28341 * src/abg-ir.cc (dynamic_type_hash::operator()(const type_base* t)
28342 const): Support hashing null type.
28344 2013-05-23 Dodji Seketeli <dodji@redhat.com>
28346 Add a couple of output file suffix configuration properties
28347 * src/abg-config.h (config::{get_tu_instr_suffix,
28348 set_tu_instr_suffix, get_tu_instr_archive_suffix,
28349 set_tu_instr_archive_suffix}): New decls.
28350 * src/abg-config.cc (config::{get_tu_instr_suffix,
28351 set_tu_instr_suffix, get_tu_instr_archive_suffix,
28352 set_tu_instr_archive_suffix}): New defs.
28354 2013-05-23 Dodji Seketeli <dodji@redhat.com>
28356 Add a new add_decl_to_scope overload
28357 * src/abg-ir.h (add_decl_to_scope): New declaration.
28358 * src/abg-ir.cc (add_decl_to_scope): New definition.
28360 2013-05-23 Dodji Seketeli <dodji@redhat.com>
28362 Ensure add_decl_to_scope properly updates the scope
28363 * src/abg-ir.h (scope_decl::m_member_scopes)
28364 (scope_decl::get_member_scopes): New declarations.
28365 (scope_decl::add_member_decl): Move this to ...
28366 * src/abg-ir.cc (scope_decl::add_member_decl): ... here. Make it
28367 update the new scope_decl::m_member_scopes too.
28369 2013-05-23 Dodji Seketeli <dodji@redhat.com>
28371 Add translation_unit::get_path
28372 * src/abg-ir.cc (translation_unit::get_path): New declaration.
28373 * src/abg-ir.cc (translation_unit::get_path): New definition.
28375 2013-05-23 Dodji Seketeli <dodji@redhat.com>
28377 Link the global scope to its translation unit
28378 * src/abg-ir.h (global_scope::global_scope): Take a translation
28379 unit and initialize the tu member with it.
28380 * src/abg-ir.cc (translation_unit::get_global_scope): Initialize
28381 the global scope with its actual translation unit.
28383 2013-05-23 Dodji Seketeli <dodji@redhat.com>
28385 Have location numbers that are stable throughout translation unit editing
28386 * src/abg-irc.cc (location_manager::create_new_location): Just
28387 append the new expanded location to the end of the location
28388 vectors, and return the new size of the vector as the location
28389 number. That way we don't change the location number of an
28390 expanded location that is already in the vector -- that change
28391 happens if we keep the vector sorted during the insertion.
28392 (location_manager::expand_location): The index of the expanded
28393 location is the location number - 1.
28395 2013-05-23 Dodji Seketeli <dodji@redhat.com>
28397 Fix in-source detection of the library for GCC
28398 * abigail.m4 (ABIGAIL_INIT): Don't forget to set abigaillibs when
28399 we detect the library in the source tree, particularly for GCC.
28401 2013-05-21 Dodji Seketeli <dodji@redhat.com>
28403 Re-generate aclocal.m4
28404 * aclocal.m4: Re-generate with autoconf 2.64.
28406 2013-05-21 Benjamin Kosnik <bkoz@redhat.com>
28408 Generate abg-version at configure time in builddir
28409 * configure.ac: Add src/abg-version.h to AC_CONFIG_FILES.
28410 * src/Makefile.am: Remote ad-hoc generation of abg-version.h from
28412 * src/abg-version.h.in: New file.
28413 * configure: Re-generate.
28414 * src/Makefile.in: Likewise.
28416 2013-05-21 Dodji Seketeli <dodji@redhat.com>
28418 add abigail.m4 to the distribution
28419 * Makefile.am: Add abigail.m4 to the distribution.
28420 * Makefile.in: Re-generate.
28422 2013-05-10 Dodji Seketeli <dodji@redhat.com>
28425 * src/abg-ir.h (enum decl_base::binding): Remove trailing space.
28426 (enum class_decl::access_specifier): Likewise.
28428 2013-05-07 Dodji Seketeli <dodji@redhat.com>
28430 Fix for building libabigail inside the GCC tree
28431 * abigail.m4: Detect when we are in the GCC tree; disable version
28432 check in that case.
28434 2013-05-07 Dodji Seketeli <dodji@redhat.com>
28436 Re-generate configury with autoconf 2.64
28437 * abigail.m4: Add licence header.
28438 * configure.ac: Re-generate configure script with autoconf 2.64
28441 2013-05-07 Dodji Seketeli <dodji@redhat.com>
28443 Allow autoconf-based clients to detect the library
28444 * configure.ac: Define the components of the version number as
28445 autoconf variables. Set the version number to 0.1.0
28446 * abigail.m4: New file
28447 * Makefile.am: Add abigail.m4 to the build system. Install it in
28448 $(datadir)/aclocal.
28449 * src/Makefile.am: Generate and add abg-version.h from the version
28450 number autoconf variable defined in configure.ac. Re-generate
28451 abg-version.h each time configure.ac changes.
28452 * src/abg-config.h (abigail_get_library_version): Declare ...
28453 * src/abg-config.cc (abigail_get_library_version): ... and define
28454 this wirth C linkage. This is useful for autoconf tests to test
28455 for the presence of the library.
28456 * configure: Re-generate.
28457 * Makefile.in: Likewise.
28458 * src/Makefile.in: Likewise.
28459 * tests/Makefile.in: Likewise.
28461 2013-05-03 Dodji Seketeli <dodji@redhat.com>
28463 Build system fix for make distcheck
28464 * Makefile.am: Support the doc sub-directory. We don't have a
28466 * src/Makefile.am: Don't prefix the file paths by the absolute
28467 path of the src dir; current autotools know how to deal with it,
28468 otherwise and it break them.
28469 * tests/Makefile.am: Likewise. Make sure to remove the output of
28470 the tests upon make clean.
28471 * Makefile.in: Re-generate.
28472 * aclocal.m4: Likewise.
28473 * configure: Likewise.
28474 * src/Makefile.in: Likewise.
28475 * tests/Makefile.in: Likewise.
28477 2013-05-02 Dodji Seketeli <dodji@redhat.com>
28479 Initial support for member class templates
28480 * src/abg-ir.cc (class_decl::add_member_function_template): Fix
28482 (class_decl::add_member_class_template)
28483 (class_decl::member_class_template::operator==)
28484 (class_decl::member_class_template_hash::operator()): New
28486 (class_decl::operator==): Compare member templates. Fix logic.
28487 (class_decl::data_member_hash::operator())
28488 (class_decl::member_function_hash::operator())
28489 (class_decl::member_function_template_hash::operator()): Don't
28490 hash the is_static boolean as it's hashed as part of the 'member'
28491 sub-object hashing.
28492 (class_decl::member_function_template::operator==): Move this out
28493 of line here, from the header file.
28494 (class_decl_hash::operator()): Hash member class templates.
28495 * src/abg-ir.h (class_decl::member::{m_is_static,is_static}): Add the is_static
28496 boolean here, so that it's factorized out of the inherited classes
28498 (class_decl::data_member::{is_static, m_is_static})
28499 (class_decl::member_function::{is_static, m_is_static})
28500 (class_decl::member_function_template::{is_static, m_is_static}): Remove this
28501 as it's now part of the base 'member' class.
28502 (class_decl::data_member::operator==)
28503 (class_decl::member_function::operator==): Don't compare the
28504 is_static boolean as it's now compared as part of the 'member'
28505 sub-object comparison.
28506 (class_decl::member_function_template::operator==): Move this
28507 out-of-line into src/abg-ir.cc.
28508 (class class_decl::member_class_template, struct
28509 class_decl::member_class_template_hash)
28510 (class_decl::{add_member_class_template,
28511 get_member_class_templates}): New declarations.
28512 (class_decl::member_class_templates_type): New typedef.
28513 * src/abg-reader.cc (build_class_decl): Support de-serializing
28514 member class templates.
28515 * src/abg-writer.cc (write_class_decl): Likewise, support
28516 serializing member class templates.
28517 * tests/data/test-read-write/test16.xml: New test input.
28518 * tests/test-read-write.cc (int_out_specs[]): Add the new test
28519 input to the list of inputs that are de-serialized and serialized
28521 * tests/Makefile.am: Add the new test input to the distribution.
28523 2013-05-02 Dodji Seketeli <dodji@redhat.com>
28525 Initial support of class templates
28526 * src/abg-ir.cc (class_template_decl::class_template_decl)
28527 (class_template_decl::set_pattern)
28528 (class_template_decl::operator==)
28529 (class_template_decl::~class_template_decl)
28530 (class_template_decl_hash::operator())
28531 (class_tmpl_shared_ptr_hash::operator()): New definitions.
28532 * src/abg-ir.h (class class_template_decl, struct
28533 class_tmpl_shared_ptr_hash, struct class_tmpl_shared_ptr_hash):
28535 * src/abg-reader.cc (read_context::const_class_tmpl_map_it): New
28537 (read_context::get_fn_tmpl_decl): Fix comment.
28538 (read_context::{get_class_tmpl_decl,key_class_tmpl_decl})
28539 (build_class_template_decl, handle_class_template_decl): New
28541 (read_context::m_class_tmpl_map): New member.
28542 (handle_element): Support "class-template-decl" xml elements
28544 (build_class_decl): Add missing bits to comment.
28545 (build_function_template_decl): Fix spacing.
28546 * src/abg-writer.cc (class_tmpl_shared_ptr_map): New typedef.
28547 (write_context::m_class_tmpl_map): New member.
28548 (write_context::get_id_for_class_tmpl, write_class_template_decl):
28550 (write_template_parameters): Factorize this this out from ...
28551 (write_function_template_decl): ... here.
28552 (write_decl): Support writing instances of class_template_decl.
28554 * tests/data/test-read-write/test15.xml: New test input.
28555 * tests/Makefile.am: Add the new test15.xml input to the
28557 * tests/test-read-write.cc (in_out_specs): Add the new test15.xml
28558 test to the list of serialized output to be de-serialized and
28561 2013-05-02 Dodji Seketeli <dodji@redhat.com>
28563 Fix function_tempalte_decl init & hashing
28564 * src/abg-ir.cc (function_template_decl::operator==): Compare the
28565 patterns, not a pointer to them.
28566 (function_template_decl_hash::operator()): Don't try to hash null
28568 * src/abg-ir.h (function_template_decl::function_template_decl):
28569 Use function_template_decl::set_pattern to set the pattern here.
28571 2013-04-30 Dodji Seketeli <dodji@redhat.com>
28573 Support member function templates
28574 * src:abg-ir.h: Move template declarations before class
28575 class_decl, so that class_decl can have member templates.
28576 (class class_decl::member_function_template)
28577 (class_decl::add_member_function_template)
28578 (class_decl::{base_specs_type, member_types_type,
28579 data_members_types, member_functions_type,
28580 member_function_templates_type}): New declarations.
28581 * src/abg-ir.cc (class_decl::add_member_function_template)
28582 (class_decl::member_function_template_hash::operator()): New
28584 (class_decl_hash::operator()): Support hashing for member
28585 function templates.
28586 * src/abg-reader.cc (build_class_decl): Use the new
28587 class_decl::{member_types_type, data_members_type,
28588 member_functions_type, base_specs_type} types. Support member
28589 function templates.
28590 * src/abg-writer.cc (write_cdtor_const_static): New definition.
28591 (write_class_decl): Support member function templates.
28592 * tests/data/test-read-write/test14.xml: New input data.
28593 * tests/Makefile.am: Add it to the distribution.
28594 * tests/test-read-write.cc (InOutSpec int_out_specs): De-serialize
28595 the new test input file, serialize it back and diff both results.
28597 2013-04-25 Dodji Seketeli <dodji@redhat.com>
28600 * src/abg-ir.h (class template_non_type_parameter): Make this
28601 inherit decl_base virtually.
28603 2013-04-25 Dodji Seketeli <dodji@redhat.com>
28606 * src/abg-ir.h (class template_decl): Fix comment.
28608 2013-04-25 Dodji Seketeli <dodji@redhat.com>
28610 Add some decl predicates
28611 * src/abg-ir.h (is_at_global_scope): Rename
28612 is_decl_at_global_scope into this.
28613 (is_at_class_scope, is_at_template_scope)
28614 (is_template_parameter, is_type)
28615 (is_template_parm_composition_type)
28616 (is_function_template_pattern, is_template_decl): New
28618 * src/abg-ir.cc (is_at_global_scope): Rename
28619 is_decl_at_global_scope into this.
28620 (is_at_class_scope, is_at_template_scope, is_template_parameter)
28621 (is_type, is_template_parm_composition_type)
28622 (is_function_template_pattern, is_template_decl): New definitions.
28623 * src/abg-reader.cc (update_depth_info_of_read_context): Use the
28624 new is_at_class_scope decl.
28626 2013-04-25 Dodji Seketeli <dodji@redhat.com>
28628 Support composing template type parameters
28629 * src/abg-ir.h (class tmpl_parm_type_composition): New
28632 (tmpl_parm_type_composition::tmpl_parm_type_composition)
28633 (tmpl_parm_type_composition::~tmpl_parm_type_composition): New
28635 * src/abg-reader.cc (build_tmpl_parm_type_composition): New
28637 (build_template_parameter): Support template parameter type
28639 * src/abg-writer.cc (write_tmpl_parm_type_composition): New
28641 (write_template_non_type_parameter): Fix type-id attribute.
28642 (write_template_parameter): Support template parameter type
28644 * tests/data/test-read-write/test13.xml: New test input.
28645 * tests/Makefile.am: Add it to the distribution.
28646 * tests/test-read-write.cc (InOutSpec in_out_spec): Add test13.xml
28647 to the list of xml file that are de-serialized and serialized back.
28649 2013-04-24 Dodji Seketeli <dodji@redhat.com>
28651 Fix depth management during the parsing
28652 * src/abg-ir.cc (decl_base_hash::operator()): Don't hash the
28653 context for decls in general.
28654 * src/abg-reader.cc (read_context::push_decl_to_current_scope)
28655 (read_context::push_and_key_type_decl): Add an overload that takes
28656 a node and update_depth_info boolean.
28657 (build_var_decl, build_type_decl, build_qualified_type_decl)
28658 (build_pointer_type_def, build_reference_type_def)
28659 (build_enum_type_decl, build_type_decl)
28660 (build_template_type_parameter, build_template_non_type_parameter)
28661 (build_template_template_parameter, build_template_parameter)
28662 (build_type): Make these functions take an update_depth_info
28663 parameter. Pass it do read_context::push_and_key_type_decl or
28664 read_context::push_decl_to_current_scope rather than call
28665 update_read_context.
28666 (build_function_decl, build_class_decl)
28667 (build_function_template_decl): Change the seen_by_reader
28668 parameter into update_depth_info. Pass the update_depth_info bool
28669 to read_context::push_decl_to_current_scope rather than call
28670 update_depth_info here.
28671 (handle_class, handle_function_template_decl): Adjust.
28672 * tests/data/test-read-write/test12.xml: Add new test input.
28673 * tests/test-read-write.cc (InOutSpec in_out_specs): Add it to the
28674 list of input to de-serialize, serialize back and compare the two.
28675 * tests/Makefile.am: Add the new test input to the distribution.
28677 2013-04-23 Dodji Seketeli <dodji@redhat.com>
28679 Initial support for function templates
28680 * src/abg-ir.h (function_decl::set_return_type): New inline
28682 (class template_decl, struct template_decl_hash, class
28683 template_parameter, struct template_parameter_hash, struct
28684 dynamic_template_parameter_hash, struct
28685 template_parameter_shared_ptr_hash, class template_type_parameter)
28686 (struct template_type_parameter_hash, class
28687 template_non_type_parameter, struct
28688 template_non_type_parameter_hash, class
28689 template_template_parameter, struct
28690 template_template_parameter_hash, class function_template_decl)
28691 (struct function_template_decl_hash, struct
28692 fn_tmpl_shared_ptr_hash): New declarations.
28693 * src/abg-ir.cc (dynamic_type_hash::operator()): Add hashing for
28694 template template, and template type parameters.
28695 (template_decl_hash::operator, template_decl::~template_decl)
28696 (template_decl::operator==, template_parameter::operator==)
28697 (template_parameter_hash::operator())
28698 (dynamic_template_parameter_hash::operator())
28699 (template_type_parameter::operator==)
28700 (template_type_parameter::~template_type_parameter)
28701 (template_type_parameter_hash::operator())
28702 (template_non_type_parameter::operator==)
28703 (template_non_type_parameter::~template_non_type_parameter)
28704 (template_non_type_parameter_hash::operator())
28705 (template_template_parameter::operator==)
28706 (template_template_parameter::~template_template_parameter)
28707 (template_template_parameter_hash::operator())
28708 (function_template_decl::operator==)
28709 (function_template_decl_hash::operator())
28710 (fn_tmpl_shared_ptr_hash::operator())
28711 (function_template_decl::~function_template_decl()): New
28713 * src/abg-reader.cc (read_context::get_fn_tmpl_decl)
28714 (read_context::key_fn_tmpl_decl): New functions.
28715 (read_context::m_fn_tmpl_map): New data member.
28716 (read_context::key_type_decl): Renamed read_context::add_type_decl
28718 (read_context::push_decl_to_current_scope): Renamed
28719 read_context::finish_decl_creation into this. Add an assert.
28720 (read_context::push_and_key_type_decl): Renamed
28721 read_context::finish_type_decl_creation into this. Adjust to the
28722 use of push_decl_to_current_scope and key_type_decl.
28723 (build_function_template_decl, build_template_type_parameter)
28724 (build_template_non_type_parameter)
28725 (build_template_template_parameter, build_template_parameter)
28726 (handle_function_template_decl): New functions.
28727 (handle_element): Call handle_function_template_decl.
28728 (build_function_decl): Take a bool parameter to update depth
28729 information in parsing context. Move instantiation of
28730 function_decl before parsing its xml sub-nodes. Update the depth
28731 info in the parsing context if necessary. Push the newly
28732 intantiated decl to scope. And then parse the sub nodes. Do not
28733 forget to add the fn parameters and return type using
28734 function_decl::add_parameter and function_decl::set_return_type.
28735 (build_var_decl, build_type_decl, build_qualified_type_decl)
28736 (build_pointer_type_def, build_reference_type_def)
28737 (build_enum_type_decl, build_typedef_decl, handled_type_decl)
28738 (handle_qualified_type_decl, handle_pointer_type_def)
28739 (handle_reference_type_def, handle_enum_type_decl)
28740 (handle_typedef_decl, handle_var_decl, handle_function_decl)
28741 (handle_class_decl): Adjust.
28742 (build_class_decl): Take a bool parameter to update depth
28743 information in parsing context. Add comment. Wait for the class
28744 members to be built, before keying (and thus hashing it) the
28746 (build_type): Fix logic, and adjust.
28747 * src/abg-writer.cc (write_context::type_has_existing_id)
28748 (write_context::get_id_for_fn_tmpl, write_template_type_parameter)
28749 (write_template_non_type_parameter)
28750 (write_template_template_parameter, write_template_parameter)
28751 (write_function_template_decl): New functions.
28752 (write_context::get_id_for_type): Simplify logic.
28753 (write_decl): Support writing function template.
28754 * tests/data/test-read-write/test11.xml: New test input.
28755 * tests/test-read-write.cc (InoutSpec in_out_specs[]):
28756 De-serialize the new test11.xml test, serialize it back and diff
28758 * tests/Makefile.am: Add test11.xml to the distribution.
28760 2013-04-23 Dodji Seketeli <dodji@redhat.com>
28762 Mangled name of a scope_decl is its name
28763 * src/abg-ir.h (scope_decl::scope_decl): The mangled name is the name.
28765 2013-04-23 Dodji Seketeli <dodji@redhat.com>
28767 Update scope when adding class members
28768 * src/abg-ir.h (class_decl::add_member_type)
28769 (class_decl::add_data_member, class_decl::add_member_function):
28770 Move the inline implementation of these functions ...
28771 * src:abg-ir.cc (class_decl::add_member_type)
28772 (class_decl::add_data_member, class_decl::add_member_function):
28773 ... here. Augment their implementation to properly update the
28774 scope of the member.
28776 2013-04-23 Dodji Seketeli <dodji@redhat.com>
28778 Rename class_decl::member_type::get_type into as_type
28779 * src/abg-ir.h (class_decl::member_type::get_type): Rename this
28780 into class_decl::member_type::as_type.
28781 * src/abg-writer.cc (write_class_decl): Adjust.
28783 2013-04-23 Dodji Seketeli <dodji@redhat.com>
28785 Avoid having multiple sub-objects of base classes
28786 * src/abg-ir.cc (decl_base::decl_base): Remove useless definition.
28787 (type_base::type_base): Remove default arguments from parameters.
28788 (scope_type_decl::scope_type_decl)
28789 (namespace_decl::namespace_decl): Call the constructors for the
28790 virtual bases explicitly.
28791 * src/abg-ir.h (class scope_decl): Perform virtual inheritance of
28793 (global_scope::global_scope): Call virtual base decl_base's
28794 constructor directly.
28795 (class type_decl): Inherit from decl_base and type_base
28797 (class scope_type_decl): Inherit from type_base virtually.
28798 (class qualified_type_def, pointer_type_def, reference_type_def)
28799 (class enum_type_decl, typedef_decl): Inherit from type_base and
28800 decl_base virtually.
28801 (class var_decl, function_decl): Inherit from decl_base virtually.
28802 (class class_decl::member): Don't inherit from anything and adjust
28803 constructor's mem-initializer accordingly.
28804 (class class_decl::member_type): Inherit from decl_base virtually
28805 and adjust constructor's mem-initializer accordingly.
28806 (class_decl::{data_member::data_member,member_function::member_function)
28807 (class_decl::class_decl): Call virtual base's constructor
28810 2013-04-22 Dodji Seketeli <dodji@redhat.com>
28812 Move inline hashing functions out of line
28813 * src/abg-ir.h (decl_base_hash::operator())
28814 (type_base_hash::operator(), type_decl_hash::operator())
28815 (scope_type_decl_hash::operator())
28816 (qualified_type_def_hash::operator())
28817 (pointer_type_def_hash::operator())
28818 (reference_type_def_hash::operator())
28819 (enum_type_decl_hash::operator(), typedef_decl_hash::operator())
28820 (var_decl_hash::operator(), function_decl_hash::operator())
28821 (class_decl::member_type_hash::operator())
28822 (class_decl::base_spec_hash::operator())
28823 (class_decl::data_member_hash::operator())
28824 (class_decl::member_function_hash::operator()): Move these inline
28826 * src/abg-ir.cc: ... here.
28828 2013-04-22 Dodji Seketeli <dodji@redhat.com>
28830 Various style nit fixes
28831 * src/abg-ir.cc: Move the emacs mode specifier for the file to the
28832 top of the file, otherwise, it's not effective.
28833 (struct location_manager::priv): Add end of struct comment.
28834 (class_decl_hash::operator()): Add fn comment.
28835 * src/abg-ir.h: Move the emacs mode specifier for the file to the
28836 top of the file, otherwise, it's not effective.
28837 (class scope_decl): Add end of class comment.
28838 * src/abg-reader.cc: Move the emacs mode specifier for the file to the
28839 top of the file, otherwise, it's not effective.
28840 (read_context::{get_type_decl,add_type_decl): Add comment.
28841 (handle_namespace_decl): Fix indent.
28842 * src/abg-writer.cc: Move the emacs mode specifier for the file to
28843 the top of the file, otherwise, it's not effective.
28845 2013-04-12 Dodji Seketeli <dodji@redhat.com>
28847 Remove .gitignore from VCS
28848 * .gitignore: Remove from revision control as different
28849 programmers might want to ignore different things.
28851 2013-04-08 Benjamin Kosnik <bkoz@redhat.com>
28854 * src/abg-*: Add license.
28855 * tests/test-*: Same.
28857 2013-04-11 Dodji Seketeli <dodji@redhat.com>
28859 Initial Support for class declarations
28860 * src/abg-ir.h (scope_decl::scope_decl)
28861 (scope_type_decl::scope_type_decl): Don't set mangled name for
28862 scope_decl instances as it doesn't make sense.
28863 (var_decl::var_decl): Pass the type shared pointer by value.
28864 (struct var_decl_hash, function_decl::parameter::operator==)
28865 (struct function_decl::parameter_hash, function_decl::operator==)
28866 (struct function_decl_hash, class class_decl, struct
28867 class_decl_hash): New declarations.
28868 * src/abg-ir.cc (scope_type_decl::scope_type_decl): Don't set the
28869 mangled name. It doesn't make sense for scope_decls.
28870 (dynamic_type_hash::operator): Fix comment. Run the hashing for
28871 scope_type_decl instances *after* running it for class_decl
28872 instance, otherwise, the class_decl instances case will never get
28874 (var_decl::var_decl): Pass the type shared pointer by value.
28875 (function_decl::operator==, class_decl::operator==)
28876 (class_decl_hash::operator()): New fns.
28877 * src/abg-libxml-utils.h (get_xml_node_depth): Declare new fn.
28878 (XML_READER_GET_ATTRIBUTE): Fix comment.
28879 (XML_NODE_GET_ATTRIBUTE): New getter macro.
28880 * src/abg-libxml-utils.cc (get_xml_node_depth): New definition.
28881 * src/abg-reader.cc (update_read_context)
28882 (update_depth_info_of_read_context, read_visibility, read_binding)
28883 (read_access, read_size_and_alignment, read_static)
28884 (read_var_offset_in_bits, read_cdtor_const, build_function_decl)
28885 ( build_var_decl, build_type_decl, build_qualified_type_decl)
28886 (build_pointer_type_def, build_reference_type_def)
28887 (build_enum_type_decl, build_typedef_decl, build_class_decl)
28888 (build_type, handle_class_decl): New functions or overloads.
28889 (handle_element): Update to handle "class-decl" xml elements.
28890 * src/abg-writer.cc (write_size_and_alignment, write_access)
28891 (write_class, do_indent_to_level, get_indent_to_level): New fns.
28892 (write_decl): Update to serialize instances of class_decl.
28893 (write_type_decl, write_pointer_type_def)
28894 (write_reference_type_def): Use the new write_size_and_alignment instead of
28895 writing the attributes directly.
28896 * tests/data/test-read-write/test10.xml: New test file.
28897 * tests/Makefile.am: Add tests/data/test-read-write/test10.xml to
28899 * tests/test-read-write.cc (in_out_spec): De-serialize
28900 data/test-read-write/test10.xml, serialize it back into
28901 output/test-read-write/test10.xml, and compare the two output that
28902 should be identical.
28904 2013-04-11 Dodji Seketeli <dodji@redhat.com>
28906 Update enum decl representation as per the schema
28907 * src/abg-reader.cc (handle_enum_type_decl): The name of the
28908 element holding the underlying type is now "underlying-type", no
28910 * src/abg-writer.cc (write_enum_type_decl): Likewise.
28911 * tests/data/test-read-write/test6.xml: Likewise.
28913 2013-04-10 Dodji Seketeli <dodji@redhat.com>
28915 Add tests/data/test-read-write/test9.xml
28916 * tests/data/test-read-write/test9.xml: (Forgot to) Add this new
28919 2013-04-04 Dodji Seketeli <dodji@redhat.com>
28921 Support function declarations
28922 * src/abg-ir.h (class function_decl): New declaration & inline
28924 * src/abg-ir.cc (function_decl::~function_decl): New definition.
28925 * src/abg-reader.cc (read_location): New overload to read location
28926 from an xmlNodePtr.
28927 (build_function_parameter, handle_function_decl):
28929 (handle_element): Support "function-decl" elements.
28930 * src/abg-writer.cc (write_location): New overload to write a
28931 location directly, not from a decl.
28932 (write_function_decl): New definition.
28933 (write_binding): Support writing the binding attribute from a
28934 function_decl instance.
28935 (write_decl): support serializing function
28936 * tests/data/test-read-write/test9.xml: New test input file.
28937 * tests/Makefile.am: Add data/test-read-write/test9.xml to the
28939 * tests/test-read-write.cc: De-serialize
28940 data/test-read-write/test9.xml, serialize it back and diff the
28941 output from the input.
28943 2013-04-03 Dodji Seketeli <dodji@redhat.com>
28945 Update in-vcs configure and docs/Makefile.in to recent configure
28946 * configure: Updated as re-generated by autoconf 2.69.
28947 * doc/Makefile.in: Updated as re-generated by automake 1.12.2.
28949 2013-04-02 Benjamin Kosnik <bkoz@redhat.com>
28951 Add doc dir. Add Doxgen api generation rules.
28953 * doc/Makefile.am (html, install-html): Add.
28954 * doc/Makefile.in: Add.
28955 * doc/api/libabigail.doxy: Add doxygen config.
28956 * src/abg-*: Add @file markup.
28958 2013-04-03 Dodji Seketeli <dodji@redhat.com>
28960 Introduce/use translation_unit & global_scope types
28961 * abg-corpus.h (abi_corpus::{get_decls, get_loc_mgr}): Remove.
28962 (abi_corpus::add): New function to add a translation unit.
28963 (abi_corpus::get_translation_units): New declaration.
28964 * abg-corpus.cc (abi_corpus::*): Remove all the definitions of
28965 abi_corpus for now, as the abi_corpus type is not used anymore --
28967 * src/abg-ir.h (add_decl_to_scope, get_global_scope)
28968 (get_translation_unit, is_global_scope, is_decl_at_global_scope)
28969 (class translation_unit, class global_scope): New declarations
28970 * src/abg-ir.cc (translation_unit::translation_unit)
28971 (translation_unit::get_global_scope)
28972 (translation_unit::get_loc_mgr, translation_unit::get_loc_mgr)
28973 (translation_unit::is_empty, get_global_scope)
28974 (get_translation_unit, is_global_scope, is_global_scope)
28975 (is_decl_at_global_scope, global_scope::~global_scope): New
28977 (scope_decl::scope_decl, scope_decl::scope_decl)
28978 (scope_decl::add_member_decl, scope_decl::get_member_decls): Move
28979 to abg-ir.h, inline.
28980 * src/abg-reader.h (read_file): Don't use abi_corpus in the api.
28981 Rather, use translation_unit.
28982 * src/abg-reader.cc (read_context::get_cur_scope): Now that we
28983 have a specific instance of global_scope to represent global
28984 scope, don't play games with empty scopes to detect a global
28986 (read_context::get_translation_unit): New definition.
28987 (read_context::finish_decl_creation, finish_type_decl_creation):
28988 (read_input, read_file, read_location, handle_element)
28990 (handle_namespace_decl, handle_qualified_type_decl)
28991 (handle_pointer_type_def, handle_reference_type_def)
28992 (handle_enum_type_decl, handle_typedef_decl, handle_var_decl):
28993 Don't use abi_corpus anymore. Rather, the translation unit a decl
28994 belongs to is accessible from the decl itself.
28995 * src/abg-writer.h (write_to_ostream): Use translation_unit in
28996 this API, rather than abi_corpus.
28997 * src/abg-writer.cc (write_translation_unit): Rename write_corpus
28998 into this. And stop using abi_corpus here.
28999 (write_to_ostream, write_corpus, write_location, write_decl)
29000 (write_type_decl, write_namespace_decl, write_qualified_type_def)
29001 (write_pointer_type_def, write_reference_type_def)
29002 (write_enum_type_decl, write_typedef_decl, write_var_decl): Stop
29003 using abi_corpus. Use the translation_unit that is accessible
29004 from the decl being serialized, if need be.
29005 * test-read-write.cc (main): De-serialize the input into an
29006 instance of translation_unit, not an abi_corpus anymore, and
29007 serialize that translation_unit.
29009 2013-04-02 Dodji Seketeli <dodji@redhat.com>
29011 Support var decl & mangled_name attributes
29012 * src/abg-ir.h (decl_base::binding, decl_base::get_mangled_name)
29013 (decl_base::set_mangled_name, decl_base::m_mangled_name): New
29015 (scope_decl::scope_decl: type_decl::type_decl)
29016 (scope_type_decl::scope_type_decl, typedef_decl::typedef_decl):
29017 Initialize mangled_name.
29018 (namespace_decl::namespace_decl): Initialize visibility.
29019 (class var_decl): New declaration.
29020 * src/abg-ir.cc (decl_base::decl_base, scope_decl::scope_decl)
29021 (type_decl::type_decl, scope_type_decl::scope_type_decl):
29022 Initialize mangled name.
29023 (namespace_decl::namespace_decl): Initialize visibility.
29024 (qualified_type_def::qualified_type_def)
29025 (pointer_type_def::pointer_type_def)
29026 (reference_type_def::reference_type_def): By default, set the
29027 visibility to the same as for the underlying type.
29028 (enum_type_decl::enum_type_decl, typedef_decl::typedef_decl):
29029 Initialize mangled name.
29030 (var_decl::var_decl, var_decl::operator==, var_decl::~var_decl):
29032 * src/abg-reader.cc (read_visibility, read_binding, handle_var_decl): New
29034 (read_file): Handle var-decl elements.
29035 * src/abg-writer.cc (write_location): Rename write_decl_location
29037 (write_var_decl, write_visibility, write_binding): New definitions.
29038 (write_decl, write_type_decl, write_qualified_type_def)
29039 (write_pointer_type_def, write_reference_type_def)
29040 (write_enum_type_decl, write_typedef_decl): Adjust to use
29042 * tests/data/test-read-write/test8.xml: New test input.
29043 * tests/test-read-write.cc: De-serialize the above and serialize
29044 it back and ensure both are equal.
29045 * tests/Makefile.am: add tests/data/test-read-write/test8.xml to
29048 2013-04-02 Dodji Seketeli <dodji@redhat.com>
29050 Don't forget to init context & visibility in decl_base
29051 * src/abg-ir.cc (decl_base::decl_base): Initialize context and
29052 visibility on all the overloads of the constructor.
29054 2013-03-31 Dodji Seketeli <dodji@redhat.com>
29057 * src/abg-ir.h (decl_base::get_scope): Really re-style.
29059 2013-03-31 Dodji Seketeli <dodji@redhat.com>
29062 * src/abg-ir.h (decl_base::{get_location, set_location, get_name,
29063 set_name}): Re-style.
29065 2013-03-31 Dodji Seketeli <dodji@redhat.com>
29067 Basic support for type/decl visibility
29068 * src/abg-ir.h (enum decl_base::visibility)
29069 (decl_base::get_visibility, decl_base::set_visibility)
29070 (decl_base::m_visibility): New.
29071 (decl_base::decl_base, scope_decl::scope_decl)
29072 (type_decl::type_decl, enum_type_decl::enum_type_decl)
29073 (typedef_decl::typedef_decl): Pass visibility.
29074 * src/abg-ir.cc (decl_base::decl_base, scope_decl::scope_decl)
29075 (type_decl::type_decl, enum_type_decl::enum_type_decl)
29076 (typedef_decl::typedef_decl): Pass visibility.
29077 (qualified_type_def::qualified_type_def)
29078 (pointer_type_def::pointer_type_def)
29079 (reference_type_def::reference_type_def): Initialize visibility.
29081 2013-03-31 Dodji Seketeli <dodji@redhat.com>
29083 A type/decl shouldn't hold a reference on its scope
29084 * src/abg-ir.h (decl_base::m_context): Make this a naked pointer.
29085 (decl_base::set_scope, add_decl_to_scope): Pass the
29086 scope as a naked pointer.
29087 * src/abg-ir.cc (decl_base::decl_base): Initialize the context to
29089 (decl_base::set_scope, add_decl_to_scope): Pass the scope as a
29091 * src/abg-reader.cc (read_context::get_cur_scope): Return a naked
29093 (handle_namespace_decl): Adjust accordingly.
29095 2013-03-30 Dodji Seketeli <dodji@redhat.com>
29097 Support typedef declarations
29098 * src/abg-ir.cc (dynamic_type_hash::operator()): Handle hashing of
29099 a pointer to an instance of typedef_decl.
29100 (typedef_decl::typedef_decl, typedef_decl::operator==)
29101 (typedef_decl::operator==, typedef_decl::get_underlying_type)
29102 (typedef_decl::~typedef_decl): New definitions.
29103 * src/abg-ir.h (class typedef_decl, struct typedef_decl_hash): New
29105 * src/abg-reader.cc (handle_typedef_decl): New definition.
29106 (handle_element): Handle de-serialization of typedef-decl element.
29107 * src/abg-writer.cc (write_typedef_decl): New definition.
29108 (write_decl): Handle serialization of an instance of typedef_decl.
29109 * tests/data/test-read-write/test7.xml: New test.
29110 * tests/Makefile.am: Add it to the distribution.
29111 * tests/test-read-write.cc: De-serialize the content of the new
29112 test, serialize it back and diff both.
29114 2013-03-30 Dodji Seketeli <dodji@redhat.com>
29116 Remove useless static_cast from hashing code
29117 * src/abg-ir.h (scope_type_decl_hash::operator())
29118 (qualified_type_def_hash::operator())
29119 (pointer_type_def_hash::operator())
29120 (reference_type_def_hash::operator()): Remove useless static_cast.
29122 2013-03-30 Dodji Seketeli <dodji@redhat.com>
29124 Simplify equality operators
29125 * src/abg-ir.cc (qualified_type_def::operator==)
29126 (pointer_type_def::operator==, reference_type_def::operator==)
29127 (enum_type_decl::operator==): Simplify the code by safely assuming
29128 the underlying type is non-null.
29130 2013-03-30 Dodji Seketeli <dodji@redhat.com>
29132 Support enum type declarations
29133 * src/abg-ir.h (class enum_type_decl, struct enum_type_decl_hash):
29135 * src/abg-ir.cc (dynamic_type_hash::operator()): Add hashing
29136 support for enum_type_decl.
29137 (enum_type_decl::enum_type_decl)
29138 (enum_type_decl::get_underlying_type)
29139 (enum_type_decl::get_enumerators, enum_type_decl::~enum_type_decl)
29140 (enum_type_decl::operator==): New definitions.
29141 * src/abg-reader.cc (handle_enum_type_decl): New definition.
29142 (handle_element): Handle "enum-decl" element.
29143 * src/abg-writer.cc (write_enum_type_decl): New.
29144 (write_decl): Add support to serialize enum_type_decl.
29145 * tests/test-read-write.cc: De-serialize and serialize
29146 data/test-read-write/test6.xml back.
29147 * tests/data/test-read-write/test6.xml: New test input.
29148 * tests/Makefile.am: Add it to the distribution.
29150 2013-03-30 Dodji Seketeli <dodji@redhat.com>
29152 Fix reference-type-def serialization
29153 * tests/test-read-write.cc: Really de-serialize and then serialize
29154 back data/test-read-write/test5.xml, not test4.xml. Sigh.
29155 * src/abg-writer.cc (write_reference_type_def): As a result of
29156 really trying to serialize reference type definitions fix the
29157 serialization code here.
29159 2013-03-29 Dodji Seketeli <dodji@redhat.com>
29161 Support reference types
29162 * src/abg-ir.h (class reference_type_def, struct pointer_type_def)
29163 (struct reference_type_def): New declaration.
29164 (type_base_hash::operator(), type_decl_hash::operator())
29165 (scope_type_decl_hash::operator())
29166 (qualified_type_def_hash::operator()): Include the typeid name in
29168 * src/abg-ir.cc (reference_type_def::reference_type_def)
29169 (reference_type_def::operator==)
29170 (reference_type_def::get_pointed_to_type)
29171 (reference_type_def::is_lvalue)
29172 (reference_type_def::~reference_type_def): New definitions.
29173 (dynamic_type_hash::operator): Hash pointer_type_def and
29174 reference_type_def instances.
29175 * src/abg-reader.cc (read_context::finish_decl_creation)
29176 (read_context::finish_type_decl_creation)
29177 (handle_reference_type_def): New definitions.
29178 (read_file): Handle "reference-type-def" elements.
29179 (handle_type_decl, handle_namespace_decl)
29180 (handle_qualified_type_decl, handle_pointer_type_def): Use the new
29181 read_context::finish_type_decl_creation or
29182 read_context::finish_decl_creation.
29183 * src/abg-writer.cc (write_reference_type_def): New definition.
29184 (write_decl): Supporting writing a pointer to an instance of
29185 reference_type_def.
29186 * tests/data/test-read-write/test5.xml: New test file.
29187 * tests/test-read-write.cc: (De)Serialize it.
29188 * tests/Makefile.am: Add it to the build system.
29190 2013-03-28 Dodji Seketeli <dodji@redhat.com>
29192 Support pointer types & Fix IR types equality
29193 * src/abg-ir.h (location::{operator==, operator<})
29194 (decl_base::operator==, scope_decl::operator==)
29195 (type_base::operator==, struct type_shared_ptr_equal)
29196 (type_decl::operator==, scope_type::operator==)
29197 (qualified_type_def::operator==, class pointer_type_def): New
29199 * src/abg-ir.cc (decl_base::operator==, scope_decl::operator==)
29200 (type_base::operator==, type_decl::operator==)
29201 (scope_type_decl::operator==, namespace_decl::operator==)
29202 (qualified_type_def::operator==)
29203 (pointer_type_def::pointer_type_def, pointer_type_def::operator==)
29204 (pointer_type_def::get_pointed_to_type)
29205 (pointer_type_def::~pointer_type_def): New definitions.
29206 * src/abg-reader.cc (handle_pointer_type_def): New definition.
29207 (read_input): Handle pointer-type-def
29209 * src/abg-writer.cc (type_shared_ptr_map): Make this map use the
29210 use type_shared_ptr_equal predicate.
29211 (write_pointer_type_def): New definition.
29212 (write_decl): Improve logic. Support serializing a pointer to
29214 * tests/data/test-read-write/test4.xml: New test input file.
29215 * tests/Makefile.am: Add tests/data/test-read-write/test4.xml to
29217 * tests/test-read-write.cc: (De)serialize the new test file.
29219 2013-03-27 Dodji Seketeli <dodji@seketeli.org>
29221 Support qualified types & Misc ancillary fixes
29222 * src/abg-ir.h (struct type_base_hash, struct dynamic_type_hash)
29223 (struct type_shared_ptr_hash, struct scope_type_decl_hash, class
29224 qualified_type_def, struct qualified_type_def_hash): New.
29225 (decl_base_hash::operator()): Constify. Don't crash if the scope
29226 of the decl we are hashing is null.
29227 (class type_decl): Add comment at the end.
29228 (type_decl_hash::operator()): Constify. Reuse the new
29229 type_base_hash hasher.
29230 (class namespace_decl): Add comment.
29231 * src/abg-ir.cc (qualified_type_def::qualified_type_def)
29232 (qualified_type_def::~qualified_type_def)
29233 (qualified_type_def::get_cv_quals)
29234 (qualified_type_def::set_cv_quals)
29235 (qualified_type_def::get_underlying_type)
29236 (dynamic_type_hash::operator()): New function definitions.
29237 * src/abg-reader.cc (handle_qualified_type_decl): New.
29238 (read_file): Handle elements named "qualified-type-def".
29239 (read::context::add_type_decl): Assert that
29240 the type being associated to the unique ID is non-null.
29241 (handle_type_decl): Fix this in the process; don't crash if some
29242 attributes are not present. Associate the unique id present in
29243 the xml document with the type we just parsed.
29244 (handle_namespace_decl): Add some comments. Don't crash if the
29245 name attribute is not present.
29246 * src/abg-writer.cc (write_context::get_id_for_type)
29247 (write_context::m_type_id_map, write_decl_location)
29248 (write_qualified_type_def): New.
29249 (write_decl): Handle instances of qualified_type_def.
29250 (write_type_decl): Use the new write_decl_location and
29251 write_context::get_id_for_type.
29252 * tests/data/test-read-write/test0.xml: Update id format since we
29253 are now using the new write_context::get_id_for_type to generate
29255 * tests/data/test-read-write/test1.xml: Likewise.
29256 * tests/data/test-read-write/test2.xml: Likewise.
29257 * tests/data/test-read-write/test3.xml: New test.
29258 * tests/test-read-write.cc: Test De-serializing
29259 tests/data/test-read-write/test3.xml and serializing it back.
29260 Also don't bail out if we fail on one input.
29261 * tests/Makefile.am: Add tests/data/test-read-write/test3.xml to the
29264 2013-03-27 Benjamin Kosnik <bkoz@redhat.com>
29266 Various autotool adjustments
29268 * configure.ac (AM_INIT_AUTOMAKE): Use gcc versions.
29269 (PKG_CHECK_MODULES): Re-use libjava/classpath solution, naming.
29270 * m4/pkg.m4: Add, take from classpath.
29271 * src/Makefile.am: Adjust names.
29273 2013-03-26 Dodji Seketeli <dodji@seketeli.org>
29275 Remove the 'm_kind' member from the IR
29276 * src/abg-ir.{h,cc}: Remove use of the m_kind field. We are using
29277 full blown rtti so this uselessly just clutter the code.
29279 2013-03-26 Dodji Seketeli <dodji@seketeli.org>
29282 * tests/Makefile.am: Remove useless absolute reference to the
29285 2013-03-26 Dodji Seketeli <dodji@seketeli.org>
29287 Fix depth handling during the parsing
29288 * src/abg-reader.cc (read_context::get_cur_scope): Remove useless
29289 const overload. Don't make this rely on m_cur_scope. Rather, use
29290 the path to the current decl (from the root element) to compute
29292 (read_context::m_cur_scope, read_context::set_cur_scope): Remove
29294 (update_read_context): Re-think logic.
29295 * tests/data/test-read-write/test2.xml: Add new test input.
29296 * tests/Makefile.am: Add data/test-read-write/test2.xml to the
29298 * tests/test-read-write.cc: Add data/test-read-write/test2.xml to
29301 2013-03-25 Dodji Seketeli <dodji@seketeli.org>
29303 Debug read-write of a type-decl in a namespace-decl
29304 * abg-ir.{h,cc} (decl_base::decl_base, scope_decl::scope_decl)
29305 (type_decl::type_decl, namespace_decl::namespace_decl): Do not
29306 append a decl to its context from within its constructor. It's
29307 better doing that in a function that takes shared_ptrs to decl and
29308 context. That way we avoid memory management havoc.
29309 (decl_base::set_scope): New private function.
29310 (scope_decl::add_member_decl): Make this private.
29311 (add_decl_to_scope): New function, friend of decl_base and
29313 * abg-reader.cc (read_context::get_cur_scope): Add a non-const
29315 (handle_type_decl, handle_namespace_decl): Use add_decl_to_scope.
29316 Adjust to new type_decl and namespace_decl constructor signature.
29317 * src/abg-writer.cc (write_type): Emit 'id', not 'xml:id'.
29318 (write_namespace_decl): Emit "namespace-decl", not
29319 "namespace-decl-name", as the name of namespace element.
29320 * tests/Makefile.am (test0.xml): Rename input0.xml into this.
29321 (test1.xml): New test input.
29322 * tests/data/test-read-write/test0.xml: Update to use 'id' as id
29323 attribute, rather than xml:id.
29324 * tests/data/test-read-write/test1.xml: New test.
29325 * test-read-write.cc (struct InOutSpec): New
29326 (main): Reorganize to give a list of input files to read and to
29327 write to an output file, have the test read the input files, write
29328 them, and diff the two.
29330 2013-03-22 Dodji Seketeli <dodji@seketeli.org>
29332 Update tests/data/test-read-write/input0.xml
29333 * tests/data/test-read-write/input0.xml: Make this identical to
29334 how it would look like when serialized.
29336 2013-03-22 Dodji Seketeli <dodji@seketeli.org>
29338 Debug type-decl serialization
29339 * src/abg-writer.cc (do_indent): New function.
29340 (write_corpus&): Use do_indent. Don't forget to close the
29342 (write_type_decl): Use do_indent. Handle null decls pointers.
29343 Emit the id at the end of the element.
29344 (write_namespace_decl): Use do_indent. Handle null decls
29346 * tests/test-utils.{h,cc} (get_src_dir,get_build_dir): Constify
29347 the returned reference to string.
29348 (is_dir, ensure_dir_path_created, ensure_parent_dir_created): New
29349 function definitions.
29350 * tests/test-read-write.cc (main): Augment the test to serialize
29353 2013-03-21 Dodji Seketeli <dodji@seketeli.org>
29355 Debugged type-decl de-serialization
29356 * src/abg-ir.cc (namespace_decl::~namespace_decl): Add this
29357 missing virtual constructor definition.
29358 * src/abg-reader.cc (read_context::{get_cur_decl,pop_decl}):
29359 Return a null pointer when the decls stack is empty.
29360 (update_read_context): Don't try to de-reference a NULL cur_decl.
29361 (read_input): Don't try to poke at file validity here. What was I
29362 thinking. Really test for advance_cursor to return 1, expressing
29364 * src/abg-reader.h (read_file): Fix style.
29365 * Makefile.am: Add tests sub-directory.
29366 * configure.ac: Build with debugging-friendly options if the
29367 ABIGAIL_DEBUG env variable is set. Generate tests/Makefile.
29368 * tests/Makefile.am: New file.
29369 * tests/test-read-write.cc: Likewise.
29370 * tests/test-utils.{h,cc}: Likewise.
29371 * tests/data/test-read-write/input0.xml: Likewise.
29373 2013-03-21 Dodji Seketeli <dodji@seketeli.org>
29375 Initial implementation of serialization of basic types and namespaces.
29376 * src/Makefile.am: Add abg-writer.{h,cc} and abg-config.{h,cc}.
29377 * src/abg-config.{h,cc}: New files.
29378 * src/abg-corpus.h (abi_corpus::decls_type): New typedef.
29379 (abi_corpus::{add,get_decls,get_loc_mgr}): Fix style.
29380 (abi_corpus::is_empty): Declare new function.
29381 * src/abg-corpus.cc (abi_corpus::add): really add the declaration
29383 (abi_corpus::is_empty): Define new function.
29384 * src/abg-ir.{h,cc} (location_manager::expand_location): Consti-fy
29386 * src/abg-reader.cc (read_file): Add a corpus parameter.
29387 * src/abg-serialize.cc: Delete this file.
29388 * src/abg-writer.h (write_to_ostream): Rename write into this.
29389 Make it take a corpus and an ostream as parameters.
29390 * abg-writer.cc: New file.
29392 2013-03-08 Dodji Seketeli <dodji@seketeli.org>
29394 Parse type-decl and namespace-decl elements
29395 * configure.ac: Add libxml2 dependencies.
29396 * src/abg-corpus.{h,cc}: New files.
29397 * src/abg-hash.{h,cc}: Likewise.
29398 * src/abg-libxml-utils.{h,cc}: Likewise.
29399 * src/abg-reader.{h,cc}: Likewise.
29400 * src/abg-serialize.{h,cc}: Likewise.
29401 * src/abg-writer.h: Likewise.
29402 * src/Makefile.am: Build the new files above.
29403 * src/abg-ir.h (class location): Add public accessors for the value, and
29404 a truth operator. Make the methods be inline.
29405 (class decl_base): Renamed decl into this. Renamed what_decl_kind
29406 into what_kind. Renamed get_context into get_scope. Add virtual
29407 destructor, accessors for location and name.
29408 (class {scope_decl, type_base, type_decl} ): Add virtual dtor.
29410 (struct {decl_base_hash, type_decl_hash}): New hashing functors.
29411 (class {scope_type_decl, namespace_decl}): Add virtual dtor.
29412 * src/abg-ir.cc (location::*): Remove location definitions. There
29413 are now inline in the header.
29414 (class decl_base): Renamed decl into this. Remove most of the
29415 definitions from here as their are now inline in the header.
29416 (scope_decl::~scope_decl, type_base::~type_base)
29417 (type_decl::~type_decl, scope_type_decl::~scope_type_decl): New
29420 2013-03-04 Dodji Seketeli <dodji@seketeli.org>
29422 Updated hierarchy up to namespace_decl
29423 * src/abg-ir.h (location): Make the default ctor public.
29424 (class decl): Declare data member and proper constructors. Make the
29425 context be a shared_ptr. Add a kind data member to avoid RTTI for
29427 (class scope_decl): Added protected constructor to handle the kind data
29429 (class type_base): Add data members proper and clean the iface up.
29430 (class type_decl, scope_type_decl, namespace_decl): Iron out
29432 * src/abg-ir.cc (class location): Fix style.
29433 (class decl, scope_decl, type_base, type_decl, scope_type_decl)
29434 (namespace_decl): Define these types.
29436 2013-03-01 Dodji Seketeli <dodji@seketeli.org>
29438 Add missing autoconfiscation files into version control
29439 * config.guess: Added to VCS.
29440 * config.sub: Likewise.
29441 * depcomp: Likewise.
29442 * install-sh: Likewise.
29443 * ltmain.sh: Likewise.
29444 * missing: Likewise
29446 2013-03-01 Dodji Seketeli <dodji@seketeli.org>
29449 * m4/: Import this directory into version control.
29451 2013-03-01 Dodji Seketeli <dodji@seketeli.org>
29453 Create and expand locations
29454 * src/abg-ir.h (class {location, location_manager, decl,
29455 scoped_decl, type_base, type_decl, scope_type_decl): Declare new
29457 * src/abg-ir.cc (class {location, location_manager}): Define new types.
29459 2013-03-01 Dodji Seketeli <dodji@seketeli.org>
29461 Adjust src/Makefile.am after some file rename
29462 * src/Makefile.am: Update build system for renaming files from
29465 2013-03-01 Dodji Seketeli <dodji@seketeli.org>
29467 Update the README file
29470 2013-02-28 Dodji Seketeli <dodji@seketeli.org>
29472 Initial AUTHORS and README
29476 2013-02-28 Dodji Seketeli <dodji@seketeli.org>
29478 Leave license stuff for later
29481 2013-02-28 Dodji Seketeli <dodji@seketeli.org>
29483 Initial import Abigail