public inbox for gdb-testers@sourceware.org help / color / mirror / Atom feed
From: gdb-buildbot@sergiodj.net To: gdb-testers@sourceware.org Subject: [binutils-gdb] Disambiguate info_print_options Date: Thu, 06 Feb 2020 02:38:00 -0000 [thread overview] Message-ID: <095252be0b51750f0b135bcbf8624dd70a59bc1f@gdb-build> (raw) *** TEST RESULTS FOR COMMIT 095252be0b51750f0b135bcbf8624dd70a59bc1f *** commit 095252be0b51750f0b135bcbf8624dd70a59bc1f Author: Ali Tamur <tamur@google.com> AuthorDate: Fri Jan 24 19:40:40 2020 -0800 Commit: Ali Tamur <tamur@google.com> CommitDate: Wed Feb 5 17:35:18 2020 -0800 Disambiguate info_print_options 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. 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\
next reply other threads:[~2020-02-06 2:13 UTC|newest] Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-02-06 2:38 gdb-buildbot [this message] 2020-02-06 2:35 ` Failures on Ubuntu-Aarch64-m64, branch master gdb-buildbot 2020-02-06 2:40 ` Failures on Fedora-x86_64-m64, " gdb-buildbot 2020-02-06 2:40 ` Failures on Ubuntu-Aarch64-native-extended-gdbserver-m64, " gdb-buildbot 2020-02-06 3:14 ` Failures on Fedora-x86_64-native-extended-gdbserver-m32, " gdb-buildbot 2020-02-06 3:14 ` Failures on Fedora-i686, " gdb-buildbot 2020-02-06 4:43 ` Failures on Fedora-x86_64-native-extended-gdbserver-m64, " gdb-buildbot 2020-02-06 4:43 ` Failures on Fedora-x86_64-cc-with-index, " gdb-buildbot 2020-02-06 5:30 ` Failures on Fedora-x86_64-m32, " gdb-buildbot 2020-02-06 13:57 ` Failures on Fedora-x86_64-native-gdbserver-m32, " gdb-buildbot 2020-02-06 13:57 ` Failures on Fedora-x86_64-native-gdbserver-m64, " gdb-buildbot
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=095252be0b51750f0b135bcbf8624dd70a59bc1f@gdb-build \ --to=gdb-buildbot@sergiodj.net \ --cc=gdb-testers@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).