* value.h (value_print): Return void.
authorTom Tromey <tromey@redhat.com>
Thu, 1 Mar 2012 19:22:22 +0000 (19:22 +0000)
committerTom Tromey <tromey@redhat.com>
Thu, 1 Mar 2012 19:22:22 +0000 (19:22 +0000)
* valprint.c (value_print): Return void.
* p-valprint.c (pascal_value_print): Return void.
* p-lang.h (pascal_value_print): Return void.
* language.h (struct language_defn) <la_value_print>: Return
void.
* language.c (unk_lang_value_print): Return void.
* jv-valprint.c (java_value_print): Return void.
* jv-lang.h (java_value_print): Return void.
* f-valprint.c (c_value_print): Don't declare.
Include c-lang.h.
* c-valprint.c (c_value_print): Return void.
* c-lang.h (c_value_print): Return void.
* ada-valprint.c (ada_value_print): Return void.
* ada-lang.h (ada_value_print): Return void.

14 files changed:
gdb/ChangeLog
gdb/ada-lang.h
gdb/ada-valprint.c
gdb/c-lang.h
gdb/c-valprint.c
gdb/f-lang.c
gdb/jv-lang.h
gdb/jv-valprint.c
gdb/language.c
gdb/language.h
gdb/p-lang.h
gdb/p-valprint.c
gdb/valprint.c
gdb/value.h

index b511e1a90b40924c3bcfb858beaba1102fc4f8c5..480aa16961a0db8df49275ac722e5c595f782946 100644 (file)
@@ -1,3 +1,21 @@
+2012-03-01  Tom Tromey  <tromey@redhat.com>
+
+       * value.h (value_print): Return void.
+       * valprint.c (value_print): Return void.
+       * p-valprint.c (pascal_value_print): Return void.
+       * p-lang.h (pascal_value_print): Return void.
+       * language.h (struct language_defn) <la_value_print>: Return
+       void.
+       * language.c (unk_lang_value_print): Return void.
+       * jv-valprint.c (java_value_print): Return void.
+       * jv-lang.h (java_value_print): Return void.
+       * f-valprint.c (c_value_print): Don't declare.
+       Include c-lang.h.
+       * c-valprint.c (c_value_print): Return void.
+       * c-lang.h (c_value_print): Return void.
+       * ada-valprint.c (ada_value_print): Return void.
+       * ada-lang.h (ada_value_print): Return void.
+
 2012-03-01  Tom Tromey  <tromey@redhat.com>
 
        * value.c (value_primitive_field): Handle virtual base classes.
index fd7b0df44fcce9d92d394303c3ac96c048499fb5..76dca3227be17028378861498cf08675604d2680 100644 (file)
@@ -169,8 +169,8 @@ extern int ada_val_print (struct type *, const gdb_byte *, int, CORE_ADDR,
                          const struct value *,
                          const struct value_print_options *);
 
-extern int ada_value_print (struct value *, struct ui_file *,
-                           const struct value_print_options *);
+extern void ada_value_print (struct value *, struct ui_file *,
+                            const struct value_print_options *);
 
                                 /* Defined in ada-lang.c */
 
index 5cb2f98c760b99e3d4d2b5244b4d5864dd594837..32b85f2394623b123fc5f575d4e0319863dd0284 100644 (file)
@@ -963,7 +963,7 @@ print_variant_part (struct type *type, int field_num,
        comma_needed, outer_type, outer_offset);
 }
 
-int
+void
 ada_value_print (struct value *val0, struct ui_file *stream,
                 const struct value_print_options *options)
 {
@@ -1003,14 +1003,14 @@ ada_value_print (struct value *val0, struct ui_file *stream,
       fprintf_filtered (stream, "(");
       type_print (type, "", stream, -1);
       fprintf_filtered (stream, ") (...?)");
-      return 0;
+      return;
     }
 
   opts = *options;
   opts.deref_ref = 1;
-  return (val_print (type, value_contents_for_printing (val),
-                    value_embedded_offset (val), address,
-                    stream, 0, val, &opts, current_language));
+  val_print (type, value_contents_for_printing (val),
+            value_embedded_offset (val), address,
+            stream, 0, val, &opts, current_language);
 }
 
 static void
index e8c632f4ce5768473aa5ae1a4d0e904359f43b88..74574e2a3810d71b4669ebd076f1c97891abc125 100644 (file)
@@ -77,8 +77,8 @@ extern int c_val_print (struct type *, const gdb_byte *,
                        const struct value *,
                        const struct value_print_options *);
 
-extern int c_value_print (struct value *, struct ui_file *,
-                         const struct value_print_options *);
+extern void c_value_print (struct value *, struct ui_file *,
+                          const struct value_print_options *);
 
 /* These are in c-lang.c: */
 
index 0054dc0408a45d0a5391da9f209b37dfa6329025..98901ce5a8eb1a5f3b237d1898872542ca60c941 100644 (file)
@@ -644,7 +644,7 @@ c_val_print (struct type *type, const gdb_byte *valaddr,
   return (0);
 }
 \f
-int
+void
 c_value_print (struct value *val, struct ui_file *stream, 
               const struct value_print_options *options)
 {
@@ -748,10 +748,11 @@ c_value_print (struct value *val, struct ui_file *stream,
                            full ? "" : _(" [incomplete object]"));
          /* Print out object: enclosing type is same as real_type if
             full.  */
-         return val_print (value_enclosing_type (val),
-                           value_contents_for_printing (val), 0,
-                           value_address (val), stream, 0,
-                           val, &opts, current_language);
+         val_print (value_enclosing_type (val),
+                    value_contents_for_printing (val), 0,
+                    value_address (val), stream, 0,
+                    val, &opts, current_language);
+         return;
           /* Note: When we look up RTTI entries, we don't get any
              information on const or volatile attributes.  */
        }
@@ -760,17 +761,18 @@ c_value_print (struct value *val, struct ui_file *stream,
          /* No RTTI information, so let's do our best.  */
          fprintf_filtered (stream, "(%s ?) ",
                            TYPE_NAME (value_enclosing_type (val)));
-         return val_print (value_enclosing_type (val),
-                           value_contents_for_printing (val), 0,
-                           value_address (val), stream, 0,
-                           val, &opts, current_language);
+         val_print (value_enclosing_type (val),
+                    value_contents_for_printing (val), 0,
+                    value_address (val), stream, 0,
+                    val, &opts, current_language);
+         return;
        }
       /* Otherwise, we end up at the return outside this "if".  */
     }
 
-  return val_print (val_type, value_contents_for_printing (val),
-                   value_embedded_offset (val),
-                   value_address (val),
-                   stream, 0,
-                   val, &opts, current_language);
+  val_print (val_type, value_contents_for_printing (val),
+            value_embedded_offset (val),
+            value_address (val),
+            stream, 0,
+            val, &opts, current_language);
 }
index 805b143aae9f2c0dbfa46dc172c8428068c0dc40..ef78bc3295ba5728197310739889d623db3d1926 100644 (file)
@@ -33,6 +33,7 @@
 #include "value.h"
 #include "cp-support.h"
 #include "charset.h"
+#include "c-lang.h"
 
 
 /* Following is dubious stuff that had been in the xcoff reader.  */
@@ -268,11 +269,6 @@ f_make_symbol_completion_list (char *text, char *word)
   return default_make_symbol_completion_list_break_on (text, word, ":");
 }
 
-/* This is declared in c-lang.h but it is silly to import that file for what
-   is already just a hack.  */
-extern int c_value_print (struct value *, struct ui_file *,
-                         const struct value_print_options *);
-
 const struct language_defn f_language_defn =
 {
   "fortran",
index d0610961d2620b7fc5f4f03fb94cdf10153c6fc4..ffe25bf81f0133f3aa6904c519701164cde15b9d 100644 (file)
@@ -47,8 +47,8 @@ extern int java_val_print (struct type *, const gdb_byte *, int, CORE_ADDR,
                           const struct value *,
                           const struct value_print_options *);
 
-extern int java_value_print (struct value *, struct ui_file *,
-                            const struct value_print_options *);
+extern void java_value_print (struct value *, struct ui_file *,
+                             const struct value_print_options *);
 
 extern struct value *java_class_from_object (struct value *);
 
index 7f6e93113def06b10d01a122e58d252e88c07cc0..125e611388f95392866288c78ce9ff4adcc9e7ed 100644 (file)
@@ -33,7 +33,7 @@
 
 /* Local functions */
 
-int
+void
 java_value_print (struct value *val, struct ui_file *stream, 
                  const struct value_print_options *options)
 {
@@ -205,7 +205,7 @@ java_value_print (struct value *val, struct ui_file *stream,
 
       fprintf_filtered (stream, "}");
 
-      return 0;
+      return;
     }
 
   /* If it's type String, print it.  */
@@ -245,12 +245,12 @@ java_value_print (struct value *val, struct ui_file *stream,
       val_print_string (char_type, NULL, data + boffset, count, stream,
                        options);
 
-      return 0;
+      return;
     }
 
   opts = *options;
   opts.deref_ref = 1;
-  return common_val_print (val, stream, 0, &opts, current_language);
+  common_val_print (val, stream, 0, &opts, current_language);
 }
 
 /* TYPE, VALADDR, ADDRESS, STREAM, RECURSE, and OPTIONS have the
index 49ba21ab0708886fbc0ca23cfb8943bad480a76c..f312a1643b497f2d3dc86d8d4949d39209e38fc9 100644 (file)
@@ -66,8 +66,8 @@ static void unk_lang_printchar (int c, struct type *type,
 static void unk_lang_print_type (struct type *, const char *, struct ui_file *,
                                 int, int);
 
-static int unk_lang_value_print (struct value *, struct ui_file *,
-                                const struct value_print_options *);
+static void unk_lang_value_print (struct value *, struct ui_file *,
+                                 const struct value_print_options *);
 
 static CORE_ADDR unk_lang_trampoline (struct frame_info *, CORE_ADDR pc);
 
@@ -858,7 +858,7 @@ unk_lang_val_print (struct type *type, const gdb_byte *valaddr,
           "function unk_lang_val_print called."));
 }
 
-static int
+static void
 unk_lang_value_print (struct value *val, struct ui_file *stream,
                      const struct value_print_options *options)
 {
index a47a44d25947ad65d1663a5ad71da65d72ac9aa7..3156f27b8c99e883db7922812d952ee7aa42c213 100644 (file)
@@ -249,8 +249,8 @@ struct language_defn
 
     /* Print a top-level value using syntax appropriate for this language.  */
 
-    int (*la_value_print) (struct value *, struct ui_file *,
-                          const struct value_print_options *);
+    void (*la_value_print) (struct value *, struct ui_file *,
+                           const struct value_print_options *);
 
     /* PC is possibly an unknown languages trampoline.
        If that PC falls in a trampoline belonging to this language,
index 180c5448c4a85b410bf5080211c900128fc30dba..5b0691b84f1edfa41cde460909c590536ae74476 100644 (file)
@@ -40,8 +40,8 @@ extern int pascal_val_print (struct type *, const gdb_byte *, int,
                             const struct value *,
                             const struct value_print_options *);
 
-extern int pascal_value_print (struct value *, struct ui_file *,
-                              const struct value_print_options *);
+extern void pascal_value_print (struct value *, struct ui_file *,
+                               const struct value_print_options *);
 
 extern void pascal_type_print_method_args (const char *, const char *,
                                           struct ui_file *);
index 39eff10cca1c2bb679a68e729d64b7dcf24486a1..6b227548d8bcd00283340ee7fbf8e9fbe0d089c6 100644 (file)
@@ -579,7 +579,7 @@ pascal_val_print (struct type *type, const gdb_byte *valaddr,
   return (0);
 }
 \f
-int
+void
 pascal_value_print (struct value *val, struct ui_file *stream,
                    const struct value_print_options *options)
 {
@@ -613,7 +613,7 @@ pascal_value_print (struct value *val, struct ui_file *stream,
          fprintf_filtered (stream, ") ");
        }
     }
-  return common_val_print (val, stream, 0, &opts, current_language);
+  common_val_print (val, stream, 0, &opts, current_language);
 }
 
 
index a348cf48cdb2e296b4cfa94a345f8104fca40173..9ff0f27f235968378271751f1cdce0cee8b394f8 100644 (file)
@@ -460,17 +460,14 @@ common_val_print (struct value *val, struct ui_file *stream, int recurse,
 }
 
 /* Print on stream STREAM the value VAL according to OPTIONS.  The value
-   is printed using the current_language syntax.
+   is printed using the current_language syntax.  */
 
-   If the object printed is a string pointer, return the number of string
-   bytes printed.  */
-
-int
+void
 value_print (struct value *val, struct ui_file *stream,
             const struct value_print_options *options)
 {
   if (!value_check_printable (val, stream, options))
-    return 0;
+    return;
 
   if (!options->raw)
     {
@@ -482,10 +479,10 @@ value_print (struct value *val, struct ui_file *stream,
                                        val, options, current_language);
 
       if (r)
-       return r;
+       return;
     }
 
-  return LA_VALUE_PRINT (val, stream, options);
+  LA_VALUE_PRINT (val, stream, options);
 }
 
 /* Called by various <lang>_val_print routines to print
index d4c4a83d38e625f52179e72847b7d68e80655359..9706e70216d3b951fd8ae90e201221ae7c50ac5c 100644 (file)
@@ -808,8 +808,8 @@ extern void print_floating (const gdb_byte *valaddr, struct type *type,
 extern void print_decimal_floating (const gdb_byte *valaddr, struct type *type,
                                    struct ui_file *stream);
 
-extern int value_print (struct value *val, struct ui_file *stream,
-                       const struct value_print_options *options);
+extern void value_print (struct value *val, struct ui_file *stream,
+                        const struct value_print_options *options);
 
 extern void value_print_array_elements (struct value *val,
                                        struct ui_file *stream, int format,
This page took 0.03745 seconds and 4 git commands to generate.