libabigail/tests
Dodji Seketeli 6de60eb70e Bug PR29443 - Global variables not emitted to abixml in some cases
When a global variable named V has the same name as member variable
that appears in an anonymous scope and if the the abixml writer emits
the member variable V first, it gets confused when comes the time to
emit the global V as it wrongly thinks it's been already emitted.

This is because when emitting the "internal" pretty representation of
the member variable, libabigail fails to consider printing a qualified
name.  So the two 'V' wrongly have names that can't be told apart.

For instance consider the testcase example:

struct A {
  struct {
    int xx; // #0
  };
};

The qualified name of xx, for internal purposes (to name things
internally for the purpose of book keeping) would be:
    'A::__anonymous_struct__::xx'.

Libabigail wrongly names it 'xx', hence the confusion with the global variable.

Fixed thus.

	* src/abg-ir.cc (var_decl::get_pretty_representation): Always use
	qualified name of vars in an anonymous scope for internal
	purposes.
	* tests/data/test-annotate/PR29443-missing-xx.o.annotated.abi: New
	reference test output.
	* tests/test-annotate.cc (in_out_specs): Add the above to the test
	harness.
	* tests/data/test-read-dwarf/PR29443-missing-xx.cc: New source
	code for the test.
	* tests/data/test-read-dwarf/PR29443-missing-xx.o: New test input
	binary.
	* tests/data/test-read-dwarf/PR29443-missing-xx.o.abi: New test
	reference output.
	* tests/data/Makefile.am: Add the new test material to source
	distribution.
	* tests/test-read-dwarf.cc (in_out_specs): Add the above to the
	test harness.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2022-09-20 08:55:59 +02:00
..
data Bug PR29443 - Global variables not emitted to abixml in some cases 2022-09-20 08:55:59 +02:00
lib tests: Update Catch2 library to v2.13.9 2022-07-08 15:54:21 +02:00
.gitignore
Makefile.am Canonicalize DIEs w/o assuming ODR & handle typedefs transparently 2022-06-20 17:26:58 +02:00
mockfedabipkgdiff.in Handle several variants of Python 'imp', 'importlib' modules 2022-01-06 15:44:29 +01:00
print-diff-tree.cc Update year in copyright notice 2022-06-21 12:58:57 +02:00
runtestcanonicalizetypes.sh.in Re-license the project to Apache v2 With LLVM Exception 2020-12-02 11:49:13 +01:00
runtestdefaultsupprs.py.in Re-license the project to Apache v2 With LLVM Exception 2020-12-02 11:49:13 +01:00
runtestdefaultsupprspy3.sh.in Re-license the project to Apache v2 With LLVM Exception 2020-12-02 11:49:13 +01:00
runtestfedabipkgdiff.py.in Re-license the project to Apache v2 With LLVM Exception 2020-12-02 11:49:13 +01:00
runtestfedabipkgdiffpy3.sh.in Re-license the project to Apache v2 With LLVM Exception 2020-12-02 11:49:13 +01:00
runtestslowselfcompare.sh.in Bug 26769 - Fix missing types in abixml output 2020-11-23 13:02:34 +01:00
test-abicompat.cc Update year in copyright notice 2022-06-21 12:58:57 +02:00
test-abidiff-exit.cc dwarf-reader: Better handle the absence of a die->parent map 2022-08-29 11:03:43 +02:00
test-abidiff.cc add Linux kernel symbol namespace support 2022-07-01 14:51:27 +02:00
test-alt-dwarf-file.cc test-alt-dwarf: Add missing dwz alt-debug file 2022-06-23 15:57:23 +02:00
test-annotate.cc Bug PR29443 - Global variables not emitted to abixml in some cases 2022-09-20 08:55:59 +02:00
test-core-diff.cc Update year in copyright notice 2022-06-21 12:58:57 +02:00
test-cxx-compat.cc Update year in copyright notice 2022-06-21 12:58:57 +02:00
test-diff2.cc Update year in copyright notice 2022-06-21 12:58:57 +02:00
test-diff-dwarf-abixml.cc Update year in copyright notice 2022-06-21 12:58:57 +02:00
test-diff-dwarf.cc Update year in copyright notice 2022-06-21 12:58:57 +02:00
test-diff-filter.cc Update year in copyright notice 2022-06-21 12:58:57 +02:00
test-diff-pkg.cc Add regression tests for abipkgdiff using ctf info 2022-07-11 12:20:05 +02:00
test-diff-suppr.cc Update year in copyright notice 2022-06-21 12:58:57 +02:00
test-dot.cc Re-license the project to Apache v2 With LLVM Exception 2020-12-02 11:49:13 +01:00
test-elf-helpers.cc Update year in copyright notice 2022-06-21 12:58:57 +02:00
test-ini.cc Update year in copyright notice 2022-06-21 12:58:57 +02:00
test-ir-walker.cc Update year in copyright notice 2022-06-21 12:58:57 +02:00
test-kmi-whitelist.cc Update year in copyright notice 2022-06-21 12:58:57 +02:00
test-lookup-syms.cc Update year in copyright notice 2022-06-21 12:58:57 +02:00
test-read-common.cc Add better error messaging to several tests 2022-06-20 17:05:02 +02:00
test-read-common.h Add better error messaging to several tests 2022-06-20 17:05:02 +02:00
test-read-ctf.cc ctf-reader: looks for debug information in out-of-tree modules 2022-08-29 12:53:55 +02:00
test-read-dwarf.cc Bug PR29443 - Global variables not emitted to abixml in some cases 2022-09-20 08:55:59 +02:00
test-read-write.cc Update year in copyright notice 2022-06-21 12:58:57 +02:00
test-svg.cc Re-license the project to Apache v2 With LLVM Exception 2020-12-02 11:49:13 +01:00
test-symtab-reader.cc Update year in copyright notice 2022-06-21 12:58:57 +02:00
test-symtab.cc Linux symbol CRCs: support 0 and report presence changes 2022-06-30 18:30:58 +02:00
test-tools-utils.cc Update year in copyright notice 2022-06-21 12:58:57 +02:00
test-types-stability.cc Update year in copyright notice 2022-06-21 12:58:57 +02:00
test-utils.cc Update year in copyright notice 2022-06-21 12:58:57 +02:00
test-utils.h Update year in copyright notice 2022-06-21 12:58:57 +02:00
test-valgrind-suppressions.supp
update-test-output.py Re-license the project to Apache v2 With LLVM Exception 2020-12-02 11:49:13 +01:00