Skip to content

WinDbg does not understand niche-layout enums #84671

Closed
@wesleywiser

Description

@wesleywiser

WinDbg does not understand niche-layout enums and the information provided is not very useful unless you understand how niche-layout works. Even then, aside from simple cases like the 0 niche for references, it can be non-trivial to decode what variant of the enum is active when either the niche is not 0 or the enum contains multiple tag only variants, not just one like Option does.

fn main() {
    let x = Some(&1u32);
    let y = Option::<&'static u32>::None;

    std::process::exit(0); // bp here
}

image

Having the debuginfo more like the direct-tag layout case would help.

Metadata

Metadata

Assignees

Labels

A-debuginfoArea: Debugging information in compiled programs (DWARF, PDB, etc.)A-layoutArea: Memory layout of typesC-bugCategory: This is a bug.O-windows-msvcToolchain: MSVC, Operating system: Windows

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions