"""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)
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__':
"""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)
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__':
"""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)
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",
'}'])
# add some more data
- self.runCmd("continue");
+ lldbutil.continue_to_breakpoint(self.process(), bkpt)
self.expect("frame variable numbers",
substrs = ['numbers = size=4',
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',
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",
'is',
'smart'])
- self.runCmd("continue")
+ lldbutil.continue_to_breakpoint(self.process(), bkpt)
self.expect("frame variable strings",
substrs = ['vector has 4 items'])
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'])