BlockPtr Flow::getBlockWithAddr(unsigned long long addr) { BlockPtr b; std::set<BlockPtr>::iterator it = this->blocks.begin(); std::set<BlockPtr>::iterator e = this->blocks.end(); while( it != e ) { BlockPtr n = *it; if( n->getBlockBase() <= addr && n->getBlockEnd() > addr ) { b = n; break; } ++it; } return b; }
bool Flow::isAddrInFlowCode(unsigned long long addr) { bool found = false; std::set<BlockPtr>::iterator it = this->blocks.begin(); std::set<BlockPtr>::iterator e = this->blocks.end(); while( it != e ) { BlockPtr b = *it; //if( b->overlaps(addr) ) { if( b->getBlockBase() == addr ) { found = true; break; } ++it; } return found; }