[AMDGPU] Add True16 register classes.
[llvm-project.git] / lldb / test / API / commands / watchpoints / multiple_hits / TestMultipleHits.py
blob832e14b1c3137fe8ee83153629d8610f43cdf2d8
1 """
2 Test handling of cases when a single instruction triggers multiple watchpoints
3 """
6 import lldb
7 from lldbsuite.test.decorators import *
8 from lldbsuite.test.lldbtest import *
9 from lldbsuite.test import lldbutil
12 class MultipleHitsTestCase(TestBase):
13 NO_DEBUG_INFO_TESTCASE = True
15 @skipIf(
16 bugnumber="llvm.org/pr30758",
17 oslist=["linux"],
18 archs=["arm", "aarch64", "powerpc64le"],
20 @skipIfwatchOS
21 def test(self):
22 self.build()
23 target = self.createTestTarget()
25 bp = target.BreakpointCreateByName("main")
26 self.assertTrue(bp and bp.IsValid(), "Breakpoint is valid")
28 process = target.LaunchSimple(None, None, self.get_process_working_directory())
29 self.assertState(process.GetState(), lldb.eStateStopped)
31 thread = lldbutil.get_stopped_thread(process, lldb.eStopReasonBreakpoint)
32 self.assertIsNotNone(thread)
34 frame = thread.GetFrameAtIndex(0)
35 self.assertTrue(frame and frame.IsValid(), "Frame is valid")
37 buf = frame.FindValue("buf", lldb.eValueTypeVariableGlobal)
38 self.assertTrue(buf and buf.IsValid(), "buf is valid")
40 for i in [0, target.GetAddressByteSize()]:
41 member = buf.GetChildAtIndex(i)
42 self.assertTrue(member and member.IsValid(), "member is valid")
44 error = lldb.SBError()
45 watch = member.Watch(True, True, True, error)
46 self.assertSuccess(error)
48 process.Continue()
49 self.assertState(process.GetState(), lldb.eStateStopped)
50 self.assertStopReason(thread.GetStopReason(), lldb.eStopReasonWatchpoint)