HPCToolkit
BinUtil::Seg Class Reference

#include <Seg.hpp>

Inheritance diagram for BinUtil::Seg:
Collaboration diagram for BinUtil::Seg:

Public Types

enum  Type { TypeNULL = 0, TypeBSS, TypeText, TypeData }
 

Public Member Functions

 Seg (LM *lm, const std::string &name, Type type, VMA beg, VMA end, uint64_t size)
 
virtual ~Seg ()
 
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
 
virtual void dump (std::ostream &o=std::cerr, int flags=LM::DUMP_Short, const char *pre="") const
 
void ddump () const
 

Protected Member Functions

 Seg ()
 
 Seg (const Seg &GCC_ATTR_UNUSED s)
 
Segoperator= (const Seg &GCC_ATTR_UNUSED s)
 

Protected Attributes

LMm_lm
 

Private Attributes

std::string m_name
 
Type m_type
 
VMA m_begVMA
 
VMA m_endVMA
 
uint64_t m_size
 

Detailed Description

Definition at line 95 of file Seg.hpp.

Member Enumeration Documentation

◆ Type

Enumerator
TypeNULL 
TypeBSS 
TypeText 
TypeData 

Definition at line 97 of file Seg.hpp.

Constructor & Destructor Documentation

◆ Seg() [1/3]

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

◆ ~Seg()

BinUtil::Seg::~Seg ( )
virtual

Definition at line 114 of file Seg.cpp.

◆ Seg() [2/3]

BinUtil::Seg::Seg ( )
inlineprotected

Definition at line 185 of file Seg.hpp.

◆ Seg() [3/3]

BinUtil::Seg::Seg ( const Seg &GCC_ATTR_UNUSED  s)
inlineprotected

Definition at line 188 of file Seg.hpp.

Member Function Documentation

◆ begVMA()

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

Definition at line 122 of file Seg.hpp.

Here is the caller graph for this function:

◆ ddump()

void BinUtil::Seg::ddump ( ) const

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::Seg::dump ( std::ostream &  o = std::cerr,
int  flags = LM::DUMP_Short,
const char *  pre = "" 
) const
virtual

Reimplemented in BinUtil::TextSeg.

Definition at line 130 of file Seg.cpp.

Here is the caller graph for this function:

◆ endVMA()

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

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
inline

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
inline

Definition at line 142 of file Seg.hpp.

Here is the call graph for this function:

◆ findSrcCodeInfo() [1/2]

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

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
inline

Definition at line 156 of file Seg.hpp.

Here is the call graph for this function:

◆ isIn()

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

Definition at line 137 of file Seg.hpp.

◆ lm()

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

Definition at line 105 of file Seg.hpp.

Here is the caller graph for this function:

◆ name()

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

Definition at line 110 of file Seg.hpp.

Here is the caller graph for this function:

◆ operator=()

Seg& BinUtil::Seg::operator= ( const Seg &GCC_ATTR_UNUSED  s)
inlineprotected

Definition at line 192 of file Seg.hpp.

◆ size()

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

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

Definition at line 121 of file Seg.cpp.

Here is the caller graph for this function:

◆ type()

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

Definition at line 114 of file Seg.hpp.

Here is the caller graph for this function:

Member Data Documentation

◆ m_begVMA

VMA BinUtil::Seg::m_begVMA
private

Definition at line 201 of file Seg.hpp.

◆ m_endVMA

VMA BinUtil::Seg::m_endVMA
private

Definition at line 202 of file Seg.hpp.

◆ m_lm

LM* BinUtil::Seg::m_lm
protected

Definition at line 196 of file Seg.hpp.

◆ m_name

std::string BinUtil::Seg::m_name
private

Definition at line 199 of file Seg.hpp.

◆ m_size

uint64_t BinUtil::Seg::m_size
private

Definition at line 203 of file Seg.hpp.

◆ m_type

Type BinUtil::Seg::m_type
private

Definition at line 200 of file Seg.hpp.


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