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

/users/u3/mtikir/PMaCInstrumentor_v1601/include/LineInfoTable.h

Go to the documentation of this file.
00001 #ifndef _LineInfoTable_h_
00002 #define _LineInfoTable_h_
00003 
00004 #include <Base.h>
00005 #include <defines/LineInfoTable.d>
00006 
00007 class SymbolTable;
00008 class XCoffFile;
00009 
00010 class LineInfo {
00011 protected:
00012     LineInfo() {}
00013     virtual ~LineInfo() {}
00014 public:
00015     virtual char* charStream() { __SHOULD_NOT_ARRIVE; return NULL; }
00016     virtual void print(SymbolTable* symbolTable,uint32_t index);
00017 
00018     LINEINFO_MACROS_BASIS("For the get_X field macros check the defines directory");
00019 };
00020 
00021 class LineInfo32 : public LineInfo {
00022 protected:
00023     LINENO entry;
00024 public:
00025     LineInfo32() {}
00026     ~LineInfo32() {}
00027     char* charStream() { return (char*)&entry; }
00028 
00029     LINEINFO_MACROS_CLASS("For the get_X field macros check the defines directory");
00030 
00031 };
00032 
00033 class LineInfo64 : public LineInfo {
00034 protected:
00035     LINENO_64 entry;
00036 public:
00037     LineInfo64() {}
00038     ~LineInfo64() {}
00039     char* charStream() { return (char*)&entry; }
00040 
00041     LINEINFO_MACROS_CLASS("For the get_X field macros check the defines directory");
00042 
00043 };
00044 
00045 class LineInfoTable : public Base {
00046 protected:
00047     
00048     char* lineInfoPointer;
00049     uint32_t numOfLineInfos;
00050 
00051     LineInfo** lineInfos;
00052 
00053     SymbolTable* symbolTable;
00054 
00055     XCoffFile* xCoffFile;
00056 
00057 
00058 public:
00059 
00060     LineInfoTable(char* ptr,uint32_t s,XCoffFile* xcoff);
00061     void print();
00062     uint32_t read(BinaryInputFile* b);
00063 
00064     void setSymbolTable(SymbolTable* st) { symbolTable = st; }
00065 
00066     XCoffFile* getXCoffFile() { return xCoffFile; }
00067 
00068     uint32_t getNumberOfLineInfos() { return numOfLineInfos; }
00069     char* getLineInfoPointer() { return lineInfoPointer; }
00070     LineInfo* getLineInfo(uint32_t idx) { ASSERT(idx >= 0 && idx < numOfLineInfos); return lineInfos[idx]; }
00071 
00072     const char* briefName() { return "LineInfo"; }
00073     uint32_t instrument(char* buffer,XCoffFileGen* xCoffGen,BaseGen* gen);
00074 };
00075 
00076 #endif
00077 

Generated on Mon Jan 28 11:08:31 2008 for PMaCInstrumentor by doxygen 1.3.5