LLDB  mainline
Public Member Functions | Protected Member Functions | List of all members
ValidPointerChecker Class Reference
Inheritance diagram for ValidPointerChecker:
Inheritance graph
[legend]
Collaboration diagram for ValidPointerChecker:
Collaboration graph
[legend]

Public Member Functions

 ValidPointerChecker (llvm::Module &module, DynamicCheckerFunctions &checker_functions)
 
 ~ValidPointerChecker () override=default
 
- Public Member Functions inherited from Instrumenter
 Instrumenter (llvm::Module &module, DynamicCheckerFunctions &checker_functions)
 Constructor. More...
 
virtual ~Instrumenter ()=default
 
bool Inspect (llvm::Function &function)
 Inspect a function to find instructions to instrument. More...
 
bool Instrument ()
 Instrument all the instructions found by Inspect() More...
 

Protected Member Functions

bool InstrumentInstruction (llvm::Instruction *inst) override
 Add instrumentation to a single instruction. More...
 
bool InspectInstruction (llvm::Instruction &i) override
 Determine whether a single instruction is interesting to instrument, and, if so, call RegisterInstruction. More...
 
- Protected Member Functions inherited from Instrumenter
void RegisterInstruction (llvm::Instruction &i)
 Register a single instruction to be instrumented. More...
 
virtual bool InspectBasicBlock (llvm::BasicBlock &bb)
 Scan a basic block to see if any instructions are interesting. More...
 
virtual bool InspectFunction (llvm::Function &f)
 Scan a function to see if any instructions are interesting. More...
 
llvm::FunctionCallee BuildPointerValidatorFunc (lldb::addr_t start_address)
 Build a function pointer for a function with signature void (*)(uint8_t*) with a given address. More...
 
llvm::FunctionCallee BuildObjectCheckerFunc (lldb::addr_t start_address)
 Build a function pointer for a function with signature void (*)(uint8_t*, uint8_t*) with a given address. More...
 
PointerType * GetI8PtrTy ()
 
IntegerType * GetIntptrTy ()
 

Additional Inherited Members

- Protected Types inherited from Instrumenter
typedef std::vector< llvm::Instruction * > InstVector
 
typedef InstVector::iterator InstIterator
 
- Protected Attributes inherited from Instrumenter
InstVector m_to_instrument
 List of instructions the inspector found. More...
 
llvm::Module & m_module
 The module which is being instrumented. More...
 
DynamicCheckerFunctionsm_checker_functions
 The dynamic checker functions for the process. More...
 

Detailed Description

Definition at line 307 of file IRDynamicChecks.cpp.

Constructor & Destructor Documentation

◆ ValidPointerChecker()

ValidPointerChecker::ValidPointerChecker ( llvm::Module &  module,
DynamicCheckerFunctions checker_functions 
)
inline

Definition at line 309 of file IRDynamicChecks.cpp.

◆ ~ValidPointerChecker()

ValidPointerChecker::~ValidPointerChecker ( )
overridedefault

Member Function Documentation

◆ InspectInstruction()

bool ValidPointerChecker::InspectInstruction ( llvm::Instruction &  i)
inlineoverrideprotectedvirtual

Determine whether a single instruction is interesting to instrument, and, if so, call RegisterInstruction.

Parameters
[in]iThe instruction to be inspected.
Returns
False if there was an error scanning; true otherwise.

Reimplemented from Instrumenter.

Definition at line 355 of file IRDynamicChecks.cpp.

◆ InstrumentInstruction()

bool ValidPointerChecker::InstrumentInstruction ( llvm::Instruction *  inst)
inlineoverrideprotectedvirtual

Add instrumentation to a single instruction.

Parameters
[in]instThe instruction to be instrumented.
Returns
True on success; false otherwise.

Implements Instrumenter.

Definition at line 317 of file IRDynamicChecks.cpp.

References lldb_private::GetLogIfAllCategoriesSet(), LIBLLDB_LOG_EXPRESSIONS, lldb_private::Log::Printf(), and PrintValue().


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