2 Test lldb breakpoint ids.
8 from lldbsuite.test.lldbtest import *
9 import lldbsuite.test.lldbutil as lldbutil
12 class BreakpointIDTestCase(TestBase):
14 mydir = TestBase.compute_mydir(__file__)
19 exe = self.getBuildArtifact("a.out")
20 self.expect("file " + exe,
21 patterns=["Current executable set to .*a.out"])
23 bpno = lldbutil.run_break_set_by_symbol(
24 self, 'product', num_expected_locations=-1, sym_exact=False)
25 self.assertTrue(bpno == 1, "First breakpoint number is 1.")
27 bpno = lldbutil.run_break_set_by_symbol(
28 self, 'sum', num_expected_locations=-1, sym_exact=False)
29 self.assertTrue(bpno == 2, "Second breakpoint number is 2.")
31 bpno = lldbutil.run_break_set_by_symbol(
32 self, 'junk', num_expected_locations=0, sym_exact=False)
33 self.assertTrue(bpno == 3, "Third breakpoint number is 3.")
36 "breakpoint disable 1.1 - 2.2 ",
37 COMMAND_FAILED_AS_EXPECTED,
39 startstr="error: Invalid range: Ranges that specify particular breakpoint locations must be within the same major breakpoint; you specified two different major breakpoints, 1 and 2.")
42 "breakpoint disable 2 - 2.2",
43 COMMAND_FAILED_AS_EXPECTED,
45 startstr="error: Invalid breakpoint id range: Either both ends of range must specify a breakpoint location, or neither can specify a breakpoint location.")
48 "breakpoint disable 2.1 - 2",
49 COMMAND_FAILED_AS_EXPECTED,
51 startstr="error: Invalid breakpoint id range: Either both ends of range must specify a breakpoint location, or neither can specify a breakpoint location.")
53 self.expect("breakpoint disable 2.1 - 2.2",
54 startstr="2 breakpoints disabled.")
56 self.expect("breakpoint enable 2.*",
57 patterns=[".* breakpoints enabled."])