Author: Aleksandr Korepanov Date: 2024-06-13T14:50:31-07:00 New Revision: 00ed887454f7d7522f3eac8549661e51f864a9a7
URL: https://github.com/llvm/llvm-project/commit/00ed887454f7d7522f3eac8549661e51f864a9a7 DIFF: https://github.com/llvm/llvm-project/commit/00ed887454f7d7522f3eac8549661e51f864a9a7.diff LOG: [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 <jmole...@apple.com> Added: Modified: lldb/source/Plugins/Process/Windows/Common/ProcessWindows.cpp Removed: ################################################################################ diff --git a/lldb/source/Plugins/Process/Windows/Common/ProcessWindows.cpp b/lldb/source/Plugins/Process/Windows/Common/ProcessWindows.cpp index eb0834b1159f6..f383b3d40a4f3 100644 --- a/lldb/source/Plugins/Process/Windows/Common/ProcessWindows.cpp +++ b/lldb/source/Plugins/Process/Windows/Common/ProcessWindows.cpp @@ -405,8 +405,7 @@ void ProcessWindows::RefreshStateAfterStop() { "{1:x} with watchpoint {2}", m_session_data->m_debugger->GetProcess().GetProcessId(), pc, id); - stop_info = StopInfo::CreateStopReasonWithWatchpointID( - *stop_thread, id, m_watchpoints[id].address); + stop_info = StopInfo::CreateStopReasonWithWatchpointID(*stop_thread, id); stop_thread->SetStopInfo(stop_info); return; @@ -857,7 +856,7 @@ Status ProcessWindows::EnableWatchpoint(WatchpointSP wp_sp, bool notify) { info.address = wp_sp->GetLoadAddress(); info.size = wp_sp->GetByteSize(); info.read = wp_sp->WatchpointRead(); - info.write = wp_sp->WatchpointWrite(); + info.write = wp_sp->WatchpointWrite() || wp_sp->WatchpointModify(); for (unsigned i = 0U; i < m_thread_list.GetSize(); i++) { Thread *thread = m_thread_list.GetThreadAtIndex(i).get(); _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits