diff options
author | Jonas Devlieghere <jonas@devlieghere.com> | 2018-04-13 11:31:34 +0000 |
---|---|---|
committer | Jonas Devlieghere <jonas@devlieghere.com> | 2018-04-13 11:31:34 +0000 |
commit | 8db3f7ede6e89a70fc4860d5821d5e115450e33b (patch) | |
tree | 7cddd523703f4a7790130eca692e83bb69bd6564 /lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp | |
parent | cf124bd828dfc071130a311eb8a4ea4ae2cd0cdf (diff) | |
download | bcm5719-llvm-8db3f7ede6e89a70fc4860d5821d5e115450e33b.tar.gz bcm5719-llvm-8db3f7ede6e89a70fc4860d5821d5e115450e33b.zip |
Re-land "Don't assume backing thread shares protocol ID."
When we're dealing with virtual (memory) threads created by the OS
plugins, there's no guarantee that the real thread and the backing
thread share a protocol ID. Instead, we should iterate over the memory
threads to find the virtual thread that is backed by the current real
thread.
Differential revision: https://reviews.llvm.org/D45497
rdar://36485830
The original revision (r329891) was reverted because the associated
tests ran into a deadlock on the Linux bots. That problem was resolved
by r330002.
llvm-svn: 330005
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp')
-rw-r--r-- | lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp index fc5f79e3544..0fb97b2f7db 100644 --- a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp @@ -1822,10 +1822,9 @@ ThreadSP ProcessGDBRemote::SetThreadStopInfo( if (!thread_sp->StopInfoIsUpToDate()) { thread_sp->SetStopInfo(StopInfoSP()); // If there's a memory thread backed by this thread, we need to use it - // to calcualte StopInfo. - ThreadSP memory_thread_sp = - m_thread_list.FindThreadByProtocolID(thread_sp->GetProtocolID()); - if (memory_thread_sp) + // to calculate StopInfo. + if (ThreadSP memory_thread_sp = + m_thread_list.GetBackingThread(thread_sp)) thread_sp = memory_thread_sp; if (exc_type != 0) { |