[Lldb-commits] [lldb] r153791 - in /lldb/trunk/examples/synthetic: gnu_libstdcpp.py libcxx.py
Enrico Granata
egranata at apple.com
Fri Mar 30 17:15:25 PDT 2012
Author: enrico
Date: Fri Mar 30 19:15:24 2012
New Revision: 153791
URL: http://llvm.org/viewvc/llvm-project?rev=153791&view=rev
Log:
Making sure the count on synthetic providers is always setup - This should prevent errors about count being undefined from showing up
Modified:
lldb/trunk/examples/synthetic/gnu_libstdcpp.py
lldb/trunk/examples/synthetic/libcxx.py
Modified: lldb/trunk/examples/synthetic/gnu_libstdcpp.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/examples/synthetic/gnu_libstdcpp.py?rev=153791&r1=153790&r2=153791&view=diff
==============================================================================
--- lldb/trunk/examples/synthetic/gnu_libstdcpp.py (original)
+++ lldb/trunk/examples/synthetic/gnu_libstdcpp.py Fri Mar 30 19:15:24 2012
@@ -117,6 +117,8 @@
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 @@
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 @@
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 @@
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
Modified: lldb/trunk/examples/synthetic/libcxx.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/examples/synthetic/libcxx.py?rev=153791&r1=153790&r2=153791&view=diff
==============================================================================
--- lldb/trunk/examples/synthetic/libcxx.py (original)
+++ lldb/trunk/examples/synthetic/libcxx.py Fri Mar 30 19:15:24 2012
@@ -302,6 +302,7 @@
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 @@
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 @@
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 @@
self.data_type = None
self.data_size = None
self.skip_size = None
- self.count = None
except:
pass
More information about the lldb-commits
mailing list