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

/users/u3/mtikir/PMaCInstrumentor_v1601/tools/IdenticalInstrumentor.C

Go to the documentation of this file.
00001 #include <SectHeader.h>
00002 #include <Iterator.h>
00003 #include <Function.h>
00004 #include <LineInfoFinder.h>
00005 #include <XCoffFile.h>
00006 #include <IdenticalInstrumentor.h>
00007 
00008 IdenticalInstrumentor::IdenticalInstrumentor(XCoffFile* xcoff,char* extension)
00009     : XCoffFileGen(xcoff,extension,0,NULL)
00010 {
00011     selectInstrumentationPoints(NULL);
00012     reserveDataForInstrumentation();
00013 }
00014 
00015 void IdenticalInstrumentor::verify(uint32_t written){
00016 
00017     ASSERT(xcoffFile->getFileSize() == getInstrumentedFileSize());
00018     ASSERT(written == getInstrumentedFileSize());
00019 
00020     PRINT_INFOR("Verifying the two files are identical");
00021 
00022     char* origFile = xcoffFile->getXCoffFileName();
00023     char* instFile = outputFileName;
00024 
00025     fileHeaderGen->verifyIdentical(origFile,instFile);
00026     aOutHeaderGen->verifyIdentical(origFile,instFile);
00027     for(uint32_t i=1;i<=numberOfSections;i++){
00028         sectHeadersGen[i]->verifyIdentical(origFile,instFile);
00029     }
00030     for(uint32_t i=1;i<=numberOfSections;i++){
00031         rawSectionsGen[i]->verifyIdentical(origFile,instFile);
00032     }
00033     for(uint32_t i=1;i<=numberOfSections;i++){
00034         if(relocationTablesGen[i]){
00035             relocationTablesGen[i]->verifyIdentical(origFile,instFile);
00036         }
00037     }
00038     for(uint32_t i=1;i<=numberOfSections;i++){
00039         if(lineInfoTablesGen[i]){
00040             lineInfoTablesGen[i]->verifyIdentical(origFile,instFile);
00041         }
00042     }
00043     symbolTableGen->verifyIdentical(origFile,instFile);
00044     stringTableGen->verifyIdentical(origFile,instFile);
00045 }

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