diff options
Diffstat (limited to 'lib/Core/Executor.cpp')
-rw-r--r-- | lib/Core/Executor.cpp | 30 |
1 files changed, 1 insertions, 29 deletions
diff --git a/lib/Core/Executor.cpp b/lib/Core/Executor.cpp index dc74b6cd..1da91f2a 100644 --- a/lib/Core/Executor.cpp +++ b/lib/Core/Executor.cpp @@ -2554,35 +2554,7 @@ void Executor::terminateStateOnError(ExecutionState &state, msg << "Line: " << ii.line << "\n"; } msg << "Stack: \n"; - unsigned idx = 0; - const KInstruction *target = state.prevPC; - for (ExecutionState::stack_ty::reverse_iterator - it = state.stack.rbegin(), ie = state.stack.rend(); - it != ie; ++it) { - StackFrame &sf = *it; - Function *f = sf.kf->function; - const InstructionInfo &ii = *target->info; - msg << "\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()) msg << ", "; - - msg << ai->getNameStr(); - // XXX should go through function - ref<Expr> value = sf.locals[sf.kf->getArgRegister(index++)].value; - if (isa<ConstantExpr>(value)) - msg << "=" << value; - } - msg << ")"; - if (ii.file != "") - msg << " at " << ii.file << ":" << ii.line; - msg << "\n"; - target = sf.caller; - } + state.dumpStack(msg); std::string info_str = info.str(); if (info_str != "") |