LLDB mainline
Classes | Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
lldb_private::AppleGetPendingItemsHandler Class Reference

#include <AppleGetPendingItemsHandler.h>

Classes

struct  GetPendingItemsReturnInfo
 

Public Member Functions

 AppleGetPendingItemsHandler (lldb_private::Process *process)
 
 ~AppleGetPendingItemsHandler ()
 
GetPendingItemsReturnInfo GetPendingItems (Thread &thread, lldb::addr_t queue, lldb::addr_t page_to_free, uint64_t page_to_free_size, lldb_private::Status &error)
 Get the list of pending items for a given queue via a call to __introspection_dispatch_queue_get_pending_items.
 
void Detach ()
 

Private Member Functions

lldb::addr_t SetupGetPendingItemsFunction (Thread &thread, ValueList &get_pending_items_arglist)
 

Private Attributes

lldb_private::Processm_process
 
std::unique_ptr< UtilityFunctionm_get_pending_items_impl_code
 
std::mutex m_get_pending_items_function_mutex
 
lldb::addr_t m_get_pending_items_return_buffer_addr
 
std::mutex m_get_pending_items_retbuffer_mutex
 

Static Private Attributes

static const char * g_get_pending_items_function_name
 
static const char * g_get_pending_items_function_code
 

Detailed Description

Definition at line 44 of file AppleGetPendingItemsHandler.h.

Constructor & Destructor Documentation

◆ AppleGetPendingItemsHandler()

AppleGetPendingItemsHandler::AppleGetPendingItemsHandler ( lldb_private::Process process)

Definition at line 100 of file AppleGetPendingItemsHandler.cpp.

◆ ~AppleGetPendingItemsHandler()

AppleGetPendingItemsHandler::~AppleGetPendingItemsHandler ( )
default

Member Function Documentation

◆ Detach()

void AppleGetPendingItemsHandler::Detach ( )

◆ GetPendingItems()

AppleGetPendingItemsHandler::GetPendingItemsReturnInfo AppleGetPendingItemsHandler::GetPendingItems ( Thread thread,
lldb::addr_t  queue,
lldb::addr_t  page_to_free,
uint64_t  page_to_free_size,
lldb_private::Status error 
)

Get the list of pending items for a given queue via a call to __introspection_dispatch_queue_get_pending_items.

If there's a page of memory that needs to be freed, pass in the address and size and it will be freed before getting the list of queues.

Parameters
[in]threadThe thread to run this plan on.
[in]queueThe dispatch_queue_t value for the queue of interest.
[in]page_to_freeAn address of an inferior process vm page that needs to be deallocated, LLDB_INVALID_ADDRESS if this is not needed.
[in]page_to_free_sizeThe size of the vm page that needs to be deallocated if an address was passed in to page_to_free.
[out]errorThis object will be updated with the error status / error string from any failures encountered.
Returns
The result of the inferior function call execution. If there was a failure of any kind while getting the information, the items_buffer_ptr value will be LLDB_INVALID_ADDRESS.

Definition at line 212 of file AppleGetPendingItemsHandler.cpp.

References lldb_private::Thread::CalculateExecutionContext(), lldb_private::Thread::CalculateProcess(), lldb_private::Thread::CalculateTarget(), lldb_private::AppleGetPendingItemsHandler::GetPendingItemsReturnInfo::count, lldb::eBasicTypeInt, lldb::eBasicTypeUnsignedLongLong, lldb::eBasicTypeVoid, lldb::eExpressionCompleted, error(), lldb_private::FunctionCaller::ExecuteFunction(), lldb_private::ScratchTypeSystemClang::GetForTarget(), lldb_private::UserID::GetID(), lldb_private::GetLog(), lldb_private::CompilerType::GetPointerType(), lldb_private::Value::GetScalar(), lldb_private::Thread::GetStackFrameAtIndex(), lldb_private::AppleGetPendingItemsHandler::GetPendingItemsReturnInfo::items_buffer_ptr, lldb_private::AppleGetPendingItemsHandler::GetPendingItemsReturnInfo::items_buffer_size, LLDB_INVALID_ADDRESS, LLDB_LOGF, m_get_pending_items_impl_code, m_get_pending_items_retbuffer_mutex, m_get_pending_items_return_buffer_addr, m_process, lldb_private::ValueList::PushValue(), lldb_private::Process::ReadUnsignedIntegerFromMemory(), lldb_private::Thread::SafeToCallFunctions(), lldb_private::Value::Scalar, lldb_private::Value::SetCompilerType(), lldb_private::EvaluateExpressionOptions::SetIgnoreBreakpoints(), lldb_private::EvaluateExpressionOptions::SetIsForUtilityExpr(), lldb_private::EvaluateExpressionOptions::SetStopOthers(), lldb_private::EvaluateExpressionOptions::SetTimeout(), lldb_private::EvaluateExpressionOptions::SetTryAllThreads(), lldb_private::EvaluateExpressionOptions::SetUnwindOnError(), SetupGetPendingItemsFunction(), lldb_private::Value::SetValueType(), and lldb_private::SystemRuntime.

Referenced by SystemRuntimeMacOSX::GetPendingItemRefsForQueue().

◆ SetupGetPendingItemsFunction()

lldb::addr_t AppleGetPendingItemsHandler::SetupGetPendingItemsFunction ( Thread thread,
ValueList get_pending_items_arglist 
)
private

Member Data Documentation

◆ g_get_pending_items_function_code

const char * AppleGetPendingItemsHandler::g_get_pending_items_function_code
staticprivate

Definition at line 103 of file AppleGetPendingItemsHandler.h.

Referenced by SetupGetPendingItemsFunction().

◆ g_get_pending_items_function_name

const char * AppleGetPendingItemsHandler::g_get_pending_items_function_name
staticprivate
Initial value:
=
"__lldb_backtrace_recording_get_pending_items"

Definition at line 102 of file AppleGetPendingItemsHandler.h.

Referenced by SetupGetPendingItemsFunction().

◆ m_get_pending_items_function_mutex

std::mutex lldb_private::AppleGetPendingItemsHandler::m_get_pending_items_function_mutex
private

Definition at line 107 of file AppleGetPendingItemsHandler.h.

Referenced by SetupGetPendingItemsFunction().

◆ m_get_pending_items_impl_code

std::unique_ptr<UtilityFunction> lldb_private::AppleGetPendingItemsHandler::m_get_pending_items_impl_code
private

Definition at line 106 of file AppleGetPendingItemsHandler.h.

Referenced by GetPendingItems(), and SetupGetPendingItemsFunction().

◆ m_get_pending_items_retbuffer_mutex

std::mutex lldb_private::AppleGetPendingItemsHandler::m_get_pending_items_retbuffer_mutex
private

Definition at line 110 of file AppleGetPendingItemsHandler.h.

Referenced by Detach(), and GetPendingItems().

◆ m_get_pending_items_return_buffer_addr

lldb::addr_t lldb_private::AppleGetPendingItemsHandler::m_get_pending_items_return_buffer_addr
private

Definition at line 109 of file AppleGetPendingItemsHandler.h.

Referenced by Detach(), and GetPendingItems().

◆ m_process

lldb_private::Process* lldb_private::AppleGetPendingItemsHandler::m_process
private

Definition at line 105 of file AppleGetPendingItemsHandler.h.

Referenced by Detach(), and GetPendingItems().


The documentation for this class was generated from the following files: