Dyninst::SymElf Class Reference

#include <SymLite-elf.h>

Inheritance diagram for Dyninst::SymElf:
Dyninst::SymReader

Public Member Functions

virtual Symbol_t getSymbolByName (std::string symname)
virtual Symbol_t getContainingSymbol (Dyninst::Offset offset)
virtual std::string getInterpreterName ()
virtual unsigned numSegments ()
virtual bool getSegment (unsigned num, SymSegment &reg)
virtual Dyninst::Offset getSymbolOffset (const Symbol_t &sym)
virtual Dyninst::Offset getSymbolTOC (const Symbol_t &sym)
virtual std::string getSymbolName (const Symbol_t &sym)
virtual std::string getDemangledName (const Symbol_t &sym)
virtual bool isValidSymbol (const Symbol_t &sym)
virtual unsigned getAddressWidth ()
virtual unsigned long getSymbolSize (const Symbol_t &sym)
virtual Section_t getSectionByName (std::string name)
virtual Section_t getSectionByAddress (Dyninst::Address addr)
virtual Dyninst::Address getSectionAddress (Section_t sec)
virtual std::string getSectionName (Section_t sec)
virtual bool isValidSection (Section_t sec)
virtual Dyninst::Offset imageOffset ()
virtual Dyninst::Offset dataOffset ()
void * getElfHandle ()
int getFD ()

Data Fields

int ref_count
bool construction_error

Private Member Functions

 SymElf (std::string file_)
 SymElf (const char *buffer_, unsigned long size_)
virtual ~SymElf ()
void createSymCache ()
Symbol_t lookupCachedSymbol (Dyninst::Offset offset)
void init ()
unsigned long getSymOffset (const Elf_X_Sym &symbol, unsigned idx)
unsigned long getSymTOC (const Elf_X_Sym &symbol, unsigned idx)

Private Attributes

Elf_Xelf
int fd
bool need_odp
Elf_X_Shdrodp_section
std::string file
const char * buffer
unsigned long buffer_size
SymCacheEntrycache
unsigned cache_size
Elf_X_Shdrsym_sections
unsigned sym_sections_size

Friends

class SymElfFactory

Detailed Description

Definition at line 45 of file SymLite-elf.h.


Constructor & Destructor Documentation

SymElf::SymElf ( std::string  file_  )  [private]
SymElf::SymElf ( const char *  buffer_,
unsigned long  size_ 
) [private]
SymElf::~SymElf (  )  [private, virtual]

Member Function Documentation

void SymElf::createSymCache (  )  [private]
Dyninst::Offset SymElf::dataOffset (  )  [virtual]

Implements Dyninst::SymReader.

Definition at line 591 of file SymLite-elf.C.

unsigned SymElf::getAddressWidth (  )  [virtual]

Implements Dyninst::SymReader.

Definition at line 293 of file SymLite-elf.C.

References elf, and Dyninst::Elf_X::wordSize().

Symbol_t SymElf::getContainingSymbol ( Dyninst::Offset  offset  )  [virtual]
std::string SymElf::getDemangledName ( const Symbol_t sym  )  [virtual]
void * SymElf::getElfHandle (  )  [virtual]

Reimplemented from Dyninst::SymReader.

Definition at line 596 of file SymLite-elf.C.

References elf.

int SymElf::getFD (  )  [virtual]

Reimplemented from Dyninst::SymReader.

Definition at line 661 of file SymLite-elf.C.

References fd.

std::string SymElf::getInterpreterName (  )  [virtual]
Dyninst::Address SymElf::getSectionAddress ( Section_t  sec  )  [virtual]
Section_t SymElf::getSectionByAddress ( Dyninst::Address  addr  )  [virtual]
Section_t SymElf::getSectionByName ( std::string  name  )  [virtual]
std::string SymElf::getSectionName ( Section_t  sec  )  [virtual]
bool SymElf::getSegment ( unsigned  num,
SymSegment reg 
) [virtual]
Symbol_t SymElf::getSymbolByName ( std::string  symname  )  [virtual]
std::string SymElf::getSymbolName ( const Symbol_t sym  )  [virtual]

Implements Dyninst::SymReader.

Definition at line 326 of file SymLite-elf.C.

References GET_SYMBOL.

Dyninst::Offset SymElf::getSymbolOffset ( const Symbol_t sym  )  [virtual]
unsigned long SymElf::getSymbolSize ( const Symbol_t sym  )  [virtual]

Implements Dyninst::SymReader.

Definition at line 298 of file SymLite-elf.C.

References GET_SYMBOL.

Dyninst::Offset SymElf::getSymbolTOC ( const Symbol_t sym  )  [virtual]

Implements Dyninst::SymReader.

Definition at line 319 of file SymLite-elf.C.

References GET_SYMBOL, and getSymTOC().

unsigned long SymElf::getSymOffset ( const Elf_X_Sym symbol,
unsigned  idx 
) [private]
unsigned long SymElf::getSymTOC ( const Elf_X_Sym symbol,
unsigned  idx 
) [private]
Dyninst::Offset SymElf::imageOffset (  )  [virtual]

Implements Dyninst::SymReader.

Definition at line 586 of file SymLite-elf.C.

void SymElf::init (  )  [private]
bool SymElf::isValidSection ( Section_t  sec  )  [virtual]

Implements Dyninst::SymReader.

Definition at line 581 of file SymLite-elf.C.

References Dyninst::Section_t::i1.

Referenced by getSectionAddress(), and getSectionName().

bool SymElf::isValidSymbol ( const Symbol_t sym  )  [virtual]

Implements Dyninst::SymReader.

Definition at line 358 of file SymLite-elf.C.

References Dyninst::Symbol_t::i2, and INVALID_SYM_CODE.

Symbol_t SymElf::lookupCachedSymbol ( Dyninst::Offset  offset  )  [private]
unsigned SymElf::numSegments (  )  [virtual]

Implements Dyninst::SymReader.

Definition at line 273 of file SymLite-elf.C.

References Dyninst::Elf_X::e_phnum(), and elf.


Friends And Related Function Documentation

friend class SymElfFactory [friend]

Definition at line 47 of file SymLite-elf.h.


Field Documentation

const char* Dyninst::SymElf::buffer [private]

Definition at line 55 of file SymLite-elf.h.

Referenced by getInterpreterName().

unsigned long Dyninst::SymElf::buffer_size [private]

Definition at line 56 of file SymLite-elf.h.

Referenced by SymElf().

unsigned Dyninst::SymElf::cache_size [private]

Definition at line 63 of file SymLite-elf.h.

Referenced by createSymCache(), lookupCachedSymbol(), and ~SymElf().

Definition at line 100 of file SymLite-elf.h.

Referenced by Dyninst::SymElfFactory::openSymbolReader(), and SymElf().

int Dyninst::SymElf::fd [private]

Definition at line 50 of file SymLite-elf.h.

Referenced by getFD(), getInterpreterName(), SymElf(), and ~SymElf().

std::string Dyninst::SymElf::file [private]

Definition at line 54 of file SymLite-elf.h.

Referenced by Dyninst::SymElfFactory::closeSymbolReader().

bool Dyninst::SymElf::need_odp [private]

Definition at line 51 of file SymLite-elf.h.

Referenced by getSymOffset(), getSymTOC(), and init().

Definition at line 52 of file SymLite-elf.h.

Referenced by getSymOffset(), getSymTOC(), and init().

Definition at line 65 of file SymLite-elf.h.

Referenced by createSymCache(), lookupCachedSymbol(), and ~SymElf().

Definition at line 66 of file SymLite-elf.h.

Referenced by createSymCache(), lookupCachedSymbol(), and ~SymElf().


The documentation for this class was generated from the following files:
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 12 Jul 2013 for SymtabAPI by  doxygen 1.6.1