diff options
author | Cristian Cadar <c.cadar@imperial.ac.uk> | 2016-06-24 18:18:23 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-06-24 18:18:23 +0100 |
commit | a49c6fabebb91718b54489e7c09cb7bddc9795b2 (patch) | |
tree | 1466f9d605c45563c951030d4c6a22feaf689103 /tools | |
parent | 96c244cda990edeb435a750fdef050b95c38ac7d (diff) | |
parent | 96cbd7f7dfa69f47ae08c0bb833fde167c5af909 (diff) | |
download | klee-a49c6fabebb91718b54489e7c09cb7bddc9795b2.tar.gz |
Merge pull request #394 from andreamattavelli/refactoring_runindir
Added error message 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 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); |