From 6056fddb8264e6d47344efe15ce18d08a4242b82 Mon Sep 17 00:00:00 2001 From: Cristian Cadar Date: Tue, 18 Dec 2018 15:01:44 +0000 Subject: Added starting option category --- tools/klee/main.cpp | 57 ++++++++++++++++++++++++++++++++++------------------- 1 file changed, 37 insertions(+), 20 deletions(-) (limited to 'tools') 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 InputFile(cl::desc(""), cl::Positional, cl::init("-")); + cl::list + InputArgv(cl::ConsumeAfter, + cl::desc("...")); + + /*** Test case options ***/ @@ -115,20 +120,45 @@ namespace { + /*** Starting options ***/ + + cl::OptionCategory StartCat("Starting options", + "These options affect how execution is started."); + cl::opt 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 - 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 - 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 + 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 - InputArgv(cl::ConsumeAfter, - cl::desc("...")); cl::opt 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 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 WithPOSIXRuntime("posix-runtime", cl::desc("Link with POSIX runtime. Options that can be passed as arguments to the programs are: --sym-arg --sym-args + file model options"), -- cgit 1.4.1