File tree Expand file tree Collapse file tree 1 file changed +46
-0
lines changed Expand file tree Collapse file tree 1 file changed +46
-0
lines changed Original file line number Diff line number Diff line change
1
+ //! Test that stepping through a simple program with a debugger one line at a
2
+ //! time works intuitively, e.g. that `next` takes you to the next source line.
3
+ //! Regression test for <https://github.com/rust-lang/rust/issues/33013>.
4
+
5
+ //@ compile-flags: -g
6
+
7
+ // gdb-command: run
8
+ // FIXME(#97083): Should we be able to break on initialization of zero-sized types?
9
+ // FIXME(#97083): Right now the first breakable line is:
10
+ // gdb-check: let mut c = 27;
11
+ // gdb-command: next
12
+ // gdb-check: let d = c = 99;
13
+ // gdb-command: next
14
+ // FIXME(#33013): gdb-check: let e = "hi bob";
15
+ // FIXME(#33013): gdb-command: next
16
+ // FIXME(#33013): gdb-check: let f = b"hi bob";
17
+ // FIXME(#33013): gdb-command: next
18
+ // FIXME(#33013): gdb-check: let g = b'9';
19
+ // FIXME(#33013): gdb-command: next
20
+ // FIXME(#33013): gdb-check: let h = ["whatever"; 8];
21
+ // FIXME(#33013): gdb-command: next
22
+ // gdb-check: let i = [1,2,3,4];
23
+ // gdb-command: next
24
+ // gdb-check: let j = (23, "hi");
25
+ // gdb-command: next
26
+ // gdb-check: let k = 2..3;
27
+ // gdb-command: next
28
+ // gdb-check: let l = &i[k];
29
+ // gdb-command: next
30
+ // gdb-check: let m: *const() = &a;
31
+
32
+ fn main ( ) {
33
+ let a = ( ) ; // #break
34
+ let b : [ i32 ; 0 ] = [ ] ;
35
+ let mut c = 27 ;
36
+ let d = c = 99 ;
37
+ let e = "hi bob" ;
38
+ let f = b"hi bob" ;
39
+ let g = b'9' ;
40
+ let h = [ "whatever" ; 8 ] ;
41
+ let i = [ 1 , 2 , 3 , 4 ] ;
42
+ let j = ( 23 , "hi" ) ;
43
+ let k = 2 ..3 ;
44
+ let l = & i[ k] ;
45
+ let m: * const ( ) = & a;
46
+ }
You can’t perform that action at this time.
0 commit comments