[lldb-dev] [Bug 30568] New: [lldb-mi] -var-assign doesn't accept some valid values

via lldb-dev lldb-dev at lists.llvm.org
Thu Sep 29 14:15:27 PDT 2016


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

            Bug ID: 30568
           Summary: [lldb-mi] -var-assign doesn't accept some valid values
           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

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

-var-assign should allow assigning certain values to variables. The supported
types seems to be ints and floats (different encodings).

For example, assigning a valid value such as "true", "false", "'a'" all fail.
These assignments succeed if the "equivalent" integer value is used instead (1,
0, 97 (ascii), respectively). Other debuggers like GDB do support these values
to be used with the command -var-assign.

Repro (where z is a boolean variable):

-var-create - - "z" --thread 1 --frame 0
^done,name="var2",numchild="0",value="true",type="bool",thread-id="1",has_more="0"
(gdb)
## Assigning "false" fails
-var-assign var2 "false"
^error,msg="expression could not be evaluated"
(gdb)
## Assigning "0" succeeds
-var-assign var2 "0"
^done,value="false"
(gdb)
-var-evaluate-expression var2
^done,value="false"
(gdb)


The expected behavior is the same as GDB:
-var-create - * "z"
^done,name="var1",numchild="0",value="true",type="bool",thread-id="1",has_more="0"
(gdb)
-var-assign var1 "false"
^done,value="false"
(gdb)
-var-evaluate-expression var1
^done,value="false"
(gdb)

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20160929/36ee1c5e/attachment.html>


More information about the lldb-dev mailing list