diff options
author | Enrico Granata <egranata@apple.com> | 2012-03-31 00:15:24 +0000 |
---|---|---|
committer | Enrico Granata <egranata@apple.com> | 2012-03-31 00:15:24 +0000 |
commit | 79c1baf6ddd380399c82a8ff263dbb96febe3262 (patch) | |
tree | b90b9381d9fc1ffec36d35213787c37c2631299f | |
parent | 1517dd33d98e9ab203401c292308585126821e0b (diff) | |
download | bcm5719-llvm-79c1baf6ddd380399c82a8ff263dbb96febe3262.tar.gz bcm5719-llvm-79c1baf6ddd380399c82a8ff263dbb96febe3262.zip |
Making sure the count on synthetic providers is always setup - This should prevent errors about count being undefined from showing up
llvm-svn: 153791
-rw-r--r-- | lldb/examples/synthetic/gnu_libstdcpp.py | 8 | ||||
-rw-r--r-- | lldb/examples/synthetic/libcxx.py | 4 |
2 files changed, 8 insertions, 4 deletions
diff --git a/lldb/examples/synthetic/gnu_libstdcpp.py b/lldb/examples/synthetic/gnu_libstdcpp.py index 88ef55a1d92..009e39084a7 100644 --- a/lldb/examples/synthetic/gnu_libstdcpp.py +++ b/lldb/examples/synthetic/gnu_libstdcpp.py @@ -117,6 +117,8 @@ class StdListSynthProvider: def update(self): logger = Logger.Logger() + # preemptively setting this to None - we might end up changing our mind later + self.count = None try: impl = self.valobj.GetChildMemberWithName('_M_impl') node = impl.GetChildMemberWithName('_M_node') @@ -125,7 +127,6 @@ class StdListSynthProvider: self.prev = node.GetChildMemberWithName('_M_prev') self.data_type = self.extract_type() self.data_size = self.data_type.GetByteSize() - self.count = None except: pass @@ -204,6 +205,8 @@ class StdVectorSynthProvider: def update(self): logger = Logger.Logger() + # preemptively setting this to None - we might end up changing our mind later + self.count = None try: impl = self.valobj.GetChildMemberWithName('_M_impl') self.start = impl.GetChildMemberWithName('_M_start') @@ -248,8 +251,9 @@ class StdMapSynthProvider: def update(self): logger = Logger.Logger() + # preemptively setting this to None - we might end up changing our mind later + self.count = None try: - self.count = None # we will set this to True if we find out that discovering a node in the map takes more steps than the overall size of the RB tree # if this gets set to True, then we will merrily return None for any child from that moment on self.garbage = False diff --git a/lldb/examples/synthetic/libcxx.py b/lldb/examples/synthetic/libcxx.py index 94ebb19b391..5deff1fd0ce 100644 --- a/lldb/examples/synthetic/libcxx.py +++ b/lldb/examples/synthetic/libcxx.py @@ -302,6 +302,7 @@ class stdlist_SynthProvider: def update(self): logger = Logger.Logger() + self.count = None try: impl = self.valobj.GetChildMemberWithName('__end_') self.node_address = self.valobj.AddressOf().GetValueAsUnsigned(0) @@ -309,7 +310,6 @@ class stdlist_SynthProvider: self.tail = impl.GetChildMemberWithName('__prev_') self.data_type = self.extract_type() self.data_size = self.data_type.GetByteSize() - self.count = None except: pass @@ -441,6 +441,7 @@ class stdmap_SynthProvider: def update(self): logger = Logger.Logger() + self.count = None try: # we will set this to True if we find out that discovering a node in the map takes more steps than the overall size of the RB tree # if this gets set to True, then we will merrily return None for any child from that moment on @@ -452,7 +453,6 @@ class stdmap_SynthProvider: self.data_type = None self.data_size = None self.skip_size = None - self.count = None except: pass |