LLDB mainline
|
Public Types | |
enum | msgSend_type { eMsgSend = 0 , eMsgSendSuper , eMsgSendSuper_stret , eMsgSend_fpret , eMsgSend_stret } |
Public Member Functions | |
ObjcObjectChecker (llvm::Module &module, std::shared_ptr< UtilityFunction > checker_function) | |
~ObjcObjectChecker () override=default | |
Public Member Functions inherited from Instrumenter | |
Instrumenter (llvm::Module &module, std::shared_ptr< UtilityFunction > checker_function) | |
Constructor. | |
virtual | ~Instrumenter ()=default |
bool | Inspect (llvm::Function &function) |
Inspect a function to find instructions to instrument. | |
bool | Instrument () |
Instrument all the instructions found by Inspect() |
Public Attributes | |
std::map< llvm::Instruction *, msgSend_type > | msgSend_types |
Protected Member Functions | |
bool | InstrumentInstruction (llvm::Instruction *inst) override |
Add instrumentation to a single instruction. | |
bool | InspectInstruction (llvm::Instruction &i) override |
Determine whether a single instruction is interesting to instrument, and, if so, call RegisterInstruction. | |
Protected Member Functions inherited from Instrumenter | |
void | RegisterInstruction (llvm::Instruction &inst) |
Register a single instruction to be instrumented. | |
virtual bool | InspectBasicBlock (llvm::BasicBlock &bb) |
Scan a basic block to see if any instructions are interesting. | |
virtual bool | InspectFunction (llvm::Function &f) |
Scan a function to see if any instructions are interesting. | |
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. | |
PointerType * | GetI8PtrTy () |
IntegerType * | GetIntptrTy () |
Static Protected Member Functions | |
static llvm::Function * | GetFunction (llvm::Value *value) |
static llvm::Function * | GetCalledFunction (llvm::CallInst *inst) |
Private Attributes | |
llvm::FunctionCallee | m_objc_object_check_func |
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. | |
llvm::Module & | m_module |
The module which is being instrumented. | |
std::shared_ptr< UtilityFunction > | m_checker_function |
The dynamic checker function for the process. |
Definition at line 268 of file IRDynamicChecks.cpp.
Enumerator | |
---|---|
eMsgSend | |
eMsgSendSuper | |
eMsgSendSuper_stret | |
eMsgSend_fpret | |
eMsgSend_stret |
Definition at line 277 of file IRDynamicChecks.cpp.
|
inline |
Definition at line 270 of file IRDynamicChecks.cpp.
References Instrumenter::Instrumenter(), and m_objc_object_check_func.
|
overridedefault |
|
inlinestaticprotected |
Definition at line 362 of file IRDynamicChecks.cpp.
References GetFunction().
Referenced by InspectInstruction().
|
inlinestaticprotected |
Definition at line 344 of file IRDynamicChecks.cpp.
References GetFunction().
Referenced by GetCalledFunction(), and GetFunction().
|
inlineoverrideprotectedvirtual |
Determine whether a single instruction is interesting to instrument, and, if so, call RegisterInstruction.
[in] | i | The instruction to be inspected. |
Reimplemented from Instrumenter.
Definition at line 366 of file IRDynamicChecks.cpp.
References eMsgSend, eMsgSend_fpret, eMsgSend_stret, eMsgSendSuper, eMsgSendSuper_stret, lldb_private::Expressions, GetCalledFunction(), lldb_private::GetLog(), LLDB_LOGF, msgSend_types, PrintValue(), and Instrumenter::RegisterInstruction().
|
inlineoverrideprotectedvirtual |
Add instrumentation to a single instruction.
[in] | inst | The instruction to be instrumented. |
Implements Instrumenter.
Definition at line 288 of file IRDynamicChecks.cpp.
References Instrumenter::BuildObjectCheckerFunc(), eMsgSend, eMsgSend_fpret, eMsgSend_stret, eMsgSendSuper, eMsgSendSuper_stret, Instrumenter::m_checker_function, m_objc_object_check_func, and msgSend_types.
|
private |
Definition at line 427 of file IRDynamicChecks.cpp.
Referenced by InstrumentInstruction(), and ObjcObjectChecker().
std::map<llvm::Instruction *, msgSend_type> ObjcObjectChecker::msgSend_types |
Definition at line 285 of file IRDynamicChecks.cpp.
Referenced by InspectInstruction(), and InstrumentInstruction().