Author: jingham Date: Tue Nov 1 20:06:42 2016 New Revision: 285781 URL: http://llvm.org/viewvc/llvm-project?rev=285781&view=rev Log: Fix SBWatchpoint::SetEnabled to send an event.
We really shouldn't be sending events for SB API's, dunno when we started doing that. We don't do it for other things. But first restore the status quo. Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_events/TestWatchpointEvents.py lldb/trunk/source/API/SBWatchpoint.cpp Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_events/TestWatchpointEvents.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_events/TestWatchpointEvents.py?rev=285781&r1=285780&r2=285781&view=diff ============================================================================== --- lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_events/TestWatchpointEvents.py (original) +++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_events/TestWatchpointEvents.py Tue Nov 1 20:06:42 2016 @@ -31,7 +31,6 @@ class TestWatchpointEvents (TestBase): @expectedFailureAll( oslist=["windows"], bugnumber="llvm.org/pr24446: WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows") - @expectedFailureAll() def test_with_python_api(self): """Test that adding, deleting and modifying watchpoints sends the appropriate events.""" self.build() Modified: lldb/trunk/source/API/SBWatchpoint.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBWatchpoint.cpp?rev=285781&r1=285780&r2=285781&view=diff ============================================================================== --- lldb/trunk/source/API/SBWatchpoint.cpp (original) +++ lldb/trunk/source/API/SBWatchpoint.cpp Tue Nov 1 20:06:42 2016 @@ -130,13 +130,14 @@ void SBWatchpoint::SetEnabled(bool enabl Target &target = watchpoint_sp->GetTarget(); std::lock_guard<std::recursive_mutex> guard(target.GetAPIMutex()); ProcessSP process_sp = target.GetProcessSP(); + const bool notify = true; if (process_sp) { if (enabled) - process_sp->EnableWatchpoint(watchpoint_sp.get(), false); + process_sp->EnableWatchpoint(watchpoint_sp.get(), notify); else - process_sp->DisableWatchpoint(watchpoint_sp.get(), false); + process_sp->DisableWatchpoint(watchpoint_sp.get(), notify); } else { - watchpoint_sp->SetEnabled(enabled); + watchpoint_sp->SetEnabled(enabled, notify); } } } _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits