Rename fprintf_symbol_filtered
authorTom Tromey <tom@tromey.com>
Sun, 2 Jan 2022 18:55:39 +0000 (11:55 -0700)
committerTom Tromey <tom@tromey.com>
Tue, 29 Mar 2022 18:46:25 +0000 (12:46 -0600)
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.

gdb/c-typeprint.c
gdb/cp-valprint.c
gdb/p-valprint.c
gdb/printcmd.c
gdb/utils.c
gdb/utils.h

index 66fea58cbbb6ebb268b4017909b32352fd1e8ee5..3425c829e3f7e0e77e76059b50a5329ee21b1214 100644 (file)
@@ -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
index fc5600c100c509d3a2a3caf547960c3343c0d5f5..43a52698b716708d6d6cdf61e207ac16ab5e5dc9 100644 (file)
@@ -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 (),
index 3b98b88b52814585b633fda48e53dfb6653bc2b3..427520fa6a077f6fbb9465ce3d143080bbf4df6a 100644 (file)
@@ -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 (),
index b200ccf11418a23c20708747839ac995fd645ef9..396d1feda5b77982d0e345cd0548213e7403fb9f 100644 (file)
@@ -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);
index bf6f4fb9b89298525506443aea45b21a014169d3..bc0cdd057556b2856af292e2c26ec65c4e10412c 100644 (file)
@@ -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)
     {
index 8b7eccb7bb3eeaa4ec411cb962ef113e8628da7b..71a034935cfc5222b32bbec95efe37fd1e16b9d5 100644 (file)
@@ -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;