debuginfo: change cpp-like naming for generator environments so that NatVis works for them
This commit is contained in:
parent
07ebc13d87
commit
3ad299aa67
4 changed files with 125 additions and 50 deletions
|
|
@ -16,7 +16,7 @@ async fn async_fn_test() {
|
|||
|
||||
// FIXME: No way to reliably check the filename.
|
||||
|
||||
// CHECK-DAG: [[GEN:!.*]] = !DICompositeType(tag: DW_TAG_union_type, name: "async_fn_env$0", {{.*}}, align: {{32|64}},
|
||||
// CHECK-DAG: [[GEN:!.*]] = !DICompositeType(tag: DW_TAG_union_type, name: "enum$<async_fn_debug_msvc::async_fn_test::async_fn_env$0>",
|
||||
// CHECK: {{!.*}} = !DIDerivedType(tag: DW_TAG_member, name: "variant0", scope: [[GEN]],
|
||||
// For brevity, we only check the struct name and members of the last variant.
|
||||
// CHECK-SAME: file: [[FILE:![0-9]*]], line: 11,
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ fn generator_test() -> impl Generator<Yield = i32, Return = ()> {
|
|||
|
||||
// FIXME: No way to reliably check the filename.
|
||||
|
||||
// CHECK-DAG: [[GEN:!.*]] = !DICompositeType(tag: DW_TAG_union_type, name: "generator_env$0"
|
||||
// CHECK-DAG: [[GEN:!.*]] = !DICompositeType(tag: DW_TAG_union_type, name: "enum$<generator_debug_msvc::generator_test::generator_env$0>"
|
||||
// CHECK: {{!.*}} = !DIDerivedType(tag: DW_TAG_member, name: "variant0", scope: [[GEN]],
|
||||
// For brevity, we only check the struct name and members of the last variant.
|
||||
// CHECK-SAME: file: [[FILE:![0-9]*]], line: 14,
|
||||
|
|
|
|||
|
|
@ -37,6 +37,37 @@
|
|||
// lldb-command:print b
|
||||
// lldbg-check:(generator_objects::main::{generator_env#0}) $3 =
|
||||
|
||||
// === CDB TESTS ===================================================================================
|
||||
|
||||
// cdb-command: g
|
||||
// cdb-command: dx b
|
||||
// cdb-check: b : Unresumed [Type: enum$<generator_objects::main::generator_env$0>]
|
||||
// cdb-check: [variant] : Unresumed
|
||||
// cdb-check: [+0x000] _ref__a : 0x[...] : 5 [Type: int *]
|
||||
|
||||
// cdb-command: g
|
||||
// cdb-command: dx b
|
||||
// cdb-check: b : Suspend0 [Type: enum$<generator_objects::main::generator_env$0>]
|
||||
// cdb-check: [variant] : Suspend0
|
||||
// cdb-check: [+0x008] c : 6 [Type: int]
|
||||
// cdb-check: [+0x00c] d : 7 [Type: int]
|
||||
// cdb-check: [+0x000] _ref__a : 0x[...] : 5 [Type: int *]
|
||||
|
||||
// cdb-command: g
|
||||
// cdb-command: dx b
|
||||
// cdb-check: b : Suspend1 [Type: enum$<generator_objects::main::generator_env$0>]
|
||||
// cdb-check: [variant] : Suspend1
|
||||
// cdb-check: [+0x008] c : 7 [Type: int]
|
||||
// cdb-check: [+0x00c] d : 8 [Type: int]
|
||||
// cdb-check: [+0x000] _ref__a : 0x[...] : 6 [Type: int *]
|
||||
|
||||
// cdb-command: g
|
||||
// cdb-command: dx b
|
||||
// cdb-check: b : Returned [Type: enum$<generator_objects::main::generator_env$0>]
|
||||
// cdb-check: [<Raw View>] [Type: enum$<generator_objects::main::generator_env$0>]
|
||||
// cdb-check: [variant] : Returned
|
||||
// cdb-check: [+0x000] _ref__a : 0x[...] : 6 [Type: int *]
|
||||
|
||||
#![feature(omit_gdb_pretty_printer_section, generators, generator_trait)]
|
||||
#![omit_gdb_pretty_printer_section]
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue