180814287SRaphael Isemann //===-- SBQueue.cpp -------------------------------------------------------===//
25e8dce4dSJason Molenda //
32946cd70SChandler Carruth // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
42946cd70SChandler Carruth // See https://llvm.org/LICENSE.txt for license information.
52946cd70SChandler Carruth // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
65e8dce4dSJason Molenda //
75e8dce4dSJason Molenda //===----------------------------------------------------------------------===//
85e8dce4dSJason Molenda 
976e47d48SRaphael Isemann #include <cinttypes>
10da0fc76eSVirgile Bello 
11baf5664fSJonas Devlieghere #include "SBReproducerPrivate.h"
125e8dce4dSJason Molenda #include "lldb/API/SBQueue.h"
135e8dce4dSJason Molenda 
145e8dce4dSJason Molenda #include "lldb/API/SBProcess.h"
15b9ffa98cSJason Molenda #include "lldb/API/SBQueueItem.h"
16b9c1b51eSKate Stone #include "lldb/API/SBThread.h"
17b9ffa98cSJason Molenda 
185e8dce4dSJason Molenda #include "lldb/Target/Process.h"
195e8dce4dSJason Molenda #include "lldb/Target/Queue.h"
205e8dce4dSJason Molenda #include "lldb/Target/QueueItem.h"
215e8dce4dSJason Molenda #include "lldb/Target/Thread.h"
225e8dce4dSJason Molenda 
235e8dce4dSJason Molenda using namespace lldb;
245e8dce4dSJason Molenda using namespace lldb_private;
255e8dce4dSJason Molenda 
26b9c1b51eSKate Stone namespace lldb_private {
27c8064ac6SJason Molenda 
28b9c1b51eSKate Stone class QueueImpl {
29c8064ac6SJason Molenda public:
30*9494c510SJonas Devlieghere   QueueImpl() : m_queue_wp(), m_threads(), m_pending_items() {}
315e8dce4dSJason Molenda 
32b9c1b51eSKate Stone   QueueImpl(const lldb::QueueSP &queue_sp)
33b9c1b51eSKate Stone       : m_queue_wp(), m_threads(), m_thread_list_fetched(false),
34b9c1b51eSKate Stone         m_pending_items(), m_pending_items_fetched(false) {
35b97f44d9SJason Molenda     m_queue_wp = queue_sp;
365e8dce4dSJason Molenda   }
375e8dce4dSJason Molenda 
38b9c1b51eSKate Stone   QueueImpl(const QueueImpl &rhs) {
39c8064ac6SJason Molenda     if (&rhs == this)
40c8064ac6SJason Molenda       return;
41c8064ac6SJason Molenda     m_queue_wp = rhs.m_queue_wp;
42c8064ac6SJason Molenda     m_threads = rhs.m_threads;
43c8064ac6SJason Molenda     m_thread_list_fetched = rhs.m_thread_list_fetched;
442fd83355SJason Molenda     m_pending_items = rhs.m_pending_items;
452fd83355SJason Molenda     m_pending_items_fetched = rhs.m_pending_items_fetched;
46c8064ac6SJason Molenda   }
47c8064ac6SJason Molenda 
48866b7a65SJonas Devlieghere   ~QueueImpl() = default;
495e8dce4dSJason Molenda 
50248a1305SKonrad Kleine   bool IsValid() { return m_queue_wp.lock() != nullptr; }
515e8dce4dSJason Molenda 
52b9c1b51eSKate Stone   void Clear() {
535e8dce4dSJason Molenda     m_queue_wp.reset();
545e8dce4dSJason Molenda     m_thread_list_fetched = false;
555e8dce4dSJason Molenda     m_threads.clear();
562fd83355SJason Molenda     m_pending_items_fetched = false;
572fd83355SJason Molenda     m_pending_items.clear();
585e8dce4dSJason Molenda   }
595e8dce4dSJason Molenda 
60b9c1b51eSKate Stone   void SetQueue(const lldb::QueueSP &queue_sp) {
61c8064ac6SJason Molenda     Clear();
625e8dce4dSJason Molenda     m_queue_wp = queue_sp;
635e8dce4dSJason Molenda   }
645e8dce4dSJason Molenda 
65b9c1b51eSKate Stone   lldb::queue_id_t GetQueueID() const {
66c8064ac6SJason Molenda     lldb::queue_id_t result = LLDB_INVALID_QUEUE_ID;
67c8064ac6SJason Molenda     lldb::QueueSP queue_sp = m_queue_wp.lock();
68b9c1b51eSKate Stone     if (queue_sp) {
695e8dce4dSJason Molenda       result = queue_sp->GetID();
705e8dce4dSJason Molenda     }
715e8dce4dSJason Molenda     return result;
725e8dce4dSJason Molenda   }
735e8dce4dSJason Molenda 
74b9c1b51eSKate Stone   uint32_t GetIndexID() const {
755e8dce4dSJason Molenda     uint32_t result = LLDB_INVALID_INDEX32;
76c8064ac6SJason Molenda     lldb::QueueSP queue_sp = m_queue_wp.lock();
77b9c1b51eSKate Stone     if (queue_sp) {
785e8dce4dSJason Molenda       result = queue_sp->GetIndexID();
795e8dce4dSJason Molenda     }
805e8dce4dSJason Molenda     return result;
815e8dce4dSJason Molenda   }
825e8dce4dSJason Molenda 
83b9c1b51eSKate Stone   const char *GetName() const {
84248a1305SKonrad Kleine     const char *name = nullptr;
85c8064ac6SJason Molenda     lldb::QueueSP queue_sp = m_queue_wp.lock();
86b9c1b51eSKate Stone     if (queue_sp.get()) {
875e8dce4dSJason Molenda       name = queue_sp->GetName();
885e8dce4dSJason Molenda     }
895e8dce4dSJason Molenda     return name;
905e8dce4dSJason Molenda   }
915e8dce4dSJason Molenda 
92b9c1b51eSKate Stone   void FetchThreads() {
93a6682a41SJonas Devlieghere     if (!m_thread_list_fetched) {
94c8064ac6SJason Molenda       lldb::QueueSP queue_sp = m_queue_wp.lock();
95b9c1b51eSKate Stone       if (queue_sp) {
965e8dce4dSJason Molenda         Process::StopLocker stop_locker;
97b9c1b51eSKate Stone         if (stop_locker.TryLock(&queue_sp->GetProcess()->GetRunLock())) {
985e8dce4dSJason Molenda           const std::vector<ThreadSP> thread_list(queue_sp->GetThreads());
995e8dce4dSJason Molenda           m_thread_list_fetched = true;
1005e8dce4dSJason Molenda           const uint32_t num_threads = thread_list.size();
101b9c1b51eSKate Stone           for (uint32_t idx = 0; idx < num_threads; ++idx) {
1025e8dce4dSJason Molenda             ThreadSP thread_sp = thread_list[idx];
103b9c1b51eSKate Stone             if (thread_sp && thread_sp->IsValid()) {
1045e8dce4dSJason Molenda               m_threads.push_back(thread_sp);
1055e8dce4dSJason Molenda             }
1065e8dce4dSJason Molenda           }
1075e8dce4dSJason Molenda         }
1085e8dce4dSJason Molenda       }
1095e8dce4dSJason Molenda     }
1105e8dce4dSJason Molenda   }
1115e8dce4dSJason Molenda 
112b9c1b51eSKate Stone   void FetchItems() {
113a6682a41SJonas Devlieghere     if (!m_pending_items_fetched) {
1145e8dce4dSJason Molenda       QueueSP queue_sp = m_queue_wp.lock();
115b9c1b51eSKate Stone       if (queue_sp) {
1165e8dce4dSJason Molenda         Process::StopLocker stop_locker;
117b9c1b51eSKate Stone         if (stop_locker.TryLock(&queue_sp->GetProcess()->GetRunLock())) {
118b9c1b51eSKate Stone           const std::vector<QueueItemSP> queue_items(
119b9c1b51eSKate Stone               queue_sp->GetPendingItems());
1202fd83355SJason Molenda           m_pending_items_fetched = true;
1212fd83355SJason Molenda           const uint32_t num_pending_items = queue_items.size();
122b9c1b51eSKate Stone           for (uint32_t idx = 0; idx < num_pending_items; ++idx) {
1235e8dce4dSJason Molenda             QueueItemSP item = queue_items[idx];
124b9c1b51eSKate Stone             if (item && item->IsValid()) {
1252fd83355SJason Molenda               m_pending_items.push_back(item);
1265e8dce4dSJason Molenda             }
1275e8dce4dSJason Molenda           }
1285e8dce4dSJason Molenda         }
1295e8dce4dSJason Molenda       }
1305e8dce4dSJason Molenda     }
1315e8dce4dSJason Molenda   }
1325e8dce4dSJason Molenda 
133b9c1b51eSKate Stone   uint32_t GetNumThreads() {
1345e8dce4dSJason Molenda     uint32_t result = 0;
1355e8dce4dSJason Molenda 
1365e8dce4dSJason Molenda     FetchThreads();
137b9c1b51eSKate Stone     if (m_thread_list_fetched) {
1385e8dce4dSJason Molenda       result = m_threads.size();
1395e8dce4dSJason Molenda     }
1405e8dce4dSJason Molenda     return result;
1415e8dce4dSJason Molenda   }
1425e8dce4dSJason Molenda 
143b9c1b51eSKate Stone   lldb::SBThread GetThreadAtIndex(uint32_t idx) {
1445e8dce4dSJason Molenda     FetchThreads();
1455e8dce4dSJason Molenda 
1465e8dce4dSJason Molenda     SBThread sb_thread;
1475e8dce4dSJason Molenda     QueueSP queue_sp = m_queue_wp.lock();
148b9c1b51eSKate Stone     if (queue_sp && idx < m_threads.size()) {
1495e8dce4dSJason Molenda       ProcessSP process_sp = queue_sp->GetProcess();
150b9c1b51eSKate Stone       if (process_sp) {
1515e8dce4dSJason Molenda         ThreadSP thread_sp = m_threads[idx].lock();
152b9c1b51eSKate Stone         if (thread_sp) {
1535e8dce4dSJason Molenda           sb_thread.SetThread(thread_sp);
1545e8dce4dSJason Molenda         }
1555e8dce4dSJason Molenda       }
1565e8dce4dSJason Molenda     }
1575e8dce4dSJason Molenda     return sb_thread;
1585e8dce4dSJason Molenda   }
1595e8dce4dSJason Molenda 
160b9c1b51eSKate Stone   uint32_t GetNumPendingItems() {
1615e8dce4dSJason Molenda     uint32_t result = 0;
1625e8dce4dSJason Molenda 
163fe95dc95SJason Molenda     QueueSP queue_sp = m_queue_wp.lock();
164a6682a41SJonas Devlieghere     if (!m_pending_items_fetched && queue_sp) {
165fe95dc95SJason Molenda       result = queue_sp->GetNumPendingWorkItems();
166b9c1b51eSKate Stone     } else {
1672fd83355SJason Molenda       result = m_pending_items.size();
1685e8dce4dSJason Molenda     }
1695e8dce4dSJason Molenda     return result;
1705e8dce4dSJason Molenda   }
1715e8dce4dSJason Molenda 
172b9c1b51eSKate Stone   lldb::SBQueueItem GetPendingItemAtIndex(uint32_t idx) {
1735e8dce4dSJason Molenda     SBQueueItem result;
1745e8dce4dSJason Molenda     FetchItems();
175b9c1b51eSKate Stone     if (m_pending_items_fetched && idx < m_pending_items.size()) {
1762fd83355SJason Molenda       result.SetQueueItem(m_pending_items[idx]);
1775e8dce4dSJason Molenda     }
1785e8dce4dSJason Molenda     return result;
1795e8dce4dSJason Molenda   }
1805e8dce4dSJason Molenda 
181b9c1b51eSKate Stone   uint32_t GetNumRunningItems() {
182fe95dc95SJason Molenda     uint32_t result = 0;
183fe95dc95SJason Molenda     QueueSP queue_sp = m_queue_wp.lock();
184fe95dc95SJason Molenda     if (queue_sp)
185fe95dc95SJason Molenda       result = queue_sp->GetNumRunningWorkItems();
186fe95dc95SJason Molenda     return result;
187fe95dc95SJason Molenda   }
188fe95dc95SJason Molenda 
189b9c1b51eSKate Stone   lldb::SBProcess GetProcess() {
1905e8dce4dSJason Molenda     SBProcess result;
1915e8dce4dSJason Molenda     QueueSP queue_sp = m_queue_wp.lock();
192b9c1b51eSKate Stone     if (queue_sp) {
1935e8dce4dSJason Molenda       result.SetSP(queue_sp->GetProcess());
1945e8dce4dSJason Molenda     }
1955e8dce4dSJason Molenda     return result;
1965e8dce4dSJason Molenda   }
197c8064ac6SJason Molenda 
198b9c1b51eSKate Stone   lldb::QueueKind GetKind() {
199aac16e0fSJason Molenda     lldb::QueueKind kind = eQueueKindUnknown;
200aac16e0fSJason Molenda     QueueSP queue_sp = m_queue_wp.lock();
201aac16e0fSJason Molenda     if (queue_sp)
202aac16e0fSJason Molenda       kind = queue_sp->GetKind();
203aac16e0fSJason Molenda 
204aac16e0fSJason Molenda     return kind;
205aac16e0fSJason Molenda   }
206aac16e0fSJason Molenda 
207c8064ac6SJason Molenda private:
208c8064ac6SJason Molenda   lldb::QueueWP m_queue_wp;
209b9c1b51eSKate Stone   std::vector<lldb::ThreadWP>
210b9c1b51eSKate Stone       m_threads; // threads currently executing this queue's items
211*9494c510SJonas Devlieghere   bool m_thread_list_fetched =
212*9494c510SJonas Devlieghere       false; // have we tried to fetch the threads list already?
2132fd83355SJason Molenda   std::vector<lldb::QueueItemSP> m_pending_items; // items currently enqueued
214*9494c510SJonas Devlieghere   bool m_pending_items_fetched =
215*9494c510SJonas Devlieghere       false; // have we tried to fetch the item list already?
216c8064ac6SJason Molenda };
217c8064ac6SJason Molenda }
218c8064ac6SJason Molenda 
219baf5664fSJonas Devlieghere SBQueue::SBQueue() : m_opaque_sp(new QueueImpl()) {
220baf5664fSJonas Devlieghere   LLDB_RECORD_CONSTRUCTOR_NO_ARGS(SBQueue);
221baf5664fSJonas Devlieghere }
222c8064ac6SJason Molenda 
223b9c1b51eSKate Stone SBQueue::SBQueue(const QueueSP &queue_sp)
224baf5664fSJonas Devlieghere     : m_opaque_sp(new QueueImpl(queue_sp)) {
225baf5664fSJonas Devlieghere   LLDB_RECORD_CONSTRUCTOR(SBQueue, (const lldb::QueueSP &), queue_sp);
226baf5664fSJonas Devlieghere }
227c8064ac6SJason Molenda 
228b9c1b51eSKate Stone SBQueue::SBQueue(const SBQueue &rhs) {
229baf5664fSJonas Devlieghere   LLDB_RECORD_CONSTRUCTOR(SBQueue, (const lldb::SBQueue &), rhs);
230baf5664fSJonas Devlieghere 
231c8064ac6SJason Molenda   if (&rhs == this)
232c8064ac6SJason Molenda     return;
233c8064ac6SJason Molenda 
234c8064ac6SJason Molenda   m_opaque_sp = rhs.m_opaque_sp;
235c8064ac6SJason Molenda }
236c8064ac6SJason Molenda 
237b9c1b51eSKate Stone const lldb::SBQueue &SBQueue::operator=(const lldb::SBQueue &rhs) {
238baf5664fSJonas Devlieghere   LLDB_RECORD_METHOD(const lldb::SBQueue &,
239baf5664fSJonas Devlieghere                      SBQueue, operator=,(const lldb::SBQueue &), rhs);
240baf5664fSJonas Devlieghere 
241c8064ac6SJason Molenda   m_opaque_sp = rhs.m_opaque_sp;
242306809f2SJonas Devlieghere   return LLDB_RECORD_RESULT(*this);
243c8064ac6SJason Molenda }
244c8064ac6SJason Molenda 
245866b7a65SJonas Devlieghere SBQueue::~SBQueue() = default;
246c8064ac6SJason Molenda 
247b9c1b51eSKate Stone bool SBQueue::IsValid() const {
248baf5664fSJonas Devlieghere   LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBQueue, IsValid);
2497f5237bcSPavel Labath   return this->operator bool();
2507f5237bcSPavel Labath }
2517f5237bcSPavel Labath SBQueue::operator bool() const {
2527f5237bcSPavel Labath   LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBQueue, operator bool);
253baf5664fSJonas Devlieghere 
254581af8b0SJonas Devlieghere   return m_opaque_sp->IsValid();
255c8064ac6SJason Molenda }
256c8064ac6SJason Molenda 
257b9c1b51eSKate Stone void SBQueue::Clear() {
258baf5664fSJonas Devlieghere   LLDB_RECORD_METHOD_NO_ARGS(void, SBQueue, Clear);
259baf5664fSJonas Devlieghere 
260c8064ac6SJason Molenda   m_opaque_sp->Clear();
261c8064ac6SJason Molenda }
262c8064ac6SJason Molenda 
263b9c1b51eSKate Stone void SBQueue::SetQueue(const QueueSP &queue_sp) {
264c8064ac6SJason Molenda   m_opaque_sp->SetQueue(queue_sp);
265c8064ac6SJason Molenda }
266c8064ac6SJason Molenda 
267b9c1b51eSKate Stone lldb::queue_id_t SBQueue::GetQueueID() const {
268baf5664fSJonas Devlieghere   LLDB_RECORD_METHOD_CONST_NO_ARGS(lldb::queue_id_t, SBQueue, GetQueueID);
269baf5664fSJonas Devlieghere 
270581af8b0SJonas Devlieghere   return m_opaque_sp->GetQueueID();
271c8064ac6SJason Molenda }
272c8064ac6SJason Molenda 
273b9c1b51eSKate Stone uint32_t SBQueue::GetIndexID() const {
274baf5664fSJonas Devlieghere   LLDB_RECORD_METHOD_CONST_NO_ARGS(uint32_t, SBQueue, GetIndexID);
275baf5664fSJonas Devlieghere 
276ac605f4aSJason Molenda   uint32_t index_id = m_opaque_sp->GetIndexID();
277ac605f4aSJason Molenda   return index_id;
278c8064ac6SJason Molenda }
279c8064ac6SJason Molenda 
280b9c1b51eSKate Stone const char *SBQueue::GetName() const {
281baf5664fSJonas Devlieghere   LLDB_RECORD_METHOD_CONST_NO_ARGS(const char *, SBQueue, GetName);
282baf5664fSJonas Devlieghere 
283581af8b0SJonas Devlieghere   return m_opaque_sp->GetName();
284c8064ac6SJason Molenda }
285c8064ac6SJason Molenda 
286b9c1b51eSKate Stone uint32_t SBQueue::GetNumThreads() {
287baf5664fSJonas Devlieghere   LLDB_RECORD_METHOD_NO_ARGS(uint32_t, SBQueue, GetNumThreads);
288baf5664fSJonas Devlieghere 
289581af8b0SJonas Devlieghere   return m_opaque_sp->GetNumThreads();
290c8064ac6SJason Molenda }
291c8064ac6SJason Molenda 
292b9c1b51eSKate Stone SBThread SBQueue::GetThreadAtIndex(uint32_t idx) {
293baf5664fSJonas Devlieghere   LLDB_RECORD_METHOD(lldb::SBThread, SBQueue, GetThreadAtIndex, (uint32_t),
294baf5664fSJonas Devlieghere                      idx);
295baf5664fSJonas Devlieghere 
296ac605f4aSJason Molenda   SBThread th = m_opaque_sp->GetThreadAtIndex(idx);
297baf5664fSJonas Devlieghere   return LLDB_RECORD_RESULT(th);
298c8064ac6SJason Molenda }
299c8064ac6SJason Molenda 
300b9c1b51eSKate Stone uint32_t SBQueue::GetNumPendingItems() {
301baf5664fSJonas Devlieghere   LLDB_RECORD_METHOD_NO_ARGS(uint32_t, SBQueue, GetNumPendingItems);
302baf5664fSJonas Devlieghere 
303581af8b0SJonas Devlieghere   return m_opaque_sp->GetNumPendingItems();
304c8064ac6SJason Molenda }
305c8064ac6SJason Molenda 
306b9c1b51eSKate Stone SBQueueItem SBQueue::GetPendingItemAtIndex(uint32_t idx) {
307baf5664fSJonas Devlieghere   LLDB_RECORD_METHOD(lldb::SBQueueItem, SBQueue, GetPendingItemAtIndex,
308baf5664fSJonas Devlieghere                      (uint32_t), idx);
309baf5664fSJonas Devlieghere 
310baf5664fSJonas Devlieghere   return LLDB_RECORD_RESULT(m_opaque_sp->GetPendingItemAtIndex(idx));
311c8064ac6SJason Molenda }
312c8064ac6SJason Molenda 
313b9c1b51eSKate Stone uint32_t SBQueue::GetNumRunningItems() {
314baf5664fSJonas Devlieghere   LLDB_RECORD_METHOD_NO_ARGS(uint32_t, SBQueue, GetNumRunningItems);
315baf5664fSJonas Devlieghere 
316581af8b0SJonas Devlieghere   return m_opaque_sp->GetNumRunningItems();
317fe95dc95SJason Molenda }
318fe95dc95SJason Molenda 
319baf5664fSJonas Devlieghere SBProcess SBQueue::GetProcess() {
320baf5664fSJonas Devlieghere   LLDB_RECORD_METHOD_NO_ARGS(lldb::SBProcess, SBQueue, GetProcess);
321aac16e0fSJason Molenda 
322baf5664fSJonas Devlieghere   return LLDB_RECORD_RESULT(m_opaque_sp->GetProcess());
323baf5664fSJonas Devlieghere }
324baf5664fSJonas Devlieghere 
325baf5664fSJonas Devlieghere lldb::QueueKind SBQueue::GetKind() {
326baf5664fSJonas Devlieghere   LLDB_RECORD_METHOD_NO_ARGS(lldb::QueueKind, SBQueue, GetKind);
327baf5664fSJonas Devlieghere 
328baf5664fSJonas Devlieghere   return m_opaque_sp->GetKind();
329baf5664fSJonas Devlieghere }
330ae211eceSMichal Gorny 
331ae211eceSMichal Gorny namespace lldb_private {
332ae211eceSMichal Gorny namespace repro {
333ae211eceSMichal Gorny 
334ae211eceSMichal Gorny template <>
335ae211eceSMichal Gorny void RegisterMethods<SBQueue>(Registry &R) {
336ae211eceSMichal Gorny   LLDB_REGISTER_CONSTRUCTOR(SBQueue, ());
337ae211eceSMichal Gorny   LLDB_REGISTER_CONSTRUCTOR(SBQueue, (const lldb::QueueSP &));
338ae211eceSMichal Gorny   LLDB_REGISTER_CONSTRUCTOR(SBQueue, (const lldb::SBQueue &));
339ae211eceSMichal Gorny   LLDB_REGISTER_METHOD(const lldb::SBQueue &,
340ae211eceSMichal Gorny                        SBQueue, operator=,(const lldb::SBQueue &));
341ae211eceSMichal Gorny   LLDB_REGISTER_METHOD_CONST(bool, SBQueue, IsValid, ());
342ae211eceSMichal Gorny   LLDB_REGISTER_METHOD_CONST(bool, SBQueue, operator bool, ());
343ae211eceSMichal Gorny   LLDB_REGISTER_METHOD(void, SBQueue, Clear, ());
344ae211eceSMichal Gorny   LLDB_REGISTER_METHOD_CONST(lldb::queue_id_t, SBQueue, GetQueueID, ());
345ae211eceSMichal Gorny   LLDB_REGISTER_METHOD_CONST(uint32_t, SBQueue, GetIndexID, ());
346ae211eceSMichal Gorny   LLDB_REGISTER_METHOD_CONST(const char *, SBQueue, GetName, ());
347ae211eceSMichal Gorny   LLDB_REGISTER_METHOD(uint32_t, SBQueue, GetNumThreads, ());
348ae211eceSMichal Gorny   LLDB_REGISTER_METHOD(lldb::SBThread, SBQueue, GetThreadAtIndex, (uint32_t));
349ae211eceSMichal Gorny   LLDB_REGISTER_METHOD(uint32_t, SBQueue, GetNumPendingItems, ());
350ae211eceSMichal Gorny   LLDB_REGISTER_METHOD(lldb::SBQueueItem, SBQueue, GetPendingItemAtIndex,
351ae211eceSMichal Gorny                        (uint32_t));
352ae211eceSMichal Gorny   LLDB_REGISTER_METHOD(uint32_t, SBQueue, GetNumRunningItems, ());
353ae211eceSMichal Gorny   LLDB_REGISTER_METHOD(lldb::SBProcess, SBQueue, GetProcess, ());
354ae211eceSMichal Gorny   LLDB_REGISTER_METHOD(lldb::QueueKind, SBQueue, GetKind, ());
355ae211eceSMichal Gorny }
356ae211eceSMichal Gorny 
357ae211eceSMichal Gorny }
358ae211eceSMichal Gorny }
359