summaryrefslogtreecommitdiffstats
path: root/lldb/examples/summaries/cocoa/NSNumber.py
diff options
context:
space:
mode:
authorEnrico Granata <egranata@apple.com>2012-03-01 19:32:33 +0000
committerEnrico Granata <egranata@apple.com>2012-03-01 19:32:33 +0000
commit896cd1d3e675b1c7be05be9975b09df1bafca9eb (patch)
tree611167d97b5f252bc9b80677d08ed7a34398257a /lldb/examples/summaries/cocoa/NSNumber.py
parent34085df4e852438dd156fcd87bfd650be9243d2c (diff)
downloadbcm5719-llvm-896cd1d3e675b1c7be05be9975b09df1bafca9eb.tar.gz
bcm5719-llvm-896cd1d3e675b1c7be05be9975b09df1bafca9eb.zip
(a) adding an introspection formatter for NS(Mutable)IndexSet
(b) fixes and improvements to the formatters for NSDate and NSString (c) adding an introspection formatter for NSCountedSet (d) making the Objective-C formatters test cases pass on both 64 and 32 bit one of the test cases is marked as expected failure on i386 - support needs to be added to the LLDB core for it to pass llvm-svn: 151826
Diffstat (limited to 'lldb/examples/summaries/cocoa/NSNumber.py')
-rw-r--r--lldb/examples/summaries/cocoa/NSNumber.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/lldb/examples/summaries/cocoa/NSNumber.py b/lldb/examples/summaries/cocoa/NSNumber.py
index dfe0917b11d..7726dedb179 100644
--- a/lldb/examples/summaries/cocoa/NSNumber.py
+++ b/lldb/examples/summaries/cocoa/NSNumber.py
@@ -116,8 +116,16 @@ class NSUntaggedNumber_SummaryProvider:
return '(int)' + str(data_vo.GetValueAsUnsigned(0) % (256*256*256*256))
# apparently, on is_64_bit architectures, these are the only values that will ever
# be represented by a non tagged pointers
- elif data_type == 0B10001 or data_type == 0B0100:
- data_offset = data_offset + self.pointer_size
+ elif data_type == 0B10001:
+ data_offset = data_offset + 8 # 8 is needed even if we are on 32bit
+ data_vo = self.valobj.CreateChildAtOffset("data",
+ data_offset,
+ self.longlong)
+ statistics.metric_hit('code_notrun',self.valobj)
+ return '(long)' + str(data_vo.GetValueAsUnsigned(0))
+ elif data_type == 0B0100:
+ if self.is_64_bit:
+ data_offset = data_offset + self.pointer_size
data_vo = self.valobj.CreateChildAtOffset("data",
data_offset,
self.longlong)
OpenPOWER on IntegriCloud