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: [email protected]
        ReportedBy: [email protected]
    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.
_______________________________________________
lldb-dev mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev

Reply via email to