// Modifiable Breakpoint Options
#pragma mark Modify::CommandOptions
-static constexpr OptionDefinition g_breakpoint_modify_options[] = {
#define LLDB_OPTIONS_breakpoint_modify
#include "CommandOptions.inc"
-};
+
class lldb_private::BreakpointOptionGroup : public OptionGroup
{
public:
BreakpointOptions m_bp_opts;
};
-static constexpr OptionDefinition g_breakpoint_dummy_options[] = {
+
#define LLDB_OPTIONS_breakpoint_dummy
#include "CommandOptions.inc"
-};
class BreakpointDummyOptionGroup : public OptionGroup
{
};
-static constexpr OptionDefinition g_breakpoint_set_options[] = {
#define LLDB_OPTIONS_breakpoint_set
#include "CommandOptions.inc"
-};
// CommandObjectBreakpointSet
// CommandObjectBreakpointList
#pragma mark List::CommandOptions
-static constexpr OptionDefinition g_breakpoint_list_options[] = {
#define LLDB_OPTIONS_breakpoint_list
#include "CommandOptions.inc"
-};
#pragma mark List
// CommandObjectBreakpointClear
#pragma mark Clear::CommandOptions
-static constexpr OptionDefinition g_breakpoint_clear_options[] = {
#define LLDB_OPTIONS_breakpoint_clear
#include "CommandOptions.inc"
-};
#pragma mark Clear
};
// CommandObjectBreakpointDelete
-static constexpr OptionDefinition g_breakpoint_delete_options[] = {
#define LLDB_OPTIONS_breakpoint_delete
#include "CommandOptions.inc"
-};
#pragma mark Delete
};
// CommandObjectBreakpointName
-
-static constexpr OptionDefinition g_breakpoint_name_options[] = {
#define LLDB_OPTIONS_breakpoint_name
#include "CommandOptions.inc"
-};
+
class BreakpointNameOptionGroup : public OptionGroup {
public:
BreakpointNameOptionGroup()
OptionValueString m_help_string;
};
-static constexpr OptionDefinition g_breakpoint_access_options[] = {
#define LLDB_OPTIONS_breakpoint_access
#include "CommandOptions.inc"
-};
class BreakpointAccessOptionGroup : public OptionGroup {
public:
// CommandObjectBreakpointRead
#pragma mark Read::CommandOptions
-static constexpr OptionDefinition g_breakpoint_read_options[] = {
#define LLDB_OPTIONS_breakpoint_read
#include "CommandOptions.inc"
-};
#pragma mark Read
// CommandObjectBreakpointWrite
#pragma mark Write::CommandOptions
-static constexpr OptionDefinition g_breakpoint_write_options[] = {
#define LLDB_OPTIONS_breakpoint_write
#include "CommandOptions.inc"
-};
#pragma mark Write
class CommandObjectBreakpointWrite : public CommandObjectParsed {
return OptionEnumValues(g_script_option_enumeration);
}
-static constexpr OptionDefinition g_breakpoint_add_options[] = {
#define LLDB_OPTIONS_breakpoint_command_add
#include "CommandOptions.inc"
-};
class CommandObjectBreakpointCommandAdd : public CommandObjectParsed,
public IOHandlerDelegateMultiline {
case 's':
m_script_language = (lldb::ScriptLanguage)OptionArgParser::ToOptionEnum(
- option_arg, g_breakpoint_add_options[option_idx].enum_values,
+ option_arg,
+ g_breakpoint_command_add_options[option_idx].enum_values,
eScriptLanguageNone, error);
if (m_script_language == eScriptLanguagePython ||
}
llvm::ArrayRef<OptionDefinition> GetDefinitions() override {
- return llvm::makeArrayRef(g_breakpoint_add_options);
+ return llvm::makeArrayRef(g_breakpoint_command_add_options);
}
// Instance variables to hold the values for command options.
// CommandObjectBreakpointCommandDelete
-static constexpr OptionDefinition g_breakpoint_delete_options[] = {
#define LLDB_OPTIONS_breakpoint_command_delete
#include "CommandOptions.inc"
-};
class CommandObjectBreakpointCommandDelete : public CommandObjectParsed {
public:
}
llvm::ArrayRef<OptionDefinition> GetDefinitions() override {
- return llvm::makeArrayRef(g_breakpoint_delete_options);
+ return llvm::makeArrayRef(g_breakpoint_command_delete_options);
}
// Instance variables to hold the values for command options.
// CommandObjectCommandsSource
-static constexpr OptionDefinition g_history_options[] = {
#define LLDB_OPTIONS_history
#include "CommandOptions.inc"
-};
class CommandObjectCommandsHistory : public CommandObjectParsed {
public:
// CommandObjectCommandsSource
-static constexpr OptionDefinition g_source_options[] = {
#define LLDB_OPTIONS_source
#include "CommandOptions.inc"
-};
class CommandObjectCommandsSource : public CommandObjectParsed {
public:
#pragma mark CommandObjectCommandsAlias
// CommandObjectCommandsAlias
-static constexpr OptionDefinition g_alias_options[] = {
#define LLDB_OPTIONS_alias
#include "CommandOptions.inc"
-};
static const char *g_python_command_instructions =
"Enter your Python command(s). Type 'DONE' to end.\n"
// CommandObjectCommandsAddRegex
-static constexpr OptionDefinition g_regex_options[] = {
#define LLDB_OPTIONS_regex
#include "CommandOptions.inc"
-};
#pragma mark CommandObjectCommandsAddRegex
};
// CommandObjectCommandsScriptImport
-
-static constexpr OptionDefinition g_script_import_options[] = {
#define LLDB_OPTIONS_script_import
#include "CommandOptions.inc"
-};
class CommandObjectCommandsScriptImport : public CommandObjectParsed {
public:
return OptionEnumValues(g_script_synchro_type);
}
-static constexpr OptionDefinition g_script_add_options[] = {
#define LLDB_OPTIONS_script_add
#include "CommandOptions.inc"
-};
class CommandObjectCommandsScriptAdd : public CommandObjectParsed,
public IOHandlerDelegateMultiline {
using namespace lldb;
using namespace lldb_private;
-static constexpr OptionDefinition g_disassemble_options[] = {
#define LLDB_OPTIONS_disassemble
#include "CommandOptions.inc"
-};
CommandObjectDisassemble::CommandOptions::CommandOptions()
: Options(), num_lines_context(0), num_instructions(0), func_name(),
return OptionEnumValues(g_description_verbosity_type);
}
-static constexpr OptionDefinition g_expression_options[] = {
#define LLDB_OPTIONS_expression
#include "CommandOptions.inc"
-};
Status CommandObjectExpression::CommandOptions::SetOptionValue(
uint32_t option_idx, llvm::StringRef option_arg,
// CommandObjectFrameDiagnose
-static constexpr OptionDefinition g_frame_diag_options[] = {
#define LLDB_OPTIONS_frame_diag
#include "CommandOptions.inc"
-};
class CommandObjectFrameDiagnose : public CommandObjectParsed {
public:
// CommandObjectFrameSelect
-static OptionDefinition g_frame_select_options[] = {
#define LLDB_OPTIONS_frame_select
#include "CommandOptions.inc"
-};
class CommandObjectFrameSelect : public CommandObjectParsed {
public:
#pragma mark CommandObjectFrameRecognizer
-static OptionDefinition g_frame_recognizer_add_options[] = {
#define LLDB_OPTIONS_frame_recognizer_add
#include "CommandOptions.inc"
-};
class CommandObjectFrameRecognizerAdd : public CommandObjectParsed {
private:
CommandObjectHelp::~CommandObjectHelp() = default;
-static constexpr OptionDefinition g_help_options[] = {
#define LLDB_OPTIONS_help
#include "CommandOptions.inc"
-};
llvm::ArrayRef<OptionDefinition>
CommandObjectHelp::CommandOptions::GetDefinitions() {
using namespace lldb;
using namespace lldb_private;
-static constexpr OptionDefinition g_log_options[] = {
#define LLDB_OPTIONS_log
#include "CommandOptions.inc"
-};
class CommandObjectLogEnable : public CommandObjectParsed {
public:
using namespace lldb;
using namespace lldb_private;
-static constexpr OptionDefinition g_read_memory_options[] = {
#define LLDB_OPTIONS_memory_read
#include "CommandOptions.inc"
-};
class OptionGroupReadMemory : public OptionGroup {
public:
~OptionGroupReadMemory() override = default;
llvm::ArrayRef<OptionDefinition> GetDefinitions() override {
- return llvm::makeArrayRef(g_read_memory_options);
+ return llvm::makeArrayRef(g_memory_read_options);
}
Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_value,
ExecutionContext *execution_context) override {
Status error;
- const int short_option = g_read_memory_options[option_idx].short_option;
+ const int short_option = g_memory_read_options[option_idx].short_option;
switch (short_option) {
case 'l':
CompilerType m_prev_compiler_type;
};
-static constexpr OptionDefinition g_memory_find_option_table[] = {
#define LLDB_OPTIONS_memory_find
#include "CommandOptions.inc"
-};
// Find the specified data in memory
class CommandObjectMemoryFind : public CommandObjectParsed {
~OptionGroupFindMemory() override = default;
llvm::ArrayRef<OptionDefinition> GetDefinitions() override {
- return llvm::makeArrayRef(g_memory_find_option_table);
+ return llvm::makeArrayRef(g_memory_find_options);
}
Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_value,
ExecutionContext *execution_context) override {
Status error;
- const int short_option =
- g_memory_find_option_table[option_idx].short_option;
+ const int short_option = g_memory_find_options[option_idx].short_option;
switch (short_option) {
case 'e':
OptionGroupFindMemory m_memory_options;
};
-static constexpr OptionDefinition g_memory_write_option_table[] = {
#define LLDB_OPTIONS_memory_write
#include "CommandOptions.inc"
-};
// Write memory to the inferior process
class CommandObjectMemoryWrite : public CommandObjectParsed {
~OptionGroupWriteMemory() override = default;
llvm::ArrayRef<OptionDefinition> GetDefinitions() override {
- return llvm::makeArrayRef(g_memory_write_option_table);
+ return llvm::makeArrayRef(g_memory_write_options);
}
Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_value,
ExecutionContext *execution_context) override {
Status error;
- const int short_option =
- g_memory_write_option_table[option_idx].short_option;
+ const int short_option = g_memory_write_options[option_idx].short_option;
switch (short_option) {
case 'i':
return user | group | world;
}
-static constexpr OptionDefinition g_permissions_options[] = {
#define LLDB_OPTIONS_permissions
#include "CommandOptions.inc"
-};
class OptionPermissions : public OptionGroup {
public:
// "platform fread"
-static constexpr OptionDefinition g_platform_fread_options[] = {
#define LLDB_OPTIONS_platform_fread
#include "CommandOptions.inc"
-};
class CommandObjectPlatformFRead : public CommandObjectParsed {
public:
// "platform fwrite"
-static constexpr OptionDefinition g_platform_fwrite_options[] = {
#define LLDB_OPTIONS_platform_fwrite
#include "CommandOptions.inc"
-};
class CommandObjectPlatformFWrite : public CommandObjectParsed {
public:
// "platform process list"
static PosixPlatformCommandOptionValidator posix_validator;
-static constexpr OptionDefinition g_platform_process_list_options[] = {
#define LLDB_OPTIONS_platform_process_list
#include "CommandOptions.inc"
-};
class CommandObjectPlatformProcessList : public CommandObjectParsed {
public:
}
};
-static constexpr OptionDefinition g_platform_process_attach_options[] = {
#define LLDB_OPTIONS_platform_process_attach
#include "CommandOptions.inc"
-};
class CommandObjectPlatformProcessAttach : public CommandObjectParsed {
public:
};
// "platform shell"
-static constexpr OptionDefinition g_platform_shell_options[] = {
#define LLDB_OPTIONS_platform_shell
#include "CommandOptions.inc"
-};
class CommandObjectPlatformShell : public CommandObjectRaw {
public:
ProcessLaunchCommandOptions m_options;
};
-static constexpr OptionDefinition g_process_attach_options[] = {
#define LLDB_OPTIONS_process_attach
#include "CommandOptions.inc"
-};
#pragma mark CommandObjectProcessAttach
class CommandObjectProcessAttach : public CommandObjectProcessLaunchOrAttach {
// CommandObjectProcessContinue
-static constexpr OptionDefinition g_process_continue_options[] = {
#define LLDB_OPTIONS_process_continue
#include "CommandOptions.inc"
-};
#pragma mark CommandObjectProcessContinue
};
// CommandObjectProcessDetach
-static constexpr OptionDefinition g_process_detach_options[] = {
#define LLDB_OPTIONS_process_detach
#include "CommandOptions.inc"
-};
#pragma mark CommandObjectProcessDetach
};
// CommandObjectProcessConnect
-
-static constexpr OptionDefinition g_process_connect_options[] = {
#define LLDB_OPTIONS_process_connect
#include "CommandOptions.inc"
-};
#pragma mark CommandObjectProcessConnect
};
// CommandObjectProcessLoad
-
-static constexpr OptionDefinition g_process_load_options[] = {
#define LLDB_OPTIONS_process_load
#include "CommandOptions.inc"
-};
#pragma mark CommandObjectProcessLoad
};
// CommandObjectProcessHandle
-
-static constexpr OptionDefinition g_process_handle_options[] = {
#define LLDB_OPTIONS_process_handle
#include "CommandOptions.inc"
-};
#pragma mark CommandObjectProcessHandle
using namespace lldb_private;
// "register read"
-
-static constexpr OptionDefinition g_register_read_options[] = {
#define LLDB_OPTIONS_register_read
#include "CommandOptions.inc"
-};
class CommandObjectRegisterRead : public CommandObjectParsed {
public:
using namespace lldb_private;
// CommandObjectSettingsSet
-
-static constexpr OptionDefinition g_settings_set_options[] = {
#define LLDB_OPTIONS_settings_set
#include "CommandOptions.inc"
-};
class CommandObjectSettingsSet : public CommandObjectRaw {
public:
};
// CommandObjectSettingsWrite -- Write settings to file
-
-static constexpr OptionDefinition g_settings_write_options[] = {
#define LLDB_OPTIONS_settings_write
#include "CommandOptions.inc"
-};
class CommandObjectSettingsWrite : public CommandObjectParsed {
public:
};
// CommandObjectSettingsRead -- Read settings from file
-
-static constexpr OptionDefinition g_settings_read_options[] = {
#define LLDB_OPTIONS_settings_read
#include "CommandOptions.inc"
-};
class CommandObjectSettingsRead : public CommandObjectParsed {
public:
#pragma mark CommandObjectSourceInfo
// CommandObjectSourceInfo - debug line entries dumping command
-
-static constexpr OptionDefinition g_source_info_options[] = {
#define LLDB_OPTIONS_source_info
#include "CommandOptions.inc"
-};
class CommandObjectSourceInfo : public CommandObjectParsed {
class CommandOptions : public Options {
#pragma mark CommandObjectSourceList
// CommandObjectSourceList
-
-static constexpr OptionDefinition g_source_list_options[] = {
#define LLDB_OPTIONS_source_list
#include "CommandOptions.inc"
-};
class CommandObjectSourceList : public CommandObjectParsed {
class CommandOptions : public Options {
{eLoadDependentsYes, "false",
"Load dependents, even if the target is not an executable."}};
-static constexpr OptionDefinition g_dependents_options[] = {
#define LLDB_OPTIONS_target_dependents
#include "CommandOptions.inc"
-};
class OptionGroupDependents : public OptionGroup {
public:
~OptionGroupDependents() override {}
llvm::ArrayRef<OptionDefinition> GetDefinitions() override {
- return llvm::makeArrayRef(g_dependents_options);
+ return llvm::makeArrayRef(g_target_dependents_options);
}
Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_value,
return error;
}
- const char short_option = g_dependents_options[option_idx].short_option;
+ const char short_option =
+ g_target_dependents_options[option_idx].short_option;
if (short_option == 'd') {
LoadDependentFiles tmp_load_dependents;
tmp_load_dependents = (LoadDependentFiles)OptionArgParser::ToOptionEnum(
- option_value, g_dependents_options[option_idx].enum_values, 0, error);
+ option_value, g_target_dependents_options[option_idx].enum_values, 0,
+ error);
if (error.Success())
m_load_dependent_files = tmp_load_dependents;
} else {
{eSortOrderByAddress, "address", "Sort output by symbol address."},
{eSortOrderByName, "name", "Sort output by symbol name."} };
-static constexpr OptionDefinition g_target_modules_dump_symtab_options[] = {
#define LLDB_OPTIONS_target_modules_dump_symtab
#include "CommandOptions.inc"
-};
class CommandObjectTargetModulesDumpSymtab
: public CommandObjectTargetModulesModuleAutoComplete {
};
#pragma mark CommandObjectTargetModulesDumpLineTable
+#define LLDB_OPTIONS_target_modules_dump
+#include "CommandOptions.inc"
// Image debug line table dumping command
}
llvm::ArrayRef<OptionDefinition> GetDefinitions() override {
- static constexpr OptionDefinition g_options[] = {
-#define LLDB_OPTIONS_target_modules_dump
-#include "CommandOptions.inc"
- };
- return llvm::makeArrayRef(g_options);
+ return llvm::makeArrayRef(g_target_modules_dump_options);
}
bool m_verbose;
};
// List images with associated information
-
-static constexpr OptionDefinition g_target_modules_list_options[] = {
#define LLDB_OPTIONS_target_modules_list
#include "CommandOptions.inc"
-};
class CommandObjectTargetModulesList : public CommandObjectParsed {
public:
#pragma mark CommandObjectTargetModulesShowUnwind
// Lookup unwind information in images
-
-static constexpr OptionDefinition g_target_modules_show_unwind_options[] = {
#define LLDB_OPTIONS_target_modules_show_unwind
#include "CommandOptions.inc"
-};
class CommandObjectTargetModulesShowUnwind : public CommandObjectParsed {
public:
};
// Lookup information in images
-
-static constexpr OptionDefinition g_target_modules_lookup_options[] = {
#define LLDB_OPTIONS_target_modules_lookup
#include "CommandOptions.inc"
-};
class CommandObjectTargetModulesLookup : public CommandObjectParsed {
public:
#pragma mark CommandObjectTargetStopHookAdd
// CommandObjectTargetStopHookAdd
-
-static constexpr OptionDefinition g_target_stop_hook_add_options[] = {
#define LLDB_OPTIONS_target_stop_hook_add
#include "CommandOptions.inc"
-};
class CommandObjectTargetStopHookAdd : public CommandObjectParsed,
public IOHandlerDelegateMultiline {
};
// CommandObjectThreadBacktrace
-
-static constexpr OptionDefinition g_thread_backtrace_options[] = {
#define LLDB_OPTIONS_thread_backtrace
#include "CommandOptions.inc"
-};
class CommandObjectThreadBacktrace : public CommandObjectIterateOverThreads {
public:
return OptionEnumValues(g_tri_running_mode);
}
-static constexpr OptionDefinition g_thread_step_scope_options[] = {
#define LLDB_OPTIONS_thread_step_scope
#include "CommandOptions.inc"
-};
class CommandObjectThreadStepWithTypeAndScope : public CommandObjectParsed {
public:
return OptionEnumValues(g_duo_running_mode);
}
-static constexpr OptionDefinition g_thread_until_options[] = {
#define LLDB_OPTIONS_thread_until
#include "CommandOptions.inc"
-};
class CommandObjectThreadUntil : public CommandObjectParsed {
public:
};
// CommandObjectThreadInfo
-
-static constexpr OptionDefinition g_thread_info_options[] = {
#define LLDB_OPTIONS_thread_info
#include "CommandOptions.inc"
-};
class CommandObjectThreadInfo : public CommandObjectIterateOverThreads {
public:
};
// CommandObjectThreadReturn
-
-static constexpr OptionDefinition g_thread_return_options[] = {
#define LLDB_OPTIONS_thread_return
#include "CommandOptions.inc"
-};
class CommandObjectThreadReturn : public CommandObjectRaw {
public:
};
// CommandObjectThreadJump
-
-static constexpr OptionDefinition g_thread_jump_options[] = {
#define LLDB_OPTIONS_thread_jump
#include "CommandOptions.inc"
-};
class CommandObjectThreadJump : public CommandObjectParsed {
public:
// Next are the subcommands of CommandObjectMultiwordThreadPlan
// CommandObjectThreadPlanList
-
-static constexpr OptionDefinition g_thread_plan_list_options[] = {
#define LLDB_OPTIONS_thread_plan_list
#include "CommandOptions.inc"
-};
class CommandObjectThreadPlanList : public CommandObjectIterateOverThreads {
public:
return false;
}
-static constexpr OptionDefinition g_type_summary_add_options[] = {
#define LLDB_OPTIONS_type_summary_add
#include "CommandOptions.inc"
-};
class CommandObjectTypeSummaryAdd : public CommandObjectParsed,
public IOHandlerDelegateMultiline {
" '''Optional'''\n"
"class synthProvider:\n";
-static constexpr OptionDefinition g_type_synth_add_options[] = {
#define LLDB_OPTIONS_type_synth_add
#include "CommandOptions.inc"
-};
class CommandObjectTypeSynthAdd : public CommandObjectParsed,
public IOHandlerDelegateMultiline {
// CommandObjectTypeFormatAdd
-static constexpr OptionDefinition g_type_format_add_options[] = {
#define LLDB_OPTIONS_type_format_add
#include "CommandOptions.inc"
-};
class CommandObjectTypeFormatAdd : public CommandObjectParsed {
private:
}
};
-static constexpr OptionDefinition g_type_formatter_delete_options[] = {
#define LLDB_OPTIONS_type_formatter_delete
#include "CommandOptions.inc"
-};
class CommandObjectTypeFormatterDelete : public CommandObjectParsed {
protected:
}
};
-static constexpr OptionDefinition g_type_formatter_clear_options[] = {
#define LLDB_OPTIONS_type_formatter_clear
#include "CommandOptions.inc"
-};
class CommandObjectTypeFormatterClear : public CommandObjectParsed {
private:
"type format clear", "Delete all existing format styles.") {}
};
-
-static constexpr OptionDefinition g_type_formatter_list_options[] = {
#define LLDB_OPTIONS_type_formatter_list
#include "CommandOptions.inc"
-};
template <typename FormatterType>
class CommandObjectTypeFormatterList : public CommandObjectParsed {
};
// CommandObjectTypeCategoryDefine
-
-static constexpr OptionDefinition g_type_category_define_options[] = {
#define LLDB_OPTIONS_type_category_define
#include "CommandOptions.inc"
-};
class CommandObjectTypeCategoryDefine : public CommandObjectParsed {
class CommandOptions : public Options {
};
// CommandObjectTypeCategoryEnable
-
-static constexpr OptionDefinition g_type_category_enable_options[] = {
#define LLDB_OPTIONS_type_category_enable
#include "CommandOptions.inc"
-};
class CommandObjectTypeCategoryEnable : public CommandObjectParsed {
class CommandOptions : public Options {
};
// CommandObjectTypeCategoryDisable
-
-OptionDefinition constexpr g_type_category_disable_options[] = {
#define LLDB_OPTIONS_type_category_disable
#include "CommandOptions.inc"
-};
class CommandObjectTypeCategoryDisable : public CommandObjectParsed {
class CommandOptions : public Options {
}
#endif // LLDB_DISABLE_PYTHON
-
-static constexpr OptionDefinition g_type_filter_add_options[] = {
#define LLDB_OPTIONS_type_filter_add
#include "CommandOptions.inc"
-};
class CommandObjectTypeFilterAdd : public CommandObjectParsed {
private:
};
// "type lookup"
-static constexpr OptionDefinition g_type_lookup_options[] = {
#define LLDB_OPTIONS_type_lookup
#include "CommandOptions.inc"
-};
class CommandObjectTypeLookup : public CommandObjectRaw {
protected:
// CommandObjectWatchpointList::Options
#pragma mark List::CommandOptions
-
-static constexpr OptionDefinition g_watchpoint_list_options[] = {
#define LLDB_OPTIONS_watchpoint_list
#include "CommandOptions.inc"
-};
#pragma mark List
// CommandObjectWatchpointIgnore
#pragma mark Ignore::CommandOptions
-static constexpr OptionDefinition g_watchpoint_ignore_options[] = {
#define LLDB_OPTIONS_watchpoint_ignore
#include "CommandOptions.inc"
-};
class CommandObjectWatchpointIgnore : public CommandObjectParsed {
public:
// CommandObjectWatchpointModify
#pragma mark Modify::CommandOptions
-
-static constexpr OptionDefinition g_watchpoint_modify_options[] = {
#define LLDB_OPTIONS_watchpoint_modify
#include "CommandOptions.inc"
-};
#pragma mark Modify
return OptionEnumValues(g_script_option_enumeration);
}
-static constexpr OptionDefinition g_watchpoint_command_add_options[] = {
#define LLDB_OPTIONS_watchpoint_command_add
#include "CommandOptions.inc"
-};
class CommandObjectWatchpointCommandAdd : public CommandObjectParsed,
public IOHandlerDelegateMultiline {
/// Emits all option initializers to the raw_ostream.
static void emitOptions(std::string Command, std::vector<Record *> Option,
raw_ostream &OS) {
+ std::string ID = Command;
+ std::replace(ID.begin(), ID.end(), ' ', '_');
// Generate the macro that the user needs to define before including the
// *.inc file.
- std::string NeededMacro = "LLDB_OPTIONS_" + Command;
- std::replace(NeededMacro.begin(), NeededMacro.end(), ' ', '_');
+ std::string NeededMacro = "LLDB_OPTIONS_" + ID;
// All options are in one file, so we need put them behind macros and ask the
// user to define the macro for the options that are needed.
OS << "// Options for " << Command << "\n";
OS << "#ifdef " << NeededMacro << "\n";
+ OS << "constexpr static OptionDefinition g_" + ID + "_options[] = {\n";
for (Record *R : Option)
emitOption(R, OS);
// We undefine the macro for the user like Clang's include files are doing it.
+ OS << "};\n";
OS << "#undef " << NeededMacro << "\n";
OS << "#endif // " << Command << " command\n\n";
}