Don't assume backing thread shares protocol ID.
authorJonas Devlieghere <jonas@devlieghere.com>
Thu, 12 Apr 2018 09:58:20 +0000 (09:58 +0000)
committerJonas Devlieghere <jonas@devlieghere.com>
Thu, 12 Apr 2018 09:58:20 +0000 (09:58 +0000)
commit0045c72f9c40192fd6e1905a82dca94ecb1ec8b5
tree4274f2baa121a554a0bbb9deef12a2615e131438
parent4955c77c2df3e00b96fa71e20aee119ba0d991e9
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
lldb/include/lldb/Target/ThreadList.h
lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestThreadSelectionBug.py [new file with mode: 0644]
lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/operating_system.py [new file with mode: 0644]
lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
lldb/source/Target/ThreadList.cpp