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

#include <AppleGetQueuesHandler.h>

Collaboration diagram for lldb_private::AppleGetQueuesHandler:
Collaboration graph
[legend]

Classes

struct  GetQueuesReturnInfo
 

Public Member Functions

 AppleGetQueuesHandler (lldb_private::Process *process)
 
 ~AppleGetQueuesHandler ()
 
GetQueuesReturnInfo GetCurrentQueues (Thread &thread, lldb::addr_t page_to_free, uint64_t page_to_free_size, lldb_private::Status &error)
 Get the list of queues that exist (with any active or pending items) via a call to introspection_get_dispatch_queues(). More...
 
void Detach ()
 

Private Member Functions

lldb::addr_t SetupGetQueuesFunction (Thread &thread, ValueList &get_queues_arglist)
 

Private Attributes

lldb_private::Processm_process
 
std::unique_ptr< UtilityFunctionm_get_queues_impl_code_up
 
std::mutex m_get_queues_function_mutex
 
lldb::addr_t m_get_queues_return_buffer_addr
 
std::mutex m_get_queues_retbuffer_mutex
 

Static Private Attributes

static const char * g_get_current_queues_function_name
 
static const char * g_get_current_queues_function_code
 

Detailed Description

Definition at line 41 of file AppleGetQueuesHandler.h.

Constructor & Destructor Documentation

◆ AppleGetQueuesHandler()

AppleGetQueuesHandler::AppleGetQueuesHandler ( lldb_private::Process process)

Definition at line 96 of file AppleGetQueuesHandler.cpp.

◆ ~AppleGetQueuesHandler()

AppleGetQueuesHandler::~AppleGetQueuesHandler ( )

Definition at line 102 of file AppleGetQueuesHandler.cpp.

Member Function Documentation

◆ Detach()

void AppleGetQueuesHandler::Detach ( )

◆ GetCurrentQueues()

AppleGetQueuesHandler::GetQueuesReturnInfo AppleGetQueuesHandler::GetCurrentQueues ( Thread thread,
lldb::addr_t  page_to_free,
uint64_t  page_to_free_size,
lldb_private::Status error 
)

Get the list of queues that exist (with any active or pending items) via a call to introspection_get_dispatch_queues().

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]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 queues_buffer_ptr value will be LLDB_INVALID_ADDRESS.

Definition at line 228 of file AppleGetQueuesHandler.cpp.

References lldb_private::Status::AsCString(), lldb_private::Thread::CalculateExecutionContext(), lldb_private::Thread::CalculateProcess(), lldb_private::Thread::CalculateTarget(), lldb_private::Status::Clear(), lldb_private::AppleGetQueuesHandler::GetQueuesReturnInfo::count, lldb::eBasicTypeInt, lldb::eBasicTypeUnsignedLongLong, lldb::eBasicTypeVoid, lldb::eExpressionCompleted, lldb_private::Value::eValueTypeScalar, lldb_private::FunctionCaller::ExecuteFunction(), lldb_private::UserID::GetID(), lldb_private::GetLogIfAllCategoriesSet(), lldb_private::CompilerType::GetPointerType(), lldb_private::Value::GetScalar(), lldb_private::TypeSystemClang::GetScratch(), lldb_private::Thread::GetStackFrameAtIndex(), LIBLLDB_LOG_SYSTEM_RUNTIME, LLDB_INVALID_ADDRESS, LLDB_LOGF, m_get_queues_impl_code_up, m_get_queues_retbuffer_mutex, m_get_queues_return_buffer_addr, m_process, lldb_private::ValueList::PushValue(), lldb_private::AppleGetQueuesHandler::GetQueuesReturnInfo::queues_buffer_ptr, lldb_private::AppleGetQueuesHandler::GetQueuesReturnInfo::queues_buffer_size, lldb_private::Process::ReadUnsignedIntegerFromMemory(), lldb_private::Thread::SafeToCallFunctions(), lldb_private::Value::SetCompilerType(), lldb_private::Status::SetErrorString(), lldb_private::EvaluateExpressionOptions::SetIgnoreBreakpoints(), lldb_private::EvaluateExpressionOptions::SetIsForUtilityExpr(), lldb_private::EvaluateExpressionOptions::SetStopOthers(), lldb_private::EvaluateExpressionOptions::SetTimeout(), lldb_private::EvaluateExpressionOptions::SetTryAllThreads(), lldb_private::EvaluateExpressionOptions::SetUnwindOnError(), SetupGetQueuesFunction(), lldb_private::Value::SetValueType(), and lldb_private::Status::Success().

Referenced by lldb_private::AppleGetQueuesHandler::GetQueuesReturnInfo::GetQueuesReturnInfo(), and SystemRuntimeMacOSX::PopulateQueueList().

◆ SetupGetQueuesFunction()

lldb::addr_t AppleGetQueuesHandler::SetupGetQueuesFunction ( Thread thread,
ValueList get_queues_arglist 
)
private

Member Data Documentation

◆ g_get_current_queues_function_code

const char * AppleGetQueuesHandler::g_get_current_queues_function_code
staticprivate

Definition at line 97 of file AppleGetQueuesHandler.h.

Referenced by SetupGetQueuesFunction().

◆ g_get_current_queues_function_name

const char * AppleGetQueuesHandler::g_get_current_queues_function_name
staticprivate
Initial value:
=
"__lldb_backtrace_recording_get_current_queues"

Definition at line 96 of file AppleGetQueuesHandler.h.

Referenced by SetupGetQueuesFunction().

◆ m_get_queues_function_mutex

std::mutex lldb_private::AppleGetQueuesHandler::m_get_queues_function_mutex
private

Definition at line 101 of file AppleGetQueuesHandler.h.

Referenced by SetupGetQueuesFunction().

◆ m_get_queues_impl_code_up

std::unique_ptr<UtilityFunction> lldb_private::AppleGetQueuesHandler::m_get_queues_impl_code_up
private

Definition at line 100 of file AppleGetQueuesHandler.h.

Referenced by GetCurrentQueues(), and SetupGetQueuesFunction().

◆ m_get_queues_retbuffer_mutex

std::mutex lldb_private::AppleGetQueuesHandler::m_get_queues_retbuffer_mutex
private

Definition at line 104 of file AppleGetQueuesHandler.h.

Referenced by Detach(), and GetCurrentQueues().

◆ m_get_queues_return_buffer_addr

lldb::addr_t lldb_private::AppleGetQueuesHandler::m_get_queues_return_buffer_addr
private

Definition at line 103 of file AppleGetQueuesHandler.h.

Referenced by Detach(), and GetCurrentQueues().

◆ m_process

lldb_private::Process* lldb_private::AppleGetQueuesHandler::m_process
private

Definition at line 99 of file AppleGetQueuesHandler.h.

Referenced by Detach(), and GetCurrentQueues().


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