本文整理汇总了C++中PBB::updateType方法的典型用法代码示例。如果您正苦于以下问题:C++ PBB::updateType方法的具体用法?C++ PBB::updateType怎么用?C++ PBB::updateType使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PBB
的用法示例。
在下文中一共展示了PBB::updateType方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: processProc
//.........这里部分代码省略.........
BB_rtls = NULL;
if (pRtl->getAddress() == pProc->getNativeAddress()) {
// it's a thunk
// Proc *lp = prog->findProc(func.c_str());
func = std::string("__imp_") + func;
pProc->setName(func.c_str());
//lp->setName(func.c_str());
Boomerang::get()->alert_update_signature(pProc);
}
callList.push_back(call);
ss = sl.end(); ss--; // get out of the loop
break;
}
BB_rtls->push_back(pRtl);
// We create the BB as a COMPJUMP type, then change to an NWAY if it turns out to be a switch stmt
pBB = pCfg->newBB(BB_rtls, COMPJUMP, 0);
LOG << "COMPUTED JUMP at " << uAddr << ", pDest = " << pDest << "\n";
if (Boomerang::get()->noDecompile) {
// try some hacks
if (pDest->isMemOf() && pDest->getSubExp1()->getOper() == opPlus &&
pDest->getSubExp1()->getSubExp2()->isIntConst()) {
// assume subExp2 is a jump table
ADDRESS jmptbl = ((Const*)pDest->getSubExp1()->getSubExp2())->getInt();
unsigned int i;
for (i = 0; ; i++) {
ADDRESS uDest = pBF->readNative4(jmptbl + i * 4);
if (pBF->getLimitTextLow() <= uDest && uDest < pBF->getLimitTextHigh()) {
LOG << " guessed uDest " << uDest << "\n";
targetQueue.visit(pCfg, uDest, pBB);
pCfg->addOutEdge(pBB, uDest, true);
} else
break;
}
pBB->updateType(NWAY, i);
}
}
sequentialDecode = false;
BB_rtls = NULL; // New RTLList for next BB
break;
}
case STMT_BRANCH: {
uDest = stmt_jump->getFixedDest();
BB_rtls->push_back(pRtl);
pBB = pCfg->newBB(BB_rtls, TWOWAY, 2);
// Stop decoding sequentially if the basic block already existed otherwise complete the basic block
if (pBB == 0)
sequentialDecode = false;
else {
// Add the out edge if it is to a destination within the procedure
if (!ASS_FILE){
if (uDest < pBF->getLimitTextHigh()) {
targetQueue.visit(pCfg, uDest, pBB);
pCfg->addOutEdge(pBB, uDest, true);
}
else
LOG << "Error: Instruction at " << uAddr << " branches beyond end of section, to "
<< uDest << "\n";
}
else {
targetQueue.visit(pCfg, uDest, pBB);
pCfg->addOutEdge(pBB, uDest, true);
}