1#ifndef VIRTUAL_BIN_CFG_H 
    2#define VIRTUAL_BIN_CFG_H 
    3#include <featureTests.h> 
    4#ifdef ROSE_ENABLE_BINARY_ANALYSIS 
   13namespace VirtualBinCFG {
 
   17    enum EdgeConditionKind 
 
   26    typedef std::set<Rose::BinaryAnalysis::Address> 
AddressSet;
 
   27    typedef std::map<Rose::BinaryAnalysis::Address, SgAsmInstruction*> AddressToInstructionMap;
 
   28    typedef std::map<SgAsmInstruction*, AddressSet> InstructionToAddressesMap;
 
   29    typedef std::map<SgAsmStatement*, AddressSet> StatementToAddressesMap;
 
   32        AddressToInstructionMap    addressToInstructionMap;
 
   33        InstructionToAddressesMap  indirectJumpTargets;
 
   34        StatementToAddressesMap    returnTargets; 
 
   35        InstructionToAddressesMap  incomingEdges;
 
   44            AddressToInstructionMap::const_iterator i = addressToInstructionMap.find(addr);
 
   45            if (i == addressToInstructionMap.end()) 
return NULL;
 
 
   53            static const AddressSet emptySet;
 
   54            InstructionToAddressesMap::const_iterator predsIter = incomingEdges.find(insn);
 
   55            if (predsIter == incomingEdges.end()) {
 
   58                return predsIter->second;
 
 
   80        std::string toString() 
const;
 
   82        std::string toStringForDebugging() 
const;
 
   84        std::string id() 
const;
 
   90        std::vector<CFGEdge> outEdges() 
const;
 
   91        std::vector<CFGEdge> inEdges() 
const;
 
   92        bool operator==(
const CFGNode& o)
 const {
 
   93            return node == o.node;
 
   95        bool operator!=(
const CFGNode& o)
 const {
 
   98        bool operator<(
const CFGNode& o)
 const {
 
 
  115        std::string toString() 
const;                   
 
  116        std::string toStringForDebugging() 
const;       
 
  117        std::string id() 
const;                         
 
  124        EdgeConditionKind condition() 
const;
 
  129        bool operator==(
const CFGEdge& o)
 const {
 
  130            return src == o.src && tgt == o.tgt;
 
  132        bool operator!=(
const CFGEdge& o)
 const {
 
  133            return src != o.src || tgt != o.tgt;
 
  135        bool operator<(
const CFGEdge& o)
 const {
 
  136            return src < o.src || (src == o.src && tgt < o.tgt);
 
 
Base class for machine instructions.
 
Base class for statement-like subclasses.
 
This class represents the base class for all IR nodes within Sage III.
 
Sawyer::Container::Set< Address > AddressSet
Set of addresses.
 
std::uint64_t Address
Address.