LLDB  mainline
Public Member Functions | Public Attributes | List of all members
lldb_private::DynamicCheckerFunctions Class Reference

"lldb/Expression/IRDynamicChecks.h" Encapsulates dynamic check functions used by expressions. More...

#include <IRDynamicChecks.h>

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

Public Member Functions

 DynamicCheckerFunctions ()
 Constructor. More...
 
 ~DynamicCheckerFunctions ()
 Destructor. More...
 
bool Install (DiagnosticManager &diagnostic_manager, ExecutionContext &exe_ctx)
 Install the utility functions into a process. More...
 
bool DoCheckersExplainStop (lldb::addr_t addr, Stream &message)
 

Public Attributes

std::unique_ptr< UtilityFunctionm_valid_pointer_check
 
std::unique_ptr< UtilityFunctionm_objc_object_check
 

Detailed Description

"lldb/Expression/IRDynamicChecks.h" Encapsulates dynamic check functions used by expressions.

Each of the utility functions encapsulated in this class is responsible for validating some data that an expression is about to use. Examples are:

a = *b; // check that b is a valid pointer [b init]; // check that b is a valid object to send "init" to

The class installs each checker function into the target process and makes it available to IRDynamicChecks to use.

Definition at line 46 of file IRDynamicChecks.h.

Constructor & Destructor Documentation

◆ DynamicCheckerFunctions()

DynamicCheckerFunctions::DynamicCheckerFunctions ( )
default

Constructor.

◆ ~DynamicCheckerFunctions()

DynamicCheckerFunctions::~DynamicCheckerFunctions ( )
default

Destructor.

Member Function Documentation

◆ DoCheckersExplainStop()

bool DynamicCheckerFunctions::DoCheckersExplainStop ( lldb::addr_t  addr,
Stream message 
)

◆ Install()

bool DynamicCheckerFunctions::Install ( DiagnosticManager diagnostic_manager,
ExecutionContext exe_ctx 
)

Install the utility functions into a process.

This binds the instance of DynamicCheckerFunctions to that process.

Parameters
[in]diagnostic_managerA diagnostic manager to report errors to.
[in]exe_ctxThe execution context to install the functions into.
Returns
True on success; false on failure, or if the functions have already been installed.

Definition at line 47 of file IRDynamicChecks.cpp.

References lldb_private::ObjCLanguageRuntime::CreateObjectChecker(), lldb::eLanguageTypeC, lldb_private::Status::Fail(), g_valid_pointer_check_text, lldb_private::Process::GetObjCLanguageRuntime(), lldb_private::ExecutionContext::GetProcessPtr(), lldb_private::ExecutionContext::GetTargetRef(), lldb_private::Target::GetUtilityFunctionForLanguage(), VALID_OBJC_OBJECT_CHECK_NAME, and VALID_POINTER_CHECK_NAME.

Referenced by lldb_private::ClangExpressionParser::PrepareForExecution().

Member Data Documentation

◆ m_objc_object_check

std::unique_ptr<UtilityFunction> lldb_private::DynamicCheckerFunctions::m_objc_object_check

Definition at line 72 of file IRDynamicChecks.h.

Referenced by lldb_private::IRDynamicChecks::runOnModule().

◆ m_valid_pointer_check

std::unique_ptr<UtilityFunction> lldb_private::DynamicCheckerFunctions::m_valid_pointer_check

Definition at line 71 of file IRDynamicChecks.h.

Referenced by lldb_private::IRDynamicChecks::runOnModule().


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