예제 #1
0
파일: SCInstr.cpp 프로젝트: nanAdair/scarab
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;
}
예제 #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();
}
예제 #3
0
파일: SCInstr.cpp 프로젝트: nanAdair/scarab
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());
        }
    }
}