about summary refs log tree commit diff homepage
path: root/tools
diff options
context:
space:
mode:
authorCristian Cadar <c.cadar@imperial.ac.uk>2018-12-18 15:01:44 +0000
committerMartinNowack <martin.nowack@gmail.com>2018-12-19 21:26:48 +0000
commit6056fddb8264e6d47344efe15ce18d08a4242b82 (patch)
tree9dea96ba1f625f557910456e4c1db0b2bf97c455 /tools
parent5f167edf436f1ef735e5c89f6e350d11ec7c7854 (diff)
downloadklee-6056fddb8264e6d47344efe15ce18d08a4242b82.tar.gz
Added starting option category
Diffstat (limited to 'tools')
-rw-r--r--tools/klee/main.cpp57
1 files changed, 37 insertions, 20 deletions
diff --git a/tools/klee/main.cpp b/tools/klee/main.cpp
index 9a258fb8..dd524f58 100644
--- a/tools/klee/main.cpp
+++ b/tools/klee/main.cpp
@@ -72,6 +72,11 @@ namespace {
   cl::opt<std::string>
   InputFile(cl::desc("<input bytecode>"), cl::Positional, cl::init("-"));
 
+  cl::list<std::string>
+  InputArgv(cl::ConsumeAfter,
+            cl::desc("<program arguments>..."));
+
+
 
   /*** Test case options ***/
 
@@ -115,20 +120,45 @@ namespace {
 
 
 
+  /*** Starting options ***/
+
+  cl::OptionCategory StartCat("Starting options",
+                              "These options affect how execution is started.");
+
   cl::opt<std::string>
   EntryPoint("entry-point",
-               cl::desc("Consider the function with the given name as the entrypoint"),
-               cl::init("main"));
+             cl::desc("Function in which to start execution (default=main)"),
+             cl::init("main"),
+             cl::cat(StartCat));
 
   cl::opt<std::string>
-  RunInDir("run-in", cl::desc("Change to the given directory prior to executing"));
+  RunInDir("run-in-dir",
+           cl::desc("Change to the given directory prior to executing"),
+           cl::cat(StartCat));
 
   cl::opt<std::string>
-  Environ("environ", cl::desc("Parse environ from given file (in \"env\" format)"));
+  Environ("environ",
+          cl::desc("Parse environment from given file (in \"env\" format)"),
+          cl::cat(StartCat));
+
+  enum class LibcType { FreeStandingLibc, KleeLibc, UcLibc };
+
+  cl::opt<LibcType>
+  Libc("libc",
+       cl::desc("Choose libc version (none by default)."),
+       cl::values(
+                  clEnumValN(LibcType::FreeStandingLibc,
+                             "none",
+                             "Don't link in a libc (only provide freestanding environment)"),
+                  clEnumValN(LibcType::KleeLibc,
+                             "klee",
+                             "Link in KLEE's libc"),
+                  clEnumValN(LibcType::UcLibc, "uclibc",
+                             "Link in uclibc (adapted for KLEE)")
+                  KLEE_LLVM_CL_VAL_END),
+       cl::init(LibcType::FreeStandingLibc));
+
 
-  cl::list<std::string>
-  InputArgv(cl::ConsumeAfter,
-            cl::desc("<program arguments>..."));
 
   cl::opt<bool>
   NoOutput("no-output",
@@ -142,19 +172,6 @@ namespace {
   OptExitOnError("exit-on-error",
               cl::desc("Exit if errors occur"));
 
-  enum class LibcType { FreeStandingLibc, KleeLibc, UcLibc };
-
-  cl::opt<LibcType> Libc(
-      "libc", cl::desc("Choose libc version (none by default)."),
-      cl::values(
-          clEnumValN(
-              LibcType::FreeStandingLibc, "none",
-              "Don't link in a libc (only provide freestanding environment)"),
-          clEnumValN(LibcType::KleeLibc, "klee", "Link in klee libc"),
-          clEnumValN(LibcType::UcLibc, "uclibc",
-                     "Link in uclibc (adapted for klee)") KLEE_LLVM_CL_VAL_END),
-      cl::init(LibcType::FreeStandingLibc));
-
   cl::opt<bool>
   WithPOSIXRuntime("posix-runtime",
 		cl::desc("Link with POSIX runtime.  Options that can be passed as arguments to the programs are: --sym-arg <max-len>  --sym-args <min-argvs> <max-argvs> <max-len> + file model options"),