1# RUN: rm -rf %t.dir 2# RUN: mkdir %t.dir 3# RUN: cd %t.dir 4# RUN: yaml2obj %p/Inputs/single-file-split-dwarf.yaml -o %t.dir/test 5# RUN: yaml2obj %p/Inputs/single-file-split-dwarf.o.yaml -o %t.dir/test.o 6# RUN: lldb-test breakpoints %t.dir/test %s | FileCheck %s 7 8# This test checks that source code location is shown correctly 9# when single split file debug information is used (when .dwo sections are in .o files). 10# 11# single-file-split-dwarf.yaml and single-file-split-dwarf.o.yaml are 12# reduced yaml files produces from the object file and the corresponding executable. 13# 14# The following code was used initially: 15# int main() { 16# return 0; 17# } 18# 19# void foo() { 20# } 21# 22# Invocation used to produce .o file was: 23# clang test.cpp -gdwarf-5 -gsplit-dwarf=single -c -o test.o -v 24# 25# The full invocation used to produce the executable was: 26# "/usr/local/bin/ld" -z relro --hash-style=gnu --eh-frame-hdr -m elf_x86_64 -dynamic-linker 27# /lib64/ld-linux-x86-64.so.2 -o test /usr/lib/gcc/x86_64-linux-gnu/7.3.0/../../../x86_64-linux-gnu/crt1.o 28# /usr/lib/gcc/x86_64-linux-gnu/7.3.0/../../../x86_64-linux-gnu/crti.o /usr/lib/gcc/x86_64-linux-gnu/7.3.0/crtbegin.o 29# -L/usr/lib/gcc/x86_64-linux-gnu/7.3.0 -L/usr/lib/gcc/x86_64-linux-gnu/7.3.0/../../../x86_64-linux-gnu 30# -L/lib/x86_64-linux-gnu -L/lib/../lib64 -L/usr/lib/x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/7.3.0/../../.. 31# -L/home/umb/LLVM/build/bin/../lib -L/lib -L/usr/lib test.o -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc 32# --as-needed -lgcc_s --no-as-needed /usr/lib/gcc/x86_64-linux-gnu/7.3.0/crtend.o 33# /usr/lib/gcc/x86_64-linux-gnu/7.3.0/../../../x86_64-linux-gnu/crtn.o 34# 35# Also, the DW_AT_comp_dir string value set to empty in yaml produced. 36# Build bots had different path there and failed to find object. 37 38b main 39# CHECK-LABEL: b main 40# CHECK: Address: {{.*}}main + 13 at test.cpp:2:3 41 42b foo 43# CHECK-LABEL: b foo 44# CHECK: Address: {{.*}}foo() + 4 at test.cpp:6:1 45