]>
git.proxmox.com Git - rustc.git/blob - src/test/debuginfo/gdb-pretty-struct-and-enums-pre-gdb-7-7.rs
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 // This test uses only GDB Python API features which should be available in
12 // older versions of GDB too. A more extensive test can be found in
13 // gdb-pretty-struct-and-enums.rs
16 // ignore-windows failing on win32 bot
17 // ignore-freebsd: gdb package too new
18 // ignore-tidy-linelength
20 // ignore-android: FIXME(#10381)
25 // gdb-command: print regular_struct
26 // gdb-check:$1 = RegularStruct = {the_first_field = 101, the_second_field = 102.5, the_third_field = false}
28 // gdb-command: print empty_struct
29 // gdb-check:$2 = EmptyStruct
31 // gdb-command: print c_style_enum1
32 // gdb-check:$3 = CStyleEnumVar1
34 // gdb-command: print c_style_enum2
35 // gdb-check:$4 = CStyleEnumVar2
37 // gdb-command: print c_style_enum3
38 // gdb-check:$5 = CStyleEnumVar3
40 #![allow(dead_code, unused_variables)]
42 struct RegularStruct
{
43 the_first_field
: isize,
44 the_second_field
: f64,
45 the_third_field
: bool
,
58 let regular_struct
= RegularStruct
{
60 the_second_field
: 102.5,
61 the_third_field
: false
64 let empty_struct
= EmptyStruct
;
66 let c_style_enum1
= CStyleEnum
::CStyleEnumVar1
;
67 let c_style_enum2
= CStyleEnum
::CStyleEnumVar2
;
68 let c_style_enum3
= CStyleEnum
::CStyleEnumVar3
;