summaryrefslogtreecommitdiffstats
path: root/lldb/test/python_api/module_section
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2012-02-04 02:27:34 +0000
committerGreg Clayton <gclayton@apple.com>2012-02-04 02:27:34 +0000
commit81e871ed761101fb065a097b5b9351e179964d1a (patch)
tree8c23b46dff2d3d1953620bcebd77d445a2793358 /lldb/test/python_api/module_section
parentd0ba3793aab037c831a0cefeafda8398591f5497 (diff)
downloadbcm5719-llvm-81e871ed761101fb065a097b5b9351e179964d1a.tar.gz
bcm5719-llvm-81e871ed761101fb065a097b5b9351e179964d1a.zip
Convert all python objects in our API to use overload the __str__ method
instead of the __repr__. __repr__ is a function that should return an expression that can be used to recreate an python object and we were using it to just return a human readable string. Fixed a crasher when using the new implementation of SBValue::Cast(SBType). Thread hardened lldb::SBValue and lldb::SBWatchpoint and did other general improvements to the API. Fixed a crasher in lldb::SBValue::GetChildMemberWithName() where we didn't correctly handle not having a target. llvm-svn: 149743
Diffstat (limited to 'lldb/test/python_api/module_section')
-rw-r--r--lldb/test/python_api/module_section/TestModuleAndSection.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/lldb/test/python_api/module_section/TestModuleAndSection.py b/lldb/test/python_api/module_section/TestModuleAndSection.py
index 1ebe9d33433..f9562cbf490 100644
--- a/lldb/test/python_api/module_section/TestModuleAndSection.py
+++ b/lldb/test/python_api/module_section/TestModuleAndSection.py
@@ -43,7 +43,7 @@ class ModuleAndSectionAPIsTestCase(TestBase):
# Get the executable module at index 0.
exe_module = target.GetModuleAtIndex(0)
- print "Exe module: %s" % repr(exe_module)
+ print "Exe module: %s" % str(exe_module)
print "Number of sections: %d" % exe_module.GetNumSections()
INDENT = ' ' * 4
INDENT2 = INDENT * 2
@@ -52,14 +52,14 @@ class ModuleAndSectionAPIsTestCase(TestBase):
print INDENT + "Number of subsections: %d" % sec.GetNumSubSections()
if sec.GetNumSubSections() == 0:
for sym in exe_module.symbol_in_section_iter(sec):
- print INDENT + repr(sym)
+ print INDENT + str(sym)
print INDENT + "symbol type: %s" % symbol_type_to_str(sym.GetType())
else:
for subsec in sec:
- print INDENT + repr(subsec)
+ print INDENT + str(subsec)
# Now print the symbols belonging to the subsection....
for sym in exe_module.symbol_in_section_iter(subsec):
- print INDENT2 + repr(sym)
+ print INDENT2 + str(sym)
print INDENT2 + "symbol type: %s" % symbol_type_to_str(sym.GetType())
def module_and_section_boundary_condition(self):
@@ -80,7 +80,7 @@ class ModuleAndSectionAPIsTestCase(TestBase):
# Get the executable module at index 0.
exe_module = target.GetModuleAtIndex(0)
- print "Exe module: %s" % repr(exe_module)
+ print "Exe module: %s" % str(exe_module)
print "Number of sections: %d" % exe_module.GetNumSections()
# Boundary condition testings. Should not crash lldb!
OpenPOWER on IntegriCloud