Skip to content

rust-lldb: add a pretty printer for &mut slices #30232

Closed
@zummenix

Description

@zummenix

Pretty printer for &mut slices doesn't work.

I tried this code:

fn main() {
    let mut v = vec![4, 6, 7, 8, 5, 1, 2, 3];
    slice_mut(&mut v);
}

fn slice_mut(a: &mut [u32]) {
}

In rust-lldb p a should print:

(&mut [u32]) $0 = &[4, 6, 7, 8, 5, 1, 2, 3]

Instead, it prints:

(&mut [u32]) $0 = &mut [u32] {
data_ptr: &0x10102b000, 
length: 8
}

Meta

rustc --version --verbose:

rustc 1.6.0-nightly (a2866e387 2015-11-30)
binary: rustc
commit-hash: a2866e387eab59528466a040e815568e57b20850
commit-date: 2015-11-30
host: x86_64-apple-darwin
release: 1.6.0-nightly

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-debuginfoArea: Debugging information in compiled programs (DWARF, PDB, etc.)E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.E-mentorCall for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions