1// Test we load dwo information lazily.
2
3// -gsplit-dwarf is supported only on Linux.
4// REQUIRES: system-linux
5
6// RUN: %clang_host %s -fno-standalone-debug -g -std=c99 \
7// RUN: -gdwarf-5 -gpubnames -gsplit-dwarf -c -o %t1.o -DONE
8// RUN: %clang_host %s -fno-standalone-debug -g -std=c99 \
9// RUN: -gdwarf-5 -gpubnames -gsplit-dwarf -c -o %t2.o -DTWO
10// RUN: %clang_host %t1.o %t2.o -o %t -std=c99
11// RUN: %lldb %t -o "log enable 'lldb' object" -o "settings set stop-line-count-before 0" \
12// RUN: -o "b main" -o "run" -o "image lookup -n main -v" -b | FileCheck %s
13
14// CHECK-NOT: 2.dwo,
15// CHECK: (lldb) b main
16// CHECK-NOT: 2.dwo,
17// CHECK: 1.dwo,
18// CHECK-NOT: 2.dwo,
19// CHECK: (lldb) run
20// CHECK-NOT: 2.dwo,
21// CHECK: stop reason = breakpoint
22// CHECK-NOT: 2.dwo,
23// CHECK: (lldb) image lookup
24// CHECK-NOT: 2.dwo,
25// CHECK: CompileUnit: id =
26// CHECK-SAME: /dwarf5-lazy-dwo.c", language = "c99"
27// CHECK-NOT: 2.dwo,
28
29#ifdef ONE
30int main() { return 0; }
31#else
32int x;
33#endif
34

source code of lldb/test/Shell/SymbolFile/DWARF/dwarf5-lazy-dwo.c