1/// Check that LLDB uses the paths in target.debug-file-search-paths to find
2/// split DWARF files with DW_AT_comp_dir set to some absolute path, when
3/// the program file and DWO have been moved and/or we're executing from
4/// another directory. Specifically when the DWO has been moved to another
5/// directory but is still at it's name. Here, %t.compdir/c/d/main-main.dwo.
6// UNSUPPORTED: system-darwin
7// RUN: rm -rf %t.compdir/ %t.e/
8// RUN: mkdir -p %t.compdir/a/b/c/d/
9// RUN: cp %s %t.compdir/a/b/c/d/main.c
10// RUN: cd %t.compdir/a/b/
11/// The produced DWO is named c/d/main-main.dwo, with a non-relative
12/// DW_AT_comp_dir of <pathtobuild>/a/b
13// RUN: %clang_host -g -gsplit-dwarf c/d/main.c -o c/d/main
14// RUN: cd ../../..
15/// Move the program.
16// RUN: mv %t.compdir/a/b/c/d/main %t.compdir/a/
17/// Move the DWO but keep it at the path in in its name.
18// RUN: mkdir -p %t.compdir/c/d/
19// RUN: mv %t.compdir/a/b/c/d/*.dwo %t.compdir/c/d/
20/// Debug it from yet another path.
21// RUN: mkdir -p %t.e/
22// RUN: cd %t.e
23/// LLDB should find in %t.compdir.
24// RUN: %lldb --no-lldbinit %t.compdir/a/main \
25// RUN: -O "settings append target.debug-file-search-paths %t.compdir" \
26// RUN: -o "b main" -o "run" -o "p num" --batch 2>&1 | FileCheck %s
27
28// CHECK-NOT: warning: {{.*}}main unable to locate separate debug file (dwo, dwp). Debugging will be degraded.
29// CHECK: (int) 5
30
31int num = 5;
32
33int main(void) { return 0; }

source code of lldb/test/Shell/SymbolFile/DWARF/dwo-debug-file-search-paths-dwoname-absolute-compdir.c