From: "Christian Biesinger via gdb-patches" <gdb-patches@sourceware.org>
To: gdb-patches@sourceware.org
Cc: Christian Biesinger <cbiesinger@google.com>
Subject: [PATCH] Remove completion_list_add_msymbol
Date: Thu, 19 Dec 2019 01:42:00 -0000 [thread overview]
Message-ID: <20191219014238.85498-1-cbiesinger@google.com> (raw)
Now that both symbol and minimal_symbol inherit from general_symbol_info,
we can use the same function for both here.
gdb/ChangeLog:
2019-12-18 Christian Biesinger <cbiesinger@google.com>
* symtab.c (completion_list_add_symbol): Update.
(completion_list_add_msymbol): Remove.
(default_collect_symbol_completion_matches_break_on): Update.
Change-Id: Ifa01837d5f7e3438e7e6599c08baf1a2e7f086c9
---
gdb/symtab.c | 22 ++++------------------
1 file changed, 4 insertions(+), 18 deletions(-)
diff --git a/gdb/symtab.c b/gdb/symtab.c
index 26551372cb..a76c5d304f 100644
--- a/gdb/symtab.c
+++ b/gdb/symtab.c
@@ -5250,11 +5250,11 @@ completion_list_add_name (completion_tracker &tracker,
}
}
-/* completion_list_add_name wrapper for struct symbol. */
+/* completion_list_add_name wrapper for struct general_symbol_info. */
static void
completion_list_add_symbol (completion_tracker &tracker,
- symbol *sym,
+ general_symbol_info *sym,
const lookup_name_info &lookup_name,
const char *text, const char *word)
{
@@ -5263,20 +5263,6 @@ completion_list_add_symbol (completion_tracker &tracker,
lookup_name, text, word);
}
-/* completion_list_add_name wrapper for struct minimal_symbol. */
-
-static void
-completion_list_add_msymbol (completion_tracker &tracker,
- minimal_symbol *sym,
- const lookup_name_info &lookup_name,
- const char *text, const char *word)
-{
- completion_list_add_name (tracker, sym->language (),
- sym->natural_name (),
- lookup_name, text, word);
-}
-
-
/* ObjC: In case we are completing on a selector, look as the msymbol
again and feed all the selectors into the mill. */
@@ -5614,8 +5600,8 @@ default_collect_symbol_completion_matches_break_on
if (completion_skip_symbol (mode, msymbol))
continue;
- completion_list_add_msymbol (tracker, msymbol, lookup_name,
- sym_text, word);
+ completion_list_add_symbol (tracker, msymbol, lookup_name,
+ sym_text, word);
completion_list_objc_symbol (tracker, msymbol, lookup_name,
sym_text, word);
--
2.24.1.735.g03f4e72817-goog
next reply other threads:[~2019-12-19 1:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-19 1:42 Christian Biesinger via gdb-patches [this message]
2019-12-19 9:58 ` Andrew Burgess
2019-12-19 19:35 ` Christian Biesinger via gdb-patches
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=20191219014238.85498-1-cbiesinger@google.com \
--to=gdb-patches@sourceware.org \
--cc=cbiesinger@google.com \
/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: link
Be 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