]> git.lizzy.rs Git - rust.git/blob - tests/debuginfo/function-arguments.rs
Rollup merge of #103702 - WaffleLapkin:lift-sized-bounds-from-pointer-methods-where...
[rust.git] / tests / debuginfo / function-arguments.rs
1 // min-lldb-version: 310
2
3 // compile-flags:-g
4
5 // === GDB TESTS ===================================================================================
6
7 // gdb-command:run
8
9 // gdb-command:print x
10 // gdb-check:$1 = 111102
11 // gdb-command:print y
12 // gdb-check:$2 = true
13 // gdb-command:continue
14
15 // gdb-command:print a
16 // gdb-check:$3 = 2000
17 // gdb-command:print b
18 // gdb-check:$4 = 3000
19 // gdb-command:continue
20
21 // === LLDB TESTS ==================================================================================
22
23 // lldb-command:run
24
25 // lldb-command:print x
26 // lldbg-check:[...]$0 = 111102
27 // lldbr-check:(isize) x = 111102
28 // lldb-command:print y
29 // lldbg-check:[...]$1 = true
30 // lldbr-check:(bool) y = true
31 // lldb-command:continue
32
33 // lldb-command:print a
34 // lldbg-check:[...]$2 = 2000
35 // lldbr-check:(i32) a = 2000
36 // lldb-command:print b
37 // lldbg-check:[...]$3 = 3000
38 // lldbr-check:(i64) b = 3000
39 // lldb-command:continue
40
41
42 #![feature(omit_gdb_pretty_printer_section)]
43 #![omit_gdb_pretty_printer_section]
44
45 fn main() {
46
47     fun(111102, true);
48     nested(2000, 3000);
49
50     fn nested(a: i32, b: i64) -> (i32, i64) {
51         zzz(); // #break
52         (a, b)
53     }
54 }
55
56 fn fun(x: isize, y: bool) -> (isize, bool) {
57     zzz(); // #break
58
59     (x, y)
60 }
61
62 fn zzz() { () }