Esempio n. 1
0
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;
}
Esempio n. 2
0
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;
}