File tree Expand file tree Collapse file tree 2 files changed +25
-2
lines changed
source/Plugins/SymbolFile/DWARF
test/Shell/SymbolFile/DWARF Expand file tree Collapse file tree 2 files changed +25
-2
lines changed Original file line number Diff line number Diff line change @@ -131,8 +131,12 @@ DebugNamesDWARFIndex::GetNonSkeletonUnit(const DebugNames::Entry &entry) const {
131131 unit_offset = entry.getLocalTUOffset ();
132132 if (unit_offset) {
133133 if (DWARFUnit *cu = m_debug_info.GetUnitAtOffset (DIERef::Section::DebugInfo,
134- *unit_offset))
135- return &cu->GetNonSkeletonUnit ();
134+ *unit_offset)) {
135+ DWARFUnit &ret = cu->GetNonSkeletonUnit ();
136+ if (ret.IsSkeletonUnit ())
137+ return nullptr ;
138+ return &ret;
139+ }
136140 }
137141 return nullptr ;
138142}
Original file line number Diff line number Diff line change 1+ /// Check that LLDB does not emit "GetDIE for DIE {{0x[0-9a-f]+}} is outside of its CU"
2+ /// error message when user is searching for a matching symbol from .debug_names
3+ /// and fail to locate the corresponding .dwo file.
4+
5+ /// -gsplit-dwarf is supported only on Linux.
6+ // REQUIRES: system-linux
7+
8+ // RUN: %clang_host -g -gsplit-dwarf -gpubnames -gdwarf-5 %s -o main
9+ /// Remove the DWO file away from the expected location so that LLDB won't find the DWO next to the binary.
10+ // RUN: rm *.dwo
11+ // RUN: %lldb --no-lldbinit main \
12+ // RUN: -o "b main" --batch 2>&1 | FileCheck %s
13+
14+ // CHECK: warning: {{.*}}main unable to locate separate debug file (dwo, dwp). Debugging will be degraded.
15+ // CHECK-NOT: main GetDIE for DIE {{0x[0-9a-f]+}} is outside of its CU {{0x[0-9a-f]+}}
16+
17+ int num = 5 ;
18+
19+ int main (void ) { return 0 ; }
You can’t perform that action at this time.
0 commit comments