]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Remove LA_PRINT_TYPE
authorTom Tromey <tom@tromey.com>
Sat, 22 Jan 2022 23:31:06 +0000 (16:31 -0700)
committerTom Tromey <tom@tromey.com>
Mon, 14 Feb 2022 13:22:33 +0000 (06:22 -0700)
This removes the LA_PRINT_TYPE macro, in favor of using ordinary
method calls.

gdb/guile/scm-type.c
gdb/language.h
gdb/python/py-type.c
gdb/symmisc.c
gdb/typeprint.c

index 987660ceaf98550b06d660ea5cc5eb5cb5205b03..27d00f12a95e01696107d2f692993419798e283a 100644 (file)
@@ -108,7 +108,8 @@ tyscm_type_name (struct type *type)
     {
       string_file stb;
 
-      LA_PRINT_TYPE (type, "", &stb, -1, 0, &type_print_raw_options);
+      current_language->print_type (type, "", &stb, -1, 0,
+                                   &type_print_raw_options);
       return stb.release ();
     }
   catch (const gdb_exception &except)
index bfdade398e422832b6a3087b304b5ccb9496967b..3930f5bd22307585cc3c12ac73ee6560b03a5a05 100644 (file)
@@ -755,9 +755,6 @@ extern enum language set_language (enum language);
    the current setting of working_lang, which the user sets
    with the "set language" command.  */
 
-#define LA_PRINT_TYPE(type,varstring,stream,show,level,flags)          \
-  (current_language->print_type(type,varstring,stream,show,level,flags))
-
 #define LA_PRINT_CHAR(ch, type, stream) \
   (current_language->printchar (ch, type, stream))
 #define LA_PRINT_STRING(stream, elttype, string, length, encoding, force_ellipses, options) \
index 9df667d2811df9c4df927e4fb4c4aedcc782461e..8613534d06043bf96263488077b4df4c3153a987 100644 (file)
@@ -1025,8 +1025,9 @@ typy_str (PyObject *self)
 
   try
     {
-      LA_PRINT_TYPE (type_object_to_type (self), "", &thetype, -1, 0,
-                    &type_print_raw_options);
+      current_language->print_type (type_object_to_type (self), "",
+                                   &thetype, -1, 0,
+                                   &type_print_raw_options);
     }
   catch (const gdb_exception &except)
     {
index 160278b50a97f823b7c8213860c766aba1861d2b..114d6bc5e530787c865e42e1ad2153c075264da7 100644 (file)
@@ -525,8 +525,8 @@ print_symbol (struct gdbarch *gdbarch, struct symbol *symbol,
     {
       if (symbol->type ()->name ())
        {
-         LA_PRINT_TYPE (symbol->type (), "", outfile, 1, depth,
-                        &type_print_raw_options);
+         current_language->print_type (symbol->type (), "", outfile, 1, depth,
+                                       &type_print_raw_options);
        }
       else
        {
@@ -536,8 +536,8 @@ print_symbol (struct gdbarch *gdbarch, struct symbol *symbol,
                     : (symbol->type ()->code () == TYPE_CODE_STRUCT
                        ? "struct" : "union")),
                            symbol->linkage_name ());
-         LA_PRINT_TYPE (symbol->type (), "", outfile, 1, depth,
-                        &type_print_raw_options);
+         current_language->print_type (symbol->type (), "", outfile, 1, depth,
+                                       &type_print_raw_options);
        }
       fprintf_filtered (outfile, ";\n");
     }
@@ -548,11 +548,11 @@ print_symbol (struct gdbarch *gdbarch, struct symbol *symbol,
       if (symbol->type ())
        {
          /* Print details of types, except for enums where it's clutter.  */
-         LA_PRINT_TYPE (symbol->type (), symbol->print_name (),
-                        outfile,
-                        symbol->type ()->code () != TYPE_CODE_ENUM,
-                        depth,
-                        &type_print_raw_options);
+         current_language->print_type (symbol->type (), symbol->print_name (),
+                                       outfile,
+                                       symbol->type ()->code () != TYPE_CODE_ENUM,
+                                       depth,
+                                       &type_print_raw_options);
          fprintf_filtered (outfile, "; ");
        }
       else
index f7a2ebac398fc1832ac238d037ee333815220f1c..c15a9c6b59f95bdbb560c8469fa928b2420c63ad 100644 (file)
@@ -392,7 +392,8 @@ void
 type_print (struct type *type, const char *varstring, struct ui_file *stream,
            int show)
 {
-  LA_PRINT_TYPE (type, varstring, stream, show, 0, &default_ptype_flags);
+  current_language->print_type (type, varstring, stream, show, 0,
+                               &default_ptype_flags);
 }
 
 /* Print TYPE to a string, returning it.  The caller is responsible for
@@ -578,7 +579,7 @@ whatis_exp (const char *exp, int show)
       printf_filtered (" */\n");    
     }
 
-  LA_PRINT_TYPE (type, "", gdb_stdout, show, 0, &flags);
+  current_language->print_type (type, "", gdb_stdout, show, 0, &flags);
   printf_filtered ("\n");
 }