15e8dce4dSJason Molenda //===-- SBQueue.cpp ---------------------------------------------*- C++ -*-===//
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 
9da0fc76eSVirgile Bello #include <inttypes.h>
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:
30b9c1b51eSKate Stone   QueueImpl()
31b9c1b51eSKate Stone       : m_queue_wp(), m_threads(), m_thread_list_fetched(false),
32b9c1b51eSKate Stone         m_pending_items(), m_pending_items_fetched(false) {}
335e8dce4dSJason Molenda 
34b9c1b51eSKate Stone   QueueImpl(const lldb::QueueSP &queue_sp)
35b9c1b51eSKate Stone       : m_queue_wp(), m_threads(), m_thread_list_fetched(false),
36b9c1b51eSKate Stone         m_pending_items(), m_pending_items_fetched(false) {
37b97f44d9SJason Molenda     m_queue_wp = queue_sp;
385e8dce4dSJason Molenda   }
395e8dce4dSJason Molenda 
40b9c1b51eSKate Stone   QueueImpl(const QueueImpl &rhs) {
41c8064ac6SJason Molenda     if (&rhs == this)
42c8064ac6SJason Molenda       return;
43c8064ac6SJason Molenda     m_queue_wp = rhs.m_queue_wp;
44c8064ac6SJason Molenda     m_threads = rhs.m_threads;
45c8064ac6SJason Molenda     m_thread_list_fetched = rhs.m_thread_list_fetched;
462fd83355SJason Molenda     m_pending_items = rhs.m_pending_items;
472fd83355SJason Molenda     m_pending_items_fetched = rhs.m_pending_items_fetched;
48c8064ac6SJason Molenda   }
49c8064ac6SJason Molenda 
50b9c1b51eSKate Stone   ~QueueImpl() {}
515e8dce4dSJason Molenda 
52b9c1b51eSKate Stone   bool IsValid() { return m_queue_wp.lock() != NULL; }
535e8dce4dSJason Molenda 
54b9c1b51eSKate Stone   void Clear() {
555e8dce4dSJason Molenda     m_queue_wp.reset();
565e8dce4dSJason Molenda     m_thread_list_fetched = false;
575e8dce4dSJason Molenda     m_threads.clear();
582fd83355SJason Molenda     m_pending_items_fetched = false;
592fd83355SJason Molenda     m_pending_items.clear();
605e8dce4dSJason Molenda   }
615e8dce4dSJason Molenda 
62b9c1b51eSKate Stone   void SetQueue(const lldb::QueueSP &queue_sp) {
63c8064ac6SJason Molenda     Clear();
645e8dce4dSJason Molenda     m_queue_wp = queue_sp;
655e8dce4dSJason Molenda   }
665e8dce4dSJason Molenda 
67b9c1b51eSKate Stone   lldb::queue_id_t GetQueueID() const {
68c8064ac6SJason Molenda     lldb::queue_id_t result = LLDB_INVALID_QUEUE_ID;
69c8064ac6SJason Molenda     lldb::QueueSP queue_sp = m_queue_wp.lock();
70b9c1b51eSKate Stone     if (queue_sp) {
715e8dce4dSJason Molenda       result = queue_sp->GetID();
725e8dce4dSJason Molenda     }
735e8dce4dSJason Molenda     return result;
745e8dce4dSJason Molenda   }
755e8dce4dSJason Molenda 
76b9c1b51eSKate Stone   uint32_t GetIndexID() const {
775e8dce4dSJason Molenda     uint32_t result = LLDB_INVALID_INDEX32;
78c8064ac6SJason Molenda     lldb::QueueSP queue_sp = m_queue_wp.lock();
79b9c1b51eSKate Stone     if (queue_sp) {
805e8dce4dSJason Molenda       result = queue_sp->GetIndexID();
815e8dce4dSJason Molenda     }
825e8dce4dSJason Molenda     return result;
835e8dce4dSJason Molenda   }
845e8dce4dSJason Molenda 
85b9c1b51eSKate Stone   const char *GetName() const {
865e8dce4dSJason Molenda     const char *name = NULL;
87c8064ac6SJason Molenda     lldb::QueueSP queue_sp = m_queue_wp.lock();
88b9c1b51eSKate Stone     if (queue_sp.get()) {
895e8dce4dSJason Molenda       name = queue_sp->GetName();
905e8dce4dSJason Molenda     }
915e8dce4dSJason Molenda     return name;
925e8dce4dSJason Molenda   }
935e8dce4dSJason Molenda 
94b9c1b51eSKate Stone   void FetchThreads() {
95a6682a41SJonas Devlieghere     if (!m_thread_list_fetched) {
96c8064ac6SJason Molenda       lldb::QueueSP queue_sp = m_queue_wp.lock();
97b9c1b51eSKate Stone       if (queue_sp) {
985e8dce4dSJason Molenda         Process::StopLocker stop_locker;
99b9c1b51eSKate Stone         if (stop_locker.TryLock(&queue_sp->GetProcess()->GetRunLock())) {
1005e8dce4dSJason Molenda           const std::vector<ThreadSP> thread_list(queue_sp->GetThreads());
1015e8dce4dSJason Molenda           m_thread_list_fetched = true;
1025e8dce4dSJason Molenda           const uint32_t num_threads = thread_list.size();
103b9c1b51eSKate Stone           for (uint32_t idx = 0; idx < num_threads; ++idx) {
1045e8dce4dSJason Molenda             ThreadSP thread_sp = thread_list[idx];
105b9c1b51eSKate Stone             if (thread_sp && thread_sp->IsValid()) {
1065e8dce4dSJason Molenda               m_threads.push_back(thread_sp);
1075e8dce4dSJason Molenda             }
1085e8dce4dSJason Molenda           }
1095e8dce4dSJason Molenda         }
1105e8dce4dSJason Molenda       }
1115e8dce4dSJason Molenda     }
1125e8dce4dSJason Molenda   }
1135e8dce4dSJason Molenda 
114b9c1b51eSKate Stone   void FetchItems() {
115a6682a41SJonas Devlieghere     if (!m_pending_items_fetched) {
1165e8dce4dSJason Molenda       QueueSP queue_sp = m_queue_wp.lock();
117b9c1b51eSKate Stone       if (queue_sp) {
1185e8dce4dSJason Molenda         Process::StopLocker stop_locker;
119b9c1b51eSKate Stone         if (stop_locker.TryLock(&queue_sp->GetProcess()->GetRunLock())) {
120b9c1b51eSKate Stone           const std::vector<QueueItemSP> queue_items(
121b9c1b51eSKate Stone               queue_sp->GetPendingItems());
1222fd83355SJason Molenda           m_pending_items_fetched = true;
1232fd83355SJason Molenda           const uint32_t num_pending_items = queue_items.size();
124b9c1b51eSKate Stone           for (uint32_t idx = 0; idx < num_pending_items; ++idx) {
1255e8dce4dSJason Molenda             QueueItemSP item = queue_items[idx];
126b9c1b51eSKate Stone             if (item && item->IsValid()) {
1272fd83355SJason Molenda               m_pending_items.push_back(item);
1285e8dce4dSJason Molenda             }
1295e8dce4dSJason Molenda           }
1305e8dce4dSJason Molenda         }
1315e8dce4dSJason Molenda       }
1325e8dce4dSJason Molenda     }
1335e8dce4dSJason Molenda   }
1345e8dce4dSJason Molenda 
135b9c1b51eSKate Stone   uint32_t GetNumThreads() {
1365e8dce4dSJason Molenda     uint32_t result = 0;
1375e8dce4dSJason Molenda 
1385e8dce4dSJason Molenda     FetchThreads();
139b9c1b51eSKate Stone     if (m_thread_list_fetched) {
1405e8dce4dSJason Molenda       result = m_threads.size();
1415e8dce4dSJason Molenda     }
1425e8dce4dSJason Molenda     return result;
1435e8dce4dSJason Molenda   }
1445e8dce4dSJason Molenda 
145b9c1b51eSKate Stone   lldb::SBThread GetThreadAtIndex(uint32_t idx) {
1465e8dce4dSJason Molenda     FetchThreads();
1475e8dce4dSJason Molenda 
1485e8dce4dSJason Molenda     SBThread sb_thread;
1495e8dce4dSJason Molenda     QueueSP queue_sp = m_queue_wp.lock();
150b9c1b51eSKate Stone     if (queue_sp && idx < m_threads.size()) {
1515e8dce4dSJason Molenda       ProcessSP process_sp = queue_sp->GetProcess();
152b9c1b51eSKate Stone       if (process_sp) {
1535e8dce4dSJason Molenda         ThreadSP thread_sp = m_threads[idx].lock();
154b9c1b51eSKate Stone         if (thread_sp) {
1555e8dce4dSJason Molenda           sb_thread.SetThread(thread_sp);
1565e8dce4dSJason Molenda         }
1575e8dce4dSJason Molenda       }
1585e8dce4dSJason Molenda     }
1595e8dce4dSJason Molenda     return sb_thread;
1605e8dce4dSJason Molenda   }
1615e8dce4dSJason Molenda 
162b9c1b51eSKate Stone   uint32_t GetNumPendingItems() {
1635e8dce4dSJason Molenda     uint32_t result = 0;
1645e8dce4dSJason Molenda 
165fe95dc95SJason Molenda     QueueSP queue_sp = m_queue_wp.lock();
166a6682a41SJonas Devlieghere     if (!m_pending_items_fetched && queue_sp) {
167fe95dc95SJason Molenda       result = queue_sp->GetNumPendingWorkItems();
168b9c1b51eSKate Stone     } else {
1692fd83355SJason Molenda       result = m_pending_items.size();
1705e8dce4dSJason Molenda     }
1715e8dce4dSJason Molenda     return result;
1725e8dce4dSJason Molenda   }
1735e8dce4dSJason Molenda 
174b9c1b51eSKate Stone   lldb::SBQueueItem GetPendingItemAtIndex(uint32_t idx) {
1755e8dce4dSJason Molenda     SBQueueItem result;
1765e8dce4dSJason Molenda     FetchItems();
177b9c1b51eSKate Stone     if (m_pending_items_fetched && idx < m_pending_items.size()) {
1782fd83355SJason Molenda       result.SetQueueItem(m_pending_items[idx]);
1795e8dce4dSJason Molenda     }
1805e8dce4dSJason Molenda     return result;
1815e8dce4dSJason Molenda   }
1825e8dce4dSJason Molenda 
183b9c1b51eSKate Stone   uint32_t GetNumRunningItems() {
184fe95dc95SJason Molenda     uint32_t result = 0;
185fe95dc95SJason Molenda     QueueSP queue_sp = m_queue_wp.lock();
186fe95dc95SJason Molenda     if (queue_sp)
187fe95dc95SJason Molenda       result = queue_sp->GetNumRunningWorkItems();
188fe95dc95SJason Molenda     return result;
189fe95dc95SJason Molenda   }
190fe95dc95SJason Molenda 
191b9c1b51eSKate Stone   lldb::SBProcess GetProcess() {
1925e8dce4dSJason Molenda     SBProcess result;
1935e8dce4dSJason Molenda     QueueSP queue_sp = m_queue_wp.lock();
194b9c1b51eSKate Stone     if (queue_sp) {
1955e8dce4dSJason Molenda       result.SetSP(queue_sp->GetProcess());
1965e8dce4dSJason Molenda     }
1975e8dce4dSJason Molenda     return result;
1985e8dce4dSJason Molenda   }
199c8064ac6SJason Molenda 
200b9c1b51eSKate Stone   lldb::QueueKind GetKind() {
201aac16e0fSJason Molenda     lldb::QueueKind kind = eQueueKindUnknown;
202aac16e0fSJason Molenda     QueueSP queue_sp = m_queue_wp.lock();
203aac16e0fSJason Molenda     if (queue_sp)
204aac16e0fSJason Molenda       kind = queue_sp->GetKind();
205aac16e0fSJason Molenda 
206aac16e0fSJason Molenda     return kind;
207aac16e0fSJason Molenda   }
208aac16e0fSJason Molenda 
209c8064ac6SJason Molenda private:
210c8064ac6SJason Molenda   lldb::QueueWP m_queue_wp;
211b9c1b51eSKate Stone   std::vector<lldb::ThreadWP>
212b9c1b51eSKate Stone       m_threads; // threads currently executing this queue's items
213b9c1b51eSKate Stone   bool
214b9c1b51eSKate Stone       m_thread_list_fetched; // have we tried to fetch the threads list already?
2152fd83355SJason Molenda   std::vector<lldb::QueueItemSP> m_pending_items; // items currently enqueued
2162fd83355SJason Molenda   bool m_pending_items_fetched; // have we tried to fetch the item list already?
217c8064ac6SJason Molenda };
218c8064ac6SJason Molenda }
219c8064ac6SJason Molenda 
220baf5664fSJonas Devlieghere SBQueue::SBQueue() : m_opaque_sp(new QueueImpl()) {
221baf5664fSJonas Devlieghere   LLDB_RECORD_CONSTRUCTOR_NO_ARGS(SBQueue);
222baf5664fSJonas Devlieghere }
223c8064ac6SJason Molenda 
224b9c1b51eSKate Stone SBQueue::SBQueue(const QueueSP &queue_sp)
225baf5664fSJonas Devlieghere     : m_opaque_sp(new QueueImpl(queue_sp)) {
226baf5664fSJonas Devlieghere   LLDB_RECORD_CONSTRUCTOR(SBQueue, (const lldb::QueueSP &), queue_sp);
227baf5664fSJonas Devlieghere }
228c8064ac6SJason Molenda 
229b9c1b51eSKate Stone SBQueue::SBQueue(const SBQueue &rhs) {
230baf5664fSJonas Devlieghere   LLDB_RECORD_CONSTRUCTOR(SBQueue, (const lldb::SBQueue &), rhs);
231baf5664fSJonas Devlieghere 
232c8064ac6SJason Molenda   if (&rhs == this)
233c8064ac6SJason Molenda     return;
234c8064ac6SJason Molenda 
235c8064ac6SJason Molenda   m_opaque_sp = rhs.m_opaque_sp;
236c8064ac6SJason Molenda }
237c8064ac6SJason Molenda 
238b9c1b51eSKate Stone const lldb::SBQueue &SBQueue::operator=(const lldb::SBQueue &rhs) {
239baf5664fSJonas Devlieghere   LLDB_RECORD_METHOD(const lldb::SBQueue &,
240baf5664fSJonas Devlieghere                      SBQueue, operator=,(const lldb::SBQueue &), rhs);
241baf5664fSJonas Devlieghere 
242c8064ac6SJason Molenda   m_opaque_sp = rhs.m_opaque_sp;
243c8064ac6SJason Molenda   return *this;
244c8064ac6SJason Molenda }
245c8064ac6SJason Molenda 
246b9c1b51eSKate Stone SBQueue::~SBQueue() {}
247c8064ac6SJason Molenda 
248b9c1b51eSKate Stone bool SBQueue::IsValid() const {
249baf5664fSJonas Devlieghere   LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBQueue, IsValid);
2507f5237bcSPavel Labath   return this->operator bool();
2517f5237bcSPavel Labath }
2527f5237bcSPavel Labath SBQueue::operator bool() const {
2537f5237bcSPavel Labath   LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBQueue, operator bool);
254baf5664fSJonas Devlieghere 
255581af8b0SJonas Devlieghere   return m_opaque_sp->IsValid();
256c8064ac6SJason Molenda }
257c8064ac6SJason Molenda 
258b9c1b51eSKate Stone void SBQueue::Clear() {
259baf5664fSJonas Devlieghere   LLDB_RECORD_METHOD_NO_ARGS(void, SBQueue, Clear);
260baf5664fSJonas Devlieghere 
261c8064ac6SJason Molenda   m_opaque_sp->Clear();
262c8064ac6SJason Molenda }
263c8064ac6SJason Molenda 
264b9c1b51eSKate Stone void SBQueue::SetQueue(const QueueSP &queue_sp) {
265c8064ac6SJason Molenda   m_opaque_sp->SetQueue(queue_sp);
266c8064ac6SJason Molenda }
267c8064ac6SJason Molenda 
268b9c1b51eSKate Stone lldb::queue_id_t SBQueue::GetQueueID() const {
269baf5664fSJonas Devlieghere   LLDB_RECORD_METHOD_CONST_NO_ARGS(lldb::queue_id_t, SBQueue, GetQueueID);
270baf5664fSJonas Devlieghere 
271581af8b0SJonas Devlieghere   return m_opaque_sp->GetQueueID();
272c8064ac6SJason Molenda }
273c8064ac6SJason Molenda 
274b9c1b51eSKate Stone uint32_t SBQueue::GetIndexID() const {
275baf5664fSJonas Devlieghere   LLDB_RECORD_METHOD_CONST_NO_ARGS(uint32_t, SBQueue, GetIndexID);
276baf5664fSJonas Devlieghere 
277ac605f4aSJason Molenda   uint32_t index_id = m_opaque_sp->GetIndexID();
278ac605f4aSJason Molenda   return index_id;
279c8064ac6SJason Molenda }
280c8064ac6SJason Molenda 
281b9c1b51eSKate Stone const char *SBQueue::GetName() const {
282baf5664fSJonas Devlieghere   LLDB_RECORD_METHOD_CONST_NO_ARGS(const char *, SBQueue, GetName);
283baf5664fSJonas Devlieghere 
284581af8b0SJonas Devlieghere   return m_opaque_sp->GetName();
285c8064ac6SJason Molenda }
286c8064ac6SJason Molenda 
287b9c1b51eSKate Stone uint32_t SBQueue::GetNumThreads() {
288baf5664fSJonas Devlieghere   LLDB_RECORD_METHOD_NO_ARGS(uint32_t, SBQueue, GetNumThreads);
289baf5664fSJonas Devlieghere 
290581af8b0SJonas Devlieghere   return m_opaque_sp->GetNumThreads();
291c8064ac6SJason Molenda }
292c8064ac6SJason Molenda 
293b9c1b51eSKate Stone SBThread SBQueue::GetThreadAtIndex(uint32_t idx) {
294baf5664fSJonas Devlieghere   LLDB_RECORD_METHOD(lldb::SBThread, SBQueue, GetThreadAtIndex, (uint32_t),
295baf5664fSJonas Devlieghere                      idx);
296baf5664fSJonas Devlieghere 
297ac605f4aSJason Molenda   SBThread th = m_opaque_sp->GetThreadAtIndex(idx);
298baf5664fSJonas Devlieghere   return LLDB_RECORD_RESULT(th);
299c8064ac6SJason Molenda }
300c8064ac6SJason Molenda 
301b9c1b51eSKate Stone uint32_t SBQueue::GetNumPendingItems() {
302baf5664fSJonas Devlieghere   LLDB_RECORD_METHOD_NO_ARGS(uint32_t, SBQueue, GetNumPendingItems);
303baf5664fSJonas Devlieghere 
304581af8b0SJonas Devlieghere   return m_opaque_sp->GetNumPendingItems();
305c8064ac6SJason Molenda }
306c8064ac6SJason Molenda 
307b9c1b51eSKate Stone SBQueueItem SBQueue::GetPendingItemAtIndex(uint32_t idx) {
308baf5664fSJonas Devlieghere   LLDB_RECORD_METHOD(lldb::SBQueueItem, SBQueue, GetPendingItemAtIndex,
309baf5664fSJonas Devlieghere                      (uint32_t), idx);
310baf5664fSJonas Devlieghere 
311baf5664fSJonas Devlieghere   return LLDB_RECORD_RESULT(m_opaque_sp->GetPendingItemAtIndex(idx));
312c8064ac6SJason Molenda }
313c8064ac6SJason Molenda 
314b9c1b51eSKate Stone uint32_t SBQueue::GetNumRunningItems() {
315baf5664fSJonas Devlieghere   LLDB_RECORD_METHOD_NO_ARGS(uint32_t, SBQueue, GetNumRunningItems);
316baf5664fSJonas Devlieghere 
317581af8b0SJonas Devlieghere   return m_opaque_sp->GetNumRunningItems();
318fe95dc95SJason Molenda }
319fe95dc95SJason Molenda 
320baf5664fSJonas Devlieghere SBProcess SBQueue::GetProcess() {
321baf5664fSJonas Devlieghere   LLDB_RECORD_METHOD_NO_ARGS(lldb::SBProcess, SBQueue, GetProcess);
322aac16e0fSJason Molenda 
323baf5664fSJonas Devlieghere   return LLDB_RECORD_RESULT(m_opaque_sp->GetProcess());
324baf5664fSJonas Devlieghere }
325baf5664fSJonas Devlieghere 
326baf5664fSJonas Devlieghere lldb::QueueKind SBQueue::GetKind() {
327baf5664fSJonas Devlieghere   LLDB_RECORD_METHOD_NO_ARGS(lldb::QueueKind, SBQueue, GetKind);
328baf5664fSJonas Devlieghere 
329baf5664fSJonas Devlieghere   return m_opaque_sp->GetKind();
330baf5664fSJonas Devlieghere }
331*ae211eceSMichal Gorny 
332*ae211eceSMichal Gorny namespace lldb_private {
333*ae211eceSMichal Gorny namespace repro {
334*ae211eceSMichal Gorny 
335*ae211eceSMichal Gorny template <>
336*ae211eceSMichal Gorny void RegisterMethods<SBQueue>(Registry &R) {
337*ae211eceSMichal Gorny   LLDB_REGISTER_CONSTRUCTOR(SBQueue, ());
338*ae211eceSMichal Gorny   LLDB_REGISTER_CONSTRUCTOR(SBQueue, (const lldb::QueueSP &));
339*ae211eceSMichal Gorny   LLDB_REGISTER_CONSTRUCTOR(SBQueue, (const lldb::SBQueue &));
340*ae211eceSMichal Gorny   LLDB_REGISTER_METHOD(const lldb::SBQueue &,
341*ae211eceSMichal Gorny                        SBQueue, operator=,(const lldb::SBQueue &));
342*ae211eceSMichal Gorny   LLDB_REGISTER_METHOD_CONST(bool, SBQueue, IsValid, ());
343*ae211eceSMichal Gorny   LLDB_REGISTER_METHOD_CONST(bool, SBQueue, operator bool, ());
344*ae211eceSMichal Gorny   LLDB_REGISTER_METHOD(void, SBQueue, Clear, ());
345*ae211eceSMichal Gorny   LLDB_REGISTER_METHOD_CONST(lldb::queue_id_t, SBQueue, GetQueueID, ());
346*ae211eceSMichal Gorny   LLDB_REGISTER_METHOD_CONST(uint32_t, SBQueue, GetIndexID, ());
347*ae211eceSMichal Gorny   LLDB_REGISTER_METHOD_CONST(const char *, SBQueue, GetName, ());
348*ae211eceSMichal Gorny   LLDB_REGISTER_METHOD(uint32_t, SBQueue, GetNumThreads, ());
349*ae211eceSMichal Gorny   LLDB_REGISTER_METHOD(lldb::SBThread, SBQueue, GetThreadAtIndex, (uint32_t));
350*ae211eceSMichal Gorny   LLDB_REGISTER_METHOD(uint32_t, SBQueue, GetNumPendingItems, ());
351*ae211eceSMichal Gorny   LLDB_REGISTER_METHOD(lldb::SBQueueItem, SBQueue, GetPendingItemAtIndex,
352*ae211eceSMichal Gorny                        (uint32_t));
353*ae211eceSMichal Gorny   LLDB_REGISTER_METHOD(uint32_t, SBQueue, GetNumRunningItems, ());
354*ae211eceSMichal Gorny   LLDB_REGISTER_METHOD(lldb::SBProcess, SBQueue, GetProcess, ());
355*ae211eceSMichal Gorny   LLDB_REGISTER_METHOD(lldb::QueueKind, SBQueue, GetKind, ());
356*ae211eceSMichal Gorny }
357*ae211eceSMichal Gorny 
358*ae211eceSMichal Gorny }
359*ae211eceSMichal Gorny }
360