NO_DEBUG_INFO_TESTCASE = True
mydir = TestBase.compute_mydir(__file__)
+ def supports_hw_breakpoints(self):
+ self.build()
+ self.runCmd("file " + self.getBuildArtifact("a.out"),
+ CURRENT_EXECUTABLE_SET)
+ self.runCmd("breakpoint set -b main --hardware")
+ self.runCmd("run")
+ print(self.res.GetOutput())
+ if 'stopped' in self.res.GetOutput():
+ return 'Hardware breakpoints are supported'
+ return None
+
def test_breakpoint(self):
"""Test regular breakpoints when hardware breakpoints are required."""
self.build()
self.assertTrue(breakpoint.IsHardware())
@skipIfWindows
- @expectedFailureAll(archs="aarch64", oslist="linux",
- bugnumber="https://bugs.llvm.org/show_bug.cgi?id=44055")
+ @expectedFailure(supports_hw_breakpoints)
def test_step_range(self):
"""Test stepping when hardware breakpoints are required."""
self.build()
in error.GetCString())
@skipIfWindows
- @expectedFailureAll(archs="aarch64", oslist="linux",
- bugnumber="https://bugs.llvm.org/show_bug.cgi?id=44055")
+ @expectedFailure(supports_hw_breakpoints)
def test_step_out(self):
"""Test stepping out when hardware breakpoints are required."""
self.build()
in error.GetCString())
@skipIfWindows
- @expectedFailureAll(archs="aarch64", oslist="linux",
- bugnumber="https://bugs.llvm.org/show_bug.cgi?id=44055")
+ @expectedFailure(supports_hw_breakpoints)
def test_step_over(self):
"""Test stepping over when hardware breakpoints are required."""
self.build()
])
@skipIfWindows
- @expectedFailureAll(archs="aarch64", oslist="linux",
- bugnumber="https://bugs.llvm.org/show_bug.cgi?id=44055")
+ @expectedFailure(supports_hw_breakpoints)
def test_step_until(self):
"""Test stepping until when hardware breakpoints are required."""
self.build()