about summary refs log tree commit diff homepage
diff options
context:
space:
mode:
authorFrank Busse <bb0xfb@gmail.com>2022-04-22 17:17:37 +0100
committerCristian Cadar <c.cadar@imperial.ac.uk>2022-06-13 22:30:53 +0100
commit168daea0661f6e18dc85e967ff572f33a76a2bc5 (patch)
treeb05a133c5f2273eb394d3d73a33295ae972c691f
parentf57c93a7e38db4c6d87cfc88c0e1d4f4112c065f (diff)
downloadklee-168daea0661f6e18dc85e967ff572f33a76a2bc5.tar.gz
.err files: minor readability changes to stack trace output
-rw-r--r--lib/Core/ExecutionState.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/lib/Core/ExecutionState.cpp b/lib/Core/ExecutionState.cpp
index 54fe752e..5231f7fb 100644
--- a/lib/Core/ExecutionState.cpp
+++ b/lib/Core/ExecutionState.cpp
@@ -327,18 +327,22 @@ void ExecutionState::dumpStack(llvm::raw_ostream &out) const {
     std::stringstream AssStream;
     AssStream << std::setw(8) << std::setfill('0') << ii.assemblyLine;
     out << AssStream.str();
-    out << " in " << f->getName().str() << " (";
+    out << " in " << f->getName().str() << "(";
     // 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->getName().str();
-      // XXX should go through function
+      if (ai->hasName())
+        out << ai->getName().str() << "=";
+
       ref<Expr> value = sf.locals[sf.kf->getArgRegister(index++)].value;
-      if (isa_and_nonnull<ConstantExpr>(value))
-        out << "=" << value;
+      if (isa_and_nonnull<ConstantExpr>(value)) {
+        out << value;
+      } else {
+        out << "symbolic";
+      }
     }
     out << ")";
     if (ii.file != "")