Remove LA_PRINT_TYPE

This removes the LA_PRINT_TYPE macro, in favor of using ordinary
method calls.
This commit is contained in:
Tom Tromey
2022-01-22 16:31:06 -07:00
parent 7b8c55afd0
commit 13eb081a83
5 changed files with 17 additions and 17 deletions

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

View 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) \

View 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)
{

View 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

View 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");
}