<html>
<head>
<base href="https://llvm.org/bugs/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - [lldb-mi] -var-assign doesn't evaluate the expression to assign"
href="https://llvm.org/bugs/show_bug.cgi?id=30423">30423</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>[lldb-mi] -var-assign doesn't evaluate the expression to assign
</td>
</tr>
<tr>
<th>Product</th>
<td>lldb
</td>
</tr>
<tr>
<th>Version</th>
<td>3.9
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>All Bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>lldb-dev@lists.llvm.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>edmunoz@microsoft.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>According to the MI documentation from GDB
(<a href="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</a>), 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
^done,name="var0",numchild="0",value="1",type="int",thread-id="1",has_more="0"
-var-assign var0 "3+2"
^error,msg="expression could not be evaluated"
On the other hand, using GDB:
-var-create - * "a"
^done,name="var5",numchild="0",value="0",type="int",thread-id="1",has_more="0"
-1035-var-assign var5 "3+2"
^done,value="5"
CMICmdCmdVarAssign should first try to evaluate the expression passed in rather
than just treating it as a value.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>