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/MachThread.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'lldb/tools/debugserver/source/MacOSX/MachThread.cpp') diff --git a/lldb/tools/debugserver/source/MacOSX/MachThread.cpp b/lldb/tools/debugserver/source/MacOSX/MachThread.cpp index 729f32fd7db..7d67b3accbe 100644 --- a/lldb/tools/debugserver/source/MacOSX/MachThread.cpp +++ b/lldb/tools/debugserver/source/MacOSX/MachThread.cpp @@ -687,6 +687,13 @@ MachThread::EnableHardwareWatchpoint (const DNBBreakpoint *wp) return INVALID_NUB_HW_INDEX; } +// Provide a chance to update the global view of the hardware watchpoint state. +void +MachThread::HardwareWatchpointStateChanged () +{ + m_arch_ap->HardwareWatchpointStateChanged(); +} + bool MachThread::DisableHardwareBreakpoint (const DNBBreakpoint *bp) { -- cgit v1.2.3