brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.3 KiB · ddd0b7f Raw
29 lines · c
1/// Check that LLDB uses the paths in target.debug-file-search-paths to find2/// split DWARF files with a relative DW_AT_comp_dir set, when the program file3/// has been moved and/or we're executing it from another directory.4// UNSUPPORTED: system-darwin5// RUN: rm -rf %t.compdir/ %t.e/6// RUN: mkdir -p %t.compdir/a/b/c/d/7// RUN: cp %s %t.compdir/a/b/c/d/main.c8// RUN: cd %t.compdir/a/b/9/// The produced DWO is named c/d/main-main.dwo, with a DW_AT_comp_dir of a/b.10// RUN: %clang_host -g -gsplit-dwarf -fdebug-prefix-map=%t.compdir=. c/d/main.c -o c/d/main11// RUN: cd ../../..12/// Move only the program, leaving the DWO file in place.13// RUN: mv %t.compdir/a/b/c/d/main %t.compdir/a/14/// Debug it from yet another path.15// RUN: mkdir -p %t.e/16// RUN: cd %t.e17/// LLDB won't find the DWO next to the binary or in the current dir, so it18/// should find the DWO file by doing %t.compdir/ + a/b/ + c/d/main-main.dwo.19// RUN: %lldb --no-lldbinit %t.compdir/a/main \20// RUN:   -O "settings append target.debug-file-search-paths %t.compdir" \21// RUN:   -o "b main" -o "run" -o "p num" --batch 2>&1 | FileCheck %s22 23// CHECK-NOT: warning: {{.*}}main unable to locate separate debug file (dwo, dwp). Debugging will be degraded.24// CHECK: (int) 525 26int num = 5;27 28int main(void) { return 0; }29