libabigail/tests/data/test-read-dwarf/test8-qualified-this-pointer.so.abi
Dodji Seketeli 70cb9ba1ae Yet another fix to the DWARF method "static-ness" detection heuristic
* include/abg-fwd.h (is_pointer, is_qualified_type): Declare new
	functions.
	* src/abg-ir.cc (is_pointer, is_qualified_type): Implement these
	new functions.
	* src/abg-dwarf-reader.cc (finish_member_function_reading):
	Sometimes, the this pointer of a non-static method can point to a
	*qualified* version of its containing type.  I am seeing that when
	comparing libstdc++.so from RHEL 6.5 and RHEL 7.  Take that in
	account when trying to detect that the first parameter of a member
	function is the this pointer, and thus detect that the function is
	a non static member function.
	* tests/data/test-read-dwarf/test8-qualified-this-pointer.so.abi:
	New test input.
	* tests/data/test-read-dwarf/test8-qualified-this-pointer.so: New
	test input.
	* tests/data/test-read-dwarf/test8-qualified-this-pointer.cc:
	Source code of new test input.
	* tests/test-read-dwarf.cc: Update copyright year.
	(in_out_spec): Add the new test inputs to this array, so that this
	test harness runs on them.
	* tests/Makefile.am: Add the new test inputs to the source
	distribution.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2014-10-16 23:49:41 +02:00

30 lines
2.2 KiB
Plaintext

<abi-corpus path='data/test-read-dwarf/test8-qualified-this-pointer.so'>
<elf-function-symbols>
<elf-symbol name='_ZNK1S3fooEv' type='func-type' binding='global-binding' is-defined='yes'/>
<elf-symbol name='_fini' type='func-type' binding='global-binding' is-defined='yes'/>
<elf-symbol name='_init' type='func-type' binding='global-binding' is-defined='yes'/>
</elf-function-symbols>
<abi-instr version='1.0' address-size='64' path='test8-qualified-this-pointer.cc'>
<class-decl name='S' size-in-bits='32' is-struct='yes' visibility='default' filepath='/home/dodji/git/libabigail/master/tests/data/test-read-dwarf/test8-qualified-this-pointer.cc' line='1' column='1' id='type-id-1'>
<data-member access='public' layout-offset-in-bits='0'>
<var-decl name='i' type-id='type-id-2' visibility='default' filepath='/home/dodji/git/libabigail/master/tests/data/test-read-dwarf/test8-qualified-this-pointer.cc' line='3' column='1'/>
</data-member>
<member-function access='public' constructor='yes'>
<function-decl name='S' filepath='/home/dodji/git/libabigail/master/tests/data/test-read-dwarf/test8-qualified-this-pointer.cc' line='5' column='1' visibility='default' binding='global' size-in-bits='64' alignment-in-bits='64'>
<parameter type-id='type-id-3' is-artificial='yes'/>
</function-decl>
</member-function>
<member-function access='public'>
<function-decl name='foo' mangled-name='_ZNK1S3fooEv' filepath='/home/dodji/git/libabigail/master/tests/data/test-read-dwarf/test8-qualified-this-pointer.cc' line='10' column='1' visibility='default' binding='global' size-in-bits='64' alignment-in-bits='64' elf-symbol-id='_ZNK1S3fooEv'>
<parameter type-id='type-id-4' is-artificial='yes'/>
<return type-id='type-id-2'/>
</function-decl>
</member-function>
</class-decl>
<type-decl name='int' size-in-bits='32' alignment-in-bits='32' id='type-id-2'/>
<pointer-type-def type-id='type-id-1' size-in-bits='64' alignment-in-bits='64' id='type-id-3'/>
<qualified-type-def type-id='type-id-1' const='yes' id='type-id-5'/>
<pointer-type-def type-id='type-id-5' size-in-bits='64' alignment-in-bits='64' id='type-id-4'/>
</abi-instr>
</abi-corpus>