00001
00002
00003
00004
00005
00006
00007
00008 #ifndef __RoseBin_ControlFlowAnalysis__
00009 #define __RoseBin_ControlFlowAnalysis__
00010
00011 #include "RoseBin_FlowAnalysis.h"
00012 #include "RoseBin_abstract.h"
00013
00014
00015
00016 class RoseBin_ControlFlowAnalysis : public RoseBin_FlowAnalysis {
00017 void getCFGNodesForFunction(std::set<SgGraphNode*>& visited_f,
00018 std::set<std::string>& visited_names,
00019 SgGraphNode* next_n, std::string nodeName);
00020
00021 public:
00022
00023 RoseBin_ControlFlowAnalysis(SgAsmNode* global, bool forward, RoseBin_abstract* ,
00024 bool printedges,GraphAlgorithms* algo):
00025 RoseBin_FlowAnalysis(global,algo) {
00026 typeNode="CFG";
00027 typeEdge="CFG-E";
00028 analysisName="cfa";
00029 printEdges = printedges;
00030 forward_analysis=forward;
00031 }
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044 ~RoseBin_ControlFlowAnalysis() {
00045 delete globalBin;
00046
00047 delete vizzGraph;
00048
00049 std::map <std::string, SgAsmFunction* >::iterator it;
00050 for (it = bin_funcs.begin();
00051 it!= bin_funcs.end(); it++) {
00052 delete it->second;
00053 }
00054 }
00055
00056
00057
00058
00059
00060
00061
00062
00063 void run(RoseBin_Graph* vg, std::string fileN, bool multiedge) ;
00064 void printGraph(std::string fileName, std::set<std::string>& filter);
00065
00066 };
00067
00068 #endif
00069