This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: replace typedef_print with a language method
Hi Tom,
This looks good to me except for the minor comment below.
On Wednesday 10 September 2008 18:07:14, Tom Tromey wrote:
> @@ -3312,7 +3312,7 @@ print_symbol_info (domain_enum kind, struct symtab
> *s, struct symbol *sym, /* Typedef that is not a C++ class */
> if (kind == TYPES_DOMAIN
> && SYMBOL_DOMAIN (sym) != STRUCT_DOMAIN)
> - typedef_print (SYMBOL_TYPE (sym), sym, gdb_stdout);
> + current_language->la_print_typedef (SYMBOL_TYPE (sym), sym, gdb_stdout);
For consistency with the other language print methods, could you please
add a LA_PRINT_TYPEDEF macro to language.h, and use it instead of calling
current_language->la_print_typedef directly? Okay with that change.
For extra consistency, I'd be mildly inclined to leave typedef_print in
place, similarly to type_print, but I've no strong opinion on that.
As a side note, there's a ada_typedef_print function in
ada-typeprint.c, but it isn't used anywhere, even pre-your
patch.
:REVIEWMAIL:
Thanks,
--
Pedro Alves