DWARFDebugInfo only knows how to resolve references in its own file, but in split dwarf, the index entries will refer to DIEs in the separate (DWO) file. To resolve the DIERef correctly we'd either need to go through the SymbolFileDWARF to get the full logic for resolving a DIERef, or use the fact that ToDIERef already looks up the correct unit while computing its result. This patch does the latter. This bug manifested itself in not being able to find type definitions for types in namespaces, so I've modified one of our type resolving test cases to run with debug_names, and added a namespaced class into it (it originally contained only a top-level class).
11 lines
136 B
C++
11 lines
136 B
C++
#include "derived.h"
|
|
|
|
Foo::Foo() { a = 12345; }
|
|
ns::Foo2::Foo2() { a = 23456; }
|
|
|
|
Foo foo1;
|
|
Foo foo2;
|
|
|
|
ns::Foo2 foo2_1;
|
|
ns::Foo2 foo2_2;
|