RoseBin_CallGraphAnalysis.h

Go to the documentation of this file.
00001 /****************************************************
00002  * RoseBin :: Binary Analysis for ROSE
00003  * Author : tps
00004  * Date : Jul27 07
00005  * Decription : Control flow Analysis
00006  ****************************************************/
00007 
00008 #ifndef __RoseBin_CallGraphAnalysis__
00009 #define __RoseBin_CallGraphAnalysis__
00010 
00011 #include "RoseBin_FlowAnalysis.h"
00012 #include "RoseBin_abstract.h"
00013 //class RoseBin;
00014 //class RoseFile;
00015 
00016 class RoseBin_CallGraphAnalysis : public RoseBin_FlowAnalysis {
00017   void findClusterOfNode(SgGraphNode* next_n,
00018                          int& currentCluster,
00019                          std::map<SgAsmFunction*,int>& visited);
00020 
00021  public:
00022 
00023  RoseBin_CallGraphAnalysis(SgAsmNode* global, RoseBin_abstract* ,
00024                            GraphAlgorithms* algo):RoseBin_FlowAnalysis(global,algo) {
00025     typeNode="function";
00026     typeEdge="CG-E";
00027     analysisName="callgraph";
00028     forward_analysis=true;
00029   }
00030 
00031   ~RoseBin_CallGraphAnalysis() {
00032     delete globalBin;
00033     //delete roseBin;
00034     delete vizzGraph;
00035 
00036     std::map <std::string, SgAsmFunction* >::iterator it;
00037     for (it = bin_funcs.begin();
00038          it!= bin_funcs.end(); it++) {
00039       delete it->second;
00040     }
00041   }
00042 
00043 
00044   // run this analysis
00045   void run(RoseBin_Graph* vg, std::string fileN, bool multiedge) ;
00046   void getConnectedComponents(std::map<int,std::set<SgAsmFunction*> >& ret);
00047 
00048 };
00049 
00050 #endif
00051 

Generated on Wed May 16 06:18:11 2012 for ROSE by  doxygen 1.4.7