summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
diff options
context:
space:
mode:
authorJonas Devlieghere <jonas@devlieghere.com>2018-04-12 09:58:20 +0000
committerJonas Devlieghere <jonas@devlieghere.com>2018-04-12 09:58:20 +0000
commit0045c72f9c40192fd6e1905a82dca94ecb1ec8b5 (patch)
tree4274f2baa121a554a0bbb9deef12a2615e131438 /lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
parent4955c77c2df3e00b96fa71e20aee119ba0d991e9 (diff)
downloadbcm5719-llvm-0045c72f9c40192fd6e1905a82dca94ecb1ec8b5.tar.gz
bcm5719-llvm-0045c72f9c40192fd6e1905a82dca94ecb1ec8b5.zip
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 llvm-svn: 329891
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp')
-rw-r--r--lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp7
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) {
OpenPOWER on IntegriCloud