[lldb/Dataformatter] Add support for CoreFoundation Dictionaries and Sets
This patch improves data formatting for CoreFoundation containers:
CFDictionary and CFSet.
These data formatters make the containers and their children appear in Xcode's
variables view (and on the command line) without having to expand the
data structure.
Previous implementation (D48450) only supported showing the container's element count.
(lldb) frame var dict (__NSCFDictionary *) dict = 0x00000001004062b0 2 key/value pairs (lldb) frame var set (__NSCFSet *) set = 0x0000000100406330 2 elements
Now the variable can be dereferenced to dispaly the container's elements:
(lldb) frame var *dict (__NSCFDictionary) *dict = { [0] = { key = 0x0000000100004050 @"123" value = 0x0000000100004090 @"456" } [1] = { key = 0x0000000100004030 @"abc" value = 0x0000000100004070 @"def" } } (lldb) frame var *set (__NSCFSet) *set = { [0] = 0x0000000100004050 @"123" [1] = 0x0000000100004030 @"abc" }
rdar://39882287
Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
uint32_t m_ptr_size = UINT32_MAX;