uint64_t entryAddress();
virtual void forEachFunction(std::function<void (uint64_t, Function*)> callback) = 0;
+ virtual BasicBlock * getBasicBlock(uint64_t address) = 0;
protected:
virtual bool isFunctionCall(uint64_t address) = 0;
if (blocks.find(jmptarget) == blocks.end()) {
LLVMBasicBlock * block = new LLVMBasicBlock(jmptarget);
blocks.insert(std::make_pair(block->getStartAddress(), block));
+ current_block->setNextBlock(0, block->getStartAddress());
remaining_blocks.push(block);
}
if (MIA->isConditionalBranch(inst)) {
if (blocks.find(jmptarget) == blocks.end()) {
LLVMBasicBlock * block = new LLVMBasicBlock(jmptarget);
blocks.insert(std::make_pair(block->getStartAddress(), block));
+ current_block->setNextBlock(1, block->getStartAddress());
remaining_blocks.push(new LLVMBasicBlock(jmptarget));
}
}
uint64_t entryAddress();
void forEachFunction(std::function<void (uint64_t, Function*)> callback);
+ BasicBlock * getBasicBlock(uint64_t address) {
+ return blocks[address];
+ }
protected:
bool isFunctionCall(uint64_t address) {return false;}