[Lldb-commits] [lldb] r251308 - Fix tabs and spaces in one of the python files.
Zachary Turner via lldb-commits
lldb-commits at lists.llvm.org
Mon Oct 26 09:51:37 PDT 2015
Author: zturner
Date: Mon Oct 26 11:51:36 2015
New Revision: 251308
URL: http://llvm.org/viewvc/llvm-project?rev=251308&view=rev
Log:
Fix tabs and spaces in one of the python files.
Modified:
lldb/trunk/examples/synthetic/gnu_libstdcpp.py
Modified: lldb/trunk/examples/synthetic/gnu_libstdcpp.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/examples/synthetic/gnu_libstdcpp.py?rev=251308&r1=251307&r2=251308&view=diff
==============================================================================
--- lldb/trunk/examples/synthetic/gnu_libstdcpp.py (original)
+++ lldb/trunk/examples/synthetic/gnu_libstdcpp.py Mon Oct 26 11:51:36 2015
@@ -22,19 +22,17 @@ class StdListSynthProvider:
def is_valid(self,node):
logger = lldb.formatters.Logger.Logger()
valid = self.value(self.next_node(node)) != self.node_address
- if valid:
- logger >> "%s is valid" % str(self.valobj.GetName())
- else:
- logger >> "synthetic value is not valid"
- return valid
+ if valid:
+ logger >> "%s is valid" % str(self.valobj.GetName())
+ else:
+ logger >> "synthetic value is not valid"
+ return valid
def value(self,node):
logger = lldb.formatters.Logger.Logger()
- value = node.GetValueAsUnsigned()
- logger >> "synthetic value for {}: {}".format(
- str(self.valobj.GetName()),
- value)
- return value
+ value = node.GetValueAsUnsigned()
+ logger >> "synthetic value for {}: {}".format(str(self.valobj.GetName()), value)
+ return value
# Floyd's cycle-finding algorithm
# try to detect if this list has a loop
@@ -59,12 +57,12 @@ class StdListSynthProvider:
def num_children(self):
logger = lldb.formatters.Logger.Logger()
if self.count is None:
- # libstdc++ 6.0.21 added dedicated count field.
- count_child = self.node.GetChildMemberWithName('_M_data')
- if count_child and count_child.IsValid():
- self.count = count_child.GetValueAsUnsigned(0)
- if self.count is None:
- self.count = self.num_children_impl()
+ # libstdc++ 6.0.21 added dedicated count field.
+ count_child = self.node.GetChildMemberWithName('_M_data')
+ if count_child and count_child.IsValid():
+ self.count = count_child.GetValueAsUnsigned(0)
+ if self.count is None:
+ self.count = self.num_children_impl()
return self.count
def num_children_impl(self):
More information about the lldb-commits
mailing list