From b9ffa98cab65ecb1e66a194bb9641735ef8e7eb2 Mon Sep 17 00:00:00 2001 From: Jason Molenda Date: Fri, 25 Apr 2014 00:01:15 +0000 Subject: Add a new SBThread::GetQueue() method to get the queue that is currently associated with a given thread, on relevant targets. Change the queue detection code to verify that the queues associated with all live threads are included in the list. llvm-svn: 207160 --- .../Plugins/Process/gdb-remote/ThreadGDBRemote.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'lldb/source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp') diff --git a/lldb/source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp b/lldb/source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp index 395f8c6..79893cf 100644 --- a/lldb/source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp @@ -107,6 +107,22 @@ ThreadGDBRemote::GetQueueID () return LLDB_INVALID_QUEUE_ID; } +QueueSP +ThreadGDBRemote::GetQueue () +{ + queue_id_t queue_id = GetQueueID(); + QueueSP queue; + if (queue_id != LLDB_INVALID_QUEUE_ID) + { + ProcessSP process_sp (GetProcess()); + if (process_sp) + { + queue = process_sp->GetQueueList().FindQueueByID (queue_id); + } + } + return queue; +} + addr_t ThreadGDBRemote::GetQueueLibdispatchQueueAddress () { -- cgit v1.1