1 // This test makes sure that the LLDB pretty printer does not throw an exception
2 // for nested closures and generators.
4 // Require a gdb that can read DW_TAG_variant_part.
5 // min-gdb-version: 8.2
9 // === GDB TESTS ===================================================================================
13 // gdb-command:print g
14 // gdb-check:$1 = issue_57822::main::{closure_env#1} {f: issue_57822::main::{closure_env#0} {x: 1}}
16 // gdb-command:print b
17 // gdb-check:$2 = issue_57822::main::{generator_env#3}::Unresumed{a: issue_57822::main::{generator_env#2}::Unresumed{y: 2}}
19 // === LLDB TESTS ==================================================================================
23 // lldb-command:print g
24 // lldbg-check:(issue_57822::main::{closure_env#1}) $0 = { f = { x = 1 } }
26 // lldb-command:print b
27 // lldbg-check:(issue_57822::main::{generator_env#3}) $1 =
29 #![feature(omit_gdb_pretty_printer_section, generators, generator_trait)]
30 #![omit_gdb_pretty_printer_section]
32 use std::ops::Generator;
46 Pin::new(&mut a).resume(());