summaryrefslogtreecommitdiffstats
path: root/lldb/examples/summaries/cocoa/CFBinaryHeap.py
diff options
context:
space:
mode:
authorEnrico Granata <egranata@apple.com>2012-02-29 03:28:49 +0000
committerEnrico Granata <egranata@apple.com>2012-02-29 03:28:49 +0000
commit7bc0ec3aad663a2c81fddf9da38dba46bba6be19 (patch)
tree3c6cb745570d4095b37a18dd0f6cbacf04e79eaf /lldb/examples/summaries/cocoa/CFBinaryHeap.py
parent3203f6b9daa558443f406686522780d0271d7824 (diff)
downloadbcm5719-llvm-7bc0ec3aad663a2c81fddf9da38dba46bba6be19.tar.gz
bcm5719-llvm-7bc0ec3aad663a2c81fddf9da38dba46bba6be19.zip
This commit:
a) adds a Python summary provider for NSDate b) changes the initialization for ScriptInterpreter so that we are not passing a bulk of Python-specific function pointers around c) provides a new ScriptInterpreterObject class that allows for ref-count safe wrapping of scripting objects on the C++ side d) contains much needed performance improvements: 1) the pointer to the Python function generating a scripted summary is now cached instead of looked up every time 2) redundant memory reads in the Python ObjC runtime wrapper are eliminated 3) summaries now use the m_summary_str in ValueObject to store their data instead of passing around ( == copying) an std::string object e) contains other minor fixes, such as adding descriptive error messages for some cases of summary generation failure llvm-svn: 151703
Diffstat (limited to 'lldb/examples/summaries/cocoa/CFBinaryHeap.py')
-rw-r--r--lldb/examples/summaries/cocoa/CFBinaryHeap.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/lldb/examples/summaries/cocoa/CFBinaryHeap.py b/lldb/examples/summaries/cocoa/CFBinaryHeap.py
index d0542abfcc7..0a120745c3c 100644
--- a/lldb/examples/summaries/cocoa/CFBinaryHeap.py
+++ b/lldb/examples/summaries/cocoa/CFBinaryHeap.py
@@ -15,7 +15,7 @@ statistics.add_metric('code_notrun')
# obey the interface specification for synthetic children providers
class CFBinaryHeapRef_SummaryProvider:
def adjust_for_architecture(self):
- self.lp64 = (self.valobj.GetTarget().GetProcess().GetAddressByteSize() == 8)
+ self.is_64_bit = (self.valobj.GetTarget().GetProcess().GetAddressByteSize() == 8)
self.is_little = (self.valobj.GetTarget().GetProcess().GetByteOrder() == lldb.eByteOrderLittle)
self.pointer_size = self.valobj.GetTarget().GetProcess().GetAddressByteSize()
@@ -26,7 +26,7 @@ class CFBinaryHeapRef_SummaryProvider:
def update(self):
self.adjust_for_architecture();
self.id_type = self.valobj.GetType().GetBasicType(lldb.eBasicTypeObjCID)
- if self.lp64:
+ if self.is_64_bit:
self.NSUInteger = self.valobj.GetType().GetBasicType(lldb.eBasicTypeUnsignedLong)
else:
self.NSUInteger = self.valobj.GetType().GetBasicType(lldb.eBasicTypeUnsignedInt)
@@ -35,7 +35,7 @@ class CFBinaryHeapRef_SummaryProvider:
# 16 bytes on x64
# most probably 2 pointers
def offset(self):
- if self.lp64:
+ if self.is_64_bit:
return 16
else:
return 8
@@ -49,7 +49,7 @@ class CFBinaryHeapRef_SummaryProvider:
class CFBinaryHeapUnknown_SummaryProvider:
def adjust_for_architecture(self):
- self.lp64 = (self.valobj.GetTarget().GetProcess().GetAddressByteSize() == 8)
+ self.is_64_bit = (self.valobj.GetTarget().GetProcess().GetAddressByteSize() == 8)
self.is_little = (self.valobj.GetTarget().GetProcess().GetByteOrder() == lldb.eByteOrderLittle)
self.pointer_size = self.valobj.GetTarget().GetProcess().GetAddressByteSize()
@@ -117,7 +117,7 @@ def CFBinaryHeap_SummaryProvider (valobj,dict):
if summary == None:
summary = 'no valid set here'
else:
- if provider.lp64:
+ if provider.is_64_bit:
summary = summary & ~0x1fff000000000000
if summary == 1:
return '1 item'
OpenPOWER on IntegriCloud