2014-10-09 09:31:03 -05:00
|
|
|
//@ min-lldb-version: 310
|
2018-01-03 12:24:25 -06:00
|
|
|
//@ ignore-gdb // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155
|
2013-11-04 00:53:01 -06:00
|
|
|
|
2014-02-06 21:57:09 -06:00
|
|
|
//@ compile-flags:-g
|
2014-04-24 04:35:48 -05:00
|
|
|
// gdb-command:run
|
|
|
|
// gdb-command:whatis unit
|
|
|
|
// gdb-check:type = ()
|
|
|
|
// gdb-command:whatis b
|
|
|
|
// gdb-check:type = bool
|
|
|
|
// gdb-command:whatis i
|
2014-12-05 20:12:25 -06:00
|
|
|
// gdb-check:type = isize
|
2014-04-24 04:35:48 -05:00
|
|
|
// gdb-command:whatis c
|
|
|
|
// gdb-check:type = char
|
|
|
|
// gdb-command:whatis i8
|
|
|
|
// gdb-check:type = i8
|
|
|
|
// gdb-command:whatis i16
|
|
|
|
// gdb-check:type = i16
|
|
|
|
// gdb-command:whatis i32
|
|
|
|
// gdb-check:type = i32
|
|
|
|
// gdb-command:whatis i64
|
|
|
|
// gdb-check:type = i64
|
|
|
|
// gdb-command:whatis u
|
2014-12-05 20:12:25 -06:00
|
|
|
// gdb-check:type = usize
|
2014-04-24 04:35:48 -05:00
|
|
|
// gdb-command:whatis u8
|
|
|
|
// gdb-check:type = u8
|
|
|
|
// gdb-command:whatis u16
|
|
|
|
// gdb-check:type = u16
|
|
|
|
// gdb-command:whatis u32
|
|
|
|
// gdb-check:type = u32
|
|
|
|
// gdb-command:whatis u64
|
|
|
|
// gdb-check:type = u64
|
2024-06-26 12:18:32 -05:00
|
|
|
// gdb-command:whatis f16
|
|
|
|
// gdb-check:type = f16
|
2014-04-24 04:35:48 -05:00
|
|
|
// gdb-command:whatis f32
|
|
|
|
// gdb-check:type = f32
|
|
|
|
// gdb-command:whatis f64
|
|
|
|
// gdb-check:type = f64
|
2015-07-13 14:50:21 -05:00
|
|
|
// gdb-command:whatis fnptr
|
2015-07-14 12:08:08 -05:00
|
|
|
// gdb-check:type = [...] (*)([...])
|
2014-04-24 04:35:48 -05:00
|
|
|
// gdb-command:info functions _yyy
|
2016-10-25 16:32:04 -05:00
|
|
|
// gdbg-check:[...]![...]_yyy([...]);
|
|
|
|
// gdbr-check:static fn basic_types_metadata::_yyy() -> !;
|
2015-07-27 17:29:05 -05:00
|
|
|
// gdb-command:ptype closure_0
|
2016-10-25 16:32:04 -05:00
|
|
|
// gdbr-check: type = struct closure
|
|
|
|
// gdbg-check: type = struct closure {
|
|
|
|
// gdbg-check: <no data fields>
|
|
|
|
// gdbg-check: }
|
2015-07-27 17:29:05 -05:00
|
|
|
// gdb-command:ptype closure_1
|
2016-10-25 16:32:04 -05:00
|
|
|
// gdbg-check: type = struct closure {
|
|
|
|
// gdbg-check: bool *__0;
|
|
|
|
// gdbg-check: }
|
|
|
|
// gdbr-check: type = struct closure (
|
|
|
|
// gdbr-check: bool *,
|
|
|
|
// gdbr-check: )
|
2015-07-27 17:29:05 -05:00
|
|
|
// gdb-command:ptype closure_2
|
2016-10-25 16:32:04 -05:00
|
|
|
// gdbg-check: type = struct closure {
|
|
|
|
// gdbg-check: bool *__0;
|
|
|
|
// gdbg-check: isize *__1;
|
|
|
|
// gdbg-check: }
|
|
|
|
// gdbr-check: type = struct closure (
|
|
|
|
// gdbr-check: bool *,
|
|
|
|
// gdbr-check: isize *,
|
|
|
|
// gdbr-check: )
|
2015-07-27 17:29:05 -05:00
|
|
|
|
|
|
|
//
|
2014-04-24 04:35:48 -05:00
|
|
|
// gdb-command:continue
|
2013-11-02 13:38:25 -05:00
|
|
|
|
2014-10-27 17:37:07 -05:00
|
|
|
#![allow(unused_variables)]
|
2015-09-19 15:33:47 -05:00
|
|
|
#![feature(omit_gdb_pretty_printer_section)]
|
2014-12-03 16:48:18 -06:00
|
|
|
#![omit_gdb_pretty_printer_section]
|
2024-06-26 12:18:32 -05:00
|
|
|
#![feature(f16)]
|
2013-11-02 13:38:25 -05:00
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let unit: () = ();
|
|
|
|
let b: bool = false;
|
2014-12-05 20:12:25 -06:00
|
|
|
let i: isize = -1;
|
2013-11-02 13:38:25 -05:00
|
|
|
let c: char = 'a';
|
|
|
|
let i8: i8 = 68;
|
|
|
|
let i16: i16 = -16;
|
|
|
|
let i32: i32 = -32;
|
|
|
|
let i64: i64 = -64;
|
2014-12-05 20:12:25 -06:00
|
|
|
let u: usize = 1;
|
2013-11-02 13:38:25 -05:00
|
|
|
let u8: u8 = 100;
|
|
|
|
let u16: u16 = 16;
|
|
|
|
let u32: u32 = 32;
|
|
|
|
let u64: u64 = 64;
|
2024-06-26 12:18:32 -05:00
|
|
|
let f16: f16 = 1.5;
|
2013-11-02 13:38:25 -05:00
|
|
|
let f32: f32 = 2.5;
|
|
|
|
let f64: f64 = 3.5;
|
2015-07-13 14:50:21 -05:00
|
|
|
let fnptr : fn() = _zzz;
|
2015-07-27 17:29:05 -05:00
|
|
|
let closure_0 = || {};
|
|
|
|
let closure_1 = || { b; };
|
|
|
|
let closure_2 = || { if b { i } else { i }; };
|
2014-10-29 01:13:29 -05:00
|
|
|
_zzz(); // #break
|
2015-01-25 15:05:03 -06:00
|
|
|
if 1 == 1 { _yyy(); }
|
2013-11-02 13:38:25 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
fn _zzz() {()}
|
2014-10-09 14:17:22 -05:00
|
|
|
fn _yyy() -> ! {panic!()}
|