Logo SoCRocket

Transaction-Level Modeling Framework for Space Applications

Public Member Functions | Static Public Member Functions | List of all members
trap::ELFFrontend Class Reference

#include <elfFrontend.hpp>

Collaboration diagram for trap::ELFFrontend:

Public Member Functions

 ~ELFFrontend ()
 
std::list< std::string > symbolsAt (unsigned int address) const throw ()
 
std::string symbolAt (unsigned int address) const throw ()
 
unsigned int getSymAddr (const std::string &symbol, bool &valid) const throw ()
 
std::string getExecName () const
 Returns the name of the executable file. More...
 
bool isRoutineEntry (unsigned int address) const
 Specifies whether the address is the first one of a rountine. More...
 
bool isRoutineExit (unsigned int address) const
 Specifies whether the address is the last one of a routine. More...
 
unsigned int getBinaryEnd () const
 Returns the end address of the loadable code. More...
 
unsigned int getBinaryStart () const
 Returns the start address of the loadable code. More...
 
unsigned int getEntryPoint () const
 Returns the entry point of the executable code. More...
 
bool getSrcFile (unsigned int address, std::string &fileName, unsigned int &line) const
 
unsigned chargetProgData ()
 Returns a pointer to the array contianing the program data. More...
 

Static Public Member Functions

static ELFFrontendgetInstance (std::string fileName)
 
static void reset ()
 

Constructor & Destructor Documentation

trap::ELFFrontend::~ELFFrontend ( )

Member Function Documentation

unsigned int trap::ELFFrontend::getBinaryEnd ( ) const

Returns the end address of the loadable code.

unsigned int trap::ELFFrontend::getBinaryStart ( ) const

Returns the start address of the loadable code.

unsigned int trap::ELFFrontend::getEntryPoint ( ) const

Returns the entry point of the executable code.

std::string trap::ELFFrontend::getExecName ( ) const

Returns the name of the executable file.

trap::ELFFrontend & trap::ELFFrontend::getInstance ( std::string  fileName)
static

References find().

Referenced by trap::ExecLoader::ExecLoader(), getCycleRange(), and trap::OSEmulator< issueWidth >::initSysCalls().

Here is the call graph for this function:

unsigned char * trap::ELFFrontend::getProgData ( )

Returns a pointer to the array contianing the program data.

bool trap::ELFFrontend::getSrcFile ( unsigned int  address,
std::string &  fileName,
unsigned int line 
) const

Given an address, it sets fileName to the name of the source file which contains the code and line to the line in that file. Returns false if the address is not valid

unsigned int trap::ELFFrontend::getSymAddr ( const std::string &  symbol,
bool valid 
) const
throw (
)

Given the name of a symbol it returns its value (which usually is its address); valid is set to false if no symbol with the specified name is found

Referenced by getCycleRange().

bool trap::ELFFrontend::isRoutineEntry ( unsigned int  address) const

Specifies whether the address is the first one of a rountine.

bool trap::ELFFrontend::isRoutineExit ( unsigned int  address) const

Specifies whether the address is the last one of a routine.

void trap::ELFFrontend::reset ( )
static
std::string trap::ELFFrontend::symbolAt ( unsigned int  address) const
throw (
)

Given an address, it returns the first symbol found there "" if no symbol is found at the specified address; note That if address is in the middle of a function, the symbol returned refers to the function itself

Referenced by trap::OSEmulator< issueWidth >::getRegisteredFunctions().

std::list< std::string > trap::ELFFrontend::symbolsAt ( unsigned int  address) const
throw (
)

Given an address, it returns the symbols found there,(more than one symbol can be mapped to an address). Note That if address is in the middle of a function, the symbol returned refers to the function itself


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