[lldb-dev] [Bug 14602] New: expr command should allow casting variables for assignment

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Dec 13 15:11:32 PST 2012


http://llvm.org/bugs/show_bug.cgi?id=14602

             Bug #: 14602
           Summary: expr command should allow casting variables for
                    assignment
           Product: lldb
           Version: unspecified
          Platform: Macintosh
        OS/Version: MacOS X
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: All Bugs
        AssignedTo: lldb-dev at cs.uiuc.edu
        ReportedBy: kyle at omnigroup.com
    Classification: Unclassified


I'm trying to poke a private AppKit global variable for testing within my app.

The following command fails:

(lldb) expr __NSStringDrawingShouldAdjustBounds = 1
error: read-only variable is not assignable
error: 1 errors parsing expression

...because lldb has given __NSStringDrawingShouldAdjustBounds the type `void
*const`.

So then I tried this:

(lldb) expr (int)__NSStringDrawingShouldAdjustBounds = 1
error: cast from pointer to smaller type 'int' loses information
error: 1 errors parsing expression

...which isn't what I expected, but okay. This should work:

(lldb) expr (void *)__NSStringDrawingShouldAdjustBounds = 1
error: assignment to cast is illegal, lvalue casts are not supported
error: 1 errors parsing expression


I expected this to work, but it's a gdb-ism. Can lldb do the right thing here
too?

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the lldb-dev mailing list