rust-lang / lldb

No longer used, use https://github.com/rust-lang/llvm-project instead
Other
14 stars 6 forks source link

Printing Option::None #17

Open tromey opened 6 years ago

tromey commented 6 years ago

See the reduced test case from #16:

use std::option::Option;
enum Union { A(usize), B(usize) }
fn main() {
    let union_none: Option<Union> = Option::None;
    println!("yay");
}

Breaking on the println and doing:

(lldb) fr v
(core::option::Option<tt::Union>) union_none = {}

(Note that this is with the patches to use DW_TAG_variant et al.)

Here gdb prints:

(gdb) p union_none
$1 = core::option::Option<tt::Union>::None

I think lldb should do something similar.