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

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Sep 16 18:20:19 PDT 2016


https://llvm.org/bugs/show_bug.cgi?id=30423

            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 at lists.llvm.org
          Reporter: edmunoz at microsoft.com
                CC: llvm-bugs at 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), 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.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160917/c137eb9a/attachment.html>


More information about the llvm-bugs mailing list