2014-08-20 05:53:50 -05:00
|
|
|
//@ ignore-lldb
|
|
|
|
//@ ignore-android: FIXME(#10381)
|
2019-05-14 07:50:58 -05:00
|
|
|
//@ min-gdb-version: 8.1
|
2018-11-07 13:04:40 -06:00
|
|
|
|
2014-08-20 05:53:50 -05:00
|
|
|
//@ compile-flags:-g
|
|
|
|
|
|
|
|
// gdb-command: run
|
|
|
|
|
|
|
|
// gdb-command: print regular_struct
|
2019-05-14 07:50:58 -05:00
|
|
|
// gdbg-check:$1 = {the_first_field = 101, the_second_field = 102.5, the_third_field = false}
|
2018-11-07 13:04:40 -06:00
|
|
|
// gdbr-check:$1 = gdb_pretty_struct_and_enums::RegularStruct {the_first_field: 101, the_second_field: 102.5, the_third_field: false}
|
2014-08-20 05:53:50 -05:00
|
|
|
|
|
|
|
// gdb-command: print empty_struct
|
2018-11-07 13:04:40 -06:00
|
|
|
// gdbg-check:$2 = EmptyStruct
|
|
|
|
// gdbr-check:$2 = gdb_pretty_struct_and_enums::EmptyStruct
|
2014-08-20 05:53:50 -05:00
|
|
|
|
|
|
|
// gdb-command: print c_style_enum1
|
2016-10-25 16:32:04 -05:00
|
|
|
// gdbg-check:$3 = CStyleEnumVar1
|
2018-11-07 13:04:40 -06:00
|
|
|
// gdbr-check:$3 = gdb_pretty_struct_and_enums::CStyleEnum::CStyleEnumVar1
|
2014-08-20 05:53:50 -05:00
|
|
|
|
|
|
|
// gdb-command: print c_style_enum2
|
2016-10-25 16:32:04 -05:00
|
|
|
// gdbg-check:$4 = CStyleEnumVar2
|
2018-11-07 13:04:40 -06:00
|
|
|
// gdbr-check:$4 = gdb_pretty_struct_and_enums::CStyleEnum::CStyleEnumVar2
|
2014-08-20 05:53:50 -05:00
|
|
|
|
|
|
|
// gdb-command: print c_style_enum3
|
2016-10-25 16:32:04 -05:00
|
|
|
// gdbg-check:$5 = CStyleEnumVar3
|
2018-11-07 13:04:40 -06:00
|
|
|
// gdbr-check:$5 = gdb_pretty_struct_and_enums::CStyleEnum::CStyleEnumVar3
|
2014-08-20 05:53:50 -05:00
|
|
|
|
2015-04-21 23:53:07 -05:00
|
|
|
#![allow(dead_code, unused_variables)]
|
|
|
|
|
2014-08-20 05:53:50 -05:00
|
|
|
struct RegularStruct {
|
2015-03-25 19:06:52 -05:00
|
|
|
the_first_field: isize,
|
2014-08-20 05:53:50 -05:00
|
|
|
the_second_field: f64,
|
|
|
|
the_third_field: bool,
|
|
|
|
}
|
|
|
|
|
|
|
|
struct EmptyStruct;
|
|
|
|
|
|
|
|
enum CStyleEnum {
|
|
|
|
CStyleEnumVar1,
|
|
|
|
CStyleEnumVar2,
|
|
|
|
CStyleEnumVar3,
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
|
|
|
|
let regular_struct = RegularStruct {
|
|
|
|
the_first_field: 101,
|
|
|
|
the_second_field: 102.5,
|
|
|
|
the_third_field: false
|
|
|
|
};
|
|
|
|
|
|
|
|
let empty_struct = EmptyStruct;
|
|
|
|
|
2014-11-06 02:05:53 -06:00
|
|
|
let c_style_enum1 = CStyleEnum::CStyleEnumVar1;
|
|
|
|
let c_style_enum2 = CStyleEnum::CStyleEnumVar2;
|
|
|
|
let c_style_enum3 = CStyleEnum::CStyleEnumVar3;
|
2014-08-20 05:53:50 -05:00
|
|
|
|
2014-10-29 01:13:29 -05:00
|
|
|
zzz(); // #break
|
2014-08-20 05:53:50 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
fn zzz() { () }
|