retdec
Private Attributes | List of all members
retdec::fileinfo::SymbolTable Class Reference

#include <symbol_table.h>

Collaboration diagram for retdec::fileinfo::SymbolTable:
Collaboration graph
[legend]

Public Member Functions

Getters
std::size_t getNumberOfStoredSymbols () const
 
std::string getNumberOfDeclaredSymbolsStr () const
 
std::string getTableName () const
 
std::string getTableOffsetStr (std::ios_base &(*format)(std::ios_base &)) const
 
std::string getSymbolName (std::size_t position) const
 
std::string getSymbolType (std::size_t position) const
 
std::string getSymbolBind (std::size_t position) const
 
std::string getSymbolOther (std::size_t position) const
 
std::string getSymbolLinkToSection (std::size_t position) const
 
std::string getSymbolIndexStr (std::size_t position) const
 
std::string getSymbolValueStr (std::size_t position) const
 
std::string getSymbolAddressStr (std::size_t position, std::ios_base &(*format)(std::ios_base &)) const
 
std::string getSymbolSizeStr (std::size_t position) const
 
std::size_t getNumberOfStoredSpecialInformation () const
 
std::size_t getNumberOfSpecialInformationValues (std::size_t position) const
 
std::string getSpecialInformationDescription (std::size_t position) const
 
std::string getSpecialInformationAbbreviation (std::size_t position) const
 
std::string getSpecialInformationValue (std::size_t infoIndex, std::size_t recordIndex) const
 
Setters
void setTableName (std::string tableName)
 
void setNumberOfDeclaredSymbols (unsigned long long symbols)
 
void setTableOffset (unsigned long long tableOffset)
 
Other methods
void addSymbol (Symbol &symbol)
 
void clearSymbols ()
 
void addSpecialInformation (SpecialInformation &information)
 
void clearSpecialInformation ()
 

Private Attributes

std::string name
 name of symbol table More...
 
unsigned long long offset = std::numeric_limits<unsigned long long>::max()
 offset of symbol table in file More...
 
unsigned long long declaredSymbols = std::numeric_limits<unsigned long long>::max()
 declared number of symbols in table More...
 
std::vector< Symboltable
 vector of symbols in table More...
 
std::vector< SpecialInformationextraInfo
 vector of special information (e.g. processor-specific information) More...
 

Detailed Description

Class for symbol table

Value std::numeric_limits<unsigned long long>::max() mean unspecified value or error for numeric types. Methods with index parameters does not perform control of indexes.

If extraInfo contains non-zero number of items, each item in extraInfo must contains as many records as member table.

Member Function Documentation

◆ addSpecialInformation()

void retdec::fileinfo::SymbolTable::addSpecialInformation ( SpecialInformation information)

Add special information

Parameters
informationInstance of class SpecialInformation

◆ addSymbol()

void retdec::fileinfo::SymbolTable::addSymbol ( Symbol symbol)

Add symbol

Parameters
symbolSymbol

◆ clearSpecialInformation()

void retdec::fileinfo::SymbolTable::clearSpecialInformation ( )

Delete all special information from table

◆ clearSymbols()

void retdec::fileinfo::SymbolTable::clearSymbols ( )

Delete all symbols from table

◆ getNumberOfDeclaredSymbolsStr()

std::string retdec::fileinfo::SymbolTable::getNumberOfDeclaredSymbolsStr ( ) const

Get number of symbols in table

Returns
Number of symbols in table

Returned value indicates the declared number of symbols stored in file table. This number may not be as large as result of method getNumberOfStoredSymbols().

◆ getNumberOfSpecialInformationValues()

std::size_t retdec::fileinfo::SymbolTable::getNumberOfSpecialInformationValues ( std::size_t  position) const

Get number of stored values of special information

Parameters
positionIndex of special information (0..x)
Returns
Number of values of selected special information

◆ getNumberOfStoredSpecialInformation()

std::size_t retdec::fileinfo::SymbolTable::getNumberOfStoredSpecialInformation ( ) const

Get number of stored special information

Returns
Number of special information in table

◆ getNumberOfStoredSymbols()

std::size_t retdec::fileinfo::SymbolTable::getNumberOfStoredSymbols ( ) const

Get number of symbols in table

Returns
Number of symbols in table

Returned value indicates the number of symbols stored in this instance. This number may not be as large as result of method getNumberOfDeclaredSymbols().

◆ getSpecialInformationAbbreviation()

std::string retdec::fileinfo::SymbolTable::getSpecialInformationAbbreviation ( std::size_t  position) const

Get short description of special information

Parameters
positionIndex of special information (0..x)
Returns
Short description of selected special information

◆ getSpecialInformationDescription()

std::string retdec::fileinfo::SymbolTable::getSpecialInformationDescription ( std::size_t  position) const

Get description of special information

Parameters
positionIndex of special information (0..x)
Returns
Description of selected special information

◆ getSpecialInformationValue()

std::string retdec::fileinfo::SymbolTable::getSpecialInformationValue ( std::size_t  infoIndex,
std::size_t  recordIndex 
) const

Get value of one record from special information

Parameters
infoIndexIndex of special information (0..x)
recordIndexIndex of record in selected special information (0..x)
Returns
Value of selected record

◆ getSymbolAddressStr()

std::string retdec::fileinfo::SymbolTable::getSymbolAddressStr ( std::size_t  position,
std::ios_base &(*)(std::ios_base &)  format 
) const

Get symbol address

Parameters
positionPosition of symbol in table (0..x)
formatFormat of result (e.g. std::dec, std::hex)
Returns
Symbol address

◆ getSymbolBind()

std::string retdec::fileinfo::SymbolTable::getSymbolBind ( std::size_t  position) const

Get symbol bind

Parameters
positionPosition of symbol in table (0..x)
Returns
Symbol bind

◆ getSymbolIndexStr()

std::string retdec::fileinfo::SymbolTable::getSymbolIndexStr ( std::size_t  position) const

Get index of symbol in symbol table

Parameters
positionPosition of symbol in table (0..x)
Returns
Index of symbol in symbol table

◆ getSymbolLinkToSection()

std::string retdec::fileinfo::SymbolTable::getSymbolLinkToSection ( std::size_t  position) const

Get symbol link to section

Parameters
positionPosition of symbol in table (0..x)
Returns
Symbol link to section

◆ getSymbolName()

std::string retdec::fileinfo::SymbolTable::getSymbolName ( std::size_t  position) const

Get symbol name

Parameters
positionPosition of symbol in table (0..x)
Returns
Symbol Name

◆ getSymbolOther()

std::string retdec::fileinfo::SymbolTable::getSymbolOther ( std::size_t  position) const

Get symbol other information

Parameters
positionPosition of symbol in table (0..x)
Returns
Symbol other information

◆ getSymbolSizeStr()

std::string retdec::fileinfo::SymbolTable::getSymbolSizeStr ( std::size_t  position) const

Get size associated with symbol

Parameters
positionPosition of symbol in table (0..x)
Returns
Size associated with symbol

◆ getSymbolType()

std::string retdec::fileinfo::SymbolTable::getSymbolType ( std::size_t  position) const

Get symbol type

Parameters
positionPosition of symbol in table (0..x)
Returns
Type of symbol

◆ getSymbolValueStr()

std::string retdec::fileinfo::SymbolTable::getSymbolValueStr ( std::size_t  position) const

Get symbol value

Parameters
positionPosition of symbol in table (0..x)
Returns
Symbol value

◆ getTableName()

std::string retdec::fileinfo::SymbolTable::getTableName ( ) const

Get name of symbol table

Returns
Name of symbol table

◆ getTableOffsetStr()

std::string retdec::fileinfo::SymbolTable::getTableOffsetStr ( std::ios_base &(*)(std::ios_base &)  format) const

Get offset of symbol table in file

Parameters
formatFormat of result (e.g. std::dec, std::hex)
Returns
Offset of symbol table in file

◆ setNumberOfDeclaredSymbols()

void retdec::fileinfo::SymbolTable::setNumberOfDeclaredSymbols ( unsigned long long  symbols)

Set declared number of symbols in table

Parameters
symbolsDeclared number of symbols in table

◆ setTableName()

void retdec::fileinfo::SymbolTable::setTableName ( std::string  tableName)

Set name of symbol table

Parameters
tableNameName of table

◆ setTableOffset()

void retdec::fileinfo::SymbolTable::setTableOffset ( unsigned long long  tableOffset)

Set offset of symbol table in file

Parameters
tableOffsetOffset of symbol table in file

Member Data Documentation

◆ declaredSymbols

unsigned long long retdec::fileinfo::SymbolTable::declaredSymbols = std::numeric_limits<unsigned long long>::max()
private

declared number of symbols in table

◆ extraInfo

std::vector<SpecialInformation> retdec::fileinfo::SymbolTable::extraInfo
private

vector of special information (e.g. processor-specific information)

◆ name

std::string retdec::fileinfo::SymbolTable::name
private

name of symbol table

◆ offset

unsigned long long retdec::fileinfo::SymbolTable::offset = std::numeric_limits<unsigned long long>::max()
private

offset of symbol table in file

◆ table

std::vector<Symbol> retdec::fileinfo::SymbolTable::table
private

vector of symbols in table


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