• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1RUN: echo "%p/Inputs/dwarfdump-test.elf-x86-64 0x400559" > %t.input
2RUN: echo "%p/Inputs/dwarfdump-test.elf-x86-64.debuglink 0x400559" >> %t.input
3RUN: echo "%p/Inputs/dwarfdump-test.elf-x86-64 0x400436" >> %t.input
4RUN: echo "%p/Inputs/dwarfdump-test.elf-x86-64 0x400528" >> %t.input
5RUN: echo "%p/Inputs/dwarfdump-test.elf-x86-64 0x400586" >> %t.input
6RUN: echo "%p/Inputs/dwarfdump-test2.elf-x86-64 0x4004e8" >> %t.input
7RUN: echo "%p/Inputs/dwarfdump-test2.elf-x86-64 0x4004f4" >> %t.input
8RUN: echo "%p/Inputs/dwarfdump-test4.elf-x86-64 0x62c" >> %t.input
9RUN: echo "%p/Inputs/dwarfdump-inl-test.elf-x86-64 0x8dc" >> %t.input
10RUN: echo "%p/Inputs/dwarfdump-inl-test.elf-x86-64 0xa05" >> %t.input
11RUN: echo "%p/Inputs/dwarfdump-inl-test.elf-x86-64 0x987" >> %t.input
12RUN: echo "%p/Inputs/dwarfdump-inl-test.high_pc.elf-x86-64 0x568" >> %t.input
13RUN: echo "\"%p/Inputs/dwarfdump-test3.elf-x86-64 space\" 0x640" >> %t.input
14RUN: echo "\"%p/Inputs/dwarfdump-test3.elf-x86-64 space\" 0x633" >> %t.input
15RUN: echo "\"%p/Inputs/dwarfdump-test3.elf-x86-64 space\" 0x62d" >> %t.input
16RUN: echo "%p/Inputs/macho-universal 0x1f84" >> %t.input
17RUN: echo "%p/Inputs/macho-universal:i386 0x1f67" >> %t.input
18RUN: echo "%p/Inputs/macho-universal:x86_64 0x100000f05" >> %t.input
19RUN: echo "%p/Inputs/llvm-symbolizer-dwo-test 0x400514" >> %t.input
20RUN: echo "%p/Inputs/fission-ranges.elf-x86_64 0x720" >> %t.input
21RUN: echo "%p/Inputs/arange-overlap.elf-x86_64 0x714" >> %t.input
22RUN: cp %p/Inputs/split-dwarf-test.dwo %T
23RUN: echo "%p/Inputs/split-dwarf-test 0x4005d4" >> %t.input
24RUN: echo "%p/Inputs/split-dwarf-test 0x4005c4" >> %t.input
25RUN: echo "%p/Inputs/cross-cu-inlining.x86_64-macho.o 0x17" >> %t.input
26
27RUN: llvm-symbolizer --functions=linkage --inlining --demangle=false \
28RUN:    --default-arch=i386 < %t.input | FileCheck --check-prefix=CHECK --check-prefix=SPLIT --check-prefix=DWO %s
29
30Ensure we get the same results in the absence of gmlt-like data in the executable but the presence of a .dwo file
31
32RUN: echo "%p/Inputs/split-dwarf-test-nogmlt 0x4005d4" >> %t.input
33RUN: echo "%p/Inputs/split-dwarf-test-nogmlt 0x4005c4" >> %t.input
34RUN: llvm-symbolizer --functions=linkage --inlining --demangle=false \
35RUN:    --default-arch=i386 < %t.input | FileCheck --check-prefix=SPLIT --check-prefix=DWO %s
36
37Ensure we get gmlt like results in the absence of a .dwo file but the presence of gmlt-like data in the executable
38
39RUN: rm %T/split-dwarf-test.dwo
40RUN: echo "%p/Inputs/split-dwarf-test 0x4005d4" >> %t.input
41RUN: echo "%p/Inputs/split-dwarf-test 0x4005c4" >> %t.input
42RUN: llvm-symbolizer --functions=linkage --inlining --demangle=false \
43RUN:    --default-arch=i386 < %t.input | FileCheck --check-prefix=SPLIT --check-prefix=NODWO %s
44
45CHECK:       main
46CHECK-NEXT: /tmp/dbginfo{{[/\\]}}dwarfdump-test.cc:16
47
48CHECK:       main
49CHECK-NEXT: /tmp/dbginfo{{[/\\]}}dwarfdump-test.cc:16
50
51CHECK:      _start
52
53CHECK: _Z1fii
54CHECK-NEXT: /tmp/dbginfo{{[/\\]}}dwarfdump-test.cc:11
55
56CHECK: DummyClass
57CHECK-NEXT: /tmp/dbginfo{{[/\\]}}dwarfdump-test.cc:4
58
59CHECK: a
60CHECK-NEXT: /tmp/dbginfo{{[/\\]}}dwarfdump-test2-helper.cc:2
61
62CHECK: main
63CHECK-NEXT: /tmp/dbginfo{{[/\\]}}dwarfdump-test2-main.cc:4
64
65CHECK:      _Z1cv
66CHECK-NEXT: /tmp/dbginfo{{[/\\]}}dwarfdump-test4-part1.cc:2
67
68CHECK:      inlined_h
69CHECK-NEXT: dwarfdump-inl-test.h:2
70CHECK-NEXT: inlined_g
71CHECK-NEXT: dwarfdump-inl-test.h:7
72CHECK-NEXT: inlined_f
73CHECK-NEXT: dwarfdump-inl-test.cc:3
74CHECK-NEXT: main
75CHECK-NEXT: dwarfdump-inl-test.cc:8
76
77CHECK:      inlined_g
78CHECK-NEXT: dwarfdump-inl-test.h:7
79CHECK-NEXT: inlined_f
80CHECK-NEXT: dwarfdump-inl-test.cc:3
81CHECK-NEXT: main
82CHECK-NEXT: dwarfdump-inl-test.cc:8
83
84CHECK:      inlined_f
85CHECK-NEXT: dwarfdump-inl-test.cc:3
86CHECK-NEXT: main
87CHECK-NEXT: dwarfdump-inl-test.cc:8
88
89CHECK:      inlined_h
90CHECK-NEXT: dwarfdump-inl-test.h:3
91CHECK-NEXT: inlined_g
92CHECK-NEXT: dwarfdump-inl-test.h:7
93CHECK-NEXT: inlined_f
94CHECK-NEXT: dwarfdump-inl-test.cc:3
95CHECK-NEXT: main
96CHECK-NEXT: dwarfdump-inl-test.cc:8
97
98CHECK: C
99CHECK-NEXT: /tmp/dbginfo{{[/\\]}}dwarfdump-test3.cc:3
100
101CHECK: _Z3do1v
102CHECK-NEXT: /tmp/include{{[/\\]}}dwarfdump-test3-decl.h:7
103
104CHECK: _Z3do2v
105CHECK-NEXT: /tmp/dbginfo{{[/\\]}}include{{[/\\]}}dwarfdump-test3-decl2.h:1
106
107CHECK:      main
108CHECK:      _Z3inci
109CHECK:      _Z3inci
110
111CHECK: main
112CHECK-NEXT: llvm-symbolizer-dwo-test.cc:11
113
114CHECK: main
115CHECK-NEXT: {{.*}}fission-ranges.cc:6
116
117CHECK: _ZN1S3bazEv
118CHECK-NEXT: {{.*}}arange-overlap.cc:6
119
120DWO: _Z2f2v
121NODWO: {{^f2$}}
122SPLIT-NEXT: {{.*}}split-dwarf-test.cc
123SPLIT-NEXT: main
124SPLIT-NEXT: {{.*}}split-dwarf-test.cc
125
126SPLIT: _Z2f1v
127SPLIT-NEXT: {{.*}}split-dwarf-test.cc
128
129; func has been inlined into main by LTO. Check that the symbolizer is able
130; to resolve the cross-cu reference and retrieve func's name
131CHECK: func
132CHECK-NEXT: /tmp{{[/\\]}}cross-cu-inlining.c:16:3
133CHECK-NEXT: main
134CHECK-NEXT: /tmp{{[/\\]}}cross-cu-inlining.c:11:0
135
136RUN: echo "unexisting-file 0x1234" > %t.input2
137RUN: llvm-symbolizer < %t.input2 2>&1 | FileCheck %s --check-prefix=MISSING-FILE
138
139MISSING-FILE: LLVMSymbolizer: error reading file: {{[Nn]}}o such file or directory
140
141RUN: echo "%p/Inputs/macho-universal 0x1f84" > %t.input3
142RUN: llvm-symbolizer < %t.input3 | FileCheck %s --check-prefix=UNKNOWN-ARCH
143
144UNKNOWN-ARCH-NOT: main
145UNKNOWN-ARCH: ??
146UNKNOWN-ARCH-NOT: main
147
148RUN: echo "0x400559" > %t.input4
149RUN: echo "0x400436" >> %t.input4
150RUN: llvm-symbolizer --obj %p/Inputs/dwarfdump-test.elf-x86-64 < %t.input4 \
151RUN:   | FileCheck %s --check-prefix=BINARY
152
153BINARY:       main
154BINARY-NEXT: /tmp/dbginfo{{[/\\]}}dwarfdump-test.cc:16
155BINARY:      _start
156
157RUN: echo "0x400720" > %t.input5
158RUN: echo "0x4004a0" >> %t.input5
159RUN: echo "0x4006f0" >> %t.input5
160RUN: llvm-symbolizer --obj %p/Inputs/llvm-symbolizer-test.elf-x86-64 < %t.input5 \
161RUN:   | FileCheck %s --check-prefix=BINARY_C
162
163BINARY_C:       main
164BINARY_C-NEXT: /tmp/dbginfo{{[/\\]}}llvm-symbolizer-test.c:10
165BINARY_C:      _start
166BINARY_C:      {{g$}}
167
168RUN: echo "0x1f1" > %t.input6
169RUN: llvm-symbolizer --obj %p/Inputs/shared-object-stripped.elf-i386 < %t.input6 \
170RUN:   | FileCheck %s --check-prefix=STRIPPED
171
172STRIPPED:  global_func
173
174RUN: echo "%p/Inputs/dwarfdump-test4.elf-x86-64 0x62c" > %t.input7
175RUN: llvm-symbolizer --functions=short --demangle=false < %t.input7 \
176RUN:    | FileCheck %s --check-prefix=SHORT_FUNCTION_NAME
177
178SHORT_FUNCTION_NAME-NOT: _Z1cv
179