Esempio n. 1
0
SCInstr* SCInstr::getBranchTargetByCFG() {
    SCBlock* bbl = i_block;
    if (!bbl)
        return NULL;
    EdgeListT succ = bbl->getSucc();
    for (EdgeIterT eit=succ.begin(); eit!=succ.end(); ++eit) {
        if ((*eit)->getTo() != BLOCKLIST->getNextBBL(bbl))
            return (*eit)->getTo()->getFirstInstr();
    }
    return NULL;
}
Esempio n. 2
0
void RigidBody::deleteEdges(EdgeListT &edgeList)
{
    EdgeListT::const_iterator ci;
        
    for (ci = edgeList.begin(); ci != edgeList.end(); ++ci)
    {
        DynEdge *o = *ci;
        assert(o != NULL);
        delete o;
    }

    edgeList.clear();
}
Esempio n. 3
0
void debug() {
    SCLog(RL_TWO, "DEBUG:");
    BlockListT bbls= BLOCKLIST->getBlockList();
    for(BlockIterT bit=bbls.begin(); bit!=bbls.end(); ++bit) {
        SCBlock* a = *bit;
        EdgeListT e = a->getSucc();
        SCLog(RL_THREE, "Current block:%x", a);
        for(EdgeIterT eit=e.begin(); eit!=e.end(); ++eit) {
            if ((*eit)->getFrom() != a)
                SCLog(RL_FOUR, "%d: %x", std::distance(e.begin(), eit), (*eit)->getFrom());
        }
    }
}