|
HPCToolkit
|
#include <LM.hpp>


Public Types | |
| enum | Type { TypeNULL = 0, TypeExe, TypeDSO } |
| enum | ReadFlg { ReadFlg_NULL = 0, ReadFlg_fSeg = 0x0001, ReadFlg_fProc = 0x0010, ReadFlg_fInsn = 0x0100, ReadFlg_ALL = ReadFlg_fSeg | ReadFlg_fProc | ReadFlg_fInsn, ReadFlg_Proc = ReadFlg_fSeg | ReadFlg_fProc, ReadFlg_Seg = ReadFlg_fSeg } |
| enum | DumpTy { DUMP_Short = 0x00000000, DUMP_Mid = 0x00000110, DUMP_Mid_decode = 0x00000130, DUMP_Long = 0x11111111, DUMP_Long_decode = 0x11111131, DUMP_Flg_SymTab = 0x00000001, DUMP_Flg_Insn_ty = 0x00000010, DUMP_Flg_Insn_decode = 0x00000020, DUMP_Flg_Sym = 0x00000100 } |
| typedef VMAIntervalMap< Seg * > | SegMap |
| typedef VMAIntervalMap< Proc * > | ProcMap |
| typedef std::map< VMA, Insn * > | InsnMap |
Public Member Functions | |
| LM (bool useBinutils=false) | |
| virtual | ~LM () |
| virtual void | open (const char *filenm) |
| virtual void | read (const std::set< std::string > &directorySet, ReadFlg readflg) |
| const std::string & | name () const |
| Type | type () const |
| ReadFlg | readFlags () |
| VMA | textBeg () const |
| VMA | textEnd () const |
| void | textBeg (VMA x) |
| void | textEnd (VMA x) |
| VMA | firstVMA () const |
| void | firstVMA (VMA x) |
| void | textBegEndVMA (VMA *begVMA, VMA *endVMA) |
| void | relocate (VMA textBegReloc) |
| bool | isRelocated () const |
| bool | doUnrelocate (VMA loadAddr) const |
| SegMap & | segs () |
| const SegMap & | segs () const |
| Seg * | findSeg (VMA vma) const |
| bool | insertSeg (VMAInterval ival, Seg *seg) |
| uint | numSegs () const |
| ProcMap & | procs () |
| const ProcMap & | procs () const |
| Proc * | findProc (VMA vma) const |
| bool | insertProc (VMAInterval ival, Proc *proc) |
| MachInsn * | findMachInsn (VMA vma, ushort &size) const |
| InsnMap & | insns () |
| const InsnMap & | insns () const |
| Insn * | findInsn (VMA vma, ushort opIndex) const |
| Insn * | findInsnNear (VMA vma, ushort opIndex) const |
| void | insertInsn (VMA vma, ushort opIndex, Insn *insn) |
| bool | isPseudolLoadModule () |
| const char * | getPseudoLoadModuleName () |
| bool | functionNeverReturns (VMA addr) |
| bool | findSrcCodeInfo (VMA vma, ushort opIndex, std::string &func, std::string &file, SrcFile::ln &line) |
| bool | findSrcCodeInfo (VMA begVMA, ushort bOpIndex, VMA endVMA, ushort eOpIndex, std::string &func, std::string &file, SrcFile::ln &begLine, SrcFile::ln &endLine, unsigned flags=1) |
| bool | findProcSrcCodeInfo (VMA vma, ushort opIndex, SrcFile::ln &line) const |
| bool | realpath (std::string &filenm) |
| bfd * | abfd () const |
| asymbol ** | bfdSymTab () const |
| uint | bfdSymTabSz () const |
| std::string | toString (int flags=DUMP_Short, const char *pre="") const |
| virtual void | dump (std::ostream &o=std::cerr, int flags=DUMP_Short, const char *pre="") const |
| void | ddump (int code=DUMP_Long_decode) const |
| virtual void | dumpme (std::ostream &o=std::cerr, const char *pre="") const |
| virtual void | dumpProcMap (std::ostream &o=std::cerr, unsigned flag=0, const char *pre="") const |
| void | ddumpProcMap (unsigned flag) const |
Static Public Attributes | |
| static ISA * | isa = NULL |
Protected Member Functions | |
| LM (const LM &GCC_ATTR_UNUSED lm) | |
| LM & | operator= (const LM &GCC_ATTR_UNUSED lm) |
Private Member Functions | |
| void | readSymbolTables () |
| void | readSegs () |
| void | computeNoReturns () |
| VMA | unrelocate (VMA relocVMA) const |
| void | dumpModuleInfo (std::ostream &o=std::cerr, const char *pre="") const |
| void | dumpSymTab (std::ostream &o=std::cerr, const char *pre="") const |
| BinUtil::Dbg::LM * | getDebugInfo () |
Static Private Member Functions | |
| static int | cmpBFDSymByVMA (const void *s1, const void *s2) |
Private Attributes | |
| std::string | m_name |
| Type | m_type |
| ReadFlg | m_readFlags |
| VMA | m_txtBeg |
| VMA | m_txtEnd |
| VMA | m_begVMA |
| VMA | m_textBegReloc |
| VMASigned | m_unrelocDelta |
| SegMap | m_segMap |
| ProcMap | m_procMap |
| InsnMap | m_insnMap |
| BinUtil::Dbg::LM | m_dbgInfo |
| bfd * | m_bfd |
| asymbol ** | m_bfdSymTab |
| asymbol ** | m_bfdDynSymTab |
| asymbol * | m_bfdSynthTab |
| asymbol ** | m_bfdSymTabSort |
| long | m_bfdSymTabSz |
| long | m_bfdDynSymTabSz |
| long | m_bfdSymTabSortSz |
| long | m_bfdSynthTabSz |
| NoReturns * | m_noreturns |
| RealPathMgr & | m_realpathMgr |
| bool | m_useBinutils |
| SimpleSymbols * | m_simpleSymbols |
Friends | |
| class | ProcInsnIterator |
| class | TextSeg |
| typedef std::map<VMA, Insn*> BinUtil::LM::InsnMap |
| typedef VMAIntervalMap<Proc*> BinUtil::LM::ProcMap |
| typedef VMAIntervalMap<Seg*> BinUtil::LM::SegMap |
| enum BinUtil::LM::DumpTy |
| enum BinUtil::LM::ReadFlg |
| enum BinUtil::LM::Type |
|
virtual |
|
inlineprotected |
|
inline |
|
staticprivate |
|
private |
| void BinUtil::LM::ddump | ( | int | code = DUMP_Long_decode | ) | const |
| void BinUtil::LM::ddumpProcMap | ( | unsigned | flag | ) | const |
|
inline |
|
virtual |
Reimplemented in BinUtil::Exe.
Definition at line 715 of file LM.cpp.


|
virtual |
|
private |
|
virtual |
|
private |
| bool BinUtil::LM::findProcSrcCodeInfo | ( | VMA | vma, |
| ushort | opIndex, | ||
| SrcFile::ln & | line | ||
| ) | const |
| bool BinUtil::LM::findSrcCodeInfo | ( | VMA | vma, |
| ushort | opIndex, | ||
| std::string & | func, | ||
| std::string & | file, | ||
| SrcFile::ln & | line | ||
| ) |

| bool BinUtil::LM::findSrcCodeInfo | ( | VMA | begVMA, |
| ushort | bOpIndex, | ||
| VMA | endVMA, | ||
| ushort | eOpIndex, | ||
| std::string & | func, | ||
| std::string & | file, | ||
| SrcFile::ln & | begLine, | ||
| SrcFile::ln & | endLine, | ||
| unsigned | flags = 1 |
||
| ) |
|
inline |
| bool BinUtil::LM::functionNeverReturns | ( | VMA | addr | ) |
|
inlineprivate |
| const char* BinUtil::LM::getPseudoLoadModuleName | ( | ) |

|
inline |
|
inline |
| bool BinUtil::LM::isPseudolLoadModule | ( | ) |

|
inline |
|
inline |
|
virtual |
Reimplemented in BinUtil::Exe.
Definition at line 395 of file LM.cpp.


|
inlineprotected |
|
inline |
|
virtual |
|
private |
|
private |
|
inline |
| void BinUtil::LM::relocate | ( | VMA | textBegReloc | ) |
|
inline |
|
inline |
|
inline |
| string BinUtil::LM::toString | ( | int | flags = DUMP_Short, |
| const char * | pre = "" |
||
| ) | const |
|
inline |
|
friend |
|
private |
|
private |
|
private |