149 _(
"-flag %d -xx1 %d -xx2 %d -bool %d "
150 "-enum %s -uint-unl %s -pint-unl %s -string '%s' -- %s\n"),
175 N_(
"A flag option."),
183 N_(
"A flag option."),
188 N_(
"A flag option."),
196 N_(
"A boolean option."),
205 N_(
"An enum option."),
210 "uinteger-unlimited",
214 N_(
"A uinteger option."),
216 N_(
"A help doc that spawns\nmultiple lines."),
221 "pinteger-unlimited",
225 N_(
"A pinteger-unlimited option."),
235 N_(
"A string option."),
266 args = skip_spaces (args);
301 opts.dump (&stream, text);
307 = string_printf (
"0 %s\n", text);
326 (tracker, &text, mode,
331 catch (
const gdb_exception_error &ex)
377 const char *text,
const char *word)
389 const char *text,
const char *word)
401 const char *text,
const char *word)
419Generic command for testing the options infrastructure."),
425 static const std::string help_require_delim_str
427Command used for testing options processing.\n\
428Usage: maint test-options require-delimiter [[OPTION]... --] [OPERAND]...\n\
433If you specify any command option, you must use a double dash (\"--\")\n\
434to mark the end of option processing."),
437 static const std::string help_unknown_is_error_str
439Command used for testing options processing.\n\
440Usage: maint test-options unknown-is-error [OPTION]... [OPERAND]...\n\
446 static const std::string help_unknown_is_operand_str
448Command used for testing options processing.\n\
449Usage: maint test-options unknown-is-operand [OPTION]... [OPERAND]...\n\
457 help_require_delim_str.c_str (),
464 help_unknown_is_error_str.c_str (),
471 help_unknown_is_operand_str.c_str (),
479Show maintenance test-options completion result.\n\
480Shows the results of completing\n\
481\"maint test-options require-delimiter\",\n\
482\"maint test-options unknown-is-error\", or\n\
483\"maint test-options unknown-is-operand\"."),
virtual void puts(const char *str)
struct cmd_list_element * maintenancelist
struct cmd_list_element * maintenance_show_cmdlist
const literal_def pinteger_unlimited_literals[]
struct cmd_list_element * add_cmd(const char *name, enum command_class theclass, const char *doc, struct cmd_list_element **list)
void set_cmd_completer_handle_brkchars(struct cmd_list_element *cmd, completer_handle_brkchars_ftype *func)
const literal_def uinteger_unlimited_literals[]
struct cmd_list_element * add_basic_prefix_cmd(const char *name, enum command_class theclass, const char *doc, struct cmd_list_element **subcommands, int allow_unknown, struct cmd_list_element **list)
static void maintenance_test_options_unknown_is_operand_command_completer(cmd_list_element *ignore, completion_tracker &tracker, const char *text, const char *word)
static void maintenance_test_options_unknown_is_error_command(const char *args, int from_tty)
static void maintenance_test_options_completer_mode(completion_tracker &tracker, const char *text, gdb::option::process_options_mode mode)
const char test_options_enum_values_xxx[]
static const gdb::option::option_def test_options_option_defs[]
static void maintenance_test_options_unknown_is_error_command_completer(cmd_list_element *ignore, completion_tracker &tracker, const char *text, const char *word)
static gdb::option::option_def_group make_test_options_options_def_group(test_options_opts *opts)
static void save_completion_result(const test_options_opts &opts, bool res, const char *text)
void _initialize_maint_test_options()
static void maintenance_test_options_require_delimiter_command_completer(cmd_list_element *ignore, completion_tracker &tracker, const char *text, const char *word)
static void maintenance_test_options_unknown_is_operand_command(const char *args, int from_tty)
static void maintenance_test_options_require_delimiter_command(const char *args, int from_tty)
static const char *const test_options_enum_values_choices[]
const char test_options_enum_values_yyy[]
static void maintenance_test_options_command_mode(const char *args, gdb::option::process_options_mode mode)
static std::string maintenance_test_options_command_completion_text
const char test_options_enum_values_zzz[]
static cmd_list_element * maintenance_test_options_list
static void maintenance_show_test_options_completion_result(const char *args, int from_tty)
bool process_options(const char **args, process_options_mode mode, gdb::array_view< const option_def_group > options_group)
@ PROCESS_OPTIONS_REQUIRE_DELIMITER
@ PROCESS_OPTIONS_UNKNOWN_IS_ERROR
@ PROCESS_OPTIONS_UNKNOWN_IS_OPERAND
std::string build_help(const char *help_tmpl, gdb::array_view< const option_def_group > options_group)
bool complete_options(completion_tracker &tracker, const char **args, process_options_mode mode, gdb::array_view< const option_def_group > options_group)
DISABLE_COPY_AND_ASSIGN(test_options_opts)
unsigned int uint_unl_opt
test_options_opts()=default
void dump(ui_file *file, const char *args) const
void gdb_printf(struct ui_file *stream, const char *format,...)
void gdb_puts(const char *linebuffer, struct ui_file *stream)