mirror of
git://sourceware.org/git/libabigail.git
synced 2025-02-15 04:56:54 +00:00
In change reports for function sub-type changes, for the C language, when the name of the function is different from its linkage name, even when the function symbol has no aliases, show the symbol information of the function. * include/abg-ir.h (translation_unit::language): New enum type. (translation_unit::{get_language, set_language}): Declare new accessors. (translation_unit_language_to_string) (string_to_translation_unit_language, is_c_language) (is_cplus_plus_language): Declare new functions. * src/abg-ir.cc (translation_unit::priv::language_): New data member. (translation_unit::priv::language_): Initialize it. (translation_unit::{set_language, get_language}): Define new member functions. (translation_unit_language_to_string) (string_to_translation_unit_language, is_c_language) (is_cplus_plus_language): Define new functions. * src/abg-dwarf-reader.cc (dwarf_language_to_tu_language): New static function. (build_translation_unit_and_add_to_ir): Read the language of the translation unit. * src/abg-comparison.cc (corpus_diff::report): When reporting a change in a function sub-type, if we are in C language translation unit, if the function name is different from its linkage name, even if the symbol doesn't have any alias, show symbol information. * src/abg-reader.cc (read_translation_unit_from_input): Read the 'language' property of the translation unit, if present. * src/abg-writer.cc (write_translation_unit): Write the 'language' property to the translation unit, if present. * tests/data/test-read-dwarf/test0.abi: Adjust for the new 'language' property of the 'abi-instr' element. * tests/data/test-read-dwarf/test1.abi: Likewise. * tests/data/test-read-dwarf/test2.so.abi: Likewise. * tests/data/test-read-dwarf/test3.so.abi: Likewise. * tests/data/test-read-dwarf/test4.so.abi: Likewise. * tests/data/test-read-dwarf/test5.o.abi: Likewise. * tests/data/test-read-dwarf/test6.so.abi: Likewise. * tests/data/test-read-dwarf/test7.so.abi: Likewise. * tests/data/test-read-dwarf/test8-qualified-this-pointer.so.abi: Likewise. Signed-off-by: Dodji Seketeli <dodji@redhat.com>
123 lines
9.4 KiB
Plaintext
123 lines
9.4 KiB
Plaintext
<abi-corpus path='data/test-read-dwarf/test1'>
|
|
<elf-needed>
|
|
<dependency name='libstdc++.so.6'/>
|
|
<dependency name='libm.so.6'/>
|
|
<dependency name='libgcc_s.so.1'/>
|
|
<dependency name='libc.so.6'/>
|
|
</elf-needed>
|
|
<elf-function-symbols>
|
|
<elf-symbol name='_Z3fooR2s0' type='func-type' binding='global-binding' is-defined='yes'/>
|
|
<elf-symbol name='_ZN2b0C1Ev' type='func-type' binding='weak-binding' is-defined='yes'/>
|
|
<elf-symbol name='_ZN2b0C2Ev' type='func-type' binding='weak-binding' alias='_ZN2b0C1Ev' is-defined='yes'/>
|
|
<elf-symbol name='_ZN2b1C1Ev' type='func-type' binding='weak-binding' alias='_ZN2b1C2Ev' is-defined='yes'/>
|
|
<elf-symbol name='_ZN2b1C2Ev' type='func-type' binding='weak-binding' is-defined='yes'/>
|
|
<elf-symbol name='_ZN2s07mem_funEv' type='func-type' binding='global-binding' is-defined='yes'/>
|
|
<elf-symbol name='_ZN2s0C1Ev' type='func-type' binding='weak-binding' is-defined='yes'/>
|
|
<elf-symbol name='_ZN2s0D1Ev' type='func-type' binding='weak-binding' is-defined='yes'/>
|
|
<elf-symbol name='__libc_csu_fini' type='func-type' binding='global-binding' is-defined='yes'/>
|
|
<elf-symbol name='__libc_csu_init' 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-symbol name='_start' type='func-type' binding='global-binding' is-defined='yes'/>
|
|
<elf-symbol name='main' type='func-type' binding='global-binding' is-defined='yes'/>
|
|
</elf-function-symbols>
|
|
<elf-variable-symbols>
|
|
<elf-symbol name='_IO_stdin_used' type='object-type' binding='global-binding' is-defined='yes'/>
|
|
<elf-symbol name='_ZTI2b0' type='object-type' binding='weak-binding' is-defined='yes'/>
|
|
<elf-symbol name='_ZTI2b1' type='object-type' binding='weak-binding' is-defined='yes'/>
|
|
<elf-symbol name='_ZTI2s0' type='object-type' binding='weak-binding' is-defined='yes'/>
|
|
<elf-symbol name='_ZTS2b0' type='object-type' binding='weak-binding' is-defined='yes'/>
|
|
<elf-symbol name='_ZTS2b1' type='object-type' binding='weak-binding' is-defined='yes'/>
|
|
<elf-symbol name='_ZTS2s0' type='object-type' binding='weak-binding' is-defined='yes'/>
|
|
<elf-symbol name='_ZTT2s0' type='object-type' binding='weak-binding' is-defined='yes'/>
|
|
<elf-symbol name='_ZTV2s0' type='object-type' binding='weak-binding' is-defined='yes'/>
|
|
<elf-symbol name='_ZTVN10__cxxabiv117__class_type_infoE@@CXXABI_1.3' type='object-type' binding='weak-binding' is-defined='yes'/>
|
|
<elf-symbol name='_ZTVN10__cxxabiv121__vmi_class_type_infoE@@CXXABI_1.3' type='object-type' binding='weak-binding' is-defined='yes'/>
|
|
<elf-symbol name='__TMC_END__' type='object-type' binding='global-binding' is-defined='yes'/>
|
|
<elf-symbol name='__dso_handle' type='object-type' binding='global-binding' is-defined='yes'/>
|
|
</elf-variable-symbols>
|
|
<abi-instr version='1.0' address-size='64' path='test1.cc' language='LANG_C_plus_plus'>
|
|
<class-decl name='b0' size-in-bits='128' is-struct='yes' visibility='default' filepath='/home/dodji/git/libabigail/dwarf/tests/data/test-read-dwarf/test1.cc' line='1' column='1' id='type-id-1'>
|
|
<data-member access='public' layout-offset-in-bits='0'>
|
|
<var-decl name='m0' type-id='type-id-2' visibility='default' filepath='/home/dodji/git/libabigail/dwarf/tests/data/test-read-dwarf/test1.cc' line='3' column='1'/>
|
|
</data-member>
|
|
<data-member access='public' layout-offset-in-bits='64'>
|
|
<var-decl name='m1' type-id='type-id-3' visibility='default' filepath='/home/dodji/git/libabigail/dwarf/tests/data/test-read-dwarf/test1.cc' line='4' column='1'/>
|
|
</data-member>
|
|
</class-decl>
|
|
<type-decl name='long long int' size-in-bits='64' id='type-id-2'/>
|
|
<type-decl name='char' size-in-bits='8' id='type-id-3'/>
|
|
<class-decl name='b1' size-in-bits='128' is-struct='yes' visibility='default' filepath='/home/dodji/git/libabigail/dwarf/tests/data/test-read-dwarf/test1.cc' line='7' column='1' id='type-id-4'>
|
|
<data-member access='public' layout-offset-in-bits='0'>
|
|
<var-decl name='m0' type-id='type-id-5' visibility='default' filepath='/home/dodji/git/libabigail/dwarf/tests/data/test-read-dwarf/test1.cc' line='9' column='1'/>
|
|
</data-member>
|
|
<data-member access='public' layout-offset-in-bits='64'>
|
|
<var-decl name='m1' type-id='type-id-3' visibility='default' filepath='/home/dodji/git/libabigail/dwarf/tests/data/test-read-dwarf/test1.cc' line='10' column='1'/>
|
|
</data-member>
|
|
</class-decl>
|
|
<type-decl name='double' size-in-bits='64' id='type-id-5'/>
|
|
<class-decl name='s0' size-in-bits='384' is-struct='yes' visibility='default' filepath='/home/dodji/git/libabigail/dwarf/tests/data/test-read-dwarf/test1.cc' line='13' column='1' id='type-id-6'>
|
|
<base-class access='public' layout-offset-in-bits='24' is-virtual='yes' type-id='type-id-1'/>
|
|
<base-class access='public' layout-offset-in-bits='32' is-virtual='yes' type-id='type-id-4'/>
|
|
<member-type access='public'>
|
|
<typedef-decl name='integer' type-id='type-id-8' filepath='/home/dodji/git/libabigail/dwarf/tests/data/test-read-dwarf/test1.cc' line='15' column='1' id='type-id-7'/>
|
|
</member-type>
|
|
<member-type access='public'>
|
|
<typedef-decl name='byte' type-id='type-id-10' filepath='/home/dodji/git/libabigail/dwarf/tests/data/test-read-dwarf/test1.cc' line='16' column='1' id='type-id-9'/>
|
|
</member-type>
|
|
<data-member access='public' layout-offset-in-bits='64'>
|
|
<var-decl name='m0' type-id='type-id-7' visibility='default' filepath='/home/dodji/git/libabigail/dwarf/tests/data/test-read-dwarf/test1.cc' line='18' column='1'/>
|
|
</data-member>
|
|
<data-member access='public' layout-offset-in-bits='96'>
|
|
<var-decl name='m1' type-id='type-id-9' visibility='default' filepath='/home/dodji/git/libabigail/dwarf/tests/data/test-read-dwarf/test1.cc' line='19' column='1'/>
|
|
</data-member>
|
|
<member-function access='public' constructor='yes'>
|
|
<function-decl name='s0' filepath='/home/dodji/git/libabigail/dwarf/tests/data/test-read-dwarf/test1.cc' line='21' column='1' visibility='default' binding='global' size-in-bits='64'>
|
|
<parameter type-id='type-id-11' is-artificial='yes'/>
|
|
<parameter type-id='type-id-8' is-artificial='yes'/>
|
|
<return type-id='type-id-12'/>
|
|
</function-decl>
|
|
</member-function>
|
|
<member-function access='public' destructor='yes'>
|
|
<function-decl name='~s0' filepath='/home/dodji/git/libabigail/dwarf/tests/data/test-read-dwarf/test1.cc' line='27' column='1' visibility='default' binding='global' size-in-bits='64'>
|
|
<parameter type-id='type-id-11' is-artificial='yes'/>
|
|
<parameter type-id='type-id-8' is-artificial='yes'/>
|
|
<return type-id='type-id-12'/>
|
|
</function-decl>
|
|
</member-function>
|
|
<member-function access='public'>
|
|
<function-decl name='mem_fun' mangled-name='_ZN2s07mem_funEv' filepath='/home/dodji/git/libabigail/dwarf/tests/data/test-read-dwarf/test1.cc' line='36' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_ZN2s07mem_funEv'>
|
|
<parameter type-id='type-id-11' is-artificial='yes'/>
|
|
<return type-id='type-id-7'/>
|
|
</function-decl>
|
|
</member-function>
|
|
<member-function access='public' constructor='yes'>
|
|
<function-decl name='s0' mangled-name='_ZN2s0C1Ev' filepath='/home/dodji/git/libabigail/dwarf/tests/data/test-read-dwarf/test1.cc' line='21' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_ZN2s0C1Ev'>
|
|
<parameter type-id='type-id-11' is-artificial='yes'/>
|
|
<parameter type-id='type-id-8' is-artificial='yes'/>
|
|
<return type-id='type-id-12'/>
|
|
</function-decl>
|
|
</member-function>
|
|
<member-function access='public' destructor='yes'>
|
|
<function-decl name='~s0' mangled-name='_ZN2s0D1Ev' filepath='/home/dodji/git/libabigail/dwarf/tests/data/test-read-dwarf/test1.cc' line='27' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_ZN2s0D1Ev'>
|
|
<parameter type-id='type-id-11' is-artificial='yes'/>
|
|
<parameter type-id='type-id-8' is-artificial='yes'/>
|
|
<return type-id='type-id-12'/>
|
|
</function-decl>
|
|
</member-function>
|
|
</class-decl>
|
|
<type-decl name='int' size-in-bits='32' id='type-id-8'/>
|
|
<type-decl name='unsigned char' size-in-bits='8' id='type-id-10'/>
|
|
<type-decl name='void' id='type-id-12'/>
|
|
<pointer-type-def type-id='type-id-6' size-in-bits='64' id='type-id-11'/>
|
|
<reference-type-def kind='lvalue' type-id='type-id-6' size-in-bits='64' id='type-id-13'/>
|
|
<function-decl name='foo' mangled-name='_Z3fooR2s0' filepath='/home/dodji/git/libabigail/dwarf/tests/data/test-read-dwarf/test1.cc' line='42' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Z3fooR2s0'>
|
|
<parameter type-id='type-id-13' name='s' filepath='/home/dodji/git/libabigail/dwarf/tests/data/test-read-dwarf/test1.cc' line='42' column='1'/>
|
|
<return type-id='type-id-12'/>
|
|
</function-decl>
|
|
<function-decl name='main' mangled-name='main' filepath='/home/dodji/git/libabigail/dwarf/tests/data/test-read-dwarf/test1.cc' line='48' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='main'>
|
|
<return type-id='type-id-8'/>
|
|
</function-decl>
|
|
</abi-instr>
|
|
</abi-corpus>
|