diff options
author | Johnny Chen <johnny.chen@apple.com> | 2011-09-29 21:48:52 +0000 |
---|---|---|
committer | Johnny Chen <johnny.chen@apple.com> | 2011-09-29 21:48:52 +0000 |
commit | a9b68f4dd6c99620f306309583ab114c2ae36160 (patch) | |
tree | 2b4368efe782d1bf7df2208580b5627c7708761a /lldb/tools/debugserver/source/MacOSX/MachThreadList.cpp | |
parent | 3f030ff0169ad768cdc27967d8953f89852d78eb (diff) | |
download | bcm5719-llvm-a9b68f4dd6c99620f306309583ab114c2ae36160.tar.gz bcm5719-llvm-a9b68f4dd6c99620f306309583ab114c2ae36160.zip |
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
Diffstat (limited to 'lldb/tools/debugserver/source/MacOSX/MachThreadList.cpp')
-rw-r--r-- | lldb/tools/debugserver/source/MacOSX/MachThreadList.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
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; |