[Lldb-commits] [lldb] Fix GetDIE is outside of its CU error from .debug_names (PR #157574)
David Peixotto via lldb-commits
lldb-commits at lists.llvm.org
Tue Sep 9 13:07:36 PDT 2025
================
@@ -0,0 +1,29 @@
+/// Check that LLDB does not emit "GetDIE for DIE {{0x[0-9a-f]+}} is outside of its CU"
+/// error message when user is searching for a matching symbol from .debug_names
+/// and fail to locate the corresponding .dwo file.
+
+/// -gsplit-dwarf is supported only on Linux.
+// REQUIRES: system-linux
+
+// RUN: echo "Temp directory: %t.compdir"
+// RUN: rm -rf %t.compdir/
+// RUN: mkdir -p %t.compdir/a/b/
+// RUN: cp %s %t.compdir/a/b/main.c
+// RUN: cd %t.compdir/a/
+/// The produced DWO is named /b/main-main.dwo, with dwarf5 .debug_names
+// RUN: %clang_host -g -gsplit-dwarf -gpubnames -gdwarf-5 -fdebug-prefix-map=%t.compdir=. b/main.c -o b/main
+// RUN: cd ../..
+/// Move the DWO file away from the expected location.
+// RUN: mv %t.compdir/a/b/*.dwo %t.compdir/
+/// LLDB won't find the DWO next to the binary or by adding the relative path
+/// to any of the search paths. So it should find the DWO file at
+/// %t.compdir/main-main.dwo.
+// RUN: %lldb --no-lldbinit %t.compdir/a/b/main \
+// RUN: -o "b main" --batch 2>&1 | FileCheck %s
+
+// CHECK: warning: {{.*}}main unable to locate separate debug file (dwo, dwp). Debugging will be degraded.
----------------
dmpots wrote:
We check for a warning that it can't locate the dwo, but the comment above implies that it will find it
```
/// LLDB won't find the DWO next to the binary or by adding the relative path
/// to any of the search paths. So it should find the DWO file at
/// %t.compdir/main-main.dwo.
```
Can you help me understand if we expect it to actually find the dwo or not.
https://github.com/llvm/llvm-project/pull/157574
More information about the lldb-commits
mailing list