brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.3 KiB · 70b1499 Raw
32 lines · c
1/// Check that LLDB uses the paths in target.debug-file-search-paths to find2/// split DWARF files with DW_AT_comp_dir set to some non-relative path, when3/// the program file and DWO have been moved and/or we're executing from another4/// directory. Specifically when the DWO is not at it's "name", here we move5/// it to %t.compdir/main-main.dwo and it's name is c/d/main-main.dwo.6// UNSUPPORTED: system-darwin7// 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.c10// RUN: cd %t.compdir/a/b/11/// The produced DWO is named c/d/main-main.dwo, with a non-relative12/// DW_AT_comp_dir of <pathtobuild>/a/b13// RUN: %clang_host -g -gsplit-dwarf c/d/main.c -o c/d/main14// RUN: cd ../../..15/// Move the program.16// RUN: mv %t.compdir/a/b/c/d/main %t.compdir/a/17/// Move the DWO.18// RUN: mv %t.compdir/a/b/c/d/*.dwo %t.compdir19/// Debug it from yet another path.20// RUN: mkdir -p %t.e/21// RUN: cd %t.e22/// LLDB should find in %t.compdir.23// RUN: %lldb --no-lldbinit %t.compdir/a/main \24// RUN:   -O "settings append target.debug-file-search-paths %t.compdir" \25// RUN:   -o "b main" -o "run" -o "p num" --batch 2>&1 | FileCheck %s26 27// CHECK-NOT: warning: {{.*}}main unable to locate separate debug file (dwo, dwp). Debugging will be degraded.28// CHECK: (int) 529 30int num = 5;31 32int main(void) { return 0; }