]>
Commit | Line | Data |
---|---|---|
73f52eb4 | 1 | // Shared data for parsing the stap command line |
ef36f781 | 2 | // Copyright (C) 2014 Red Hat Inc. |
73f52eb4 DB |
3 | // |
4 | // This file is part of systemtap, and is free software. You can | |
5 | // redistribute it and/or modify it under the terms of the GNU General | |
6 | // Public License (GPL); either version 2, or (at your option) any | |
7 | // later version. | |
8 | ||
9 | #include <cstdlib> | |
10 | #include "cmdline.h" | |
11 | ||
73f52eb4 DB |
12 | // NB: when adding new options, consider very carefully whether they |
13 | // should be restricted from stap clients (after --client-options)! | |
14 | struct option stap_long_options[] = { | |
e1b1eb3d JL |
15 | { "skip-badvars", no_argument, NULL, LONG_OPT_SKIP_BADVARS }, |
16 | { "vp", required_argument, NULL, LONG_OPT_VERBOSE_PASS }, | |
17 | { "unprivileged", no_argument, NULL, LONG_OPT_UNPRIVILEGED }, | |
73f52eb4 DB |
18 | #define OWE5 "tter" |
19 | #define OWE1 "uild-" | |
20 | #define OWE6 "fu-kb" | |
21 | #define OWE2 "i-kno" | |
22 | #define OWE4 "st" | |
23 | #define OWE3 "w-be" | |
e1b1eb3d JL |
24 | { OWE4 OWE6 OWE1 OWE2 OWE3 OWE5, no_argument, NULL, LONG_OPT_OMIT_WERROR }, |
25 | { "client-options", no_argument, NULL, LONG_OPT_CLIENT_OPTIONS }, | |
26 | { "help", no_argument, NULL, LONG_OPT_HELP }, | |
27 | { "disable-cache", no_argument, NULL, LONG_OPT_DISABLE_CACHE }, | |
28 | { "poison-cache", no_argument, NULL, LONG_OPT_POISON_CACHE }, | |
29 | { "clean-cache", no_argument, NULL, LONG_OPT_CLEAN_CACHE }, | |
30 | { "compatible", required_argument, NULL, LONG_OPT_COMPATIBLE }, | |
31 | { "ldd", no_argument, NULL, LONG_OPT_LDD }, | |
32 | { "use-server", optional_argument, NULL, LONG_OPT_USE_SERVER }, | |
33 | { "list-servers", optional_argument, NULL, LONG_OPT_LIST_SERVERS }, | |
34 | { "trust-servers", optional_argument, NULL, LONG_OPT_TRUST_SERVERS }, | |
35 | { "use-server-on-error", optional_argument, NULL, LONG_OPT_USE_SERVER_ON_ERROR }, | |
36 | { "all-modules", no_argument, NULL, LONG_OPT_ALL_MODULES }, | |
37 | { "remote", required_argument, NULL, LONG_OPT_REMOTE }, | |
38 | { "remote-prefix", no_argument, NULL, LONG_OPT_REMOTE_PREFIX }, | |
39 | { "check-version", no_argument, NULL, LONG_OPT_CHECK_VERSION }, | |
40 | { "version", no_argument, NULL, LONG_OPT_VERSION }, | |
41 | { "tmpdir", required_argument, NULL, LONG_OPT_TMPDIR }, | |
42 | { "download-debuginfo", optional_argument, NULL, LONG_OPT_DOWNLOAD_DEBUGINFO }, | |
43 | { "dump-probe-types", no_argument, NULL, LONG_OPT_DUMP_PROBE_TYPES }, | |
7d66cd75 | 44 | { "dump-probe-aliases", no_argument, NULL, LONG_OPT_DUMP_PROBE_ALIASES }, |
eb9ea966 | 45 | { "dump-functions", no_argument, NULL, LONG_OPT_DUMP_FUNCTIONS }, |
e1b1eb3d JL |
46 | { "privilege", required_argument, NULL, LONG_OPT_PRIVILEGE }, |
47 | { "suppress-handler-errors", no_argument, NULL, LONG_OPT_SUPPRESS_HANDLER_ERRORS }, | |
48 | { "modinfo", required_argument, NULL, LONG_OPT_MODINFO }, | |
49 | { "rlimit-as", required_argument, NULL, LONG_OPT_RLIMIT_AS }, | |
50 | { "rlimit-cpu", required_argument, NULL, LONG_OPT_RLIMIT_CPU }, | |
51 | { "rlimit-nproc", required_argument, NULL, LONG_OPT_RLIMIT_NPROC }, | |
52 | { "rlimit-stack", required_argument, NULL, LONG_OPT_RLIMIT_STACK }, | |
53 | { "rlimit-fsize", required_argument, NULL, LONG_OPT_RLIMIT_FSIZE }, | |
54 | { "sysroot", required_argument, NULL, LONG_OPT_SYSROOT }, | |
55 | { "sysenv", required_argument, NULL, LONG_OPT_SYSENV }, | |
56 | { "suppress-time-limits", no_argument, NULL, LONG_OPT_SUPPRESS_TIME_LIMITS }, | |
57 | { "runtime", required_argument, NULL, LONG_OPT_RUNTIME }, | |
58 | { "dyninst", no_argument, NULL, LONG_OPT_RUNTIME_DYNINST }, | |
59 | { "benchmark-sdt", no_argument, NULL, LONG_OPT_BENCHMARK_SDT }, | |
60 | { "benchmark-sdt-loops", required_argument, NULL, LONG_OPT_BENCHMARK_SDT_LOOPS }, | |
61 | { "benchmark-sdt-threads", required_argument, NULL, LONG_OPT_BENCHMARK_SDT_THREADS }, | |
62 | { "color", optional_argument, NULL, LONG_OPT_COLOR_ERRS }, | |
63 | { "colour", optional_argument, NULL, LONG_OPT_COLOR_ERRS }, | |
73f52eb4 DB |
64 | { NULL, 0, NULL, 0 } |
65 | }; |