libabigail/tests
Mark Wielaard a9f5fb4089 Add --no-write-default-sizes option.
abidw will write out the exact same size-in-bits address for every
pointer type, reference type, function declaration and function type
even though it is always the same as the translation unit address
size. When giving the --no-write-default-sizes option these aren't
written out anymore. The reader is updated to set the default size
when none is given in the XML description.

Even though size and alignment are handled together in the reader,
default alignment is still set to zero, following commit a05384675

Note that this isn't backward compatible with older libabigail
readers, which will set the size to zero when none is given. So this
option isn't the default.

	* doc/manuals/abidw.rst: Document --no-write-default-sizes.
	* include/abg-writer.h (set_write_default_sizes): New function
	declaration.
	(set_common_options): Call set_write_default_sizes.
	* src/abg-reader.cc (build_function_decl): Get default size.
	(build_pointer_type_def): Likewise.
	(build_reference_type_def): Likewise.
	(build_function_type): Likewise.
	* src/abg-writer.cc (write_context): Add m_write_default_sizes
	bool.
	(get_write_default_sizes): New method.
	(set_write_default_sizes): Likewise.
	(write_size_and_alignment): Add default size and alignment
	parameters.
	(set_write_default_sizes): New function.
	(write_type_decl): Set default size and alignment.
	(write_pointer_type_def): Likewise.
	(write_reference_type_def): Likewise.
	(write_function_decl): Likewise.
	(write_function_type): Likewise.
	(write_class_decl_opening_tag): Likewise.
	(write_union_decl_opening_tag): Likewise.
	* tests/test-types-stability.cc (perform): Also test --abidiff
	with --no-write-default-sizes.
	* tools/abidw.cc (option): Add default_sizes bool.
	(parse_command_line): Parse --no-write-default-sizes.
	(display_usage): Add doc string for --no-write-default-sizes.

Signed-off-by: Mark Wielaard <mark@klomp.org>
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2020-04-29 11:56:40 +02:00
..
data abidiff: Omit declaration-only type size 0 diffs. 2020-04-27 13:12:48 +02:00
lib Testing: add Catch Unit test framework 2020-01-28 17:16:56 +00:00
.gitignore abg-dwarf-reader split: create abg-elf-helpers.{h,cc} and test case 2020-04-22 11:39:45 +02:00
Makefile.am abg-dwarf-reader split: create abg-elf-helpers.{h,cc} and test case 2020-04-22 11:39:45 +02:00
mockfedabipkgdiff.in Bug 22722 - Make fedabipkgdiff and its tests support both python 3 and 2 2018-03-29 13:46:50 +02:00
print-diff-tree.cc Update copyright year to 2020 2020-02-21 17:05:01 +01:00
runtestcanonicalizetypes.sh.in Bug 20180 - Support system-wide suppression specifications 2016-05-30 18:39:49 +02:00
runtestdefaultsupprs.py.in Fix typo in tests/runtestdefaultsupprs.py 2018-05-24 10:48:56 +02:00
runtestdefaultsupprspy3.sh.in Bug 22722 - Make fedabipkgdiff and its tests support both python 3 and 2 2018-03-29 13:46:50 +02:00
runtestfedabipkgdiff.py.in Bug 22722 - Make fedabipkgdiff and its tests support both python 3 and 2 2018-03-29 13:46:50 +02:00
runtestfedabipkgdiffpy3.sh.in Bug 22722 - Make fedabipkgdiff and its tests support both python 3 and 2 2018-03-29 13:46:50 +02:00
test-abicompat.cc Update copyright year to 2020 2020-02-21 17:05:01 +01:00
test-abidiff-exit.cc Add tests for declaration-only struct diffs. 2020-04-27 12:48:58 +02:00
test-abidiff.cc Update copyright year to 2020 2020-02-21 17:05:01 +01:00
test-alt-dwarf-file.cc Update copyright year to 2020 2020-02-21 17:05:01 +01:00
test-annotate.cc Handle several member anonymous types of the same kind 2019-05-07 14:31:16 +02:00
test-core-diff.cc Update copyright year to 2020 2020-02-21 17:05:01 +01:00
test-diff2.cc Update copyright year to 2020 2020-02-21 17:05:01 +01:00
test-diff-dwarf-abixml.cc Update copyright year to 2020 2020-02-21 17:05:01 +01:00
test-diff-dwarf.cc Update copyright year to 2020 2020-02-21 17:05:01 +01:00
test-diff-filter.cc Update copyright year to 2020 2020-02-21 17:05:01 +01:00
test-diff-pkg.cc Update copyright year to 2020 2020-02-21 17:05:01 +01:00
test-diff-suppr.cc tests: parallelize diff-suppr test 2020-04-20 15:02:39 +02:00
test-dot.cc Update copyright year to 2020 2020-02-21 17:05:01 +01:00
test-elf-helpers.cc abg-dwarf-reader split: create abg-elf-helpers.{h,cc} and test case 2020-04-22 11:39:45 +02:00
test-ini.cc Update copyright year to 2020 2020-02-21 17:05:01 +01:00
test-ir-walker.cc Update copyright year to 2020 2020-02-21 17:05:01 +01:00
test-kmi-whitelist.cc Testing: add Catch Unit test framework 2020-01-28 17:16:56 +00:00
test-lookup-syms.cc dwarf-reader: Fix bloom filter access in GNU_HASH section 2020-03-20 13:35:00 +01:00
test-read-dwarf.cc dwarf-reader: remove superfluous ABG_ASSERT 2020-03-18 23:10:14 +01:00
test-read-write.cc Update copyright year to 2020 2020-02-21 17:05:01 +01:00
test-svg.cc Update copyright year to 2020 2020-02-21 17:05:01 +01:00
test-tools-utils.cc Update copyright year to 2020 2020-02-21 17:05:01 +01:00
test-types-stability.cc Add --no-write-default-sizes option. 2020-04-29 11:56:40 +02:00
test-utils.cc Update copyright year to 2020 2020-02-21 17:05:01 +01:00
test-utils.h Update copyright year to 2020 2020-02-21 17:05:01 +01:00
test-valgrind-suppressions.supp Shut down a helgrind false positive in the "system" libc call 2017-03-17 09:02:19 +01:00
test-write-read-archive.cc Update copyright year to 2020 2020-02-21 17:05:01 +01:00
update-test-output.py Rename tests/update-test-read-dwarf-output.py 2016-12-02 12:59:32 +01:00