diff options
author | Tom Tromey <tom@tromey.com> | 2022-01-22 16:31:06 -0700 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2022-02-14 06:22:33 -0700 |
commit | 13eb081a83b6f9b07cf4447e52e1d0503bf90211 (patch) | |
tree | 3dfa1010674e668dffef21fe981c45465e4b6942 | |
parent | 7b8c55afd07abf1e2e4efbeca4b9a614ce8d4e1e (diff) | |
download | fsf-binutils-gdb-13eb081a83b6f9b07cf4447e52e1d0503bf90211.zip fsf-binutils-gdb-13eb081a83b6f9b07cf4447e52e1d0503bf90211.tar.gz fsf-binutils-gdb-13eb081a83b6f9b07cf4447e52e1d0503bf90211.tar.bz2 |
Remove LA_PRINT_TYPE
This removes the LA_PRINT_TYPE macro, in favor of using ordinary
method calls.
-rw-r--r-- | gdb/guile/scm-type.c | 3 | ||||
-rw-r--r-- | gdb/language.h | 3 | ||||
-rw-r--r-- | gdb/python/py-type.c | 5 | ||||
-rw-r--r-- | gdb/symmisc.c | 18 | ||||
-rw-r--r-- | gdb/typeprint.c | 5 |
5 files changed, 17 insertions, 17 deletions
diff --git a/gdb/guile/scm-type.c b/gdb/guile/scm-type.c index 987660c..27d00f1 100644 --- a/gdb/guile/scm-type.c +++ b/gdb/guile/scm-type.c @@ -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) diff --git a/gdb/language.h b/gdb/language.h index bfdade3..3930f5b 100644 --- a/gdb/language.h +++ b/gdb/language.h @@ -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) \ diff --git a/gdb/python/py-type.c b/gdb/python/py-type.c index 9df667d..8613534 100644 --- a/gdb/python/py-type.c +++ b/gdb/python/py-type.c @@ -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) { diff --git a/gdb/symmisc.c b/gdb/symmisc.c index 160278b..114d6bc 100644 --- a/gdb/symmisc.c +++ b/gdb/symmisc.c @@ -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 diff --git a/gdb/typeprint.c b/gdb/typeprint.c index f7a2eba..c15a9c6 100644 --- a/gdb/typeprint.c +++ b/gdb/typeprint.c @@ -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"); } |