1 // Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution and at
3 // http://rust-lang.org/COPYRIGHT.
5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 // option. This file may not be copied, modified, or distributed
9 // except according to those terms.
11 // min-lldb-version: 310
15 // === GDB TESTS ===================================================================================
19 // gdb-command:print no_padding1
20 // gdbg-check:$1 = {x = {0, 1, 2}, y = -3, z = {4.5, 5.5}}
21 // gdbr-check:$1 = evec_in_struct::NoPadding1 {x: [0, 1, 2], y: -3, z: [4.5, 5.5]}
22 // gdb-command:print no_padding2
23 // gdbg-check:$2 = {x = {6, 7, 8}, y = {{9, 10}, {11, 12}}}
24 // gdbr-check:$2 = evec_in_struct::NoPadding2 {x: [6, 7, 8], y: [[9, 10], [11, 12]]}
26 // gdb-command:print struct_internal_padding
27 // gdbg-check:$3 = {x = {13, 14}, y = {15, 16}}
28 // gdbr-check:$3 = evec_in_struct::StructInternalPadding {x: [13, 14], y: [15, 16]}
30 // gdb-command:print single_vec
31 // gdbg-check:$4 = {x = {17, 18, 19, 20, 21}}
32 // gdbr-check:$4 = evec_in_struct::SingleVec {x: [17, 18, 19, 20, 21]}
34 // gdb-command:print struct_padded_at_end
35 // gdbg-check:$5 = {x = {22, 23}, y = {24, 25}}
36 // gdbr-check:$5 = evec_in_struct::StructPaddedAtEnd {x: [22, 23], y: [24, 25]}
39 // === LLDB TESTS ==================================================================================
43 // lldb-command:print no_padding1
44 // lldb-check:[...]$0 = NoPadding1 { x: [0, 1, 2], y: -3, z: [4.5, 5.5] }
45 // lldb-command:print no_padding2
46 // lldb-check:[...]$1 = NoPadding2 { x: [6, 7, 8], y: [[9, 10], [11, 12]] }
48 // lldb-command:print struct_internal_padding
49 // lldb-check:[...]$2 = StructInternalPadding { x: [13, 14], y: [15, 16] }
51 // lldb-command:print single_vec
52 // lldb-check:[...]$3 = SingleVec { x: [17, 18, 19, 20, 21] }
54 // lldb-command:print struct_padded_at_end
55 // lldb-check:[...]$4 = StructPaddedAtEnd { x: [22, 23], y: [24, 25] }
57 #![allow(unused_variables)]
58 #![feature(omit_gdb_pretty_printer_section)]
59 #![omit_gdb_pretty_printer_section]
72 struct StructInternalPadding {
81 struct StructPaddedAtEnd {
88 let no_padding1 = NoPadding1 {
94 let no_padding2 = NoPadding2 {
96 y: [[9, 10], [11, 12]]
99 let struct_internal_padding = StructInternalPadding {
104 let single_vec = SingleVec {
105 x: [17, 18, 19, 20, 21]
108 let struct_padded_at_end = StructPaddedAtEnd {