aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAndrea Mattavelli <andreamattavelli@gmail.com>2016-05-20 10:22:22 +0100
committerAndrea Mattavelli <andreamattavelli@gmail.com>2016-05-24 17:50:16 +0100
commit96cbd7f7dfa69f47ae08c0bb833fde167c5af909 (patch)
treebe2769e28b9d1cb242cd224e88cabbd05d777172
parenteba0093c4887473be2562a7ab4e16b3d09793f4e (diff)
downloadklee-96cbd7f7dfa69f47ae08c0bb833fde167c5af909.tar.gz
Added string for -run-in directory errors
-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 80161caa..391c8fa2 100644
--- a/tools/klee/main.cpp
+++ b/tools/klee/main.cpp
@@ -1426,7 +1426,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);
}
}
@@ -1488,7 +1491,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);