147 _(
"-flag %d -xx1 %d -xx2 %d -bool %d "
148 "-enum %s -uint %s -zuint-unl %s -string '%s' -- %s\n"),
173 N_(
"A flag option."),
181 N_(
"A flag option."),
186 N_(
"A flag option."),
194 N_(
"A boolean option."),
203 N_(
"An enum option."),
211 N_(
"A uinteger option."),
213 N_(
"A help doc that spawns\nmultiple lines."),
218 "zuinteger-unlimited",
221 N_(
"A zuinteger-unlimited option."),
231 N_(
"A string option."),
262 args = skip_spaces (args);
297 opts.dump (&stream, text);
303 = string_printf (
"0 %s\n", text);
322 (tracker, &text, mode,
327 catch (
const gdb_exception_error &ex)
373 const char *text,
const char *word)
385 const char *text,
const char *word)
397 const char *text,
const char *word)
415Generic command for testing the options infrastructure."),
421 static const std::string help_require_delim_str
423Command used for testing options processing.\n\
424Usage: maint test-options require-delimiter [[OPTION]... --] [OPERAND]...\n\
429If you specify any command option, you must use a double dash (\"--\")\n\
430to mark the end of option processing."),
433 static const std::string help_unknown_is_error_str
435Command used for testing options processing.\n\
436Usage: maint test-options unknown-is-error [OPTION]... [OPERAND]...\n\
442 static const std::string help_unknown_is_operand_str
444Command used for testing options processing.\n\
445Usage: maint test-options unknown-is-operand [OPTION]... [OPERAND]...\n\
453 help_require_delim_str.c_str (),
460 help_unknown_is_error_str.c_str (),
467 help_unknown_is_operand_str.c_str (),
475Show maintenance test-options completion result.\n\
476Shows the results of completing\n\
477\"maint test-options require-delimiter\",\n\
478\"maint test-options unknown-is-error\", or\n\
479\"maint test-options unknown-is-operand\"."),
virtual void puts(const char *str)
struct cmd_list_element * maintenancelist
struct cmd_list_element * maintenance_show_cmdlist
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)
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)
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)