RoseBin_FlowAnalysis Class Reference

#include <RoseBin_FlowAnalysis.h>

Inheritance diagram for RoseBin_FlowAnalysis:

Inheritance graph
[legend]
Collaboration diagram for RoseBin_FlowAnalysis:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 RoseBin_FlowAnalysis (SgAsmNode *global, GraphAlgorithms *algo)
virtual ~RoseBin_FlowAnalysis ()
void setInitializedFalse ()
RoseBin_Graph * getGraph ()
void printAST (SgAsmNode *globalNode)
virtual void run (RoseBin_Graph *vg, std::string fileN, bool multiedge)=0
std::string getName ()
void visit (SgNode *node)
 this method is called at every traversed node.
void checkControlFlow (SgAsmInstruction *binInst, int functionSize, int countDown, std::string &currentFunctionName, int func_nr)
SgGraphNodegetNodeFor (uint64_t inst)
void createInstToNodeTable ()
uint64_t getAddressForNode (SgGraphNode *node)
template<class T>
bool from_string (T &t, const std::string &s, std::ios_base &(*f)(std::ios_base &))
int nodesVisited ()
int edgesVisited ()
bool sameParents (SgGraphNode *node, SgGraphNode *next)
void getRootNodes (std::vector< SgGraphNode * > &rootNodes)
SgGraphNodeaddCFNode (std::string &name, std::string &type, int address, bool isFunction, SgNode *int_node)
void clearMaps ()

Public Attributes

bool forward_analysis

Protected Types

typedef rose_hash::unordered_map<
uint64_t, SgGraphNode * > 
tabletype_inv
typedef std::map< std::string,
SgAsmFunction * > 
bin_funcs_type

Protected Member Functions

void initFunctionList (SgAsmNode *global)
void process_jumps ()
SgAsmInstructionprocess_jumps_get_target (SgAsmx86Instruction *inst)
void resolveFunctions (SgAsmNode *global)
SgAsmInstructionresolveFunction (SgAsmInstruction *inst, bool hasStopCondition)
void convertBlocksToFunctions (SgAsmNode *globalNode)
void flattenBlocks (SgAsmNode *globalNode)

Protected Attributes

rose_hash::unordered_map<
uint64_t, SgAsmInstruction * > 
rememberInstructions
tabletype_inv deftable_instr
int nrOfFunctions
SgAsmNodeglobalBin
int func_nr
int nr_target_missed
RoseBin_Graph * vizzGraph
std::string fileName
bool printEdges
std::string analysisName
std::string typeNode
std::string typeEdge
SgAsmFunctionfuncDecl
SgGraphNodefuncDeclNode
std::stack< SgAsmInstruction * > worklist_forthisfunction
rose_hash::unordered_map<
std::string, SgAsmInstruction * > 
local_visited
bin_funcs_type bin_funcs
rose_hash::unordered_map<
std::string, SgIncidenceDirectedGraph * > 
graphs
bool db
int nrNodes
int nrEdges
GraphAlgorithmsg_algo

Static Protected Attributes

static bool initialized

Member Typedef Documentation

typedef rose_hash::unordered_map< uint64_t, SgGraphNode*> RoseBin_FlowAnalysis::tabletype_inv [protected]

typedef std::map<std::string, SgAsmFunction*> RoseBin_FlowAnalysis::bin_funcs_type [protected]


Constructor & Destructor Documentation

RoseBin_FlowAnalysis::RoseBin_FlowAnalysis ( SgAsmNode global,
GraphAlgorithms algo 
)

virtual RoseBin_FlowAnalysis::~RoseBin_FlowAnalysis (  )  [inline, virtual]


Member Function Documentation

void RoseBin_FlowAnalysis::initFunctionList ( SgAsmNode global  )  [protected]

void RoseBin_FlowAnalysis::process_jumps (  )  [protected]

SgAsmInstruction* RoseBin_FlowAnalysis::process_jumps_get_target ( SgAsmx86Instruction inst  )  [protected]

void RoseBin_FlowAnalysis::resolveFunctions ( SgAsmNode global  )  [protected]

SgAsmInstruction* RoseBin_FlowAnalysis::resolveFunction ( SgAsmInstruction inst,
bool  hasStopCondition 
) [protected]

void RoseBin_FlowAnalysis::convertBlocksToFunctions ( SgAsmNode globalNode  )  [protected]

void RoseBin_FlowAnalysis::flattenBlocks ( SgAsmNode globalNode  )  [protected]

void RoseBin_FlowAnalysis::setInitializedFalse (  )  [inline]

RoseBin_Graph* RoseBin_FlowAnalysis::getGraph (  )  [inline]

void RoseBin_FlowAnalysis::printAST ( SgAsmNode globalNode  ) 

virtual void RoseBin_FlowAnalysis::run ( RoseBin_Graph *  vg,
std::string  fileN,
bool  multiedge 
) [pure virtual]

Implemented in RoseBin_CallGraphAnalysis, RoseBin_ControlFlowAnalysis, and RoseBin_DataFlowAnalysis.

std::string RoseBin_FlowAnalysis::getName (  )  [inline]

void RoseBin_FlowAnalysis::visit ( SgNode node  )  [virtual]

this method is called at every traversed node.

Implements AstSimpleProcessing.

void RoseBin_FlowAnalysis::checkControlFlow ( SgAsmInstruction binInst,
int  functionSize,
int  countDown,
std::string &  currentFunctionName,
int  func_nr 
)

SgGraphNode* RoseBin_FlowAnalysis::getNodeFor ( uint64_t  inst  )  [inline]

void RoseBin_FlowAnalysis::createInstToNodeTable (  ) 

uint64_t RoseBin_FlowAnalysis::getAddressForNode ( SgGraphNode node  ) 

template<class T>
bool RoseBin_FlowAnalysis::from_string ( T &  t,
const std::string &  s,
std::ios_base &(*)(std::ios_base &)  f 
) [inline]

int RoseBin_FlowAnalysis::nodesVisited (  )  [inline]

int RoseBin_FlowAnalysis::edgesVisited (  )  [inline]

bool RoseBin_FlowAnalysis::sameParents ( SgGraphNode node,
SgGraphNode next 
)

void RoseBin_FlowAnalysis::getRootNodes ( std::vector< SgGraphNode * > &  rootNodes  ) 

SgGraphNode* RoseBin_FlowAnalysis::addCFNode ( std::string &  name,
std::string &  type,
int  address,
bool  isFunction,
SgNode int_node 
)

void RoseBin_FlowAnalysis::clearMaps (  ) 


Member Data Documentation

rose_hash::unordered_map<uint64_t, SgAsmInstruction* > RoseBin_FlowAnalysis::rememberInstructions [protected]

tabletype_inv RoseBin_FlowAnalysis::deftable_instr [protected]

int RoseBin_FlowAnalysis::nrOfFunctions [protected]

SgAsmNode* RoseBin_FlowAnalysis::globalBin [protected]

int RoseBin_FlowAnalysis::func_nr [protected]

int RoseBin_FlowAnalysis::nr_target_missed [protected]

RoseBin_Graph* RoseBin_FlowAnalysis::vizzGraph [protected]

std::string RoseBin_FlowAnalysis::fileName [protected]

bool RoseBin_FlowAnalysis::printEdges [protected]

Reimplemented in RoseBin_DataFlowAnalysis.

std::string RoseBin_FlowAnalysis::analysisName [protected]

std::string RoseBin_FlowAnalysis::typeNode [protected]

std::string RoseBin_FlowAnalysis::typeEdge [protected]

SgAsmFunction* RoseBin_FlowAnalysis::funcDecl [protected]

SgGraphNode* RoseBin_FlowAnalysis::funcDeclNode [protected]

std::stack<SgAsmInstruction*> RoseBin_FlowAnalysis::worklist_forthisfunction [protected]

rose_hash::unordered_map<std::string, SgAsmInstruction*> RoseBin_FlowAnalysis::local_visited [protected]

bin_funcs_type RoseBin_FlowAnalysis::bin_funcs [protected]

rose_hash::unordered_map<std::string, SgIncidenceDirectedGraph*> RoseBin_FlowAnalysis::graphs [protected]

bool RoseBin_FlowAnalysis::initialized [static, protected]

bool RoseBin_FlowAnalysis::db [protected]

int RoseBin_FlowAnalysis::nrNodes [protected]

int RoseBin_FlowAnalysis::nrEdges [protected]

GraphAlgorithms* RoseBin_FlowAnalysis::g_algo [protected]

bool RoseBin_FlowAnalysis::forward_analysis


The documentation for this class was generated from the following file:
Generated on Tue Jan 31 05:34:36 2012 for ROSE by  doxygen 1.4.7