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

RawSection Class Reference

#include <RawSection.h>

Inheritance diagram for RawSection:

Base BSSSection DataSection DebugSection ExceptionSection LoaderSection TextSection TypeCommSection List of all members.

Public Member Functions

 RawSection (SectHeader *h, XCoffFile *xcoff)
 SECTRAW_MACROS_BASIS ("For the get_X field macros check the defines directory")
uint32_t read (BinaryInputFile *b)
void print ()
uint64_t readBytes (AddressIterator *ait)
Instruction readInstruction (AddressIterator *ait)
bool inRange (uint64_t addr)
void setSymbolTable (SymbolTable *st)
SymbolTablegetSymbolTable ()
virtual void findFunctions ()
virtual void generateCFGs ()
virtual void findMemoryFloatOps ()
virtual void displaySymbols (Symbol **symbols, uint32_t symbolCount)
virtual char * getContentVisually (Symbol **symbols, uint32_t symbolCount, uint64_t content)
virtual AddressIterator getAddressIterator ()
uint16_t getIndex ()
SectHeadergetSectHeader ()
XCoffFilegetXCoffFile ()
virtual uint32_t getNumberOfFunctions ()
virtual uint32_t getNumberOfBlocks ()
virtual uint32_t getNumberOfMemoryOps ()
virtual uint32_t getNumberOfFloatPOps ()
virtual FunctiongetFunction (uint32_t idx)
virtual uint32_t getAllBlocks (BasicBlock **arr)
char * getRawDataPtr ()
const char * briefName ()
uint32_t instrument (char *buffer, XCoffFileGen *xCoffGen, BaseGen *gen)
uint32_t getInstrumentationSize (XCoffFileGen *xCoffGen)
virtual void buildLineInfoFinder ()
virtual LineInfoFindergetLineInfoFinder ()
virtual void buildLoops ()

Static Public Member Functions

RawSectionnewRawSection (SectHeader *h, XCoffFile *xcoff)

Protected Member Functions

 ~RawSection ()

Protected Attributes

SectHeaderheader
char * rawDataPtr
SymbolTablexCoffSymbolTable
HashCode hashCode
XCoffFilexCoffFile

Constructor & Destructor Documentation

RawSection::~RawSection  )  [inline, protected]
 

Definition at line 31 of file RawSection.h.

RawSection::RawSection SectHeader h,
XCoffFile xcoff
 

Definition at line 31 of file RawSection.C.

References ASSERT, SectHeader::getIndex(), SectHeader::getRawDataPtr(), SectHeader::getRawDataSize(), hashCode, header, HashCode::isSection(), rawDataPtr, and XCoffClassTypes_sect_rawdata.

Referenced by newRawSection().


Member Function Documentation

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

Reimplemented from Base.

Reimplemented in DebugSection, TypeCommSection, ExceptionSection, LoaderSection, TextSection, DataSection, and BSSSection.

Definition at line 71 of file RawSection.h.

virtual void RawSection::buildLineInfoFinder  )  [inline, virtual]
 

Reimplemented in TextSection.

Definition at line 76 of file RawSection.h.

Referenced by XCoffFile::setLineInfoFinder().

virtual void RawSection::buildLoops  )  [inline, virtual]
 

Reimplemented in TextSection.

Definition at line 79 of file RawSection.h.

Referenced by XCoffFile::findLoops().

void RawSection::displaySymbols Symbol **  symbols,
uint32_t  symbolCount
[virtual]
 

Reimplemented in BSSSection.

Definition at line 501 of file RawSection.C.

References ASSERT, DemangleWrapper::demangle_combined(), getAddressIterator(), getContentVisually(), SectHeader::getIndex(), SymbolTable::getSymbolLength(), SymbolTable::getSymbolName(), AddressIterator::hasMore(), header, AddressIterator::isInvalid(), SectHeader::print(), PRINT_INFOR, readBytes(), and xCoffSymbolTable.

Referenced by XCoffFile::displaySymbols().

void RawSection::findFunctions  )  [virtual]
 

Reimplemented in TextSection.

Definition at line 650 of file RawSection.C.

References SectHeader::getIndex(), header, and PRINT_DEBUG.

Referenced by XCoffFile::findFunctions().

void RawSection::findMemoryFloatOps  )  [virtual]
 

Reimplemented in TextSection.

Definition at line 657 of file RawSection.C.

References SectHeader::getIndex(), header, and PRINT_DEBUG.

Referenced by XCoffFile::findMemoryFloatOps().

void RawSection::generateCFGs  )  [virtual]
 

Reimplemented in TextSection.

Definition at line 653 of file RawSection.C.

References SectHeader::getIndex(), header, and PRINT_DEBUG.

Referenced by XCoffFile::generateCFGs().

AddressIterator RawSection::getAddressIterator  )  [virtual]
 

Reimplemented in TextSection, and DataSection.

Definition at line 486 of file RawSection.C.

References ASSERT, and AddressIterator::invalidIterator().

Referenced by displaySymbols(), Function::parseJumpTable(), and XCoffFile::readTOC().

virtual uint32_t RawSection::getAllBlocks BasicBlock **  arr  )  [inline, virtual]
 

Reimplemented in TextSection.

Definition at line 67 of file RawSection.h.

Referenced by XCoffFile::getAllBlocks().

char * RawSection::getContentVisually Symbol **  symbols,
uint32_t  symbolCount,
uint64_t  content
[virtual]
 

Reimplemented in TextSection, and DataSection.

Definition at line 448 of file RawSection.C.

Referenced by displaySymbols().

virtual Function* RawSection::getFunction uint32_t  idx  )  [inline, virtual]
 

Reimplemented in TextSection.

Definition at line 66 of file RawSection.h.

Referenced by XCoffFile::findBasicBlock().

uint16_t RawSection::getIndex  )  [inline]
 

Definition at line 57 of file RawSection.h.

References SectHeader::getIndex(), and header.

Referenced by Function::Function(), MemoryOperation::MemoryOperation(), and BasicBlock::setIndex().

uint32_t RawSection::getInstrumentationSize XCoffFileGen xCoffGen  )  [virtual]
 

Reimplemented from Base.

Reimplemented in LoaderSection, TextSection, and DataSection.

Definition at line 349 of file ReWriting.C.

References getRawDataPtr().

virtual LineInfoFinder* RawSection::getLineInfoFinder  )  [inline, virtual]
 

Reimplemented in TextSection.

Definition at line 77 of file RawSection.h.

virtual uint32_t RawSection::getNumberOfBlocks  )  [inline, virtual]
 

Reimplemented in TextSection.

Definition at line 63 of file RawSection.h.

Referenced by XCoffFile::parse().

virtual uint32_t RawSection::getNumberOfFloatPOps  )  [inline, virtual]
 

Reimplemented in TextSection.

Definition at line 65 of file RawSection.h.

Referenced by XCoffFile::parse().

virtual uint32_t RawSection::getNumberOfFunctions  )  [inline, virtual]
 

Reimplemented in TextSection.

Definition at line 62 of file RawSection.h.

Referenced by XCoffFile::parse().

virtual uint32_t RawSection::getNumberOfMemoryOps  )  [inline, virtual]
 

Reimplemented in TextSection.

Definition at line 64 of file RawSection.h.

Referenced by XCoffFile::parse().

char* RawSection::getRawDataPtr  )  [inline]
 

Definition at line 69 of file RawSection.h.

References rawDataPtr.

Referenced by getInstrumentationSize(), DataSection::instrument(), TextSection::instrument(), and instrument().

SectHeader* RawSection::getSectHeader  )  [inline]
 

Definition at line 58 of file RawSection.h.

References header.

Referenced by SymbolTable::filterSortBSSSymbols(), CountAllBlocks::generateCodeForInst(), CacheSimulator::generateCodeForInst(), BasicBlockTracer::generateCodeForInst(), BasicBlockCounter::generateCodeForInst(), TextSection::getInstrumentationSize(), CountAllBlocks::initializeReservedData(), CacheSimulator::initializeReservedData(), BasicBlockTracer::initializeReservedData(), BasicBlockCounter::initializeReservedData(), TextSection::instrument(), and RawSectionGen::setFileOffset().

SymbolTable* RawSection::getSymbolTable  )  [inline]
 

Definition at line 47 of file RawSection.h.

References xCoffSymbolTable.

Referenced by Function::Function(), Function::getAllSymbolNames(), Function::isAnySymbolA(), and Function::print().

XCoffFile* RawSection::getXCoffFile  )  [inline]
 

Definition at line 60 of file RawSection.h.

References xCoffFile.

Referenced by ExceptionSection::ExceptionSection(), DataSection::getAddressIterator(), LoaderSection::getInstrumentationSize(), Function::getXCoffFile(), LoaderSection::instrument(), ExceptionSection::instrument(), DebugSection::print(), LoaderSection::read(), and ExceptionSection::read().

bool RawSection::inRange uint64_t  addr  )  [inline]
 

Definition at line 44 of file RawSection.h.

References header, and SectHeader::inRange().

Referenced by CountAllBlocks::byteCountForInst(), CacheSimulator::byteCountForInst(), BasicBlockTracer::byteCountForInst(), BasicBlockCounter::byteCountForInst(), XCoffFile::findRawSection(), CountAllBlocks::generateCodeForInst(), CacheSimulator::generateCodeForInst(), BasicBlockTracer::generateCodeForInst(), BasicBlockCounter::generateCodeForInst(), and readBytes().

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

Reimplemented from Base.

Reimplemented in ExceptionSection, LoaderSection, TextSection, and DataSection.

Definition at line 354 of file ReWriting.C.

References getRawDataPtr(), and PRINT_DEBUG.

RawSection * RawSection::newRawSection SectHeader h,
XCoffFile xcoff
[static]
 

Definition at line 58 of file RawSection.C.

References ASSERT, DEBUG, and RawSection().

Referenced by XCoffFile::readRawSectionData().

void RawSection::print  )  [virtual]
 

Reimplemented from Base.

Reimplemented in DebugSection, TypeCommSection, ExceptionSection, LoaderSection, and TextSection.

Definition at line 49 of file RawSection.C.

References SectHeader::getIndex(), SectHeader::getTypeName(), header, PRINT_INFOR, and rawDataPtr.

Referenced by XCoffFile::print(), TextSection::print(), LoaderSection::print(), ExceptionSection::print(), TypeCommSection::print(), and DebugSection::print().

uint32_t RawSection::read BinaryInputFile b  )  [virtual]
 

Reimplemented from Base.

Reimplemented in ExceptionSection, and LoaderSection.

Definition at line 40 of file RawSection.C.

References BinaryInputFile::currentOffset(), rawDataPtr, Base::setFileOffset(), and BinaryInputFile::setInPointer().

Referenced by XCoffFile::readRawSectionData().

uint64_t RawSection::readBytes AddressIterator ait  ) 
 

Definition at line 424 of file RawSection.C.

References ASSERT, header, inRange(), and rawDataPtr.

Referenced by displaySymbols(), Function::parseJumpTable(), readInstruction(), and XCoffFile::readTOC().

Instruction RawSection::readInstruction AddressIterator ait  ) 
 

Definition at line 443 of file RawSection.C.

References readBytes().

Referenced by BasicBlock::findFirstInstPoint(), BasicBlock::findMemoryFloatOps(), Function::generateCFG(), CountAllBlocks::generateCodeForInst(), BasicBlockTracer::generateCodeForInst(), BasicBlockCounter::generateCodeForInst(), Function::getJumpTableInformation(), Function::parseJumpTable(), BasicBlock::print(), and Function::updateInstructionSize().

RawSection::SECTRAW_MACROS_BASIS "For the get_X field macros check the defines directory"   ) 
 

void RawSection::setSymbolTable SymbolTable st  )  [inline]
 

Definition at line 46 of file RawSection.h.

References xCoffSymbolTable.

Referenced by XCoffFile::parse().


Member Data Documentation

HashCode RawSection::hashCode [protected]
 

Definition at line 28 of file RawSection.h.

Referenced by RawSection().

SectHeader* RawSection::header [protected]
 

Reimplemented in LoaderSection.

Definition at line 25 of file RawSection.h.

Referenced by displaySymbols(), findFunctions(), findMemoryFloatOps(), generateCFGs(), getIndex(), getSectHeader(), inRange(), print(), RawSection(), and readBytes().

char* RawSection::rawDataPtr [protected]
 

Definition at line 26 of file RawSection.h.

Referenced by getRawDataPtr(), print(), RawSection(), read(), and readBytes().

XCoffFile* RawSection::xCoffFile [protected]
 

Definition at line 29 of file RawSection.h.

Referenced by getXCoffFile().

SymbolTable* RawSection::xCoffSymbolTable [protected]
 

Definition at line 27 of file RawSection.h.

Referenced by displaySymbols(), getSymbolTable(), and setSymbolTable().


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