]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit - gdb/testsuite/ChangeLog-2014-2021
Handle sizeof(type) in Rust
authorTom Tromey <tom@tromey.com>
Fri, 14 Jul 2017 14:10:39 +0000 (08:10 -0600)
committerTom Tromey <tom@tromey.com>
Fri, 14 Jul 2017 18:30:56 +0000 (12:30 -0600)
commit8880f2a9cb5151ce1c2714a75d123ba0f63668ac
treeeeeb99b36c6ddea814112fc1b465cb317a42f2d9
parent65547233e04b32e087f74f8f5e9d3ffb6fe2c198
Handle sizeof(type) in Rust

PR rust/21764 notes that "sizeof" does not work correctly for all types
in Rust.  The bug turns out to be an error in the conversion of the AST
to gdb expressions.  This patch fixes the bug and also avoids generating
incorrect expressions in another case.

Tested on the buildbot.  I'm checking this in.

2017-07-14  Tom Tromey  <tom@tromey.com>

PR rust/21764:
* rust-exp.y (convert_ast_to_expression): Add "want_type"
parameter.
<UNOP_SIZEOF>: Split into separate case.
<UNOP_VAR_VALUE>: Handle want_type.  Add error case.

2017-07-14  Tom Tromey  <tom@tromey.com>

PR rust/21764:
* gdb.rust/simple.exp: Add tests.
gdb/ChangeLog
gdb/rust-exp.y
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.rust/simple.exp