xref: /llvm-project/lldb/test/API/functionalities/breakpoint/hardware_breakpoints/base.py (revision 2238dcc39358353cac21df75c3c3286ab20b8f53)
1"""
2Base class for hardware breakpoints tests.
3"""
4
5from lldbsuite.test.lldbtest import *
6
7
8class HardwareBreakpointTestBase(TestBase):
9    NO_DEBUG_INFO_TESTCASE = True
10
11    def supports_hw_breakpoints(self):
12        self.build()
13        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
14        self.runCmd("breakpoint set -b main --hardware")
15        self.runCmd("run")
16        if "stopped" in self.res.GetOutput():
17            return "Hardware breakpoints are supported"
18        return None
19