+ struct cmd_list_element *c;
+
+ c = add_com ("ptype", class_vars, ptype_command, _("\
+Print definition of type TYPE.\n\
+Usage: ptype[/FLAGS] TYPE | EXPRESSION\n\
+Argument may be any type (for example a type name defined by typedef,\n\
+or \"struct STRUCT-TAG\" or \"class CLASS-NAME\" or \"union UNION-TAG\"\n\
+or \"enum ENUM-TAG\") or an expression.\n\
+The selected stack frame's lexical context is used to look up the name.\n\
+Contrary to \"whatis\", \"ptype\" always unrolls any typedefs.\n\
+\n\
+Available FLAGS are:\n\
+ /r print in \"raw\" form; do not substitute typedefs\n\
+ /m do not print methods defined in a class\n\
+ /M print methods defined in a class\n\
+ /t do not print typedefs defined in a class\n\
+ /T print typedefs defined in a class\n\
+ /o print offsets and sizes of fields in a struct (like pahole)"));
+ set_cmd_completer (c, expression_completer);
+
+ c = add_com ("whatis", class_vars, whatis_command,
+ _("Print data type of expression EXP.\n\
+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_setshow_boolean_cmd ("methods", no_class, &print_methods,
+ _("\
+Set printing of methods defined in classes."), _("\
+Show printing of methods defined in classes."), NULL,
+ set_print_type_methods,
+ show_print_type_methods,
+ &setprinttypelist, &showprinttypelist);
+ add_setshow_boolean_cmd ("typedefs", no_class, &print_typedefs,
+ _("\
+Set printing of typedefs defined in classes."), _("\
+Show printing of typedefs defined in classes."), NULL,
+ set_print_type_typedefs,
+ show_print_type_typedefs,
+ &setprinttypelist, &showprinttypelist);
+
+ add_setshow_zuinteger_unlimited_cmd ("nested-type-limit", no_class,
+ &print_nested_type_limit,
+ _("\
+Set the number of recursive nested type definitions to print \
+(\"unlimited\" or -1 to show all)."), _("\
+Show the number of recursive nested type definitions to print."), NULL,
+ set_print_type_nested_types,
+ show_print_type_nested_types,
+ &setprinttypelist, &showprinttypelist);
+}