Now in the presence of an Objective-C version 2
authorSean Callanan <scallanan@apple.com>
Sat, 29 Sep 2012 01:53:36 +0000 (01:53 +0000)
committerSean Callanan <scallanan@apple.com>
Sat, 29 Sep 2012 01:53:36 +0000 (01:53 +0000)
commiteb918cd789d6b7ac48e7a38fb01b4c92f497b0a2
tree0d7ae1a269a33cf313a3b05bad840f8cc178af28
parentd60b9168fa14b091a9e89f38484b64e57e1e5ece
Now in the presence of an Objective-C version 2
runtime, we read method signatures for both class
and instance methods out of the runtime data.

(lldb) fr var str
(NSString *) str = 0x0000000105000180 @"Hello from '/Volumes/Data/projects/lldb/test/lang/objc/foundation/a.out'"
(lldb) expr str.length
(unsigned long long) $0 = 72
(lldb) expr [NSString stringWithCString:"Hello world!" encoding:1]
(id) $1 = 0x0000000105100050
(lldb) po $1
$1 = 0x0000000105100050 Hello world!

(lldb) fr var array1
(NSArray *) array1 = 0x000000010010a6e0 @"3 objects"
(lldb) expr array1.count
(unsigned long long) $0 = 3
(lldb) expr [array1 objectAtIndex:2]
(id) $1 = 0x00000001000025d0
(lldb) po $1
$1 = 0x00000001000025d0 array1 object3

Notice that both regular and property-style notation
work.  I still need to add explicit support for
properties with non-default setters/getters.

This information is only queried if an Objective-C
object does not have debug information for a complete
type available.  Otherwise we query debug information
as usual.

llvm-svn: 164878
lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTypeVendor.cpp