llvm/lldb/source/Plugins/SystemRuntime/MacOSX/AppleGetPendingItemsHandler.h

//===-- AppleGetPendingItemsHandler.h ----------------------------*- C++
//-*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef LLDB_SOURCE_PLUGINS_SYSTEMRUNTIME_MACOSX_APPLEGETPENDINGITEMSHANDLER_H
#define LLDB_SOURCE_PLUGINS_SYSTEMRUNTIME_MACOSX_APPLEGETPENDINGITEMSHANDLER_H

#include <map>
#include <mutex>
#include <vector>

#include "lldb/Symbol/CompilerType.h"
#include "lldb/Utility/Status.h"
#include "lldb/lldb-public.h"

// This class will insert a UtilityFunction into the inferior process for
// calling libBacktraceRecording's
// __introspection_dispatch_queue_get_pending_items()
// function.  The function in the inferior will return a struct by value
// with these members:
//
//     struct get_pending_items_return_values
//     {
//         introspection_dispatch_item_info_ref *items_buffer;
//         uint64_t items_buffer_size;
//         uint64_t count;
//     };
//
// The items_buffer pointer is an address in the inferior program's address
// space (items_buffer_size in size) which must be mach_vm_deallocate'd by
// lldb.  count is the number of items that were stored in the buffer.
//
// The AppleGetPendingItemsHandler object should persist so that the
// UtilityFunction
// can be reused multiple times.

namespace lldb_private {

class AppleGetPendingItemsHandler {};

} // using namespace lldb_private

#endif // LLDB_SOURCE_PLUGINS_SYSTEMRUNTIME_MACOSX_APPLEGETPENDINGITEMSHANDLER_H