Revert "[LoongArch] Eliminate the redundant sign extension of division (#107971)"
[llvm-project.git] / lldb / test / API / functionalities / watchpoint / modify-watchpoints / TestModifyWatchpoint.py
blobb581969208da50a84486b7e5933548903f861246
1 """
2 Confirm that lldb modify watchpoints only stop
3 when the value being watched changes.
4 """
7 import lldb
8 from lldbsuite.test.decorators import *
9 from lldbsuite.test.lldbtest import *
10 from lldbsuite.test import lldbutil
13 @skipIfWindows
14 class ModifyWatchpointTestCase(TestBase):
15 NO_DEBUG_INFO_TESTCASE = True
17 def test_modify_watchpoint(self):
18 """Test that a modify watchpoint only stops when the value changes."""
19 self.build()
20 self.main_source_file = lldb.SBFileSpec("main.c")
21 (target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint(
22 self, "break here", self.main_source_file
25 self.runCmd("watch set variable value")
26 process.Continue()
27 frame = process.GetSelectedThread().GetFrameAtIndex(0)
28 self.assertEqual(frame.locals["value"][0].GetValueAsUnsigned(), 10)
30 process.Continue()
31 frame = process.GetSelectedThread().GetFrameAtIndex(0)
32 self.assertEqual(frame.locals["value"][0].GetValueAsUnsigned(), 5)
34 process.Continue()
35 frame = process.GetSelectedThread().GetFrameAtIndex(0)
36 self.assertEqual(frame.locals["value"][0].GetValueAsUnsigned(), 7)
38 process.Continue()
39 frame = process.GetSelectedThread().GetFrameAtIndex(0)
40 self.assertEqual(frame.locals["value"][0].GetValueAsUnsigned(), 9)