Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members

SymbolTable Class Reference

#include <SymbolTable.h>

Inheritance diagram for SymbolTable:

Base List of all members.

Public Member Functions

 SymbolTable (char *ptr, uint32_t nsyms, XCoffFile *xcoff)
 ~SymbolTable ()
char * getSymbolTablePtr ()
uint32_t getNumberOfSymbols ()
void print ()
void printSymbol (uint32_t index)
void printSymbol (SymbolBase *sym)
uint32_t read (BinaryInputFile *b)
void setStringTable (StringTable *st)
void setDebugSection (DebugSection *ds)
SymbolBasegetSymbol (uint32_t index)
char * getSymbolName (SymbolBase *sym)
char * getSymbolName (uint32_t index)
uint64_t getSymbolLength (SymbolBase *symBase)
uint8_t getStorageMapping (SymbolBase *symBase)
uint32_t filterSortAddressSymbols (Symbol **symbolArray, uint32_t arrayLength)
uint32_t filterSortFuncSymbols (Symbol **symbolArray, uint32_t arrayLength, SectHeader *header)
uint32_t filterSortBSSSymbols (Symbol **symbolArray, uint32_t arrayLength)
XCoffFilegetXCoffFile ()
const char * briefName ()
uint32_t instrument (char *buffer, XCoffFileGen *xCoffGen, BaseGen *gen)

Static Public Member Functions

SymbolBasenewSymbol (SymbolBase *lastSymbol, uint8_t remaningAux, BinaryInputFile *binaryInputFile, uint32_t index, XCoffFile *xcoff)

Protected Attributes

char * symbolTablePtr
uint32_t numberOfSymbols
SymbolBase ** symbols
StringTablestringTable
DebugSectiondebugRawSect
XCoffFilexCoffFile

Constructor & Destructor Documentation

SymbolTable::SymbolTable char *  ptr,
uint32_t  nsyms,
XCoffFile xcoff
 

Definition at line 293 of file SymbolTable.C.

References numberOfSymbols, symbols, and XCoffClassTypes_symbol_table.

SymbolTable::~SymbolTable  ) 
 

Definition at line 301 of file SymbolTable.C.

References numberOfSymbols, and symbols.


Member Function Documentation

const char* SymbolTable::briefName  )  [inline, virtual]
 

Reimplemented from Base.

Definition at line 147 of file SymbolTable.h.

uint32_t SymbolTable::filterSortAddressSymbols Symbol **  symbolArray,
uint32_t  arrayLength
 

Definition at line 545 of file SymbolTable.C.

References compareSymbolValue(), getSymbolName(), SymbolBase::isAuxilary(), numberOfSymbols, and symbols.

Referenced by XCoffFile::displaySymbols().

uint32_t SymbolTable::filterSortBSSSymbols Symbol **  symbolArray,
uint32_t  arrayLength
 

Definition at line 611 of file SymbolTable.C.

References compareSymbolValue(), XCoffFile::getBSSSection(), SectHeader::getIndex(), RawSection::getSectHeader(), getXCoffFile(), SymbolBase::isAuxilary(), numberOfSymbols, and symbols.

Referenced by XCoffFileGen::inst_step4_updateBSSCSectionEntries().

uint32_t SymbolTable::filterSortFuncSymbols Symbol **  symbolArray,
uint32_t  arrayLength,
SectHeader header
 

Definition at line 638 of file SymbolTable.C.

References Symbol::builtinSaveRestore(), compareSymbolValue(), SectHeader::getIndex(), getSymbolName(), SectHeader::inRange(), SymbolBase::isAuxilary(), numberOfSymbols, and symbols.

Referenced by TextSection::findFunctions().

uint32_t SymbolTable::getNumberOfSymbols  )  [inline]
 

Definition at line 120 of file SymbolTable.h.

References numberOfSymbols.

Referenced by XCoffFile::displaySymbols(), TextSection::findFunctions(), FunctionFinder::FunctionFinder(), XCoffFileGen::inst_step4_updateBSSCSectionEntries(), LineInfoFinder::LineInfoFinder(), LineInfoFinder::printFileSymbols(), and LineInfoFinder::printSymbolTable().

uint8_t SymbolTable::getStorageMapping SymbolBase symBase  ) 
 

Definition at line 458 of file SymbolTable.C.

References Auxilary::getAuxilaryType(), SymbolBase::getNext(), SymbolBase::isAuxilary(), and Type__Auxilary_Symbol_CSect.

Referenced by TextSection::findFunctions(), and Function::print().

SymbolBase* SymbolTable::getSymbol uint32_t  index  )  [inline]
 

Definition at line 130 of file SymbolTable.h.

References ASSERT, numberOfSymbols, and symbols.

Referenced by FunctionFinder::FunctionFinder(), getSymbolLength(), getSymbolName(), LineInfoFinder::LineInfoFinder(), LineInfoFinder::printFileSymbols(), LineInfoFinder::printSymbolTable(), and SourceFileFinder::SourceFileFinder().

uint64_t SymbolTable::getSymbolLength SymbolBase symBase  ) 
 

Definition at line 479 of file SymbolTable.C.

References ASSERT, Auxilary::getAuxilaryType(), AuxilaryCSect::getLength(), SymbolBase::getNext(), getSymbol(), INVALID_SYMBOL_LENGTH, SymbolBase::isAuxilary(), Type__Auxilary_Symbol_CSect, Type__Auxilary_Symbol_Exception, Type__Auxilary_Symbol_Function, XTY_CM, XTY_ER, XTY_LD, and XTY_SD.

Referenced by BSSSection::displaySymbols(), RawSection::displaySymbols(), Function::Function(), and Function::print().

char* SymbolTable::getSymbolName uint32_t  index  )  [inline]
 

Definition at line 132 of file SymbolTable.h.

References getSymbol(), and getSymbolName().

char* SymbolTable::getSymbolName SymbolBase sym  )  [inline]
 

Definition at line 131 of file SymbolTable.h.

References debugRawSect, SymbolBase::getName(), and stringTable.

Referenced by BSSSection::displaySymbols(), RawSection::displaySymbols(), filterSortAddressSymbols(), filterSortFuncSymbols(), FunctionFinder::FunctionFinder(), Function::getAllSymbolNames(), DataSection::getContentVisually(), LineInfoFinder::getFunctionName(), getSymbolName(), IncludeFileFinder::IncludeFileFinder(), Function::isAnySymbolA(), Function::print(), and SourceFileFinder::SourceFileFinder().

char* SymbolTable::getSymbolTablePtr  )  [inline]
 

Definition at line 119 of file SymbolTable.h.

References symbolTablePtr.

XCoffFile* SymbolTable::getXCoffFile  )  [inline]
 

Definition at line 145 of file SymbolTable.h.

References xCoffFile.

Referenced by filterSortBSSSymbols(), and instrument().

uint32_t SymbolTable::instrument char *  buffer,
XCoffFileGen xCoffGen,
BaseGen gen
[virtual]
 

Reimplemented from Base.

Definition at line 227 of file ReWriting.C.

References ASSERT, binarySearch(), AuxilaryException::changeExptrCopy(), AuxilaryFunction::changeExptrLnnoptrCopy(), Symbol::changeValueCopy(), SymbolBase::charStream(), compareOriginalFileOffsets(), BaseGen::convertFileOffset(), XCoffFileGen::getAllObjects(), Auxilary::getAuxilaryType(), XCoffFile::getBSSSectionIndex(), XCoffFile::getBSSSectionVAddr(), XCoffFileGen::getNewBSSSectionVAddressForInst(), XCoffFileGen::getNumberOfAllObjects(), BaseGen::getParsedBase(), getXCoffFile(), Base::includesFileOffset(), XCoffFile::is64Bit(), SymbolBase::isAuxilary(), numberOfSymbols, PRINT_DEBUG, Size__NN_bit_SymbolTable_Entry, symbols, SYMENT, Type__Auxilary_Symbol_Exception, Type__Auxilary_Symbol_Function, and x_exptr.

SymbolBase * SymbolTable::newSymbol SymbolBase lastSymbol,
uint8_t  remaningAux,
BinaryInputFile binaryInputFile,
uint32_t  index,
XCoffFile xcoff
[static]
 

Definition at line 335 of file SymbolTable.C.

References ASSERT, SymbolBase::charStream(), BinaryInputFile::copyBytesIterate(), SymbolBase::getIndex(), XCoffFile::is64Bit(), SymbolBase::isAuxilary(), Size__NN_bit_SymbolTable_Entry, Type__Auxilary_Symbol_CSect, and Type__Auxilary_Symbol_Exception.

Referenced by read().

void SymbolTable::print  )  [virtual]
 

Reimplemented from Base.

Definition at line 307 of file SymbolTable.C.

References debugRawSect, SymbolBase::isAuxilary(), numberOfSymbols, SymbolBase::print(), PRINT_INFOR, stringTable, symbols, and symbolTablePtr.

Referenced by XCoffFile::print().

void SymbolTable::printSymbol SymbolBase sym  ) 
 

Definition at line 330 of file SymbolTable.C.

References debugRawSect, SymbolBase::print(), and stringTable.

void SymbolTable::printSymbol uint32_t  index  ) 
 

Definition at line 325 of file SymbolTable.C.

References ASSERT, numberOfSymbols, and symbols.

Referenced by XCoffFileGen::inst_step4_updateBSSCSectionEntries(), Relocation::print(), Exception::print(), LineInfo::print(), LineInfoFinder::printFileSymbols(), LineInfoFinder::printFunctionSymbols(), and LineInfoFinder::printSymbolTable().

uint32_t SymbolTable::read BinaryInputFile b  )  [virtual]
 

Reimplemented from Base.

Definition at line 415 of file SymbolTable.C.

References ASSERT, BinaryInputFile::currentOffset(), SymbolBase::getTypeName(), BinaryInputFile::inPtrBase(), newSymbol(), numberOfSymbols, PRINT_DEBUG, PRINT_INFOR, Base::setFileOffset(), BinaryInputFile::setInPointer(), SymbolBase::setNext(), SymbolBase::setPrev(), Size__NN_bit_SymbolTable_Entry, symbols, symbolTablePtr, and xCoffFile.

Referenced by XCoffFile::readSymbolStringTable().

void SymbolTable::setDebugSection DebugSection ds  )  [inline]
 

Definition at line 128 of file SymbolTable.h.

References debugRawSect.

Referenced by XCoffFile::readSymbolStringTable().

void SymbolTable::setStringTable StringTable st  )  [inline]
 

Definition at line 127 of file SymbolTable.h.

References stringTable.

Referenced by XCoffFile::readSymbolStringTable().


Member Data Documentation

DebugSection* SymbolTable::debugRawSect [protected]
 

Definition at line 110 of file SymbolTable.h.

Referenced by getSymbolName(), print(), printSymbol(), and setDebugSection().

uint32_t SymbolTable::numberOfSymbols [protected]
 

Definition at line 107 of file SymbolTable.h.

Referenced by filterSortAddressSymbols(), filterSortBSSSymbols(), filterSortFuncSymbols(), getNumberOfSymbols(), getSymbol(), instrument(), print(), printSymbol(), read(), SymbolTable(), and ~SymbolTable().

StringTable* SymbolTable::stringTable [protected]
 

Definition at line 109 of file SymbolTable.h.

Referenced by getSymbolName(), print(), printSymbol(), and setStringTable().

SymbolBase** SymbolTable::symbols [protected]
 

Definition at line 108 of file SymbolTable.h.

Referenced by filterSortAddressSymbols(), filterSortBSSSymbols(), filterSortFuncSymbols(), getSymbol(), instrument(), print(), printSymbol(), read(), SymbolTable(), and ~SymbolTable().

char* SymbolTable::symbolTablePtr [protected]
 

Definition at line 106 of file SymbolTable.h.

Referenced by getSymbolTablePtr(), print(), and read().

XCoffFile* SymbolTable::xCoffFile [protected]
 

Definition at line 112 of file SymbolTable.h.

Referenced by getXCoffFile(), and read().


The documentation for this class was generated from the following files:
Generated on Mon Jan 28 11:08:42 2008 for PMaCInstrumentor by doxygen 1.3.5