diff options
author | Jonas Devlieghere <jonas@devlieghere.com> | 2022-07-13 20:11:37 -0700 |
---|---|---|
committer | Jonas Devlieghere <jonas@devlieghere.com> | 2022-07-14 21:18:07 -0700 |
commit | 7ced9fff95473c1794b51a3cfd099b4fea3d1a58 (patch) | |
tree | 327c5419e195d917e3a127edc8f5d0c725455fd3 /lldb/source/Commands/CommandObjectProcess.cpp | |
parent | 888673b6e3bf0182fb5f154eb3231c9ae022acca (diff) | |
download | llvm-7ced9fff95473c1794b51a3cfd099b4fea3d1a58.zip llvm-7ced9fff95473c1794b51a3cfd099b4fea3d1a58.tar.gz llvm-7ced9fff95473c1794b51a3cfd099b4fea3d1a58.tar.bz2 |
[lldb] Refactor command option enum values (NFC)
Refactor the command option enum values and the command argument table
to connect the two. This has two benefits:
- We guarantee that two options that use the same argument type have
the same accepted values.
- We can print the enum values and their description in the help
output. (D129707)
Differential revision: https://reviews.llvm.org/D129703
Diffstat (limited to 'lldb/source/Commands/CommandObjectProcess.cpp')
-rw-r--r-- | lldb/source/Commands/CommandObjectProcess.cpp | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/lldb/source/Commands/CommandObjectProcess.cpp b/lldb/source/Commands/CommandObjectProcess.cpp index d36a574..28a99ea3 100644 --- a/lldb/source/Commands/CommandObjectProcess.cpp +++ b/lldb/source/Commands/CommandObjectProcess.cpp @@ -7,8 +7,8 @@ //===----------------------------------------------------------------------===// #include "CommandObjectProcess.h" -#include "CommandObjectTrace.h" #include "CommandObjectBreakpoint.h" +#include "CommandObjectTrace.h" #include "CommandOptionsProcessLaunch.h" #include "lldb/Breakpoint/Breakpoint.h" #include "lldb/Breakpoint/BreakpointIDList.h" @@ -19,6 +19,7 @@ #include "lldb/Core/PluginManager.h" #include "lldb/Host/OptionParser.h" #include "lldb/Interpreter/CommandInterpreter.h" +#include "lldb/Interpreter/CommandOptionArgumentTable.h" #include "lldb/Interpreter/CommandReturnObject.h" #include "lldb/Interpreter/OptionArgParser.h" #include "lldb/Interpreter/OptionGroupPythonClassWithDict.h" @@ -1332,20 +1333,6 @@ protected: } }; -// CommandObjectProcessSaveCore -#pragma mark CommandObjectProcessSaveCore - -static constexpr OptionEnumValueElement g_corefile_save_style[] = { - {eSaveCoreFull, "full", "Create a core file with all memory saved"}, - {eSaveCoreDirtyOnly, "modified-memory", - "Create a corefile with only modified memory saved"}, - {eSaveCoreStackOnly, "stack", - "Create a corefile with only stack memory saved"}}; - -static constexpr OptionEnumValues SaveCoreStyles() { - return OptionEnumValues(g_corefile_save_style); -} - #define LLDB_OPTIONS_process_save_core #include "CommandOptions.inc" |