File tree Expand file tree Collapse file tree 1 file changed +47
-0
lines changed Expand file tree Collapse file tree 1 file changed +47
-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
+ //@ ignore-aarch64: Doesn't work yet.
6
+ //@ compile-flags: -g
7
+
8
+ // gdb-command: run
9
+ // FIXME(#97083): Should we be able to break on initialization of zero-sized types?
10
+ // FIXME(#97083): Right now the first breakable line is:
11
+ // gdb-check: let mut c = 27;
12
+ // gdb-command: next
13
+ // gdb-check: let d = c = 99;
14
+ // gdb-command: next
15
+ // FIXME(#33013): gdb-check: let e = "hi bob";
16
+ // FIXME(#33013): gdb-command: next
17
+ // FIXME(#33013): gdb-check: let f = b"hi bob";
18
+ // FIXME(#33013): gdb-command: next
19
+ // FIXME(#33013): gdb-check: let g = b'9';
20
+ // FIXME(#33013): gdb-command: next
21
+ // FIXME(#33013): gdb-check: let h = ["whatever"; 8];
22
+ // FIXME(#33013): gdb-command: next
23
+ // gdb-check: let i = [1,2,3,4];
24
+ // gdb-command: next
25
+ // gdb-check: let j = (23, "hi");
26
+ // gdb-command: next
27
+ // gdb-check: let k = 2..3;
28
+ // gdb-command: next
29
+ // gdb-check: let l = &i[k];
30
+ // gdb-command: next
31
+ // gdb-check: let m: *const() = &a;
32
+
33
+ fn main ( ) {
34
+ let a = ( ) ; // #break
35
+ let b : [ i32 ; 0 ] = [ ] ;
36
+ let mut c = 27 ;
37
+ let d = c = 99 ;
38
+ let e = "hi bob" ;
39
+ let f = b"hi bob" ;
40
+ let g = b'9' ;
41
+ let h = [ "whatever" ; 8 ] ;
42
+ let i = [ 1 , 2 , 3 , 4 ] ;
43
+ let j = ( 23 , "hi" ) ;
44
+ let k = 2 ..3 ;
45
+ let l = & i[ k] ;
46
+ let m: * const ( ) = & a;
47
+ }
You can’t perform that action at this time.
0 commit comments