1 // min-lldb-version: 310
5 // === GDB TESTS ===================================================================================
10 // gdb-command:print *self
11 // gdbg-check:$1 = {__0 = 100, __1 = -100.5}
12 // gdbr-check:$1 = method_on_tuple_struct::TupleStruct (100, -100.5)
13 // gdb-command:print arg1
15 // gdb-command:print arg2
17 // gdb-command:continue
20 // gdb-command:print self
21 // gdbg-check:$4 = {__0 = 100, __1 = -100.5}
22 // gdbr-check:$4 = method_on_tuple_struct::TupleStruct (100, -100.5)
23 // gdb-command:print arg1
25 // gdb-command:print arg2
27 // gdb-command:continue
30 // gdb-command:print *self
31 // gdbg-check:$7 = {__0 = 200, __1 = -200.5}
32 // gdbr-check:$7 = method_on_tuple_struct::TupleStruct (200, -200.5)
33 // gdb-command:print arg1
35 // gdb-command:print arg2
37 // gdb-command:continue
40 // gdb-command:print self
41 // gdbg-check:$10 = {__0 = 200, __1 = -200.5}
42 // gdbr-check:$10 = method_on_tuple_struct::TupleStruct (200, -200.5)
43 // gdb-command:print arg1
45 // gdb-command:print arg2
47 // gdb-command:continue
50 // gdb-command:print *self
51 // gdbg-check:$13 = {__0 = 200, __1 = -200.5}
52 // gdbr-check:$13 = method_on_tuple_struct::TupleStruct (200, -200.5)
53 // gdb-command:print arg1
55 // gdb-command:print arg2
56 // gdb-check:$15 = -10
57 // gdb-command:continue
60 // === LLDB TESTS ==================================================================================
65 // lldb-command:print *self
66 // lldbg-check:[...]$0 = { 0 = 100 1 = -100.5 }
67 // lldbr-check:(method_on_tuple_struct::TupleStruct) *self = { 0 = 100 1 = -100.5 }
68 // lldb-command:print arg1
69 // lldbg-check:[...]$1 = -1
70 // lldbr-check:(isize) arg1 = -1
71 // lldb-command:print arg2
72 // lldbg-check:[...]$2 = -2
73 // lldbr-check:(isize) arg2 = -2
74 // lldb-command:continue
77 // lldb-command:print self
78 // lldbg-check:[...]$3 = { 0 = 100 1 = -100.5 }
79 // lldbr-check:(method_on_tuple_struct::TupleStruct) self = { 0 = 100 1 = -100.5 }
80 // lldb-command:print arg1
81 // lldbg-check:[...]$4 = -3
82 // lldbr-check:(isize) arg1 = -3
83 // lldb-command:print arg2
84 // lldbg-check:[...]$5 = -4
85 // lldbr-check:(isize) arg2 = -4
86 // lldb-command:continue
89 // lldb-command:print *self
90 // lldbg-check:[...]$6 = { 0 = 200 1 = -200.5 }
91 // lldbr-check:(method_on_tuple_struct::TupleStruct) *self = { 0 = 200 1 = -200.5 }
92 // lldb-command:print arg1
93 // lldbg-check:[...]$7 = -5
94 // lldbr-check:(isize) arg1 = -5
95 // lldb-command:print arg2
96 // lldbg-check:[...]$8 = -6
97 // lldbr-check:(isize) arg2 = -6
98 // lldb-command:continue
101 // lldb-command:print self
102 // lldbg-check:[...]$9 = { 0 = 200 1 = -200.5 }
103 // lldbr-check:(method_on_tuple_struct::TupleStruct) self = { 0 = 200 1 = -200.5 }
104 // lldb-command:print arg1
105 // lldbg-check:[...]$10 = -7
106 // lldbr-check:(isize) arg1 = -7
107 // lldb-command:print arg2
108 // lldbg-check:[...]$11 = -8
109 // lldbr-check:(isize) arg2 = -8
110 // lldb-command:continue
113 // lldb-command:print *self
114 // lldbg-check:[...]$12 = { 0 = 200 1 = -200.5 }
115 // lldbr-check:(method_on_tuple_struct::TupleStruct) *self = { 0 = 200 1 = -200.5 }
116 // lldb-command:print arg1
117 // lldbg-check:[...]$13 = -9
118 // lldbr-check:(isize) arg1 = -9
119 // lldb-command:print arg2
120 // lldbg-check:[...]$14 = -10
121 // lldbr-check:(isize) arg2 = -10
122 // lldb-command:continue
124 #![feature(omit_gdb_pretty_printer_section)]
125 #![omit_gdb_pretty_printer_section]
127 #[derive(Copy, Clone)]
128 struct TupleStruct(isize, f64);
132 fn self_by_ref(&self, arg1: isize, arg2: isize) -> isize {
137 fn self_by_val(self, arg1: isize, arg2: isize) -> isize {
142 fn self_owned(self: Box<TupleStruct>, arg1: isize, arg2: isize) -> isize {
149 let stack = TupleStruct(100, -100.5);
150 let _ = stack.self_by_ref(-1, -2);
151 let _ = stack.self_by_val(-3, -4);
153 let owned: Box<_> = Box::new(TupleStruct(200, -200.5));
154 let _ = owned.self_by_ref(-5, -6);
155 let _ = owned.self_by_val(-7, -8);
156 let _ = owned.self_owned(-9, -10);