From 96cbd7f7dfa69f47ae08c0bb833fde167c5af909 Mon Sep 17 00:00:00 2001 From: Andrea Mattavelli Date: Fri, 20 May 2016 10:22:22 +0100 Subject: Added string for -run-in directory errors --- tools/klee/main.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'tools') 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); -- cgit 1.4.1