public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] Rename fprintf_symbol_filtered
@ 2022-03-29 19:43 Tom Tromey
  0 siblings, 0 replies; only message in thread
From: Tom Tromey @ 2022-03-29 19:43 UTC (permalink / raw)
  To: gdb-cvs

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=bed009b9d8601de825ac848c543ee9853628940d

commit bed009b9d8601de825ac848c543ee9853628940d
Author: Tom Tromey <tom@tromey.com>
Date:   Sun Jan 2 11:55:39 2022 -0700

    Rename fprintf_symbol_filtered
    
    fprintf_symbol_filtered is misnamed, because whether filtering happens
    is now up to the stream.  This renames it to fprintf_symbol, which
    isn't a great name (the first "f" doesn't mean much and the second one
    is truly meaningless here), but "print_symbol" was already taken.

Diff:
---
 gdb/c-typeprint.c | 8 ++++----
 gdb/cp-valprint.c | 8 ++++----
 gdb/p-valprint.c  | 8 ++++----
 gdb/printcmd.c    | 8 ++++----
 gdb/utils.c       | 6 +++---
 gdb/utils.h       | 4 ++--
 6 files changed, 21 insertions(+), 21 deletions(-)

diff --git a/gdb/c-typeprint.c b/gdb/c-typeprint.c
index 66fea58cbbb..3425c829e3f 100644
--- a/gdb/c-typeprint.c
+++ b/gdb/c-typeprint.c
@@ -283,10 +283,10 @@ cp_type_print_method_args (struct type *mtype, const char *prefix,
   int varargs = mtype->has_varargs ();
   int i;
 
-  fprintf_symbol_filtered (stream, prefix,
-			   language_cplus, DMGL_ANSI);
-  fprintf_symbol_filtered (stream, varstring,
-			   language_cplus, DMGL_ANSI);
+  fprintf_symbol (stream, prefix,
+		  language_cplus, DMGL_ANSI);
+  fprintf_symbol (stream, varstring,
+		  language_cplus, DMGL_ANSI);
   gdb_puts ("(", stream);
 
   /* Skip the class variable.  We keep this here to accommodate older
diff --git a/gdb/cp-valprint.c b/gdb/cp-valprint.c
index fc5600c100c..43a52698b71 100644
--- a/gdb/cp-valprint.c
+++ b/gdb/cp-valprint.c
@@ -230,10 +230,10 @@ cp_print_value_fields (struct value *val, struct ui_file *stream,
 	  if (field_is_static (&type->field (i)))
 	    {
 	      gdb_puts ("static ", stream);
-	      fprintf_symbol_filtered (stream,
-				       type->field (i).name (),
-				       current_language->la_language,
-				       DMGL_PARAMS | DMGL_ANSI);
+	      fprintf_symbol (stream,
+			      type->field (i).name (),
+			      current_language->la_language,
+			      DMGL_PARAMS | DMGL_ANSI);
 	    }
 	  else
 	    fputs_styled (type->field (i).name (),
diff --git a/gdb/p-valprint.c b/gdb/p-valprint.c
index 3b98b88b528..427520fa6a0 100644
--- a/gdb/p-valprint.c
+++ b/gdb/p-valprint.c
@@ -582,10 +582,10 @@ pascal_object_print_value_fields (struct value *val, struct ui_file *stream,
 	  if (field_is_static (&type->field (i)))
 	    {
 	      gdb_puts ("static ", stream);
-	      fprintf_symbol_filtered (stream,
-				       type->field (i).name (),
-				       current_language->la_language,
-				       DMGL_PARAMS | DMGL_ANSI);
+	      fprintf_symbol (stream,
+			      type->field (i).name (),
+			      current_language->la_language,
+			      DMGL_PARAMS | DMGL_ANSI);
 	    }
 	  else
 	    fputs_styled (type->field (i).name (),
diff --git a/gdb/printcmd.c b/gdb/printcmd.c
index b200ccf1141..396d1feda5b 100644
--- a/gdb/printcmd.c
+++ b/gdb/printcmd.c
@@ -1633,8 +1633,8 @@ info_address_command (const char *exp, int from_tty)
       if (is_a_field_of_this.type != NULL)
 	{
 	  gdb_printf ("Symbol \"");
-	  fprintf_symbol_filtered (gdb_stdout, exp,
-				   current_language->la_language, DMGL_ANSI);
+	  fprintf_symbol (gdb_stdout, exp,
+			  current_language->la_language, DMGL_ANSI);
 	  gdb_printf ("\" is a field of the local class variable ");
 	  if (current_language->la_language == language_objc)
 	    gdb_printf ("`self'\n");	/* ObjC equivalent of "this" */
@@ -1653,8 +1653,8 @@ info_address_command (const char *exp, int from_tty)
 	  load_addr = BMSYMBOL_VALUE_ADDRESS (msymbol);
 
 	  gdb_printf ("Symbol \"");
-	  fprintf_symbol_filtered (gdb_stdout, exp,
-				   current_language->la_language, DMGL_ANSI);
+	  fprintf_symbol (gdb_stdout, exp,
+			  current_language->la_language, DMGL_ANSI);
 	  gdb_printf ("\" is at ");
 	  fputs_styled (paddress (gdbarch, load_addr), address_style.style (),
 			gdb_stdout);
diff --git a/gdb/utils.c b/gdb/utils.c
index bf6f4fb9b89..bc0cdd05755 100644
--- a/gdb/utils.c
+++ b/gdb/utils.c
@@ -1913,14 +1913,14 @@ print_spaces (int n, struct ui_file *stream)
 \f
 /* C++/ObjC demangler stuff.  */
 
-/* fprintf_symbol_filtered attempts to demangle NAME, a symbol in language
+/* fprintf_symbol attempts to demangle NAME, a symbol in language
    LANG, using demangling args ARG_MODE, and print it filtered to STREAM.
    If the name is not mangled, or the language for the name is unknown, or
    demangling is off, the name is printed in its "raw" form.  */
 
 void
-fprintf_symbol_filtered (struct ui_file *stream, const char *name,
-			 enum language lang, int arg_mode)
+fprintf_symbol (struct ui_file *stream, const char *name,
+		enum language lang, int arg_mode)
 {
   if (name != NULL)
     {
diff --git a/gdb/utils.h b/gdb/utils.h
index 8b7eccb7bb3..71a034935cf 100644
--- a/gdb/utils.h
+++ b/gdb/utils.h
@@ -305,8 +305,8 @@ extern const char *print_core_address (struct gdbarch *gdbarch,
 
 extern CORE_ADDR string_to_core_addr (const char *my_string);
 
-extern void fprintf_symbol_filtered (struct ui_file *, const char *,
-				     enum language, int);
+extern void fprintf_symbol (struct ui_file *, const char *,
+			    enum language, int);
 
 extern void throw_perror_with_name (enum errors errcode, const char *string)
   ATTRIBUTE_NORETURN;


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-03-29 19:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-29 19:43 [binutils-gdb] Rename fprintf_symbol_filtered Tom Tromey

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).