Skip to content

Fix debug representation of arrays of structs #1340

Closed
@jdm

Description

@jdm

"Up-to-date" test case:

fn main() {
    struct moo {a: float};
    let x = [moo{a: 1.5}, moo{a: 2.3}];
    io::println(fmt!("%?", x));
}

(build with rustc -Z debug-info, then load it up in gdb and set a breakpoint on main.)

Original reported test case follows

let x = [{a: 1.5},{a: 2.3}]

The values of a in gdb are wildly incorrect.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-debuginfoArea: Debugging information in compiled programs (DWARF, PDB, etc.)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions