about summary refs log tree commit diff homepage
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/klee/main.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/tools/klee/main.cpp b/tools/klee/main.cpp
index 7fe64c72..de04d92e 100644
--- a/tools/klee/main.cpp
+++ b/tools/klee/main.cpp
@@ -1430,7 +1430,10 @@ int main(int argc, char **argv, char **envp) {
     if (RunInDir != "") {
       int res = chdir(RunInDir.c_str());
       if (res < 0) {
-        klee_error("Unable to change directory to: %s", RunInDir.c_str());
+        char info[128];
+        char *str = strerror_r(errno, info, sizeof(info));
+        klee_error("Unable to change directory to: %s - %s", RunInDir.c_str(),
+                   str);
       }
     }
 
@@ -1492,7 +1495,10 @@ int main(int argc, char **argv, char **envp) {
     if (RunInDir != "") {
       int res = chdir(RunInDir.c_str());
       if (res < 0) {
-        klee_error("Unable to change directory to: %s", RunInDir.c_str());
+        char info[128];
+        char *str = strerror_r(errno, info, sizeof(info));
+        klee_error("Unable to change directory to: %s - %s", RunInDir.c_str(),
+                   str);
       }
     }
     interpreter->runFunctionAsMain(mainFn, pArgc, pArgv, pEnvp);