retdec
|
#include <symbol_table.h>
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< Symbol > | table |
vector of symbols in table More... | |
std::vector< SpecialInformation > | extraInfo |
vector of special information (e.g. processor-specific information) More... | |
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.
void retdec::fileinfo::SymbolTable::addSpecialInformation | ( | SpecialInformation & | information | ) |
Add special information
information | Instance of class SpecialInformation |
void retdec::fileinfo::SymbolTable::clearSpecialInformation | ( | ) |
Delete all special information from table
void retdec::fileinfo::SymbolTable::clearSymbols | ( | ) |
Delete all symbols from table
std::string retdec::fileinfo::SymbolTable::getNumberOfDeclaredSymbolsStr | ( | ) | const |
Get 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().
std::size_t retdec::fileinfo::SymbolTable::getNumberOfSpecialInformationValues | ( | std::size_t | position | ) | const |
Get number of stored values of special information
position | Index of special information (0..x) |
std::size_t retdec::fileinfo::SymbolTable::getNumberOfStoredSpecialInformation | ( | ) | const |
Get number of stored special information
std::size_t retdec::fileinfo::SymbolTable::getNumberOfStoredSymbols | ( | ) | const |
Get 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().
std::string retdec::fileinfo::SymbolTable::getSpecialInformationAbbreviation | ( | std::size_t | position | ) | const |
Get short description of special information
position | Index of special information (0..x) |
std::string retdec::fileinfo::SymbolTable::getSpecialInformationDescription | ( | std::size_t | position | ) | const |
Get description of special information
position | Index of special information (0..x) |
std::string retdec::fileinfo::SymbolTable::getSpecialInformationValue | ( | std::size_t | infoIndex, |
std::size_t | recordIndex | ||
) | const |
Get value of one record from special information
infoIndex | Index of special information (0..x) |
recordIndex | Index of record in selected special information (0..x) |
std::string retdec::fileinfo::SymbolTable::getSymbolAddressStr | ( | std::size_t | position, |
std::ios_base &(*)(std::ios_base &) | format | ||
) | const |
Get symbol address
position | Position of symbol in table (0..x) |
format | Format of result (e.g. std::dec, std::hex) |
std::string retdec::fileinfo::SymbolTable::getSymbolBind | ( | std::size_t | position | ) | const |
std::string retdec::fileinfo::SymbolTable::getSymbolIndexStr | ( | std::size_t | position | ) | const |
Get index of symbol in symbol table
position | Position of symbol in table (0..x) |
std::string retdec::fileinfo::SymbolTable::getSymbolLinkToSection | ( | std::size_t | position | ) | const |
Get symbol link to section
position | Position of symbol in table (0..x) |
std::string retdec::fileinfo::SymbolTable::getSymbolName | ( | std::size_t | position | ) | const |
std::string retdec::fileinfo::SymbolTable::getSymbolOther | ( | std::size_t | position | ) | const |
Get symbol other information
position | Position of symbol in table (0..x) |
std::string retdec::fileinfo::SymbolTable::getSymbolSizeStr | ( | std::size_t | position | ) | const |
Get size associated with symbol
position | Position of symbol in table (0..x) |
std::string retdec::fileinfo::SymbolTable::getSymbolType | ( | std::size_t | position | ) | const |
Get symbol type
position | Position of symbol in table (0..x) |
std::string retdec::fileinfo::SymbolTable::getSymbolValueStr | ( | std::size_t | position | ) | const |
std::string retdec::fileinfo::SymbolTable::getTableName | ( | ) | const |
Get name of symbol table
std::string retdec::fileinfo::SymbolTable::getTableOffsetStr | ( | std::ios_base &(*)(std::ios_base &) | format | ) | const |
Get offset of symbol table in file
format | Format of result (e.g. std::dec, std::hex) |
void retdec::fileinfo::SymbolTable::setNumberOfDeclaredSymbols | ( | unsigned long long | symbols | ) |
Set declared number of symbols in table
symbols | Declared number of symbols in table |
void retdec::fileinfo::SymbolTable::setTableName | ( | std::string | tableName | ) |
Set name of symbol table
tableName | Name of table |
void retdec::fileinfo::SymbolTable::setTableOffset | ( | unsigned long long | tableOffset | ) |
Set offset of symbol table in file
tableOffset | Offset of symbol table in file |
|
private |
declared number of symbols in table
|
private |
vector of special information (e.g. processor-specific information)
|
private |
name of symbol table
|
private |
offset of symbol table in file
|
private |
vector of symbols in table