Skip to content

Commit 00ed887

Browse files
AlexK0jasonmolenda
andauthored
[LLDB][Windows] Fix watchpoints for Windows (#95446)
Hello! Currently, watchpoints don't work on Windows (this can be reproduced with the existing tests). This patch fixes the related issues so that the tests and watchpoints start working. Here is the list of tests that are fixed by this patch (on Windows, checked in **release/18.x** branch): - commands/watchpoints/hello_watchpoint/TestMyFirstWatchpoint.py - commands/watchpoints/multiple_hits/TestMultipleHits.py - commands/watchpoints/multiple_threads/TestWatchpointMultipleThreads.py - commands/watchpoints/step_over_watchpoint/TestStepOverWatchpoint.py - commands/watchpoints/unaligned-watchpoint/TestUnalignedWatchpoint.py - commands/watchpoints/watchpoint_commands/TestWatchpointCommands.py - commands/watchpoints/watchpoint_commands/command/TestWatchpointCommandLLDB.py - commands/watchpoints/watchpoint_commands/command/TestWatchpointCommandPython.py - commands/watchpoints/watchpoint_commands/condition/TestWatchpointConditionCmd.py - commands/watchpoints/watchpoint_count/TestWatchpointCount.py - commands/watchpoints/watchpoint_disable/TestWatchpointDisable.py - commands/watchpoints/watchpoint_size/TestWatchpointSizes.py - python_api/watchpoint/TestSetWatchpoint.py - python_api/watchpoint/TestWatchpointIgnoreCount.py - python_api/watchpoint/TestWatchpointIter.py - python_api/watchpoint/condition/TestWatchpointConditionAPI.py - python_api/watchpoint/watchlocation/TestTargetWatchAddress.py --------- Co-authored-by: Jason Molenda <[email protected]>
1 parent 27588fe commit 00ed887

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

lldb/source/Plugins/Process/Windows/Common/ProcessWindows.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -405,8 +405,7 @@ void ProcessWindows::RefreshStateAfterStop() {
405405
"{1:x} with watchpoint {2}",
406406
m_session_data->m_debugger->GetProcess().GetProcessId(), pc, id);
407407

408-
stop_info = StopInfo::CreateStopReasonWithWatchpointID(
409-
*stop_thread, id, m_watchpoints[id].address);
408+
stop_info = StopInfo::CreateStopReasonWithWatchpointID(*stop_thread, id);
410409
stop_thread->SetStopInfo(stop_info);
411410

412411
return;
@@ -857,7 +856,7 @@ Status ProcessWindows::EnableWatchpoint(WatchpointSP wp_sp, bool notify) {
857856
info.address = wp_sp->GetLoadAddress();
858857
info.size = wp_sp->GetByteSize();
859858
info.read = wp_sp->WatchpointRead();
860-
info.write = wp_sp->WatchpointWrite();
859+
info.write = wp_sp->WatchpointWrite() || wp_sp->WatchpointModify();
861860

862861
for (unsigned i = 0U; i < m_thread_list.GetSize(); i++) {
863862
Thread *thread = m_thread_list.GetThreadAtIndex(i).get();

0 commit comments

Comments
 (0)