[Lldb-commits] [lldb] r370777 - [test] Remove print statements and verify that the symbol exists

Jonas Devlieghere via lldb-commits lldb-commits at lists.llvm.org
Tue Sep 3 09:26:44 PDT 2019


Author: jdevlieghere
Date: Tue Sep  3 09:26:44 2019
New Revision: 370777

URL: http://llvm.org/viewvc/llvm-project?rev=370777&view=rev
Log:
[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.

Modified:
    lldb/trunk/packages/Python/lldbsuite/test/lang/objc/foundation/TestFoundationDisassembly.py

Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/objc/foundation/TestFoundationDisassembly.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/objc/foundation/TestFoundationDisassembly.py?rev=370777&r1=370776&r2=370777&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lang/objc/foundation/TestFoundationDisassembly.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/objc/foundation/TestFoundationDisassembly.py Tue Sep  3 09:26:44 2019
@@ -2,9 +2,6 @@
 Test the lldb disassemble command on foundation framework.
 """
 
-from __future__ import print_function
-
-
 import unittest2
 import os
 import lldb
@@ -36,7 +33,6 @@ class FoundationDisassembleTestCase(Test
 
         foundation_framework = None
         for module in target.modules:
-            print(module)
             if module.file.basename == "Foundation":
                 foundation_framework = module.file.fullpath
                 break
@@ -61,8 +57,7 @@ class FoundationDisassembleTestCase(Test
             match = codeRE.search(line)
             if match:
                 func = match.group(1)
-                #print("line:", line)
-                #print("func:", func)
+                self.runCmd('image lookup -s "%s"' % func)
                 self.runCmd('disassemble -n "%s"' % func)
 
     def test_simple_disasm(self):
@@ -73,10 +68,6 @@ class FoundationDisassembleTestCase(Test
         target = self.dbg.CreateTarget(self.getBuildArtifact("a.out"))
         self.assertTrue(target, VALID_TARGET)
 
-        print(target)
-        for module in target.modules:
-            print(module)
-
         # Stop at +[NSString stringWithFormat:].
         symbol_name = "+[NSString stringWithFormat:]"
         break_results = lldbutil.run_break_set_command(




More information about the lldb-commits mailing list