diff options
author | Andrea Mattavelli <andreamattavelli@gmail.com> | 2016-05-20 10:22:22 +0100 |
---|---|---|
committer | Andrea Mattavelli <andreamattavelli@gmail.com> | 2016-05-24 17:50:16 +0100 |
commit | 96cbd7f7dfa69f47ae08c0bb833fde167c5af909 (patch) | |
tree | be2769e28b9d1cb242cd224e88cabbd05d777172 /tools | |
parent | eba0093c4887473be2562a7ab4e16b3d09793f4e (diff) | |
download | klee-96cbd7f7dfa69f47ae08c0bb833fde167c5af909.tar.gz |
Added string for -run-in directory errors
Diffstat (limited to 'tools')
-rw-r--r-- | tools/klee/main.cpp | 10 |
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); |