27 lines · c
1/// Check that when LLDB is looking for a relative DWO it uses the debug search2/// paths setting. If it doesn't find it by adding the whole relative path to3/// of DWO it should try adding just the filename (e.g. main.dwo) to each debug4/// search path.5// UNSUPPORTED: system-darwin6// RUN: rm -rf %t.compdir/7// RUN: mkdir -p %t.compdir/a/b/8// RUN: cp %s %t.compdir/a/b/main.c9// RUN: cd %t.compdir/a/10/// The produced DWO is named /b/main-main.dwo, with a DW_AT_comp_dir of a/.11// RUN: %clang_host -g -gsplit-dwarf -fdebug-prefix-map=%t.compdir=. b/main.c -o b/main12// RUN: cd ../..13/// Move the DWO file away from the expected location.14// RUN: mv %t.compdir/a/b/*.dwo %t.compdir/15/// LLDB won't find the DWO next to the binary or by adding the relative path16/// to any of the search paths. So it should find the DWO file at17/// %t.compdir/main-main.dwo.18// RUN: %lldb --no-lldbinit %t.compdir/a/b/main \19// RUN: -O "settings append target.debug-file-search-paths %t.compdir" \20// RUN: -o "b main" -o "run" -o "p num" --batch 2>&1 | FileCheck %s21 22// CHECK-NOT: warning: {{.*}}main unable to locate separate debug file (dwo, dwp). Debugging will be degraded.23// CHECK: (int) 524 25int num = 5;26 27int main(void) { return 0; }