diff options
author | Jim Ingham <jingham@apple.com> | 2022-07-27 09:27:51 -0700 |
---|---|---|
committer | Jim Ingham <jingham@apple.com> | 2022-08-05 11:01:27 -0700 |
commit | 0948f1cf8177e378bdea2239b8c3ffb9db31f9ad (patch) | |
tree | ae39a2efb5535c1638db027347f4645556f9c0f1 /lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp | |
parent | 292e8ed49a8a4ab108b4ac21ba49cb9202f790b1 (diff) | |
download | llvm-0948f1cf8177e378bdea2239b8c3ffb9db31f9ad.zip llvm-0948f1cf8177e378bdea2239b8c3ffb9db31f9ad.tar.gz llvm-0948f1cf8177e378bdea2239b8c3ffb9db31f9ad.tar.bz2 |
Reapply the commits to enable accurate hit-count detection for watchpoints.
This commit combines the initial commit (7c240de609af), a fix for x86_64 Linux
(3a0581501e76) and a fix for thinko in a last minute rewrite that I really
should have run the testsuite on.
Also, make sure that all the "I need to step over watchpoint" plans execute
before we call a public stop. Otherwise, e.g. if you have N watchpoints and
a Signal, the signal stop info will get us to stop with the watchpoints in a
half-done state.
Differential Revision: https://reviews.llvm.org/D130674
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp')
-rw-r--r-- | lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp index e3dada1..233a665f6 100644 --- a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp @@ -1675,7 +1675,15 @@ ThreadSP ProcessGDBRemote::SetThreadStopInfo( if (dispatch_queue_t != LLDB_INVALID_ADDRESS) gdb_thread->SetQueueLibdispatchQueueAddress(dispatch_queue_t); - // Make sure we update our thread stop reason just once + // Make sure we update our thread stop reason just once, but don't + // overwrite the stop info for threads that haven't moved: + StopInfoSP current_stop_info_sp = thread_sp->GetPrivateStopInfo(false); + if (thread_sp->GetTemporaryResumeState() == eStateSuspended && + current_stop_info_sp) { + thread_sp->SetStopInfo(current_stop_info_sp); + return thread_sp; + } + if (!thread_sp->StopInfoIsUpToDate()) { thread_sp->SetStopInfo(StopInfoSP()); // If there's a memory thread backed by this thread, we need to use it |