Remove for_each_inferior
[deliverable/binutils-gdb.git] / gdb / typeprint.c
index 8e58bf9b5f80def8901ee8b2f9a1202708c90604..427af17ad710971e60eb3040600e8d8785613b77 100644 (file)
 #include "extension.h"
 #include "completer.h"
 
-extern void _initialize_typeprint (void);
-
-static void ptype_command (char *, int);
-
-static void whatis_command (char *, int);
-
-static void whatis_exp (char *, int);
-
 const struct type_print_options type_print_raw_options =
 {
   1,                           /* raw */
@@ -394,11 +386,20 @@ type_print_unknown_return_type (struct ui_file *stream)
   fprintf_filtered (stream, _("<unknown return type>"));
 }
 
+/* See typeprint.h.  */
+
+void
+error_unknown_type (const char *sym_print_name)
+{
+  error (_("'%s' has unknown type; cast it to its declared type"),
+        sym_print_name);
+}
+
 /* Print type of EXP, or last thing in value history if EXP == NULL.
    show is passed to type_print.  */
 
 static void
-whatis_exp (char *exp, int show)
+whatis_exp (const char *exp, int show)
 {
   struct value *val;
   struct cleanup *old_chain;
@@ -517,7 +518,7 @@ whatis_exp (char *exp, int show)
 }
 
 static void
-whatis_command (char *exp, int from_tty)
+whatis_command (const char *exp, int from_tty)
 {
   /* Most of the time users do not want to see all the fields
      in a structure.  If they do they can use the "ptype" command.
@@ -528,7 +529,7 @@ whatis_command (char *exp, int from_tty)
 /* TYPENAME is either the name of a type, or an expression.  */
 
 static void
-ptype_command (char *type_name, int from_tty)
+ptype_command (const char *type_name, int from_tty)
 {
   whatis_exp (type_name, 1);
 }
@@ -622,7 +623,7 @@ print_type_scalar (struct type *type, LONGEST val, struct ui_file *stream)
    and whatis_command().  */
 
 void
-maintenance_print_type (char *type_name, int from_tty)
+maintenance_print_type (const char *type_name, int from_tty)
 {
   struct value *val;
   struct type *type;
@@ -655,7 +656,7 @@ struct cmd_list_element *setprinttypelist;
 struct cmd_list_element *showprinttypelist;
 
 static void
-set_print_type (char *arg, int from_tty)
+set_print_type (const char *arg, int from_tty)
 {
   printf_unfiltered (
      "\"set print type\" must be followed by the name of a subcommand.\n");
@@ -663,7 +664,7 @@ set_print_type (char *arg, int from_tty)
 }
 
 static void
-show_print_type (char *args, int from_tty)
+show_print_type (const char *args, int from_tty)
 {
   cmd_show_list (showprinttypelist, from_tty, "");
 }
@@ -671,7 +672,8 @@ show_print_type (char *args, int from_tty)
 static int print_methods = 1;
 
 static void
-set_print_type_methods (char *args, int from_tty, struct cmd_list_element *c)
+set_print_type_methods (const char *args,
+                       int from_tty, struct cmd_list_element *c)
 {
   default_ptype_flags.print_methods = print_methods;
 }
@@ -687,7 +689,8 @@ show_print_type_methods (struct ui_file *file, int from_tty,
 static int print_typedefs = 1;
 
 static void
-set_print_type_typedefs (char *args, int from_tty, struct cmd_list_element *c)
+set_print_type_typedefs (const char *args,
+                        int from_tty, struct cmd_list_element *c)
 {
   default_ptype_flags.print_typedefs = print_typedefs;
 }
This page took 0.025404 seconds and 4 git commands to generate.