================
@@ -0,0 +1,19 @@
+/// 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: %clang_host -g -gsplit-dwarf -gpubnames -gdwarf-5 %s -o main
----------------
dmpots wrote:

Thanks the test looks much easier to understand now.

I think there is a problem with where it is writing the files though. The lit 
tests to not automatically get a unique build directory for the test outputs, 
but uses a shared directory for all the tests in that directory. That means 
writing and deleting files can interfere with other tests in the directory.

We can use the [%t](https://llvm.org/docs/CommandGuide/lit.html#substitutions) 
to create unique a temporary directory for the test.

```
// RUN: mkdir -p %t.dir
// RUN: %clang_host -g -gsplit-dwarf -gpubnames -gdwarf-5 %s -o %t.dir/main
// RUN: rm %t.dir/*.dwo
// RUN: %lldb --no-lldbinit %t.dir/main \
// RUN:   -o "b main" --batch 2>&1 | FileCheck %s
```

https://github.com/llvm/llvm-project/pull/157574
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to