libabigail/tests/data/test-annotate/test7.so.abi
Ondrej Oprala aba99e5106 Bug 20970 - Add a --annotate option to abidw
This option annotates (read "pretty-prints") the types and elf symbols
in the form of XML comments in the ABIXML output emitted by the abidw
command.

Signed-off-by: Ondrej Oprala <ondrej.oprala@gmail.com>

	* doc/manuals/abidiff.rst: Document the '--no-corpus-path'
	option.
	* doc/manuals/abidw.rst: Document the '--no-corpus-path'
	and '--annotate' options.
	* include/abg-libxml-utils.h ({un,}escape_xml_comment): Add
	new function declarations.
	* include/abg-writer.h: Add new annotate functions
	(write_{translation_unit,corpus_to_{archive,native_xml_file}}):
	Add an optional "annotate" parameter defaulting to "false".
	* src/abg-libxml-utils.cc ({un,}escape_xml_comment): Add
	new function definitions.
	* src/abg-writer.cc (annotate): Define new templatized function
	and specialize it for necessary cases.
	* tests/Makefile.am: Add runtestannotate as a new test.
	* tests/data/Makefile.am: Add paths to below reference test
	outputs.
	* tests/data/test-annotate/libtest23.so.abi: New reference test
	output.
	* tests/data/test-annotate/libtest24-drop-fns-2.so.abi: Likewise.
	* tests/data/test-annotate/libtest24-drop-fns.so.abi: Likewise.
	* tests/data/test-annotate/test0.abi: Likewise.
	* tests/data/test-annotate/test1.abi: Likewise.
	* tests/data/test-annotate/test10-pr18818-gcc.so.abi: Likewise.
	* tests/data/test-annotate/test11-pr18828.so.abi: Likewise.
	* tests/data/test-annotate/test12-pr18844.so.abi: Likewise.
	* tests/data/test-annotate/test13-pr18894.so.abi: Likewise.
	* tests/data/test-annotate/test14-pr18893.so.abi: Likewise.
	* tests/data/test-annotate/test15-pr18892.so.abi: Likewise.
	* tests/data/test-annotate/test16-pr18904.so.abi: Likewise.
	* tests/data/test-annotate/test17-pr19027.so.abi: Likewise.
	* tests/data/test-annotate/test18-pr19037-libvtkRenderingLIC-6.1.so.abi: Likewise.
	* tests/data/test-annotate/test19-pr19023-libtcmalloc_and_profiler.so.abi: Likewise.
	* tests/data/test-annotate/test2.so.abi: Likewise.
	* tests/data/test-annotate/test20-pr19025-libvtkParallelCore-6.1.so.abi: Likewise.
	* tests/data/test-annotate/test21-pr19092.so.abi: Likewise.
	* tests/data/test-annotate/test22-pr19097-libstdc++.so.6.0.17.so.abi: Likewise.
	* tests/data/test-annotate/test3.so.abi: Likewise.
	* tests/data/test-annotate/test4.so.abi: Likewise.
	* tests/data/test-annotate/test5.o.abi: Likewise.
	* tests/data/test-annotate/test6.so.abi: Likewise.
	* tests/data/test-annotate/test7.so.abi: Likewise.
	* tests/data/test-annotate/test8-qualified-this-pointer.so.abi: Likewise.
	* tests/data/test-annotate/test9-pr18818-clang.so.abi: Likewise.
	* tests/test-annotate.cc: New test for ABIXML annotations.
	* tools/abidiff.cc: Add the new option '--no-corpus-path'.
	* tools/abidw.cc: Likewise. Also add the '--annotate' option.

reviews round 1

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2017-01-24 15:41:37 +01:00

88 lines
4.5 KiB
Plaintext

<abi-corpus architecture='elf-amd-x86_64'>
<elf-function-symbols>
<!-- foo(S&) -->
<elf-symbol name='_Z3fooR1S' type='func-type' binding='global-binding' is-defined='yes'/>
</elf-function-symbols>
<abi-instr version='1.0' address-size='64' path='test7.cc' language='LANG_C_plus_plus'>
<!-- int -->
<type-decl name='int' size-in-bits='32' id='type-id-1'/>
<!-- struct S -->
<class-decl name='S' size-in-bits='2304' is-struct='yes' visibility='default' filepath='/home/ooprala/rh/u/libabigail/tests/data/test-read-dwarf/test7.cc' line='1' column='1' id='type-id-2'>
<data-member access='public' layout-offset-in-bits='0'>
<!-- int S::a[5] -->
<var-decl name='a' type-id='type-id-3' visibility='default' filepath='/home/ooprala/rh/u/libabigail/tests/data/test-read-dwarf/test7.cc' line='3' column='1'/>
</data-member>
<data-member access='public' layout-offset-in-bits='192'>
<!-- char* S::b[7] -->
<var-decl name='b' type-id='type-id-4' visibility='default' filepath='/home/ooprala/rh/u/libabigail/tests/data/test-read-dwarf/test7.cc' line='4' column='1'/>
</data-member>
<data-member access='public' layout-offset-in-bits='640'>
<!-- double S::c[5][3] -->
<var-decl name='c' type-id='type-id-5' visibility='default' filepath='/home/ooprala/rh/u/libabigail/tests/data/test-read-dwarf/test7.cc' line='5' column='1'/>
</data-member>
<data-member access='public' layout-offset-in-bits='1600'>
<!-- int*[4]* S::d[10] -->
<var-decl name='d' type-id='type-id-6' visibility='default' filepath='/home/ooprala/rh/u/libabigail/tests/data/test-read-dwarf/test7.cc' line='6' column='1'/>
</data-member>
<data-member access='public' layout-offset-in-bits='2240'>
<!-- char S::e[1] -->
<var-decl name='e' type-id='type-id-7' visibility='default' filepath='/home/ooprala/rh/u/libabigail/tests/data/test-read-dwarf/test7.cc' line='7' column='1'/>
</data-member>
<data-member access='public' layout-offset-in-bits='2248'>
<!-- char S::f[0] -->
<var-decl name='f' type-id='type-id-8' visibility='default' filepath='/home/ooprala/rh/u/libabigail/tests/data/test-read-dwarf/test7.cc' line='8' column='1'/>
</data-member>
</class-decl>
<!-- int[5] -->
<array-type-def dimensions='1' type-id='type-id-1' size-in-bits='160' id='type-id-3'>
<subrange length='5'/>
</array-type-def>
<!-- char -->
<type-decl name='char' size-in-bits='8' id='type-id-9'/>
<!-- char* -->
<pointer-type-def type-id='type-id-9' size-in-bits='64' id='type-id-10'/>
<!-- char*[7] -->
<array-type-def dimensions='1' type-id='type-id-10' size-in-bits='448' id='type-id-4'>
<subrange length='7'/>
</array-type-def>
<!-- double -->
<type-decl name='double' size-in-bits='64' id='type-id-11'/>
<!-- double[5][3] -->
<array-type-def dimensions='2' type-id='type-id-11' size-in-bits='512' id='type-id-5'>
<subrange length='5'/>
<subrange length='3'/>
</array-type-def>
<!-- int* -->
<pointer-type-def type-id='type-id-1' size-in-bits='64' id='type-id-12'/>
<!-- int*[4] -->
<array-type-def dimensions='1' type-id='type-id-12' size-in-bits='256' id='type-id-13'>
<subrange length='4'/>
</array-type-def>
<!-- int*[4]* -->
<pointer-type-def type-id='type-id-13' size-in-bits='64' id='type-id-14'/>
<!-- int*[4]*[10] -->
<array-type-def dimensions='1' type-id='type-id-14' size-in-bits='640' id='type-id-6'>
<subrange length='10'/>
</array-type-def>
<!-- char[1] -->
<array-type-def dimensions='1' type-id='type-id-9' size-in-bits='8' id='type-id-7'>
<subrange length='1'/>
</array-type-def>
<!-- char[0] -->
<array-type-def dimensions='1' type-id='type-id-9' size-in-bits='infinite' id='type-id-8'>
<subrange length='infinite'/>
</array-type-def>
<!-- S& -->
<reference-type-def kind='lvalue' type-id='type-id-2' size-in-bits='64' id='type-id-15'/>
<!-- S& -->
<qualified-type-def type-id='type-id-15' id='type-id-16'/>
<!-- int foo(S&) -->
<function-decl name='foo' mangled-name='_Z3fooR1S' filepath='/home/ooprala/rh/u/libabigail/tests/data/test-read-dwarf/test7.cc' line='11' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Z3fooR1S'>
<!-- parameter of type 'S&' -->
<parameter type-id='type-id-16'/>
<!-- int -->
<return type-id='type-id-1'/>
</function-decl>
</abi-instr>
</abi-corpus>