[llvm-commits] [klee] r72338 - /klee/trunk/runtime/POSIX/klee_init_env.c
Daniel Dunbar
daniel at zuster.org
Sat May 23 13:07:02 PDT 2009
Author: ddunbar
Date: Sat May 23 15:07:01 2009
New Revision: 72338
URL: http://llvm.org/viewvc/llvm-project?rev=72338&view=rev
Log:
Make klee_init_env print some usage instructions with --help.
Modified:
klee/trunk/runtime/POSIX/klee_init_env.c
Modified: klee/trunk/runtime/POSIX/klee_init_env.c
URL: http://llvm.org/viewvc/llvm-project/klee/trunk/runtime/POSIX/klee_init_env.c?rev=72338&r1=72337&r2=72338&view=diff
==============================================================================
--- klee/trunk/runtime/POSIX/klee_init_env.c (original)
+++ klee/trunk/runtime/POSIX/klee_init_env.c Sat May 23 15:07:01 2009
@@ -98,6 +98,20 @@
sym_arg_name[4] = '\0';
+ // Recognize --help when it is the sole argument.
+ if (argc == 2 && __streq(argv[1], "--help")) {
+ __emit_error("klee_init_env\n\n\
+usage: (klee_init_env) [options] [program arguments]\n\
+ -sym-arg <N> - Replace by a symbolic argument with length N\n\
+ -sym-args <MIN> <MAX> <N> - Replace by at least MIN arguments and at most\n\
+ MAX arguments, each with maximum length N\n\
+ -sym-files <NUM> <N> - Make stdin and up to NUM symbolic files, each\n\
+ with maximum size N.\n\
+ -sym-stdout - Make stdout symbolic.\n\
+ -max-fail <N> - Allow up to <N> injected failures\n\
+ -fd-fail - Shortcut for '-max-fail 1'\n\n");
+ }
+
while (k < argc) {
if (__streq(argv[k], "--sym-arg") || __streq(argv[k], "-sym-arg")) {
const char *msg = "--sym-arg expects an integer argument <max-len>";
More information about the llvm-commits
mailing list