* [PATCH] Disambiguate info_print_options @ 2020-01-25 7:38 Ali Tamur via gdb-patches 2020-01-26 16:15 ` Tom Tromey 0 siblings, 1 reply; 6+ messages in thread From: Ali Tamur via gdb-patches @ 2020-01-25 7:38 UTC (permalink / raw) To: gdb-patches; +Cc: Ali Tamur struct info_print_options is defined in both symtab.c and stack.c, which is an ODR violation. So, I am renaming one of them. (Please suggest a better name, what I picked is not good). gdb/ChangeLog: * symtab.c (info_print_options): Rename to info_print_options_for_symtab. (info_print_options_defs): Apply name change. (make_info_print_options_def_group): Likewise. (info_variables_command): Likewise. (info_functions_command): Likewise. --- gdb/symtab.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/gdb/symtab.c b/gdb/symtab.c index f456f4d852..95c15ac6e0 100644 --- a/gdb/symtab.c +++ b/gdb/symtab.c @@ -4976,13 +4976,13 @@ symtab_symbol_info (bool quiet, bool exclude_minsyms, and 'info functions' commands. These correspond to the -q, -t, and -n options. */ -struct info_print_options +struct info_print_options_for_symtab { bool quiet = false; bool exclude_minsyms = false; char *type_regexp = nullptr; - ~info_print_options () + ~info_print_options_for_symtab () { xfree (type_regexp); } @@ -4992,23 +4992,23 @@ struct info_print_options commands. */ static const gdb::option::option_def info_print_options_defs[] = { - gdb::option::boolean_option_def<info_print_options> { + gdb::option::boolean_option_def<info_print_options_for_symtab> { "q", - [] (info_print_options *opt) { return &opt->quiet; }, + [] (info_print_options_for_symtab *opt) { return &opt->quiet; }, nullptr, /* show_cmd_cb */ nullptr /* set_doc */ }, - gdb::option::boolean_option_def<info_print_options> { + gdb::option::boolean_option_def<info_print_options_for_symtab> { "n", - [] (info_print_options *opt) { return &opt->exclude_minsyms; }, + [] (info_print_options_for_symtab *opt) { return &opt->exclude_minsyms; }, nullptr, /* show_cmd_cb */ nullptr /* set_doc */ }, - gdb::option::string_option_def<info_print_options> { + gdb::option::string_option_def<info_print_options_for_symtab> { "t", - [] (info_print_options *opt) { return &opt->type_regexp; }, + [] (info_print_options_for_symtab *opt) { return &opt->type_regexp; }, nullptr, /* show_cmd_cb */ nullptr /* set_doc */ } @@ -5018,7 +5018,7 @@ static const gdb::option::option_def info_print_options_defs[] = { functions'. */ static gdb::option::option_def_group -make_info_print_options_def_group (info_print_options *opts) +make_info_print_options_def_group (info_print_options_for_symtab *opts) { return {{info_print_options_defs}, opts}; } @@ -5045,7 +5045,7 @@ info_print_command_completer (struct cmd_list_element *ignore, static void info_variables_command (const char *args, int from_tty) { - info_print_options opts; + info_print_options_for_symtab opts; auto grp = make_info_print_options_def_group (&opts); gdb::option::process_options (&args, gdb::option::PROCESS_OPTIONS_UNKNOWN_IS_OPERAND, grp); @@ -5061,7 +5061,7 @@ info_variables_command (const char *args, int from_tty) static void info_functions_command (const char *args, int from_tty) { - info_print_options opts; + info_print_options_for_symtab opts; auto grp = make_info_print_options_def_group (&opts); gdb::option::process_options (&args, gdb::option::PROCESS_OPTIONS_UNKNOWN_IS_OPERAND, grp); -- 2.25.0.341.g760bfbb309-goog ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] Disambiguate info_print_options 2020-01-25 7:38 [PATCH] Disambiguate info_print_options Ali Tamur via gdb-patches @ 2020-01-26 16:15 ` Tom Tromey 2020-01-28 10:14 ` Ali Tamur via gdb-patches 0 siblings, 1 reply; 6+ messages in thread From: Tom Tromey @ 2020-01-26 16:15 UTC (permalink / raw) To: Ali Tamur via gdb-patches; +Cc: Ali Tamur >>>>> "Ali" == Ali Tamur via gdb-patches <gdb-patches@sourceware.org> writes: Ali> struct info_print_options is defined in both symtab.c and stack.c, which is Ali> an ODR violation. So, I am renaming one of them. (Please suggest a better Ali> name, what I picked is not good). Thank you for doing this. I tend to think the naming of these "throwaway" structures isn't very important. That said, the comment just above reads: /* Structure to hold the values of the options used by the 'info variables' and 'info functions' commands. These correspond to the -q, -t, and -n options. */ So how about "info_vars_funcs_options"? Maybe make_info_sources_options_def_group should be renamed as well. And perhaps info_print_command_completer. My thinking here is that it is best if the related names are all consistent. thanks, Tom ^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] Disambiguate info_print_options 2020-01-26 16:15 ` Tom Tromey @ 2020-01-28 10:14 ` Ali Tamur via gdb-patches 2020-02-01 23:22 ` Ali Tamur via gdb-patches 0 siblings, 1 reply; 6+ messages in thread From: Ali Tamur via gdb-patches @ 2020-01-28 10:14 UTC (permalink / raw) To: gdb-patches; +Cc: tom, Ali Tamur > So how about "info_vars_funcs_options"? > > Maybe make_info_sources_options_def_group should be renamed as well. > And perhaps info_print_command_completer. My thinking here is that it > is best if the related names are all consistent. Renamed info_print_options, info_print_options_defs, make_info_print_options_def_group, info_print_command_completer. Did not rename make_info_sources_options_def_group; it seems not directly related? Please take another look, thank you. --- struct info_print_options is defined in both symtab.c and stack.c, which is an ODR violation. So, I am renaming info_print_options and related structs/functions in symtab.c: info_print_options ==> info_vars_funcs_options info_print_options_defs ==> info_vars_funcs_options_defs make_info_print_options_def_group ==> make_info_vars_funcs_options_def_group info_print_command_completer ==> info_vars_funcs_command_completer gdb/ChangeLog: * symtab.c (info_print_options): Rename to info_vars_funcs_options. (info_print_options_defs): Rename to info_vars_funcs_options_defs. (make_info_print_options_def_group): Rename to make_info_vars_funcs_options_def_group. (info_print_command_completer): Rename to info_vars_funcs_command_completer. (info_variables_command): Apply name changes. (info_functions_command): Likewise. (_initialize_symtab): Likewise. --- gdb/symtab.c | 46 ++++++++++++++++++++++++---------------------- 1 file changed, 24 insertions(+), 22 deletions(-) diff --git a/gdb/symtab.c b/gdb/symtab.c index f456f4d852..d99be41261 100644 --- a/gdb/symtab.c +++ b/gdb/symtab.c @@ -4976,13 +4976,13 @@ symtab_symbol_info (bool quiet, bool exclude_minsyms, and 'info functions' commands. These correspond to the -q, -t, and -n options. */ -struct info_print_options +struct info_vars_funcs_options { bool quiet = false; bool exclude_minsyms = false; char *type_regexp = nullptr; - ~info_print_options () + ~info_vars_funcs_options () { xfree (type_regexp); } @@ -4991,24 +4991,25 @@ struct info_print_options /* The options used by the 'info variables' and 'info functions' commands. */ -static const gdb::option::option_def info_print_options_defs[] = { - gdb::option::boolean_option_def<info_print_options> { +static const gdb::option::option_def info_vars_funcs_options_defs[] = { + gdb::option::boolean_option_def<info_vars_funcs_options> { "q", - [] (info_print_options *opt) { return &opt->quiet; }, + [] (info_vars_funcs_options *opt) { return &opt->quiet; }, nullptr, /* show_cmd_cb */ nullptr /* set_doc */ }, - gdb::option::boolean_option_def<info_print_options> { + gdb::option::boolean_option_def<info_vars_funcs_options> { "n", - [] (info_print_options *opt) { return &opt->exclude_minsyms; }, + [] (info_vars_funcs_options *opt) { return &opt->exclude_minsyms; }, nullptr, /* show_cmd_cb */ nullptr /* set_doc */ }, - gdb::option::string_option_def<info_print_options> { + gdb::option::string_option_def<info_vars_funcs_options> { "t", - [] (info_print_options *opt) { return &opt->type_regexp; }, + [] (info_vars_funcs_options *opt) { return &opt->type_regexp; + }, nullptr, /* show_cmd_cb */ nullptr /* set_doc */ } @@ -5018,20 +5019,20 @@ static const gdb::option::option_def info_print_options_defs[] = { functions'. */ static gdb::option::option_def_group -make_info_print_options_def_group (info_print_options *opts) +make_info_vars_funcs_options_def_group (info_vars_funcs_options *opts) { - return {{info_print_options_defs}, opts}; + return {{info_vars_funcs_options_defs}, opts}; } /* Command completer for 'info variables' and 'info functions'. */ static void -info_print_command_completer (struct cmd_list_element *ignore, - completion_tracker &tracker, - const char *text, const char * /* word */) +info_vars_funcs_command_completer (struct cmd_list_element *ignore, + completion_tracker &tracker, + const char *text, const char * /* word */) { const auto group - = make_info_print_options_def_group (nullptr); + = make_info_vars_funcs_options_def_group (nullptr); if (gdb::option::complete_options (tracker, &text, gdb::option::PROCESS_OPTIONS_UNKNOWN_IS_OPERAND, group)) return; @@ -5045,8 +5046,8 @@ info_print_command_completer (struct cmd_list_element *ignore, static void info_variables_command (const char *args, int from_tty) { - info_print_options opts; - auto grp = make_info_print_options_def_group (&opts); + info_vars_funcs_options opts; + auto grp = make_info_vars_funcs_options_def_group (&opts); gdb::option::process_options (&args, gdb::option::PROCESS_OPTIONS_UNKNOWN_IS_OPERAND, grp); if (args != nullptr && *args == '\0') @@ -5061,8 +5062,9 @@ info_variables_command (const char *args, int from_tty) static void info_functions_command (const char *args, int from_tty) { - info_print_options opts; - auto grp = make_info_print_options_def_group (&opts); + info_vars_funcs_options opts; + + auto grp = make_info_vars_funcs_options_def_group (&opts); gdb::option::process_options (&args, gdb::option::PROCESS_OPTIONS_UNKNOWN_IS_OPERAND, grp); if (args != nullptr && *args == '\0') @@ -6709,7 +6711,7 @@ Usage: info variables [-q] [-n] [-t TYPEREGEXP] [NAMEREGEXP]\n\ Prints the global and static variables.\n"), _("global and static variables"), true)); - set_cmd_completer_handle_brkchars (c, info_print_command_completer); + set_cmd_completer_handle_brkchars (c, info_vars_funcs_command_completer); if (dbx_commands) { c = add_com ("whereis", class_info, info_variables_command, @@ -6719,7 +6721,7 @@ Usage: whereis [-q] [-n] [-t TYPEREGEXP] [NAMEREGEXP]\n\ Prints the global and static variables.\n"), _("global and static variables"), true)); - set_cmd_completer_handle_brkchars (c, info_print_command_completer); + set_cmd_completer_handle_brkchars (c, info_vars_funcs_command_completer); } c = add_info ("functions", info_functions_command, @@ -6729,7 +6731,7 @@ Usage: info functions [-q] [-n] [-t TYPEREGEXP] [NAMEREGEXP]\n\ Prints the functions.\n"), _("functions"), true)); - set_cmd_completer_handle_brkchars (c, info_print_command_completer); + set_cmd_completer_handle_brkchars (c, info_vars_funcs_command_completer); c = add_info ("types", info_types_command, _("\ All type names, or those matching REGEXP.\n\ -- 2.25.0.341.g760bfbb309-goog ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] Disambiguate info_print_options 2020-01-28 10:14 ` Ali Tamur via gdb-patches @ 2020-02-01 23:22 ` Ali Tamur via gdb-patches 2020-02-05 21:40 ` Ali Tamur via gdb-patches 0 siblings, 1 reply; 6+ messages in thread From: Ali Tamur via gdb-patches @ 2020-02-01 23:22 UTC (permalink / raw) To: gdb-patches; +Cc: Tom Tromey Friendly ping? On Mon, Jan 27, 2020 at 7:12 PM Ali Tamur <tamur@google.com> wrote: > > So how about "info_vars_funcs_options"? > > > > Maybe make_info_sources_options_def_group should be renamed as well. > > And perhaps info_print_command_completer. My thinking here is that it > > is best if the related names are all consistent. > > Renamed info_print_options, info_print_options_defs, > make_info_print_options_def_group, info_print_command_completer. > Did not rename make_info_sources_options_def_group; it seems not > directly related? > > Please take another look, thank you. > > --- > struct info_print_options is defined in both symtab.c and stack.c, which is > an ODR violation. So, I am renaming info_print_options and related > structs/functions in symtab.c: > > info_print_options ==> info_vars_funcs_options > info_print_options_defs ==> info_vars_funcs_options_defs > make_info_print_options_def_group ==> > make_info_vars_funcs_options_def_group > info_print_command_completer ==> info_vars_funcs_command_completer > > gdb/ChangeLog: > > * symtab.c (info_print_options): Rename to > info_vars_funcs_options. > (info_print_options_defs): Rename to > info_vars_funcs_options_defs. > (make_info_print_options_def_group): Rename to > make_info_vars_funcs_options_def_group. > (info_print_command_completer): Rename to > info_vars_funcs_command_completer. > (info_variables_command): Apply name changes. > (info_functions_command): Likewise. > (_initialize_symtab): Likewise. > --- > gdb/symtab.c | 46 ++++++++++++++++++++++++---------------------- > 1 file changed, 24 insertions(+), 22 deletions(-) > > diff --git a/gdb/symtab.c b/gdb/symtab.c > index f456f4d852..d99be41261 100644 > --- a/gdb/symtab.c > +++ b/gdb/symtab.c > @@ -4976,13 +4976,13 @@ symtab_symbol_info (bool quiet, bool > exclude_minsyms, > and 'info functions' commands. These correspond to the -q, -t, and -n > options. */ > > -struct info_print_options > +struct info_vars_funcs_options > { > bool quiet = false; > bool exclude_minsyms = false; > char *type_regexp = nullptr; > > - ~info_print_options () > + ~info_vars_funcs_options () > { > xfree (type_regexp); > } > @@ -4991,24 +4991,25 @@ struct info_print_options > /* The options used by the 'info variables' and 'info functions' > commands. */ > > -static const gdb::option::option_def info_print_options_defs[] = { > - gdb::option::boolean_option_def<info_print_options> { > +static const gdb::option::option_def info_vars_funcs_options_defs[] = { > + gdb::option::boolean_option_def<info_vars_funcs_options> { > "q", > - [] (info_print_options *opt) { return &opt->quiet; }, > + [] (info_vars_funcs_options *opt) { return &opt->quiet; }, > nullptr, /* show_cmd_cb */ > nullptr /* set_doc */ > }, > > - gdb::option::boolean_option_def<info_print_options> { > + gdb::option::boolean_option_def<info_vars_funcs_options> { > "n", > - [] (info_print_options *opt) { return &opt->exclude_minsyms; }, > + [] (info_vars_funcs_options *opt) { return &opt->exclude_minsyms; }, > nullptr, /* show_cmd_cb */ > nullptr /* set_doc */ > }, > > - gdb::option::string_option_def<info_print_options> { > + gdb::option::string_option_def<info_vars_funcs_options> { > "t", > - [] (info_print_options *opt) { return &opt->type_regexp; }, > + [] (info_vars_funcs_options *opt) { return &opt->type_regexp; > + }, > nullptr, /* show_cmd_cb */ > nullptr /* set_doc */ > } > @@ -5018,20 +5019,20 @@ static const gdb::option::option_def > info_print_options_defs[] = { > functions'. */ > > static gdb::option::option_def_group > -make_info_print_options_def_group (info_print_options *opts) > +make_info_vars_funcs_options_def_group (info_vars_funcs_options *opts) > { > - return {{info_print_options_defs}, opts}; > + return {{info_vars_funcs_options_defs}, opts}; > } > > /* Command completer for 'info variables' and 'info functions'. */ > > static void > -info_print_command_completer (struct cmd_list_element *ignore, > - completion_tracker &tracker, > - const char *text, const char * /* word */) > +info_vars_funcs_command_completer (struct cmd_list_element *ignore, > + completion_tracker &tracker, > + const char *text, const char * /* word > */) > { > const auto group > - = make_info_print_options_def_group (nullptr); > + = make_info_vars_funcs_options_def_group (nullptr); > if (gdb::option::complete_options > (tracker, &text, gdb::option::PROCESS_OPTIONS_UNKNOWN_IS_OPERAND, > group)) > return; > @@ -5045,8 +5046,8 @@ info_print_command_completer (struct > cmd_list_element *ignore, > static void > info_variables_command (const char *args, int from_tty) > { > - info_print_options opts; > - auto grp = make_info_print_options_def_group (&opts); > + info_vars_funcs_options opts; > + auto grp = make_info_vars_funcs_options_def_group (&opts); > gdb::option::process_options > (&args, gdb::option::PROCESS_OPTIONS_UNKNOWN_IS_OPERAND, grp); > if (args != nullptr && *args == '\0') > @@ -5061,8 +5062,9 @@ info_variables_command (const char *args, int > from_tty) > static void > info_functions_command (const char *args, int from_tty) > { > - info_print_options opts; > - auto grp = make_info_print_options_def_group (&opts); > + info_vars_funcs_options opts; > + > + auto grp = make_info_vars_funcs_options_def_group (&opts); > gdb::option::process_options > (&args, gdb::option::PROCESS_OPTIONS_UNKNOWN_IS_OPERAND, grp); > if (args != nullptr && *args == '\0') > @@ -6709,7 +6711,7 @@ Usage: info variables [-q] [-n] [-t TYPEREGEXP] > [NAMEREGEXP]\n\ > Prints the global and static variables.\n"), > _("global and static variables"), > true)); > - set_cmd_completer_handle_brkchars (c, info_print_command_completer); > + set_cmd_completer_handle_brkchars (c, > info_vars_funcs_command_completer); > if (dbx_commands) > { > c = add_com ("whereis", class_info, info_variables_command, > @@ -6719,7 +6721,7 @@ Usage: whereis [-q] [-n] [-t TYPEREGEXP] > [NAMEREGEXP]\n\ > Prints the global and static variables.\n"), > _("global and static variables"), > true)); > - set_cmd_completer_handle_brkchars (c, info_print_command_completer); > + set_cmd_completer_handle_brkchars (c, > info_vars_funcs_command_completer); > } > > c = add_info ("functions", info_functions_command, > @@ -6729,7 +6731,7 @@ Usage: info functions [-q] [-n] [-t TYPEREGEXP] > [NAMEREGEXP]\n\ > Prints the functions.\n"), > _("functions"), > true)); > - set_cmd_completer_handle_brkchars (c, info_print_command_completer); > + set_cmd_completer_handle_brkchars (c, > info_vars_funcs_command_completer); > > c = add_info ("types", info_types_command, _("\ > All type names, or those matching REGEXP.\n\ > -- > 2.25.0.341.g760bfbb309-goog > > ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] Disambiguate info_print_options 2020-02-01 23:22 ` Ali Tamur via gdb-patches @ 2020-02-05 21:40 ` Ali Tamur via gdb-patches 2020-02-05 21:49 ` Simon Marchi 0 siblings, 1 reply; 6+ messages in thread From: Ali Tamur via gdb-patches @ 2020-02-05 21:40 UTC (permalink / raw) To: gdb-patches; +Cc: Tom Tromey Hi, If there are no objections, I'm planning to submit this on Friday, Feb 7th. Thanks. On Sat, Feb 1, 2020 at 3:22 PM Ali Tamur <tamur@google.com> wrote: > Friendly ping? > > On Mon, Jan 27, 2020 at 7:12 PM Ali Tamur <tamur@google.com> wrote: > >> > So how about "info_vars_funcs_options"? >> > >> > Maybe make_info_sources_options_def_group should be renamed as well. >> > And perhaps info_print_command_completer. My thinking here is that it >> > is best if the related names are all consistent. >> >> Renamed info_print_options, info_print_options_defs, >> make_info_print_options_def_group, info_print_command_completer. >> Did not rename make_info_sources_options_def_group; it seems not >> directly related? >> >> Please take another look, thank you. >> >> --- >> struct info_print_options is defined in both symtab.c and stack.c, which >> is >> an ODR violation. So, I am renaming info_print_options and related >> structs/functions in symtab.c: >> >> info_print_options ==> info_vars_funcs_options >> info_print_options_defs ==> info_vars_funcs_options_defs >> make_info_print_options_def_group ==> >> make_info_vars_funcs_options_def_group >> info_print_command_completer ==> info_vars_funcs_command_completer >> >> gdb/ChangeLog: >> >> * symtab.c (info_print_options): Rename to >> info_vars_funcs_options. >> (info_print_options_defs): Rename to >> info_vars_funcs_options_defs. >> (make_info_print_options_def_group): Rename to >> make_info_vars_funcs_options_def_group. >> (info_print_command_completer): Rename to >> info_vars_funcs_command_completer. >> (info_variables_command): Apply name changes. >> (info_functions_command): Likewise. >> (_initialize_symtab): Likewise. >> --- >> gdb/symtab.c | 46 ++++++++++++++++++++++++---------------------- >> 1 file changed, 24 insertions(+), 22 deletions(-) >> >> diff --git a/gdb/symtab.c b/gdb/symtab.c >> index f456f4d852..d99be41261 100644 >> --- a/gdb/symtab.c >> +++ b/gdb/symtab.c >> @@ -4976,13 +4976,13 @@ symtab_symbol_info (bool quiet, bool >> exclude_minsyms, >> and 'info functions' commands. These correspond to the -q, -t, and -n >> options. */ >> >> -struct info_print_options >> +struct info_vars_funcs_options >> { >> bool quiet = false; >> bool exclude_minsyms = false; >> char *type_regexp = nullptr; >> >> - ~info_print_options () >> + ~info_vars_funcs_options () >> { >> xfree (type_regexp); >> } >> @@ -4991,24 +4991,25 @@ struct info_print_options >> /* The options used by the 'info variables' and 'info functions' >> commands. */ >> >> -static const gdb::option::option_def info_print_options_defs[] = { >> - gdb::option::boolean_option_def<info_print_options> { >> +static const gdb::option::option_def info_vars_funcs_options_defs[] = { >> + gdb::option::boolean_option_def<info_vars_funcs_options> { >> "q", >> - [] (info_print_options *opt) { return &opt->quiet; }, >> + [] (info_vars_funcs_options *opt) { return &opt->quiet; }, >> nullptr, /* show_cmd_cb */ >> nullptr /* set_doc */ >> }, >> >> - gdb::option::boolean_option_def<info_print_options> { >> + gdb::option::boolean_option_def<info_vars_funcs_options> { >> "n", >> - [] (info_print_options *opt) { return &opt->exclude_minsyms; }, >> + [] (info_vars_funcs_options *opt) { return &opt->exclude_minsyms; }, >> nullptr, /* show_cmd_cb */ >> nullptr /* set_doc */ >> }, >> >> - gdb::option::string_option_def<info_print_options> { >> + gdb::option::string_option_def<info_vars_funcs_options> { >> "t", >> - [] (info_print_options *opt) { return &opt->type_regexp; }, >> + [] (info_vars_funcs_options *opt) { return &opt->type_regexp; >> + }, >> nullptr, /* show_cmd_cb */ >> nullptr /* set_doc */ >> } >> @@ -5018,20 +5019,20 @@ static const gdb::option::option_def >> info_print_options_defs[] = { >> functions'. */ >> >> static gdb::option::option_def_group >> -make_info_print_options_def_group (info_print_options *opts) >> +make_info_vars_funcs_options_def_group (info_vars_funcs_options *opts) >> { >> - return {{info_print_options_defs}, opts}; >> + return {{info_vars_funcs_options_defs}, opts}; >> } >> >> /* Command completer for 'info variables' and 'info functions'. */ >> >> static void >> -info_print_command_completer (struct cmd_list_element *ignore, >> - completion_tracker &tracker, >> - const char *text, const char * /* word */) >> +info_vars_funcs_command_completer (struct cmd_list_element *ignore, >> + completion_tracker &tracker, >> + const char *text, const char * /* word >> */) >> { >> const auto group >> - = make_info_print_options_def_group (nullptr); >> + = make_info_vars_funcs_options_def_group (nullptr); >> if (gdb::option::complete_options >> (tracker, &text, gdb::option::PROCESS_OPTIONS_UNKNOWN_IS_OPERAND, >> group)) >> return; >> @@ -5045,8 +5046,8 @@ info_print_command_completer (struct >> cmd_list_element *ignore, >> static void >> info_variables_command (const char *args, int from_tty) >> { >> - info_print_options opts; >> - auto grp = make_info_print_options_def_group (&opts); >> + info_vars_funcs_options opts; >> + auto grp = make_info_vars_funcs_options_def_group (&opts); >> gdb::option::process_options >> (&args, gdb::option::PROCESS_OPTIONS_UNKNOWN_IS_OPERAND, grp); >> if (args != nullptr && *args == '\0') >> @@ -5061,8 +5062,9 @@ info_variables_command (const char *args, int >> from_tty) >> static void >> info_functions_command (const char *args, int from_tty) >> { >> - info_print_options opts; >> - auto grp = make_info_print_options_def_group (&opts); >> + info_vars_funcs_options opts; >> + >> + auto grp = make_info_vars_funcs_options_def_group (&opts); >> gdb::option::process_options >> (&args, gdb::option::PROCESS_OPTIONS_UNKNOWN_IS_OPERAND, grp); >> if (args != nullptr && *args == '\0') >> @@ -6709,7 +6711,7 @@ Usage: info variables [-q] [-n] [-t TYPEREGEXP] >> [NAMEREGEXP]\n\ >> Prints the global and static variables.\n"), >> _("global and static variables"), >> true)); >> - set_cmd_completer_handle_brkchars (c, info_print_command_completer); >> + set_cmd_completer_handle_brkchars (c, >> info_vars_funcs_command_completer); >> if (dbx_commands) >> { >> c = add_com ("whereis", class_info, info_variables_command, >> @@ -6719,7 +6721,7 @@ Usage: whereis [-q] [-n] [-t TYPEREGEXP] >> [NAMEREGEXP]\n\ >> Prints the global and static variables.\n"), >> _("global and static variables"), >> true)); >> - set_cmd_completer_handle_brkchars (c, >> info_print_command_completer); >> + set_cmd_completer_handle_brkchars (c, >> info_vars_funcs_command_completer); >> } >> >> c = add_info ("functions", info_functions_command, >> @@ -6729,7 +6731,7 @@ Usage: info functions [-q] [-n] [-t TYPEREGEXP] >> [NAMEREGEXP]\n\ >> Prints the functions.\n"), >> _("functions"), >> true)); >> - set_cmd_completer_handle_brkchars (c, info_print_command_completer); >> + set_cmd_completer_handle_brkchars (c, >> info_vars_funcs_command_completer); >> >> c = add_info ("types", info_types_command, _("\ >> All type names, or those matching REGEXP.\n\ >> -- >> 2.25.0.341.g760bfbb309-goog >> >> ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] Disambiguate info_print_options 2020-02-05 21:40 ` Ali Tamur via gdb-patches @ 2020-02-05 21:49 ` Simon Marchi 0 siblings, 0 replies; 6+ messages in thread From: Simon Marchi @ 2020-02-05 21:49 UTC (permalink / raw) To: Ali Tamur, gdb-patches; +Cc: Tom Tromey On 2020-02-05 4:39 p.m., Ali Tamur via gdb-patches wrote: > Hi, > If there are no objections, I'm planning to submit this on Friday, Feb 7th. > Thanks. The patch LGTM, please go ahead and push it. Thanks, Simon ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2020-02-05 21:49 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2020-01-25 7:38 [PATCH] Disambiguate info_print_options Ali Tamur via gdb-patches 2020-01-26 16:15 ` Tom Tromey 2020-01-28 10:14 ` Ali Tamur via gdb-patches 2020-02-01 23:22 ` Ali Tamur via gdb-patches 2020-02-05 21:40 ` Ali Tamur via gdb-patches 2020-02-05 21:49 ` Simon Marchi
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox