1 RUN: echo "%p/Inputs/dwarfdump-test.elf-x86-64 0x400559" > %t.input
2 RUN: echo "%p/Inputs/dwarfdump-test.elf-x86-64.debuglink 0x400559" >> %t.input
3 RUN: echo "%p/Inputs/dwarfdump-test.elf-x86-64 0x400436" >> %t.input
4 RUN: echo "%p/Inputs/dwarfdump-test.elf-x86-64 0x400528" >> %t.input
5 RUN: echo "%p/Inputs/dwarfdump-test.elf-x86-64 0x400586" >> %t.input
6 RUN: echo "%p/Inputs/dwarfdump-test2.elf-x86-64 0x4004e8" >> %t.input
7 RUN: echo "%p/Inputs/dwarfdump-test2.elf-x86-64 0x4004f4" >> %t.input
8 RUN: echo "%p/Inputs/dwarfdump-test4.elf-x86-64 0x62c" >> %t.input
9 RUN: echo "%p/Inputs/dwarfdump-inl-test.elf-x86-64 0x710" >> %t.input
10 RUN: echo "%p/Inputs/dwarfdump-inl-test.elf-x86-64 0x7d1" >> %t.input
11 RUN: echo "%p/Inputs/dwarfdump-inl-test.elf-x86-64 0x785" >> %t.input
12 RUN: echo "%p/Inputs/dwarfdump-inl-test.high_pc.elf-x86-64 0x568" >> %t.input
13 RUN: echo "\"%p/Inputs/dwarfdump-test3.elf-x86-64 space\" 0x640" >> %t.input
14 RUN: echo "\"%p/Inputs/dwarfdump-test3.elf-x86-64 space\" 0x633" >> %t.input
15 RUN: echo "\"%p/Inputs/dwarfdump-test3.elf-x86-64 space\" 0x62d" >> %t.input
16 RUN: echo "%p/Inputs/macho-universal 0x1f84" >> %t.input
17 RUN: echo "%p/Inputs/macho-universal:i386 0x1f67" >> %t.input
18 RUN: echo "%p/Inputs/macho-universal:x86_64 0x100000f05" >> %t.input
19 RUN: echo "%p/Inputs/llvm-symbolizer-dwo-test 0x400514" >> %t.input
20 RUN: echo "%p/Inputs/fission-ranges.elf-x86_64 0x720" >> %t.input
21 RUN: echo "%p/Inputs/arange-overlap.elf-x86_64 0x714" >> %t.input
22 RUN: cp %p/Inputs/split-dwarf-test.dwo %T
23 RUN: echo "%p/Inputs/split-dwarf-test 0x4004d0" >> %t.input
24 RUN: echo "%p/Inputs/split-dwarf-test 0x4004c0" >> %t.input
26 RUN: llvm-symbolizer --functions=linkage --inlining --demangle=false \
27 RUN: --default-arch=i386 < %t.input | FileCheck %s
32 CHECK-NEXT: /tmp/dbginfo{{[/\\]}}dwarfdump-test.cc:16
35 CHECK-NEXT: /tmp/dbginfo{{[/\\]}}dwarfdump-test.cc:16
40 CHECK-NEXT: /tmp/dbginfo{{[/\\]}}dwarfdump-test.cc:11
43 CHECK-NEXT: /tmp/dbginfo{{[/\\]}}dwarfdump-test.cc:4
46 CHECK-NEXT: /tmp/dbginfo{{[/\\]}}dwarfdump-test2-helper.cc:2
49 CHECK-NEXT: /tmp/dbginfo{{[/\\]}}dwarfdump-test2-main.cc:4
52 CHECK-NEXT: /tmp/dbginfo{{[/\\]}}dwarfdump-test4-part1.cc:2
55 CHECK-NEXT: dwarfdump-inl-test.h:2
57 CHECK-NEXT: dwarfdump-inl-test.h:7
59 CHECK-NEXT: dwarfdump-inl-test.cc:3
61 CHECK-NEXT: dwarfdump-inl-test.cc:8
64 CHECK-NEXT: dwarfdump-inl-test.h:7
66 CHECK-NEXT: dwarfdump-inl-test.cc:3
68 CHECK-NEXT: dwarfdump-inl-test.cc:8
71 CHECK-NEXT: dwarfdump-inl-test.cc:3
73 CHECK-NEXT: dwarfdump-inl-test.cc:8
76 CHECK-NEXT: dwarfdump-inl-test.h:3
78 CHECK-NEXT: dwarfdump-inl-test.h:7
80 CHECK-NEXT: dwarfdump-inl-test.cc:3
82 CHECK-NEXT: dwarfdump-inl-test.cc:8
85 CHECK-NEXT: /tmp/dbginfo{{[/\\]}}dwarfdump-test3.cc:3
88 CHECK-NEXT: /tmp/include{{[/\\]}}dwarfdump-test3-decl.h:7
91 CHECK-NEXT: /tmp/dbginfo{{[/\\]}}include{{[/\\]}}dwarfdump-test3-decl2.h:1
98 CHECK-NEXT: llvm-symbolizer-dwo-test.cc:11
101 CHECK-NEXT: {{.*}}fission-ranges.cc:6
104 CHECK-NEXT: {{.*}}arange-overlap.cc:6
107 CHECK-NEXT: {{.*}}split-dwarf-test.cc
109 CHECK-NEXT: {{.*}}split-dwarf-test.cc
112 CHECK-NEXT: {{.*}}split-dwarf-test.cc
114 RUN: echo "unexisting-file 0x1234" > %t.input2
115 RUN: llvm-symbolizer < %t.input2
117 RUN: echo "%p/Inputs/macho-universal 0x1f84" > %t.input3
118 RUN: llvm-symbolizer < %t.input3 | FileCheck %s --check-prefix=UNKNOWN-ARCH
120 UNKNOWN-ARCH-NOT: main
122 UNKNOWN-ARCH-NOT: main
124 RUN: echo "0x400559" > %t.input4
125 RUN: echo "0x400436" >> %t.input4
126 RUN: llvm-symbolizer --obj %p/Inputs/dwarfdump-test.elf-x86-64 < %t.input4 \
127 RUN: | FileCheck %s --check-prefix=BINARY
130 BINARY-NEXT: /tmp/dbginfo{{[/\\]}}dwarfdump-test.cc:16
133 RUN: echo "0x400720" > %t.input5
134 RUN: echo "0x4004a0" >> %t.input5
135 RUN: echo "0x4006f0" >> %t.input5
136 RUN: llvm-symbolizer --obj %p/Inputs/llvm-symbolizer-test.elf-x86-64 < %t.input5 \
137 RUN: | FileCheck %s --check-prefix=BINARY_C
140 BINARY_C-NEXT: /tmp/dbginfo{{[/\\]}}llvm-symbolizer-test.c:10
144 RUN: echo "0x1f1" > %t.input6
145 RUN: llvm-symbolizer --obj %p/Inputs/shared-object-stripped.elf-i386 < %t.input6 \
146 RUN: | FileCheck %s --check-prefix=STRIPPED
148 STRIPPED: global_func
150 RUN: echo "%p/Inputs/dwarfdump-test4.elf-x86-64 0x62c" > %t.input7
151 RUN: llvm-symbolizer --functions=short --use-symbol-table=false --demangle=false < %t.input7 \
152 RUN: | FileCheck %s --check-prefix=SHORT_FUNCTION_NAME
154 SHORT_FUNCTION_NAME-NOT: _Z1cv