template <typename ELFT>
void LLVMDisassembler<ELFT>::disassembleFunction(Function* function) {
+ std::vector<uint64_t> called_functions;
std::stack<BasicBlock*> remaining_blocks;
/* TODO:
* Do all blocks get added properly? We should take care to remove
if (!MIA->isIndirectBranch(inst)) {
if (MIA->isCall(inst)) {
if (NULL == manager->getFunction(jmptarget))
- disassembleFunctionAt(jmptarget);
+ called_functions.push_back(jmptarget);
} else {
current_block->setNextBlock(0, jmptarget);
if (new_blocks.find(jmptarget) == new_blocks.end()) {
splitBlocks(function);
LOG4CXX_DEBUG(logger, "Finished function " << function->getName());
manager->finishFunction(function);
+ for (uint64_t address : called_functions)
+ disassembleFunctionAt(address);
}
template <typename ELFT>