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

LineInfoFinder Class Reference

#include <LineInfoFinder.h>

Inheritance diagram for LineInfoFinder:

Base List of all members.

Public Member Functions

 LineInfoFinder (uint32_t idx, XCoffFile *xCoffFile)
 ~LineInfoFinder ()
uint32_t getLineInfoIndex (uint64_t fileOffset)
uint32_t getLineInfoIndexOfAddr (uint64_t addr)
uint32_t getLineInfoIndexOfPreviousAddr (uint64_t addr)
uint32_t getNumberOfFiles ()
uint32_t getNumberOfFunctions ()
uint32_t getLineNumberInFunction (uint64_t addr)
uint32_t getLineNumberInFile (uint64_t addr)
bool isAddressInLineInfoTable (uint64_t addr)
bool isFileNameInSymbolTable (char *fileName)
bool isFunctionNameInSymbolTable (char *fcnName)
bool functionContainsAddress (uint32_t idx, uint64_t addr)
char * getFileName (uint64_t addr)
char * getFunctionName (uint64_t addr)
uint64_t getAddressByFile (uint32_t lineno, char *fileName)
uint64_t getAddressByFunction (uint32_t lineno, char *fcnName)
uint64_t getAddressByFile (uint32_t lineno, char *fileName, uint64_t addr)
uint64_t getAddressByFunction (uint32_t lineno, char *fcnName, uint64_t addr)
bool isLineInFile (uint32_t lineno, char *fileName)
bool isLineInFunction (uint32_t lineno, char *fcnName)
char * getFileNameOfFunction (char *fcnName)
void printFileSymbols ()
void printFiles ()
void printFunctions ()
void printSymbolTable ()
void printLineInfoTable ()
void printFunctionSymbols ()
bool testLineInfoFinder ()
void commandLineTest ()

Protected Attributes

SymbolTablesymbolTable
StringTablestringTable
uint64_t lineInfoPointer
LineInfoTablelineInfoTable
bool is64Bit
LineInfo ** lineInfos
uint32_t numberOfLineInfos
uint32_t * lineInfoLineNumbers
uint64_t * lineInfoAddresses
uint16_t * isIncludeFile
bool * isIncludeFile2
uint16_t * isAddressFromIncludeFile
bool * isAddressFromIncludeFile2
idx_addrsortedAddresses
uint32_t numberOfLineAddresses
idx_symndxlineInfoFunctions
uint32_t numberOfLineInfoFunctions
uint32_t numberOfFiles
uint32_t numberOfFunctions
FileFinder ** files
FunctionFinder ** functions

Constructor & Destructor Documentation

LineInfoFinder::LineInfoFinder uint32_t  idx,
XCoffFile xCoffFile
 

Definition at line 141 of file LineInfoFinder.C.

References FileFinder::addFunction(), idx_addr::address, C_BINCL, C_FILE, C_FUN, compare_idx_addr(), files, functions, GET, LineInfoTable::getLineInfo(), getLineInfoIndex(), XCoffFile::getLineInfoTable(), LineInfoTable::getNumberOfLineInfos(), SymbolTable::getNumberOfSymbols(), FunctionFinder::getParentFile(), XCoffFile::getSectHeader(), XCoffFile::getStringTable(), SymbolTable::getSymbol(), FileFinder::getSymbolIndex(), XCoffFile::getSymbolTable(), LineInfoTable::getXCoffFile(), idx_symndx::index, idx_addr::index, XCoffFile::is64Bit(), is64Bit, isAddressFromIncludeFile, isAddressFromIncludeFile2, SymbolBase::isAuxilary(), FileFinder::isIncludeFile(), isIncludeFile, isIncludeFile2, lineInfoAddresses, lineInfoFunctions, lineInfoLineNumbers, lineInfoPointer, lineInfos, lineInfoTable, numberOfFiles, numberOfFunctions, numberOfLineAddresses, numberOfLineInfoFunctions, numberOfLineInfos, SET_IS_INCL_ADDR_BIT, SET_IS_INCL_FILE_BIT, FileFinder::setNumberOfFunctions(), FunctionFinder::setParent(), sortedAddresses, stringTable, symbolTable, and idx_symndx::symndx.

LineInfoFinder::~LineInfoFinder  ) 
 

Definition at line 294 of file LineInfoFinder.C.

References files, functions, isAddressFromIncludeFile, isIncludeFile, lineInfoAddresses, lineInfoLineNumbers, lineInfos, and sortedAddresses.


Member Function Documentation

void LineInfoFinder::commandLineTest  ) 
 

Definition at line 75 of file LineInfoFinder.C.

References getFileName(), getFunctionName(), LineInfoTable::getLineInfo(), getLineInfoIndexOfPreviousAddr(), getLineNumberInFile(), getLineNumberInFunction(), LineInfoTable::getNumberOfLineInfos(), lineInfoTable, printLineInfoTable(), and printSymbolTable().

Referenced by TextSection::buildLineInfoFinder().

bool LineInfoFinder::functionContainsAddress uint32_t  idx,
uint64_t  addr
 

Definition at line 763 of file LineInfoFinder.C.

References functions, FunctionFinder::getBeginLineInfoIndex(), and getLineInfoIndexOfPreviousAddr().

Referenced by getLineNumberInFile().

uint64_t LineInfoFinder::getAddressByFile uint32_t  lineno,
char *  fileName,
uint64_t  addr
 

Definition at line 705 of file LineInfoFinder.C.

References FunctionFinder::containsLineNumber(), functions, FunctionFinder::getAddressByLineNumber(), FunctionFinder::getFirstLine(), and numberOfFunctions.

uint64_t LineInfoFinder::getAddressByFile uint32_t  lineno,
char *  fileName
 

Definition at line 686 of file LineInfoFinder.C.

References FunctionFinder::containsLineNumber(), functions, FunctionFinder::getAddressByLineNumber(), FunctionFinder::getFirstLine(), and numberOfFunctions.

Referenced by testLineInfoFinder().

uint64_t LineInfoFinder::getAddressByFunction uint32_t  lineno,
char *  fcnName,
uint64_t  addr
 

Definition at line 670 of file LineInfoFinder.C.

References FunctionFinder::containsLineNumber(), functions, FunctionFinder::getAddressByLineNumber(), and numberOfFunctions.

uint64_t LineInfoFinder::getAddressByFunction uint32_t  lineno,
char *  fcnName
 

Definition at line 654 of file LineInfoFinder.C.

References FunctionFinder::containsLineNumber(), functions, FunctionFinder::getAddressByLineNumber(), and numberOfFunctions.

Referenced by testLineInfoFinder().

char * LineInfoFinder::getFileName uint64_t  addr  ) 
 

Definition at line 506 of file LineInfoFinder.C.

References files, GET_IS_INCL_FILE_BIT, getFileNameOfFunction(), getFunctionName(), FileFinder::getName(), and numberOfFiles.

Referenced by commandLineTest(), CountAllBlocks::printInstrumentationPoints(), CommonMethods::printInstrumentationPoints(), and testLineInfoFinder().

char * LineInfoFinder::getFileNameOfFunction char *  fcnName  ) 
 

Definition at line 563 of file LineInfoFinder.C.

References functions, FileFinder::getName(), FunctionFinder::getParentFile(), and numberOfFunctions.

Referenced by getFileName().

char * LineInfoFinder::getFunctionName uint64_t  addr  ) 
 

Definition at line 576 of file LineInfoFinder.C.

References GET, getLineInfoIndexOfPreviousAddr(), SymbolTable::getSymbolName(), lineInfoLineNumbers, lineInfos, numberOfLineInfos, and symbolTable.

Referenced by commandLineTest(), getFileName(), BasicBlockTracer::initializeReservedData(), BasicBlockTracer::reserveDataForInstrumentation(), and testLineInfoFinder().

uint32_t LineInfoFinder::getLineInfoIndex uint64_t  fileOffset  ) 
 

Definition at line 129 of file LineInfoFinder.C.

References ASSERT, is64Bit, lineInfoPointer, LINESZ, and LINESZ_64.

Referenced by LineInfoFinder().

uint32_t LineInfoFinder::getLineInfoIndexOfAddr uint64_t  addr  ) 
 

Definition at line 55 of file LineInfoFinder.C.

References idx_addr::address, numberOfLineAddresses, numberOfLineInfos, and sortedAddresses.

Referenced by isAddressInLineInfoTable().

uint32_t LineInfoFinder::getLineInfoIndexOfPreviousAddr uint64_t  addr  ) 
 

Definition at line 22 of file LineInfoFinder.C.

References idx_addr::address, numberOfLineAddresses, numberOfLineInfos, and sortedAddresses.

Referenced by commandLineTest(), functionContainsAddress(), getFunctionName(), getLineNumberInFile(), getLineNumberInFunction(), and testLineInfoFinder().

uint32_t LineInfoFinder::getLineNumberInFile uint64_t  addr  ) 
 

Definition at line 737 of file LineInfoFinder.C.

References functionContainsAddress(), functions, GET_IS_INCL_ADDR_BIT, FunctionFinder::getFirstLine(), getLineInfoIndexOfPreviousAddr(), getLineNumberInFunction(), and numberOfFunctions.

Referenced by commandLineTest(), CountAllBlocks::printInstrumentationPoints(), CommonMethods::printInstrumentationPoints(), and testLineInfoFinder().

uint32_t LineInfoFinder::getLineNumberInFunction uint64_t  addr  ) 
 

Definition at line 754 of file LineInfoFinder.C.

References getLineInfoIndexOfPreviousAddr(), lineInfoLineNumbers, and numberOfLineInfos.

Referenced by commandLineTest(), getLineNumberInFile(), BasicBlockTracer::initializeReservedData(), BasicBlockTracer::reserveDataForInstrumentation(), and testLineInfoFinder().

uint32_t LineInfoFinder::getNumberOfFiles  )  [inline]
 

Definition at line 164 of file LineInfoFinder.h.

References numberOfFiles.

uint32_t LineInfoFinder::getNumberOfFunctions  )  [inline]
 

Definition at line 165 of file LineInfoFinder.h.

References numberOfFunctions.

bool LineInfoFinder::isAddressInLineInfoTable uint64_t  addr  ) 
 

Definition at line 728 of file LineInfoFinder.C.

References getLineInfoIndexOfAddr(), and numberOfLineInfos.

Referenced by testLineInfoFinder().

bool LineInfoFinder::isFileNameInSymbolTable char *  fileName  ) 
 

Definition at line 609 of file LineInfoFinder.C.

References files, and numberOfFiles.

Referenced by testLineInfoFinder().

bool LineInfoFinder::isFunctionNameInSymbolTable char *  fcnName  ) 
 

Definition at line 597 of file LineInfoFinder.C.

References functions, and numberOfFunctions.

Referenced by testLineInfoFinder().

bool LineInfoFinder::isLineInFile uint32_t  lineno,
char *  fileName
 

Definition at line 636 of file LineInfoFinder.C.

References FunctionFinder::containsLineNumber(), functions, FunctionFinder::getFirstLine(), and numberOfFunctions.

Referenced by testLineInfoFinder().

bool LineInfoFinder::isLineInFunction uint32_t  lineno,
char *  fcnName
 

Definition at line 621 of file LineInfoFinder.C.

References FunctionFinder::containsLineNumber(), functions, and numberOfFunctions.

Referenced by testLineInfoFinder().

void LineInfoFinder::printFiles  ) 
 

Definition at line 306 of file LineInfoFinder.C.

References files, numberOfFiles, FileFinder::print(), and PRINT_INFOR.

void LineInfoFinder::printFileSymbols  ) 
 

Definition at line 532 of file LineInfoFinder.C.

References C_FILE, SymbolTable::getNumberOfSymbols(), SymbolTable::getSymbol(), SymbolBase::isAuxilary(), SymbolTable::printSymbol(), and symbolTable.

void LineInfoFinder::printFunctions  ) 
 

Definition at line 316 of file LineInfoFinder.C.

References functions, numberOfFunctions, FunctionFinder::print(), and PRINT_INFOR.

void LineInfoFinder::printFunctionSymbols  ) 
 

Definition at line 522 of file LineInfoFinder.C.

References GET, lineInfoLineNumbers, lineInfos, numberOfLineInfos, SymbolTable::printSymbol(), and symbolTable.

void LineInfoFinder::printLineInfoTable  ) 
 

Definition at line 552 of file LineInfoFinder.C.

References GET, lineInfoAddresses, lineInfoLineNumbers, lineInfos, numberOfLineInfos, and PRINT_INFOR.

Referenced by commandLineTest().

void LineInfoFinder::printSymbolTable  ) 
 

Definition at line 542 of file LineInfoFinder.C.

References SymbolTable::getNumberOfSymbols(), SymbolTable::getSymbol(), SymbolBase::isAuxilary(), SymbolTable::printSymbol(), and symbolTable.

Referenced by commandLineTest().

bool LineInfoFinder::testLineInfoFinder  ) 
 

Definition at line 326 of file LineInfoFinder.C.

References ASSERT, files, functions, GET_IS_INCL_ADDR_BIT, getAddressByFile(), getAddressByFunction(), getFileName(), getFunctionName(), LineInfoTable::getLineInfo(), getLineInfoIndexOfPreviousAddr(), getLineNumberInFile(), getLineNumberInFunction(), FileFinder::getName(), FunctionFinder::getName(), isAddressInLineInfoTable(), isFileNameInSymbolTable(), isFunctionNameInSymbolTable(), isLineInFile(), isLineInFunction(), lineInfoAddresses, lineInfoLineNumbers, lineInfoTable, MAX_LINE_TEST, numberOfFiles, numberOfFunctions, numberOfLineInfos, and PRINT_INFOR.

Referenced by TextSection::buildLineInfoFinder().


Member Data Documentation

FileFinder** LineInfoFinder::files [protected]
 

Definition at line 153 of file LineInfoFinder.h.

Referenced by getFileName(), isFileNameInSymbolTable(), LineInfoFinder(), printFiles(), testLineInfoFinder(), and ~LineInfoFinder().

FunctionFinder** LineInfoFinder::functions [protected]
 

Definition at line 154 of file LineInfoFinder.h.

Referenced by functionContainsAddress(), getAddressByFile(), getAddressByFunction(), getFileNameOfFunction(), getLineNumberInFile(), isFunctionNameInSymbolTable(), isLineInFile(), isLineInFunction(), LineInfoFinder(), printFunctions(), testLineInfoFinder(), and ~LineInfoFinder().

bool LineInfoFinder::is64Bit [protected]
 

Definition at line 135 of file LineInfoFinder.h.

Referenced by getLineInfoIndex(), and LineInfoFinder().

uint16_t* LineInfoFinder::isAddressFromIncludeFile [protected]
 

Definition at line 144 of file LineInfoFinder.h.

Referenced by LineInfoFinder(), and ~LineInfoFinder().

bool* LineInfoFinder::isAddressFromIncludeFile2 [protected]
 

Definition at line 145 of file LineInfoFinder.h.

Referenced by LineInfoFinder().

uint16_t* LineInfoFinder::isIncludeFile [protected]
 

Definition at line 142 of file LineInfoFinder.h.

Referenced by LineInfoFinder(), and ~LineInfoFinder().

bool* LineInfoFinder::isIncludeFile2 [protected]
 

Definition at line 143 of file LineInfoFinder.h.

Referenced by LineInfoFinder().

uint64_t* LineInfoFinder::lineInfoAddresses [protected]
 

Definition at line 141 of file LineInfoFinder.h.

Referenced by LineInfoFinder(), printLineInfoTable(), testLineInfoFinder(), and ~LineInfoFinder().

struct idx_symndx* LineInfoFinder::lineInfoFunctions [protected]
 

Definition at line 148 of file LineInfoFinder.h.

Referenced by LineInfoFinder().

uint32_t* LineInfoFinder::lineInfoLineNumbers [protected]
 

Definition at line 140 of file LineInfoFinder.h.

Referenced by getFunctionName(), getLineNumberInFunction(), LineInfoFinder(), printFunctionSymbols(), printLineInfoTable(), testLineInfoFinder(), and ~LineInfoFinder().

uint64_t LineInfoFinder::lineInfoPointer [protected]
 

Definition at line 133 of file LineInfoFinder.h.

Referenced by getLineInfoIndex(), and LineInfoFinder().

LineInfo** LineInfoFinder::lineInfos [protected]
 

Definition at line 138 of file LineInfoFinder.h.

Referenced by getFunctionName(), LineInfoFinder(), printFunctionSymbols(), printLineInfoTable(), and ~LineInfoFinder().

LineInfoTable* LineInfoFinder::lineInfoTable [protected]
 

Definition at line 134 of file LineInfoFinder.h.

Referenced by commandLineTest(), LineInfoFinder(), and testLineInfoFinder().

uint32_t LineInfoFinder::numberOfFiles [protected]
 

Definition at line 151 of file LineInfoFinder.h.

Referenced by getFileName(), getNumberOfFiles(), isFileNameInSymbolTable(), LineInfoFinder(), printFiles(), and testLineInfoFinder().

uint32_t LineInfoFinder::numberOfFunctions [protected]
 

Definition at line 152 of file LineInfoFinder.h.

Referenced by getAddressByFile(), getAddressByFunction(), getFileNameOfFunction(), getLineNumberInFile(), getNumberOfFunctions(), isFunctionNameInSymbolTable(), isLineInFile(), isLineInFunction(), LineInfoFinder(), printFunctions(), and testLineInfoFinder().

uint32_t LineInfoFinder::numberOfLineAddresses [protected]
 

Definition at line 147 of file LineInfoFinder.h.

Referenced by getLineInfoIndexOfAddr(), getLineInfoIndexOfPreviousAddr(), and LineInfoFinder().

uint32_t LineInfoFinder::numberOfLineInfoFunctions [protected]
 

Definition at line 149 of file LineInfoFinder.h.

Referenced by LineInfoFinder().

uint32_t LineInfoFinder::numberOfLineInfos [protected]
 

Definition at line 139 of file LineInfoFinder.h.

Referenced by getFunctionName(), getLineInfoIndexOfAddr(), getLineInfoIndexOfPreviousAddr(), getLineNumberInFunction(), isAddressInLineInfoTable(), LineInfoFinder(), printFunctionSymbols(), printLineInfoTable(), and testLineInfoFinder().

struct idx_addr* LineInfoFinder::sortedAddresses [protected]
 

Definition at line 146 of file LineInfoFinder.h.

Referenced by getLineInfoIndexOfAddr(), getLineInfoIndexOfPreviousAddr(), LineInfoFinder(), and ~LineInfoFinder().

StringTable* LineInfoFinder::stringTable [protected]
 

Definition at line 132 of file LineInfoFinder.h.

Referenced by LineInfoFinder().

SymbolTable* LineInfoFinder::symbolTable [protected]
 

Definition at line 131 of file LineInfoFinder.h.

Referenced by getFunctionName(), LineInfoFinder(), printFileSymbols(), printFunctionSymbols(), and printSymbolTable().


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