libabigail/tests/data/test-read-dwarf/test2.so
Dodji Seketeli c469546e45 Initial support for DW_TAG_partial_unit
* src/abg-dwarf-reader.cc (read_context::cur_tu_die_): New member.
	(read_context::read_context): Initialize the new member.
	(read_context::cur_tu_die): New accessors.
	(find_last_import_unit_point_before_die): New static function.
	(get_parent_die): Take a logical current die offset parameter.  If
	the die we want the parent for is a partial unit, then find the
	last DW_TAG_imported_unit that imports that partial unit before
	the logical current die and return the parent of that
	DW_TAG_imported_unit die.
	(get_scope_for_die): Take a logical current die offset parameter.
	Adjust.
	(build_translation_unit_and_add_to_ir): Set/unset the current
	translation unit DIE in the context.  Adjust.
	(build_namespace_decl_and_add_to_ir)
	(build_class_type_and_add_to_ir, build_qualified_type)
	(build_pointer_type_def, build_reference_type, build_typedef_type)
	(build_var_decl, build_function_decl, build_ir_node_from_die):
	Take a logical current die offset parameter.  Adjust.
	(build_corpus): Accept that we can have DIE that are not
	DW_TAG_compile_unit at the top level, because, well, we can now
	have DW_TAG_partial_unit too.
	* tests/data/test-read-dwarf/test2-{0,1}.cc: New test source
	files.
	* tests/data/test-read-dwarf/test2.h: Likewise.
	* tests/data/test-read-dwarf/test2.so: New input binary to read.
	* tests/data/test-read-dwarf/test2.so.abi: New reference test to
	compare against.
	* tests/test-read-dwarf.cc: Adjust to launch the new test.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2014-05-19 17:26:40 +02:00

10 KiB
Executable File