]> git.lizzy.rs Git - rust.git/blob - tests/debuginfo/vec.rs
Rollup merge of #107580 - lenko-d:default_value_for_a_lifetime_generic_parameter_prod...
[rust.git] / tests / debuginfo / vec.rs
1 // min-lldb-version: 310
2 // ignore-gdb // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155
3
4 // compile-flags:-g
5
6 // === GDB TESTS ===================================================================================
7
8 // gdb-command:run
9 // gdb-command:print a
10 // gdbg-check:$1 = {1, 2, 3}
11 // gdbr-check:$1 = [1, 2, 3]
12 // gdb-command:print vec::VECT
13 // gdbg-check:$2 = {4, 5, 6}
14 // gdbr-check:$2 = [4, 5, 6]
15
16
17 // === LLDB TESTS ==================================================================================
18
19 // lldb-command:run
20 // lldb-command:print a
21 // lldbg-check:[...]$0 = { [0] = 1 [1] = 2 [2] = 3 }
22 // lldbr-check:([i32; 3]) a = { [0] = 1 [1] = 2 [2] = 3 }
23
24 #![allow(unused_variables)]
25 #![feature(omit_gdb_pretty_printer_section)]
26 #![omit_gdb_pretty_printer_section]
27
28 static mut VECT: [i32; 3] = [1, 2, 3];
29
30 fn main() {
31     let a = [1, 2, 3];
32
33     unsafe {
34         VECT[0] = 4;
35         VECT[1] = 5;
36         VECT[2] = 6;
37     }
38
39     zzz(); // #break
40 }
41
42 fn zzz() {()}