File tree Expand file tree Collapse file tree 1 file changed +52
-0
lines changed Expand file tree Collapse file tree 1 file changed +52
-0
lines changed Original file line number Diff line number Diff line change 1+ // Copyright 2018 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.
4+ //
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.
10+
11+ // This test does not passed with gdb < 8.0. See #53497.
12+ // min-gdb-version 8.0
13+
14+ // compile-flags:-g
15+
16+ // === GDB TESTS ===================================================================================
17+
18+ // gdb-command:run
19+
20+ // gdb-command:print fun(45, true)
21+ // gdb-check:$1 = true
22+ // gdb-command:print fun(444, false)
23+ // gdb-check:$2 = false
24+
25+ // gdb-command:print r.get_x()
26+ // gdb-check:$3 = 4
27+
28+ #![ allow( dead_code, unused_variables) ]
29+
30+ struct RegularStruct {
31+ x : i32
32+ }
33+
34+ impl RegularStruct {
35+ fn get_x ( & self ) -> i32 {
36+ self . x
37+ }
38+ }
39+
40+ fn main ( ) {
41+ let _ = fun ( 4 , true ) ;
42+ let r = RegularStruct { x : 4 } ;
43+ let _ = r. get_x ( ) ;
44+
45+ zzz ( ) ; // #break
46+ }
47+
48+ fn fun ( x : isize , y : bool ) -> bool {
49+ y
50+ }
51+
52+ fn zzz ( ) { ( ) }
You can’t perform that action at this time.
0 commit comments