llvm.org GIT mirror llvm / bd28b11
Moving to DebugInfo. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32176 91177308-0d34-0410-b5e6-96231b3b80d8 Jim Laskey 13 years ago
4 changed file(s) with 0 addition(s) and 145 deletion(s). Raw diff Collapse all Expand all
+0
-3
test/Debugger/.cvsignore less more
None Output
1 *.log
2 *.sum
+0
-3
test/Debugger/dg.exp less more
None load_lib llvm-dg.exp
1
2 llvm-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]] $objdir $srcdir $subdir $target_triplet $llvmgcc $llvmgxx $prcontext $llvmgcc_version
+0
-17
test/Debugger/funccall.c less more
None
1 static int q;
2
3 void foo() {
4 int t = q;
5 q = t + 1;
6 }
7 int main() {
8 q = 0;
9 foo();
10 q = q - 1;
11
12 return q;
13 }
14
15 // This is the source that corresponds to funccall.ll
16 // RUN: echo foo
+0
-122
test/Debugger/funccall.ll less more
None ;; RUN: llvm-as < %s | llc
1
2 ;; Debugger type declarations
3 %lldb.compile_unit = type { uint, ushort, ushort, sbyte*, sbyte*, sbyte*, {}* }
4 %lldb.global = type { uint, %lldb.compile_unit*, sbyte*, {}*, sbyte*, bool, bool }
5 %lldb.local = type { uint, %lldb.global*, sbyte*, sbyte*, bool, bool }
6
7
8 ;; Debugger intrinsic declarations...
9 declare {}* %llvm.dbg.stoppoint({}*, uint, uint, %lldb.compile_unit*)
10 declare {}* %llvm.dbg.func.start(%lldb.global*)
11 declare {}* %llvm.dbg.region.start({}*)
12 declare {}* %llvm.dbg.region.end({}*)
13
14 ;; Global object anchors
15 %llvm.dbg.translation_units = linkonce global {} {}
16 %llvm.dbg.globals = linkonce global {} {}
17
18
19 %.str_1 = internal constant [11 x sbyte] c"funccall.c\00"
20 %.str_2 = internal constant [12 x sbyte] c"/home/sabre\00"
21 %.str_3 = internal constant [14 x sbyte] c"llvmgcc 3.4.x\00"
22
23 %d.compile_unit = internal constant %lldb.compile_unit {
24 uint 17, ;; DW_TAG_compile_unit
25 ushort 0, ;; LLVM Debug version #
26 ushort 1, ;; Language: DW_LANG_C89
27 sbyte* getelementptr ([11 x sbyte]* %.str_1, long 0, long 0), ;; Source filename
28 sbyte* getelementptr ([12 x sbyte]* %.str_2, long 0, long 0), ;; Working directory
29 sbyte* getelementptr ([14 x sbyte]* %.str_3, long 0, long 0), ;; producer
30 {}* %llvm.dbg.translation_units ;; Anchor
31 }
32
33
34 %.str_5 = internal global [5 x sbyte] c"main\00"
35 %.str_6 = internal global [4 x sbyte] c"foo\00"
36 %.str_7 = internal global [2 x sbyte] c"q\00"
37 %.str_8 = internal global [2 x sbyte] c"t\00"
38
39 %d.main = global %lldb.global {
40 uint 46, ;; DW_TAG_subprogram
41 %lldb.compile_unit* %d.compile_unit, ;; context pointer
42 sbyte* getelementptr ([5 x sbyte]* %.str_5, long 0, long 0), ;; name
43 {}* %llvm.dbg.globals, ;; anchor
44 sbyte* null, ;; EVENTUALLY the type
45 bool true, ;; non-static linkage?
46 bool false ;; definition, not declaration
47 }
48
49 %d.foo = global %lldb.global {
50 uint 46, ;; DW_TAG_subprogram
51 %lldb.compile_unit* %d.compile_unit, ;; context pointer
52 sbyte* getelementptr ([4 x sbyte]* %.str_6, long 0, long 0), ;; name
53 {}* %llvm.dbg.globals, ;; anchor
54 sbyte* null, ;; EVENTUALLY the type
55 bool true, ;; non-static linkage
56 bool false ;; definition, not declaration
57 }
58
59 %d.q = internal global %lldb.global {
60 uint 52, ;; DW_TAG_variable
61 %lldb.compile_unit* %d.compile_unit, ;; context pointer
62 sbyte* getelementptr ([2 x sbyte]* %.str_7, long 0, long 0), ;; name
63 {}* %llvm.dbg.globals, ;; anchor
64 sbyte* null, ;; EVENTUALLY the type
65 bool false, ;; static linkage
66 bool false ;; definition, not declaration
67 }
68
69
70 %d.t = internal global %lldb.local {
71 uint 52, ;; DW_TAG_variable
72 %lldb.global* %d.foo, ;; context pointer
73 sbyte* getelementptr ([2 x sbyte]* %.str_8, long 0, long 0), ;; name
74 sbyte* null, ;; EVENTUALLY the type
75 bool false, ;; local variable
76 bool false ;; definition, not declaratation
77 }
78
79
80
81 %q = internal global int 0
82
83 implementation ; Functions:
84
85 void %foo() {
86 entry:
87 %t = alloca int
88 %.1 = call {}* %llvm.dbg.func.start(%lldb.global* %d.foo)
89 %.2 = call {}* %llvm.dbg.stoppoint({}* %.1, uint 5, uint 2, %lldb.compile_unit* %d.compile_unit)
90
91 %tmp.0 = load int* %q
92 store int %tmp.0, int* %t
93 %.4 = call {}* %llvm.dbg.stoppoint({}* %.2, uint 6, uint 2, %lldb.compile_unit* %d.compile_unit)
94 %tmp.01 = load int* %t
95 %tmp.1 = add int %tmp.01, 1
96 store int %tmp.1, int* %q
97 %.5 = call {}* %llvm.dbg.stoppoint({}* %.4, uint 7, uint 1, %lldb.compile_unit* %d.compile_unit)
98 call {}* %llvm.dbg.region.end({}* %.5)
99 ret void
100 }
101
102 int %main() {
103 entry:
104 %.1 = call {}* %llvm.dbg.func.start(%lldb.global* %d.main)
105 %result = alloca int
106 %.2 = call {}* %llvm.dbg.stoppoint({}* %.1, uint 9, uint 2, %lldb.compile_unit* %d.compile_unit)
107 store int 0, int* %q
108 %.3 = call {}* %llvm.dbg.stoppoint({}* %.2, uint 10, uint 2, %lldb.compile_unit* %d.compile_unit)
109 call void %foo()
110 %.4 = call {}* %llvm.dbg.stoppoint({}* %.3, uint 11, uint 2, %lldb.compile_unit* %d.compile_unit)
111 %tmp.2 = load int* %q
112 %tmp.3 = sub int %tmp.2, 1
113 store int %tmp.3, int* %q
114 %.5 = call {}* %llvm.dbg.stoppoint({}* %.4, uint 13, uint 2, %lldb.compile_unit* %d.compile_unit)
115 %tmp.4 = load int* %q
116 store int %tmp.4, int* %result
117 %tmp.5 = load int* %result
118 %.6 = call {}* %llvm.dbg.stoppoint({}* %.5, uint 14, uint 1, %lldb.compile_unit* %d.compile_unit)
119 call {}* %llvm.dbg.region.end({}* %.6)
120 ret int %tmp.5
121 }