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 // ignore-tidy-linelength
13 // min-lldb-version: 310
17 // === GDB TESTS ===================================================================================
21 // gdb-command:print no_padding1
22 // gdbg-check:$1 = {x = {0, 1, 2}, y = -3, z = {4.5, 5.5}}
23 // gdbr-check:$1 = evec_in_struct::NoPadding1 {x: [0, 1, 2], y: -3, z: [4.5, 5.5]}
24 // gdb-command:print no_padding2
25 // gdbg-check:$2 = {x = {6, 7, 8}, y = {{9, 10}, {11, 12}}}
26 // gdbr-check:$2 = evec_in_struct::NoPadding2 {x: [6, 7, 8], y: [[9, 10], [11, 12]]}
28 // gdb-command:print struct_internal_padding
29 // gdbg-check:$3 = {x = {13, 14}, y = {15, 16}}
30 // gdbr-check:$3 = evec_in_struct::StructInternalPadding {x: [13, 14], y: [15, 16]}
32 // gdb-command:print single_vec
33 // gdbg-check:$4 = {x = {17, 18, 19, 20, 21}}
34 // gdbr-check:$4 = evec_in_struct::SingleVec {x: [17, 18, 19, 20, 21]}
36 // gdb-command:print struct_padded_at_end
37 // gdbg-check:$5 = {x = {22, 23}, y = {24, 25}}
38 // gdbr-check:$5 = evec_in_struct::StructPaddedAtEnd {x: [22, 23], y: [24, 25]}
41 // === LLDB TESTS ==================================================================================
45 // lldb-command:print no_padding1
46 // lldbg-check:[...]$0 = NoPadding1 { x: [0, 1, 2], y: -3, z: [4.5, 5.5] }
47 // lldbr-check:(evec_in_struct::NoPadding1) no_padding1 = NoPadding1 { x: [0, 1, 2], y: -3, z: [4.5, 5.5] }
48 // lldb-command:print no_padding2
49 // lldbg-check:[...]$1 = NoPadding2 { x: [6, 7, 8], y: [[9, 10], [11, 12]] }
50 // lldbr-check:(evec_in_struct::NoPadding2) no_padding2 = NoPadding2 { x: [6, 7, 8], y: [[9, 10], [11, 12]] }
52 // lldb-command:print struct_internal_padding
53 // lldbg-check:[...]$2 = StructInternalPadding { x: [13, 14], y: [15, 16] }
54 // lldbr-check:(evec_in_struct::StructInternalPadding) struct_internal_padding = StructInternalPadding { x: [13, 14], y: [15, 16] }
56 // lldb-command:print single_vec
57 // lldbg-check:[...]$3 = SingleVec { x: [17, 18, 19, 20, 21] }
58 // lldbr-check:(evec_in_struct::SingleVec) single_vec = SingleVec { x: [17, 18, 19, 20, 21] }
60 // lldb-command:print struct_padded_at_end
61 // lldbg-check:[...]$4 = StructPaddedAtEnd { x: [22, 23], y: [24, 25] }
62 // lldbr-check:(evec_in_struct::StructPaddedAtEnd) struct_padded_at_end = StructPaddedAtEnd { x: [22, 23], y: [24, 25] }
64 #![allow(unused_variables)]
65 #![feature(omit_gdb_pretty_printer_section)]
66 #![omit_gdb_pretty_printer_section]
79 struct StructInternalPadding {
88 struct StructPaddedAtEnd {
95 let no_padding1 = NoPadding1 {
101 let no_padding2 = NoPadding2 {
103 y: [[9, 10], [11, 12]]
106 let struct_internal_padding = StructInternalPadding {
111 let single_vec = SingleVec {
112 x: [17, 18, 19, 20, 21]
115 let struct_padded_at_end = StructPaddedAtEnd {