本文整理汇总了C++中function::arg_iterator::getNameStr方法的典型用法代码示例。如果您正苦于以下问题:C++ arg_iterator::getNameStr方法的具体用法?C++ arg_iterator::getNameStr怎么用?C++ arg_iterator::getNameStr使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类function::arg_iterator
的用法示例。
在下文中一共展示了arg_iterator::getNameStr方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: dumpStack
void ExecutionState::dumpStack(std::ostream &out) const {
unsigned idx = 0;
const KInstruction *target = prevPC;
for (ExecutionState::stack_ty::const_reverse_iterator
it = stack.rbegin(), ie = stack.rend();
it != ie; ++it) {
const StackFrame &sf = *it;
Function *f = sf.kf->function;
const InstructionInfo &ii = *target->info;
out << "\t#" << idx++
<< " " << std::setw(8) << std::setfill('0') << ii.assemblyLine
<< " in " << f->getNameStr() << " (";
// Yawn, we could go up and print varargs if we wanted to.
unsigned index = 0;
for (Function::arg_iterator ai = f->arg_begin(), ae = f->arg_end();
ai != ae; ++ai) {
if (ai!=f->arg_begin()) out << ", ";
out << ai->getNameStr();
// XXX should go through function
ref<Expr> value = sf.locals[sf.kf->getArgRegister(index++)].value;
if (isa<ConstantExpr>(value))
out << "=" << value;
}
out << ")";
if (ii.file != "")
out << " at " << ii.file << ":" << ii.line;
out << "\n";
target = sf.caller;
}
}