[Lldb-commits] [lldb] r226860 - Replace more runCmd('continue') with process control API.

Enrico Granata egranata at apple.com
Thu Jan 22 12:53:05 PST 2015


Author: enrico
Date: Thu Jan 22 14:53:04 2015
New Revision: 226860

URL: http://llvm.org/viewvc/llvm-project?rev=226860&view=rev
Log:
Replace more runCmd('continue') with process control API.

Modified:
    lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libcxx/multiset/TestDataFormatterLibcxxMultiSet.py
    lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libcxx/set/TestDataFormatterLibcxxSet.py
    lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libcxx/vector/TestDataFormatterLibcxxVector.py

Modified: lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libcxx/multiset/TestDataFormatterLibcxxMultiSet.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libcxx/multiset/TestDataFormatterLibcxxMultiSet.py?rev=226860&r1=226859&r2=226860&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libcxx/multiset/TestDataFormatterLibcxxMultiSet.py (original)
+++ lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libcxx/multiset/TestDataFormatterLibcxxMultiSet.py Thu Jan 22 14:53:04 2015
@@ -34,7 +34,7 @@ class LibcxxMultiSetDataFormatterTestCas
         """Test that that file and class static variables display correctly."""
         self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
 
-        lldbutil.run_break_set_by_source_regexp (self, "Set break point at this line.")
+        bkpt = self.target().FindBreakpointByID(lldbutil.run_break_set_by_source_regexp (self, "Set break point at this line."))
 
         self.runCmd("run", RUN_SUCCEEDED)
 
@@ -58,24 +58,24 @@ class LibcxxMultiSetDataFormatterTestCas
         self.expect('image list', substrs = self.getLibcPlusPlusLibs())
 
         self.expect("frame variable ii",substrs = ["size=0","{}"])
-        self.runCmd("continue")
+        lldbutil.continue_to_breakpoint(self.process(), bkpt)
         self.expect("frame variable ii",substrs = ["size=6","[0] = 0","[1] = 1", "[2] = 2", "[3] = 3", "[4] = 4", "[5] = 5"])
-        self.runCmd("continue")
+        lldbutil.continue_to_breakpoint(self.process(), bkpt)
         self.expect("frame variable ii",substrs = ["size=7","[2] = 2", "[3] = 3", "[6] = 6"])
         self.expect("p ii",substrs = ["size=7","[2] = 2", "[3] = 3", "[6] = 6"])
         self.expect("frame variable ii[2]",substrs = [" = 2"])
-        self.runCmd("continue")
+        lldbutil.continue_to_breakpoint(self.process(), bkpt)
         self.expect("frame variable ii",substrs = ["size=0","{}"])
-        self.runCmd("continue")
+        lldbutil.continue_to_breakpoint(self.process(), bkpt)
         self.expect("frame variable ii",substrs = ["size=0","{}"])
         self.expect("frame variable ss",substrs = ["size=0","{}"])
-        self.runCmd("continue")
+        lldbutil.continue_to_breakpoint(self.process(), bkpt)
         self.expect("frame variable ss",substrs = ["size=2",'[0] = "a"','[1] = "a very long string is right here"'])
-        self.runCmd("continue")
+        lldbutil.continue_to_breakpoint(self.process(), bkpt)
         self.expect("frame variable ss",substrs = ["size=4",'[2] = "b"','[3] = "c"','[0] = "a"','[1] = "a very long string is right here"'])
         self.expect("p ss",substrs = ["size=4",'[2] = "b"','[3] = "c"','[0] = "a"','[1] = "a very long string is right here"'])
         self.expect("frame variable ss[2]",substrs = [' = "b"'])
-        self.runCmd("continue")
+        lldbutil.continue_to_breakpoint(self.process(), bkpt)
         self.expect("frame variable ss",substrs = ["size=3",'[0] = "a"','[1] = "a very long string is right here"','[2] = "c"'])
 
 if __name__ == '__main__':

Modified: lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libcxx/set/TestDataFormatterLibcxxSet.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libcxx/set/TestDataFormatterLibcxxSet.py?rev=226860&r1=226859&r2=226860&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libcxx/set/TestDataFormatterLibcxxSet.py (original)
+++ lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libcxx/set/TestDataFormatterLibcxxSet.py Thu Jan 22 14:53:04 2015
@@ -34,7 +34,7 @@ class LibcxxSetDataFormatterTestCase(Tes
         """Test that that file and class static variables display correctly."""
         self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
 
-        lldbutil.run_break_set_by_source_regexp (self, "Set break point at this line.")
+        bkpt = self.target().FindBreakpointByID(lldbutil.run_break_set_by_source_regexp (self, "Set break point at this line."))
 
         self.runCmd("run", RUN_SUCCEEDED)
 
@@ -58,24 +58,24 @@ class LibcxxSetDataFormatterTestCase(Tes
         self.expect('image list', substrs = self.getLibcPlusPlusLibs())
 
         self.expect("frame variable ii",substrs = ["size=0","{}"])
-        self.runCmd("continue")
+        lldbutil.continue_to_breakpoint(self.process(), bkpt)
         self.expect("frame variable ii",substrs = ["size=6","[0] = 0","[1] = 1", "[2] = 2", "[3] = 3", "[4] = 4", "[5] = 5"])
-        self.runCmd("continue")
+        lldbutil.continue_to_breakpoint(self.process(), bkpt)
         self.expect("frame variable ii",substrs = ["size=7","[2] = 2", "[3] = 3", "[6] = 6"])
         self.expect("frame variable ii[2]",substrs = [" = 2"])
         self.expect("p ii",substrs = ["size=7","[2] = 2", "[3] = 3", "[6] = 6"])
-        self.runCmd("continue")
+        lldbutil.continue_to_breakpoint(self.process(), bkpt)
         self.expect("frame variable ii",substrs = ["size=0","{}"])
-        self.runCmd("continue")
+        lldbutil.continue_to_breakpoint(self.process(), bkpt)
         self.expect("frame variable ii",substrs = ["size=0","{}"])
         self.expect("frame variable ss",substrs = ["size=0","{}"])
-        self.runCmd("continue")
+        lldbutil.continue_to_breakpoint(self.process(), bkpt)
         self.expect("frame variable ss",substrs = ["size=2",'[0] = "a"','[1] = "a very long string is right here"'])
-        self.runCmd("continue")
+        lldbutil.continue_to_breakpoint(self.process(), bkpt)
         self.expect("frame variable ss",substrs = ["size=4",'[2] = "b"','[3] = "c"','[0] = "a"','[1] = "a very long string is right here"'])
         self.expect("p ss",substrs = ["size=4",'[2] = "b"','[3] = "c"','[0] = "a"','[1] = "a very long string is right here"'])
         self.expect("frame variable ss[2]",substrs = [' = "b"'])
-        self.runCmd("continue")
+        lldbutil.continue_to_breakpoint(self.process(), bkpt)
         self.expect("frame variable ss",substrs = ["size=3",'[0] = "a"','[1] = "a very long string is right here"','[2] = "c"'])
 
 if __name__ == '__main__':

Modified: lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libcxx/vector/TestDataFormatterLibcxxVector.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libcxx/vector/TestDataFormatterLibcxxVector.py?rev=226860&r1=226859&r2=226860&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libcxx/vector/TestDataFormatterLibcxxVector.py (original)
+++ lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libcxx/vector/TestDataFormatterLibcxxVector.py Thu Jan 22 14:53:04 2015
@@ -34,7 +34,7 @@ class LibcxxVectorDataFormatterTestCase(
         """Test that that file and class static variables display correctly."""
         self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
 
-        lldbutil.run_break_set_by_source_regexp (self, regexp="break here")
+        bkpt = self.target().FindBreakpointByID(lldbutil.run_break_set_by_source_regexp (self, "break here"))
 
         self.runCmd("run", RUN_SUCCEEDED)
 
@@ -59,7 +59,7 @@ class LibcxxVectorDataFormatterTestCase(
         self.expect("frame variable numbers",
             substrs = ['numbers = size=0'])
 
-        self.runCmd("continue")
+        lldbutil.continue_to_breakpoint(self.process(), bkpt)
         
         # first value added
         self.expect("frame variable numbers",
@@ -68,7 +68,7 @@ class LibcxxVectorDataFormatterTestCase(
                                '}'])
 
         # add some more data
-        self.runCmd("continue");
+        lldbutil.continue_to_breakpoint(self.process(), bkpt)
     
         self.expect("frame variable numbers",
                     substrs = ['numbers = size=4',
@@ -100,7 +100,7 @@ class LibcxxVectorDataFormatterTestCase(
         self.runCmd("type summary delete int_vect")
 
         # add some more data
-        self.runCmd("continue");
+        lldbutil.continue_to_breakpoint(self.process(), bkpt)
 
         self.expect("frame variable numbers",
                     substrs = ['numbers = size=7',
@@ -135,12 +135,12 @@ class LibcxxVectorDataFormatterTestCase(
                     substrs = ['1234']);
 
         # clear out the vector and see that we do the right thing once again
-        self.runCmd("continue")
+        lldbutil.continue_to_breakpoint(self.process(), bkpt)
 
         self.expect("frame variable numbers",
             substrs = ['numbers = size=0'])
 
-        self.runCmd("continue")
+        lldbutil.continue_to_breakpoint(self.process(), bkpt)
 
         # first value added
         self.expect("frame variable numbers",
@@ -173,7 +173,7 @@ class LibcxxVectorDataFormatterTestCase(
                                'is',
                                'smart'])
 
-        self.runCmd("continue")
+        lldbutil.continue_to_breakpoint(self.process(), bkpt)
 
         self.expect("frame variable strings",
                     substrs = ['vector has 4 items'])
@@ -184,7 +184,7 @@ class LibcxxVectorDataFormatterTestCase(
         self.expect("frame variable strings[1]",
                     substrs = ['is']);
 
-        self.runCmd("continue")
+        lldbutil.continue_to_breakpoint(self.process(), bkpt)
 
         self.expect("frame variable strings",
             substrs = ['vector has 0 items'])





More information about the lldb-commits mailing list