From a9b68f4dd6c99620f306309583ab114c2ae36160 Mon Sep 17 00:00:00 2001 From: Johnny Chen Date: Thu, 29 Sep 2011 21:48:52 +0000 Subject: Modify the delegation chain from MachThreadList -> MachThread -> DNBArchProtocol so that when the watchpoint state is changed, not only does the change propagate to all the thread instances, it also updates a global debug state, if chosen by the DNBArchProtocol derivative. Once implemented, the DNBArchProtocol derivative, also makes sure that when new thread comes along, it tries to inherit from the global debug state, if it is valid. Modify TestWatchpointMultipleThreads.py to test this functionality. llvm-svn: 140811 --- lldb/tools/debugserver/source/MacOSX/MachThreadList.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lldb/tools/debugserver/source/MacOSX/MachThreadList.cpp') diff --git a/lldb/tools/debugserver/source/MacOSX/MachThreadList.cpp b/lldb/tools/debugserver/source/MacOSX/MachThreadList.cpp index 4ad3ca9847c..70f53478307 100644 --- a/lldb/tools/debugserver/source/MacOSX/MachThreadList.cpp +++ b/lldb/tools/debugserver/source/MacOSX/MachThreadList.cpp @@ -480,6 +480,9 @@ MachThreadList::EnableHardwareWatchpoint (const DNBBreakpoint* wp) const if ((hw_index = m_threads[idx]->EnableHardwareWatchpoint(wp)) == INVALID_NUB_HW_INDEX) return INVALID_NUB_HW_INDEX; } + // Use an arbitrary thread to signal the completion of our transaction. + if (num_threads) + m_threads[0]->HardwareWatchpointStateChanged(); return hw_index; } return INVALID_NUB_HW_INDEX; @@ -497,6 +500,9 @@ MachThreadList::DisableHardwareWatchpoint (const DNBBreakpoint* wp) const if (!m_threads[idx]->DisableHardwareWatchpoint(wp)) return false; } + // Use an arbitrary thread to signal the completion of our transaction. + if (num_threads) + m_threads[0]->HardwareWatchpointStateChanged(); return true; } return false; -- cgit v1.2.3