HPCToolkit
BinUtil::TextSeg Class Reference

#include <Seg.hpp>

Inheritance diagram for BinUtil::TextSeg:
Collaboration diagram for BinUtil::TextSeg:

Public Types

typedef std::vector< Proc * > ProcVec
 
enum  Type { TypeNULL = 0, TypeBSS, TypeText, TypeData }
 

Public Member Functions

 TextSeg (LM *lm, const std::string &name, VMA beg, VMA end, uint64_t size)
 
virtual ~TextSeg ()
 
uint numProcs () const
 
virtual void dump (std::ostream &o=std::cerr, int flags=LM::DUMP_Short, const char *pre="") const
 
LMlm () const
 
const std::string & name () const
 
Type type () const
 
VMA begVMA () const
 
VMA endVMA () const
 
uint64_t size () const
 
bool isIn (VMA vma) const
 
MachInsnfindMachInsn (VMA vma, ushort &sz) const
 
InsnfindInsn (VMA vma, ushort opIndex) const
 
bool findSrcCodeInfo (VMA vma, ushort opIndex, std::string &func, std::string &file, SrcFile::ln &line) const
 
bool findSrcCodeInfo (VMA begVMA, ushort bOpIndex, VMA endVMA, ushort eOpIndex, std::string &func, std::string &file, SrcFile::ln &begLine, SrcFile::ln &endLine, uint flags=1) const
 
std::string toString (int flags=LM::DUMP_Short, const char *pre="") const
 
void ddump () const
 

Protected Attributes

LMm_lm
 

Private Member Functions

 TextSeg ()
 
 TextSeg (const TextSeg &GCC_ATTR_UNUSED s)
 
TextSegoperator= (const TextSeg &GCC_ATTR_UNUSED s)
 
void ctor_initProcs ()
 
void ctor_readSegment ()
 
void ctor_disassembleProcs ()
 
std::string findProcName (bfd *abfd, asymbol *procSym) const
 
VMA findProcEnd (int funcSymIndex) const
 
InsnmakeInsn (bfd *abfd, MachInsn *mi, VMA vma, ushort opIndex, ushort sz) const
 

Private Attributes

ProcVec m_procs
 
char * m_contents
 
char * m_contentsRaw
 

Detailed Description

Definition at line 221 of file Seg.hpp.

Member Typedef Documentation

◆ ProcVec

typedef std::vector<Proc*> BinUtil::TextSeg::ProcVec

Definition at line 223 of file Seg.hpp.

Member Enumeration Documentation

◆ Type

enum BinUtil::Seg::Type
inherited
Enumerator
TypeNULL 
TypeBSS 
TypeText 
TypeData 

Definition at line 97 of file Seg.hpp.

Constructor & Destructor Documentation

◆ TextSeg() [1/3]

BinUtil::TextSeg::TextSeg ( LM lm,
const std::string &  name,
VMA  beg,
VMA  end,
uint64_t  size 
)

◆ ~TextSeg()

BinUtil::TextSeg::~TextSeg ( )
virtual

Definition at line 175 of file Seg.cpp.

◆ TextSeg() [2/3]

BinUtil::TextSeg::TextSeg ( )
inlineprivate

Definition at line 280 of file Seg.hpp.

Here is the caller graph for this function:

◆ TextSeg() [3/3]

BinUtil::TextSeg::TextSeg ( const TextSeg &GCC_ATTR_UNUSED  s)
inlineprivate

Definition at line 283 of file Seg.hpp.

Member Function Documentation

◆ begVMA()

VMA BinUtil::Seg::begVMA ( ) const
inlineinherited

Definition at line 122 of file Seg.hpp.

Here is the caller graph for this function:

◆ ctor_disassembleProcs()

void BinUtil::TextSeg::ctor_disassembleProcs ( )
private

Definition at line 419 of file Seg.cpp.

Here is the call graph for this function:

◆ ctor_initProcs()

void BinUtil::TextSeg::ctor_initProcs ( )
private

Definition at line 209 of file Seg.cpp.

Here is the call graph for this function:

◆ ctor_readSegment()

void BinUtil::TextSeg::ctor_readSegment ( )
private

Definition at line 387 of file Seg.cpp.

◆ ddump()

void BinUtil::Seg::ddump ( ) const
inherited

Definition at line 150 of file Seg.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dump()

void BinUtil::TextSeg::dump ( std::ostream &  o = std::cerr,
int  flags = LM::DUMP_Short,
const char *  pre = "" 
) const
virtual

Reimplemented from BinUtil::Seg.

Definition at line 190 of file Seg.cpp.

Here is the call graph for this function:

◆ endVMA()

VMA BinUtil::Seg::endVMA ( ) const
inlineinherited

Definition at line 126 of file Seg.hpp.

Here is the caller graph for this function:

◆ findInsn()

Insn* BinUtil::Seg::findInsn ( VMA  vma,
ushort  opIndex 
) const
inlineinherited

Definition at line 146 of file Seg.hpp.

Here is the call graph for this function:

◆ findMachInsn()

MachInsn* BinUtil::Seg::findMachInsn ( VMA  vma,
ushort sz 
) const
inlineinherited

Definition at line 142 of file Seg.hpp.

Here is the call graph for this function:

◆ findProcEnd()

VMA BinUtil::TextSeg::findProcEnd ( int  funcSymIndex) const
private

Definition at line 514 of file Seg.cpp.

Here is the call graph for this function:

◆ findProcName()

string BinUtil::TextSeg::findProcName ( bfd *  abfd,
asymbol *  procSym 
) const
private

Definition at line 477 of file Seg.cpp.

◆ findSrcCodeInfo() [1/2]

bool BinUtil::Seg::findSrcCodeInfo ( VMA  vma,
ushort  opIndex,
std::string &  func,
std::string &  file,
SrcFile::ln line 
) const
inlineinherited

Definition at line 150 of file Seg.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ findSrcCodeInfo() [2/2]

bool BinUtil::Seg::findSrcCodeInfo ( VMA  begVMA,
ushort  bOpIndex,
VMA  endVMA,
ushort  eOpIndex,
std::string &  func,
std::string &  file,
SrcFile::ln begLine,
SrcFile::ln endLine,
uint  flags = 1 
) const
inlineinherited

Definition at line 156 of file Seg.hpp.

Here is the call graph for this function:

◆ isIn()

bool BinUtil::Seg::isIn ( VMA  vma) const
inlineinherited

Definition at line 137 of file Seg.hpp.

◆ lm()

LM* BinUtil::Seg::lm ( ) const
inlineinherited

Definition at line 105 of file Seg.hpp.

Here is the caller graph for this function:

◆ makeInsn()

BinUtil::Insn * BinUtil::TextSeg::makeInsn ( bfd *  abfd,
MachInsn mi,
VMA  vma,
ushort  opIndex,
ushort  sz 
) const
private

Definition at line 539 of file Seg.cpp.

◆ name()

const std::string& BinUtil::Seg::name ( ) const
inlineinherited

Definition at line 110 of file Seg.hpp.

Here is the caller graph for this function:

◆ numProcs()

uint BinUtil::TextSeg::numProcs ( ) const
inline

Definition at line 235 of file Seg.hpp.

Here is the call graph for this function:

◆ operator=()

TextSeg& BinUtil::TextSeg::operator= ( const TextSeg &GCC_ATTR_UNUSED  s)
inlineprivate

Definition at line 287 of file Seg.hpp.

◆ size()

uint64_t BinUtil::Seg::size ( ) const
inlineinherited

Definition at line 131 of file Seg.hpp.

Here is the caller graph for this function:

◆ toString()

string BinUtil::Seg::toString ( int  flags = LM::DUMP_Short,
const char *  pre = "" 
) const
inherited

Definition at line 121 of file Seg.cpp.

Here is the caller graph for this function:

◆ type()

Type BinUtil::Seg::type ( ) const
inlineinherited

Definition at line 114 of file Seg.hpp.

Here is the caller graph for this function:

Member Data Documentation

◆ m_contents

char* BinUtil::TextSeg::m_contents
private

Definition at line 313 of file Seg.hpp.

◆ m_contentsRaw

char* BinUtil::TextSeg::m_contentsRaw
private

Definition at line 314 of file Seg.hpp.

◆ m_lm

LM* BinUtil::Seg::m_lm
protectedinherited

Definition at line 196 of file Seg.hpp.

◆ m_procs

ProcVec BinUtil::TextSeg::m_procs
private

Definition at line 312 of file Seg.hpp.


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