Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH] Remove completion_list_add_msymbol
@ 2019-12-19  1:42 Christian Biesinger via gdb-patches
  2019-12-19  9:58 ` Andrew Burgess
  0 siblings, 1 reply; 3+ messages in thread
From: Christian Biesinger via gdb-patches @ 2019-12-19  1:42 UTC (permalink / raw)
  To: gdb-patches; +Cc: Christian Biesinger

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-12-19 19:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-19  1:42 [PATCH] Remove completion_list_add_msymbol Christian Biesinger via gdb-patches
2019-12-19  9:58 ` Andrew Burgess
2019-12-19 19:35   ` Christian Biesinger via gdb-patches

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox