ETISS 0.8.0
Extendable Translating Instruction Set Simulator (version 0.8.0)
Public Member Functions | Private Attributes | List of all members
TCCJIT Class Reference

#include <TCCJIT.h>

Inheritance diagram for TCCJIT:
Inheritance graph
[legend]
Collaboration diagram for TCCJIT:
Collaboration graph
[legend]

Public Member Functions

 TCCJIT ()
 
virtual void * translate (std::string code, std::set< std::string > headerpaths, std::set< std::string > librarypaths, std::set< std::string > libraries, std::string &error, bool debug=false)
 translate C code to executable code and return a handle/pointer that identifies the compilation result More...
 
virtual void * getFunction (void *handle, std::string name, std::string &error)
 returns a function pointer to a compiled function from the handle returned by etiss::JIT::translate More...
 
virtual void free (void *handle)
 clean up handled returned by etiss::JIT::translate More...
 
- Public Member Functions inherited from etiss::JIT
 JIT (std::string name)
 
virtual ~JIT ()
 
std::string getName ()
 returns the JIT instance name previously passed to the constructor More...
 

Private Attributes

std::map< std::string, void * > extsymbols
 only use for windows. More...
 

Detailed Description

Definition at line 46 of file TCCJIT.h.

Constructor & Destructor Documentation

◆ TCCJIT()

TCCJIT::TCCJIT ( )

Definition at line 101 of file TCCJIT.cpp.

References extsymbols.

Member Function Documentation

◆ free()

void TCCJIT::free ( void *  handle)
virtual

clean up handled returned by etiss::JIT::translate

Implements etiss::JIT.

Definition at line 183 of file TCCJIT.cpp.

◆ getFunction()

void * TCCJIT::getFunction ( void *  handle,
std::string  name,
std::string &  error 
)
virtual

returns a function pointer to a compiled function from the handle returned by etiss::JIT::translate

Implements etiss::JIT.

Definition at line 178 of file TCCJIT.cpp.

◆ translate()

void * TCCJIT::translate ( std::string  code,
std::set< std::string >  headerpaths,
std::set< std::string >  librarypaths,
std::set< std::string >  libraries,
std::string &  error,
bool  debug = false 
)
virtual

translate C code to executable code and return a handle/pointer that identifies the compilation result

Parameters
codegenerated code
headerpathspaths where required header files are located
librarypathspaths where required libraries are located (usually not needed since libraries don't require full linking)
librariesfile names of required libraries (usually not needed since libraries don't require full linking)
errorstring to return additional error information
debugif true then compilation should try to enable gdb to jump into compiled functions

Implements etiss::JIT.

Definition at line 108 of file TCCJIT.cpp.

References etiss::LibraryInterface::addSearchPath(), extsymbols, etiss::jitExtLibPaths(), etiss::jitFiles(), and s.

Here is the call graph for this function:

Member Data Documentation

◆ extsymbols

std::map<std::string, void *> TCCJIT::extsymbols
private

only use for windows.

manual linking to symbols of current executable

Definition at line 56 of file TCCJIT.h.

Referenced by TCCJIT(), and translate().


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