Fix handling of discriminantless univariant enums in Rust; fix bug with encoded enums
authorManish Goregaokar <manish@mozilla.com>
Thu, 27 Oct 2016 23:46:34 +0000 (16:46 -0700)
committerManish Goregaokar <manish@mozilla.com>
Thu, 3 Nov 2016 22:45:05 +0000 (15:45 -0700)
commit51a789c3bf3d9b04d3d81493fda7f2514ae43add
treeffb87d61643983177391b967ebf543796383d50f
parent98d0e90ccafe18d0b6392fa891e4b3d77299ae95
Fix handling of discriminantless univariant enums in Rust; fix bug with encoded enums

2016-10-27  Manish Goregaokar  <manish@mozilla.com>

gdb/ChangeLog:
    * rust-lang.c (rust_get_disr_info): Treat univariant enums
    without discriminants as encoded enums with a real field
    * rust-lang.c (rust_evaluate_subexp): Handle field access
    on encoded struct-like enums

gdb/testsuite/ChangeLog:
    * simple.rs: Add test for univariant enums without discriminants
    and for encoded struct-like enums
    * simple.exp: Add test expectations
gdb/ChangeLog
gdb/rust-lang.c
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.rust/simple.exp
gdb/testsuite/gdb.rust/simple.rs