gem5
v20.0.0.0
|
#include <symtab.hh>
Public Types | |
typedef std::multimap< Addr, std::string > | ATable |
typedef std::map< std::string, Addr > | STable |
Public Member Functions | |
SymbolTable () | |
SymbolTable (const std::string &file) | |
~SymbolTable () | |
void | clear () |
bool | insert (Addr address, std::string symbol) |
bool | load (const std::string &file) |
const ATable & | getAddrTable () const |
const STable & | getSymbolTable () const |
void | serialize (const std::string &base, CheckpointOut &cp) const |
void | unserialize (const std::string &base, CheckpointIn &cp) |
bool | findSymbol (Addr address, std::string &symbol) const |
bool | findAddress (const std::string &symbol, Addr &address) const |
bool | findNearestSymbol (Addr addr, std::string &symbol, Addr &symaddr, Addr &nextaddr) const |
Find the nearest symbol equal to or less than the supplied address (e.g., the label for the enclosing function). More... | |
bool | findNearestSymbol (Addr addr, std::string &symbol, Addr &symaddr) const |
Overload for findNearestSymbol() for callers who don't care about nextaddr. More... | |
bool | findNearestAddr (Addr addr, Addr &symaddr, Addr &nextaddr) const |
bool | findNearestAddr (Addr addr, Addr &symaddr) const |
Private Member Functions | |
bool | upperBound (Addr addr, ATable::const_iterator &iter) const |
Private Attributes | |
ATable | addrTable |
STable | symbolTable |
typedef std::multimap<Addr, std::string> Loader::SymbolTable::ATable |
typedef std::map<std::string, Addr> Loader::SymbolTable::STable |
|
inline |
|
inline |
void Loader::SymbolTable::clear | ( | ) |
Definition at line 49 of file symtab.cc.
References clear().
Referenced by clear(), and ~SymbolTable().
|
inline |
Definition at line 97 of file symtab.hh.
References ArmISA::i.
Referenced by Workload::addFuncEvent(), Linux::ThreadInfo::get_data(), ArmISA::FsFreebsd::initState(), ArmISA::FsLinux::initState(), and main().
|
inline |
Definition at line 147 of file symtab.hh.
References ArmISA::i, and upperBound().
Referenced by FunctionProfile::sample().
Definition at line 160 of file symtab.hh.
References Loader::debugSymbolTable, ArmISA::i, and upperBound().
|
inline |
Find the nearest symbol equal to or less than the supplied address (e.g., the label for the enclosing function).
addr | The address to look up. |
symbol | Return reference for symbol string. |
symaddr | Return reference for symbol address. |
nextaddr | Address of following symbol (for determining valid range of symbol). |
True | if a symbol was found. |
Definition at line 116 of file symtab.hh.
References ArmISA::i, and upperBound().
Referenced by SparcISA::BranchDisp::generateDisassembly(), ArmISA::ArmStaticInst::printMemSymbol(), ArmISA::ArmStaticInst::printTarget(), AnnotateDumpCallback::process(), and BaseCPU::traceFunctionsInternal().
|
inline |
Overload for findNearestSymbol() for callers who don't care about nextaddr.
Definition at line 133 of file symtab.hh.
References ArmISA::i, and upperBound().
|
inline |
Definition at line 84 of file symtab.hh.
References ArmISA::i.
Referenced by ProfileNode::dump(), FunctionProfile::dump(), PowerISA::BranchPCRel::generateDisassembly(), PowerISA::BranchNonPCRel::generateDisassembly(), PowerISA::BranchPCRelCond::generateDisassembly(), PowerISA::BranchNonPCRelCond::generateDisassembly(), and main().
|
inline |
|
inline |
Definition at line 76 of file symtab.hh.
References X86ISA::base, serialize(), symbolTable, and unserialize().
bool Loader::SymbolTable::insert | ( | Addr | address, |
std::string | symbol | ||
) |
Definition at line 56 of file symtab.cc.
Referenced by PseudoInst::addsymbol(), RiscvISA::BareMetal::insertSymbol(), SparcISA::FsWorkload::insertSymbol(), KernelWorkload::insertSymbol(), Loader::ElfObject::loadSomeSymbols(), and ~SymbolTable().
bool Loader::SymbolTable::load | ( | const std::string & | file | ) |
Definition at line 73 of file symtab.cc.
References addr, eat_white(), fatal, and to_number().
Referenced by main(), SymbolTable(), and ~SymbolTable().
void Loader::SymbolTable::serialize | ( | const std::string & | base, |
CheckpointOut & | cp | ||
) | const |
Definition at line 114 of file symtab.cc.
References csprintf(), ArmISA::i, MipsISA::p, and paramOut().
Referenced by getSymbolTable(), and KernelWorkload::serialize().
void Loader::SymbolTable::unserialize | ( | const std::string & | base, |
CheckpointIn & | cp | ||
) |
Definition at line 128 of file symtab.cc.
References addr, csprintf(), ArmISA::i, and paramIn().
Referenced by getSymbolTable(), and KernelWorkload::unserialize().
|
inlineprivate |
Definition at line 54 of file symtab.hh.
Referenced by findNearestAddr(), and findNearestSymbol().
|
private |
Definition at line 49 of file symtab.hh.
Referenced by getAddrTable().
|
private |
Definition at line 50 of file symtab.hh.
Referenced by getSymbolTable().