本文整理汇总了C++中Proc::setFirstCaller方法的典型用法代码示例。如果您正苦于以下问题:C++ Proc::setFirstCaller方法的具体用法?C++ Proc::setFirstCaller怎么用?C++ Proc::setFirstCaller使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Proc
的用法示例。
在下文中一共展示了Proc::setFirstCaller方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: processProc
//.........这里部分代码省略.........
}
if(AssProgram)
++ li ;
} // while sequentialDecode
// Add this range to the coverage
// pProc->addRange(start, uAddr);
// Must set sequentialDecode back to true
sequentialDecode = true;
} // while nextAddress() != NO_ADDRESS
//ProgWatcher *w = prog->getWatcher();
//if (w)
// w->alert_done(pProc, initAddr, lastAddr, nTotalBytes);
// Add the callees to the set of CallStatements, and also to the Prog object
std::list<CallStatement*>::iterator it;
for (it = callList.begin(); it != callList.end(); it++) {
ADDRESS dest = (*it)->getFixedDest();
// Don't speculatively decode procs that are outside of the main text section, apart from dynamically
// linked ones (in the .plt)
// TODO: change pBF pointers
if (!ASS_FILE){
if (pBF->IsDynamicLinkedProc(dest) || !spec || (dest < pBF->getLimitTextHigh())) {
pCfg->addCall(*it);
// Don't visit the destination of a register call
Proc *np = (*it)->getDestProc();
if (np == NULL && dest != NO_ADDRESS) {
//np = newProc(pProc->getProg(), dest);
np = pProc->getProg()->setNewProc(dest);
}
if (np != NULL) {
np->setFirstCaller(pProc);
pProc->addCallee(np);
}
}
}
else{
pCfg->addCall(*it);
// Don't visit the destination of a register call
Proc *np = (*it)->getDestProc();
if (np == NULL && dest != NO_ADDRESS) {
//np = newProc(pProc->getProg(), dest);
np = pProc->getProg()->setNewProc(dest);
}
if (np != NULL) {
np->setFirstCaller(pProc);
pProc->addCallee(np);
}
}
}
Boomerang::get()->alert_decode(pProc, startAddr, lastAddr, nTotalBytes);
std::cout<< "finished processing proc " << pProc->getName() << " at address " << pProc->getNativeAddress() << "\n";
if (VERBOSE)
LOG << "finished processing proc " << pProc->getName() << " at address " << pProc->getNativeAddress() << "\n";
return true;
}
/*==============================================================================
* FUNCTION: FrontEnd::getInst
* OVERVIEW: Fetch the smallest (nop-sized) instruction, in an endianness independent manner
* NOTE: Frequently overridden
* PARAMETERS: addr - host address to getch from
* RETURNS: An integer with the instruction in it
*============================================================================*/
int FrontEnd::getInst(int addr)
{
return (int)(*(unsigned char*)addr);
}
/*==============================================================================
* FUNCTION: TargetQueue::visit
* OVERVIEW: Visit a destination as a label, i.e. check whether we need to queue it as a new BB to create later.
* Note: at present, it is important to visit an address BEFORE an out edge is added to that address.
* This is because adding an out edge enters the address into the Cfg's BB map, and it looks like the
* BB has already been visited, and it gets overlooked. It would be better to have a scheme whereby
* the order of calling these functions (i.e. visit() and AddOutEdge()) did not matter.
* PARAMETERS: pCfg - the enclosing CFG
* uNewAddr - the address to be checked
* pNewBB - set to the lower part of the BB if the address
* already exists as a non explicit label (BB has to be split)
* RETURNS: <nothing>
*============================================================================*/
void TargetQueue::visit(Cfg* pCfg, ADDRESS uNewAddr, PBB& pNewBB) {
// Find out if we've already parsed the destination
bool bParsed = pCfg->label(uNewAddr, pNewBB);
// Add this address to the back of the local queue,
// if not already processed
if (!bParsed) {
targets.push(uNewAddr);
if (Boomerang::get()->traceDecoder)
LOG << ">" << uNewAddr << "\t";
}
}