xref: /llvm-project/llvm/test/tools/llvm-symbolizer/split-dwarf.test (revision 593e19629744d6c8ba45fe4bb78910cf653cd6a7)
1RUN: rm -rf %t
2RUN: mkdir -p %t
3
4RUN: cp %p/Inputs/split-dwarf-test.dwo %t
5
6RUN: cd %t
7RUN: llvm-symbolizer --functions=linkage --inlining --no-demangle \
8RUN:    --obj=%p/Inputs/split-dwarf-test 0x400504 0x4004f4 | FileCheck --check-prefixes=SPLIT,DWO %s
9
10Ensure we get the same results in the absence of gmlt-like data in the executable but the presence of a .dwo file
11
12RUN: echo "%p/Inputs/split-dwarf-test-nogmlt 0x400504" >> %t.input
13RUN: echo "%p/Inputs/split-dwarf-test-nogmlt 0x4004f4" >> %t.input
14RUN: llvm-symbolizer --functions=linkage --inlining --no-demangle \
15RUN:    --default-arch=i386 --obj=%p/Inputs/split-dwarf-test-nogmlt 0x400504 0x4004f4 | FileCheck --check-prefixes=SPLIT,DWO %s
16
17Ensure we get gmlt like results in the absence of a .dwo file but the presence of gmlt-like data in the executable
18
19RUN: rm %t/split-dwarf-test.dwo
20RUN: echo "%p/Inputs/split-dwarf-test 0x400504" >> %t.input
21RUN: echo "%p/Inputs/split-dwarf-test 0x4004f4" >> %t.input
22RUN: llvm-symbolizer --functions=linkage --inlining --no-demangle \
23RUN:    --default-arch=i386 --obj=%p/Inputs/split-dwarf-test 0x400504 0x4004f4 | FileCheck --check-prefixes=SPLIT,NODWO %s
24
25DWO: _Z2f2v
26NODWO: {{^f2$}}
27SPLIT-NEXT: {{.*}}split-dwarf-test.cpp
28SPLIT-NEXT: main
29SPLIT-NEXT: {{.*}}split-dwarf-test.cpp
30
31SPLIT: _Z2f1v
32SPLIT-NEXT: {{.*}}split-dwarf-test.cpp
33