klee
klee::ExternalDispatcherImpl Class Reference

Public Member Functions

 ExternalDispatcherImpl (llvm::LLVMContext &ctx)
 
 ~ExternalDispatcherImpl ()
 
bool executeCall (llvm::Function *function, llvm::Instruction *i, uint64_t *args)
 
void * resolveSymbol (const std::string &name)
 
int getLastErrno ()
 
void setLastErrno (int newErrno)
 

Private Types

typedef std::map< const llvm::Instruction *, llvm::Function * > dispatchers_ty
 

Private Member Functions

llvm::Function * createDispatcher (llvm::Function *f, llvm::Instruction *i, llvm::Module *module)
 
bool runProtectedCall (llvm::Function *f, uint64_t *args)
 
std::string & getFreshModuleID ()
 

Private Attributes

dispatchers_ty dispatchers
 
llvm::ExecutionEngine * executionEngine
 
LLVMContext & ctx
 
std::map< std::string, void * > preboundFunctions
 
llvm::Module * singleDispatchModule
 
std::vector< std::string > moduleIDs
 
int lastErrno
 

Detailed Description

Definition at line 47 of file ExternalDispatcher.cpp.

Member Typedef Documentation

◆ dispatchers_ty

typedef std::map<const llvm::Instruction *, llvm::Function *> klee::ExternalDispatcherImpl::dispatchers_ty
private

Definition at line 49 of file ExternalDispatcher.cpp.

Constructor & Destructor Documentation

◆ ExternalDispatcherImpl()

klee::ExternalDispatcherImpl::ExternalDispatcherImpl ( llvm::LLVMContext &  ctx)

Definition at line 112 of file ExternalDispatcher.cpp.

References ctx, executionEngine, getFreshModuleID(), preboundFunctions, and singleDispatchModule.

Here is the call graph for this function:

◆ ~ExternalDispatcherImpl()

klee::ExternalDispatcherImpl::~ExternalDispatcherImpl ( )

Definition at line 153 of file ExternalDispatcher.cpp.

References executionEngine.

Member Function Documentation

◆ createDispatcher()

Function * klee::ExternalDispatcherImpl::createDispatcher ( llvm::Function *  f,
llvm::Instruction *  i,
llvm::Module *  module 
)
private

Definition at line 255 of file ExternalDispatcher.cpp.

References ctx, klee::gTheArgsP, and resolveSymbol().

Referenced by executeCall().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ executeCall()

bool klee::ExternalDispatcherImpl::executeCall ( llvm::Function *  function,
llvm::Instruction *  i,
uint64_t *  args 
)

Definition at line 159 of file ExternalDispatcher.cpp.

References createDispatcher(), ctx, dispatchers, executionEngine, getFreshModuleID(), preboundFunctions, and runProtectedCall().

Referenced by klee::ExternalDispatcher::executeCall().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getFreshModuleID()

std::string & klee::ExternalDispatcherImpl::getFreshModuleID ( )
private

Definition at line 72 of file ExternalDispatcher.cpp.

References moduleIDs.

Referenced by executeCall(), and ExternalDispatcherImpl().

Here is the caller graph for this function:

◆ getLastErrno()

int klee::ExternalDispatcherImpl::getLastErrno ( )

Definition at line 339 of file ExternalDispatcher.cpp.

References lastErrno.

Referenced by klee::ExternalDispatcher::getLastErrno().

Here is the caller graph for this function:

◆ resolveSymbol()

void * klee::ExternalDispatcherImpl::resolveSymbol ( const std::string &  name)

Definition at line 85 of file ExternalDispatcher.cpp.

References executionEngine.

Referenced by createDispatcher(), and klee::ExternalDispatcher::resolveSymbol().

Here is the caller graph for this function:

◆ runProtectedCall()

bool klee::ExternalDispatcherImpl::runProtectedCall ( llvm::Function *  f,
uint64_t *  args 
)
private

Definition at line 214 of file ExternalDispatcher.cpp.

References escapeCallJmpBuf, executionEngine, klee::gTheArgsP, lastErrno, and sigsegv_handler().

Referenced by executeCall().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setLastErrno()

void klee::ExternalDispatcherImpl::setLastErrno ( int  newErrno)

Definition at line 340 of file ExternalDispatcher.cpp.

References lastErrno.

Referenced by klee::ExternalDispatcher::setLastErrno().

Here is the caller graph for this function:

Member Data Documentation

◆ ctx

LLVMContext& klee::ExternalDispatcherImpl::ctx
private

Definition at line 54 of file ExternalDispatcher.cpp.

Referenced by createDispatcher(), executeCall(), and ExternalDispatcherImpl().

◆ dispatchers

dispatchers_ty klee::ExternalDispatcherImpl::dispatchers
private

Definition at line 50 of file ExternalDispatcher.cpp.

Referenced by executeCall().

◆ executionEngine

llvm::ExecutionEngine* klee::ExternalDispatcherImpl::executionEngine
private

◆ lastErrno

int klee::ExternalDispatcherImpl::lastErrno
private

Definition at line 60 of file ExternalDispatcher.cpp.

Referenced by getLastErrno(), runProtectedCall(), and setLastErrno().

◆ moduleIDs

std::vector<std::string> klee::ExternalDispatcherImpl::moduleIDs
private

Definition at line 58 of file ExternalDispatcher.cpp.

Referenced by getFreshModuleID().

◆ preboundFunctions

std::map<std::string, void *> klee::ExternalDispatcherImpl::preboundFunctions
private

Definition at line 55 of file ExternalDispatcher.cpp.

Referenced by executeCall(), and ExternalDispatcherImpl().

◆ singleDispatchModule

llvm::Module* klee::ExternalDispatcherImpl::singleDispatchModule
private

Definition at line 57 of file ExternalDispatcher.cpp.

Referenced by ExternalDispatcherImpl().


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