mirror of
git://sourceware.org/git/libabigail.git
synced 2024-12-30 13:52:05 +00:00
c469546e45
* 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>
20 lines
317 B
C++
20 lines
317 B
C++
///
|
|
/// build with g++ -fPIC -g -Wall -shared -o test2.so test2-0.cc test2-1.cc
|
|
/// and then pass the resulting test2.so to dwz by doing:
|
|
/// dwz test2.so
|
|
///
|
|
#include "test2.h"
|
|
|
|
second_type::second_type()
|
|
: member0(0),
|
|
member1(0)
|
|
{}
|
|
|
|
namespace a
|
|
{
|
|
second_type*
|
|
build_second_type()
|
|
{return new second_type;}
|
|
|
|
}
|