/* Language independent support for printing types for GDB, the GNU debugger.
- Copyright (C) 1986-2019 Free Software Foundation, Inc.
+ Copyright (C) 1986-2020 Free Software Foundation, Inc.
This file is part of GDB.
continue;
tf = XOBNEW (&m_storage, struct decl_field);
- tf->name = SYMBOL_LINKAGE_NAME (TYPE_TEMPLATE_ARGUMENT (t, i));
+ tf->name = TYPE_TEMPLATE_ARGUMENT (t, i)->linkage_name ();
tf->type = SYMBOL_TYPE (TYPE_TEMPLATE_ARGUMENT (t, i));
slot = htab_find_slot (m_table, tf, INSERT);
struct cmd_list_element *showprinttypelist;
-static void
-set_print_type (const char *arg, int from_tty)
-{
- printf_unfiltered (
- "\"set print type\" must be followed by the name of a subcommand.\n");
- help_list (setprintlist, "set print type ", all_commands, gdb_stdout);
-}
-
-static void
-show_print_type (const char *args, int from_tty)
-{
- cmd_show_list (showprinttypelist, from_tty, "");
-}
-
static bool print_methods = true;
static void
}
}
+void _initialize_typeprint ();
void
-_initialize_typeprint (void)
+_initialize_typeprint ()
{
struct cmd_list_element *c;
Only one level of typedefs is unrolled. See also \"ptype\"."));
set_cmd_completer (c, expression_completer);
- add_prefix_cmd ("type", no_class, show_print_type,
- _("Generic command for showing type-printing settings."),
- &showprinttypelist, "show print type ", 0, &showprintlist);
- add_prefix_cmd ("type", no_class, set_print_type,
- _("Generic command for setting how types print."),
- &setprinttypelist, "set print type ", 0, &setprintlist);
+ add_show_prefix_cmd ("type", no_class,
+ _("Generic command for showing type-printing settings."),
+ &showprinttypelist, "show print type ", 0,
+ &showprintlist);
+ add_basic_prefix_cmd ("type", no_class,
+ _("Generic command for setting how types print."),
+ &setprinttypelist, "set print type ", 0,
+ &setprintlist);
add_setshow_boolean_cmd ("methods", no_class, &print_methods,
_("\