[Lldb-commits] [lldb] r366804 - [lldb][NFC] Tablegenify process
Raphael Isemann via lldb-commits
lldb-commits at lists.llvm.org
Tue Jul 23 05:54:33 PDT 2019
Author: teemperor
Date: Tue Jul 23 05:54:33 2019
New Revision: 366804
URL: http://llvm.org/viewvc/llvm-project?rev=366804&view=rev
Log:
[lldb][NFC] Tablegenify process
Modified:
lldb/trunk/source/Commands/CommandObjectProcess.cpp
lldb/trunk/source/Commands/Options.td
Modified: lldb/trunk/source/Commands/CommandObjectProcess.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectProcess.cpp?rev=366804&r1=366803&r2=366804&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectProcess.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectProcess.cpp Tue Jul 23 05:54:33 2019
@@ -256,14 +256,8 @@ protected:
};
static constexpr OptionDefinition g_process_attach_options[] = {
- // clang-format off
- { LLDB_OPT_SET_ALL, false, "continue", 'c', OptionParser::eNoArgument, nullptr, {}, 0, eArgTypeNone, "Immediately continue the process once attached." },
- { LLDB_OPT_SET_ALL, false, "plugin", 'P', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypePlugin, "Name of the process plugin you want to use." },
- { LLDB_OPT_SET_1, false, "pid", 'p', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypePid, "The process ID of an existing process to attach to." },
- { LLDB_OPT_SET_2, false, "name", 'n', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeProcessName, "The name of the process to attach to." },
- { LLDB_OPT_SET_2, false, "include-existing", 'i', OptionParser::eNoArgument, nullptr, {}, 0, eArgTypeNone, "Include existing processes when doing attach -w." },
- { LLDB_OPT_SET_2, false, "waitfor", 'w', OptionParser::eNoArgument, nullptr, {}, 0, eArgTypeNone, "Wait for the process with <process-name> to launch." },
- // clang-format on
+#define LLDB_OPTIONS_process_attach
+#include "CommandOptions.inc"
};
#pragma mark CommandObjectProcessAttach
@@ -506,9 +500,8 @@ protected:
// CommandObjectProcessContinue
static constexpr OptionDefinition g_process_continue_options[] = {
- // clang-format off
- { LLDB_OPT_SET_ALL, false, "ignore-count",'i', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeUnsignedInteger, "Ignore <N> crossings of the breakpoint (if it exists) for the currently selected thread." }
- // clang-format on
+#define LLDB_OPTIONS_process_continue
+#include "CommandOptions.inc"
};
#pragma mark CommandObjectProcessContinue
@@ -667,9 +660,8 @@ protected:
// CommandObjectProcessDetach
static constexpr OptionDefinition g_process_detach_options[] = {
- // clang-format off
- { LLDB_OPT_SET_1, false, "keep-stopped", 's', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeBoolean, "Whether or not the process should be kept stopped on detach (if possible)." },
- // clang-format on
+#define LLDB_OPTIONS_process_detach
+#include "CommandOptions.inc"
};
#pragma mark CommandObjectProcessDetach
@@ -764,9 +756,8 @@ protected:
// CommandObjectProcessConnect
static constexpr OptionDefinition g_process_connect_options[] = {
- // clang-format off
- { LLDB_OPT_SET_ALL, false, "plugin", 'p', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypePlugin, "Name of the process plugin you want to use." },
- // clang-format on
+#define LLDB_OPTIONS_process_connect
+#include "CommandOptions.inc"
};
#pragma mark CommandObjectProcessConnect
@@ -889,9 +880,8 @@ public:
// CommandObjectProcessLoad
static constexpr OptionDefinition g_process_load_options[] = {
- // clang-format off
- { LLDB_OPT_SET_ALL, false, "install", 'i', OptionParser::eOptionalArgument, nullptr, {}, 0, eArgTypePath, "Install the shared library to the target. If specified without an argument then the library will installed in the current working directory." },
- // clang-format on
+#define LLDB_OPTIONS_process_load
+#include "CommandOptions.inc"
};
#pragma mark CommandObjectProcessLoad
@@ -1273,11 +1263,8 @@ public:
// CommandObjectProcessHandle
static constexpr OptionDefinition g_process_handle_options[] = {
- // clang-format off
- { LLDB_OPT_SET_1, false, "stop", 's', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeBoolean, "Whether or not the process should be stopped if the signal is received." },
- { LLDB_OPT_SET_1, false, "notify", 'n', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeBoolean, "Whether or not the debugger should notify the user if the signal is received." },
- { LLDB_OPT_SET_1, false, "pass", 'p', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeBoolean, "Whether or not the signal should be passed to the process." }
- // clang-format on
+#define LLDB_OPTIONS_process_handle
+#include "CommandOptions.inc"
};
#pragma mark CommandObjectProcessHandle
Modified: lldb/trunk/source/Commands/Options.td
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/Options.td?rev=366804&r1=366803&r2=366804&view=diff
==============================================================================
--- lldb/trunk/source/Commands/Options.td (original)
+++ lldb/trunk/source/Commands/Options.td Tue Jul 23 05:54:33 2019
@@ -370,6 +370,56 @@ let Command = "regex" in {
Desc<"A syntax string showing the typical usage syntax.">;
}
+let Command = "process attach" in {
+ def process_attach_continue : Option<"continue", "c">,
+ Desc<"Immediately continue the process once attached.">;
+ def process_attach_plugin : Option<"plugin", "P">, Arg<"Plugin">,
+ Desc<"Name of the process plugin you want to use.">;
+ def process_attach_pid : Option<"pid", "p">, Group<1>, Arg<"Pid">,
+ Desc<"The process ID of an existing process to attach to.">;
+ def process_attach_name : Option<"name", "n">, Group<2>, Arg<"ProcessName">,
+ Desc<"The name of the process to attach to.">;
+ def process_attach_include_existing : Option<"include-existing", "i">,
+ Group<2>, Desc<"Include existing processes when doing attach -w.">;
+ def process_attach_waitfor : Option<"waitfor", "w">, Group<2>,
+ Desc<"Wait for the process with <process-name> to launch.">;
+}
+
+let Command = "process continue" in {
+ def process_continue_ignore_count : Option<"ignore-count", "i">,
+ Arg<"UnsignedInteger">, Desc<"Ignore <N> crossings of the breakpoint (if it"
+ " exists) for the currently selected thread.">;
+}
+
+let Command = "process detach" in {
+ def process_detach_keep_stopped : Option<"keep-stopped", "s">, Group<1>,
+ Arg<"Boolean">, Desc<"Whether or not the process should be kept stopped on"
+ " detach (if possible).">;
+}
+
+let Command = "process connect" in {
+ def process_connect_plugin : Option<"plugin", "p">, Arg<"Plugin">,
+ Desc<"Name of the process plugin you want to use.">;
+}
+
+let Command = "process load" in {
+ def process_load_install : Option<"install", "i">, OptionalArg<"Path">,
+ Desc<"Install the shared library to the target. If specified without an "
+ "argument then the library will installed in the current working "
+ "directory.">;
+}
+
+let Command = "process handle" in {
+ def process_handle_stop : Option<"stop", "s">, Group<1>, Arg<"Boolean">,
+ Desc<"Whether or not the process should be stopped if the signal is "
+ "received.">;
+ def process_handle_notify : Option<"notify", "n">, Group<1>, Arg<"Boolean">,
+ Desc<"Whether or not the debugger should notify the user if the signal is "
+ "received.">;
+ def process_handle_pass : Option<"pass", "p">, Group<1>, Arg<"Boolean">,
+ Desc<"Whether or not the signal should be passed to the process.">;
+}
+
let Command = "script import" in {
def script_import_allow_reload : Option<"allow-reload", "r">, Group<1>,
Desc<"Allow the script to be loaded even if it was already loaded before. "
More information about the lldb-commits
mailing list