//===-- AppleGetQueuesHandler.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_APPLEGETQUEUESHANDLER_H #define LLDB_SOURCE_PLUGINS_SYSTEMRUNTIME_MACOSX_APPLEGETQUEUESHANDLER_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_get_dispatch_queues() // function. The function in the inferior will return a struct by value // with these members: // // struct get_current_queues_return_values // { // introspection_dispatch_queue_info_t *queues_buffer; // uint64_t queues_buffer_size; // uint64_t count; // }; // // The queues_buffer pointer is an address in the inferior program's address // space (queues_buffer_size in size) which must be mach_vm_deallocate'd by // lldb. count is the number of queues that were stored in the buffer. // // The AppleGetQueuesHandler object should persist so that the UtilityFunction // can be reused multiple times. namespace lldb_private { class AppleGetQueuesHandler { … }; } // using namespace lldb_private #endif // LLDB_SOURCE_PLUGINS_SYSTEMRUNTIME_MACOSX_APPLEGETQUEUESHANDLER_H