2 Confirm that lldb modify watchpoints only stop
3 when the value being watched changes.
8 from lldbsuite
.test
.decorators
import *
9 from lldbsuite
.test
.lldbtest
import *
10 from lldbsuite
.test
import lldbutil
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."""
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")
27 frame
= process
.GetSelectedThread().GetFrameAtIndex(0)
28 self
.assertEqual(frame
.locals["value"][0].GetValueAsUnsigned(), 10)
31 frame
= process
.GetSelectedThread().GetFrameAtIndex(0)
32 self
.assertEqual(frame
.locals["value"][0].GetValueAsUnsigned(), 5)
35 frame
= process
.GetSelectedThread().GetFrameAtIndex(0)
36 self
.assertEqual(frame
.locals["value"][0].GetValueAsUnsigned(), 7)
39 frame
= process
.GetSelectedThread().GetFrameAtIndex(0)
40 self
.assertEqual(frame
.locals["value"][0].GetValueAsUnsigned(), 9)