[test] Remove print statements and verify that the symbol exists

This removes some (commented out) print statements and adds a line that
verifies that uses image list to check the symbol.

llvm-svn: 370777
This commit is contained in:
Jonas Devlieghere 2019-09-03 16:26:44 +00:00
parent f792054fd2
commit 063aac6cf3
1 changed files with 1 additions and 10 deletions

View File

@ -2,9 +2,6 @@
Test the lldb disassemble command on foundation framework. Test the lldb disassemble command on foundation framework.
""" """
from __future__ import print_function
import unittest2 import unittest2
import os import os
import lldb import lldb
@ -36,7 +33,6 @@ class FoundationDisassembleTestCase(TestBase):
foundation_framework = None foundation_framework = None
for module in target.modules: for module in target.modules:
print(module)
if module.file.basename == "Foundation": if module.file.basename == "Foundation":
foundation_framework = module.file.fullpath foundation_framework = module.file.fullpath
break break
@ -61,8 +57,7 @@ class FoundationDisassembleTestCase(TestBase):
match = codeRE.search(line) match = codeRE.search(line)
if match: if match:
func = match.group(1) func = match.group(1)
#print("line:", line) self.runCmd('image lookup -s "%s"' % func)
#print("func:", func)
self.runCmd('disassemble -n "%s"' % func) self.runCmd('disassemble -n "%s"' % func)
def test_simple_disasm(self): def test_simple_disasm(self):
@ -73,10 +68,6 @@ class FoundationDisassembleTestCase(TestBase):
target = self.dbg.CreateTarget(self.getBuildArtifact("a.out")) target = self.dbg.CreateTarget(self.getBuildArtifact("a.out"))
self.assertTrue(target, VALID_TARGET) self.assertTrue(target, VALID_TARGET)
print(target)
for module in target.modules:
print(module)
# Stop at +[NSString stringWithFormat:]. # Stop at +[NSString stringWithFormat:].
symbol_name = "+[NSString stringWithFormat:]" symbol_name = "+[NSString stringWithFormat:]"
break_results = lldbutil.run_break_set_command( break_results = lldbutil.run_break_set_command(