|
gem5
v19.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> SymbolTable::ATable |
| typedef std::map<std::string, Addr> SymbolTable::STable |
|
inline |
|
inline |
| void SymbolTable::clear | ( | ) |
Definition at line 48 of file symtab.cc.
Referenced by ~SymbolTable().
|
inline |
Definition at line 97 of file symtab.hh.
References ArmISA::i.
Referenced by System::addFuncEvent(), dumpDmesgEntry(), Linux::ThreadInfo::get_data(), AlphaSystem::initState(), FreebsdArmSystem::initState(), LinuxArmSystem::initState(), LinuxAlphaSystem::initState(), main(), AlphaISA::ProcessInfo::ProcessInfo(), ArmISA::readSymbol(), X86ISA::readSymbol(), AlphaSystem::setAlphaAccess(), LinuxAlphaSystem::setDelayLoop(), and LinuxAlphaSystem::setupFuncEvents().
Definition at line 147 of file symtab.hh.
References ArmISA::i, and upperBound().
Referenced by FunctionProfile::sample(), and AlphaISA::StackTrace::trace().
Definition at line 160 of file symtab.hh.
References 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(), BaseCPU::traceFunctionsInternal(), and Trace::ExeTracerRecord::traceInst().
|
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 SymbolTable::insert | ( | Addr | address, |
| std::string | symbol | ||
| ) |
Definition at line 55 of file symtab.cc.
Referenced by PseudoInst::addsymbol(), EcoffObject::loadGlobalSymbols(), EcoffObject::loadLocalSymbols(), ElfObject::loadSomeSymbols(), PseudoInst::loadsymbol(), and ~SymbolTable().
| bool SymbolTable::load | ( | const std::string & | file | ) |
Definition at line 72 of file symtab.cc.
References addr, eat_white(), fatal, and to_number().
Referenced by main(), SymbolTable(), and ~SymbolTable().
| void SymbolTable::serialize | ( | const std::string & | base, |
| CheckpointOut & | cp | ||
| ) | const |
Definition at line 113 of file symtab.cc.
References csprintf(), ArmISA::i, MipsISA::p, and paramOut().
Referenced by getSymbolTable(), System::serialize(), SparcSystem::serializeSymtab(), and AlphaSystem::serializeSymtab().
| void SymbolTable::unserialize | ( | const std::string & | base, |
| CheckpointIn & | cp | ||
| ) |
Definition at line 127 of file symtab.cc.
References addr, csprintf(), ArmISA::i, and paramIn().
Referenced by getSymbolTable(), System::unserialize(), SparcSystem::unserializeSymtab(), and AlphaSystem::unserializeSymtab().
|
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().