LLDB does not always understand dot notation for property access
| Originator: | numist | ||
| Number: | rdar://12616493 | Date Originated: | 01-Nov-2012 10:39 AM |
| Status: | Open | Resolved: | |
| Product: | Developer Tools | Product Version: | Xcode Version 4.5.1 (4G1004)/LLDB-167.4 |
| Classification: | UI/Usability | Reproducible: | Always |
Summary: LLDB does not always treat dot notation the same as bracketed message passing when dealing with objects. Sure, dot notation exists as a separate entity in C and Objective-C, but it's possible enough to tell the difference at runtime—does the value duck like a valid pointer to an objc_object? Steps to Reproduce: (lldb) po [set anyObject].foo Expected Results: (id) $10 = 0x200e0350 foo Actual Results: error: no known method '-anyObject'; cast the message send to the method's return type error: 1 errors parsing expression Workaround: (lldb) po [[set anyObject] foo] (id) $10 = 0x200e0350 foo Notes: The error message is also misleading, but at least the suggestion it makes provides another workaround. symbol.foo works if symbol is in scope (since lldb has type information for it).
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!