sym-verbose.test
3.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
#static volatile int do_mul;
#static volatile int x, v;
#
#int foo () {
# if (do_mul) x *= v; else x /= v;
# return x;
#}
#
#int main() {
# return foo() + foo();
#}
#Build as : clang -gmlt -fdebug-info-for-profiling -O2 discrim.c -o discrim
RUN: llvm-symbolizer -verbose -print-address -obj=%p/Inputs/discrim < %p/Inputs/discrim.inp | FileCheck %s
#CHECK: some text
#CHECK: 0x400590
#CHECK-NEXT: foo
#CHECK-NEXT: Filename: /tmp{{[\\/]}}discrim.c
#CHECK-NEXT: Function start filename: /tmp{{[\\/]}}discrim.c
#CHECK-NEXT: Function start line: 4
#CHECK-NEXT: Line: 5
#CHECK-NEXT: Column: 7
#CHECK-NEXT: main
#CHECK-NEXT: Filename: /tmp{{[\\/]}}discrim.c
#CHECK-NEXT: Function start filename: /tmp{{[\\/]}}discrim.c
#CHECK-NEXT: Function start line: 9
#CHECK-NEXT: Line: 10
#CHECK-NEXT: Column: 0
#CHECK: 0x4005a5
#CHECK-NEXT: foo
#CHECK-NEXT: Filename: /tmp{{[\\/]}}discrim.c
#CHECK-NEXT: Function start filename: /tmp{{[\\/]}}discrim.c
#CHECK-NEXT: Function start line: 4
#CHECK-NEXT: Line: 5
#CHECK-NEXT: Column: 17
#CHECK-NEXT: Discriminator: 2
#CHECK-NEXT: main
#CHECK-NEXT: Filename: /tmp{{[\\/]}}discrim.c
#CHECK-NEXT: Function start filename: /tmp{{[\\/]}}discrim.c
#CHECK-NEXT: Function start line: 9
#CHECK-NEXT: Line: 10
#CHECK-NEXT: Column: 0
#CHECK: 0x4005ad
#CHECK-NEXT: foo
#CHECK-NEXT: Filename: /tmp{{[\\/]}}discrim.c
#CHECK-NEXT: Function start filename: /tmp{{[\\/]}}discrim.c
#CHECK-NEXT: Function start line: 4
#CHECK-NEXT: Line: 0
#CHECK-NEXT: Column: 30
#CHECK-NEXT: Discriminator: 4
#CHECK-NEXT: main
#CHECK-NEXT: Filename: /tmp{{[\\/]}}discrim.c
#CHECK-NEXT: Function start filename: /tmp{{[\\/]}}discrim.c
#CHECK-NEXT: Function start line: 9
#CHECK-NEXT: Line: 10
#CHECK-NEXT: Column: 0
#CHECK: 0x4005b9
#CHECK-NEXT: foo
#CHECK-NEXT: Filename: /tmp{{[\\/]}}discrim.c
#CHECK-NEXT: Function start filename: /tmp{{[\\/]}}discrim.c
#CHECK-NEXT: Function start line: 4
#CHECK-NEXT: Line: 5
#CHECK-NEXT: Column: 7
#CHECK-NEXT: main
#CHECK-NEXT: Filename: /tmp{{[\\/]}}discrim.c
#CHECK-NEXT: Function start filename: /tmp{{[\\/]}}discrim.c
#CHECK-NEXT: Function start line: 9
#CHECK-NEXT: Line: 10
#CHECK-NEXT: Column: 0
#CHECK-NEXT: Discriminator: 2
#CHECK: 0x4005ce
#CHECK-NEXT: foo
#CHECK-NEXT: Filename: /tmp{{[\\/]}}discrim.c
#CHECK-NEXT: Function start filename: /tmp{{[\\/]}}discrim.c
#CHECK-NEXT: Function start line: 4
#CHECK-NEXT: Line: 5
#CHECK-NEXT: Column: 17
#CHECK-NEXT: Discriminator: 2
#CHECK-NEXT: main
#CHECK-NEXT: Filename: /tmp{{[\\/]}}discrim.c
#CHECK-NEXT: Function start filename: /tmp{{[\\/]}}discrim.c
#CHECK-NEXT: Function start line: 9
#CHECK-NEXT: Line: 10
#CHECK-NEXT: Column: 0
#CHECK-NEXT: Discriminator: 2
#CHECK: 0x4005d4
#CHECK-NEXT: foo
#CHECK-NEXT: Filename: /tmp{{[\\/]}}discrim.c
#CHECK-NEXT: Function start filename: /tmp{{[\\/]}}discrim.c
#CHECK-NEXT: Function start line: 4
#CHECK-NEXT: Line: 5
#CHECK-NEXT: Column: 30
#CHECK-NEXT: Discriminator: 4
#CHECK-NEXT: main
#CHECK-NEXT: Filename: /tmp{{[\\/]}}discrim.c
#CHECK-NEXT: Function start filename: /tmp{{[\\/]}}discrim.c
#CHECK-NEXT: Function start line: 9
#CHECK-NEXT: Line: 10
#CHECK-NEXT: Column: 0
#CHECK-NEXT: Discriminator: 2
#CHECK: some more text