11"""
2- Watch larger-than-8-bytes regions of memory, confirm that
3- writes to those regions are detected .
2+ Watch contiguous memory regions with separate watchpoints, check that lldb
3+ correctly detect which watchpoint was hit for each one .
44"""
55
66import lldb
@@ -47,10 +47,16 @@ def test_large_watchpoint(self):
4747 .GetChildMemberWithName ("field4" )
4848 .Watch (True , False , True )
4949 )
50+ field5_wp = (
51+ frame .locals ["var" ][0 ]
52+ .GetChildMemberWithName ("field5" )
53+ .Watch (True , False , True )
54+ )
5055
5156 self .assertTrue (field2_wp .IsValid ())
5257 self .assertTrue (field3_wp .IsValid ())
5358 self .assertTrue (field4_wp .IsValid ())
59+ self .assertTrue (field5_wp .IsValid ())
5460
5561 reason = self .continue_and_report_stop_reason (process , "continue to field2 wp" )
5662 self .assertEqual (reason , lldb .eStopReasonWatchpoint )
@@ -72,3 +78,10 @@ def test_large_watchpoint(self):
7278 process .GetSelectedThread ().GetStopReasonDataAtIndex (0 )
7379 )
7480 self .assertEqual (stop_reason_watchpoint_id , field4_wp .GetID ())
81+
82+ reason = self .continue_and_report_stop_reason (process , "continue to field5 wp" )
83+ self .assertEqual (reason , lldb .eStopReasonWatchpoint )
84+ stop_reason_watchpoint_id = (
85+ process .GetSelectedThread ().GetStopReasonDataAtIndex (0 )
86+ )
87+ self .assertEqual (stop_reason_watchpoint_id , field5_wp .GetID ())
0 commit comments