1 // min-lldb-version: 310
5 // === GDB TESTS ===================================================================================
9 // gdb-command:print constant
11 // gdb-command:print a_struct
12 // gdbg-check:$2 = {a = -2, b = 3.5, c = 4}
13 // gdbr-check:$2 = var_captured_in_sendable_closure::Struct {a: -2, b: 3.5, c: 4}
14 // gdb-command:print *owned
16 // gdb-command:continue
18 // gdb-command:print constant2
20 // gdb-command:continue
22 // === LLDB TESTS ==================================================================================
26 // lldb-command:print constant
27 // lldbg-check:[...]$0 = 1
28 // lldbr-check:(isize) constant = 1
29 // lldb-command:print a_struct
30 // lldbg-check:[...]$1 = { a = -2 b = 3.5 c = 4 }
31 // lldbr-check:(var_captured_in_sendable_closure::Struct) a_struct = { a = -2 b = 3.5 c = 4 }
32 // lldb-command:print *owned
33 // lldbg-check:[...]$2 = 5
34 // lldbr-check:(isize) *owned = 5
36 #![allow(unused_variables)]
37 #![feature(omit_gdb_pretty_printer_section)]
38 #![omit_gdb_pretty_printer_section]
49 let a_struct = Struct {
55 let owned: Box<_> = Box::new(5);
57 let closure = move || {
59 do_something(&constant, &a_struct.a, &*owned);
64 let constant2 = 6_usize;
66 // The `self` argument of the following closure should be passed by value
67 // to FnOnce::call_once(self, args), which gets codegened a bit differently
68 // than the regular case. Let's make sure this is supported too.
69 let immedate_env = move || {
77 fn do_something(_: &isize, _:&isize, _:&isize) {