[Bug 30423] New: [lldb-mi] -var-assign doesn't evaluate the expression to assign

Bug ID 30423
Summary [lldb-mi] -var-assign doesn’t evaluate the expression to assign
Product lldb
Version 3.9
Hardware PC
OS All
Status NEW
Severity normal
Priority P
Component All Bugs
Assignee lldb-dev@lists.llvm.org
Reporter edmunoz@microsoft.com
CC llvm-bugs@lists.llvm.org
Classification Unclassified

According to the MI documentation from GDB
([http://ftp.gnu.org/old-gnu/Manuals/gdb/html_node/gdb_231.html](http://ftp.gnu.org/old-gnu/Manuals/gdb/html_node/gdb_231.html)), the MI command
-var-assign takes a variables object and an expression to assign to it

 -var-assign name expression

However, lldb-mi does not allow expressions and only allows numeric values:

-var-create - - "x" --thread 1 --frame 0
-var-assign var0 "3+2"
^error,msg="expression could not be evaluated"

On the other hand, using GDB:

-var-create - * "a"
-1035-var-assign var5 "3+2"

CMICmdCmdVarAssign should first try to evaluate the expression passed in rather
than just treating it as a value.